aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/testing/sysfs-fs-ext410
-rw-r--r--Documentation/ABI/testing/sysfs-pps73
-rw-r--r--Documentation/Changes7
-rw-r--r--Documentation/cgroups/memory.txt16
-rw-r--r--Documentation/connector/cn_test.c7
-rw-r--r--Documentation/feature-removal-schedule.txt14
-rw-r--r--Documentation/filesystems/ext2.txt2
-rw-r--r--Documentation/filesystems/ext4.txt4
-rw-r--r--Documentation/filesystems/isofs.txt9
-rw-r--r--Documentation/filesystems/proc.txt268
-rw-r--r--Documentation/gcov.txt246
-rw-r--r--Documentation/ioctl/ioctl-number.txt2
-rw-r--r--Documentation/kernel-parameters.txt7
-rw-r--r--Documentation/pps/pps.txt172
-rw-r--r--Documentation/rfkill.txt137
-rw-r--r--Documentation/robust-futex-ABI.txt4
-rw-r--r--Documentation/watchdog/hpwdt.txt84
-rw-r--r--MAINTAINERS28
-rw-r--r--Makefile11
-rw-r--r--arch/Kconfig2
-rw-r--r--arch/avr32/kernel/process.c2
-rw-r--r--arch/blackfin/include/asm/atomic.h109
-rw-r--r--arch/blackfin/include/asm/auxvec.h5
-rw-r--r--arch/blackfin/include/asm/bitops.h198
-rw-r--r--arch/blackfin/include/asm/bugs.h17
-rw-r--r--arch/blackfin/include/asm/cputime.h5
-rw-r--r--arch/blackfin/include/asm/current.h24
-rw-r--r--arch/blackfin/include/asm/device.h6
-rw-r--r--arch/blackfin/include/asm/elf.h2
-rw-r--r--arch/blackfin/include/asm/emergency-restart.h5
-rw-r--r--arch/blackfin/include/asm/errno.h7
-rw-r--r--arch/blackfin/include/asm/fb.h13
-rw-r--r--arch/blackfin/include/asm/futex.h5
-rw-r--r--arch/blackfin/include/asm/hardirq.h42
-rw-r--r--arch/blackfin/include/asm/hw_irq.h7
-rw-r--r--arch/blackfin/include/asm/io.h1
-rw-r--r--arch/blackfin/include/asm/ioctls.h84
-rw-r--r--arch/blackfin/include/asm/ipcbuf.h31
-rw-r--r--arch/blackfin/include/asm/irq.h5
-rw-r--r--arch/blackfin/include/asm/kmap_types.h5
-rw-r--r--arch/blackfin/include/asm/local.h5
-rw-r--r--arch/blackfin/include/asm/mman.h44
-rw-r--r--arch/blackfin/include/asm/msgbuf.h32
-rw-r--r--arch/blackfin/include/asm/mutex.h2
-rw-r--r--arch/blackfin/include/asm/page.h85
-rw-r--r--arch/blackfin/include/asm/param.h23
-rw-r--r--arch/blackfin/include/asm/percpu.h5
-rw-r--r--arch/blackfin/include/asm/pgalloc.h9
-rw-r--r--arch/blackfin/include/asm/poll.h21
-rw-r--r--arch/blackfin/include/asm/posix_types.h56
-rw-r--r--arch/blackfin/include/asm/processor.h35
-rw-r--r--arch/blackfin/include/asm/resource.h5
-rw-r--r--arch/blackfin/include/asm/sembuf.h26
-rw-r--r--arch/blackfin/include/asm/serial.h6
-rw-r--r--arch/blackfin/include/asm/setup.h18
-rw-r--r--arch/blackfin/include/asm/shmbuf.h43
-rw-r--r--arch/blackfin/include/asm/shmparam.h7
-rw-r--r--arch/blackfin/include/asm/signal.h159
-rw-r--r--arch/blackfin/include/asm/socket.h60
-rw-r--r--arch/blackfin/include/asm/sockios.h14
-rw-r--r--arch/blackfin/include/asm/spinlock.h6
-rw-r--r--arch/blackfin/include/asm/statfs.h5
-rw-r--r--arch/blackfin/include/asm/swab.h6
-rw-r--r--arch/blackfin/include/asm/termbits.h199
-rw-r--r--arch/blackfin/include/asm/termios.h95
-rw-r--r--arch/blackfin/include/asm/tlbflush.h57
-rw-r--r--arch/blackfin/include/asm/topology.h5
-rw-r--r--arch/blackfin/include/asm/types.h37
-rw-r--r--arch/blackfin/include/asm/ucontext.h18
-rw-r--r--arch/blackfin/include/asm/unaligned.h12
-rw-r--r--arch/blackfin/include/asm/user.h90
-rw-r--r--arch/blackfin/kernel/bfin_ksyms.c1
-rw-r--r--arch/blackfin/kernel/process.c23
-rw-r--r--arch/blackfin/mach-common/Makefile3
-rw-r--r--arch/blackfin/mach-common/ints-priority.c4
-rw-r--r--arch/blackfin/mach-common/irqpanic.c11
-rw-r--r--arch/h8300/kernel/asm-offsets.c1
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/ia64/include/asm/dma-mapping.h110
-rw-r--r--arch/m32r/kernel/process.c5
-rw-r--r--arch/m32r/kernel/ptrace.c4
-rw-r--r--arch/m68k/kernel/traps.c1
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c1
-rw-r--r--arch/m68knommu/kernel/traps.c1
-rw-r--r--arch/mn10300/include/asm/elf.h2
-rw-r--r--arch/mn10300/kernel/module.c39
-rw-r--r--arch/mn10300/kernel/process.c3
-rw-r--r--arch/parisc/hpux/fs.c5
-rw-r--r--arch/parisc/kernel/process.c5
-rw-r--r--arch/parisc/kernel/sys_parisc32.c5
-rw-r--r--arch/powerpc/Kconfig.debug17
-rw-r--r--arch/powerpc/boot/cuboot-85xx.c2
-rw-r--r--arch/powerpc/boot/dts/asp834x-redboot.dts2
-rw-r--r--arch/powerpc/boot/dts/gef_sbc610.dts10
-rw-r--r--arch/powerpc/boot/dts/kmeter1.dts520
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts19
-rw-r--r--arch/powerpc/boot/dts/mpc8315erdb.dts15
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8378_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8379_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8569mds.dts87
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts32
-rw-r--r--arch/powerpc/boot/dts/pcm030.dts26
-rw-r--r--arch/powerpc/boot/dts/sbc8349.dts2
-rw-r--r--arch/powerpc/boot/dts/xcalibur1501.dts696
-rw-r--r--arch/powerpc/boot/dts/xpedite5200.dts466
-rw-r--r--arch/powerpc/boot/dts/xpedite5200_xmon.dts506
-rw-r--r--arch/powerpc/boot/dts/xpedite5301.dts640
-rw-r--r--arch/powerpc/boot/dts/xpedite5330.dts707
-rw-r--r--arch/powerpc/boot/dts/xpedite5370.dts638
-rwxr-xr-xarch/powerpc/boot/wrapper4
-rw-r--r--arch/powerpc/configs/83xx/kmeter1_defconfig908
-rw-r--r--arch/powerpc/configs/85xx/xes_mpc85xx_defconfig1821
-rw-r--r--arch/powerpc/include/asm/delay.h36
-rw-r--r--arch/powerpc/include/asm/fsl_lbc.h4
-rw-r--r--arch/powerpc/include/asm/mpc52xx.h2
-rw-r--r--arch/powerpc/include/asm/mpc5xxx.h (renamed from arch/powerpc/include/asm/mpc512x.h)10
-rw-r--r--arch/powerpc/include/asm/reg.h3
-rw-r--r--arch/powerpc/include/asm/reg_booke.h2
-rw-r--r--arch/powerpc/kernel/Makefile2
-rw-r--r--arch/powerpc/kernel/cpu_setup_6xx.S3
-rw-r--r--arch/powerpc/kernel/cpu_setup_fsl_booke.S49
-rw-r--r--arch/powerpc/kernel/prom_init.c40
-rw-r--r--arch/powerpc/kvm/Makefile2
-rw-r--r--arch/powerpc/lib/Makefile2
-rw-r--r--arch/powerpc/mm/Makefile2
-rw-r--r--arch/powerpc/oprofile/Makefile2
-rw-r--r--arch/powerpc/platforms/44x/warp.c8
-rw-r--r--arch/powerpc/platforms/512x/clock.c10
-rw-r--r--arch/powerpc/platforms/512x/mpc512x.h1
-rw-r--r--arch/powerpc/platforms/512x/mpc512x_shared.c23
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c32
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig7
-rw-r--r--arch/powerpc/platforms/83xx/Makefile1
-rw-r--r--arch/powerpc/platforms/83xx/kmeter1.c191
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h4
-rw-r--r--arch/powerpc/platforms/83xx/usb.c10
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig13
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/mpc8536_ds.c17
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c19
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c20
-rw-r--r--arch/powerpc/platforms/85xx/xes_mpc85xx.c282
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c4
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c15
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype9
-rw-r--r--arch/powerpc/platforms/Makefile2
-rw-r--r--arch/powerpc/platforms/maple/setup.c59
-rw-r--r--arch/powerpc/sysdev/Makefile5
-rw-r--r--arch/powerpc/sysdev/mpc5xxx_clocks.c33
-rw-r--r--arch/powerpc/xmon/Makefile2
-rw-r--r--arch/s390/kernel/compat_linux.c3
-rw-r--r--arch/s390/kernel/process.c3
-rw-r--r--arch/sh/Kconfig6
-rw-r--r--arch/sh/Kconfig.debug1
-rw-r--r--arch/sh/boards/Kconfig1
-rw-r--r--arch/sh/boards/board-ap325rxa.c52
-rw-r--r--arch/sh/boards/board-sh7785lcr.c14
-rw-r--r--arch/sh/boards/board-urquell.c7
-rw-r--r--arch/sh/boards/mach-highlander/setup.c64
-rw-r--r--arch/sh/boards/mach-migor/setup.c79
-rw-r--r--arch/sh/boards/mach-rsk/devices-rsk7203.c8
-rw-r--r--arch/sh/boards/mach-se/7780/irq.c1
-rw-r--r--arch/sh/boards/mach-x3proto/setup.c12
-rw-r--r--arch/sh/configs/ap325rxa_defconfig70
-rw-r--r--arch/sh/configs/cayman_defconfig165
-rw-r--r--arch/sh/configs/dreamcast_defconfig78
-rw-r--r--arch/sh/configs/edosk7705_defconfig62
-rw-r--r--arch/sh/configs/edosk7760_defconfig79
-rw-r--r--arch/sh/configs/espt_defconfig78
-rw-r--r--arch/sh/configs/hp6xx_defconfig70
-rw-r--r--arch/sh/configs/landisk_defconfig136
-rw-r--r--arch/sh/configs/lboxre2_defconfig83
-rw-r--r--arch/sh/configs/magicpanelr2_defconfig75
-rw-r--r--arch/sh/configs/microdev_defconfig76
-rw-r--r--arch/sh/configs/migor_defconfig78
-rw-r--r--arch/sh/configs/polaris_defconfig67
-rw-r--r--arch/sh/configs/r7780mp_defconfig183
-rw-r--r--arch/sh/configs/r7785rp_defconfig89
-rw-r--r--arch/sh/configs/rsk7201_defconfig77
-rw-r--r--arch/sh/configs/rsk7203_defconfig141
-rw-r--r--arch/sh/configs/rts7751r2d1_defconfig106
-rw-r--r--arch/sh/configs/rts7751r2dplus_defconfig107
-rw-r--r--arch/sh/configs/sdk7780_defconfig88
-rw-r--r--arch/sh/configs/se7206_defconfig93
-rw-r--r--arch/sh/configs/se7343_defconfig219
-rw-r--r--arch/sh/configs/se7619_defconfig70
-rw-r--r--arch/sh/configs/se7705_defconfig74
-rw-r--r--arch/sh/configs/se7712_defconfig78
-rw-r--r--arch/sh/configs/se7721_defconfig87
-rw-r--r--arch/sh/configs/se7722_defconfig80
-rw-r--r--arch/sh/configs/se7724_defconfig71
-rw-r--r--arch/sh/configs/se7750_defconfig80
-rw-r--r--arch/sh/configs/se7751_defconfig75
-rw-r--r--arch/sh/configs/se7780_defconfig90
-rw-r--r--arch/sh/configs/sh03_defconfig90
-rw-r--r--arch/sh/configs/sh7710voipgw_defconfig75
-rw-r--r--arch/sh/configs/sh7724_generic_defconfig72
-rw-r--r--arch/sh/configs/sh7763rdp_defconfig84
-rw-r--r--arch/sh/configs/sh7770_generic_defconfig66
-rw-r--r--arch/sh/configs/sh7785lcr_32bit_defconfig85
-rw-r--r--arch/sh/configs/sh7785lcr_defconfig85
-rw-r--r--arch/sh/configs/shmin_defconfig74
-rw-r--r--arch/sh/configs/shx3_defconfig125
-rw-r--r--arch/sh/configs/snapgear_defconfig76
-rw-r--r--arch/sh/configs/systemh_defconfig66
-rw-r--r--arch/sh/configs/titan_defconfig91
-rw-r--r--arch/sh/configs/ul2_defconfig79
-rw-r--r--arch/sh/configs/urquell_defconfig584
-rw-r--r--arch/sh/drivers/pci/Makefile2
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c1
-rw-r--r--arch/sh/drivers/pci/ops-sh7786.c134
-rw-r--r--arch/sh/drivers/pci/pci.c14
-rw-r--r--arch/sh/drivers/pci/pcie-sh7786.c355
-rw-r--r--arch/sh/drivers/pci/pcie-sh7786.h589
-rw-r--r--arch/sh/include/asm/atomic-irq.h24
-rw-r--r--arch/sh/include/asm/atomic.h2
-rw-r--r--arch/sh/include/asm/checksum.h2
-rw-r--r--arch/sh/include/asm/checksum_64.h78
-rw-r--r--arch/sh/include/asm/current.h21
-rw-r--r--arch/sh/include/asm/dma.h10
-rw-r--r--arch/sh/include/asm/ipcbuf.h30
-rw-r--r--arch/sh/include/asm/irq.h2
-rw-r--r--arch/sh/include/asm/mman.h18
-rw-r--r--arch/sh/include/asm/mmu_context.h22
-rw-r--r--arch/sh/include/asm/module.h12
-rw-r--r--arch/sh/include/asm/msgbuf.h32
-rw-r--r--arch/sh/include/asm/param.h23
-rw-r--r--arch/sh/include/asm/parport.h17
-rw-r--r--arch/sh/include/asm/perf_counter.h7
-rw-r--r--arch/sh/include/asm/posix_types_32.h119
-rw-r--r--arch/sh/include/asm/posix_types_64.h127
-rw-r--r--arch/sh/include/asm/scatterlist.h24
-rw-r--r--arch/sh/include/asm/sembuf.h26
-rw-r--r--arch/sh/include/asm/serial.h20
-rw-r--r--arch/sh/include/asm/setup.h2
-rw-r--r--arch/sh/include/asm/shmbuf.h43
-rw-r--r--arch/sh/include/asm/signal.h147
-rw-r--r--arch/sh/include/asm/smp.h3
-rw-r--r--arch/sh/include/asm/socket.h61
-rw-r--r--arch/sh/include/asm/swab.h3
-rw-r--r--arch/sh/include/asm/termbits.h199
-rw-r--r--arch/sh/include/asm/termios.h91
-rw-r--r--arch/sh/include/asm/timex.h7
-rw-r--r--arch/sh/include/asm/topology.h3
-rw-r--r--arch/sh/include/asm/types.h16
-rw-r--r--arch/sh/include/asm/ucontext.h13
-rw-r--r--arch/sh/include/asm/unaligned.h14
-rw-r--r--arch/sh/include/asm/unistd_32.h3
-rw-r--r--arch/sh/include/asm/unistd_64.h3
-rw-r--r--arch/sh/include/mach-common/mach/highlander.h3
-rw-r--r--arch/sh/kernel/cpu/clock-cpg.c16
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c10
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c9
-rw-r--r--arch/sh/kernel/cpu/sh4a/smp-shx3.c5
-rw-r--r--arch/sh/kernel/ftrace.c60
-rw-r--r--arch/sh/kernel/process_32.c7
-rw-r--r--arch/sh/kernel/process_64.c12
-rw-r--r--arch/sh/kernel/sh_ksyms_64.c7
-rw-r--r--arch/sh/kernel/signal_32.c4
-rw-r--r--arch/sh/kernel/smp.c10
-rw-r--r--arch/sh/kernel/sys_sh.c2
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/syscalls_64.S1
-rw-r--r--arch/sh/kernel/time.c27
-rw-r--r--arch/sh/kernel/traps.c1
-rw-r--r--arch/sh/lib64/Makefile2
-rw-r--r--arch/sh/lib64/c-checksum.c214
-rw-r--r--arch/sh/mm/fault_32.c4
-rw-r--r--arch/sparc/mm/init_64.c6
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/x86/boot/Makefile1
-rw-r--r--arch/x86/boot/compressed/Makefile1
-rw-r--r--arch/x86/include/asm/dma-mapping.h173
-rw-r--r--arch/x86/kernel/Makefile2
-rw-r--r--arch/x86/kernel/acpi/realmode/Makefile1
-rw-r--r--arch/x86/vdso/Makefile1
-rw-r--r--arch/xtensa/kernel/process.c5
-rw-r--r--drivers/Kconfig2
-rw-r--r--drivers/Makefile1
-rw-r--r--drivers/ata/pata_mpc52xx.c2
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/char/dtlk.c6
-rw-r--r--drivers/char/hvc_iseries.c2
-rw-r--r--drivers/char/hvc_vio.c2
-rw-r--r--drivers/char/hvcs.c2
-rw-r--r--drivers/char/isicom.c2
-rw-r--r--drivers/char/istallion.c2
-rw-r--r--drivers/char/mem.c115
-rw-r--r--drivers/char/moxa.c7
-rw-r--r--drivers/char/ppdev.c29
-rw-r--r--drivers/char/sysrq.c15
-rw-r--r--drivers/clocksource/sh_cmt.c4
-rw-r--r--drivers/clocksource/sh_mtu2.c1
-rw-r--r--drivers/clocksource/sh_tmu.c4
-rw-r--r--drivers/edac/Kconfig11
-rw-r--r--drivers/edac/Makefile1
-rw-r--r--drivers/edac/amd8111_edac.c3
-rw-r--r--drivers/edac/cell_edac.c2
-rw-r--r--drivers/edac/cpc925_edac.c1017
-rw-r--r--drivers/edac/edac_core.h1
-rw-r--r--drivers/edac/edac_device.c14
-rw-r--r--drivers/gpio/Kconfig6
-rw-r--r--drivers/gpio/Makefile1
-rw-r--r--drivers/gpio/max7301.c2
-rw-r--r--drivers/gpio/pca953x.c80
-rw-r--r--drivers/gpio/pl061.c341
-rw-r--r--drivers/i2c/busses/i2c-mpc.c2
-rw-r--r--drivers/isdn/i4l/isdn_net.c2
-rw-r--r--drivers/md/faulty.c21
-rw-r--r--drivers/md/linear.c218
-rw-r--r--drivers/md/linear.h12
-rw-r--r--drivers/md/md.c196
-rw-r--r--drivers/md/md.h14
-rw-r--r--drivers/md/multipath.c23
-rw-r--r--drivers/md/multipath.h6
-rw-r--r--drivers/md/raid0.c403
-rw-r--r--drivers/md/raid0.h10
-rw-r--r--drivers/md/raid1.c46
-rw-r--r--drivers/md/raid1.h6
-rw-r--r--drivers/md/raid10.c62
-rw-r--r--drivers/md/raid10.h6
-rw-r--r--drivers/md/raid5.c218
-rw-r--r--drivers/md/raid5.h8
-rw-r--r--drivers/media/video/ov772x.c6
-rw-r--r--drivers/media/video/tw9910.c6
-rw-r--r--drivers/message/fusion/mptbase.c8
-rw-r--r--drivers/misc/sgi-gru/Makefile2
-rw-r--r--drivers/misc/sgi-gru/gru_instructions.h68
-rw-r--r--drivers/misc/sgi-gru/grufault.c118
-rw-r--r--drivers/misc/sgi-gru/grufile.c69
-rw-r--r--drivers/misc/sgi-gru/gruhandles.c17
-rw-r--r--drivers/misc/sgi-gru/gruhandles.h30
-rw-r--r--drivers/misc/sgi-gru/grukdump.c232
-rw-r--r--drivers/misc/sgi-gru/grukservices.c562
-rw-r--r--drivers/misc/sgi-gru/grukservices.h51
-rw-r--r--drivers/misc/sgi-gru/grulib.h69
-rw-r--r--drivers/misc/sgi-gru/grumain.c187
-rw-r--r--drivers/misc/sgi-gru/gruprocfs.c17
-rw-r--r--drivers/misc/sgi-gru/grutables.h60
-rw-r--r--drivers/net/bnx2.c4
-rw-r--r--drivers/net/davinci_emac.c1
-rw-r--r--drivers/net/e100.c11
-rw-r--r--drivers/net/e1000/e1000_main.c4
-rw-r--r--drivers/net/fec_mpc52xx.c2
-rw-r--r--drivers/net/fec_mpc52xx_phy.c2
-rw-r--r--drivers/net/forcedeth.c46
-rw-r--r--drivers/net/hamradio/bpqether.c2
-rw-r--r--drivers/net/hp100.c35
-rw-r--r--drivers/net/igbvf/netdev.c13
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c6
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/netxen/netxen_nic.h11
-rw-r--r--drivers/net/netxen/netxen_nic_hdr.h1
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c6
-rw-r--r--drivers/net/netxen/netxen_nic_init.c11
-rw-r--r--drivers/net/netxen/netxen_nic_main.c32
-rw-r--r--drivers/net/niu.c4
-rw-r--r--drivers/net/phy/phy_device.c2
-rw-r--r--drivers/net/ps3_gelic_net.c22
-rw-r--r--drivers/net/ps3_gelic_wireless.c6
-rw-r--r--drivers/net/r8169.c19
-rw-r--r--drivers/net/sis190.c2
-rw-r--r--drivers/net/sky2.c161
-rw-r--r--drivers/net/sky2.h1
-rw-r--r--drivers/net/sonic.c2
-rw-r--r--drivers/net/ucc_geth.c113
-rw-r--r--drivers/net/ucc_geth.h2
-rw-r--r--drivers/net/via-velocity.c4
-rw-r--r--drivers/net/virtio_net.c10
-rw-r--r--drivers/net/vxge/vxge-config.c12
-rw-r--r--drivers/net/vxge/vxge-main.c13
-rw-r--r--drivers/net/vxge/vxge-version.h4
-rw-r--r--drivers/net/wan/lapbether.c16
-rw-r--r--drivers/net/wireless/ath/ath5k/pcu.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/Kconfig1
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h10
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c29
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h3
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c130
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c141
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c4
-rw-r--r--drivers/net/wireless/libertas/if_spi.c11
-rw-r--r--drivers/platform/x86/dell-laptop.c2
-rw-r--r--drivers/platform/x86/sony-laptop.c5
-rw-r--r--drivers/pps/Kconfig33
-rw-r--r--drivers/pps/Makefile8
-rw-r--r--drivers/pps/kapi.c329
-rw-r--r--drivers/pps/pps.c312
-rw-r--r--drivers/pps/sysfs.c98
-rw-r--r--drivers/rapidio/rio-scan.c43
-rw-r--r--drivers/rapidio/rio-sysfs.c6
-rw-r--r--drivers/rtc/Kconfig9
-rw-r--r--drivers/rtc/Makefile1
-rw-r--r--drivers/rtc/interface.c12
-rw-r--r--drivers/rtc/rtc-dev.c6
-rw-r--r--drivers/rtc/rtc-ds1305.c3
-rw-r--r--drivers/rtc/rtc-ds1307.c46
-rw-r--r--drivers/rtc/rtc-ds1374.c5
-rw-r--r--drivers/rtc/rtc-ds1553.c3
-rw-r--r--drivers/rtc/rtc-ds1742.c31
-rw-r--r--drivers/rtc/rtc-rx8025.c688
-rw-r--r--drivers/rtc/rtc-test.c2
-rw-r--r--drivers/rtc/rtc-tx4939.c4
-rw-r--r--drivers/s390/net/qeth_l2_main.c2
-rw-r--r--drivers/scsi/ps3rom.c10
-rw-r--r--drivers/serial/mpc52xx_uart.c5
-rw-r--r--drivers/serial/of_serial.c2
-rw-r--r--drivers/serial/sh-sci.c18
-rw-r--r--drivers/serial/ucc_uart.c19
-rw-r--r--drivers/sh/intc.c13
-rw-r--r--drivers/spi/Kconfig16
-rw-r--r--drivers/spi/Makefile2
-rw-r--r--drivers/spi/atmel_spi.c14
-rw-r--r--drivers/spi/au1550_spi.c14
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c34
-rw-r--r--drivers/spi/omap2_mcspi.c16
-rw-r--r--drivers/spi/omap_uwire.c14
-rw-r--r--drivers/spi/orion_spi.c12
-rw-r--r--drivers/spi/pxa2xx_spi.c23
-rw-r--r--drivers/spi/spi.c70
-rw-r--r--drivers/spi/spi_bfin5xx.c15
-rw-r--r--drivers/spi/spi_bitbang.c16
-rw-r--r--drivers/spi/spi_imx.c17
-rw-r--r--drivers/spi/spi_mpc8xxx.c (renamed from drivers/spi/spi_mpc83xx.c)529
-rw-r--r--drivers/spi/spi_s3c24xx.c19
-rw-r--r--drivers/spi/spi_txx9.c11
-rw-r--r--drivers/spi/xilinx_spi.c18
-rw-r--r--drivers/usb/host/ehci-ps3.c4
-rw-r--r--drivers/usb/host/ohci-ps3.c4
-rw-r--r--drivers/video/Kconfig6
-rw-r--r--drivers/video/xilinxfb.c59
-rw-r--r--drivers/w1/masters/w1-gpio.c35
-rw-r--r--drivers/watchdog/alim7101_wdt.c15
-rw-r--r--drivers/watchdog/ar7_wdt.c3
-rw-r--r--drivers/watchdog/at91rm9200_wdt.c3
-rw-r--r--drivers/watchdog/at91sam9_wdt.c3
-rw-r--r--drivers/watchdog/bfin_wdt.c14
-rw-r--r--drivers/watchdog/cpwd.c6
-rw-r--r--drivers/watchdog/davinci_wdt.c6
-rw-r--r--drivers/watchdog/hpwdt.c59
-rw-r--r--drivers/watchdog/iTCO_vendor_support.c88
-rw-r--r--drivers/watchdog/iTCO_wdt.c36
-rw-r--r--drivers/watchdog/indydog.c4
-rw-r--r--drivers/watchdog/it8712f_wdt.c3
-rw-r--r--drivers/watchdog/ks8695_wdt.c4
-rw-r--r--drivers/watchdog/machzwd.c9
-rw-r--r--drivers/watchdog/mpc5200_wdt.c2
-rw-r--r--drivers/watchdog/mpcore_wdt.c7
-rw-r--r--drivers/watchdog/mtx-1_wdt.c6
-rw-r--r--drivers/watchdog/pnx4008_wdt.c6
-rw-r--r--drivers/watchdog/rdc321x_wdt.c4
-rw-r--r--drivers/watchdog/rm9k_wdt.c6
-rw-r--r--drivers/watchdog/s3c2410_wdt.c32
-rw-r--r--drivers/watchdog/sb_wdog.c9
-rw-r--r--drivers/watchdog/sbc60xxwdt.c5
-rw-r--r--drivers/watchdog/sbc8360.c4
-rw-r--r--drivers/watchdog/sbc_epx_c3.c12
-rw-r--r--drivers/watchdog/scx200_wdt.c7
-rw-r--r--drivers/watchdog/shwdt.c4
-rw-r--r--drivers/watchdog/softdog.c7
-rw-r--r--drivers/watchdog/w83697hf_wdt.c3
-rw-r--r--drivers/watchdog/wdrtas.c7
-rw-r--r--fs/binfmt_elf.c8
-rw-r--r--fs/binfmt_elf_fdpic.c8
-rw-r--r--fs/eventpoll.c21
-rw-r--r--fs/ext2/dir.c5
-rw-r--r--fs/ext2/ext2.h2
-rw-r--r--fs/ext2/namei.c5
-rw-r--r--fs/ext3/inode.c22
-rw-r--r--fs/ext4/Makefile2
-rw-r--r--fs/ext4/ext4.h39
-rw-r--r--fs/ext4/ext4_extents.h4
-rw-r--r--fs/ext4/extents.c4
-rw-r--r--fs/ext4/file.c36
-rw-r--r--fs/ext4/fsync.c8
-rw-r--r--fs/ext4/ialloc.c48
-rw-r--r--fs/ext4/inode.c281
-rw-r--r--fs/ext4/ioctl.c36
-rw-r--r--fs/ext4/mballoc.c85
-rw-r--r--fs/ext4/mballoc.h1
-rw-r--r--fs/ext4/migrate.c8
-rw-r--r--fs/ext4/move_extent.c1320
-rw-r--r--fs/ext4/namei.c10
-rw-r--r--fs/ext4/super.c20
-rw-r--r--fs/isofs/dir.c5
-rw-r--r--fs/isofs/inode.c118
-rw-r--r--fs/isofs/isofs.h27
-rw-r--r--fs/isofs/namei.c4
-rw-r--r--fs/jbd/transaction.c48
-rw-r--r--fs/jbd2/checkpoint.c5
-rw-r--r--fs/jbd2/commit.c13
-rw-r--r--fs/jbd2/journal.c69
-rw-r--r--fs/jbd2/transaction.c49
-rw-r--r--fs/proc/Makefile1
-rw-r--r--fs/proc/proc_devtree.c10
-rw-r--r--fs/proc/softirqs.c44
-rw-r--r--fs/proc/stat.c15
-rw-r--r--fs/proc/vmcore.c7
-rw-r--r--fs/reiserfs/do_balan.c5
-rw-r--r--fs/reiserfs/lbalance.c10
-rw-r--r--fs/seq_file.c20
-rw-r--r--fs/ufs/inode.c10
-rw-r--r--include/asm-generic/dma-mapping-common.h190
-rw-r--r--include/asm-generic/sections.h3
-rw-r--r--include/asm-generic/vmlinux.lds.h9
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/amba/pl061.h15
-rw-r--r--include/linux/compiler-gcc3.h6
-rw-r--r--include/linux/dma-mapping.h43
-rw-r--r--include/linux/fsl_devices.h4
-rw-r--r--include/linux/gcd.h8
-rw-r--r--include/linux/gfp.h9
-rw-r--r--include/linux/i2c/pca953x.h1
-rw-r--r--include/linux/init.h3
-rw-r--r--include/linux/ipc_namespace.h5
-rw-r--r--include/linux/jbd2.h6
-rw-r--r--include/linux/kernel_stat.h12
-rw-r--r--include/linux/memcontrol.h7
-rw-r--r--include/linux/module.h6
-rw-r--r--include/linux/netdevice.h17
-rw-r--r--include/linux/pps.h122
-rw-r--r--include/linux/pps_kernel.h89
-rw-r--r--include/linux/ptrace.h1
-rw-r--r--include/linux/raid/md_p.h2
-rw-r--r--include/linux/reiserfs_fs.h47
-rw-r--r--include/linux/res_counter.h2
-rw-r--r--include/linux/sched.h7
-rw-r--r--include/linux/seq_file.h1
-rw-r--r--include/linux/skbuff.h2
-rw-r--r--include/linux/spi/spi.h28
-rw-r--r--include/linux/swap.h11
-rw-r--r--include/linux/tracehook.h2
-rw-r--r--include/linux/w1-gpio.h1
-rw-r--r--include/net/sock.h33
-rw-r--r--include/net/x25.h2
-rw-r--r--include/trace/events/ext4.h719
-rw-r--r--include/trace/events/jbd2.h168
-rw-r--r--init/Kconfig5
-rw-r--r--init/main.c16
-rw-r--r--ipc/namespace.c63
-rw-r--r--ipc/util.h5
-rw-r--r--kernel/Makefile1
-rw-r--r--kernel/cgroup.c14
-rw-r--r--kernel/exit.c293
-rw-r--r--kernel/fork.c1
-rw-r--r--kernel/gcov/Kconfig48
-rw-r--r--kernel/gcov/Makefile3
-rw-r--r--kernel/gcov/base.c148
-rw-r--r--kernel/gcov/fs.c673
-rw-r--r--kernel/gcov/gcc_3_4.c447
-rw-r--r--kernel/gcov/gcov.h128
-rw-r--r--kernel/kthread.c80
-rw-r--r--kernel/module.c16
-rw-r--r--kernel/nsproxy.c19
-rw-r--r--kernel/pid.c17
-rw-r--r--kernel/pid_namespace.c24
-rw-r--r--kernel/ptrace.c161
-rw-r--r--kernel/res_counter.c12
-rw-r--r--kernel/sched.c14
-rw-r--r--kernel/signal.c12
-rw-r--r--kernel/softirq.c1
-rw-r--r--kernel/sysctl.c4
-rw-r--r--kernel/utsname.c13
-rw-r--r--lib/Makefile2
-rw-r--r--lib/gcd.c18
-rw-r--r--mm/bootmem.c14
-rw-r--r--mm/memcontrol.c126
-rw-r--r--mm/page_alloc.c3
-rw-r--r--mm/page_cgroup.c24
-rw-r--r--mm/rmap.c5
-rw-r--r--mm/slab.c15
-rw-r--r--mm/slub.c12
-rw-r--r--mm/swapfile.c16
-rw-r--r--mm/vmscan.c4
-rw-r--r--net/appletalk/atalk_proc.c4
-rw-r--r--net/appletalk/ddp.c9
-rw-r--r--net/atm/common.c12
-rw-r--r--net/atm/ioctl.c3
-rw-r--r--net/atm/proc.c4
-rw-r--r--net/atm/raw.c2
-rw-r--r--net/ax25/af_ax25.c14
-rw-r--r--net/bluetooth/af_bluetooth.c2
-rw-r--r--net/core/dev.c130
-rw-r--r--net/core/skbuff.c13
-rw-r--r--net/decnet/af_decnet.c2
-rw-r--r--net/econet/af_econet.c6
-rw-r--r--net/ieee802154/dgram.c3
-rw-r--r--net/ipv4/fib_trie.c24
-rw-r--r--net/ipv4/inet_diag.c4
-rw-r--r--net/ipv4/raw.c7
-rw-r--r--net/ipv4/udp.c7
-rw-r--r--net/ipv6/raw.c7
-rw-r--r--net/ipv6/udp.c4
-rw-r--r--net/ipx/af_ipx.c2
-rw-r--r--net/ipx/ipx_proc.c4
-rw-r--r--net/irda/af_irda.c3
-rw-r--r--net/key/af_key.c4
-rw-r--r--net/llc/llc_proc.c4
-rw-r--r--net/mac80211/debugfs.c25
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/mlme.c38
-rw-r--r--net/mac80211/util.c25
-rw-r--r--net/mac80211/wext.c31
-rw-r--r--net/netlink/af_netlink.c4
-rw-r--r--net/netrom/af_netrom.c9
-rw-r--r--net/packet/af_packet.c3
-rw-r--r--net/rose/af_rose.c10
-rw-r--r--net/sched/act_police.c4
-rw-r--r--net/sched/em_meta.c4
-rw-r--r--net/sctp/socket.c4
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/x25/af_x25.c30
-rw-r--r--net/x25/x25_proc.c4
-rw-r--r--net/x25/x25_timer.c2
-rw-r--r--scripts/Makefile.lib11
-rw-r--r--security/device_cgroup.c10
-rw-r--r--sound/pci/lx6464es/lx6464es.c2
627 files changed, 24693 insertions, 9543 deletions
diff --git a/Documentation/ABI/testing/sysfs-fs-ext4 b/Documentation/ABI/testing/sysfs-fs-ext4
index 4e79074de282..5fb709997d96 100644
--- a/Documentation/ABI/testing/sysfs-fs-ext4
+++ b/Documentation/ABI/testing/sysfs-fs-ext4
@@ -79,3 +79,13 @@ Description:
79 This file is read-only and shows the number of 79 This file is read-only and shows the number of
80 kilobytes of data that have been written to this 80 kilobytes of data that have been written to this
81 filesystem since it was mounted. 81 filesystem since it was mounted.
82
83What: /sys/fs/ext4/<disk>/inode_goal
84Date: June 2008
85Contact: "Theodore Ts'o" <tytso@mit.edu>
86Description:
87 Tuning parameter which (if non-zero) controls the goal
88 inode used by the inode allocator in p0reference to
89 all other allocation hueristics. This is intended for
90 debugging use only, and should be 0 on production
91 systems.
diff --git a/Documentation/ABI/testing/sysfs-pps b/Documentation/ABI/testing/sysfs-pps
new file mode 100644
index 000000000000..25028c7bc37d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-pps
@@ -0,0 +1,73 @@
1What: /sys/class/pps/
2Date: February 2008
3Contact: Rodolfo Giometti <giometti@linux.it>
4Description:
5 The /sys/class/pps/ directory will contain files and
6 directories that will provide a unified interface to
7 the PPS sources.
8
9What: /sys/class/pps/ppsX/
10Date: February 2008
11Contact: Rodolfo Giometti <giometti@linux.it>
12Description:
13 The /sys/class/pps/ppsX/ directory is related to X-th
14 PPS source into the system. Each directory will
15 contain files to manage and control its PPS source.
16
17What: /sys/class/pps/ppsX/assert
18Date: February 2008
19Contact: Rodolfo Giometti <giometti@linux.it>
20Description:
21 The /sys/class/pps/ppsX/assert file reports the assert events
22 and the assert sequence number of the X-th source in the form:
23
24 <secs>.<nsec>#<sequence>
25
26 If the source has no assert events the content of this file
27 is empty.
28
29What: /sys/class/pps/ppsX/clear
30Date: February 2008
31Contact: Rodolfo Giometti <giometti@linux.it>
32Description:
33 The /sys/class/pps/ppsX/clear file reports the clear events
34 and the clear sequence number of the X-th source in the form:
35
36 <secs>.<nsec>#<sequence>
37
38 If the source has no clear events the content of this file
39 is empty.
40
41What: /sys/class/pps/ppsX/mode
42Date: February 2008
43Contact: Rodolfo Giometti <giometti@linux.it>
44Description:
45 The /sys/class/pps/ppsX/mode file reports the functioning
46 mode of the X-th source in hexadecimal encoding.
47
48 Please, refer to linux/include/linux/pps.h for further
49 info.
50
51What: /sys/class/pps/ppsX/echo
52Date: February 2008
53Contact: Rodolfo Giometti <giometti@linux.it>
54Description:
55 The /sys/class/pps/ppsX/echo file reports if the X-th does
56 or does not support an "echo" function.
57
58What: /sys/class/pps/ppsX/name
59Date: February 2008
60Contact: Rodolfo Giometti <giometti@linux.it>
61Description:
62 The /sys/class/pps/ppsX/name file reports the name of the
63 X-th source.
64
65What: /sys/class/pps/ppsX/path
66Date: February 2008
67Contact: Rodolfo Giometti <giometti@linux.it>
68Description:
69 The /sys/class/pps/ppsX/path file reports the path name of
70 the device connected with the X-th source.
71
72 If the source is not connected with any device the content
73 of this file is empty.
diff --git a/Documentation/Changes b/Documentation/Changes
index 664392481c84..6d0f1efc5bf6 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -72,6 +72,13 @@ assembling the 16-bit boot code, removing the need for as86 to compile
72your kernel. This change does, however, mean that you need a recent 72your kernel. This change does, however, mean that you need a recent
73release of binutils. 73release of binutils.
74 74
75Perl
76----
77
78You will need perl 5 and the following modules: Getopt::Long, Getopt::Std,
79File::Basename, and File::Find to build the kernel.
80
81
75System utilities 82System utilities
76================ 83================
77 84
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 1a608877b14e..23d1262c0775 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -152,14 +152,19 @@ When swap is accounted, following files are added.
152 152
153usage of mem+swap is limited by memsw.limit_in_bytes. 153usage of mem+swap is limited by memsw.limit_in_bytes.
154 154
155Note: why 'mem+swap' rather than swap. 155* why 'mem+swap' rather than swap.
156The global LRU(kswapd) can swap out arbitrary pages. Swap-out means 156The global LRU(kswapd) can swap out arbitrary pages. Swap-out means
157to move account from memory to swap...there is no change in usage of 157to move account from memory to swap...there is no change in usage of
158mem+swap. 158mem+swap. In other words, when we want to limit the usage of swap without
159affecting global LRU, mem+swap limit is better than just limiting swap from
160OS point of view.
159 161
160In other words, when we want to limit the usage of swap without affecting 162* What happens when a cgroup hits memory.memsw.limit_in_bytes
161global LRU, mem+swap limit is better than just limiting swap from OS point 163When a cgroup his memory.memsw.limit_in_bytes, it's useless to do swap-out
162of view. 164in this cgroup. Then, swap-out will not be done by cgroup routine and file
165caches are dropped. But as mentioned above, global LRU can do swapout memory
166from it for sanity of the system's memory management state. You can't forbid
167it by cgroup.
163 168
1642.5 Reclaim 1692.5 Reclaim
165 170
@@ -204,6 +209,7 @@ We can alter the memory limit:
204 209
205NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo, 210NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
206mega or gigabytes. 211mega or gigabytes.
212NOTE: We can write "-1" to reset the *.limit_in_bytes(unlimited).
207 213
208# cat /cgroups/0/memory.limit_in_bytes 214# cat /cgroups/0/memory.limit_in_bytes
2094194304 2154194304
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index 6977c178729a..f688eba87704 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -41,6 +41,12 @@ void cn_test_callback(void *data)
41 msg->seq, msg->ack, msg->len, (char *)msg->data); 41 msg->seq, msg->ack, msg->len, (char *)msg->data);
42} 42}
43 43
44/*
45 * Do not remove this function even if no one is using it as
46 * this is an example of how to get notifications about new
47 * connector user registration
48 */
49#if 0
44static int cn_test_want_notify(void) 50static int cn_test_want_notify(void)
45{ 51{
46 struct cn_ctl_msg *ctl; 52 struct cn_ctl_msg *ctl;
@@ -117,6 +123,7 @@ nlmsg_failure:
117 kfree_skb(skb); 123 kfree_skb(skb);
118 return -EINVAL; 124 return -EINVAL;
119} 125}
126#endif
120 127
121static u32 cn_test_timer_counter; 128static u32 cn_test_timer_counter;
122static void cn_test_timer_func(unsigned long __data) 129static void cn_test_timer_func(unsigned long __data)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 7129846a2785..8d07ed31207e 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -6,6 +6,20 @@ be removed from this file.
6 6
7--------------------------- 7---------------------------
8 8
9What: IRQF_SAMPLE_RANDOM
10Check: IRQF_SAMPLE_RANDOM
11When: July 2009
12
13Why: Many of IRQF_SAMPLE_RANDOM users are technically bogus as entropy
14 sources in the kernel's current entropy model. To resolve this, every
15 input point to the kernel's entropy pool needs to better document the
16 type of entropy source it actually is. This will be replaced with
17 additional add_*_randomness functions in drivers/char/random.c
18
19Who: Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com>
20
21---------------------------
22
9What: The ieee80211_regdom module parameter 23What: The ieee80211_regdom module parameter
10When: March 2010 / desktop catchup 24When: March 2010 / desktop catchup
11 25
diff --git a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt
index e055acb6b2d4..67639f905f10 100644
--- a/Documentation/filesystems/ext2.txt
+++ b/Documentation/filesystems/ext2.txt
@@ -322,7 +322,7 @@ an upper limit on the block size imposed by the page size of the kernel,
322so 8kB blocks are only allowed on Alpha systems (and other architectures 322so 8kB blocks are only allowed on Alpha systems (and other architectures
323which support larger pages). 323which support larger pages).
324 324
325There is an upper limit of 32768 subdirectories in a single directory. 325There is an upper limit of 32000 subdirectories in a single directory.
326 326
327There is a "soft" upper limit of about 10-15k files in a single directory 327There is a "soft" upper limit of about 10-15k files in a single directory
328with the current linear linked-list directory implementation. This limit 328with the current linear linked-list directory implementation. This limit
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 608fdba97b72..7be02ac5fa36 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -235,6 +235,10 @@ minixdf Make 'df' act like Minix.
235 235
236debug Extra debugging information is sent to syslog. 236debug Extra debugging information is sent to syslog.
237 237
238abort Simulate the effects of calling ext4_abort() for
239 debugging purposes. This is normally used while
240 remounting a filesystem which is already mounted.
241
238errors=remount-ro Remount the filesystem read-only on an error. 242errors=remount-ro Remount the filesystem read-only on an error.
239errors=continue Keep going on a filesystem error. 243errors=continue Keep going on a filesystem error.
240errors=panic Panic and halt the machine if an error occurs. 244errors=panic Panic and halt the machine if an error occurs.
diff --git a/Documentation/filesystems/isofs.txt b/Documentation/filesystems/isofs.txt
index 6973b980ca2a..3c367c3b3608 100644
--- a/Documentation/filesystems/isofs.txt
+++ b/Documentation/filesystems/isofs.txt
@@ -23,8 +23,13 @@ Mount options unique to the isofs filesystem.
23 map=off Do not map non-Rock Ridge filenames to lower case 23 map=off Do not map non-Rock Ridge filenames to lower case
24 map=normal Map non-Rock Ridge filenames to lower case 24 map=normal Map non-Rock Ridge filenames to lower case
25 map=acorn As map=normal but also apply Acorn extensions if present 25 map=acorn As map=normal but also apply Acorn extensions if present
26 mode=xxx Sets the permissions on files to xxx 26 mode=xxx Sets the permissions on files to xxx unless Rock Ridge
27 dmode=xxx Sets the permissions on directories to xxx 27 extensions set the permissions otherwise
28 dmode=xxx Sets the permissions on directories to xxx unless Rock Ridge
29 extensions set the permissions otherwise
30 overriderockperm Set permissions on files and directories according to
31 'mode' and 'dmode' even though Rock Ridge extensions are
32 present.
28 nojoliet Ignore Joliet extensions if they are present. 33 nojoliet Ignore Joliet extensions if they are present.
29 norock Ignore Rock Ridge extensions if they are present. 34 norock Ignore Rock Ridge extensions if they are present.
30 hide Completely strip hidden files from the file system. 35 hide Completely strip hidden files from the file system.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index ebff3c10a07f..fad18f9456e4 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -5,11 +5,12 @@
5 Bodo Bauer <bb@ricochet.net> 5 Bodo Bauer <bb@ricochet.net>
6 6
72.4.x update Jorge Nerin <comandante@zaralinux.com> November 14 2000 72.4.x update Jorge Nerin <comandante@zaralinux.com> November 14 2000
8move /proc/sys Shen Feng <shen@cn.fujitsu.com> April 1 2009 8move /proc/sys Shen Feng <shen@cn.fujitsu.com> April 1 2009
9------------------------------------------------------------------------------ 9------------------------------------------------------------------------------
10Version 1.3 Kernel version 2.2.12 10Version 1.3 Kernel version 2.2.12
11 Kernel version 2.4.0-test11-pre4 11 Kernel version 2.4.0-test11-pre4
12------------------------------------------------------------------------------ 12------------------------------------------------------------------------------
13fixes/update part 1.1 Stefani Seibold <stefani@seibold.net> June 9 2009
13 14
14Table of Contents 15Table of Contents
15----------------- 16-----------------
@@ -116,7 +117,7 @@ The link self points to the process reading the file system. Each process
116subdirectory has the entries listed in Table 1-1. 117subdirectory has the entries listed in Table 1-1.
117 118
118 119
119Table 1-1: Process specific entries in /proc 120Table 1-1: Process specific entries in /proc
120.............................................................................. 121..............................................................................
121 File Content 122 File Content
122 clear_refs Clears page referenced bits shown in smaps output 123 clear_refs Clears page referenced bits shown in smaps output
@@ -134,46 +135,103 @@ Table 1-1: Process specific entries in /proc
134 status Process status in human readable form 135 status Process status in human readable form
135 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan 136 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan
136 stack Report full stack trace, enable via CONFIG_STACKTRACE 137 stack Report full stack trace, enable via CONFIG_STACKTRACE
137 smaps Extension based on maps, the rss size for each mapped file 138 smaps a extension based on maps, showing the memory consumption of
139 each mapping
138.............................................................................. 140..............................................................................
139 141
140For example, to get the status information of a process, all you have to do is 142For example, to get the status information of a process, all you have to do is
141read the file /proc/PID/status: 143read the file /proc/PID/status:
142 144
143 >cat /proc/self/status 145 >cat /proc/self/status
144 Name: cat 146 Name: cat
145 State: R (running) 147 State: R (running)
146 Pid: 5452 148 Tgid: 5452
147 PPid: 743 149 Pid: 5452
150 PPid: 743
148 TracerPid: 0 (2.4) 151 TracerPid: 0 (2.4)
149 Uid: 501 501 501 501 152 Uid: 501 501 501 501
150 Gid: 100 100 100 100 153 Gid: 100 100 100 100
151 Groups: 100 14 16 154 FDSize: 256
152 VmSize: 1112 kB 155 Groups: 100 14 16
153 VmLck: 0 kB 156 VmPeak: 5004 kB
154 VmRSS: 348 kB 157 VmSize: 5004 kB
155 VmData: 24 kB 158 VmLck: 0 kB
156 VmStk: 12 kB 159 VmHWM: 476 kB
157 VmExe: 8 kB 160 VmRSS: 476 kB
158 VmLib: 1044 kB 161 VmData: 156 kB
159 SigPnd: 0000000000000000 162 VmStk: 88 kB
160 SigBlk: 0000000000000000 163 VmExe: 68 kB
161 SigIgn: 0000000000000000 164 VmLib: 1412 kB
162 SigCgt: 0000000000000000 165 VmPTE: 20 kb
163 CapInh: 00000000fffffeff 166 Threads: 1
164 CapPrm: 0000000000000000 167 SigQ: 0/28578
165 CapEff: 0000000000000000 168 SigPnd: 0000000000000000
166 169 ShdPnd: 0000000000000000
170 SigBlk: 0000000000000000
171 SigIgn: 0000000000000000
172 SigCgt: 0000000000000000
173 CapInh: 00000000fffffeff
174 CapPrm: 0000000000000000
175 CapEff: 0000000000000000
176 CapBnd: ffffffffffffffff
177 voluntary_ctxt_switches: 0
178 nonvoluntary_ctxt_switches: 1
167 179
168This shows you nearly the same information you would get if you viewed it with 180This shows you nearly the same information you would get if you viewed it with
169the ps command. In fact, ps uses the proc file system to obtain its 181the ps command. In fact, ps uses the proc file system to obtain its
170information. The statm file contains more detailed information about the 182information. But you get a more detailed view of the process by reading the
171process memory usage. Its seven fields are explained in Table 1-2. The stat 183file /proc/PID/status. It fields are described in table 1-2.
172file contains details information about the process itself. Its fields are 184
173explained in Table 1-3. 185The statm file contains more detailed information about the process
186memory usage. Its seven fields are explained in Table 1-3. The stat file
187contains details information about the process itself. Its fields are
188explained in Table 1-4.
174 189
190Table 1-2: Contents of the statm files (as of 2.6.30-rc7)
191..............................................................................
192 Field Content
193 Name filename of the executable
194 State state (R is running, S is sleeping, D is sleeping
195 in an uninterruptible wait, Z is zombie,
196 T is traced or stopped)
197 Tgid thread group ID
198 Pid process id
199 PPid process id of the parent process
200 TracerPid PID of process tracing this process (0 if not)
201 Uid Real, effective, saved set, and file system UIDs
202 Gid Real, effective, saved set, and file system GIDs
203 FDSize number of file descriptor slots currently allocated
204 Groups supplementary group list
205 VmPeak peak virtual memory size
206 VmSize total program size
207 VmLck locked memory size
208 VmHWM peak resident set size ("high water mark")
209 VmRSS size of memory portions
210 VmData size of data, stack, and text segments
211 VmStk size of data, stack, and text segments
212 VmExe size of text segment
213 VmLib size of shared library code
214 VmPTE size of page table entries
215 Threads number of threads
216 SigQ number of signals queued/max. number for queue
217 SigPnd bitmap of pending signals for the thread
218 ShdPnd bitmap of shared pending signals for the process
219 SigBlk bitmap of blocked signals
220 SigIgn bitmap of ignored signals
221 SigCgt bitmap of catched signals
222 CapInh bitmap of inheritable capabilities
223 CapPrm bitmap of permitted capabilities
224 CapEff bitmap of effective capabilities
225 CapBnd bitmap of capabilities bounding set
226 Cpus_allowed mask of CPUs on which this process may run
227 Cpus_allowed_list Same as previous, but in "list format"
228 Mems_allowed mask of memory nodes allowed to this process
229 Mems_allowed_list Same as previous, but in "list format"
230 voluntary_ctxt_switches number of voluntary context switches
231 nonvoluntary_ctxt_switches number of non voluntary context switches
232..............................................................................
175 233
176Table 1-2: Contents of the statm files (as of 2.6.8-rc3) 234Table 1-3: Contents of the statm files (as of 2.6.8-rc3)
177.............................................................................. 235..............................................................................
178 Field Content 236 Field Content
179 size total program size (pages) (same as VmSize in status) 237 size total program size (pages) (same as VmSize in status)
@@ -188,7 +246,7 @@ Table 1-2: Contents of the statm files (as of 2.6.8-rc3)
188.............................................................................. 246..............................................................................
189 247
190 248
191Table 1-3: Contents of the stat files (as of 2.6.22-rc3) 249Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
192.............................................................................. 250..............................................................................
193 Field Content 251 Field Content
194 pid process id 252 pid process id
@@ -222,10 +280,10 @@ Table 1-3: Contents of the stat files (as of 2.6.22-rc3)
222 start_stack address of the start of the stack 280 start_stack address of the start of the stack
223 esp current value of ESP 281 esp current value of ESP
224 eip current value of EIP 282 eip current value of EIP
225 pending bitmap of pending signals (obsolete) 283 pending bitmap of pending signals
226 blocked bitmap of blocked signals (obsolete) 284 blocked bitmap of blocked signals
227 sigign bitmap of ignored signals (obsolete) 285 sigign bitmap of ignored signals
228 sigcatch bitmap of catched signals (obsolete) 286 sigcatch bitmap of catched signals
229 wchan address where process went to sleep 287 wchan address where process went to sleep
230 0 (place holder) 288 0 (place holder)
231 0 (place holder) 289 0 (place holder)
@@ -234,19 +292,99 @@ Table 1-3: Contents of the stat files (as of 2.6.22-rc3)
234 rt_priority realtime priority 292 rt_priority realtime priority
235 policy scheduling policy (man sched_setscheduler) 293 policy scheduling policy (man sched_setscheduler)
236 blkio_ticks time spent waiting for block IO 294 blkio_ticks time spent waiting for block IO
295 gtime guest time of the task in jiffies
296 cgtime guest time of the task children in jiffies
237.............................................................................. 297..............................................................................
238 298
299The /proc/PID/map file containing the currently mapped memory regions and
300their access permissions.
301
302The format is:
303
304address perms offset dev inode pathname
305
30608048000-08049000 r-xp 00000000 03:00 8312 /opt/test
30708049000-0804a000 rw-p 00001000 03:00 8312 /opt/test
3080804a000-0806b000 rw-p 00000000 00:00 0 [heap]
309a7cb1000-a7cb2000 ---p 00000000 00:00 0
310a7cb2000-a7eb2000 rw-p 00000000 00:00 0
311a7eb2000-a7eb3000 ---p 00000000 00:00 0
312a7eb3000-a7ed5000 rw-p 00000000 00:00 0
313a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6
314a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6
315a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6
316a800b000-a800e000 rw-p 00000000 00:00 0
317a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0
318a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0
319a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0
320a8024000-a8027000 rw-p 00000000 00:00 0
321a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2
322a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2
323a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2
324aff35000-aff4a000 rw-p 00000000 00:00 0 [stack]
325ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
326
327where "address" is the address space in the process that it occupies, "perms"
328is a set of permissions:
329
330 r = read
331 w = write
332 x = execute
333 s = shared
334 p = private (copy on write)
335
336"offset" is the offset into the mapping, "dev" is the device (major:minor), and
337"inode" is the inode on that device. 0 indicates that no inode is associated
338with the memory region, as the case would be with BSS (uninitialized data).
339The "pathname" shows the name associated file for this mapping. If the mapping
340is not associated with a file:
341
342 [heap] = the heap of the program
343 [stack] = the stack of the main process
344 [vdso] = the "virtual dynamic shared object",
345 the kernel system call handler
346
347 or if empty, the mapping is anonymous.
348
349
350The /proc/PID/smaps is an extension based on maps, showing the memory
351consumption for each of the process's mappings. For each of mappings there
352is a series of lines such as the following:
353
35408048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
355Size: 1084 kB
356Rss: 892 kB
357Pss: 374 kB
358Shared_Clean: 892 kB
359Shared_Dirty: 0 kB
360Private_Clean: 0 kB
361Private_Dirty: 0 kB
362Referenced: 892 kB
363Swap: 0 kB
364KernelPageSize: 4 kB
365MMUPageSize: 4 kB
366
367The first of these lines shows the same information as is displayed for the
368mapping in /proc/PID/maps. The remaining lines show the size of the mapping,
369the amount of the mapping that is currently resident in RAM, the "proportional
370set size” (divide each shared page by the number of processes sharing it), the
371number of clean and dirty shared pages in the mapping, and the number of clean
372and dirty private pages in the mapping. The "Referenced" indicates the amount
373of memory currently marked as referenced or accessed.
374
375This file is only present if the CONFIG_MMU kernel configuration option is
376enabled.
239 377
2401.2 Kernel data 3781.2 Kernel data
241--------------- 379---------------
242 380
243Similar to the process entries, the kernel data files give information about 381Similar to the process entries, the kernel data files give information about
244the running kernel. The files used to obtain this information are contained in 382the running kernel. The files used to obtain this information are contained in
245/proc and are listed in Table 1-4. Not all of these will be present in your 383/proc and are listed in Table 1-5. Not all of these will be present in your
246system. It depends on the kernel configuration and the loaded modules, which 384system. It depends on the kernel configuration and the loaded modules, which
247files are there, and which are missing. 385files are there, and which are missing.
248 386
249Table 1-4: Kernel info in /proc 387Table 1-5: Kernel info in /proc
250.............................................................................. 388..............................................................................
251 File Content 389 File Content
252 apm Advanced power management info 390 apm Advanced power management info
@@ -283,6 +421,7 @@ Table 1-4: Kernel info in /proc
283 rtc Real time clock 421 rtc Real time clock
284 scsi SCSI info (see text) 422 scsi SCSI info (see text)
285 slabinfo Slab pool info 423 slabinfo Slab pool info
424 softirqs softirq usage
286 stat Overall statistics 425 stat Overall statistics
287 swaps Swap space utilization 426 swaps Swap space utilization
288 sys See chapter 2 427 sys See chapter 2
@@ -597,6 +736,25 @@ on the kind of area :
5970xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 ... 7360xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 ...
598 pages=10 vmalloc N0=10 737 pages=10 vmalloc N0=10
599 738
739..............................................................................
740
741softirqs:
742
743Provides counts of softirq handlers serviced since boot time, for each cpu.
744
745> cat /proc/softirqs
746 CPU0 CPU1 CPU2 CPU3
747 HI: 0 0 0 0
748 TIMER: 27166 27120 27097 27034
749 NET_TX: 0 0 0 17
750 NET_RX: 42 0 0 39
751 BLOCK: 0 0 107 1121
752 TASKLET: 0 0 0 290
753 SCHED: 27035 26983 26971 26746
754 HRTIMER: 0 0 0 0
755 RCU: 1678 1769 2178 2250
756
757
6001.3 IDE devices in /proc/ide 7581.3 IDE devices in /proc/ide
601---------------------------- 759----------------------------
602 760
@@ -614,10 +772,10 @@ IDE devices:
614 772
615More detailed information can be found in the controller specific 773More detailed information can be found in the controller specific
616subdirectories. These are named ide0, ide1 and so on. Each of these 774subdirectories. These are named ide0, ide1 and so on. Each of these
617directories contains the files shown in table 1-5. 775directories contains the files shown in table 1-6.
618 776
619 777
620Table 1-5: IDE controller info in /proc/ide/ide? 778Table 1-6: IDE controller info in /proc/ide/ide?
621.............................................................................. 779..............................................................................
622 File Content 780 File Content
623 channel IDE channel (0 or 1) 781 channel IDE channel (0 or 1)
@@ -627,11 +785,11 @@ Table 1-5: IDE controller info in /proc/ide/ide?
627.............................................................................. 785..............................................................................
628 786
629Each device connected to a controller has a separate subdirectory in the 787Each device connected to a controller has a separate subdirectory in the
630controllers directory. The files listed in table 1-6 are contained in these 788controllers directory. The files listed in table 1-7 are contained in these
631directories. 789directories.
632 790
633 791
634Table 1-6: IDE device information 792Table 1-7: IDE device information
635.............................................................................. 793..............................................................................
636 File Content 794 File Content
637 cache The cache 795 cache The cache
@@ -673,12 +831,12 @@ the drive parameters:
6731.4 Networking info in /proc/net 8311.4 Networking info in /proc/net
674-------------------------------- 832--------------------------------
675 833
676The subdirectory /proc/net follows the usual pattern. Table 1-6 shows the 834The subdirectory /proc/net follows the usual pattern. Table 1-8 shows the
677additional values you get for IP version 6 if you configure the kernel to 835additional values you get for IP version 6 if you configure the kernel to
678support this. Table 1-7 lists the files and their meaning. 836support this. Table 1-9 lists the files and their meaning.
679 837
680 838
681Table 1-6: IPv6 info in /proc/net 839Table 1-8: IPv6 info in /proc/net
682.............................................................................. 840..............................................................................
683 File Content 841 File Content
684 udp6 UDP sockets (IPv6) 842 udp6 UDP sockets (IPv6)
@@ -693,7 +851,7 @@ Table 1-6: IPv6 info in /proc/net
693.............................................................................. 851..............................................................................
694 852
695 853
696Table 1-7: Network info in /proc/net 854Table 1-9: Network info in /proc/net
697.............................................................................. 855..............................................................................
698 File Content 856 File Content
699 arp Kernel ARP table 857 arp Kernel ARP table
@@ -817,10 +975,10 @@ The directory /proc/parport contains information about the parallel ports of
817your system. It has one subdirectory for each port, named after the port 975your system. It has one subdirectory for each port, named after the port
818number (0,1,2,...). 976number (0,1,2,...).
819 977
820These directories contain the four files shown in Table 1-8. 978These directories contain the four files shown in Table 1-10.
821 979
822 980
823Table 1-8: Files in /proc/parport 981Table 1-10: Files in /proc/parport
824.............................................................................. 982..............................................................................
825 File Content 983 File Content
826 autoprobe Any IEEE-1284 device ID information that has been acquired. 984 autoprobe Any IEEE-1284 device ID information that has been acquired.
@@ -838,10 +996,10 @@ Table 1-8: Files in /proc/parport
838 996
839Information about the available and actually used tty's can be found in the 997Information about the available and actually used tty's can be found in the
840directory /proc/tty.You'll find entries for drivers and line disciplines in 998directory /proc/tty.You'll find entries for drivers and line disciplines in
841this directory, as shown in Table 1-9. 999this directory, as shown in Table 1-11.
842 1000
843 1001
844Table 1-9: Files in /proc/tty 1002Table 1-11: Files in /proc/tty
845.............................................................................. 1003..............................................................................
846 File Content 1004 File Content
847 drivers list of drivers and their usage 1005 drivers list of drivers and their usage
@@ -883,6 +1041,7 @@ since the system first booted. For a quick look, simply cat the file:
883 processes 2915 1041 processes 2915
884 procs_running 1 1042 procs_running 1
885 procs_blocked 0 1043 procs_blocked 0
1044 softirq 183433 0 21755 12 39 1137 231 21459 2263
886 1045
887The very first "cpu" line aggregates the numbers in all of the other "cpuN" 1046The very first "cpu" line aggregates the numbers in all of the other "cpuN"
888lines. These numbers identify the amount of time the CPU has spent performing 1047lines. These numbers identify the amount of time the CPU has spent performing
@@ -918,6 +1077,11 @@ CPUs.
918The "procs_blocked" line gives the number of processes currently blocked, 1077The "procs_blocked" line gives the number of processes currently blocked,
919waiting for I/O to complete. 1078waiting for I/O to complete.
920 1079
1080The "softirq" line gives counts of softirqs serviced since boot time, for each
1081of the possible system softirqs. The first column is the total of all
1082softirqs serviced; each subsequent column is the total for that particular
1083softirq.
1084
921 1085
9221.9 Ext4 file system parameters 10861.9 Ext4 file system parameters
923------------------------------ 1087------------------------------
@@ -926,9 +1090,9 @@ Information about mounted ext4 file systems can be found in
926/proc/fs/ext4. Each mounted filesystem will have a directory in 1090/proc/fs/ext4. Each mounted filesystem will have a directory in
927/proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or 1091/proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
928/proc/fs/ext4/dm-0). The files in each per-device directory are shown 1092/proc/fs/ext4/dm-0). The files in each per-device directory are shown
929in Table 1-10, below. 1093in Table 1-12, below.
930 1094
931Table 1-10: Files in /proc/fs/ext4/<devname> 1095Table 1-12: Files in /proc/fs/ext4/<devname>
932.............................................................................. 1096..............................................................................
933 File Content 1097 File Content
934 mb_groups details of multiblock allocator buddy cache of free blocks 1098 mb_groups details of multiblock allocator buddy cache of free blocks
diff --git a/Documentation/gcov.txt b/Documentation/gcov.txt
new file mode 100644
index 000000000000..e716aadb3a33
--- /dev/null
+++ b/Documentation/gcov.txt
@@ -0,0 +1,246 @@
1Using gcov with the Linux kernel
2================================
3
41. Introduction
52. Preparation
63. Customization
74. Files
85. Modules
96. Separated build and test machines
107. Troubleshooting
11Appendix A: sample script: gather_on_build.sh
12Appendix B: sample script: gather_on_test.sh
13
14
151. Introduction
16===============
17
18gcov profiling kernel support enables the use of GCC's coverage testing
19tool gcov [1] with the Linux kernel. Coverage data of a running kernel
20is exported in gcov-compatible format via the "gcov" debugfs directory.
21To get coverage data for a specific file, change to the kernel build
22directory and use gcov with the -o option as follows (requires root):
23
24# cd /tmp/linux-out
25# gcov -o /sys/kernel/debug/gcov/tmp/linux-out/kernel spinlock.c
26
27This will create source code files annotated with execution counts
28in the current directory. In addition, graphical gcov front-ends such
29as lcov [2] can be used to automate the process of collecting data
30for the entire kernel and provide coverage overviews in HTML format.
31
32Possible uses:
33
34* debugging (has this line been reached at all?)
35* test improvement (how do I change my test to cover these lines?)
36* minimizing kernel configurations (do I need this option if the
37 associated code is never run?)
38
39--
40
41[1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
42[2] http://ltp.sourceforge.net/coverage/lcov.php
43
44
452. Preparation
46==============
47
48Configure the kernel with:
49
50 CONFIG_DEBUGFS=y
51 CONFIG_GCOV_KERNEL=y
52
53and to get coverage data for the entire kernel:
54
55 CONFIG_GCOV_PROFILE_ALL=y
56
57Note that kernels compiled with profiling flags will be significantly
58larger and run slower. Also CONFIG_GCOV_PROFILE_ALL may not be supported
59on all architectures.
60
61Profiling data will only become accessible once debugfs has been
62mounted:
63
64 mount -t debugfs none /sys/kernel/debug
65
66
673. Customization
68================
69
70To enable profiling for specific files or directories, add a line
71similar to the following to the respective kernel Makefile:
72
73 For a single file (e.g. main.o):
74 GCOV_PROFILE_main.o := y
75
76 For all files in one directory:
77 GCOV_PROFILE := y
78
79To exclude files from being profiled even when CONFIG_GCOV_PROFILE_ALL
80is specified, use:
81
82 GCOV_PROFILE_main.o := n
83 and:
84 GCOV_PROFILE := n
85
86Only files which are linked to the main kernel image or are compiled as
87kernel modules are supported by this mechanism.
88
89
904. Files
91========
92
93The gcov kernel support creates the following files in debugfs:
94
95 /sys/kernel/debug/gcov
96 Parent directory for all gcov-related files.
97
98 /sys/kernel/debug/gcov/reset
99 Global reset file: resets all coverage data to zero when
100 written to.
101
102 /sys/kernel/debug/gcov/path/to/compile/dir/file.gcda
103 The actual gcov data file as understood by the gcov
104 tool. Resets file coverage data to zero when written to.
105
106 /sys/kernel/debug/gcov/path/to/compile/dir/file.gcno
107 Symbolic link to a static data file required by the gcov
108 tool. This file is generated by gcc when compiling with
109 option -ftest-coverage.
110
111
1125. Modules
113==========
114
115Kernel modules may contain cleanup code which is only run during
116module unload time. The gcov mechanism provides a means to collect
117coverage data for such code by keeping a copy of the data associated
118with the unloaded module. This data remains available through debugfs.
119Once the module is loaded again, the associated coverage counters are
120initialized with the data from its previous instantiation.
121
122This behavior can be deactivated by specifying the gcov_persist kernel
123parameter:
124
125 gcov_persist=0
126
127At run-time, a user can also choose to discard data for an unloaded
128module by writing to its data file or the global reset file.
129
130
1316. Separated build and test machines
132====================================
133
134The gcov kernel profiling infrastructure is designed to work out-of-the
135box for setups where kernels are built and run on the same machine. In
136cases where the kernel runs on a separate machine, special preparations
137must be made, depending on where the gcov tool is used:
138
139a) gcov is run on the TEST machine
140
141The gcov tool version on the test machine must be compatible with the
142gcc version used for kernel build. Also the following files need to be
143copied from build to test machine:
144
145from the source tree:
146 - all C source files + headers
147
148from the build tree:
149 - all C source files + headers
150 - all .gcda and .gcno files
151 - all links to directories
152
153It is important to note that these files need to be placed into the
154exact same file system location on the test machine as on the build
155machine. If any of the path components is symbolic link, the actual
156directory needs to be used instead (due to make's CURDIR handling).
157
158b) gcov is run on the BUILD machine
159
160The following files need to be copied after each test case from test
161to build machine:
162
163from the gcov directory in sysfs:
164 - all .gcda files
165 - all links to .gcno files
166
167These files can be copied to any location on the build machine. gcov
168must then be called with the -o option pointing to that directory.
169
170Example directory setup on the build machine:
171
172 /tmp/linux: kernel source tree
173 /tmp/out: kernel build directory as specified by make O=
174 /tmp/coverage: location of the files copied from the test machine
175
176 [user@build] cd /tmp/out
177 [user@build] gcov -o /tmp/coverage/tmp/out/init main.c
178
179
1807. Troubleshooting
181==================
182
183Problem: Compilation aborts during linker step.
184Cause: Profiling flags are specified for source files which are not
185 linked to the main kernel or which are linked by a custom
186 linker procedure.
187Solution: Exclude affected source files from profiling by specifying
188 GCOV_PROFILE := n or GCOV_PROFILE_basename.o := n in the
189 corresponding Makefile.
190
191
192Appendix A: gather_on_build.sh
193==============================
194
195Sample script to gather coverage meta files on the build machine
196(see 6a):
197
198#!/bin/bash
199
200KSRC=$1
201KOBJ=$2
202DEST=$3
203
204if [ -z "$KSRC" ] || [ -z "$KOBJ" ] || [ -z "$DEST" ]; then
205 echo "Usage: $0 <ksrc directory> <kobj directory> <output.tar.gz>" >&2
206 exit 1
207fi
208
209KSRC=$(cd $KSRC; printf "all:\n\t@echo \${CURDIR}\n" | make -f -)
210KOBJ=$(cd $KOBJ; printf "all:\n\t@echo \${CURDIR}\n" | make -f -)
211
212find $KSRC $KOBJ \( -name '*.gcno' -o -name '*.[ch]' -o -type l \) -a \
213 -perm /u+r,g+r | tar cfz $DEST -P -T -
214
215if [ $? -eq 0 ] ; then
216 echo "$DEST successfully created, copy to test system and unpack with:"
217 echo " tar xfz $DEST -P"
218else
219 echo "Could not create file $DEST"
220fi
221
222
223Appendix B: gather_on_test.sh
224=============================
225
226Sample script to gather coverage data files on the test machine
227(see 6b):
228
229#!/bin/bash
230
231DEST=$1
232GCDA=/sys/kernel/debug/gcov
233
234if [ -z "$DEST" ] ; then
235 echo "Usage: $0 <output.tar.gz>" >&2
236 exit 1
237fi
238
239find $GCDA -name '*.gcno' -o -name '*.gcda' | tar cfz $DEST -T -
240
241if [ $? -eq 0 ] ; then
242 echo "$DEST successfully created, copy to build system and unpack with:"
243 echo " tar xfz $DEST"
244else
245 echo "Could not create file $DEST"
246fi
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 1f779a25c703..7bb0d934b6d8 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -149,6 +149,8 @@ Code Seq# Include File Comments
149'p' 40-7F linux/nvram.h 149'p' 40-7F linux/nvram.h
150'p' 80-9F user-space parport 150'p' 80-9F user-space parport
151 <mailto:tim@cyberelk.net> 151 <mailto:tim@cyberelk.net>
152'p' a1-a4 linux/pps.h LinuxPPS
153 <mailto:giometti@linux.it>
152'q' 00-1F linux/serio.h 154'q' 00-1F linux/serio.h
153'q' 80-FF Internet PhoneJACK, Internet LineJACK 155'q' 80-FF Internet PhoneJACK, Internet LineJACK
154 <http://www.quicknet.net> 156 <http://www.quicknet.net>
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 5578248c18a4..08def8deb5f5 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -48,6 +48,7 @@ parameter is applicable:
48 EFI EFI Partitioning (GPT) is enabled 48 EFI EFI Partitioning (GPT) is enabled
49 EIDE EIDE/ATAPI support is enabled. 49 EIDE EIDE/ATAPI support is enabled.
50 FB The frame buffer device is enabled. 50 FB The frame buffer device is enabled.
51 GCOV GCOV profiling is enabled.
51 HW Appropriate hardware is enabled. 52 HW Appropriate hardware is enabled.
52 IA-64 IA-64 architecture is enabled. 53 IA-64 IA-64 architecture is enabled.
53 IMA Integrity measurement architecture is enabled. 54 IMA Integrity measurement architecture is enabled.
@@ -796,6 +797,12 @@ and is between 256 and 4096 characters. It is defined in the file
796 Format: off | on 797 Format: off | on
797 default: on 798 default: on
798 799
800 gcov_persist= [GCOV] When non-zero (default), profiling data for
801 kernel modules is saved and remains accessible via
802 debugfs, even when the module is unloaded/reloaded.
803 When zero, profiling data is discarded and associated
804 debugfs files are removed at module unload time.
805
799 gdth= [HW,SCSI] 806 gdth= [HW,SCSI]
800 See header of drivers/scsi/gdth.c. 807 See header of drivers/scsi/gdth.c.
801 808
diff --git a/Documentation/pps/pps.txt b/Documentation/pps/pps.txt
new file mode 100644
index 000000000000..125f4ab48998
--- /dev/null
+++ b/Documentation/pps/pps.txt
@@ -0,0 +1,172 @@
1
2 PPS - Pulse Per Second
3 ----------------------
4
5(C) Copyright 2007 Rodolfo Giometti <giometti@enneenne.com>
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17
18
19Overview
20--------
21
22LinuxPPS provides a programming interface (API) to define in the
23system several PPS sources.
24
25PPS means "pulse per second" and a PPS source is just a device which
26provides a high precision signal each second so that an application
27can use it to adjust system clock time.
28
29A PPS source can be connected to a serial port (usually to the Data
30Carrier Detect pin) or to a parallel port (ACK-pin) or to a special
31CPU's GPIOs (this is the common case in embedded systems) but in each
32case when a new pulse arrives the system must apply to it a timestamp
33and record it for userland.
34
35Common use is the combination of the NTPD as userland program, with a
36GPS receiver as PPS source, to obtain a wallclock-time with
37sub-millisecond synchronisation to UTC.
38
39
40RFC considerations
41------------------
42
43While implementing a PPS API as RFC 2783 defines and using an embedded
44CPU GPIO-Pin as physical link to the signal, I encountered a deeper
45problem:
46
47 At startup it needs a file descriptor as argument for the function
48 time_pps_create().
49
50This implies that the source has a /dev/... entry. This assumption is
51ok for the serial and parallel port, where you can do something
52useful besides(!) the gathering of timestamps as it is the central
53task for a PPS-API. But this assumption does not work for a single
54purpose GPIO line. In this case even basic file-related functionality
55(like read() and write()) makes no sense at all and should not be a
56precondition for the use of a PPS-API.
57
58The problem can be simply solved if you consider that a PPS source is
59not always connected with a GPS data source.
60
61So your programs should check if the GPS data source (the serial port
62for instance) is a PPS source too, and if not they should provide the
63possibility to open another device as PPS source.
64
65In LinuxPPS the PPS sources are simply char devices usually mapped
66into files /dev/pps0, /dev/pps1, etc..
67
68
69Coding example
70--------------
71
72To register a PPS source into the kernel you should define a struct
73pps_source_info_s as follows:
74
75 static struct pps_source_info pps_ktimer_info = {
76 .name = "ktimer",
77 .path = "",
78 .mode = PPS_CAPTUREASSERT | PPS_OFFSETASSERT | \
79 PPS_ECHOASSERT | \
80 PPS_CANWAIT | PPS_TSFMT_TSPEC,
81 .echo = pps_ktimer_echo,
82 .owner = THIS_MODULE,
83 };
84
85and then calling the function pps_register_source() in your
86intialization routine as follows:
87
88 source = pps_register_source(&pps_ktimer_info,
89 PPS_CAPTUREASSERT | PPS_OFFSETASSERT);
90
91The pps_register_source() prototype is:
92
93 int pps_register_source(struct pps_source_info_s *info, int default_params)
94
95where "info" is a pointer to a structure that describes a particular
96PPS source, "default_params" tells the system what the initial default
97parameters for the device should be (it is obvious that these parameters
98must be a subset of ones defined in the struct
99pps_source_info_s which describe the capabilities of the driver).
100
101Once you have registered a new PPS source into the system you can
102signal an assert event (for example in the interrupt handler routine)
103just using:
104
105 pps_event(source, &ts, PPS_CAPTUREASSERT, ptr)
106
107where "ts" is the event's timestamp.
108
109The same function may also run the defined echo function
110(pps_ktimer_echo(), passing to it the "ptr" pointer) if the user
111asked for that... etc..
112
113Please see the file drivers/pps/clients/ktimer.c for example code.
114
115
116SYSFS support
117-------------
118
119If the SYSFS filesystem is enabled in the kernel it provides a new class:
120
121 $ ls /sys/class/pps/
122 pps0/ pps1/ pps2/
123
124Every directory is the ID of a PPS sources defined in the system and
125inside you find several files:
126
127 $ ls /sys/class/pps/pps0/
128 assert clear echo mode name path subsystem@ uevent
129
130Inside each "assert" and "clear" file you can find the timestamp and a
131sequence number:
132
133 $ cat /sys/class/pps/pps0/assert
134 1170026870.983207967#8
135
136Where before the "#" is the timestamp in seconds; after it is the
137sequence number. Other files are:
138
139* echo: reports if the PPS source has an echo function or not;
140
141* mode: reports available PPS functioning modes;
142
143* name: reports the PPS source's name;
144
145* path: reports the PPS source's device path, that is the device the
146 PPS source is connected to (if it exists).
147
148
149Testing the PPS support
150-----------------------
151
152In order to test the PPS support even without specific hardware you can use
153the ktimer driver (see the client subsection in the PPS configuration menu)
154and the userland tools provided into Documentaion/pps/ directory.
155
156Once you have enabled the compilation of ktimer just modprobe it (if
157not statically compiled):
158
159 # modprobe ktimer
160
161and the run ppstest as follow:
162
163 $ ./ppstest /dev/pps0
164 trying PPS source "/dev/pps1"
165 found PPS source "/dev/pps1"
166 ok, found 1 source(s), now start fetching data...
167 source 0 - assert 1186592699.388832443, sequence: 364 - clear 0.000000000, sequence: 0
168 source 0 - assert 1186592700.388931295, sequence: 365 - clear 0.000000000, sequence: 0
169 source 0 - assert 1186592701.389032765, sequence: 366 - clear 0.000000000, sequence: 0
170
171Please, note that to compile userland programs you need the file timepps.h
172(see Documentation/pps/).
diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt
index 1b74b5f30af4..c8acd8659e91 100644
--- a/Documentation/rfkill.txt
+++ b/Documentation/rfkill.txt
@@ -3,9 +3,8 @@ rfkill - RF kill switch support
3 3
41. Introduction 41. Introduction
52. Implementation details 52. Implementation details
63. Kernel driver guidelines 63. Kernel API
74. Kernel API 74. Userspace support
85. Userspace support
9 8
10 9
111. Introduction 101. Introduction
@@ -19,82 +18,62 @@ disable all transmitters of a certain type (or all). This is intended for
19situations where transmitters need to be turned off, for example on 18situations where transmitters need to be turned off, for example on
20aircraft. 19aircraft.
21 20
21The rfkill subsystem has a concept of "hard" and "soft" block, which
22differ little in their meaning (block == transmitters off) but rather in
23whether they can be changed or not:
24 - hard block: read-only radio block that cannot be overriden by software
25 - soft block: writable radio block (need not be readable) that is set by
26 the system software.
22 27
23 28
242. Implementation details 292. Implementation details
25 30
26The rfkill subsystem is composed of various components: the rfkill class, the 31The rfkill subsystem is composed of three main components:
27rfkill-input module (an input layer handler), and some specific input layer 32 * the rfkill core,
28events. 33 * the deprecated rfkill-input module (an input layer handler, being
29 34 replaced by userspace policy code) and
30The rfkill class is provided for kernel drivers to register their radio 35 * the rfkill drivers.
31transmitter with the kernel, provide methods for turning it on and off and,
32optionally, letting the system know about hardware-disabled states that may
33be implemented on the device. This code is enabled with the CONFIG_RFKILL
34Kconfig option, which drivers can "select".
35
36The rfkill class code also notifies userspace of state changes, this is
37achieved via uevents. It also provides some sysfs files for userspace to
38check the status of radio transmitters. See the "Userspace support" section
39below.
40 36
37The rfkill core provides API for kernel drivers to register their radio
38transmitter with the kernel, methods for turning it on and off and, letting
39the system know about hardware-disabled states that may be implemented on
40the device.
41 41
42The rfkill-input code implements a basic response to rfkill buttons -- it 42The rfkill core code also notifies userspace of state changes, and provides
43implements turning on/off all devices of a certain class (or all). 43ways for userspace to query the current states. See the "Userspace support"
44section below.
44 45
45When the device is hard-blocked (either by a call to rfkill_set_hw_state() 46When the device is hard-blocked (either by a call to rfkill_set_hw_state()
46or from query_hw_block) set_block() will be invoked but drivers can well 47or from query_hw_block) set_block() will be invoked for additional software
47ignore the method call since they can use the return value of the function 48block, but drivers can ignore the method call since they can use the return
48rfkill_set_hw_state() to sync the software state instead of keeping track 49value of the function rfkill_set_hw_state() to sync the software state
49of calls to set_block(). 50instead of keeping track of calls to set_block(). In fact, drivers should
50 51use the return value of rfkill_set_hw_state() unless the hardware actually
51 52keeps track of soft and hard block separately.
52The entire functionality is spread over more than one subsystem:
53
54 * The kernel input layer generates KEY_WWAN, KEY_WLAN etc. and
55 SW_RFKILL_ALL -- when the user presses a button. Drivers for radio
56 transmitters generally do not register to the input layer, unless the
57 device really provides an input device (i.e. a button that has no
58 effect other than generating a button press event)
59
60 * The rfkill-input code hooks up to these events and switches the soft-block
61 of the various radio transmitters, depending on the button type.
62
63 * The rfkill drivers turn off/on their transmitters as requested.
64
65 * The rfkill class will generate userspace notifications (uevents) to tell
66 userspace what the current state is.
67 53
68 54
553. Kernel API
69 56
703. Kernel driver guidelines
71 57
72 58Drivers for radio transmitters normally implement an rfkill driver.
73Drivers for radio transmitters normally implement only the rfkill class.
74These drivers may not unblock the transmitter based on own decisions, they
75should act on information provided by the rfkill class only.
76 59
77Platform drivers might implement input devices if the rfkill button is just 60Platform drivers might implement input devices if the rfkill button is just
78that, a button. If that button influences the hardware then you need to 61that, a button. If that button influences the hardware then you need to
79implement an rfkill class instead. This also applies if the platform provides 62implement an rfkill driver instead. This also applies if the platform provides
80a way to turn on/off the transmitter(s). 63a way to turn on/off the transmitter(s).
81 64
82During suspend/hibernation, transmitters should only be left enabled when 65For some platforms, it is possible that the hardware state changes during
83wake-on wlan or similar functionality requires it and the device wasn't 66suspend/hibernation, in which case it will be necessary to update the rfkill
84blocked before suspend/hibernate. Note that it may be necessary to update 67core with the current state is at resume time.
85the rfkill subsystem's idea of what the current state is at resume time if
86the state may have changed over suspend.
87
88 68
69To create an rfkill driver, driver's Kconfig needs to have
89 70
904. Kernel API 71 depends on RFKILL || !RFKILL
91 72
92To build a driver with rfkill subsystem support, the driver should depend on 73to ensure the driver cannot be built-in when rfkill is modular. The !RFKILL
93(or select) the Kconfig symbol RFKILL. 74case allows the driver to be built when rfkill is not configured, which which
94 75case all rfkill API can still be used but will be provided by static inlines
95The hardware the driver talks to may be write-only (where the current state 76which compile to almost nothing.
96of the hardware is unknown), or read-write (where the hardware can be queried
97about its current state).
98 77
99Calling rfkill_set_hw_state() when a state change happens is required from 78Calling rfkill_set_hw_state() when a state change happens is required from
100rfkill drivers that control devices that can be hard-blocked unless they also 79rfkill drivers that control devices that can be hard-blocked unless they also
@@ -105,10 +84,33 @@ device). Don't do this unless you cannot get the event in any other way.
105 84
1065. Userspace support 855. Userspace support
107 86
108The following sysfs entries exist for every rfkill device: 87The recommended userspace interface to use is /dev/rfkill, which is a misc
88character device that allows userspace to obtain and set the state of rfkill
89devices and sets of devices. It also notifies userspace about device addition
90and removal. The API is a simple read/write API that is defined in
91linux/rfkill.h, with one ioctl that allows turning off the deprecated input
92handler in the kernel for the transition period.
93
94Except for the one ioctl, communication with the kernel is done via read()
95and write() of instances of 'struct rfkill_event'. In this structure, the
96soft and hard block are properly separated (unlike sysfs, see below) and
97userspace is able to get a consistent snapshot of all rfkill devices in the
98system. Also, it is possible to switch all rfkill drivers (or all drivers of
99a specified type) into a state which also updates the default state for
100hotplugged devices.
101
102After an application opens /dev/rfkill, it can read the current state of
103all devices, and afterwards can poll the descriptor for hotplug or state
104change events.
105
106Applications must ignore operations (the "op" field) they do not handle,
107this allows the API to be extended in the future.
108
109Additionally, each rfkill device is registered in sysfs and there has the
110following attributes:
109 111
110 name: Name assigned by driver to this key (interface or driver name). 112 name: Name assigned by driver to this key (interface or driver name).
111 type: Name of the key type ("wlan", "bluetooth", etc). 113 type: Driver type string ("wlan", "bluetooth", etc).
112 state: Current state of the transmitter 114 state: Current state of the transmitter
113 0: RFKILL_STATE_SOFT_BLOCKED 115 0: RFKILL_STATE_SOFT_BLOCKED
114 transmitter is turned off by software 116 transmitter is turned off by software
@@ -117,7 +119,12 @@ The following sysfs entries exist for every rfkill device:
117 2: RFKILL_STATE_HARD_BLOCKED 119 2: RFKILL_STATE_HARD_BLOCKED
118 transmitter is forced off by something outside of 120 transmitter is forced off by something outside of
119 the driver's control. 121 the driver's control.
120 claim: 0: Kernel handles events (currently always reads that value) 122 This file is deprecated because it can only properly show
123 three of the four possible states, soft-and-hard-blocked is
124 missing.
125 claim: 0: Kernel handles events
126 This file is deprecated because there no longer is a way to
127 claim just control over a single rfkill instance.
121 128
122rfkill devices also issue uevents (with an action of "change"), with the 129rfkill devices also issue uevents (with an action of "change"), with the
123following environment variables set: 130following environment variables set:
@@ -128,9 +135,3 @@ RFKILL_TYPE
128 135
129The contents of these variables corresponds to the "name", "state" and 136The contents of these variables corresponds to the "name", "state" and
130"type" sysfs files explained above. 137"type" sysfs files explained above.
131
132An alternative userspace interface exists as a misc device /dev/rfkill,
133which allows userspace to obtain and set the state of rfkill devices and
134sets of devices. It also notifies userspace about device addition and
135removal. The API is a simple read/write API that is defined in
136linux/rfkill.h.
diff --git a/Documentation/robust-futex-ABI.txt b/Documentation/robust-futex-ABI.txt
index 535f69fab45f..fd1cd8aae4eb 100644
--- a/Documentation/robust-futex-ABI.txt
+++ b/Documentation/robust-futex-ABI.txt
@@ -135,7 +135,7 @@ manipulating this list), the user code must observe the following
135protocol on 'lock entry' insertion and removal: 135protocol on 'lock entry' insertion and removal:
136 136
137On insertion: 137On insertion:
138 1) set the 'list_op_pending' word to the address of the 'lock word' 138 1) set the 'list_op_pending' word to the address of the 'lock entry'
139 to be inserted, 139 to be inserted,
140 2) acquire the futex lock, 140 2) acquire the futex lock,
141 3) add the lock entry, with its thread id (TID) in the bottom 29 bits 141 3) add the lock entry, with its thread id (TID) in the bottom 29 bits
@@ -143,7 +143,7 @@ On insertion:
143 4) clear the 'list_op_pending' word. 143 4) clear the 'list_op_pending' word.
144 144
145On removal: 145On removal:
146 1) set the 'list_op_pending' word to the address of the 'lock word' 146 1) set the 'list_op_pending' word to the address of the 'lock entry'
147 to be removed, 147 to be removed,
148 2) remove the lock entry for this lock from the 'head' list, 148 2) remove the lock entry for this lock from the 'head' list,
149 2) release the futex lock, and 149 2) release the futex lock, and
diff --git a/Documentation/watchdog/hpwdt.txt b/Documentation/watchdog/hpwdt.txt
new file mode 100644
index 000000000000..127839e53043
--- /dev/null
+++ b/Documentation/watchdog/hpwdt.txt
@@ -0,0 +1,84 @@
1Last reviewed: 06/02/2009
2
3 HP iLO2 NMI Watchdog Driver
4 NMI sourcing for iLO2 based ProLiant Servers
5 Documentation and Driver by
6 Thomas Mingarelli <thomas.mingarelli@hp.com>
7
8 The HP iLO2 NMI Watchdog driver is a kernel module that provides basic
9 watchdog functionality and the added benefit of NMI sourcing. Both the
10 watchdog functionality and the NMI sourcing capability need to be enabled
11 by the user. Remember that the two modes are not dependant on one another.
12 A user can have the NMI sourcing without the watchdog timer and vice-versa.
13
14 Watchdog functionality is enabled like any other common watchdog driver. That
15 is, an application needs to be started that kicks off the watchdog timer. A
16 basic application exists in the Documentation/watchdog/src directory called
17 watchdog-test.c. Simply compile the C file and kick it off. If the system
18 gets into a bad state and hangs, the HP ProLiant iLO 2 timer register will
19 not be updated in a timely fashion and a hardware system reset (also known as
20 an Automatic Server Recovery (ASR)) event will occur.
21
22 The hpwdt driver also has three (3) module parameters. They are the following:
23
24 soft_margin - allows the user to set the watchdog timer value
25 allow_kdump - allows the user to save off a kernel dump image after an NMI
26 nowayout - basic watchdog parameter that does not allow the timer to
27 be restarted or an impending ASR to be escaped.
28
29 NOTE: More information about watchdog drivers in general, including the ioctl
30 interface to /dev/watchdog can be found in
31 Documentation/watchdog/watchdog-api.txt and Documentation/IPMI.txt.
32
33 The NMI sourcing capability is disabled when the driver discovers that the
34 nmi_watchdog is turned on (nmi_watchdog = 1). This is due to the inability to
35 distinguish between "NMI Watchdog Ticks" and "HW generated NMI events" in the
36 Linux kernel. What this means is that the hpwdt nmi handler code is called
37 each time the NMI signal fires off. This could amount to several thousands of
38 NMIs in a matter of seconds. If a user sees the Linux kernel's "dazed and
39 confused" message in the logs or if the system gets into a hung state, then
40 the user should reboot with nmi_watchdog=0.
41
42 1. If the kernel has not been booted with nmi_watchdog turned off then
43 edit /boot/grub/menu.lst and place the nmi_watchdog=0 at the end of the
44 currently booting kernel line.
45 2. reboot the sever
46
47 Now, the hpwdt can successfully receive and source the NMI and provide a log
48 message that details the reason for the NMI (as determined by the HP BIOS).
49
50 Below is a list of NMIs the HP BIOS understands along with the associated
51 code (reason):
52
53 No source found 00h
54
55 Uncorrectable Memory Error 01h
56
57 ASR NMI 1Bh
58
59 PCI Parity Error 20h
60
61 NMI Button Press 27h
62
63 SB_BUS_NMI 28h
64
65 ILO Doorbell NMI 29h
66
67 ILO IOP NMI 2Ah
68
69 ILO Watchdog NMI 2Bh
70
71 Proc Throt NMI 2Ch
72
73 Front Side Bus NMI 2Dh
74
75 PCI Express Error 2Fh
76
77 DMA controller NMI 30h
78
79 Hypertransport/CSI Error 31h
80
81
82
83 -- Tom Mingarelli
84 (thomas.mingarelli@hp.com)
diff --git a/MAINTAINERS b/MAINTAINERS
index fb94addb34de..a08882ea6861 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -946,7 +946,7 @@ M: me@bobcopeland.com
946L: linux-wireless@vger.kernel.org 946L: linux-wireless@vger.kernel.org
947L: ath5k-devel@lists.ath5k.org 947L: ath5k-devel@lists.ath5k.org
948S: Maintained 948S: Maintained
949F: drivers/net/wireless/ath5k/ 949F: drivers/net/wireless/ath/ath5k/
950 950
951ATHEROS ATH9K WIRELESS DRIVER 951ATHEROS ATH9K WIRELESS DRIVER
952P: Luis R. Rodriguez 952P: Luis R. Rodriguez
@@ -962,7 +962,7 @@ M: senthilkumar@atheros.com
962L: linux-wireless@vger.kernel.org 962L: linux-wireless@vger.kernel.org
963L: ath9k-devel@lists.ath9k.org 963L: ath9k-devel@lists.ath9k.org
964S: Supported 964S: Supported
965F: drivers/net/wireless/ath9k/ 965F: drivers/net/wireless/ath/ath9k/
966 966
967ATHEROS AR9170 WIRELESS DRIVER 967ATHEROS AR9170 WIRELESS DRIVER
968P: Christian Lamparter 968P: Christian Lamparter
@@ -970,7 +970,7 @@ M: chunkeey@web.de
970L: linux-wireless@vger.kernel.org 970L: linux-wireless@vger.kernel.org
971W: http://wireless.kernel.org/en/users/Drivers/ar9170 971W: http://wireless.kernel.org/en/users/Drivers/ar9170
972S: Maintained 972S: Maintained
973F: drivers/net/wireless/ar9170/ 973F: drivers/net/wireless/ath/ar9170/
974 974
975ATI_REMOTE2 DRIVER 975ATI_REMOTE2 DRIVER
976P: Ville Syrjala 976P: Ville Syrjala
@@ -1544,6 +1544,7 @@ L: containers@lists.linux-foundation.org
1544S: Maintained 1544S: Maintained
1545F: include/linux/cgroup* 1545F: include/linux/cgroup*
1546F: kernel/cgroup* 1546F: kernel/cgroup*
1547F: mm/*cgroup*
1547 1548
1548CORETEMP HARDWARE MONITORING DRIVER 1549CORETEMP HARDWARE MONITORING DRIVER
1549P: Rudolf Marek 1550P: Rudolf Marek
@@ -2052,8 +2053,8 @@ F: drivers/edac/i5400_edac.c
2052 2053
2053EDAC-I82975X 2054EDAC-I82975X
2054P: Ranganathan Desikan 2055P: Ranganathan Desikan
2055P: Arvind R.
2056M: rdesikan@jetzbroadband.com 2056M: rdesikan@jetzbroadband.com
2057P: Arvind R.
2057M: arvind@acarlab.com 2058M: arvind@acarlab.com
2058L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 2059L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2059W: bluesmoke.sourceforge.net 2060W: bluesmoke.sourceforge.net
@@ -2274,11 +2275,9 @@ F: drivers/net/wan/dlci.c
2274F: drivers/net/wan/sdla.c 2275F: drivers/net/wan/sdla.c
2275 2276
2276FRAMEBUFFER LAYER 2277FRAMEBUFFER LAYER
2277P: Antonino Daplas
2278M: adaplas@gmail.com
2279L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 2278L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
2280W: http://linux-fbdev.sourceforge.net/ 2279W: http://linux-fbdev.sourceforge.net/
2281S: Maintained 2280S: Orphan
2282F: Documentation/fb/ 2281F: Documentation/fb/
2283F: drivers/video/fb* 2282F: drivers/video/fb*
2284F: include/linux/fb.h 2283F: include/linux/fb.h
@@ -2391,7 +2390,7 @@ FTRACE
2391P: Steven Rostedt 2390P: Steven Rostedt
2392M: rostedt@goodmis.org 2391M: rostedt@goodmis.org
2393S: Maintained 2392S: Maintained
2394F: Documentation/ftrace.txt 2393F: Documentation/trace/ftrace.txt
2395F: arch/*/*/*/ftrace.h 2394F: arch/*/*/*/ftrace.h
2396F: arch/*/kernel/ftrace.c 2395F: arch/*/kernel/ftrace.c
2397F: include/*/ftrace.h 2396F: include/*/ftrace.h
@@ -2850,7 +2849,7 @@ W: http://apps.sourceforge.net/trac/linux-zigbee
2850T: git git://git.kernel.org/pub/scm/linux/kernel/git/lumag/lowpan.git 2849T: git git://git.kernel.org/pub/scm/linux/kernel/git/lumag/lowpan.git
2851S: Maintained 2850S: Maintained
2852F: net/ieee802154/ 2851F: net/ieee802154/
2853F: drivers/ieee801254/ 2852F: drivers/ieee802154/
2854 2853
2855INTEGRITY MEASUREMENT ARCHITECTURE (IMA) 2854INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
2856P: Mimi Zohar 2855P: Mimi Zohar
@@ -3407,7 +3406,7 @@ P: Eduard - Gabriel Munteanu
3407M: eduard.munteanu@linux360.ro 3406M: eduard.munteanu@linux360.ro
3408S: Maintained 3407S: Maintained
3409F: Documentation/trace/kmemtrace.txt 3408F: Documentation/trace/kmemtrace.txt
3410F: include/trace/kmemtrace.h 3409F: include/linux/kmemtrace.h
3411F: kernel/trace/kmemtrace.c 3410F: kernel/trace/kmemtrace.c
3412 3411
3413KPROBES 3412KPROBES
@@ -4084,7 +4083,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
4084S: Maintained 4083S: Maintained
4085F: net/wireless/ 4084F: net/wireless/
4086F: include/net/ieee80211* 4085F: include/net/ieee80211*
4087F: include/net/wireless.h 4086F: include/linux/wireless.h
4088 4087
4089NETWORKING DRIVERS 4088NETWORKING DRIVERS
4090L: netdev@vger.kernel.org 4089L: netdev@vger.kernel.org
@@ -4578,6 +4577,13 @@ S: Maintained
4578F: drivers/net/pppol2tp.c 4577F: drivers/net/pppol2tp.c
4579F: include/linux/if_pppol2tp.h 4578F: include/linux/if_pppol2tp.h
4580 4579
4580PPS SUPPORT
4581P: Rodolfo Giometti
4582M: giometti@enneenne.com
4583W: http://wiki.enneenne.com/index.php/LinuxPPS_support
4584L: linuxpps@ml.enneenne.com (subscribers-only)
4585S: Maintained
4586
4581PREEMPTIBLE KERNEL 4587PREEMPTIBLE KERNEL
4582P: Robert Love 4588P: Robert Love
4583M: rml@tech9.net 4589M: rml@tech9.net
diff --git a/Makefile b/Makefile
index ea63667617f3..46e1c9d03d51 100644
--- a/Makefile
+++ b/Makefile
@@ -330,6 +330,7 @@ AFLAGS_MODULE = $(MODFLAGS)
330LDFLAGS_MODULE = 330LDFLAGS_MODULE =
331CFLAGS_KERNEL = 331CFLAGS_KERNEL =
332AFLAGS_KERNEL = 332AFLAGS_KERNEL =
333CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
333 334
334 335
335# Use LINUXINCLUDE when you must reference the include/ directory. 336# Use LINUXINCLUDE when you must reference the include/ directory.
@@ -356,7 +357,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
356export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 357export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
357 358
358export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 359export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
359export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 360export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
360export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 361export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
361 362
362# When compiling out-of-tree modules, put MODVERDIR in the module 363# When compiling out-of-tree modules, put MODVERDIR in the module
@@ -1216,8 +1217,8 @@ clean: archclean $(clean-dirs)
1216 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ 1217 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1217 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ 1218 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1218 -o -name '*.symtypes' -o -name 'modules.order' \ 1219 -o -name '*.symtypes' -o -name 'modules.order' \
1219 -o -name 'Module.markers' -o -name '.tmp_*.o.*' \) \ 1220 -o -name 'Module.markers' -o -name '.tmp_*.o.*' \
1220 -type f -print | xargs rm -f 1221 -o -name '*.gcno' \) -type f -print | xargs rm -f
1221 1222
1222# mrproper - Delete all generated files, including .config 1223# mrproper - Delete all generated files, including .config
1223# 1224#
@@ -1421,8 +1422,8 @@ clean: $(clean-dirs)
1421 $(call cmd,rmfiles) 1422 $(call cmd,rmfiles)
1422 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ 1423 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
1423 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ 1424 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1424 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ 1425 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1425 -type f -print | xargs rm -f 1426 -o -name '*.gcno' \) -type f -print | xargs rm -f
1426 1427
1427help: 1428help:
1428 @echo ' Building external modules.' 1429 @echo ' Building external modules.'
diff --git a/arch/Kconfig b/arch/Kconfig
index 78a35e9dc104..99193b160232 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -112,3 +112,5 @@ config HAVE_DMA_API_DEBUG
112 112
113config HAVE_DEFAULT_NO_SPIN_MUTEXES 113config HAVE_DEFAULT_NO_SPIN_MUTEXES
114 bool 114 bool
115
116source "kernel/gcov/Kconfig"
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 1bbe1da54869..93c0342530a0 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -394,8 +394,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user *__user *uargv,
394 goto out; 394 goto out;
395 395
396 error = do_execve(filename, uargv, uenvp, regs); 396 error = do_execve(filename, uargv, uenvp, regs);
397 if (error == 0)
398 current->ptrace &= ~PT_DTRACE;
399 putname(filename); 397 putname(filename);
400 398
401out: 399out:
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h
index b1d92f13ef96..88f36d599fe8 100644
--- a/arch/blackfin/include/asm/atomic.h
+++ b/arch/blackfin/include/asm/atomic.h
@@ -1,24 +1,21 @@
1#ifndef __ARCH_BLACKFIN_ATOMIC__ 1#ifndef __ARCH_BLACKFIN_ATOMIC__
2#define __ARCH_BLACKFIN_ATOMIC__ 2#define __ARCH_BLACKFIN_ATOMIC__
3 3
4#ifndef CONFIG_SMP
5# include <asm-generic/atomic.h>
6#else
7
4#include <linux/types.h> 8#include <linux/types.h>
5#include <asm/system.h> /* local_irq_XXX() */ 9#include <asm/system.h> /* local_irq_XXX() */
6 10
7/* 11/*
8 * Atomic operations that C can't guarantee us. Useful for 12 * Atomic operations that C can't guarantee us. Useful for
9 * resource counting etc.. 13 * resource counting etc..
10 *
11 * Generally we do not concern about SMP BFIN systems, so we don't have
12 * to deal with that.
13 *
14 * Tony Kou (tonyko@lineo.ca) Lineo Inc. 2001
15 */ 14 */
16 15
17#define ATOMIC_INIT(i) { (i) } 16#define ATOMIC_INIT(i) { (i) }
18#define atomic_set(v, i) (((v)->counter) = i) 17#define atomic_set(v, i) (((v)->counter) = i)
19 18
20#ifdef CONFIG_SMP
21
22#define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter) 19#define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter)
23 20
24asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr); 21asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr);
@@ -84,100 +81,6 @@ static inline int atomic_test_mask(int mask, atomic_t *v)
84#define smp_mb__before_atomic_inc() barrier() 81#define smp_mb__before_atomic_inc() barrier()
85#define smp_mb__after_atomic_inc() barrier() 82#define smp_mb__after_atomic_inc() barrier()
86 83
87#else /* !CONFIG_SMP */
88
89#define atomic_read(v) ((v)->counter)
90
91static inline void atomic_add(int i, atomic_t *v)
92{
93 unsigned long flags;
94
95 local_irq_save_hw(flags);
96 v->counter += i;
97 local_irq_restore_hw(flags);
98}
99
100static inline void atomic_sub(int i, atomic_t *v)
101{
102 unsigned long flags;
103
104 local_irq_save_hw(flags);
105 v->counter -= i;
106 local_irq_restore_hw(flags);
107
108}
109
110static inline int atomic_add_return(int i, atomic_t *v)
111{
112 int __temp = 0;
113 unsigned long flags;
114
115 local_irq_save_hw(flags);
116 v->counter += i;
117 __temp = v->counter;
118 local_irq_restore_hw(flags);
119
120
121 return __temp;
122}
123
124static inline int atomic_sub_return(int i, atomic_t *v)
125{
126 int __temp = 0;
127 unsigned long flags;
128
129 local_irq_save_hw(flags);
130 v->counter -= i;
131 __temp = v->counter;
132 local_irq_restore_hw(flags);
133
134 return __temp;
135}
136
137static inline void atomic_inc(volatile atomic_t *v)
138{
139 unsigned long flags;
140
141 local_irq_save_hw(flags);
142 v->counter++;
143 local_irq_restore_hw(flags);
144}
145
146static inline void atomic_dec(volatile atomic_t *v)
147{
148 unsigned long flags;
149
150 local_irq_save_hw(flags);
151 v->counter--;
152 local_irq_restore_hw(flags);
153}
154
155static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
156{
157 unsigned long flags;
158
159 local_irq_save_hw(flags);
160 v->counter &= ~mask;
161 local_irq_restore_hw(flags);
162}
163
164static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
165{
166 unsigned long flags;
167
168 local_irq_save_hw(flags);
169 v->counter |= mask;
170 local_irq_restore_hw(flags);
171}
172
173/* Atomic operations are already serializing */
174#define smp_mb__before_atomic_dec() barrier()
175#define smp_mb__after_atomic_dec() barrier()
176#define smp_mb__before_atomic_inc() barrier()
177#define smp_mb__after_atomic_inc() barrier()
178
179#endif /* !CONFIG_SMP */
180
181#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) 84#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
182#define atomic_dec_return(v) atomic_sub_return(1,(v)) 85#define atomic_dec_return(v) atomic_sub_return(1,(v))
183#define atomic_inc_return(v) atomic_add_return(1,(v)) 86#define atomic_inc_return(v) atomic_add_return(1,(v))
@@ -210,4 +113,6 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
210 113
211#include <asm-generic/atomic-long.h> 114#include <asm-generic/atomic-long.h>
212 115
213#endif /* __ARCH_BLACKFIN_ATOMIC __ */ 116#endif
117
118#endif
diff --git a/arch/blackfin/include/asm/auxvec.h b/arch/blackfin/include/asm/auxvec.h
index 215506cd87b7..41fa68b71287 100644
--- a/arch/blackfin/include/asm/auxvec.h
+++ b/arch/blackfin/include/asm/auxvec.h
@@ -1,4 +1 @@
1#ifndef __ASMBFIN_AUXVEC_H #include <asm-generic/auxvec.h>
2#define __ASMBFIN_AUXVEC_H
3
4#endif
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h
index 75fee2f7d9f2..daffa71576d4 100644
--- a/arch/blackfin/include/asm/bitops.h
+++ b/arch/blackfin/include/asm/bitops.h
@@ -1,26 +1,22 @@
1#ifndef _BLACKFIN_BITOPS_H 1#ifndef _BLACKFIN_BITOPS_H
2#define _BLACKFIN_BITOPS_H 2#define _BLACKFIN_BITOPS_H
3 3
4/* 4#ifndef CONFIG_SMP
5 * Copyright 1992, Linus Torvalds. 5# include <asm-generic/bitops.h>
6 */ 6#else
7
8#include <linux/compiler.h>
9#include <asm/byteorder.h> /* swab32 */
10
11#ifdef __KERNEL__
12 7
13#ifndef _LINUX_BITOPS_H 8#ifndef _LINUX_BITOPS_H
14#error only <linux/bitops.h> can be included directly 9#error only <linux/bitops.h> can be included directly
15#endif 10#endif
16 11
12#include <linux/compiler.h>
13#include <asm/byteorder.h> /* swab32 */
14
17#include <asm-generic/bitops/ffs.h> 15#include <asm-generic/bitops/ffs.h>
18#include <asm-generic/bitops/__ffs.h> 16#include <asm-generic/bitops/__ffs.h>
19#include <asm-generic/bitops/sched.h> 17#include <asm-generic/bitops/sched.h>
20#include <asm-generic/bitops/ffz.h> 18#include <asm-generic/bitops/ffz.h>
21 19
22#ifdef CONFIG_SMP
23
24#include <linux/linkage.h> 20#include <linux/linkage.h>
25 21
26asmlinkage int __raw_bit_set_asm(volatile unsigned long *addr, int nr); 22asmlinkage int __raw_bit_set_asm(volatile unsigned long *addr, int nr);
@@ -79,189 +75,13 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
79 return __raw_bit_test_toggle_asm(a, nr & 0x1f); 75 return __raw_bit_test_toggle_asm(a, nr & 0x1f);
80} 76}
81 77
82#else /* !CONFIG_SMP */
83
84#include <asm/system.h> /* save_flags */
85
86static inline void set_bit(int nr, volatile unsigned long *addr)
87{
88 int *a = (int *)addr;
89 int mask;
90 unsigned long flags;
91 a += nr >> 5;
92 mask = 1 << (nr & 0x1f);
93 local_irq_save_hw(flags);
94 *a |= mask;
95 local_irq_restore_hw(flags);
96}
97
98static inline void clear_bit(int nr, volatile unsigned long *addr)
99{
100 int *a = (int *)addr;
101 int mask;
102 unsigned long flags;
103 a += nr >> 5;
104 mask = 1 << (nr & 0x1f);
105 local_irq_save_hw(flags);
106 *a &= ~mask;
107 local_irq_restore_hw(flags);
108}
109
110static inline void change_bit(int nr, volatile unsigned long *addr)
111{
112 int mask;
113 unsigned long flags;
114 unsigned long *ADDR = (unsigned long *)addr;
115
116 ADDR += nr >> 5;
117 mask = 1 << (nr & 31);
118 local_irq_save_hw(flags);
119 *ADDR ^= mask;
120 local_irq_restore_hw(flags);
121}
122
123static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
124{
125 int mask, retval;
126 volatile unsigned int *a = (volatile unsigned int *)addr;
127 unsigned long flags;
128
129 a += nr >> 5;
130 mask = 1 << (nr & 0x1f);
131 local_irq_save_hw(flags);
132 retval = (mask & *a) != 0;
133 *a |= mask;
134 local_irq_restore_hw(flags);
135
136 return retval;
137}
138
139static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
140{
141 int mask, retval;
142 volatile unsigned int *a = (volatile unsigned int *)addr;
143 unsigned long flags;
144
145 a += nr >> 5;
146 mask = 1 << (nr & 0x1f);
147 local_irq_save_hw(flags);
148 retval = (mask & *a) != 0;
149 *a &= ~mask;
150 local_irq_restore_hw(flags);
151
152 return retval;
153}
154
155static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
156{
157 int mask, retval;
158 volatile unsigned int *a = (volatile unsigned int *)addr;
159 unsigned long flags;
160
161 a += nr >> 5;
162 mask = 1 << (nr & 0x1f);
163 local_irq_save_hw(flags);
164 retval = (mask & *a) != 0;
165 *a ^= mask;
166 local_irq_restore_hw(flags);
167 return retval;
168}
169
170#endif /* CONFIG_SMP */
171
172/* 78/*
173 * clear_bit() doesn't provide any barrier for the compiler. 79 * clear_bit() doesn't provide any barrier for the compiler.
174 */ 80 */
175#define smp_mb__before_clear_bit() barrier() 81#define smp_mb__before_clear_bit() barrier()
176#define smp_mb__after_clear_bit() barrier() 82#define smp_mb__after_clear_bit() barrier()
177 83
178static inline void __set_bit(int nr, volatile unsigned long *addr) 84#include <asm-generic/bitops/non-atomic.h>
179{
180 int *a = (int *)addr;
181 int mask;
182
183 a += nr >> 5;
184 mask = 1 << (nr & 0x1f);
185 *a |= mask;
186}
187
188static inline void __clear_bit(int nr, volatile unsigned long *addr)
189{
190 int *a = (int *)addr;
191 int mask;
192
193 a += nr >> 5;
194 mask = 1 << (nr & 0x1f);
195 *a &= ~mask;
196}
197
198static inline void __change_bit(int nr, volatile unsigned long *addr)
199{
200 int mask;
201 unsigned long *ADDR = (unsigned long *)addr;
202
203 ADDR += nr >> 5;
204 mask = 1 << (nr & 31);
205 *ADDR ^= mask;
206}
207
208static inline int __test_and_set_bit(int nr, volatile unsigned long *addr)
209{
210 int mask, retval;
211 volatile unsigned int *a = (volatile unsigned int *)addr;
212
213 a += nr >> 5;
214 mask = 1 << (nr & 0x1f);
215 retval = (mask & *a) != 0;
216 *a |= mask;
217 return retval;
218}
219
220static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
221{
222 int mask, retval;
223 volatile unsigned int *a = (volatile unsigned int *)addr;
224
225 a += nr >> 5;
226 mask = 1 << (nr & 0x1f);
227 retval = (mask & *a) != 0;
228 *a &= ~mask;
229 return retval;
230}
231
232static inline int __test_and_change_bit(int nr,
233 volatile unsigned long *addr)
234{
235 int mask, retval;
236 volatile unsigned int *a = (volatile unsigned int *)addr;
237
238 a += nr >> 5;
239 mask = 1 << (nr & 0x1f);
240 retval = (mask & *a) != 0;
241 *a ^= mask;
242 return retval;
243}
244
245static inline int __test_bit(int nr, const void *addr)
246{
247 int *a = (int *)addr;
248 int mask;
249
250 a += nr >> 5;
251 mask = 1 << (nr & 0x1f);
252 return ((mask & *a) != 0);
253}
254
255#ifndef CONFIG_SMP
256/*
257 * This routine doesn't need irq save and restore ops in UP
258 * context.
259 */
260static inline int test_bit(int nr, const void *addr)
261{
262 return __test_bit(nr, addr);
263}
264#endif
265 85
266#include <asm-generic/bitops/find.h> 86#include <asm-generic/bitops/find.h>
267#include <asm-generic/bitops/hweight.h> 87#include <asm-generic/bitops/hweight.h>
@@ -272,10 +92,10 @@ static inline int test_bit(int nr, const void *addr)
272 92
273#include <asm-generic/bitops/minix.h> 93#include <asm-generic/bitops/minix.h>
274 94
275#endif /* __KERNEL__ */
276
277#include <asm-generic/bitops/fls.h> 95#include <asm-generic/bitops/fls.h>
278#include <asm-generic/bitops/__fls.h> 96#include <asm-generic/bitops/__fls.h>
279#include <asm-generic/bitops/fls64.h> 97#include <asm-generic/bitops/fls64.h>
280 98
99#endif /* CONFIG_SMP */
100
281#endif /* _BLACKFIN_BITOPS_H */ 101#endif /* _BLACKFIN_BITOPS_H */
diff --git a/arch/blackfin/include/asm/bugs.h b/arch/blackfin/include/asm/bugs.h
index 9093c9c1fb81..61791e1ad9f5 100644
--- a/arch/blackfin/include/asm/bugs.h
+++ b/arch/blackfin/include/asm/bugs.h
@@ -1,16 +1 @@
1/* #include <asm-generic/bugs.h>
2 * include/asm-blackfin/bugs.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
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
14static void check_bugs(void)
15{
16}
diff --git a/arch/blackfin/include/asm/cputime.h b/arch/blackfin/include/asm/cputime.h
index 2b19705f9885..6d68ad7e0ea3 100644
--- a/arch/blackfin/include/asm/cputime.h
+++ b/arch/blackfin/include/asm/cputime.h
@@ -1,6 +1 @@
1#ifndef __BLACKFIN_CPUTIME_H
2#define __BLACKFIN_CPUTIME_H
3
4#include <asm-generic/cputime.h> #include <asm-generic/cputime.h>
5
6#endif /* __BLACKFIN_CPUTIME_H */
diff --git a/arch/blackfin/include/asm/current.h b/arch/blackfin/include/asm/current.h
index 31918d29122c..4c51401b5537 100644
--- a/arch/blackfin/include/asm/current.h
+++ b/arch/blackfin/include/asm/current.h
@@ -1,23 +1 @@
1#ifndef _BLACKFIN_CURRENT_H #include <asm-generic/current.h>
2#define _BLACKFIN_CURRENT_H
3/*
4 * current.h
5 * (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com>
6 *
7 * rather than dedicate a register (as the m68k source does), we
8 * just keep a global, we should probably just change it all to be
9 * current and lose _current_task.
10 */
11#include <linux/thread_info.h>
12
13struct task_struct;
14
15static inline struct task_struct *get_current(void) __attribute__ ((__const__));
16static inline struct task_struct *get_current(void)
17{
18 return (current_thread_info()->task);
19}
20
21#define current (get_current())
22
23#endif /* _BLACKFIN_CURRENT_H */
diff --git a/arch/blackfin/include/asm/device.h b/arch/blackfin/include/asm/device.h
index d8f9872b0e2d..f0a4c256403b 100644
--- a/arch/blackfin/include/asm/device.h
+++ b/arch/blackfin/include/asm/device.h
@@ -1,7 +1 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h> #include <asm-generic/device.h>
7
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h
index 230e1605d3fb..5a87baf0659d 100644
--- a/arch/blackfin/include/asm/elf.h
+++ b/arch/blackfin/include/asm/elf.h
@@ -20,7 +20,7 @@
20 20
21typedef unsigned long elf_greg_t; 21typedef unsigned long elf_greg_t;
22 22
23#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) 23#define ELF_NGREG 40 /* (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) */
24typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 24typedef elf_greg_t elf_gregset_t[ELF_NGREG];
25 25
26typedef struct user_bfinfp_struct elf_fpregset_t; 26typedef struct user_bfinfp_struct elf_fpregset_t;
diff --git a/arch/blackfin/include/asm/emergency-restart.h b/arch/blackfin/include/asm/emergency-restart.h
index 27f6c785d103..3711bd9d50bd 100644
--- a/arch/blackfin/include/asm/emergency-restart.h
+++ b/arch/blackfin/include/asm/emergency-restart.h
@@ -1,6 +1 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h> #include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/arch/blackfin/include/asm/errno.h b/arch/blackfin/include/asm/errno.h
index 164e4f39bb57..4c82b503d92f 100644
--- a/arch/blackfin/include/asm/errno.h
+++ b/arch/blackfin/include/asm/errno.h
@@ -1,6 +1 @@
1#ifndef _BFIN_ERRNO_H #include <asm-generic/errno.h>
2#define _BFIN_ERRNO_H
3
4#include<asm-generic/errno.h>
5
6#endif /* _BFIN_ERRNO_H */
diff --git a/arch/blackfin/include/asm/fb.h b/arch/blackfin/include/asm/fb.h
index c7df38030992..3a4988e8df45 100644
--- a/arch/blackfin/include/asm/fb.h
+++ b/arch/blackfin/include/asm/fb.h
@@ -1,12 +1 @@
1#ifndef _ASM_FB_H_ #include <asm-generic/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/arch/blackfin/include/asm/futex.h b/arch/blackfin/include/asm/futex.h
index 6a332a9f099c..0b745828f42b 100644
--- a/arch/blackfin/include/asm/futex.h
+++ b/arch/blackfin/include/asm/futex.h
@@ -1,6 +1 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h> #include <asm-generic/futex.h>
5
6#endif
diff --git a/arch/blackfin/include/asm/hardirq.h b/arch/blackfin/include/asm/hardirq.h
index 717181a1749b..cbd52f86bb9f 100644
--- a/arch/blackfin/include/asm/hardirq.h
+++ b/arch/blackfin/include/asm/hardirq.h
@@ -1,47 +1,11 @@
1#ifndef __BFIN_HARDIRQ_H 1#ifndef __BFIN_HARDIRQ_H
2#define __BFIN_HARDIRQ_H 2#define __BFIN_HARDIRQ_H
3 3
4#include <linux/cache.h>
5#include <linux/threads.h>
6#include <asm/irq.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10 unsigned int __syscall_count;
11 struct task_struct *__ksoftirqd_task;
12} ____cacheline_aligned irq_cpustat_t;
13
14#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
15
16/*
17 * We put the hardirq and softirq counter into the preemption
18 * counter. The bitmask has the following meaning:
19 *
20 * - bits 0-7 are the preemption count (max preemption depth: 256)
21 * - bits 8-15 are the softirq count (max # of softirqs: 256)
22 * - bits 16-23 are the hardirq count (max # of hardirqs: 256)
23 *
24 * - ( bit 26 is the PREEMPT_ACTIVE flag. )
25 *
26 * PREEMPT_MASK: 0x000000ff
27 * HARDIRQ_MASK: 0x0000ff00
28 * SOFTIRQ_MASK: 0x00ff0000
29 */
30
31#if NR_IRQS > 256
32#define HARDIRQ_BITS 9
33#else
34#define HARDIRQ_BITS 8
35#endif
36
37#ifdef NR_IRQS
38# if (1 << HARDIRQ_BITS) < NR_IRQS
39# error HARDIRQ_BITS is too low!
40# endif
41#endif
42
43#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 4#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
44 5
45extern void ack_bad_irq(unsigned int irq); 6extern void ack_bad_irq(unsigned int irq);
7#define ack_bad_irq ack_bad_irq
8
9#include <asm-generic/hardirq.h>
46 10
47#endif 11#endif
diff --git a/arch/blackfin/include/asm/hw_irq.h b/arch/blackfin/include/asm/hw_irq.h
index 5b51eaec012c..1f5ef7da0045 100644
--- a/arch/blackfin/include/asm/hw_irq.h
+++ b/arch/blackfin/include/asm/hw_irq.h
@@ -1,6 +1 @@
1#ifndef __ASM_BFIN_HW_IRQ_H #include <asm-generic/hw_irq.h>
2#define __ASM_BFIN_HW_IRQ_H
3
4/* Dummy include. */
5
6#endif
diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h
index 3022b5c96b37..37053eca200e 100644
--- a/arch/blackfin/include/asm/io.h
+++ b/arch/blackfin/include/asm/io.h
@@ -222,7 +222,6 @@ extern void blkfin_inv_cache_all(void);
222#define ioport_unmap(addr) 222#define ioport_unmap(addr)
223 223
224/* Pages to physical address... */ 224/* Pages to physical address... */
225#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
226#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) 225#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT)
227 226
228#define phys_to_virt(vaddr) ((void *) (vaddr)) 227#define phys_to_virt(vaddr) ((void *) (vaddr))
diff --git a/arch/blackfin/include/asm/ioctls.h b/arch/blackfin/include/asm/ioctls.h
index 895e3173165d..eca8d75b0a8a 100644
--- a/arch/blackfin/include/asm/ioctls.h
+++ b/arch/blackfin/include/asm/ioctls.h
@@ -1,87 +1,7 @@
1#ifndef __ARCH_BFIN_IOCTLS_H__ 1#ifndef __ARCH_BFIN_IOCTLS_H__
2#define __ARCH_BFIN_IOCTLS_H__ 2#define __ARCH_BFIN_IOCTLS_H__
3 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
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 /* For debugging only */
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/* Get Pty Number (of pty-mux device) */
55#define TIOCGPTN _IOR('T', 0x30, unsigned int)
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
74#define FIOQSIZE 0x545E 4#define FIOQSIZE 0x545E
5#include <asm-generic/ioctls.h>
75 6
76/* Used for packet mode */ 7#endif
77#define TIOCPKT_DATA 0
78#define TIOCPKT_FLUSHREAD 1
79#define TIOCPKT_FLUSHWRITE 2
80#define TIOCPKT_STOP 4
81#define TIOCPKT_START 8
82#define TIOCPKT_NOSTOP 16
83#define TIOCPKT_DOSTOP 32
84
85#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
86
87#endif /* __ARCH_BFIN_IOCTLS_H__ */
diff --git a/arch/blackfin/include/asm/ipcbuf.h b/arch/blackfin/include/asm/ipcbuf.h
index 8f0899cdf4d2..84c7e51cb6d0 100644
--- a/arch/blackfin/include/asm/ipcbuf.h
+++ b/arch/blackfin/include/asm/ipcbuf.h
@@ -1,30 +1 @@
1/* Changes origined from m68k version. Lineo Inc. May 2001 */ #include <asm-generic/ipcbuf.h>
2
3#ifndef __BFIN_IPCBUF_H__
4#define __BFIN_IPCBUF_H__
5
6/*
7 * The user_ipc_perm structure for m68k 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 * - 32-bit mode_t and seq
13 * - 2 miscellaneous 32-bit values
14 */
15
16struct ipc64_perm {
17 __kernel_key_t key;
18 __kernel_uid32_t uid;
19 __kernel_gid32_t gid;
20 __kernel_uid32_t cuid;
21 __kernel_gid32_t cgid;
22 __kernel_mode_t mode;
23 unsigned short __pad1;
24 unsigned short seq;
25 unsigned short __pad2;
26 unsigned long __unused1;
27 unsigned long __unused2;
28};
29
30#endif /* __BFIN_IPCBUF_H__ */
diff --git a/arch/blackfin/include/asm/irq.h b/arch/blackfin/include/asm/irq.h
index 400bdd52ce87..9a7f63a83c47 100644
--- a/arch/blackfin/include/asm/irq.h
+++ b/arch/blackfin/include/asm/irq.h
@@ -45,9 +45,6 @@
45 : "d" (bfin_irq_flags) \ 45 : "d" (bfin_irq_flags) \
46 ) 46 )
47 47
48static inline int irq_canonicalize(int irq) 48#include <asm-generic/irq.h>
49{
50 return irq;
51}
52 49
53#endif /* _BFIN_IRQ_H_ */ 50#endif /* _BFIN_IRQ_H_ */
diff --git a/arch/blackfin/include/asm/kmap_types.h b/arch/blackfin/include/asm/kmap_types.h
index 0a88622339ee..3575c64af42a 100644
--- a/arch/blackfin/include/asm/kmap_types.h
+++ b/arch/blackfin/include/asm/kmap_types.h
@@ -1,6 +1 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4#include <asm-generic/kmap_types.h> #include <asm-generic/kmap_types.h>
5
6#endif
diff --git a/arch/blackfin/include/asm/local.h b/arch/blackfin/include/asm/local.h
index 75afffbc6421..c11c530f74d0 100644
--- a/arch/blackfin/include/asm/local.h
+++ b/arch/blackfin/include/asm/local.h
@@ -1,6 +1 @@
1#ifndef __BLACKFIN_LOCAL_H
2#define __BLACKFIN_LOCAL_H
3
4#include <asm-generic/local.h> #include <asm-generic/local.h>
5
6#endif /* __BLACKFIN_LOCAL_H */
diff --git a/arch/blackfin/include/asm/mman.h b/arch/blackfin/include/asm/mman.h
index b58f5ad3f024..8eebf89f5ab1 100644
--- a/arch/blackfin/include/asm/mman.h
+++ b/arch/blackfin/include/asm/mman.h
@@ -1,43 +1 @@
1#ifndef __BFIN_MMAN_H__ #include <asm-generic/mman.h>
2#define __BFIN_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 0x0f /* Mask for type of mapping */
15#define MAP_FIXED 0x10 /* Interpret addr exactly */
16#define MAP_ANONYMOUS 0x20 /* don't use a file */
17
18#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
19#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
20#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
21#define MAP_LOCKED 0x2000 /* pages are locked */
22#define MAP_NORESERVE 0x4000 /* don't check for reservations */
23#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
24#define MAP_NONBLOCK 0x10000 /* do not block on IO */
25
26#define MS_ASYNC 1 /* sync memory asynchronously */
27#define MS_INVALIDATE 2 /* invalidate the caches */
28#define MS_SYNC 4 /* synchronous memory sync */
29
30#define MCL_CURRENT 1 /* lock all current mappings */
31#define MCL_FUTURE 2 /* lock all future mappings */
32
33#define MADV_NORMAL 0x0 /* default page-in behavior */
34#define MADV_RANDOM 0x1 /* page-in minimum required */
35#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
36#define MADV_WILLNEED 0x3 /* pre-fault pages */
37#define MADV_DONTNEED 0x4 /* discard these pages */
38
39/* compatibility flags */
40#define MAP_ANON MAP_ANONYMOUS
41#define MAP_FILE 0
42
43#endif /* __BFIN_MMAN_H__ */
diff --git a/arch/blackfin/include/asm/msgbuf.h b/arch/blackfin/include/asm/msgbuf.h
index 6fcbe8cd801d..809134c644a6 100644
--- a/arch/blackfin/include/asm/msgbuf.h
+++ b/arch/blackfin/include/asm/msgbuf.h
@@ -1,31 +1 @@
1#ifndef _BFIN_MSGBUF_H #include <asm-generic/msgbuf.h>
2#define _BFIN_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for bfin 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 msqid64_ds {
15 struct ipc64_perm msg_perm;
16 __kernel_time_t msg_stime; /* last msgsnd time */
17 unsigned long __unused1;
18 __kernel_time_t msg_rtime; /* last msgrcv time */
19 unsigned long __unused2;
20 __kernel_time_t msg_ctime; /* last change time */
21 unsigned long __unused3;
22 unsigned long msg_cbytes; /* current number of bytes on queue */
23 unsigned long msg_qnum; /* number of messages in queue */
24 unsigned long msg_qbytes; /* max number of bytes on queue */
25 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
26 __kernel_pid_t msg_lrpid; /* last receive pid */
27 unsigned long __unused4;
28 unsigned long __unused5;
29};
30
31#endif /* _BFIN_MSGBUF_H */
diff --git a/arch/blackfin/include/asm/mutex.h b/arch/blackfin/include/asm/mutex.h
index 5d399256bf06..5cc641c50834 100644
--- a/arch/blackfin/include/asm/mutex.h
+++ b/arch/blackfin/include/asm/mutex.h
@@ -10,7 +10,7 @@
10#define _ASM_MUTEX_H 10#define _ASM_MUTEX_H
11 11
12#ifndef CONFIG_SMP 12#ifndef CONFIG_SMP
13#include <asm-generic/mutex-dec.h> 13#include <asm-generic/mutex.h>
14#else 14#else
15 15
16static inline void 16static inline void
diff --git a/arch/blackfin/include/asm/page.h b/arch/blackfin/include/asm/page.h
index 3ea2016a1d4a..29dcf75c6112 100644
--- a/arch/blackfin/include/asm/page.h
+++ b/arch/blackfin/include/asm/page.h
@@ -1,88 +1,7 @@
1#ifndef _BLACKFIN_PAGE_H 1#ifndef _BLACKFIN_PAGE_H
2#define _BLACKFIN_PAGE_H 2#define _BLACKFIN_PAGE_H
3 3
4/* PAGE_SHIFT determines the page size */ 4#include <asm-generic/page.h>
5#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
5 6
6#define PAGE_SHIFT 12
7#ifdef __ASSEMBLY__
8#define PAGE_SIZE (1 << PAGE_SHIFT)
9#else
10#define PAGE_SIZE (1UL << PAGE_SHIFT)
11#endif 7#endif
12#define PAGE_MASK (~(PAGE_SIZE-1))
13
14#include <asm/setup.h>
15
16#ifndef __ASSEMBLY__
17
18#define get_user_page(vaddr) __get_free_page(GFP_KERNEL)
19#define free_user_page(page, addr) free_page(addr)
20
21#define clear_page(page) memset((page), 0, PAGE_SIZE)
22#define copy_page(to,from) memcpy((to), (from), PAGE_SIZE)
23
24#define clear_user_page(page, vaddr,pg) clear_page(page)
25#define copy_user_page(to, from, vaddr,pg) copy_page(to, from)
26
27/*
28 * These are used to make use of C type-checking..
29 */
30typedef struct {
31 unsigned long pte;
32} pte_t;
33typedef struct {
34 unsigned long pmd[16];
35} pmd_t;
36typedef struct {
37 unsigned long pgd;
38} pgd_t;
39typedef struct {
40 unsigned long pgprot;
41} pgprot_t;
42typedef struct page *pgtable_t;
43
44#define pte_val(x) ((x).pte)
45#define pmd_val(x) ((&x)->pmd[0])
46#define pgd_val(x) ((x).pgd)
47#define pgprot_val(x) ((x).pgprot)
48
49#define __pte(x) ((pte_t) { (x) } )
50#define __pmd(x) ((pmd_t) { (x) } )
51#define __pgd(x) ((pgd_t) { (x) } )
52#define __pgprot(x) ((pgprot_t) { (x) } )
53
54extern unsigned long memory_start;
55extern unsigned long memory_end;
56
57#endif /* !__ASSEMBLY__ */
58
59#include <asm/page_offset.h>
60#include <asm/io.h>
61
62#define PAGE_OFFSET (PAGE_OFFSET_RAW)
63
64#ifndef __ASSEMBLY__
65
66#define __pa(vaddr) virt_to_phys((void *)(vaddr))
67#define __va(paddr) phys_to_virt((unsigned long)(paddr))
68
69#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
70
71#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
72#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
73#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
74#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
75#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
76
77#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
78#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
79#define pfn_valid(pfn) ((pfn) < max_mapnr)
80
81#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
82 ((void *)(kaddr) < (void *)memory_end))
83
84#include <asm-generic/getorder.h>
85
86#endif /* __ASSEMBLY__ */
87
88#endif /* _BLACKFIN_PAGE_H */
diff --git a/arch/blackfin/include/asm/param.h b/arch/blackfin/include/asm/param.h
index 41564a6347f8..965d45427975 100644
--- a/arch/blackfin/include/asm/param.h
+++ b/arch/blackfin/include/asm/param.h
@@ -1,22 +1 @@
1#ifndef _BLACKFIN_PARAM_H #include <asm-generic/param.h>
2#define _BLACKFIN_PARAM_H
3
4#ifdef __KERNEL__
5#define HZ CONFIG_HZ
6#define USER_HZ 100
7#define CLOCKS_PER_SEC (USER_HZ)
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 /* _BLACKFIN_PARAM_H */
diff --git a/arch/blackfin/include/asm/percpu.h b/arch/blackfin/include/asm/percpu.h
index c94c7bc88c71..06a959d67234 100644
--- a/arch/blackfin/include/asm/percpu.h
+++ b/arch/blackfin/include/asm/percpu.h
@@ -1,6 +1 @@
1#ifndef __ARCH_BLACKFIN_PERCPU__
2#define __ARCH_BLACKFIN_PERCPU__
3
4#include <asm-generic/percpu.h> #include <asm-generic/percpu.h>
5
6#endif /* __ARCH_BLACKFIN_PERCPU__ */
diff --git a/arch/blackfin/include/asm/pgalloc.h b/arch/blackfin/include/asm/pgalloc.h
index c686e0542fd0..f261cb7dda06 100644
--- a/arch/blackfin/include/asm/pgalloc.h
+++ b/arch/blackfin/include/asm/pgalloc.h
@@ -1,8 +1 @@
1#ifndef _BLACKFIN_PGALLOC_H #include <asm-generic/pgalloc.h>
2#define _BLACKFIN_PGALLOC_H
3
4#include <asm/setup.h>
5
6#define check_pgt_cache() do { } while (0)
7
8#endif /* _BLACKFIN_PGALLOC_H */
diff --git a/arch/blackfin/include/asm/poll.h b/arch/blackfin/include/asm/poll.h
index 94cc2636e0e2..a0556671357b 100644
--- a/arch/blackfin/include/asm/poll.h
+++ b/arch/blackfin/include/asm/poll.h
@@ -1,24 +1,9 @@
1#ifndef __BFIN_POLL_H 1#ifndef __BFIN_POLL_H
2#define __BFIN_POLL_H 2#define __BFIN_POLL_H
3 3
4#define POLLIN 1 4#define POLLWRNORM 4 /* POLLOUT */
5#define POLLPRI 2
6#define POLLOUT 4
7#define POLLERR 8
8#define POLLHUP 16
9#define POLLNVAL 32
10#define POLLRDNORM 64
11#define POLLWRNORM POLLOUT
12#define POLLRDBAND 128
13#define POLLWRBAND 256 5#define POLLWRBAND 256
14#define POLLMSG 0x0400
15#define POLLREMOVE 0x1000
16#define POLLRDHUP 0x2000
17 6
18struct pollfd { 7#include <asm-generic/poll.h>
19 int fd;
20 short events;
21 short revents;
22};
23 8
24#endif /* __BFIN_POLL_H */ 9#endif
diff --git a/arch/blackfin/include/asm/posix_types.h b/arch/blackfin/include/asm/posix_types.h
index 23aa1f8c1bd1..80c9d64eb26c 100644
--- a/arch/blackfin/include/asm/posix_types.h
+++ b/arch/blackfin/include/asm/posix_types.h
@@ -1,61 +1,27 @@
1#ifndef __ARCH_BFIN_POSIX_TYPES_H 1#ifndef __ARCH_BFIN_POSIX_TYPES_H
2#define __ARCH_BFIN_POSIX_TYPES_H 2#define __ARCH_BFIN_POSIX_TYPES_H
3 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; 4typedef unsigned short __kernel_mode_t;
5#define __kernel_mode_t __kernel_mode_t
6
12typedef unsigned short __kernel_nlink_t; 7typedef unsigned short __kernel_nlink_t;
13typedef long __kernel_off_t; 8#define __kernel_nlink_t __kernel_nlink_t
14typedef int __kernel_pid_t; 9
15typedef unsigned int __kernel_ipc_pid_t; 10typedef unsigned int __kernel_ipc_pid_t;
16typedef unsigned int __kernel_uid_t; 11#define __kernel_ipc_pid_t __kernel_ipc_pid_t
17typedef unsigned int __kernel_gid_t; 12
18typedef unsigned long __kernel_size_t; 13typedef unsigned long __kernel_size_t;
19typedef long __kernel_ssize_t; 14typedef long __kernel_ssize_t;
20typedef int __kernel_ptrdiff_t; 15typedef int __kernel_ptrdiff_t;
21typedef long __kernel_time_t; 16#define __kernel_size_t __kernel_size_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 17
33typedef unsigned short __kernel_old_uid_t; 18typedef unsigned short __kernel_old_uid_t;
34typedef unsigned short __kernel_old_gid_t; 19typedef unsigned short __kernel_old_gid_t;
35typedef unsigned short __kernel_old_dev_t; 20#define __kernel_old_uid_t __kernel_old_uid_t
36
37#ifdef __GNUC__
38typedef long long __kernel_loff_t;
39#endif
40 21
41typedef struct { 22typedef unsigned short __kernel_old_dev_t;
42 int val[2]; 23#define __kernel_old_dev_t __kernel_old_dev_t
43} __kernel_fsid_t;
44
45#if defined(__KERNEL__)
46
47#undef __FD_SET
48#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
49
50#undef __FD_CLR
51#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
52
53#undef __FD_ISSET
54#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
55
56#undef __FD_ZERO
57#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
58 24
59#endif /* defined(__KERNEL__) */ 25#include <asm-generic/posix_types.h>
60 26
61#endif 27#endif
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h
index 3040415523b2..d0be99be8308 100644
--- a/arch/blackfin/include/asm/processor.h
+++ b/arch/blackfin/include/asm/processor.h
@@ -7,9 +7,8 @@
7 */ 7 */
8#define current_text_addr() ({ __label__ _l; _l: &&_l;}) 8#define current_text_addr() ({ __label__ _l; _l: &&_l;})
9 9
10#include <asm/ptrace.h>
10#include <asm/blackfin.h> 11#include <asm/blackfin.h>
11#include <asm/segment.h>
12#include <linux/compiler.h>
13 12
14static inline unsigned long rdusp(void) 13static inline unsigned long rdusp(void)
15{ 14{
@@ -59,36 +58,8 @@ struct thread_struct {
59 PS_S, 0, 0 \ 58 PS_S, 0, 0 \
60} 59}
61 60
62/* 61extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
63 * Do necessary setup to start up a newly executed thread. 62 unsigned long new_sp);
64 *
65 * pass the data segment into user programs if it exists,
66 * it can't hurt anything as far as I can tell
67 */
68#ifndef CONFIG_SMP
69#define start_thread(_regs, _pc, _usp) \
70do { \
71 set_fs(USER_DS); \
72 (_regs)->pc = (_pc); \
73 if (current->mm) \
74 (_regs)->p5 = current->mm->start_data; \
75 task_thread_info(current)->l1_task_info.stack_start \
76 = (void *)current->mm->context.stack_start; \
77 task_thread_info(current)->l1_task_info.lowest_sp = (void *)(_usp); \
78 memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info, \
79 sizeof(*L1_SCRATCH_TASK_INFO)); \
80 wrusp(_usp); \
81} while(0)
82#else
83#define start_thread(_regs, _pc, _usp) \
84do { \
85 set_fs(USER_DS); \
86 (_regs)->pc = (_pc); \
87 if (current->mm) \
88 (_regs)->p5 = current->mm->start_data; \
89 wrusp(_usp); \
90} while (0)
91#endif
92 63
93/* Forward declaration, a strange C thing */ 64/* Forward declaration, a strange C thing */
94struct task_struct; 65struct task_struct;
diff --git a/arch/blackfin/include/asm/resource.h b/arch/blackfin/include/asm/resource.h
index 091355ab3495..04bc4db8921b 100644
--- a/arch/blackfin/include/asm/resource.h
+++ b/arch/blackfin/include/asm/resource.h
@@ -1,6 +1 @@
1#ifndef _BFIN_RESOURCE_H
2#define _BFIN_RESOURCE_H
3
4#include <asm-generic/resource.h> #include <asm-generic/resource.h>
5
6#endif /* _BFIN_RESOURCE_H */
diff --git a/arch/blackfin/include/asm/sembuf.h b/arch/blackfin/include/asm/sembuf.h
index 18deb5c7fa5d..7673b83cfef7 100644
--- a/arch/blackfin/include/asm/sembuf.h
+++ b/arch/blackfin/include/asm/sembuf.h
@@ -1,25 +1 @@
1#ifndef _BFIN_SEMBUF_H #include <asm-generic/sembuf.h>
2#define _BFIN_SEMBUF_H
3
4/*
5 * The semid64_ds structure for bfin 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 /* _BFIN_SEMBUF_H */
diff --git a/arch/blackfin/include/asm/serial.h b/arch/blackfin/include/asm/serial.h
index 3a47606c858b..94a4a12e3bf2 100644
--- a/arch/blackfin/include/asm/serial.h
+++ b/arch/blackfin/include/asm/serial.h
@@ -1,6 +1,2 @@
1/* 1#include <asm-generic/serial.h>
2 * include/asm-blackfin/serial.h
3 */
4
5#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH 2#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH
6#define BASE_BAUD (1843200 / 16)
diff --git a/arch/blackfin/include/asm/setup.h b/arch/blackfin/include/asm/setup.h
index 01c8c6cbe6fc..552df83f1a49 100644
--- a/arch/blackfin/include/asm/setup.h
+++ b/arch/blackfin/include/asm/setup.h
@@ -1,17 +1 @@
1/* #include <asm-generic/setup.h>
2** asm/setup.h -- Definition of the Linux/bfin setup 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 Lineo, Inc 2001 Tony Kou
9**
10*/
11
12#ifndef _BFIN_SETUP_H
13#define _BFIN_SETUP_H
14
15#define COMMAND_LINE_SIZE 512
16
17#endif /* _BFIN_SETUP_H */
diff --git a/arch/blackfin/include/asm/shmbuf.h b/arch/blackfin/include/asm/shmbuf.h
index 612436303e89..83c05fc2de38 100644
--- a/arch/blackfin/include/asm/shmbuf.h
+++ b/arch/blackfin/include/asm/shmbuf.h
@@ -1,42 +1 @@
1#ifndef _BFIN_SHMBUF_H #include <asm-generic/shmbuf.h>
2#define _BFIN_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for bfin 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 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 /* _BFIN_SHMBUF_H */
diff --git a/arch/blackfin/include/asm/shmparam.h b/arch/blackfin/include/asm/shmparam.h
index 3c03906b7664..93f30deb95d0 100644
--- a/arch/blackfin/include/asm/shmparam.h
+++ b/arch/blackfin/include/asm/shmparam.h
@@ -1,6 +1 @@
1#ifndef _BFIN_SHMPARAM_H #include <asm-generic/shmparam.h>
2#define _BFIN_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _BFIN_SHMPARAM_H */
diff --git a/arch/blackfin/include/asm/signal.h b/arch/blackfin/include/asm/signal.h
index 2eea90794454..77a3bf37b69d 100644
--- a/arch/blackfin/include/asm/signal.h
+++ b/arch/blackfin/include/asm/signal.h
@@ -1,160 +1,7 @@
1#ifndef _BLACKFIN_SIGNAL_H 1#ifndef _BLACKFIN_SIGNAL_H
2#define _BLACKFIN_SIGNAL_H 2#define _BLACKFIN_SIGNAL_H
3 3
4#include <linux/types.h> 4#define SA_RESTORER 0x04000000
5#include <asm-generic/signal.h>
5 6
6/* Avoid too many header ordering problems. */ 7#endif
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_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered.
81 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
82 * SA_NODEFER prevents the current signal from being masked in the handler.
83 *
84 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
85 * Unix names RESETHAND and NODEFER respectively.
86 */
87#define SA_NOCLDSTOP 0x00000001
88#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
89#define SA_SIGINFO 0x00000004
90#define SA_ONSTACK 0x08000000
91#define SA_RESTART 0x10000000
92#define SA_NODEFER 0x40000000
93#define SA_RESETHAND 0x80000000
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98/*
99 * sigaltstack controls
100 */
101#define SS_ONSTACK 1
102#define SS_DISABLE 2
103
104#define MINSIGSTKSZ 2048
105#define SIGSTKSZ 8192
106
107#include <asm-generic/signal-defs.h>
108
109#ifdef __KERNEL__
110struct old_sigaction {
111 __sighandler_t sa_handler;
112 old_sigset_t sa_mask;
113 unsigned long sa_flags;
114 void (*sa_restorer) (void);
115};
116
117struct sigaction {
118 __sighandler_t sa_handler;
119 unsigned long sa_flags;
120 void (*sa_restorer) (void);
121 sigset_t sa_mask; /* mask last for extensibility */
122};
123
124struct k_sigaction {
125 struct sigaction sa;
126};
127#else
128/* Here we must cater to libcs that poke about in kernel headers. */
129
130struct sigaction {
131 union {
132 __sighandler_t _sa_handler;
133 void (*_sa_sigaction) (int, struct siginfo *, void *);
134 } _u;
135 sigset_t sa_mask;
136 unsigned long sa_flags;
137 void (*sa_restorer) (void);
138};
139
140#define sa_handler _u._sa_handler
141#define sa_sigaction _u._sa_sigaction
142
143#endif /* __KERNEL__ */
144
145typedef struct sigaltstack {
146 void __user *ss_sp;
147 int ss_flags;
148 size_t ss_size;
149} stack_t;
150
151#ifdef __KERNEL__
152
153#include <asm/sigcontext.h>
154#undef __HAVE_ARCH_SIG_BITOPS
155
156#define ptrace_signal_deliver(regs, cookie) do { } while (0)
157
158#endif /* __KERNEL__ */
159
160#endif /* _BLACKFIN_SIGNAL_H */
diff --git a/arch/blackfin/include/asm/socket.h b/arch/blackfin/include/asm/socket.h
index fac7fe9e1f8a..6b71384b9d8b 100644
--- a/arch/blackfin/include/asm/socket.h
+++ b/arch/blackfin/include/asm/socket.h
@@ -1,59 +1 @@
1#ifndef _ASM_SOCKET_H #include <asm-generic/socket.h>
2#define _ASM_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockoptions(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#define SO_PEERSEC 31
50#define SO_PASSSEC 34
51#define SO_TIMESTAMPNS 35
52#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
53
54#define SO_MARK 36
55
56#define SO_TIMESTAMPING 37
57#define SCM_TIMESTAMPING SO_TIMESTAMPING
58
59#endif /* _ASM_SOCKET_H */
diff --git a/arch/blackfin/include/asm/sockios.h b/arch/blackfin/include/asm/sockios.h
index 426b89bfaa8b..def6d4746ee7 100644
--- a/arch/blackfin/include/asm/sockios.h
+++ b/arch/blackfin/include/asm/sockios.h
@@ -1,13 +1 @@
1#ifndef __ARCH_BFIN_SOCKIOS__ #include <asm-generic/sockios.h>
2#define __ARCH_BFIN_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 /* __ARCH_BFIN_SOCKIOS__ */
diff --git a/arch/blackfin/include/asm/spinlock.h b/arch/blackfin/include/asm/spinlock.h
index 0249ac319476..d6ff4b59fcb1 100644
--- a/arch/blackfin/include/asm/spinlock.h
+++ b/arch/blackfin/include/asm/spinlock.h
@@ -1,6 +1,10 @@
1#ifndef __BFIN_SPINLOCK_H 1#ifndef __BFIN_SPINLOCK_H
2#define __BFIN_SPINLOCK_H 2#define __BFIN_SPINLOCK_H
3 3
4#ifndef CONFIG_SMP
5# include <asm-generic/spinlock.h>
6#else
7
4#include <asm/atomic.h> 8#include <asm/atomic.h>
5 9
6asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); 10asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr);
@@ -86,4 +90,6 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
86#define _raw_read_relax(lock) cpu_relax() 90#define _raw_read_relax(lock) cpu_relax()
87#define _raw_write_relax(lock) cpu_relax() 91#define _raw_write_relax(lock) cpu_relax()
88 92
93#endif
94
89#endif /* !__BFIN_SPINLOCK_H */ 95#endif /* !__BFIN_SPINLOCK_H */
diff --git a/arch/blackfin/include/asm/statfs.h b/arch/blackfin/include/asm/statfs.h
index 350672091ba3..0b91fe198c20 100644
--- a/arch/blackfin/include/asm/statfs.h
+++ b/arch/blackfin/include/asm/statfs.h
@@ -1,6 +1 @@
1#ifndef _BFIN_STATFS_H
2#define _BFIN_STATFS_H
3
4#include <asm-generic/statfs.h> #include <asm-generic/statfs.h>
5
6#endif /* _BFIN_STATFS_H */
diff --git a/arch/blackfin/include/asm/swab.h b/arch/blackfin/include/asm/swab.h
index 6403ad2932eb..d442113de515 100644
--- a/arch/blackfin/include/asm/swab.h
+++ b/arch/blackfin/include/asm/swab.h
@@ -2,11 +2,7 @@
2#define _BLACKFIN_SWAB_H 2#define _BLACKFIN_SWAB_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/compiler.h> 5#include <asm-generic/swab.h>
6
7#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
8# define __SWAB_64_THRU_32__
9#endif
10 6
11#ifdef __GNUC__ 7#ifdef __GNUC__
12 8
diff --git a/arch/blackfin/include/asm/termbits.h b/arch/blackfin/include/asm/termbits.h
index f37feb7cf895..3935b106de79 100644
--- a/arch/blackfin/include/asm/termbits.h
+++ b/arch/blackfin/include/asm/termbits.h
@@ -1,198 +1 @@
1#ifndef __ARCH_BFIN_TERMBITS_H__ #include <asm-generic/termbits.h>
2#define __ARCH_BFIN_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
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 /* __ARCH_BFIN_TERMBITS_H__ */
diff --git a/arch/blackfin/include/asm/termios.h b/arch/blackfin/include/asm/termios.h
index d50d063c605a..280d78a9d966 100644
--- a/arch/blackfin/include/asm/termios.h
+++ b/arch/blackfin/include/asm/termios.h
@@ -1,94 +1 @@
1#ifndef __BFIN_TERMIOS_H__ #include <asm-generic/termios.h>
2#define __BFIN_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) \
84 copy_from_user(k, u, sizeof(struct termios2))
85#define kernel_termios_to_user_termios(u, k) \
86 copy_to_user(u, k, sizeof(struct termios2))
87#define user_termios_to_kernel_termios_1(k, u) \
88 copy_from_user(k, u, sizeof(struct termios))
89#define kernel_termios_to_user_termios_1(u, k) \
90 copy_to_user(u, k, sizeof(struct termios))
91
92#endif /* __KERNEL__ */
93
94#endif /* __BFIN_TERMIOS_H__ */
diff --git a/arch/blackfin/include/asm/tlbflush.h b/arch/blackfin/include/asm/tlbflush.h
index 277b400924b8..f1a06c006ed0 100644
--- a/arch/blackfin/include/asm/tlbflush.h
+++ b/arch/blackfin/include/asm/tlbflush.h
@@ -1,56 +1 @@
1#ifndef _BLACKFIN_TLBFLUSH_H #include <asm-generic/tlbflush.h>
2#define _BLACKFIN_TLBFLUSH_H
3
4/*
5 * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org>
6 * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com>
7 */
8
9#include <asm/setup.h>
10
11/*
12 * flush all user-space atc entries.
13 */
14static inline void __flush_tlb(void)
15{
16 BUG();
17}
18
19static inline void __flush_tlb_one(unsigned long addr)
20{
21 BUG();
22}
23
24#define flush_tlb() __flush_tlb()
25
26/*
27 * flush all atc entries (both kernel and user-space entries).
28 */
29static inline void flush_tlb_all(void)
30{
31 BUG();
32}
33
34static inline void flush_tlb_mm(struct mm_struct *mm)
35{
36 BUG();
37}
38
39static inline void flush_tlb_page(struct vm_area_struct *vma,
40 unsigned long addr)
41{
42 BUG();
43}
44
45static inline void flush_tlb_range(struct mm_struct *mm,
46 unsigned long start, unsigned long end)
47{
48 BUG();
49}
50
51static inline void flush_tlb_kernel_page(unsigned long addr)
52{
53 BUG();
54}
55
56#endif
diff --git a/arch/blackfin/include/asm/topology.h b/arch/blackfin/include/asm/topology.h
index acee23987897..5428f333a02c 100644
--- a/arch/blackfin/include/asm/topology.h
+++ b/arch/blackfin/include/asm/topology.h
@@ -1,6 +1 @@
1#ifndef _ASM_BLACKFIN_TOPOLOGY_H
2#define _ASM_BLACKFIN_TOPOLOGY_H
3
4#include <asm-generic/topology.h> #include <asm-generic/topology.h>
5
6#endif /* _ASM_BLACKFIN_TOPOLOGY_H */
diff --git a/arch/blackfin/include/asm/types.h b/arch/blackfin/include/asm/types.h
index 8441cbc2bf9e..b9e79bc580dd 100644
--- a/arch/blackfin/include/asm/types.h
+++ b/arch/blackfin/include/asm/types.h
@@ -1,36 +1 @@
1#ifndef _BFIN_TYPES_H #include <asm-generic/types.h>
2#define _BFIN_TYPES_H
3
4/*
5 * This file is never included by application software unless
6 * explicitly requested (e.g., via linux/types.h) in which case the
7 * application is Linux specific so (user-) name space pollution is
8 * not a major issue. However, for interoperability, libraries still
9 * need to be careful to avoid a name clashes.
10 */
11#include <asm-generic/int-ll64.h>
12
13#ifndef __ASSEMBLY__
14
15typedef unsigned short umode_t;
16
17#endif /* __ASSEMBLY__ */
18/*
19 * These aren't exported outside the kernel to avoid name space clashes
20 */
21#ifdef __KERNEL__
22
23#define BITS_PER_LONG 32
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 /* _BFIN_TYPES_H */
diff --git a/arch/blackfin/include/asm/ucontext.h b/arch/blackfin/include/asm/ucontext.h
index 4a4e3856beba..9bc07b9f30fb 100644
--- a/arch/blackfin/include/asm/ucontext.h
+++ b/arch/blackfin/include/asm/ucontext.h
@@ -1,17 +1 @@
1/** Changes made by Tony Kou Lineo Inc. May 2001 #include <asm-generic/ucontext.h>
2 *
3 * Based on: include/m68knommu/ucontext.h
4 */
5
6#ifndef _BLACKFIN_UCONTEXT_H
7#define _BLACKFIN_UCONTEXT_H
8
9struct ucontext {
10 unsigned long uc_flags; /* the others are necessary */
11 struct ucontext *uc_link;
12 stack_t uc_stack;
13 struct sigcontext uc_mcontext;
14 sigset_t uc_sigmask; /* mask last for extensibility */
15};
16
17#endif /* _BLACKFIN_UCONTEXT_H */
diff --git a/arch/blackfin/include/asm/unaligned.h b/arch/blackfin/include/asm/unaligned.h
index fd8a1d634945..6cecbbb2111f 100644
--- a/arch/blackfin/include/asm/unaligned.h
+++ b/arch/blackfin/include/asm/unaligned.h
@@ -1,11 +1 @@
1#ifndef _ASM_BLACKFIN_UNALIGNED_H #include <asm-generic/unaligned.h>
2#define _ASM_BLACKFIN_UNALIGNED_H
3
4#include <linux/unaligned/le_struct.h>
5#include <linux/unaligned/be_byteshift.h>
6#include <linux/unaligned/generic.h>
7
8#define get_unaligned __get_unaligned_le
9#define put_unaligned __put_unaligned_le
10
11#endif /* _ASM_BLACKFIN_UNALIGNED_H */
diff --git a/arch/blackfin/include/asm/user.h b/arch/blackfin/include/asm/user.h
index afe6a0e1f7ce..4792a60831e4 100644
--- a/arch/blackfin/include/asm/user.h
+++ b/arch/blackfin/include/asm/user.h
@@ -1,89 +1 @@
1#ifndef _BFIN_USER_H #include <asm-generic/user.h>
2#define _BFIN_USER_H
3
4/* Changes by Tony Kou Lineo, Inc. July, 2001
5 *
6 * Based include/asm-m68knommu/user.h
7 *
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). There are quite a number of
13 obstacles to being able to view the contents of the floating point
14 registers, and until these are solved you will not be able to view the
15 contents of them. Actually, you can read in the core file and look at
16 the contents of the user struct to find out what the floating point
17 registers contain.
18 The actual file contents are as follows:
19 UPAGE: 1 page consisting of a user struct that tells gdb what is present
20 in the file. Directly after this is a copy of the task_struct, which
21 is currently not used by gdb, but it may come in useful at some point.
22 All of the registers are stored as part of the upage. The upage should
23 always be only one page.
24 DATA: The data area is stored. We use current->end_text to
25 current->brk to pick up all of the user variables, plus any memory
26 that may have been malloced. No attempt is made to determine if a page
27 is demand-zero or if a page is totally unused, we just cover the entire
28 range. All of the addresses are rounded in such a way that an integral
29 number of pages is written.
30 STACK: We need the stack information in order to get a meaningful
31 backtrace. We need to write the data from (esp) to
32 current->start_stack, so we round each of these off in order to be able
33 to write an integer number of pages.
34 The minimum core file size is 3 pages, or 12288 bytes.
35*/
36struct user_bfinfp_struct {
37};
38
39/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
40 is still the layout used by user (the new pt_regs doesn't have
41 all registers). */
42struct user_regs_struct {
43 long r0, r1, r2, r3, r4, r5, r6, r7;
44 long p0, p1, p2, p3, p4, p5, usp, fp;
45 long i0, i1, i2, i3;
46 long l0, l1, l2, l3;
47 long b0, b1, b2, b3;
48 long m0, m1, m2, m3;
49 long a0w, a1w;
50 long a0x, a1x;
51 unsigned long rets;
52 unsigned long astat;
53 unsigned long pc;
54 unsigned long orig_p0;
55};
56
57/* When the kernel dumps core, it starts by dumping the user struct -
58 this will be used by gdb to figure out where the data and stack segments
59 are within the file, and what virtual addresses to use. */
60
61struct user {
62/* We start with the registers, to mimic the way that "memory" is returned
63 from the ptrace(3,...) function. */
64
65 struct user_regs_struct regs; /* Where the registers are actually stored */
66
67/* The rest of this junk is to help gdb figure out what goes where */
68 unsigned long int u_tsize; /* Text segment size (pages). */
69 unsigned long int u_dsize; /* Data segment size (pages). */
70 unsigned long int u_ssize; /* Stack segment size (pages). */
71 unsigned long start_code; /* Starting virtual address of text. */
72 unsigned long start_stack; /* Starting virtual address of stack area.
73 This is actually the bottom of the stack,
74 the top of the stack is always found in the
75 esp register. */
76 long int signal; /* Signal that caused the core dump. */
77 int reserved; /* No longer used */
78 unsigned long u_ar0;
79 /* Used by gdb to help find the values for */
80 /* the registers. */
81 unsigned long magic; /* To uniquely identify a core file */
82 char u_comm[32]; /* User command that was responsible */
83};
84#define NBPG PAGE_SIZE
85#define UPAGES 1
86#define HOST_TEXT_START_ADDR (u.start_code)
87#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
88
89#endif
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c
index aa05e638fb7c..ed8392c117ea 100644
--- a/arch/blackfin/kernel/bfin_ksyms.c
+++ b/arch/blackfin/kernel/bfin_ksyms.c
@@ -10,6 +10,7 @@
10#include <linux/uaccess.h> 10#include <linux/uaccess.h>
11 11
12#include <asm/cacheflush.h> 12#include <asm/cacheflush.h>
13#include <asm/io.h>
13 14
14/* Allow people to have their own Blackfin exception handler in a module */ 15/* Allow people to have their own Blackfin exception handler in a module */
15EXPORT_SYMBOL(bfin_return_from_exception); 16EXPORT_SYMBOL(bfin_return_from_exception);
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 30d0843ed701..3e1d86e456f6 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -160,6 +160,29 @@ pid_t kernel_thread(int (*fn) (void *), void *arg, unsigned long flags)
160} 160}
161EXPORT_SYMBOL(kernel_thread); 161EXPORT_SYMBOL(kernel_thread);
162 162
163/*
164 * Do necessary setup to start up a newly executed thread.
165 *
166 * pass the data segment into user programs if it exists,
167 * it can't hurt anything as far as I can tell
168 */
169void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
170{
171 set_fs(USER_DS);
172 regs->pc = new_ip;
173 if (current->mm)
174 regs->p5 = current->mm->start_data;
175#ifdef CONFIG_SMP
176 task_thread_info(current)->l1_task_info.stack_start =
177 (void *)current->mm->context.stack_start;
178 task_thread_info(current)->l1_task_info.lowest_sp = (void *)new_sp;
179 memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info,
180 sizeof(*L1_SCRATCH_TASK_INFO));
181#endif
182 wrusp(new_sp);
183}
184EXPORT_SYMBOL_GPL(start_thread);
185
163void flush_thread(void) 186void flush_thread(void)
164{ 187{
165} 188}
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index 1f3228ed713f..dd8b2dc97f56 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -4,7 +4,7 @@
4 4
5obj-y := \ 5obj-y := \
6 cache.o cache-c.o entry.o head.o \ 6 cache.o cache-c.o entry.o head.o \
7 interrupt.o irqpanic.o arch_checks.o ints-priority.o 7 interrupt.o arch_checks.o ints-priority.o
8 8
9obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o 9obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o
10obj-$(CONFIG_PM) += pm.o dpmc_modes.o 10obj-$(CONFIG_PM) += pm.o dpmc_modes.o
@@ -12,3 +12,4 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq.o
12obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o 12obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o
13obj-$(CONFIG_SMP) += smp.o 13obj-$(CONFIG_SMP) += smp.o
14obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o 14obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o
15obj-$(CONFIG_DEBUG_ICACHE_CHECK) += irqpanic.o
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 351afd0e36d8..af70f09acd55 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -472,7 +472,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
472 472
473 if (type == IRQ_TYPE_PROBE) { 473 if (type == IRQ_TYPE_PROBE) {
474 /* only probe unenabled GPIO interrupt lines */ 474 /* only probe unenabled GPIO interrupt lines */
475 if (__test_bit(gpionr, gpio_enabled)) 475 if (test_bit(gpionr, gpio_enabled))
476 return 0; 476 return 0;
477 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; 477 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
478 } 478 }
@@ -782,7 +782,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
782 782
783 if (type == IRQ_TYPE_PROBE) { 783 if (type == IRQ_TYPE_PROBE) {
784 /* only probe unenabled GPIO interrupt lines */ 784 /* only probe unenabled GPIO interrupt lines */
785 if (__test_bit(gpionr, gpio_enabled)) 785 if (test_bit(gpionr, gpio_enabled))
786 return 0; 786 return 0;
787 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; 787 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
788 } 788 }
diff --git a/arch/blackfin/mach-common/irqpanic.c b/arch/blackfin/mach-common/irqpanic.c
index 05004df0f78b..883e3241b17e 100644
--- a/arch/blackfin/mach-common/irqpanic.c
+++ b/arch/blackfin/mach-common/irqpanic.c
@@ -30,21 +30,17 @@
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/kernel_stat.h> 31#include <linux/kernel_stat.h>
32#include <linux/sched.h> 32#include <linux/sched.h>
33#include <asm/traps.h>
34#include <asm/blackfin.h> 33#include <asm/blackfin.h>
35 34
36#ifdef CONFIG_DEBUG_ICACHE_CHECK
37#define L1_ICACHE_START 0xffa10000 35#define L1_ICACHE_START 0xffa10000
38#define L1_ICACHE_END 0xffa13fff 36#define L1_ICACHE_END 0xffa13fff
39void irq_panic(int reason, struct pt_regs *regs) __attribute__ ((l1_text));
40#endif
41 37
42/* 38/*
43 * irq_panic - calls panic with string setup 39 * irq_panic - calls panic with string setup
44 */ 40 */
41__attribute__ ((l1_text))
45asmlinkage void irq_panic(int reason, struct pt_regs *regs) 42asmlinkage void irq_panic(int reason, struct pt_regs *regs)
46{ 43{
47#ifdef CONFIG_DEBUG_ICACHE_CHECK
48 unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa; 44 unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa;
49 unsigned short i, j, die; 45 unsigned short i, j, die;
50 unsigned int bad[10][6]; 46 unsigned int bad[10][6];
@@ -126,9 +122,6 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs)
126 bad[j][3], bad[j][4], bad[j][5]); 122 bad[j][3], bad[j][4], bad[j][5]);
127 } 123 }
128 panic("icache coherency error"); 124 panic("icache coherency error");
129 } else { 125 } else
130 printk(KERN_EMERG "icache checked, and OK\n"); 126 printk(KERN_EMERG "icache checked, and OK\n");
131 }
132#endif
133
134} 127}
diff --git a/arch/h8300/kernel/asm-offsets.c b/arch/h8300/kernel/asm-offsets.c
index 2042552e0871..fd961e0bd741 100644
--- a/arch/h8300/kernel/asm-offsets.c
+++ b/arch/h8300/kernel/asm-offsets.c
@@ -55,7 +55,6 @@ int main(void)
55 DEFINE(LRET, offsetof(struct pt_regs, pc) - sizeof(long)); 55 DEFINE(LRET, offsetof(struct pt_regs, pc) - sizeof(long));
56 56
57 DEFINE(PT_PTRACED, PT_PTRACED); 57 DEFINE(PT_PTRACED, PT_PTRACED);
58 DEFINE(PT_DTRACE, PT_DTRACE);
59 58
60 return 0; 59 return 0;
61} 60}
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 294a3b13ecac..170042b420d4 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -28,6 +28,7 @@ config IA64
28 select HAVE_DMA_ATTRS 28 select HAVE_DMA_ATTRS
29 select HAVE_KVM 29 select HAVE_KVM
30 select HAVE_ARCH_TRACEHOOK 30 select HAVE_ARCH_TRACEHOOK
31 select HAVE_DMA_API_DEBUG
31 default y 32 default y
32 help 33 help
33 The Itanium Processor Family is Intel's 64-bit successor to 34 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 36c0009dbece..5a61b5c2e18f 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -8,6 +8,7 @@
8#include <asm/machvec.h> 8#include <asm/machvec.h>
9#include <linux/scatterlist.h> 9#include <linux/scatterlist.h>
10#include <asm/swiotlb.h> 10#include <asm/swiotlb.h>
11#include <linux/dma-debug.h>
11 12
12#define ARCH_HAS_DMA_GET_REQUIRED_MASK 13#define ARCH_HAS_DMA_GET_REQUIRED_MASK
13 14
@@ -24,95 +25,28 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
24 dma_addr_t *daddr, gfp_t gfp) 25 dma_addr_t *daddr, gfp_t gfp)
25{ 26{
26 struct dma_map_ops *ops = platform_dma_get_ops(dev); 27 struct dma_map_ops *ops = platform_dma_get_ops(dev);
27 return ops->alloc_coherent(dev, size, daddr, gfp); 28 void *caddr;
29
30 caddr = ops->alloc_coherent(dev, size, daddr, gfp);
31 debug_dma_alloc_coherent(dev, size, *daddr, caddr);
32 return caddr;
28} 33}
29 34
30static inline void dma_free_coherent(struct device *dev, size_t size, 35static inline void dma_free_coherent(struct device *dev, size_t size,
31 void *caddr, dma_addr_t daddr) 36 void *caddr, dma_addr_t daddr)
32{ 37{
33 struct dma_map_ops *ops = platform_dma_get_ops(dev); 38 struct dma_map_ops *ops = platform_dma_get_ops(dev);
39 debug_dma_free_coherent(dev, size, caddr, daddr);
34 ops->free_coherent(dev, size, caddr, daddr); 40 ops->free_coherent(dev, size, caddr, daddr);
35} 41}
36 42
37#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 43#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
38#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 44#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
39 45
40static inline dma_addr_t dma_map_single_attrs(struct device *dev, 46#define get_dma_ops(dev) platform_dma_get_ops(dev)
41 void *caddr, size_t size, 47#define flush_write_buffers()
42 enum dma_data_direction dir,
43 struct dma_attrs *attrs)
44{
45 struct dma_map_ops *ops = platform_dma_get_ops(dev);
46 return ops->map_page(dev, virt_to_page(caddr),
47 (unsigned long)caddr & ~PAGE_MASK, size,
48 dir, attrs);
49}
50
51static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t daddr,
52 size_t size,
53 enum dma_data_direction dir,
54 struct dma_attrs *attrs)
55{
56 struct dma_map_ops *ops = platform_dma_get_ops(dev);
57 ops->unmap_page(dev, daddr, size, dir, attrs);
58}
59
60#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
61#define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL)
62
63static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl,
64 int nents, enum dma_data_direction dir,
65 struct dma_attrs *attrs)
66{
67 struct dma_map_ops *ops = platform_dma_get_ops(dev);
68 return ops->map_sg(dev, sgl, nents, dir, attrs);
69}
70
71static inline void dma_unmap_sg_attrs(struct device *dev,
72 struct scatterlist *sgl, int nents,
73 enum dma_data_direction dir,
74 struct dma_attrs *attrs)
75{
76 struct dma_map_ops *ops = platform_dma_get_ops(dev);
77 ops->unmap_sg(dev, sgl, nents, dir, attrs);
78}
79
80#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
81#define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
82
83static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t daddr,
84 size_t size,
85 enum dma_data_direction dir)
86{
87 struct dma_map_ops *ops = platform_dma_get_ops(dev);
88 ops->sync_single_for_cpu(dev, daddr, size, dir);
89}
90
91static inline void dma_sync_sg_for_cpu(struct device *dev,
92 struct scatterlist *sgl,
93 int nents, enum dma_data_direction dir)
94{
95 struct dma_map_ops *ops = platform_dma_get_ops(dev);
96 ops->sync_sg_for_cpu(dev, sgl, nents, dir);
97}
98 48
99static inline void dma_sync_single_for_device(struct device *dev, 49#include <asm-generic/dma-mapping-common.h>
100 dma_addr_t daddr,
101 size_t size,
102 enum dma_data_direction dir)
103{
104 struct dma_map_ops *ops = platform_dma_get_ops(dev);
105 ops->sync_single_for_device(dev, daddr, size, dir);
106}
107
108static inline void dma_sync_sg_for_device(struct device *dev,
109 struct scatterlist *sgl,
110 int nents,
111 enum dma_data_direction dir)
112{
113 struct dma_map_ops *ops = platform_dma_get_ops(dev);
114 ops->sync_sg_for_device(dev, sgl, nents, dir);
115}
116 50
117static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr) 51static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
118{ 52{
@@ -120,30 +54,6 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
120 return ops->mapping_error(dev, daddr); 54 return ops->mapping_error(dev, daddr);
121} 55}
122 56
123static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
124 size_t offset, size_t size,
125 enum dma_data_direction dir)
126{
127 struct dma_map_ops *ops = platform_dma_get_ops(dev);
128 return ops->map_page(dev, page, offset, size, dir, NULL);
129}
130
131static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
132 size_t size, enum dma_data_direction dir)
133{
134 dma_unmap_single(dev, addr, size, dir);
135}
136
137/*
138 * Rest of this file is part of the "Advanced DMA API". Use at your own risk.
139 * See Documentation/DMA-API.txt for details.
140 */
141
142#define dma_sync_single_range_for_cpu(dev, dma_handle, offset, size, dir) \
143 dma_sync_single_for_cpu(dev, dma_handle, size, dir)
144#define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \
145 dma_sync_single_for_device(dev, dma_handle, size, dir)
146
147static inline int dma_supported(struct device *dev, u64 mask) 57static inline int dma_supported(struct device *dev, u64 mask)
148{ 58{
149 struct dma_map_ops *ops = platform_dma_get_ops(dev); 59 struct dma_map_ops *ops = platform_dma_get_ops(dev);
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 3e876f0baebc..67a01e1e4283 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -302,11 +302,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
302 goto out; 302 goto out;
303 303
304 error = do_execve(filename, uargv, uenvp, &regs); 304 error = do_execve(filename, uargv, uenvp, &regs);
305 if (error == 0) {
306 task_lock(current);
307 current->ptrace &= ~PT_DTRACE;
308 task_unlock(current);
309 }
310 putname(filename); 305 putname(filename);
311out: 306out:
312 return error; 307 return error;
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 9aa615d3a5b2..bf0abe9e1f73 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -676,10 +676,6 @@ arch_ptrace(struct task_struct *child, long request, long addr, long data)
676 if (!valid_signal(data)) 676 if (!valid_signal(data))
677 break; 677 break;
678 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 678 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
679 if ((child->ptrace & PT_DTRACE) == 0) {
680 /* Spurious delayed TF traps may occur */
681 child->ptrace |= PT_DTRACE;
682 }
683 679
684 /* Compute next pc. */ 680 /* Compute next pc. */
685 pc = get_stack_long(child, PT_BPC); 681 pc = get_stack_long(child, PT_BPC);
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index 184acc90808d..aacd6d17b833 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -1057,7 +1057,6 @@ asmlinkage void trap_c(struct frame *fp)
1057 if (fp->ptregs.sr & PS_S) { 1057 if (fp->ptregs.sr & PS_S) {
1058 if ((fp->ptregs.vector >> 2) == VEC_TRACE) { 1058 if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
1059 /* traced a trapping instruction */ 1059 /* traced a trapping instruction */
1060 current->ptrace |= PT_DTRACE;
1061 } else 1060 } else
1062 bad_super_trap(fp); 1061 bad_super_trap(fp);
1063 return; 1062 return;
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index f500dd6935d6..594ee0e657fe 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -73,7 +73,6 @@ int main(void)
73 DEFINE(TRAP_TRACE, TRAP_TRACE); 73 DEFINE(TRAP_TRACE, TRAP_TRACE);
74 74
75 DEFINE(PT_PTRACED, PT_PTRACED); 75 DEFINE(PT_PTRACED, PT_PTRACED);
76 DEFINE(PT_DTRACE, PT_DTRACE);
77 76
78 DEFINE(THREAD_SIZE, THREAD_SIZE); 77 DEFINE(THREAD_SIZE, THREAD_SIZE);
79 78
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 5d5d56bcd0ef..51d325343ab5 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -200,7 +200,6 @@ asmlinkage void trap_c(struct frame *fp)
200 if (fp->ptregs.sr & PS_S) { 200 if (fp->ptregs.sr & PS_S) {
201 if ((fp->ptregs.vector >> 2) == VEC_TRACE) { 201 if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
202 /* traced a trapping instruction */ 202 /* traced a trapping instruction */
203 current->ptrace |= PT_DTRACE;
204 } else 203 } else
205 bad_super_trap(fp); 204 bad_super_trap(fp);
206 return; 205 return;
diff --git a/arch/mn10300/include/asm/elf.h b/arch/mn10300/include/asm/elf.h
index 49105462e6fc..75a70aa9fd6f 100644
--- a/arch/mn10300/include/asm/elf.h
+++ b/arch/mn10300/include/asm/elf.h
@@ -28,6 +28,8 @@
28#define R_MN10300_PCREL8 6 /* PC-relative 8-bit signed. */ 28#define R_MN10300_PCREL8 6 /* PC-relative 8-bit signed. */
29#define R_MN10300_24 9 /* Direct 24 bit. */ 29#define R_MN10300_24 9 /* Direct 24 bit. */
30#define R_MN10300_RELATIVE 23 /* Adjust by program base. */ 30#define R_MN10300_RELATIVE 23 /* Adjust by program base. */
31#define R_MN10300_SYM_DIFF 33 /* Adjustment when relaxing. */
32#define R_MN10300_ALIGN 34 /* Alignment requirement. */
31 33
32/* 34/*
33 * ELF register definitions.. 35 * ELF register definitions..
diff --git a/arch/mn10300/kernel/module.c b/arch/mn10300/kernel/module.c
index 4fa0e3648d8e..6aea7fd76993 100644
--- a/arch/mn10300/kernel/module.c
+++ b/arch/mn10300/kernel/module.c
@@ -1,6 +1,6 @@
1/* MN10300 Kernel module helper routines 1/* MN10300 Kernel module helper routines
2 * 2 *
3 * Copyright (C) 2007, 2008 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2007, 2008, 2009 Red Hat, Inc. All Rights Reserved.
4 * Written by Mark Salter (msalter@redhat.com) 4 * Written by Mark Salter (msalter@redhat.com)
5 * - Derived from arch/i386/kernel/module.c 5 * - Derived from arch/i386/kernel/module.c
6 * 6 *
@@ -103,10 +103,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
103 unsigned int relsec, 103 unsigned int relsec,
104 struct module *me) 104 struct module *me)
105{ 105{
106 unsigned int i; 106 unsigned int i, sym_diff_seen = 0;
107 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; 107 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
108 Elf32_Sym *sym; 108 Elf32_Sym *sym;
109 Elf32_Addr relocation; 109 Elf32_Addr relocation, sym_diff_val = 0;
110 uint8_t *location; 110 uint8_t *location;
111 uint32_t value; 111 uint32_t value;
112 112
@@ -126,6 +126,22 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
126 /* this is the adjustment to be made */ 126 /* this is the adjustment to be made */
127 relocation = sym->st_value + rel[i].r_addend; 127 relocation = sym->st_value + rel[i].r_addend;
128 128
129 if (sym_diff_seen) {
130 switch (ELF32_R_TYPE(rel[i].r_info)) {
131 case R_MN10300_32:
132 case R_MN10300_24:
133 case R_MN10300_16:
134 case R_MN10300_8:
135 relocation -= sym_diff_val;
136 sym_diff_seen = 0;
137 break;
138 default:
139 printk(KERN_ERR "module %s: Unexpected SYM_DIFF relocation: %u\n",
140 me->name, ELF32_R_TYPE(rel[i].r_info));
141 return -ENOEXEC;
142 }
143 }
144
129 switch (ELF32_R_TYPE(rel[i].r_info)) { 145 switch (ELF32_R_TYPE(rel[i].r_info)) {
130 /* for the first four relocation types, we simply 146 /* for the first four relocation types, we simply
131 * store the adjustment at the location given */ 147 * store the adjustment at the location given */
@@ -157,12 +173,29 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
157 *location = relocation - (uint32_t) location; 173 *location = relocation - (uint32_t) location;
158 break; 174 break;
159 175
176 case R_MN10300_SYM_DIFF:
177 /* This is used to adjust the next reloc as required
178 * by relaxation. */
179 sym_diff_seen = 1;
180 sym_diff_val = sym->st_value;
181 break;
182
183 case R_MN10300_ALIGN:
184 /* Just ignore the ALIGN relocs.
185 * Only interesting if kernel performed relaxation. */
186 continue;
187
160 default: 188 default:
161 printk(KERN_ERR "module %s: Unknown relocation: %u\n", 189 printk(KERN_ERR "module %s: Unknown relocation: %u\n",
162 me->name, ELF32_R_TYPE(rel[i].r_info)); 190 me->name, ELF32_R_TYPE(rel[i].r_info));
163 return -ENOEXEC; 191 return -ENOEXEC;
164 } 192 }
165 } 193 }
194 if (sym_diff_seen) {
195 printk(KERN_ERR "module %s: Nothing follows SYM_DIFF relocation: %u\n",
196 me->name, ELF32_R_TYPE(rel[i].r_info));
197 return -ENOEXEC;
198 }
166 return 0; 199 return 0;
167} 200}
168 201
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 234cf344cdce..892cce82867e 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -281,9 +281,6 @@ asmlinkage long sys_execve(char __user *name,
281 error = PTR_ERR(filename); 281 error = PTR_ERR(filename);
282 if (!IS_ERR(filename)) { 282 if (!IS_ERR(filename)) {
283 error = do_execve(filename, argv, envp, __frame); 283 error = do_execve(filename, argv, envp, __frame);
284 if (error == 0)
285 current->ptrace &= ~PT_DTRACE;
286
287 putname(filename); 284 putname(filename);
288 } 285 }
289 286
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index 5cbe9f9e5d9e..54075360a8fd 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -44,11 +44,6 @@ int hpux_execve(struct pt_regs *regs)
44 error = do_execve(filename, (char __user * __user *) regs->gr[25], 44 error = do_execve(filename, (char __user * __user *) regs->gr[25],
45 (char __user * __user *) regs->gr[24], regs); 45 (char __user * __user *) regs->gr[24], regs);
46 46
47 if (error == 0) {
48 task_lock(current);
49 current->ptrace &= ~PT_DTRACE;
50 task_unlock(current);
51 }
52 putname(filename); 47 putname(filename);
53 48
54out: 49out:
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 6f69101f90bb..61c07078c072 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -349,11 +349,6 @@ asmlinkage int sys_execve(struct pt_regs *regs)
349 goto out; 349 goto out;
350 error = do_execve(filename, (char __user * __user *) regs->gr[25], 350 error = do_execve(filename, (char __user * __user *) regs->gr[25],
351 (char __user * __user *) regs->gr[24], regs); 351 (char __user * __user *) regs->gr[24], regs);
352 if (error == 0) {
353 task_lock(current);
354 current->ptrace &= ~PT_DTRACE;
355 task_unlock(current);
356 }
357 putname(filename); 352 putname(filename);
358out: 353out:
359 354
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 0838155b7a88..1adb40c81669 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -77,11 +77,6 @@ asmlinkage int sys32_execve(struct pt_regs *regs)
77 goto out; 77 goto out;
78 error = compat_do_execve(filename, compat_ptr(regs->gr[25]), 78 error = compat_do_execve(filename, compat_ptr(regs->gr[25]),
79 compat_ptr(regs->gr[24]), regs); 79 compat_ptr(regs->gr[24]), regs);
80 if (error == 0) {
81 task_lock(current);
82 current->ptrace &= ~PT_DTRACE;
83 task_unlock(current);
84 }
85 putname(filename); 80 putname(filename);
86out: 81out:
87 82
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index d79a902d155a..3b1005185390 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -2,6 +2,23 @@ menu "Kernel hacking"
2 2
3source "lib/Kconfig.debug" 3source "lib/Kconfig.debug"
4 4
5config PPC_DISABLE_WERROR
6 bool "Don't build arch/powerpc code with -Werror"
7 default n
8 help
9 This option tells the compiler NOT to build the code under
10 arch/powerpc with the -Werror flag (which means warnings
11 are treated as errors).
12
13 Only enable this if you are hitting a build failure in the
14 arch/powerpc code caused by a warning, and you don't feel
15 inclined to fix it.
16
17config PPC_WERROR
18 bool
19 depends on !PPC_DISABLE_WERROR
20 default y
21
5config PRINT_STACK_DEPTH 22config PRINT_STACK_DEPTH
6 int "Stack depth to print" if DEBUG_KERNEL 23 int "Stack depth to print" if DEBUG_KERNEL
7 default 64 24 default 64
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c
index 6776a1a29f13..277ba4a79b5a 100644
--- a/arch/powerpc/boot/cuboot-85xx.c
+++ b/arch/powerpc/boot/cuboot-85xx.c
@@ -15,6 +15,7 @@
15#include "cuboot.h" 15#include "cuboot.h"
16 16
17#define TARGET_85xx 17#define TARGET_85xx
18#define TARGET_HAS_ETH3
18#include "ppcboot.h" 19#include "ppcboot.h"
19 20
20static bd_t bd; 21static bd_t bd;
@@ -27,6 +28,7 @@ static void platform_fixups(void)
27 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); 28 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
28 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); 29 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
29 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr); 30 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr);
31 dt_fixup_mac_address_by_alias("ethernet3", bd.bi_enet3addr);
30 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq); 32 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq);
31 33
32 /* Unfortunately, the specific model number is encoded in the 34 /* Unfortunately, the specific model number is encoded in the
diff --git a/arch/powerpc/boot/dts/asp834x-redboot.dts b/arch/powerpc/boot/dts/asp834x-redboot.dts
index 7da84fd7be93..261d10c4534b 100644
--- a/arch/powerpc/boot/dts/asp834x-redboot.dts
+++ b/arch/powerpc/boot/dts/asp834x-redboot.dts
@@ -167,7 +167,7 @@
167 interrupt-parent = <&ipic>; 167 interrupt-parent = <&ipic>;
168 interrupts = <39 0x8>; 168 interrupts = <39 0x8>;
169 phy_type = "ulpi"; 169 phy_type = "ulpi";
170 port1; 170 port0;
171 }; 171 };
172 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ 172 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
173 usb@23000 { 173 usb@23000 {
diff --git a/arch/powerpc/boot/dts/gef_sbc610.dts b/arch/powerpc/boot/dts/gef_sbc610.dts
index 217f8aa66725..35a63183eecc 100644
--- a/arch/powerpc/boot/dts/gef_sbc610.dts
+++ b/arch/powerpc/boot/dts/gef_sbc610.dts
@@ -152,6 +152,16 @@
152 interrupt-parent = <&mpic>; 152 interrupt-parent = <&mpic>;
153 dfsrr; 153 dfsrr;
154 154
155 hwmon@48 {
156 compatible = "national,lm92";
157 reg = <0x48>;
158 };
159
160 hwmon@4c {
161 compatible = "adi,adt7461";
162 reg = <0x4c>;
163 };
164
155 rtc@51 { 165 rtc@51 {
156 compatible = "epson,rx8581"; 166 compatible = "epson,rx8581";
157 reg = <0x00000051>; 167 reg = <0x00000051>;
diff --git a/arch/powerpc/boot/dts/kmeter1.dts b/arch/powerpc/boot/dts/kmeter1.dts
new file mode 100644
index 000000000000..167044f7de1d
--- /dev/null
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -0,0 +1,520 @@
1/*
2 * Keymile KMETER1 Device Tree Source
3 *
4 * 2008 DENX Software Engineering GmbH
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 as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/dts-v1/;
13
14/ {
15 model = "KMETER1";
16 compatible = "keymile,KMETER1";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet_piggy2;
22 ethernet1 = &enet_estar1;
23 ethernet2 = &enet_estar2;
24 ethernet3 = &enet_eth1;
25 ethernet4 = &enet_eth2;
26 ethernet5 = &enet_eth3;
27 ethernet6 = &enet_eth4;
28 serial0 = &serial0;
29 };
30
31 cpus {
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 PowerPC,8360@0 {
36 device_type = "cpu";
37 reg = <0x0>;
38 d-cache-line-size = <32>; // 32 bytes
39 i-cache-line-size = <32>; // 32 bytes
40 d-cache-size = <32768>; // L1, 32K
41 i-cache-size = <32768>; // L1, 32K
42 timebase-frequency = <0>; /* Filled in by U-Boot */
43 bus-frequency = <0>; /* Filled in by U-Boot */
44 clock-frequency = <0>; /* Filled in by U-Boot */
45 };
46 };
47
48 memory {
49 device_type = "memory";
50 reg = <0 0>; /* Filled in by U-Boot */
51 };
52
53 soc8360@e0000000 {
54 #address-cells = <1>;
55 #size-cells = <1>;
56 device_type = "soc";
57 compatible = "fsl,mpc8360-immr", "simple-bus";
58 ranges = <0x0 0xe0000000 0x00200000>;
59 reg = <0xe0000000 0x00000200>;
60 bus-frequency = <0>; /* Filled in by U-Boot */
61
62 i2c@3000 {
63 #address-cells = <1>;
64 #size-cells = <0>;
65 cell-index = <0>;
66 compatible = "fsl-i2c";
67 reg = <0x3000 0x100>;
68 interrupts = <14 0x8>;
69 interrupt-parent = <&ipic>;
70 dfsrr;
71 };
72
73 serial0: serial@4500 {
74 cell-index = <0>;
75 device_type = "serial";
76 compatible = "ns16550";
77 reg = <0x4500 0x100>;
78 clock-frequency = <264000000>;
79 interrupts = <9 0x8>;
80 interrupt-parent = <&ipic>;
81 };
82
83 dma@82a8 {
84 #address-cells = <1>;
85 #size-cells = <1>;
86 compatible = "fsl,mpc8360-dma", "fsl,elo-dma";
87 reg = <0x82a8 4>;
88 ranges = <0 0x8100 0x1a8>;
89 interrupt-parent = <&ipic>;
90 interrupts = <71 8>;
91 cell-index = <0>;
92 dma-channel@0 {
93 compatible = "fsl,mpc8360-dma-channel", "fsl,elo-dma-channel";
94 reg = <0 0x80>;
95 interrupt-parent = <&ipic>;
96 interrupts = <71 8>;
97 };
98 dma-channel@80 {
99 compatible = "fsl,mpc8360-dma-channel", "fsl,elo-dma-channel";
100 reg = <0x80 0x80>;
101 interrupt-parent = <&ipic>;
102 interrupts = <71 8>;
103 };
104 dma-channel@100 {
105 compatible = "fsl,mpc8360-dma-channel", "fsl,elo-dma-channel";
106 reg = <0x100 0x80>;
107 interrupt-parent = <&ipic>;
108 interrupts = <71 8>;
109 };
110 dma-channel@180 {
111 compatible = "fsl,mpc8360-dma-channel", "fsl,elo-dma-channel";
112 reg = <0x180 0x28>;
113 interrupt-parent = <&ipic>;
114 interrupts = <71 8>;
115 };
116 };
117
118 ipic: pic@700 {
119 #address-cells = <0>;
120 #interrupt-cells = <2>;
121 compatible = "fsl,pq2pro-pic", "fsl,ipic";
122 interrupt-controller;
123 reg = <0x700 0x100>;
124 };
125
126 par_io@1400 {
127 #address-cells = <1>;
128 #size-cells = <0>;
129 reg = <0x1400 0x100>;
130 compatible = "fsl,mpc8360-par_io";
131 num-ports = <7>;
132
133 pio_ucc1: ucc_pin@0 {
134 reg = <0>;
135
136 pio-map = <
137 /* port pin dir open_drain assignment has_irq */
138 0 1 3 0 2 0 /* MDIO */
139 0 2 1 0 1 0 /* MDC */
140
141 0 3 1 0 1 0 /* TxD0 */
142 0 4 1 0 1 0 /* TxD1 */
143 0 5 1 0 1 0 /* TxD2 */
144 0 6 1 0 1 0 /* TxD3 */
145 0 9 2 0 1 0 /* RxD0 */
146 0 10 2 0 1 0 /* RxD1 */
147 0 11 2 0 1 0 /* RxD2 */
148 0 12 2 0 1 0 /* RxD3 */
149 0 7 1 0 1 0 /* TX_EN */
150 0 8 1 0 1 0 /* TX_ER */
151 0 15 2 0 1 0 /* RX_DV */
152 0 16 2 0 1 0 /* RX_ER */
153 0 0 2 0 1 0 /* RX_CLK */
154 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
155 2 8 2 0 1 0 /* GTX125 - CLK9 */
156 >;
157 };
158
159 pio_ucc2: ucc_pin@1 {
160 reg = <1>;
161
162 pio-map = <
163 /* port pin dir open_drain assignment has_irq */
164 0 1 3 0 2 0 /* MDIO */
165 0 2 1 0 1 0 /* MDC */
166
167 0 17 1 0 1 0 /* TxD0 */
168 0 18 1 0 1 0 /* TxD1 */
169 0 19 1 0 1 0 /* TxD2 */
170 0 20 1 0 1 0 /* TxD3 */
171 0 23 2 0 1 0 /* RxD0 */
172 0 24 2 0 1 0 /* RxD1 */
173 0 25 2 0 1 0 /* RxD2 */
174 0 26 2 0 1 0 /* RxD3 */
175 0 21 1 0 1 0 /* TX_EN */
176 0 22 1 0 1 0 /* TX_ER */
177 0 29 2 0 1 0 /* RX_DV */
178 0 30 2 0 1 0 /* RX_ER */
179 0 31 2 0 1 0 /* RX_CLK */
180 2 2 1 0 2 0 /* GTX_CLK - CLK3 */
181 2 3 2 0 1 0 /* GTX125 - CLK4 */
182 >;
183 };
184
185 pio_ucc4: ucc_pin@3 {
186 reg = <3>;
187
188 pio-map = <
189 /* port pin dir open_drain assignment has_irq */
190 0 1 3 0 2 0 /* MDIO */
191 0 2 1 0 1 0 /* MDC */
192
193 1 14 1 0 1 0 /* TxD0 (PB14, out, f1) */
194 1 15 1 0 1 0 /* TxD1 (PB15, out, f1) */
195 1 20 2 0 1 0 /* RxD0 (PB20, in, f1) */
196 1 21 2 0 1 0 /* RxD1 (PB21, in, f1) */
197 1 18 1 0 1 0 /* TX_EN (PB18, out, f1) */
198 1 26 2 0 1 0 /* RX_DV (PB26, in, f1) */
199 1 27 2 0 1 0 /* RX_ER (PB27, in, f1) */
200
201 2 16 2 0 1 0 /* UCC4_RMII_CLK (CLK17) */
202 >;
203 };
204
205 pio_ucc5: ucc_pin@4 {
206 reg = <4>;
207
208 pio-map = <
209 /* port pin dir open_drain assignment has_irq */
210 0 1 3 0 2 0 /* MDIO */
211 0 2 1 0 1 0 /* MDC */
212
213 3 0 1 0 1 0 /* TxD0 (PD0, out, f1) */
214 3 1 1 0 1 0 /* TxD1 (PD1, out, f1) */
215 3 6 2 0 1 0 /* RxD0 (PD6, in, f1) */
216 3 7 2 0 1 0 /* RxD1 (PD7, in, f1) */
217 3 4 1 0 1 0 /* TX_EN (PD4, out, f1) */
218 3 12 2 0 1 0 /* RX_DV (PD12, in, f1) */
219 3 13 2 0 1 0 /* RX_ER (PD13, in, f1) */
220 >;
221 };
222
223 pio_ucc6: ucc_pin@5 {
224 reg = <5>;
225
226 pio-map = <
227 /* port pin dir open_drain assignment has_irq */
228 0 1 3 0 2 0 /* MDIO */
229 0 2 1 0 1 0 /* MDC */
230
231 3 14 1 0 1 0 /* TxD0 (PD14, out, f1) */
232 3 15 1 0 1 0 /* TxD1 (PD15, out, f1) */
233 3 20 2 0 1 0 /* RxD0 (PD20, in, f1) */
234 3 21 2 0 1 0 /* RxD1 (PD21, in, f1) */
235 3 18 1 0 1 0 /* TX_EN (PD18, out, f1) */
236 3 26 2 0 1 0 /* RX_DV (PD26, in, f1) */
237 3 27 2 0 1 0 /* RX_ER (PD27, in, f1) */
238 >;
239 };
240
241 pio_ucc7: ucc_pin@6 {
242 reg = <6>;
243
244 pio-map = <
245 /* port pin dir open_drain assignment has_irq */
246 0 1 3 0 2 0 /* MDIO */
247 0 2 1 0 1 0 /* MDC */
248
249 4 0 1 0 1 0 /* TxD0 (PE0, out, f1) */
250 4 1 1 0 1 0 /* TxD1 (PE1, out, f1) */
251 4 6 2 0 1 0 /* RxD0 (PE6, in, f1) */
252 4 7 2 0 1 0 /* RxD1 (PE7, in, f1) */
253 4 4 1 0 1 0 /* TX_EN (PE4, out, f1) */
254 4 12 2 0 1 0 /* RX_DV (PE12, in, f1) */
255 4 13 2 0 1 0 /* RX_ER (PE13, in, f1) */
256 >;
257 };
258
259 pio_ucc8: ucc_pin@7 {
260 reg = <7>;
261
262 pio-map = <
263 /* port pin dir open_drain assignment has_irq */
264 0 1 3 0 2 0 /* MDIO */
265 0 2 1 0 1 0 /* MDC */
266
267 4 14 1 0 2 0 /* TxD0 (PE14, out, f2) */
268 4 15 1 0 1 0 /* TxD1 (PE15, out, f1) */
269 4 20 2 0 1 0 /* RxD0 (PE20, in, f1) */
270 4 21 2 0 1 0 /* RxD1 (PE21, in, f1) */
271 4 18 1 0 1 0 /* TX_EN (PE18, out, f1) */
272 4 26 2 0 1 0 /* RX_DV (PE26, in, f1) */
273 4 27 2 0 1 0 /* RX_ER (PE27, in, f1) */
274
275 2 15 2 0 1 0 /* UCCx_RMII_CLK (CLK16) */
276 >;
277 };
278
279 };
280
281 qe@100000 {
282 #address-cells = <1>;
283 #size-cells = <1>;
284 compatible = "fsl,qe";
285 ranges = <0x0 0x100000 0x100000>;
286 reg = <0x100000 0x480>;
287 clock-frequency = <0>; /* Filled in by U-Boot */
288 brg-frequency = <0>; /* Filled in by U-Boot */
289 bus-frequency = <0>; /* Filled in by U-Boot */
290
291 muram@10000 {
292 #address-cells = <1>;
293 #size-cells = <1>;
294 compatible = "fsl,qe-muram", "fsl,cpm-muram";
295 ranges = <0x0 0x00010000 0x0000c000>;
296
297 data-only@0 {
298 compatible = "fsl,qe-muram-data",
299 "fsl,cpm-muram-data";
300 reg = <0x0 0xc000>;
301 };
302 };
303
304 /* ESTAR-1 (UCC1, MDIO 0x10, RGMII) */
305 enet_estar1: ucc@2000 {
306 device_type = "network";
307 compatible = "ucc_geth";
308 cell-index = <1>;
309 reg = <0x2000 0x200>;
310 interrupts = <32>;
311 interrupt-parent = <&qeic>;
312 local-mac-address = [ 00 00 00 00 00 00 ];
313 rx-clock-name = "none";
314 tx-clock-name = "clk9";
315 phy-handle = <&phy_estar1>;
316 phy-connection-type = "rgmii-id";
317 pio-handle = <&pio_ucc1>;
318 };
319
320 /* ESTAR-2 (UCC2, MDIO 0x11, RGMII) */
321 enet_estar2: ucc@3000 {
322 device_type = "network";
323 compatible = "ucc_geth";
324 cell-index = <2>;
325 reg = <0x3000 0x200>;
326 interrupts = <33>;
327 interrupt-parent = <&qeic>;
328 local-mac-address = [ 00 00 00 00 00 00 ];
329 rx-clock-name = "none";
330 tx-clock-name = "clk4";
331 phy-handle = <&phy_estar2>;
332 phy-connection-type = "rgmii-id";
333 pio-handle = <&pio_ucc2>;
334 };
335
336 /* Piggy2 (UCC4, MDIO 0x00, RMII) */
337 enet_piggy2: ucc@3200 {
338 device_type = "network";
339 compatible = "ucc_geth";
340 cell-index = <4>;
341 reg = <0x3200 0x200>;
342 interrupts = <35>;
343 interrupt-parent = <&qeic>;
344 local-mac-address = [ 00 00 00 00 00 00 ];
345 rx-clock-name = "none";
346 tx-clock-name = "clk17";
347 phy-handle = <&phy_piggy2>;
348 phy-connection-type = "rmii";
349 pio-handle = <&pio_ucc4>;
350 };
351
352 /* Eth-1 (UCC5, MDIO 0x08, RMII) */
353 enet_eth1: ucc@2400 {
354 device_type = "network";
355 compatible = "ucc_geth";
356 cell-index = <5>;
357 reg = <0x2400 0x200>;
358 interrupts = <40>;
359 interrupt-parent = <&qeic>;
360 local-mac-address = [ 00 00 00 00 00 00 ];
361 rx-clock-name = "none";
362 tx-clock-name = "clk16";
363 phy-handle = <&phy_eth1>;
364 phy-connection-type = "rmii";
365 pio-handle = <&pio_ucc5>;
366 };
367
368 /* Eth-2 (UCC6, MDIO 0x09, RMII) */
369 enet_eth2: ucc@3400 {
370 device_type = "network";
371 compatible = "ucc_geth";
372 cell-index = <6>;
373 reg = <0x3400 0x200>;
374 interrupts = <41>;
375 interrupt-parent = <&qeic>;
376 local-mac-address = [ 00 00 00 00 00 00 ];
377 rx-clock-name = "none";
378 tx-clock-name = "clk16";
379 phy-handle = <&phy_eth2>;
380 phy-connection-type = "rmii";
381 pio-handle = <&pio_ucc6>;
382 };
383
384 /* Eth-3 (UCC7, MDIO 0x0a, RMII) */
385 enet_eth3: ucc@2600 {
386 device_type = "network";
387 compatible = "ucc_geth";
388 cell-index = <7>;
389 reg = <0x2600 0x200>;
390 interrupts = <42>;
391 interrupt-parent = <&qeic>;
392 local-mac-address = [ 00 00 00 00 00 00 ];
393 rx-clock-name = "none";
394 tx-clock-name = "clk16";
395 phy-handle = <&phy_eth3>;
396 phy-connection-type = "rmii";
397 pio-handle = <&pio_ucc7>;
398 };
399
400 /* Eth-4 (UCC8, MDIO 0x0b, RMII) */
401 enet_eth4: ucc@3600 {
402 device_type = "network";
403 compatible = "ucc_geth";
404 cell-index = <8>;
405 reg = <0x3600 0x200>;
406 interrupts = <43>;
407 interrupt-parent = <&qeic>;
408 local-mac-address = [ 00 00 00 00 00 00 ];
409 rx-clock-name = "none";
410 tx-clock-name = "clk16";
411 phy-handle = <&phy_eth4>;
412 phy-connection-type = "rmii";
413 pio-handle = <&pio_ucc8>;
414 };
415
416 mdio@3320 {
417 #address-cells = <1>;
418 #size-cells = <0>;
419 reg = <0x3320 0x18>;
420 compatible = "fsl,ucc-mdio";
421
422 /* Piggy2 (UCC4, MDIO 0x00, RMII) */
423 phy_piggy2: ethernet-phy@00 {
424 reg = <0x0>;
425 };
426
427 /* Eth-1 (UCC5, MDIO 0x08, RMII) */
428 phy_eth1: ethernet-phy@08 {
429 reg = <0x08>;
430 };
431
432 /* Eth-2 (UCC6, MDIO 0x09, RMII) */
433 phy_eth2: ethernet-phy@09 {
434 reg = <0x09>;
435 };
436
437 /* Eth-3 (UCC7, MDIO 0x0a, RMII) */
438 phy_eth3: ethernet-phy@0a {
439 reg = <0x0a>;
440 };
441
442 /* Eth-4 (UCC8, MDIO 0x0b, RMII) */
443 phy_eth4: ethernet-phy@0b {
444 reg = <0x0b>;
445 };
446
447 /* ESTAR-1 (UCC1, MDIO 0x10, RGMII) */
448 phy_estar1: ethernet-phy@10 {
449 interrupt-parent = <&ipic>;
450 interrupts = <17 0x8>;
451 reg = <0x10>;
452 };
453
454 /* ESTAR-2 (UCC2, MDIO 0x11, RGMII) */
455 phy_estar2: ethernet-phy@11 {
456 interrupt-parent = <&ipic>;
457 interrupts = <18 0x8>;
458 reg = <0x11>;
459 };
460 };
461
462 qeic: interrupt-controller@80 {
463 interrupt-controller;
464 compatible = "fsl,qe-ic";
465 #address-cells = <0>;
466 #interrupt-cells = <1>;
467 reg = <0x80 0x80>;
468 interrupts = <32 8 33 8>;
469 interrupt-parent = <&ipic>;
470 };
471 };
472 };
473
474 localbus@e0005000 {
475 #address-cells = <2>;
476 #size-cells = <1>;
477 compatible = "fsl,mpc8360-localbus", "fsl,pq2pro-localbus",
478 "simple-bus";
479 reg = <0xe0005000 0xd8>;
480 ranges = <0 0 0xf0000000 0x04000000>; /* Filled in by U-Boot */
481
482 flash@f0000000,0 {
483 compatible = "cfi-flash";
484 /*
485 * The Intel P30 chip has 2 non-identical chips on
486 * one die, so we need to define 2 seperate regions
487 * that are scanned by physmap_of independantly.
488 */
489 reg = <0 0x00000000 0x02000000
490 0 0x02000000 0x02000000>; /* Filled in by U-Boot */
491 bank-width = <2>;
492 #address-cells = <1>;
493 #size-cells = <1>;
494 partition@0 {
495 label = "u-boot";
496 reg = <0 0x40000>;
497 };
498 partition@40000 {
499 label = "env";
500 reg = <0x40000 0x40000>;
501 };
502 partition@80000 {
503 label = "dtb";
504 reg = <0x80000 0x20000>;
505 };
506 partition@a0000 {
507 label = "kernel";
508 reg = <0xa0000 0x300000>;
509 };
510 partition@3a0000 {
511 label = "ramdisk";
512 reg = <0x3a0000 0x800000>;
513 };
514 partition@ba0000 {
515 label = "user";
516 reg = <0xba0000 0x3460000>;
517 };
518 };
519 };
520};
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 2a1929acaabd..60f332778e41 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -17,6 +17,13 @@
17 #address-cells = <1>; 17 #address-cells = <1>;
18 #size-cells = <1>; 18 #size-cells = <1>;
19 19
20 aliases {
21 ethernet0 = &eth0;
22 ethernet1 = &eth1;
23 serial0 = &scc1;
24 serial1 = &scc4;
25 };
26
20 cpus { 27 cpus {
21 #address-cells = <1>; 28 #address-cells = <1>;
22 #size-cells = <0>; 29 #size-cells = <0>;
@@ -46,13 +53,13 @@
46 #size-cells = <1>; 53 #size-cells = <1>;
47 reg = <0xf0010100 0x40>; 54 reg = <0xf0010100 0x40>;
48 55
49 ranges = <0x0 0x0 0xfe000000 0x2000000 56 ranges = <0x0 0x0 0xff800000 0x00800000
50 0x1 0x0 0xf4500000 0x8000 57 0x1 0x0 0xf4500000 0x8000
51 0x3 0x0 0xf8200000 0x8000>; 58 0x3 0x0 0xf8200000 0x8000>;
52 59
53 flash@0,0 { 60 flash@0,0 {
54 compatible = "jedec-flash"; 61 compatible = "jedec-flash";
55 reg = <0x0 0x0 0x2000000>; 62 reg = <0x0 0x0 0x00800000>;
56 bank-width = <4>; 63 bank-width = <4>;
57 device-width = <1>; 64 device-width = <1>;
58 }; 65 };
@@ -144,7 +151,7 @@
144 reg = <0x119f0 0x10 0x115f0 0x10>; 151 reg = <0x119f0 0x10 0x115f0 0x10>;
145 }; 152 };
146 153
147 serial@11a00 { 154 scc1: serial@11a00 {
148 device_type = "serial"; 155 device_type = "serial";
149 compatible = "fsl,mpc8272-scc-uart", 156 compatible = "fsl,mpc8272-scc-uart",
150 "fsl,cpm2-scc-uart"; 157 "fsl,cpm2-scc-uart";
@@ -155,7 +162,7 @@
155 fsl,cpm-command = <0x800000>; 162 fsl,cpm-command = <0x800000>;
156 }; 163 };
157 164
158 serial@11a60 { 165 scc4: serial@11a60 {
159 device_type = "serial"; 166 device_type = "serial";
160 compatible = "fsl,mpc8272-scc-uart", 167 compatible = "fsl,mpc8272-scc-uart",
161 "fsl,cpm2-scc-uart"; 168 "fsl,cpm2-scc-uart";
@@ -192,7 +199,7 @@
192 }; 199 };
193 }; 200 };
194 201
195 ethernet@11300 { 202 eth0: ethernet@11300 {
196 device_type = "network"; 203 device_type = "network";
197 compatible = "fsl,mpc8272-fcc-enet", 204 compatible = "fsl,mpc8272-fcc-enet",
198 "fsl,cpm2-fcc-enet"; 205 "fsl,cpm2-fcc-enet";
@@ -205,7 +212,7 @@
205 fsl,cpm-command = <0x12000300>; 212 fsl,cpm-command = <0x12000300>;
206 }; 213 };
207 214
208 ethernet@11320 { 215 eth1: ethernet@11320 {
209 device_type = "network"; 216 device_type = "network";
210 compatible = "fsl,mpc8272-fcc-enet", 217 compatible = "fsl,mpc8272-fcc-enet",
211 "fsl,cpm2-fcc-enet"; 218 "fsl,cpm2-fcc-enet";
diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
index 3f4c5fb988a0..32e10f588c1d 100644
--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -322,6 +322,21 @@
322 reg = <0x700 0x100>; 322 reg = <0x700 0x100>;
323 device_type = "ipic"; 323 device_type = "ipic";
324 }; 324 };
325
326 ipic-msi@7c0 {
327 compatible = "fsl,ipic-msi";
328 reg = <0x7c0 0x40>;
329 msi-available-ranges = <0 0x100>;
330 interrupts = <0x43 0x8
331 0x4 0x8
332 0x51 0x8
333 0x52 0x8
334 0x56 0x8
335 0x57 0x8
336 0x58 0x8
337 0x59 0x8>;
338 interrupt-parent = < &ipic >;
339 };
325 }; 340 };
326 341
327 pci0: pci@e0008500 { 342 pci0: pci@e0008500 {
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index e3eeaeda9187..feeeb7f9d609 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -156,7 +156,7 @@
156 interrupt-parent = <&ipic>; 156 interrupt-parent = <&ipic>;
157 interrupts = <39 0x8>; 157 interrupts = <39 0x8>;
158 phy_type = "ulpi"; 158 phy_type = "ulpi";
159 port1; 159 port0;
160 }; 160 };
161 161
162 usb@23000 { 162 usb@23000 {
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index a2553a6f9009..230febb9b72f 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -153,7 +153,7 @@
153 interrupt-parent = <&ipic>; 153 interrupt-parent = <&ipic>;
154 interrupts = <39 0x8>; 154 interrupts = <39 0x8>;
155 phy_type = "ulpi"; 155 phy_type = "ulpi";
156 port1; 156 port0;
157 }; 157 };
158 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ 158 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
159 usb@23000 { 159 usb@23000 {
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index 67bb372c9451..f32c2811c6d9 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -155,7 +155,7 @@
155 }; 155 };
156 156
157 sdhci@2e000 { 157 sdhci@2e000 {
158 compatible = "fsl,mpc8377-esdhc", "fsl,mpc8379-esdhc"; 158 compatible = "fsl,mpc8377-esdhc", "fsl,esdhc";
159 reg = <0x2e000 0x1000>; 159 reg = <0x2e000 0x1000>;
160 interrupts = <42 0x8>; 160 interrupts = <42 0x8>;
161 interrupt-parent = <&ipic>; 161 interrupt-parent = <&ipic>;
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 053339390c22..224b4f0704b8 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -169,7 +169,7 @@
169 }; 169 };
170 170
171 sdhci@2e000 { 171 sdhci@2e000 {
172 compatible = "fsl,mpc8377-esdhc", "fsl,mpc8379-esdhc"; 172 compatible = "fsl,mpc8377-esdhc", "fsl,esdhc";
173 reg = <0x2e000 0x1000>; 173 reg = <0x2e000 0x1000>;
174 interrupts = <42 0x8>; 174 interrupts = <42 0x8>;
175 interrupt-parent = <&ipic>; 175 interrupt-parent = <&ipic>;
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
index a955a577db81..f720ab9af30d 100644
--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -155,7 +155,7 @@
155 }; 155 };
156 156
157 sdhci@2e000 { 157 sdhci@2e000 {
158 compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc"; 158 compatible = "fsl,mpc8378-esdhc", "fsl,esdhc";
159 reg = <0x2e000 0x1000>; 159 reg = <0x2e000 0x1000>;
160 interrupts = <42 0x8>; 160 interrupts = <42 0x8>;
161 interrupt-parent = <&ipic>; 161 interrupt-parent = <&ipic>;
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 5d90e85704c3..474ea2fa3f86 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -169,7 +169,7 @@
169 }; 169 };
170 170
171 sdhci@2e000 { 171 sdhci@2e000 {
172 compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc"; 172 compatible = "fsl,mpc8378-esdhc", "fsl,esdhc";
173 reg = <0x2e000 0x1000>; 173 reg = <0x2e000 0x1000>;
174 interrupts = <42 0x8>; 174 interrupts = <42 0x8>;
175 interrupt-parent = <&ipic>; 175 interrupt-parent = <&ipic>;
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
index d266ddbfc28d..4fa221fd9bdc 100644
--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -153,7 +153,7 @@
153 }; 153 };
154 154
155 sdhci@2e000 { 155 sdhci@2e000 {
156 compatible = "fsl,mpc8379-esdhc"; 156 compatible = "fsl,mpc8379-esdhc", "fsl,esdhc";
157 reg = <0x2e000 0x1000>; 157 reg = <0x2e000 0x1000>;
158 interrupts = <42 0x8>; 158 interrupts = <42 0x8>;
159 interrupt-parent = <&ipic>; 159 interrupt-parent = <&ipic>;
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index 98ae95bd18f4..d4838af8d379 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -167,7 +167,7 @@
167 }; 167 };
168 168
169 sdhci@2e000 { 169 sdhci@2e000 {
170 compatible = "fsl,mpc8379-esdhc"; 170 compatible = "fsl,mpc8379-esdhc", "fsl,esdhc";
171 reg = <0x2e000 0x1000>; 171 reg = <0x2e000 0x1000>;
172 interrupts = <42 0x8>; 172 interrupts = <42 0x8>;
173 interrupt-parent = <&ipic>; 173 interrupt-parent = <&ipic>;
diff --git a/arch/powerpc/boot/dts/mpc8569mds.dts b/arch/powerpc/boot/dts/mpc8569mds.dts
index 39c2927503cf..a8dcb018c4a5 100644
--- a/arch/powerpc/boot/dts/mpc8569mds.dts
+++ b/arch/powerpc/boot/dts/mpc8569mds.dts
@@ -24,6 +24,8 @@
24 ethernet1 = &enet1; 24 ethernet1 = &enet1;
25 ethernet2 = &enet2; 25 ethernet2 = &enet2;
26 ethernet3 = &enet3; 26 ethernet3 = &enet3;
27 ethernet5 = &enet5;
28 ethernet7 = &enet7;
27 pci1 = &pci1; 29 pci1 = &pci1;
28 rapidio0 = &rio0; 30 rapidio0 = &rio0;
29 }; 31 };
@@ -70,8 +72,30 @@
70 #size-cells = <1>; 72 #size-cells = <1>;
71 compatible = "cfi-flash"; 73 compatible = "cfi-flash";
72 reg = <0x0 0x0 0x02000000>; 74 reg = <0x0 0x0 0x02000000>;
73 bank-width = <2>; 75 bank-width = <1>;
74 device-width = <1>; 76 device-width = <1>;
77 partition@0 {
78 label = "ramdisk";
79 reg = <0x00000000 0x01c00000>;
80 };
81 partition@1c00000 {
82 label = "kernel";
83 reg = <0x01c00000 0x002e0000>;
84 };
85 partiton@1ee0000 {
86 label = "dtb";
87 reg = <0x01ee0000 0x00020000>;
88 };
89 partition@1f00000 {
90 label = "firmware";
91 reg = <0x01f00000 0x00080000>;
92 read-only;
93 };
94 partition@1f80000 {
95 label = "u-boot";
96 reg = <0x01f80000 0x00080000>;
97 read-only;
98 };
75 }; 99 };
76 100
77 bcsr@1,0 { 101 bcsr@1,0 {
@@ -466,6 +490,37 @@
466 reg = <0x3>; 490 reg = <0x3>;
467 device_type = "ethernet-phy"; 491 device_type = "ethernet-phy";
468 }; 492 };
493 qe_phy5: ethernet-phy@04 {
494 interrupt-parent = <&mpic>;
495 reg = <0x04>;
496 device_type = "ethernet-phy";
497 };
498 qe_phy7: ethernet-phy@06 {
499 interrupt-parent = <&mpic>;
500 reg = <0x6>;
501 device_type = "ethernet-phy";
502 };
503 };
504 mdio@3520 {
505 #address-cells = <1>;
506 #size-cells = <0>;
507 reg = <0x3520 0x18>;
508 compatible = "fsl,ucc-mdio";
509
510 tbi0: tbi-phy@15 {
511 reg = <0x15>;
512 device_type = "tbi-phy";
513 };
514 };
515 mdio@3720 {
516 #address-cells = <1>;
517 #size-cells = <0>;
518 reg = <0x3720 0x38>;
519 compatible = "fsl,ucc-mdio";
520 tbi1: tbi-phy@17 {
521 reg = <0x17>;
522 device_type = "tbi-phy";
523 };
469 }; 524 };
470 525
471 enet2: ucc@2200 { 526 enet2: ucc@2200 {
@@ -513,6 +568,36 @@
513 phy-connection-type = "rgmii-id"; 568 phy-connection-type = "rgmii-id";
514 }; 569 };
515 570
571 enet5: ucc@3400 {
572 device_type = "network";
573 compatible = "ucc_geth";
574 cell-index = <6>;
575 reg = <0x3400 0x200>;
576 interrupts = <41>;
577 interrupt-parent = <&qeic>;
578 local-mac-address = [ 00 00 00 00 00 00 ];
579 rx-clock-name = "none";
580 tx-clock-name = "none";
581 tbi-handle = <&tbi0>;
582 phy-handle = <&qe_phy5>;
583 phy-connection-type = "sgmii";
584 };
585
586 enet7: ucc@3600 {
587 device_type = "network";
588 compatible = "ucc_geth";
589 cell-index = <8>;
590 reg = <0x3600 0x200>;
591 interrupts = <43>;
592 interrupt-parent = <&qeic>;
593 local-mac-address = [ 00 00 00 00 00 00 ];
594 rx-clock-name = "none";
595 tx-clock-name = "none";
596 tbi-handle = <&tbi1>;
597 phy-handle = <&qe_phy7>;
598 phy-connection-type = "sgmii";
599 };
600
516 muram@10000 { 601 muram@10000 {
517 #address-cells = <1>; 602 #address-cells = <1>;
518 #size-cells = <1>; 603 #size-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index cfc2c60d1f5f..f468d215f716 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -100,8 +100,18 @@
100 }; 100 };
101 101
102 board-control@3,0 { 102 board-control@3,0 {
103 #address-cells = <1>;
104 #size-cells = <1>;
103 compatible = "fsl,fpga-pixis"; 105 compatible = "fsl,fpga-pixis";
104 reg = <3 0 0x20>; 106 reg = <3 0 0x20>;
107 ranges = <0 3 0 0x20>;
108
109 sdcsr_pio: gpio-controller@a {
110 #gpio-cells = <2>;
111 compatible = "fsl,fpga-pixis-gpio-bank";
112 reg = <0xa 1>;
113 gpio-controller;
114 };
105 }; 115 };
106 }; 116 };
107 117
@@ -176,6 +186,28 @@
176 interrupt-parent = <&mpic>; 186 interrupt-parent = <&mpic>;
177 }; 187 };
178 188
189 spi@7000 {
190 #address-cells = <1>;
191 #size-cells = <0>;
192 compatible = "fsl,mpc8610-spi", "fsl,spi";
193 reg = <0x7000 0x40>;
194 cell-index = <0>;
195 interrupts = <59 2>;
196 interrupt-parent = <&mpic>;
197 mode = "cpu";
198 gpios = <&sdcsr_pio 7 0>;
199
200 mmc-slot@0 {
201 compatible = "fsl,mpc8610hpcd-mmc-slot",
202 "mmc-spi-slot";
203 reg = <0>;
204 gpios = <&sdcsr_pio 0 1 /* nCD */
205 &sdcsr_pio 1 0>; /* WP */
206 voltage-ranges = <3300 3300>;
207 spi-max-frequency = <50000000>;
208 };
209 };
210
179 display@2c000 { 211 display@2c000 {
180 compatible = "fsl,diu"; 212 compatible = "fsl,diu";
181 reg = <0x2c000 100>; 213 reg = <0x2c000 100>;
diff --git a/arch/powerpc/boot/dts/pcm030.dts b/arch/powerpc/boot/dts/pcm030.dts
index 895834713894..30bfdc04c6df 100644
--- a/arch/powerpc/boot/dts/pcm030.dts
+++ b/arch/powerpc/boot/dts/pcm030.dts
@@ -258,34 +258,16 @@
258 compatible = "nxp,pcf8563"; 258 compatible = "nxp,pcf8563";
259 reg = <0x51>; 259 reg = <0x51>;
260 }; 260 };
261 /* FIXME: EEPROM */ 261 eeprom@52 {
262 compatible = "catalyst,24c32";
263 reg = <0x52>;
264 };
262 }; 265 };
263 266
264 sram@8000 { 267 sram@8000 {
265 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram"; 268 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
266 reg = <0x8000 0x4000>; 269 reg = <0x8000 0x4000>;
267 }; 270 };
268
269 /* This is only an example device to show the usage of gpios. It maps all available
270 * gpios to the "gpio-provider" device.
271 */
272 gpio {
273 compatible = "gpio-provider";
274
275 /* mpc52xx exp.con patchfield */
276 gpios = <&gpio_wkup 0 0 /* GPIO_WKUP_7 11d jp13-3 */
277 &gpio_wkup 1 0 /* GPIO_WKUP_6 14c */
278 &gpio_wkup 6 0 /* PSC2_4 43c x5-11 */
279 &gpio_simple 2 0 /* IRDA_1 24c x7-6 set GPS_PORT_CONFIG[IRDA] = 0 */
280 &gpio_simple 3 0 /* IRDA_0 x8-5 set GPS_PORT_CONFIG[IRDA] = 0 */
281 &gpt2 0 0 /* timer2 12d x4-4 */
282 &gpt3 0 0 /* timer3 13d x6-4 */
283 &gpt4 0 0 /* timer4 61c x2-16 */
284 &gpt5 0 0 /* timer5 44c x7-11 */
285 &gpt6 0 0 /* timer6 60c x8-15 */
286 &gpt7 0 0 /* timer7 36a x17-9 */
287 >;
288 };
289 }; 271 };
290 272
291 pci@f0000d00 { 273 pci@f0000d00 {
diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts
index 5fb6f6684b0e..2d9fa68f641c 100644
--- a/arch/powerpc/boot/dts/sbc8349.dts
+++ b/arch/powerpc/boot/dts/sbc8349.dts
@@ -144,7 +144,7 @@
144 interrupt-parent = <&ipic>; 144 interrupt-parent = <&ipic>;
145 interrupts = <39 0x8>; 145 interrupts = <39 0x8>;
146 phy_type = "ulpi"; 146 phy_type = "ulpi";
147 port1; 147 port0;
148 }; 148 };
149 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ 149 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
150 usb@23000 { 150 usb@23000 {
diff --git a/arch/powerpc/boot/dts/xcalibur1501.dts b/arch/powerpc/boot/dts/xcalibur1501.dts
new file mode 100644
index 000000000000..ac0a617b4299
--- /dev/null
+++ b/arch/powerpc/boot/dts/xcalibur1501.dts
@@ -0,0 +1,696 @@
1/*
2 * Copyright (C) 2008 Extreme Engineering Solutions, Inc.
3 * Based on MPC8572DS device tree from Freescale Semiconductor, Inc.
4 *
5 * XCalibur1501 6U CompactPCI single-board computer based on MPC8572E
6 *
7 * This 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/dts-v1/;
13/ {
14 model = "xes,xcalibur1501";
15 compatible = "xes,xcalibur1501", "xes,MPC8572";
16 #address-cells = <2>;
17 #size-cells = <2>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 ethernet2 = &enet2;
23 ethernet3 = &enet3;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci2 = &pci2;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 PowerPC,8572@0 {
34 device_type = "cpu";
35 reg = <0x0>;
36 d-cache-line-size = <32>; // 32 bytes
37 i-cache-line-size = <32>; // 32 bytes
38 d-cache-size = <0x8000>; // L1, 32K
39 i-cache-size = <0x8000>; // L1, 32K
40 timebase-frequency = <0>;
41 bus-frequency = <0>;
42 clock-frequency = <0>;
43 next-level-cache = <&L2>;
44 };
45
46 PowerPC,8572@1 {
47 device_type = "cpu";
48 reg = <0x1>;
49 d-cache-line-size = <32>; // 32 bytes
50 i-cache-line-size = <32>; // 32 bytes
51 d-cache-size = <0x8000>; // L1, 32K
52 i-cache-size = <0x8000>; // L1, 32K
53 timebase-frequency = <0>;
54 bus-frequency = <0>;
55 clock-frequency = <0>;
56 next-level-cache = <&L2>;
57 };
58 };
59
60 memory {
61 device_type = "memory";
62 reg = <0x0 0x0 0x0 0x0>; // Filled in by U-Boot
63 };
64
65 localbus@ef005000 {
66 #address-cells = <2>;
67 #size-cells = <1>;
68 compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";
69 reg = <0 0xef005000 0 0x1000>;
70 interrupts = <19 2>;
71 interrupt-parent = <&mpic>;
72 /* Local bus region mappings */
73 ranges = <0 0 0 0xf8000000 0x8000000 /* CS0: Flash 1 */
74 1 0 0 0xf0000000 0x8000000 /* CS1: Flash 2 */
75 2 0 0 0xef800000 0x40000 /* CS2: NAND CE1 */
76 3 0 0 0xef840000 0x40000 /* CS3: NAND CE2 */
77 4 0 0 0xe9000000 0x100000>; /* CS4: USB */
78
79 nor-boot@0,0 {
80 compatible = "amd,s29gl01gp", "cfi-flash";
81 bank-width = <2>;
82 reg = <0 0 0x8000000>; /* 128MB */
83 #address-cells = <1>;
84 #size-cells = <1>;
85 partition@0 {
86 label = "Primary user space";
87 reg = <0x00000000 0x6f00000>; /* 111 MB */
88 };
89 partition@6f00000 {
90 label = "Primary kernel";
91 reg = <0x6f00000 0x1000000>; /* 16 MB */
92 };
93 partition@7f00000 {
94 label = "Primary DTB";
95 reg = <0x7f00000 0x40000>; /* 256 KB */
96 };
97 partition@7f40000 {
98 label = "Primary U-Boot environment";
99 reg = <0x7f40000 0x40000>; /* 256 KB */
100 };
101 partition@7f80000 {
102 label = "Primary U-Boot";
103 reg = <0x7f80000 0x80000>; /* 512 KB */
104 read-only;
105 };
106 };
107
108 nor-alternate@1,0 {
109 compatible = "amd,s29gl01gp", "cfi-flash";
110 bank-width = <2>;
111 //reg = <0xf0000000 0x08000000>; /* 128MB */
112 reg = <1 0 0x8000000>; /* 128MB */
113 #address-cells = <1>;
114 #size-cells = <1>;
115 partition@0 {
116 label = "Secondary user space";
117 reg = <0x00000000 0x6f00000>; /* 111 MB */
118 };
119 partition@6f00000 {
120 label = "Secondary kernel";
121 reg = <0x6f00000 0x1000000>; /* 16 MB */
122 };
123 partition@7f00000 {
124 label = "Secondary DTB";
125 reg = <0x7f00000 0x40000>; /* 256 KB */
126 };
127 partition@7f40000 {
128 label = "Secondary U-Boot environment";
129 reg = <0x7f40000 0x40000>; /* 256 KB */
130 };
131 partition@7f80000 {
132 label = "Secondary U-Boot";
133 reg = <0x7f80000 0x80000>; /* 512 KB */
134 read-only;
135 };
136 };
137
138 nand@2,0 {
139 #address-cells = <1>;
140 #size-cells = <1>;
141 /*
142 * Actual part could be ST Micro NAND08GW3B2A (1 GB),
143 * Micron MT29F8G08DAA (2x 512 MB), or Micron
144 * MT29F16G08FAA (2x 1 GB), depending on the build
145 * configuration
146 */
147 compatible = "fsl,mpc8572-fcm-nand",
148 "fsl,elbc-fcm-nand";
149 reg = <2 0 0x40000>;
150 /* U-Boot should fix this up if chip size > 1 GB */
151 partition@0 {
152 label = "NAND Filesystem";
153 reg = <0 0x40000000>;
154 };
155 };
156
157 usb@4,0 {
158 compatible = "nxp,usb-isp1761";
159 reg = <4 0 0x100000>;
160 bus-width = <32>;
161 interrupt-parent = <&mpic>;
162 interrupts = <10 1>;
163 };
164 };
165
166 soc8572@ef000000 {
167 #address-cells = <1>;
168 #size-cells = <1>;
169 device_type = "soc";
170 compatible = "fsl,mpc8572-immr", "simple-bus";
171 ranges = <0x0 0 0xef000000 0x100000>;
172 bus-frequency = <0>; // Filled out by uboot.
173
174 ecm-law@0 {
175 compatible = "fsl,ecm-law";
176 reg = <0x0 0x1000>;
177 fsl,num-laws = <12>;
178 };
179
180 ecm@1000 {
181 compatible = "fsl,mpc8572-ecm", "fsl,ecm";
182 reg = <0x1000 0x1000>;
183 interrupts = <17 2>;
184 interrupt-parent = <&mpic>;
185 };
186
187 memory-controller@2000 {
188 compatible = "fsl,mpc8572-memory-controller";
189 reg = <0x2000 0x1000>;
190 interrupt-parent = <&mpic>;
191 interrupts = <18 2>;
192 };
193
194 memory-controller@6000 {
195 compatible = "fsl,mpc8572-memory-controller";
196 reg = <0x6000 0x1000>;
197 interrupt-parent = <&mpic>;
198 interrupts = <18 2>;
199 };
200
201 L2: l2-cache-controller@20000 {
202 compatible = "fsl,mpc8572-l2-cache-controller";
203 reg = <0x20000 0x1000>;
204 cache-line-size = <32>; // 32 bytes
205 cache-size = <0x100000>; // L2, 1M
206 interrupt-parent = <&mpic>;
207 interrupts = <16 2>;
208 };
209
210 i2c@3000 {
211 #address-cells = <1>;
212 #size-cells = <0>;
213 cell-index = <0>;
214 compatible = "fsl-i2c";
215 reg = <0x3000 0x100>;
216 interrupts = <43 2>;
217 interrupt-parent = <&mpic>;
218 dfsrr;
219
220 temp-sensor@48 {
221 compatible = "dallas,ds1631", "dallas,ds1621";
222 reg = <0x48>;
223 };
224
225 temp-sensor@4c {
226 compatible = "adi,adt7461";
227 reg = <0x4c>;
228 };
229
230 cpu-supervisor@51 {
231 compatible = "dallas,ds4510";
232 reg = <0x51>;
233 };
234
235 eeprom@54 {
236 compatible = "atmel,at24c128b";
237 reg = <0x54>;
238 };
239
240 rtc@68 {
241 compatible = "stm,m41t00",
242 "dallas,ds1338";
243 reg = <0x68>;
244 };
245
246 pcie-switch@6a {
247 compatible = "plx,pex8648";
248 reg = <0x6a>;
249 };
250
251 /* On-board signals for VID, flash, serial */
252 gpio1: gpio@18 {
253 compatible = "nxp,pca9557";
254 reg = <0x18>;
255 #gpio-cells = <2>;
256 gpio-controller;
257 polarity = <0x00>;
258 };
259
260 /* PMC0/XMC0 signals */
261 gpio2: gpio@1c {
262 compatible = "nxp,pca9557";
263 reg = <0x1c>;
264 #gpio-cells = <2>;
265 gpio-controller;
266 polarity = <0x00>;
267 };
268
269 /* PMC1/XMC1 signals */
270 gpio3: gpio@1d {
271 compatible = "nxp,pca9557";
272 reg = <0x1d>;
273 #gpio-cells = <2>;
274 gpio-controller;
275 polarity = <0x00>;
276 };
277
278 /* CompactPCI signals (sysen, GA[4:0]) */
279 gpio4: gpio@1e {
280 compatible = "nxp,pca9557";
281 reg = <0x1e>;
282 #gpio-cells = <2>;
283 gpio-controller;
284 polarity = <0x00>;
285 };
286
287 /* CompactPCI J5 GPIO and FAL/DEG/PRST */
288 gpio5: gpio@1f {
289 compatible = "nxp,pca9557";
290 reg = <0x1f>;
291 #gpio-cells = <2>;
292 gpio-controller;
293 polarity = <0x00>;
294 };
295 };
296
297 i2c@3100 {
298 #address-cells = <1>;
299 #size-cells = <0>;
300 cell-index = <1>;
301 compatible = "fsl-i2c";
302 reg = <0x3100 0x100>;
303 interrupts = <43 2>;
304 interrupt-parent = <&mpic>;
305 dfsrr;
306 };
307
308 dma@c300 {
309 #address-cells = <1>;
310 #size-cells = <1>;
311 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
312 reg = <0xc300 0x4>;
313 ranges = <0x0 0xc100 0x200>;
314 cell-index = <1>;
315 dma-channel@0 {
316 compatible = "fsl,mpc8572-dma-channel",
317 "fsl,eloplus-dma-channel";
318 reg = <0x0 0x80>;
319 cell-index = <0>;
320 interrupt-parent = <&mpic>;
321 interrupts = <76 2>;
322 };
323 dma-channel@80 {
324 compatible = "fsl,mpc8572-dma-channel",
325 "fsl,eloplus-dma-channel";
326 reg = <0x80 0x80>;
327 cell-index = <1>;
328 interrupt-parent = <&mpic>;
329 interrupts = <77 2>;
330 };
331 dma-channel@100 {
332 compatible = "fsl,mpc8572-dma-channel",
333 "fsl,eloplus-dma-channel";
334 reg = <0x100 0x80>;
335 cell-index = <2>;
336 interrupt-parent = <&mpic>;
337 interrupts = <78 2>;
338 };
339 dma-channel@180 {
340 compatible = "fsl,mpc8572-dma-channel",
341 "fsl,eloplus-dma-channel";
342 reg = <0x180 0x80>;
343 cell-index = <3>;
344 interrupt-parent = <&mpic>;
345 interrupts = <79 2>;
346 };
347 };
348
349 dma@21300 {
350 #address-cells = <1>;
351 #size-cells = <1>;
352 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
353 reg = <0x21300 0x4>;
354 ranges = <0x0 0x21100 0x200>;
355 cell-index = <0>;
356 dma-channel@0 {
357 compatible = "fsl,mpc8572-dma-channel",
358 "fsl,eloplus-dma-channel";
359 reg = <0x0 0x80>;
360 cell-index = <0>;
361 interrupt-parent = <&mpic>;
362 interrupts = <20 2>;
363 };
364 dma-channel@80 {
365 compatible = "fsl,mpc8572-dma-channel",
366 "fsl,eloplus-dma-channel";
367 reg = <0x80 0x80>;
368 cell-index = <1>;
369 interrupt-parent = <&mpic>;
370 interrupts = <21 2>;
371 };
372 dma-channel@100 {
373 compatible = "fsl,mpc8572-dma-channel",
374 "fsl,eloplus-dma-channel";
375 reg = <0x100 0x80>;
376 cell-index = <2>;
377 interrupt-parent = <&mpic>;
378 interrupts = <22 2>;
379 };
380 dma-channel@180 {
381 compatible = "fsl,mpc8572-dma-channel",
382 "fsl,eloplus-dma-channel";
383 reg = <0x180 0x80>;
384 cell-index = <3>;
385 interrupt-parent = <&mpic>;
386 interrupts = <23 2>;
387 };
388 };
389
390 /* eTSEC 1 front panel 0 */
391 enet0: ethernet@24000 {
392 #address-cells = <1>;
393 #size-cells = <1>;
394 cell-index = <0>;
395 device_type = "network";
396 model = "eTSEC";
397 compatible = "gianfar";
398 reg = <0x24000 0x1000>;
399 ranges = <0x0 0x24000 0x1000>;
400 local-mac-address = [ 00 00 00 00 00 00 ];
401 interrupts = <29 2 30 2 34 2>;
402 interrupt-parent = <&mpic>;
403 tbi-handle = <&tbi0>;
404 phy-handle = <&phy0>;
405 phy-connection-type = "sgmii";
406
407 mdio@520 {
408 #address-cells = <1>;
409 #size-cells = <0>;
410 compatible = "fsl,gianfar-mdio";
411 reg = <0x520 0x20>;
412
413 phy0: ethernet-phy@1 {
414 interrupt-parent = <&mpic>;
415 interrupts = <4 1>;
416 reg = <0x1>;
417 };
418 phy1: ethernet-phy@2 {
419 interrupt-parent = <&mpic>;
420 interrupts = <4 1>;
421 reg = <0x2>;
422 };
423 phy2: ethernet-phy@3 {
424 interrupt-parent = <&mpic>;
425 interrupts = <5 1>;
426 reg = <0x3>;
427 };
428 phy3: ethernet-phy@4 {
429 interrupt-parent = <&mpic>;
430 interrupts = <5 1>;
431 reg = <0x4>;
432 };
433 tbi0: tbi-phy@11 {
434 reg = <0x11>;
435 device_type = "tbi-phy";
436 };
437 };
438 };
439
440 /* eTSEC 2 front panel 1 */
441 enet1: ethernet@25000 {
442 #address-cells = <1>;
443 #size-cells = <1>;
444 cell-index = <1>;
445 device_type = "network";
446 model = "eTSEC";
447 compatible = "gianfar";
448 reg = <0x25000 0x1000>;
449 ranges = <0x0 0x25000 0x1000>;
450 local-mac-address = [ 00 00 00 00 00 00 ];
451 interrupts = <35 2 36 2 40 2>;
452 interrupt-parent = <&mpic>;
453 tbi-handle = <&tbi1>;
454 phy-handle = <&phy1>;
455 phy-connection-type = "sgmii";
456
457 mdio@520 {
458 #address-cells = <1>;
459 #size-cells = <0>;
460 compatible = "fsl,gianfar-tbi";
461 reg = <0x520 0x20>;
462
463 tbi1: tbi-phy@11 {
464 reg = <0x11>;
465 device_type = "tbi-phy";
466 };
467 };
468 };
469
470 /* eTSEC 3 PICMG2.16 backplane port 0 */
471 enet2: ethernet@26000 {
472 #address-cells = <1>;
473 #size-cells = <1>;
474 cell-index = <2>;
475 device_type = "network";
476 model = "eTSEC";
477 compatible = "gianfar";
478 reg = <0x26000 0x1000>;
479 ranges = <0x0 0x26000 0x1000>;
480 local-mac-address = [ 00 00 00 00 00 00 ];
481 interrupts = <31 2 32 2 33 2>;
482 interrupt-parent = <&mpic>;
483 tbi-handle = <&tbi2>;
484 phy-handle = <&phy2>;
485 phy-connection-type = "sgmii";
486
487 mdio@520 {
488 #address-cells = <1>;
489 #size-cells = <0>;
490 compatible = "fsl,gianfar-tbi";
491 reg = <0x520 0x20>;
492
493 tbi2: tbi-phy@11 {
494 reg = <0x11>;
495 device_type = "tbi-phy";
496 };
497 };
498 };
499
500 /* eTSEC 4 PICMG2.16 backplane port 1 */
501 enet3: ethernet@27000 {
502 #address-cells = <1>;
503 #size-cells = <1>;
504 cell-index = <3>;
505 device_type = "network";
506 model = "eTSEC";
507 compatible = "gianfar";
508 reg = <0x27000 0x1000>;
509 ranges = <0x0 0x27000 0x1000>;
510 local-mac-address = [ 00 00 00 00 00 00 ];
511 interrupts = <37 2 38 2 39 2>;
512 interrupt-parent = <&mpic>;
513 tbi-handle = <&tbi3>;
514 phy-handle = <&phy3>;
515 phy-connection-type = "sgmii";
516
517 mdio@520 {
518 #address-cells = <1>;
519 #size-cells = <0>;
520 compatible = "fsl,gianfar-tbi";
521 reg = <0x520 0x20>;
522
523 tbi3: tbi-phy@11 {
524 reg = <0x11>;
525 device_type = "tbi-phy";
526 };
527 };
528 };
529
530 /* UART0 */
531 serial0: serial@4500 {
532 cell-index = <0>;
533 device_type = "serial";
534 compatible = "ns16550";
535 reg = <0x4500 0x100>;
536 clock-frequency = <0>;
537 interrupts = <42 2>;
538 interrupt-parent = <&mpic>;
539 };
540
541 /* UART1 */
542 serial1: serial@4600 {
543 cell-index = <1>;
544 device_type = "serial";
545 compatible = "ns16550";
546 reg = <0x4600 0x100>;
547 clock-frequency = <0>;
548 interrupts = <42 2>;
549 interrupt-parent = <&mpic>;
550 };
551
552 global-utilities@e0000 { //global utilities block
553 compatible = "fsl,mpc8572-guts";
554 reg = <0xe0000 0x1000>;
555 fsl,has-rstcr;
556 };
557
558 msi@41600 {
559 compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
560 reg = <0x41600 0x80>;
561 msi-available-ranges = <0 0x100>;
562 interrupts = <
563 0xe0 0
564 0xe1 0
565 0xe2 0
566 0xe3 0
567 0xe4 0
568 0xe5 0
569 0xe6 0
570 0xe7 0>;
571 interrupt-parent = <&mpic>;
572 };
573
574 crypto@30000 {
575 compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
576 "fsl,sec2.1", "fsl,sec2.0";
577 reg = <0x30000 0x10000>;
578 interrupts = <45 2 58 2>;
579 interrupt-parent = <&mpic>;
580 fsl,num-channels = <4>;
581 fsl,channel-fifo-len = <24>;
582 fsl,exec-units-mask = <0x9fe>;
583 fsl,descriptor-types-mask = <0x3ab0ebf>;
584 };
585
586 mpic: pic@40000 {
587 interrupt-controller;
588 #address-cells = <0>;
589 #interrupt-cells = <2>;
590 reg = <0x40000 0x40000>;
591 compatible = "chrp,open-pic";
592 device_type = "open-pic";
593 };
594
595 gpio0: gpio@f000 {
596 compatible = "fsl,mpc8572-gpio";
597 reg = <0xf000 0x1000>;
598 interrupts = <47 2>;
599 interrupt-parent = <&mpic>;
600 #gpio-cells = <2>;
601 gpio-controller;
602 };
603
604 gpio-leds {
605 compatible = "gpio-leds";
606
607 heartbeat {
608 label = "Heartbeat";
609 gpios = <&gpio0 4 1>;
610 linux,default-trigger = "heartbeat";
611 };
612
613 yellow {
614 label = "Yellow";
615 gpios = <&gpio0 5 1>;
616 };
617
618 red {
619 label = "Red";
620 gpios = <&gpio0 6 1>;
621 };
622
623 green {
624 label = "Green";
625 gpios = <&gpio0 7 1>;
626 };
627 };
628
629 /* PME (pattern-matcher) */
630 pme@10000 {
631 compatible = "fsl,mpc8572-pme", "pme8572";
632 reg = <0x10000 0x5000>;
633 interrupts = <57 2 64 2 65 2 66 2 67 2>;
634 interrupt-parent = <&mpic>;
635 };
636
637 tlu@2f000 {
638 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
639 reg = <0x2f000 0x1000>;
640 interupts = <61 2 >;
641 interrupt-parent = <&mpic>;
642 };
643
644 tlu@15000 {
645 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
646 reg = <0x15000 0x1000>;
647 interupts = <75 2>;
648 interrupt-parent = <&mpic>;
649 };
650 };
651
652 /*
653 * PCI Express controller 3 @ ef008000 is not used.
654 * This would have been pci0 on other mpc85xx platforms.
655 *
656 * PCI Express controller 2 @ ef009000 is not used.
657 * This would have been pci1 on other mpc85xx platforms.
658 */
659
660 /* PCI Express controller 1, wired to PEX8648 PCIe switch */
661 pci2: pcie@ef00a000 {
662 compatible = "fsl,mpc8548-pcie";
663 device_type = "pci";
664 #interrupt-cells = <1>;
665 #size-cells = <2>;
666 #address-cells = <3>;
667 reg = <0 0xef00a000 0 0x1000>;
668 bus-range = <0 255>;
669 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x40000000
670 0x1000000 0x0 0x00000000 0 0xe8000000 0x0 0x10000>;
671 clock-frequency = <33333333>;
672 interrupt-parent = <&mpic>;
673 interrupts = <26 2>;
674 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
675 interrupt-map = <
676 /* IDSEL 0x0 */
677 0x0 0x0 0x0 0x1 &mpic 0x0 0x1
678 0x0 0x0 0x0 0x2 &mpic 0x1 0x1
679 0x0 0x0 0x0 0x3 &mpic 0x2 0x1
680 0x0 0x0 0x0 0x4 &mpic 0x3 0x1
681 >;
682 pcie@0 {
683 reg = <0x0 0x0 0x0 0x0 0x0>;
684 #size-cells = <2>;
685 #address-cells = <3>;
686 device_type = "pci";
687 ranges = <0x2000000 0x0 0x80000000
688 0x2000000 0x0 0x80000000
689 0x0 0x40000000
690
691 0x1000000 0x0 0x0
692 0x1000000 0x0 0x0
693 0x0 0x100000>;
694 };
695 };
696};
diff --git a/arch/powerpc/boot/dts/xpedite5200.dts b/arch/powerpc/boot/dts/xpedite5200.dts
new file mode 100644
index 000000000000..a0cf53fbd55c
--- /dev/null
+++ b/arch/powerpc/boot/dts/xpedite5200.dts
@@ -0,0 +1,466 @@
1/*
2 * Copyright (C) 2009 Extreme Engineering Solutions, Inc.
3 * Based on TQM8548 device tree
4 *
5 * XPedite5200 PrPMC/XMC module based on MPC8548E
6 *
7 * This 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/dts-v1/;
13
14/ {
15 model = "xes,xpedite5200";
16 compatible = "xes,xpedite5200", "xes,MPC8548";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 ethernet2 = &enet2;
24 ethernet3 = &enet3;
25
26 serial0 = &serial0;
27 serial1 = &serial1;
28 pci0 = &pci0;
29 };
30
31 cpus {
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 PowerPC,8548@0 {
36 device_type = "cpu";
37 reg = <0>;
38 d-cache-line-size = <32>; // 32 bytes
39 i-cache-line-size = <32>; // 32 bytes
40 d-cache-size = <0x8000>; // L1, 32K
41 i-cache-size = <0x8000>; // L1, 32K
42 next-level-cache = <&L2>;
43 };
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0x0 0x0>; // Filled in by U-Boot
49 };
50
51 soc@ef000000 {
52 #address-cells = <1>;
53 #size-cells = <1>;
54 device_type = "soc";
55 ranges = <0x0 0xef000000 0x100000>;
56 bus-frequency = <0>;
57 compatible = "fsl,mpc8548-immr", "simple-bus";
58
59 ecm-law@0 {
60 compatible = "fsl,ecm-law";
61 reg = <0x0 0x1000>;
62 fsl,num-laws = <12>;
63 };
64
65 ecm@1000 {
66 compatible = "fsl,mpc8548-ecm", "fsl,ecm";
67 reg = <0x1000 0x1000>;
68 interrupts = <17 2>;
69 interrupt-parent = <&mpic>;
70 };
71
72 memory-controller@2000 {
73 compatible = "fsl,mpc8548-memory-controller";
74 reg = <0x2000 0x1000>;
75 interrupt-parent = <&mpic>;
76 interrupts = <18 2>;
77 };
78
79 L2: l2-cache-controller@20000 {
80 compatible = "fsl,mpc8548-l2-cache-controller";
81 reg = <0x20000 0x1000>;
82 cache-line-size = <32>; // 32 bytes
83 cache-size = <0x80000>; // L2, 512K
84 interrupt-parent = <&mpic>;
85 interrupts = <16 2>;
86 };
87
88 /* On-card I2C */
89 i2c@3000 {
90 #address-cells = <1>;
91 #size-cells = <0>;
92 cell-index = <0>;
93 compatible = "fsl-i2c";
94 reg = <0x3000 0x100>;
95 interrupts = <43 2>;
96 interrupt-parent = <&mpic>;
97 dfsrr;
98
99 /*
100 * Board GPIO:
101 * 0: BRD_CFG0 (1: P14 IO present)
102 * 1: BRD_CFG1 (1: FP ethernet present)
103 * 2: BRD_CFG2 (1: XMC IO present)
104 * 3: XMC root complex indicator
105 * 4: Flash boot device indicator
106 * 5: Flash write protect enable
107 * 6: PMC monarch indicator
108 * 7: PMC EREADY
109 */
110 gpio1: gpio@18 {
111 compatible = "nxp,pca9556";
112 reg = <0x18>;
113 #gpio-cells = <2>;
114 gpio-controller;
115 polarity = <0x00>;
116 };
117
118 /* P14 GPIO */
119 gpio2: gpio@19 {
120 compatible = "nxp,pca9556";
121 reg = <0x19>;
122 #gpio-cells = <2>;
123 gpio-controller;
124 polarity = <0x00>;
125 };
126
127 eeprom@50 {
128 compatible = "atmel,at24c16";
129 reg = <0x50>;
130 };
131
132 rtc@68 {
133 compatible = "stm,m41t00",
134 "dallas,ds1338";
135 reg = <0x68>;
136 };
137
138 dtt@48 {
139 compatible = "maxim,max1237";
140 reg = <0x34>;
141 };
142 };
143
144 /* Off-card I2C */
145 i2c@3100 {
146 #address-cells = <1>;
147 #size-cells = <0>;
148 cell-index = <1>;
149 compatible = "fsl-i2c";
150 reg = <0x3100 0x100>;
151 interrupts = <43 2>;
152 interrupt-parent = <&mpic>;
153 dfsrr;
154 };
155
156 dma@21300 {
157 #address-cells = <1>;
158 #size-cells = <1>;
159 compatible = "fsl,mpc8548-dma", "fsl,eloplus-dma";
160 reg = <0x21300 0x4>;
161 ranges = <0x0 0x21100 0x200>;
162 cell-index = <0>;
163 dma-channel@0 {
164 compatible = "fsl,mpc8548-dma-channel",
165 "fsl,eloplus-dma-channel";
166 reg = <0x0 0x80>;
167 cell-index = <0>;
168 interrupt-parent = <&mpic>;
169 interrupts = <20 2>;
170 };
171 dma-channel@80 {
172 compatible = "fsl,mpc8548-dma-channel",
173 "fsl,eloplus-dma-channel";
174 reg = <0x80 0x80>;
175 cell-index = <1>;
176 interrupt-parent = <&mpic>;
177 interrupts = <21 2>;
178 };
179 dma-channel@100 {
180 compatible = "fsl,mpc8548-dma-channel",
181 "fsl,eloplus-dma-channel";
182 reg = <0x100 0x80>;
183 cell-index = <2>;
184 interrupt-parent = <&mpic>;
185 interrupts = <22 2>;
186 };
187 dma-channel@180 {
188 compatible = "fsl,mpc8548-dma-channel",
189 "fsl,eloplus-dma-channel";
190 reg = <0x180 0x80>;
191 cell-index = <3>;
192 interrupt-parent = <&mpic>;
193 interrupts = <23 2>;
194 };
195 };
196
197 /* eTSEC1: Front panel port 0 */
198 enet0: ethernet@24000 {
199 #address-cells = <1>;
200 #size-cells = <1>;
201 cell-index = <0>;
202 device_type = "network";
203 model = "eTSEC";
204 compatible = "gianfar";
205 reg = <0x24000 0x1000>;
206 ranges = <0x0 0x24000 0x1000>;
207 local-mac-address = [ 00 00 00 00 00 00 ];
208 interrupts = <29 2 30 2 34 2>;
209 interrupt-parent = <&mpic>;
210 tbi-handle = <&tbi0>;
211 phy-handle = <&phy0>;
212
213 mdio@520 {
214 #address-cells = <1>;
215 #size-cells = <0>;
216 compatible = "fsl,gianfar-mdio";
217 reg = <0x520 0x20>;
218
219 phy0: ethernet-phy@1 {
220 interrupt-parent = <&mpic>;
221 interrupts = <8 1>;
222 reg = <0x1>;
223 };
224 phy1: ethernet-phy@2 {
225 interrupt-parent = <&mpic>;
226 interrupts = <8 1>;
227 reg = <0x2>;
228 };
229 phy2: ethernet-phy@3 {
230 interrupt-parent = <&mpic>;
231 interrupts = <8 1>;
232 reg = <0x3>;
233 };
234 phy3: ethernet-phy@4 {
235 interrupt-parent = <&mpic>;
236 interrupts = <8 1>;
237 reg = <0x4>;
238 };
239 tbi0: tbi-phy@11 {
240 reg = <0x11>;
241 device_type = "tbi-phy";
242 };
243 };
244 };
245
246 /* eTSEC2: Front panel port 1 */
247 enet1: ethernet@25000 {
248 #address-cells = <1>;
249 #size-cells = <1>;
250 cell-index = <1>;
251 device_type = "network";
252 model = "eTSEC";
253 compatible = "gianfar";
254 reg = <0x25000 0x1000>;
255 ranges = <0x0 0x25000 0x1000>;
256 local-mac-address = [ 00 00 00 00 00 00 ];
257 interrupts = <35 2 36 2 40 2>;
258 interrupt-parent = <&mpic>;
259 tbi-handle = <&tbi1>;
260 phy-handle = <&phy1>;
261
262 mdio@520 {
263 #address-cells = <1>;
264 #size-cells = <0>;
265 compatible = "fsl,gianfar-tbi";
266 reg = <0x520 0x20>;
267
268 tbi1: tbi-phy@11 {
269 reg = <0x11>;
270 device_type = "tbi-phy";
271 };
272 };
273 };
274
275 /* eTSEC3: Rear panel port 2 */
276 enet2: ethernet@26000 {
277 #address-cells = <1>;
278 #size-cells = <1>;
279 cell-index = <2>;
280 device_type = "network";
281 model = "eTSEC";
282 compatible = "gianfar";
283 reg = <0x26000 0x1000>;
284 ranges = <0x0 0x26000 0x1000>;
285 local-mac-address = [ 00 00 00 00 00 00 ];
286 interrupts = <31 2 32 2 33 2>;
287 interrupt-parent = <&mpic>;
288 tbi-handle = <&tbi2>;
289 phy-handle = <&phy2>;
290
291 mdio@520 {
292 #address-cells = <1>;
293 #size-cells = <0>;
294 compatible = "fsl,gianfar-tbi";
295 reg = <0x520 0x20>;
296
297 tbi2: tbi-phy@11 {
298 reg = <0x11>;
299 device_type = "tbi-phy";
300 };
301 };
302 };
303
304 /* eTSEC4: Rear panel port 3 */
305 enet3: ethernet@27000 {
306 #address-cells = <1>;
307 #size-cells = <1>;
308 cell-index = <3>;
309 device_type = "network";
310 model = "eTSEC";
311 compatible = "gianfar";
312 reg = <0x27000 0x1000>;
313 ranges = <0x0 0x27000 0x1000>;
314 local-mac-address = [ 00 00 00 00 00 00 ];
315 interrupts = <37 2 38 2 39 2>;
316 interrupt-parent = <&mpic>;
317 tbi-handle = <&tbi3>;
318 phy-handle = <&phy3>;
319
320 mdio@520 {
321 #address-cells = <1>;
322 #size-cells = <0>;
323 compatible = "fsl,gianfar-tbi";
324 reg = <0x520 0x20>;
325
326 tbi3: tbi-phy@11 {
327 reg = <0x11>;
328 device_type = "tbi-phy";
329 };
330 };
331 };
332
333 serial0: serial@4500 {
334 cell-index = <0>;
335 device_type = "serial";
336 compatible = "ns16550";
337 reg = <0x4500 0x100>;
338 clock-frequency = <0>;
339 current-speed = <115200>;
340 interrupts = <42 2>;
341 interrupt-parent = <&mpic>;
342 };
343
344 serial1: serial@4600 {
345 cell-index = <1>;
346 device_type = "serial";
347 compatible = "ns16550";
348 reg = <0x4600 0x100>;
349 clock-frequency = <0>;
350 current-speed = <115200>;
351 interrupts = <42 2>;
352 interrupt-parent = <&mpic>;
353 };
354
355 global-utilities@e0000 { // global utilities reg
356 compatible = "fsl,mpc8548-guts";
357 reg = <0xe0000 0x1000>;
358 fsl,has-rstcr;
359 };
360
361 mpic: pic@40000 {
362 interrupt-controller;
363 #address-cells = <0>;
364 #interrupt-cells = <2>;
365 reg = <0x40000 0x40000>;
366 compatible = "chrp,open-pic";
367 device_type = "open-pic";
368 };
369 };
370
371 localbus@ef005000 {
372 compatible = "fsl,mpc8548-localbus", "fsl,pq3-localbus",
373 "simple-bus";
374 #address-cells = <2>;
375 #size-cells = <1>;
376 reg = <0xef005000 0x100>; // BRx, ORx, etc.
377
378 ranges = <
379 0 0x0 0xfc000000 0x04000000 // NOR boot flash
380 1 0x0 0xf8000000 0x04000000 // NOR expansion flash
381 2 0x0 0xef800000 0x00010000 // NAND CE1
382 3 0x0 0xef840000 0x00010000 // NAND CE2
383 >;
384
385 nor-boot@0,0 {
386 #address-cells = <1>;
387 #size-cells = <1>;
388 compatible = "cfi-flash";
389 reg = <0 0x0 0x4000000>;
390 bank-width = <2>;
391
392 partition@0 {
393 label = "Primary OS";
394 reg = <0x00000000 0x180000>;
395 };
396 partition@180000 {
397 label = "Secondary OS";
398 reg = <0x00180000 0x180000>;
399 };
400 partition@300000 {
401 label = "User";
402 reg = <0x00300000 0x3c80000>;
403 };
404 partition@3f80000 {
405 label = "Boot firmware";
406 reg = <0x03f80000 0x80000>;
407 };
408 };
409
410 nor-alternate@1,0 {
411 #address-cells = <1>;
412 #size-cells = <1>;
413 compatible = "cfi-flash";
414 reg = <1 0x0 0x4000000>;
415 bank-width = <2>;
416
417 partition@0 {
418 label = "Filesystem";
419 reg = <0x00000000 0x3f80000>;
420 };
421 partition@3f80000 {
422 label = "Alternate boot firmware";
423 reg = <0x03f80000 0x80000>;
424 };
425 };
426
427 nand@2,0 {
428 #address-cells = <1>;
429 #size-cells = <1>;
430 compatible = "xes,address-ctl-nand";
431 reg = <2 0x0 0x10000>;
432 cle-line = <0x8>; /* CLE tied to A3 */
433 ale-line = <0x10>; /* ALE tied to A4 */
434
435 /* U-Boot should fix this up */
436 partition@0 {
437 label = "NAND Filesystem";
438 reg = <0 0x40000000>;
439 };
440 };
441 };
442
443 /* PMC interface */
444 pci0: pci@ef008000 {
445 #interrupt-cells = <1>;
446 #size-cells = <2>;
447 #address-cells = <3>;
448 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
449 device_type = "pci";
450 reg = <0xef008000 0x1000>;
451 clock-frequency = <33333333>;
452 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
453 interrupt-map = <
454 /* IDSEL */
455 0xe000 0 0 1 &mpic 2 1
456 0xe000 0 0 2 &mpic 3 1>;
457
458 interrupt-parent = <&mpic>;
459 interrupts = <24 2>;
460 bus-range = <0 0>;
461 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x40000000
462 0x01000000 0 0x00000000 0xe8000000 0 0x00800000>;
463 };
464
465 /* XMC PCIe is not yet enabled in U-Boot on XPedite5200 */
466};
diff --git a/arch/powerpc/boot/dts/xpedite5200_xmon.dts b/arch/powerpc/boot/dts/xpedite5200_xmon.dts
new file mode 100644
index 000000000000..c5b29752651a
--- /dev/null
+++ b/arch/powerpc/boot/dts/xpedite5200_xmon.dts
@@ -0,0 +1,506 @@
1/*
2 * Copyright (C) 2009 Extreme Engineering Solutions, Inc.
3 * Based on TQM8548 device tree
4 *
5 * XPedite5200 PrPMC/XMC module based on MPC8548E. This dts is for the
6 * xMon boot loader memory map which differs from U-Boot's.
7 *
8 * This 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/dts-v1/;
14
15/ {
16 model = "xes,xpedite5200";
17 compatible = "xes,xpedite5200", "xes,MPC8548";
18 #address-cells = <1>;
19 #size-cells = <1>;
20 form-factor = "PMC/XMC";
21 boot-bank = <0x0>;
22
23 aliases {
24 ethernet0 = &enet0;
25 ethernet1 = &enet1;
26 ethernet2 = &enet2;
27 ethernet3 = &enet3;
28
29 serial0 = &serial0;
30 serial1 = &serial1;
31 pci0 = &pci0;
32 pci1 = &pci1;
33 };
34
35 cpus {
36 #address-cells = <1>;
37 #size-cells = <0>;
38
39 PowerPC,8548@0 {
40 device_type = "cpu";
41 reg = <0>;
42 d-cache-line-size = <32>; // 32 bytes
43 i-cache-line-size = <32>; // 32 bytes
44 d-cache-size = <0x8000>; // L1, 32K
45 i-cache-size = <0x8000>; // L1, 32K
46 next-level-cache = <&L2>;
47 };
48 };
49
50 memory {
51 device_type = "memory";
52 reg = <0x0 0x0>; // Filled in by boot loader
53 };
54
55 soc@ef000000 {
56 #address-cells = <1>;
57 #size-cells = <1>;
58 device_type = "soc";
59 ranges = <0x0 0xef000000 0x100000>;
60 bus-frequency = <0>;
61 compatible = "fsl,mpc8548-immr", "simple-bus";
62
63 ecm-law@0 {
64 compatible = "fsl,ecm-law";
65 reg = <0x0 0x1000>;
66 fsl,num-laws = <12>;
67 };
68
69 ecm@1000 {
70 compatible = "fsl,mpc8548-ecm", "fsl,ecm";
71 reg = <0x1000 0x1000>;
72 interrupts = <17 2>;
73 interrupt-parent = <&mpic>;
74 };
75
76 memory-controller@2000 {
77 compatible = "fsl,mpc8548-memory-controller";
78 reg = <0x2000 0x1000>;
79 interrupt-parent = <&mpic>;
80 interrupts = <18 2>;
81 };
82
83 L2: l2-cache-controller@20000 {
84 compatible = "fsl,mpc8548-l2-cache-controller";
85 reg = <0x20000 0x1000>;
86 cache-line-size = <32>; // 32 bytes
87 cache-size = <0x80000>; // L2, 512K
88 interrupt-parent = <&mpic>;
89 interrupts = <16 2>;
90 };
91
92 /* On-card I2C */
93 i2c@3000 {
94 #address-cells = <1>;
95 #size-cells = <0>;
96 cell-index = <0>;
97 compatible = "fsl-i2c";
98 reg = <0x3000 0x100>;
99 interrupts = <43 2>;
100 interrupt-parent = <&mpic>;
101 dfsrr;
102
103 /*
104 * Board GPIO:
105 * 0: BRD_CFG0 (1: P14 IO present)
106 * 1: BRD_CFG1 (1: FP ethernet present)
107 * 2: BRD_CFG2 (1: XMC IO present)
108 * 3: XMC root complex indicator
109 * 4: Flash boot device indicator
110 * 5: Flash write protect enable
111 * 6: PMC monarch indicator
112 * 7: PMC EREADY
113 */
114 gpio1: gpio@18 {
115 compatible = "nxp,pca9556";
116 reg = <0x18>;
117 #gpio-cells = <2>;
118 gpio-controller;
119 polarity = <0x00>;
120 };
121
122 /* P14 GPIO */
123 gpio2: gpio@19 {
124 compatible = "nxp,pca9556";
125 reg = <0x19>;
126 #gpio-cells = <2>;
127 gpio-controller;
128 polarity = <0x00>;
129 };
130
131 eeprom@50 {
132 compatible = "atmel,at24c16";
133 reg = <0x50>;
134 };
135
136 rtc@68 {
137 compatible = "stm,m41t00",
138 "dallas,ds1338";
139 reg = <0x68>;
140 };
141
142 dtt@48 {
143 compatible = "maxim,max1237";
144 reg = <0x34>;
145 };
146 };
147
148 /* Off-card I2C */
149 i2c@3100 {
150 #address-cells = <1>;
151 #size-cells = <0>;
152 cell-index = <1>;
153 compatible = "fsl-i2c";
154 reg = <0x3100 0x100>;
155 interrupts = <43 2>;
156 interrupt-parent = <&mpic>;
157 dfsrr;
158 };
159
160 dma@21300 {
161 #address-cells = <1>;
162 #size-cells = <1>;
163 compatible = "fsl,mpc8548-dma", "fsl,eloplus-dma";
164 reg = <0x21300 0x4>;
165 ranges = <0x0 0x21100 0x200>;
166 cell-index = <0>;
167 dma-channel@0 {
168 compatible = "fsl,mpc8548-dma-channel",
169 "fsl,eloplus-dma-channel";
170 reg = <0x0 0x80>;
171 cell-index = <0>;
172 interrupt-parent = <&mpic>;
173 interrupts = <20 2>;
174 };
175 dma-channel@80 {
176 compatible = "fsl,mpc8548-dma-channel",
177 "fsl,eloplus-dma-channel";
178 reg = <0x80 0x80>;
179 cell-index = <1>;
180 interrupt-parent = <&mpic>;
181 interrupts = <21 2>;
182 };
183 dma-channel@100 {
184 compatible = "fsl,mpc8548-dma-channel",
185 "fsl,eloplus-dma-channel";
186 reg = <0x100 0x80>;
187 cell-index = <2>;
188 interrupt-parent = <&mpic>;
189 interrupts = <22 2>;
190 };
191 dma-channel@180 {
192 compatible = "fsl,mpc8548-dma-channel",
193 "fsl,eloplus-dma-channel";
194 reg = <0x180 0x80>;
195 cell-index = <3>;
196 interrupt-parent = <&mpic>;
197 interrupts = <23 2>;
198 };
199 };
200
201 /* eTSEC1: Front panel port 0 */
202 enet0: ethernet@24000 {
203 #address-cells = <1>;
204 #size-cells = <1>;
205 cell-index = <0>;
206 device_type = "network";
207 model = "eTSEC";
208 compatible = "gianfar";
209 reg = <0x24000 0x1000>;
210 ranges = <0x0 0x24000 0x1000>;
211 local-mac-address = [ 00 00 00 00 00 00 ];
212 interrupts = <29 2 30 2 34 2>;
213 interrupt-parent = <&mpic>;
214 tbi-handle = <&tbi0>;
215 phy-handle = <&phy0>;
216
217 mdio@520 {
218 #address-cells = <1>;
219 #size-cells = <0>;
220 compatible = "fsl,gianfar-mdio";
221 reg = <0x520 0x20>;
222
223 phy0: ethernet-phy@1 {
224 interrupt-parent = <&mpic>;
225 interrupts = <8 1>;
226 reg = <0x1>;
227 };
228 phy1: ethernet-phy@2 {
229 interrupt-parent = <&mpic>;
230 interrupts = <8 1>;
231 reg = <0x2>;
232 };
233 phy2: ethernet-phy@3 {
234 interrupt-parent = <&mpic>;
235 interrupts = <8 1>;
236 reg = <0x3>;
237 };
238 phy3: ethernet-phy@4 {
239 interrupt-parent = <&mpic>;
240 interrupts = <8 1>;
241 reg = <0x4>;
242 };
243 tbi0: tbi-phy@11 {
244 reg = <0x11>;
245 device_type = "tbi-phy";
246 };
247 };
248 };
249
250 /* eTSEC2: Front panel port 1 */
251 enet1: ethernet@25000 {
252 #address-cells = <1>;
253 #size-cells = <1>;
254 cell-index = <1>;
255 device_type = "network";
256 model = "eTSEC";
257 compatible = "gianfar";
258 reg = <0x25000 0x1000>;
259 ranges = <0x0 0x25000 0x1000>;
260 local-mac-address = [ 00 00 00 00 00 00 ];
261 interrupts = <35 2 36 2 40 2>;
262 interrupt-parent = <&mpic>;
263 tbi-handle = <&tbi1>;
264 phy-handle = <&phy1>;
265
266 mdio@520 {
267 #address-cells = <1>;
268 #size-cells = <0>;
269 compatible = "fsl,gianfar-tbi";
270 reg = <0x520 0x20>;
271
272 tbi1: tbi-phy@11 {
273 reg = <0x11>;
274 device_type = "tbi-phy";
275 };
276 };
277 };
278
279 /* eTSEC3: Rear panel port 2 */
280 enet2: ethernet@26000 {
281 #address-cells = <1>;
282 #size-cells = <1>;
283 cell-index = <2>;
284 device_type = "network";
285 model = "eTSEC";
286 compatible = "gianfar";
287 reg = <0x26000 0x1000>;
288 ranges = <0x0 0x26000 0x1000>;
289 local-mac-address = [ 00 00 00 00 00 00 ];
290 interrupts = <31 2 32 2 33 2>;
291 interrupt-parent = <&mpic>;
292 tbi-handle = <&tbi2>;
293 phy-handle = <&phy2>;
294
295 mdio@520 {
296 #address-cells = <1>;
297 #size-cells = <0>;
298 compatible = "fsl,gianfar-tbi";
299 reg = <0x520 0x20>;
300
301 tbi2: tbi-phy@11 {
302 reg = <0x11>;
303 device_type = "tbi-phy";
304 };
305 };
306 };
307
308 /* eTSEC4: Rear panel port 3 */
309 enet3: ethernet@27000 {
310 #address-cells = <1>;
311 #size-cells = <1>;
312 cell-index = <3>;
313 device_type = "network";
314 model = "eTSEC";
315 compatible = "gianfar";
316 reg = <0x27000 0x1000>;
317 ranges = <0x0 0x27000 0x1000>;
318 local-mac-address = [ 00 00 00 00 00 00 ];
319 interrupts = <37 2 38 2 39 2>;
320 interrupt-parent = <&mpic>;
321 tbi-handle = <&tbi3>;
322 phy-handle = <&phy3>;
323
324 mdio@520 {
325 #address-cells = <1>;
326 #size-cells = <0>;
327 compatible = "fsl,gianfar-tbi";
328 reg = <0x520 0x20>;
329
330 tbi3: tbi-phy@11 {
331 reg = <0x11>;
332 device_type = "tbi-phy";
333 };
334 };
335 };
336
337 serial0: serial@4500 {
338 cell-index = <0>;
339 device_type = "serial";
340 compatible = "ns16550";
341 reg = <0x4500 0x100>;
342 clock-frequency = <0>;
343 current-speed = <9600>;
344 interrupts = <42 2>;
345 interrupt-parent = <&mpic>;
346 };
347
348 serial1: serial@4600 {
349 cell-index = <1>;
350 device_type = "serial";
351 compatible = "ns16550";
352 reg = <0x4600 0x100>;
353 clock-frequency = <0>;
354 current-speed = <9600>;
355 interrupts = <42 2>;
356 interrupt-parent = <&mpic>;
357 };
358
359 global-utilities@e0000 { // global utilities reg
360 compatible = "fsl,mpc8548-guts";
361 reg = <0xe0000 0x1000>;
362 fsl,has-rstcr;
363 };
364
365 mpic: pic@40000 {
366 interrupt-controller;
367 #address-cells = <0>;
368 #interrupt-cells = <2>;
369 reg = <0x40000 0x40000>;
370 compatible = "chrp,open-pic";
371 device_type = "open-pic";
372 };
373 };
374
375 localbus@ef005000 {
376 compatible = "fsl,mpc8548-localbus", "fsl,pq3-localbus",
377 "simple-bus";
378 #address-cells = <2>;
379 #size-cells = <1>;
380 reg = <0xef005000 0x100>; // BRx, ORx, etc.
381
382 ranges = <
383 0 0x0 0xf8000000 0x08000000 // NOR boot flash
384 1 0x0 0xf0000000 0x08000000 // NOR expansion flash
385 2 0x0 0xe8000000 0x00010000 // NAND CE1
386 3 0x0 0xe8010000 0x00010000 // NAND CE2
387 >;
388
389 nor-boot@0,0 {
390 #address-cells = <1>;
391 #size-cells = <1>;
392 compatible = "cfi-flash";
393 reg = <0 0x0 0x4000000>;
394 bank-width = <2>;
395
396 partition@0 {
397 label = "Primary OS";
398 reg = <0x00000000 0x180000>;
399 };
400 partition@180000 {
401 label = "Secondary OS";
402 reg = <0x00180000 0x180000>;
403 };
404 partition@300000 {
405 label = "User";
406 reg = <0x00300000 0x3c80000>;
407 };
408 partition@3f80000 {
409 label = "Boot firmware";
410 reg = <0x03f80000 0x80000>;
411 };
412 };
413
414 nor-alternate@1,0 {
415 #address-cells = <1>;
416 #size-cells = <1>;
417 compatible = "cfi-flash";
418 reg = <1 0x0 0x4000000>;
419 bank-width = <2>;
420
421 partition@0 {
422 label = "Filesystem";
423 reg = <0x00000000 0x3f80000>;
424 };
425 partition@3f80000 {
426 label = "Alternate boot firmware";
427 reg = <0x03f80000 0x80000>;
428 };
429 };
430
431 nand@2,0 {
432 #address-cells = <1>;
433 #size-cells = <1>;
434 compatible = "xes,address-ctl-nand";
435 reg = <2 0x0 0x10000>;
436 cle-line = <0x8>; /* CLE tied to A3 */
437 ale-line = <0x10>; /* ALE tied to A4 */
438
439 partition@0 {
440 label = "NAND Filesystem";
441 reg = <0 0x40000000>;
442 };
443 };
444 };
445
446 /* PMC interface */
447 pci0: pci@ef008000 {
448 #interrupt-cells = <1>;
449 #size-cells = <2>;
450 #address-cells = <3>;
451 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
452 device_type = "pci";
453 reg = <0xef008000 0x1000>;
454 clock-frequency = <33333333>;
455 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
456 interrupt-map = <
457 /* IDSEL */
458 0xe000 0 0 1 &mpic 2 1
459 0xe000 0 0 2 &mpic 3 1>;
460
461 interrupt-parent = <&mpic>;
462 interrupts = <24 2>;
463 bus-range = <0 0>;
464 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
465 0x01000000 0 0x00000000 0xd0000000 0 0x01000000>;
466 };
467
468 /* XMC PCIe */
469 pci1: pcie@ef00a000 {
470 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
471 interrupt-map = <
472 /* IDSEL 0x0 */
473 0x00000 0 0 1 &mpic 0 1
474 0x00000 0 0 2 &mpic 1 1
475 0x00000 0 0 3 &mpic 2 1
476 0x00000 0 0 4 &mpic 3 1>;
477
478 interrupt-parent = <&mpic>;
479 interrupts = <26 2>;
480 bus-range = <0 0xff>;
481 ranges = <0x02000000 0 0xa0000000 0xa0000000 0 0x20000000
482 0x01000000 0 0x00000000 0xd1000000 0 0x01000000>;
483 clock-frequency = <33333333>;
484 #interrupt-cells = <1>;
485 #size-cells = <2>;
486 #address-cells = <3>;
487 reg = <0xef00a000 0x1000>;
488 compatible = "fsl,mpc8548-pcie";
489 device_type = "pci";
490 pcie@0 {
491 reg = <0 0 0 0 0>;
492 #size-cells = <2>;
493 #address-cells = <3>;
494 device_type = "pci";
495 ranges = <0x02000000 0 0xc0000000 0x02000000 0
496 0xc0000000 0 0x20000000
497 0x01000000 0 0x00000000 0x01000000 0
498 0x00000000 0 0x08000000>;
499 };
500 };
501
502 /* Needed for dtbImage boot wrapper compatibility */
503 chosen {
504 linux,stdout-path = &serial0;
505 };
506};
diff --git a/arch/powerpc/boot/dts/xpedite5301.dts b/arch/powerpc/boot/dts/xpedite5301.dts
new file mode 100644
index 000000000000..db7faf5ebb39
--- /dev/null
+++ b/arch/powerpc/boot/dts/xpedite5301.dts
@@ -0,0 +1,640 @@
1/*
2 * Copyright (C) 2008 Extreme Engineering Solutions, Inc.
3 * Based on MPC8572DS device tree from Freescale Semiconductor, Inc.
4 *
5 * XPedite5301 PMC/XMC module based on MPC8572E
6 *
7 * This 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/dts-v1/;
13/ {
14 model = "xes,xpedite5301";
15 compatible = "xes,xpedite5301", "xes,MPC8572";
16 #address-cells = <2>;
17 #size-cells = <2>;
18 form-factor = "PMC/XMC";
19 boot-bank = <0x0>; /* 0: Primary flash, 1: Secondary flash */
20
21 aliases {
22 ethernet0 = &enet0;
23 ethernet1 = &enet1;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci1 = &pci1;
27 pci2 = &pci2;
28 };
29
30 cpus {
31 #address-cells = <1>;
32 #size-cells = <0>;
33
34 PowerPC,8572@0 {
35 device_type = "cpu";
36 reg = <0x0>;
37 d-cache-line-size = <32>; // 32 bytes
38 i-cache-line-size = <32>; // 32 bytes
39 d-cache-size = <0x8000>; // L1, 32K
40 i-cache-size = <0x8000>; // L1, 32K
41 timebase-frequency = <0>;
42 bus-frequency = <0>;
43 clock-frequency = <0>;
44 next-level-cache = <&L2>;
45 };
46
47 PowerPC,8572@1 {
48 device_type = "cpu";
49 reg = <0x1>;
50 d-cache-line-size = <32>; // 32 bytes
51 i-cache-line-size = <32>; // 32 bytes
52 d-cache-size = <0x8000>; // L1, 32K
53 i-cache-size = <0x8000>; // L1, 32K
54 timebase-frequency = <0>;
55 bus-frequency = <0>;
56 clock-frequency = <0>;
57 next-level-cache = <&L2>;
58 };
59 };
60
61 memory {
62 device_type = "memory";
63 reg = <0x0 0x0 0x0 0x0>; // Filled in by U-Boot
64 };
65
66 localbus@ef005000 {
67 #address-cells = <2>;
68 #size-cells = <1>;
69 compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";
70 reg = <0 0xef005000 0 0x1000>;
71 interrupts = <19 2>;
72 interrupt-parent = <&mpic>;
73 /* Local bus region mappings */
74 ranges = <0 0 0 0xf8000000 0x8000000 /* CS0: Boot flash */
75 1 0 0 0xf0000000 0x8000000 /* CS1: Alternate flash */
76 2 0 0 0xef800000 0x40000 /* CS2: NAND CE1 */
77 3 0 0 0xef840000 0x40000>; /* CS3: NAND CE2 */
78
79 nor-boot@0,0 {
80 compatible = "amd,s29gl01gp", "cfi-flash";
81 bank-width = <2>;
82 reg = <0 0 0x8000000>; /* 128MB */
83 #address-cells = <1>;
84 #size-cells = <1>;
85 partition@0 {
86 label = "Primary user space";
87 reg = <0x00000000 0x6f00000>; /* 111 MB */
88 };
89 partition@6f00000 {
90 label = "Primary kernel";
91 reg = <0x6f00000 0x1000000>; /* 16 MB */
92 };
93 partition@7f00000 {
94 label = "Primary DTB";
95 reg = <0x7f00000 0x40000>; /* 256 KB */
96 };
97 partition@7f40000 {
98 label = "Primary U-Boot environment";
99 reg = <0x7f40000 0x40000>; /* 256 KB */
100 };
101 partition@7f80000 {
102 label = "Primary U-Boot";
103 reg = <0x7f80000 0x80000>; /* 512 KB */
104 read-only;
105 };
106 };
107
108 nor-alternate@1,0 {
109 compatible = "amd,s29gl01gp", "cfi-flash";
110 bank-width = <2>;
111 //reg = <0xf0000000 0x08000000>; /* 128MB */
112 reg = <1 0 0x8000000>; /* 128MB */
113 #address-cells = <1>;
114 #size-cells = <1>;
115 partition@0 {
116 label = "Secondary user space";
117 reg = <0x00000000 0x6f00000>; /* 111 MB */
118 };
119 partition@6f00000 {
120 label = "Secondary kernel";
121 reg = <0x6f00000 0x1000000>; /* 16 MB */
122 };
123 partition@7f00000 {
124 label = "Secondary DTB";
125 reg = <0x7f00000 0x40000>; /* 256 KB */
126 };
127 partition@7f40000 {
128 label = "Secondary U-Boot environment";
129 reg = <0x7f40000 0x40000>; /* 256 KB */
130 };
131 partition@7f80000 {
132 label = "Secondary U-Boot";
133 reg = <0x7f80000 0x80000>; /* 512 KB */
134 read-only;
135 };
136 };
137
138 nand@2,0 {
139 #address-cells = <1>;
140 #size-cells = <1>;
141 /*
142 * Actual part could be ST Micro NAND08GW3B2A (1 GB),
143 * Micron MT29F8G08DAA (2x 512 MB), or Micron
144 * MT29F16G08FAA (2x 1 GB), depending on the build
145 * configuration
146 */
147 compatible = "fsl,mpc8572-fcm-nand",
148 "fsl,elbc-fcm-nand";
149 reg = <2 0 0x40000>;
150 /* U-Boot should fix this up if chip size > 1 GB */
151 partition@0 {
152 label = "NAND Filesystem";
153 reg = <0 0x40000000>;
154 };
155 };
156
157 };
158
159 soc8572@ef000000 {
160 #address-cells = <1>;
161 #size-cells = <1>;
162 device_type = "soc";
163 compatible = "fsl,mpc8572-immr", "simple-bus";
164 ranges = <0x0 0 0xef000000 0x100000>;
165 bus-frequency = <0>; // Filled out by uboot.
166
167 ecm-law@0 {
168 compatible = "fsl,ecm-law";
169 reg = <0x0 0x1000>;
170 fsl,num-laws = <12>;
171 };
172
173 ecm@1000 {
174 compatible = "fsl,mpc8572-ecm", "fsl,ecm";
175 reg = <0x1000 0x1000>;
176 interrupts = <17 2>;
177 interrupt-parent = <&mpic>;
178 };
179
180 memory-controller@2000 {
181 compatible = "fsl,mpc8572-memory-controller";
182 reg = <0x2000 0x1000>;
183 interrupt-parent = <&mpic>;
184 interrupts = <18 2>;
185 };
186
187 memory-controller@6000 {
188 compatible = "fsl,mpc8572-memory-controller";
189 reg = <0x6000 0x1000>;
190 interrupt-parent = <&mpic>;
191 interrupts = <18 2>;
192 };
193
194 L2: l2-cache-controller@20000 {
195 compatible = "fsl,mpc8572-l2-cache-controller";
196 reg = <0x20000 0x1000>;
197 cache-line-size = <32>; // 32 bytes
198 cache-size = <0x100000>; // L2, 1M
199 interrupt-parent = <&mpic>;
200 interrupts = <16 2>;
201 };
202
203 i2c@3000 {
204 #address-cells = <1>;
205 #size-cells = <0>;
206 cell-index = <0>;
207 compatible = "fsl-i2c";
208 reg = <0x3000 0x100>;
209 interrupts = <43 2>;
210 interrupt-parent = <&mpic>;
211 dfsrr;
212
213 temp-sensor@48 {
214 compatible = "dallas,ds1631", "dallas,ds1621";
215 reg = <0x48>;
216 };
217
218 temp-sensor@4c {
219 compatible = "adi,adt7461";
220 reg = <0x4c>;
221 };
222
223 cpu-supervisor@51 {
224 compatible = "dallas,ds4510";
225 reg = <0x51>;
226 };
227
228 eeprom@54 {
229 compatible = "atmel,at24c128b";
230 reg = <0x54>;
231 };
232
233 rtc@68 {
234 compatible = "stm,m41t00",
235 "dallas,ds1338";
236 reg = <0x68>;
237 };
238
239 pcie-switch@70 {
240 compatible = "plx,pex8518";
241 reg = <0x70>;
242 };
243
244 gpio1: gpio@18 {
245 compatible = "nxp,pca9557";
246 reg = <0x18>;
247 #gpio-cells = <2>;
248 gpio-controller;
249 polarity = <0x00>;
250 };
251
252 gpio2: gpio@1c {
253 compatible = "nxp,pca9557";
254 reg = <0x1c>;
255 #gpio-cells = <2>;
256 gpio-controller;
257 polarity = <0x00>;
258 };
259
260 gpio3: gpio@1e {
261 compatible = "nxp,pca9557";
262 reg = <0x1e>;
263 #gpio-cells = <2>;
264 gpio-controller;
265 polarity = <0x00>;
266 };
267
268 gpio4: gpio@1f {
269 compatible = "nxp,pca9557";
270 reg = <0x1f>;
271 #gpio-cells = <2>;
272 gpio-controller;
273 polarity = <0x00>;
274 };
275 };
276
277 i2c@3100 {
278 #address-cells = <1>;
279 #size-cells = <0>;
280 cell-index = <1>;
281 compatible = "fsl-i2c";
282 reg = <0x3100 0x100>;
283 interrupts = <43 2>;
284 interrupt-parent = <&mpic>;
285 dfsrr;
286 };
287
288 dma@c300 {
289 #address-cells = <1>;
290 #size-cells = <1>;
291 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
292 reg = <0xc300 0x4>;
293 ranges = <0x0 0xc100 0x200>;
294 cell-index = <1>;
295 dma-channel@0 {
296 compatible = "fsl,mpc8572-dma-channel",
297 "fsl,eloplus-dma-channel";
298 reg = <0x0 0x80>;
299 cell-index = <0>;
300 interrupt-parent = <&mpic>;
301 interrupts = <76 2>;
302 };
303 dma-channel@80 {
304 compatible = "fsl,mpc8572-dma-channel",
305 "fsl,eloplus-dma-channel";
306 reg = <0x80 0x80>;
307 cell-index = <1>;
308 interrupt-parent = <&mpic>;
309 interrupts = <77 2>;
310 };
311 dma-channel@100 {
312 compatible = "fsl,mpc8572-dma-channel",
313 "fsl,eloplus-dma-channel";
314 reg = <0x100 0x80>;
315 cell-index = <2>;
316 interrupt-parent = <&mpic>;
317 interrupts = <78 2>;
318 };
319 dma-channel@180 {
320 compatible = "fsl,mpc8572-dma-channel",
321 "fsl,eloplus-dma-channel";
322 reg = <0x180 0x80>;
323 cell-index = <3>;
324 interrupt-parent = <&mpic>;
325 interrupts = <79 2>;
326 };
327 };
328
329 dma@21300 {
330 #address-cells = <1>;
331 #size-cells = <1>;
332 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
333 reg = <0x21300 0x4>;
334 ranges = <0x0 0x21100 0x200>;
335 cell-index = <0>;
336 dma-channel@0 {
337 compatible = "fsl,mpc8572-dma-channel",
338 "fsl,eloplus-dma-channel";
339 reg = <0x0 0x80>;
340 cell-index = <0>;
341 interrupt-parent = <&mpic>;
342 interrupts = <20 2>;
343 };
344 dma-channel@80 {
345 compatible = "fsl,mpc8572-dma-channel",
346 "fsl,eloplus-dma-channel";
347 reg = <0x80 0x80>;
348 cell-index = <1>;
349 interrupt-parent = <&mpic>;
350 interrupts = <21 2>;
351 };
352 dma-channel@100 {
353 compatible = "fsl,mpc8572-dma-channel",
354 "fsl,eloplus-dma-channel";
355 reg = <0x100 0x80>;
356 cell-index = <2>;
357 interrupt-parent = <&mpic>;
358 interrupts = <22 2>;
359 };
360 dma-channel@180 {
361 compatible = "fsl,mpc8572-dma-channel",
362 "fsl,eloplus-dma-channel";
363 reg = <0x180 0x80>;
364 cell-index = <3>;
365 interrupt-parent = <&mpic>;
366 interrupts = <23 2>;
367 };
368 };
369
370 /* eTSEC 1 */
371 enet0: ethernet@24000 {
372 #address-cells = <1>;
373 #size-cells = <1>;
374 cell-index = <0>;
375 device_type = "network";
376 model = "eTSEC";
377 compatible = "gianfar";
378 reg = <0x24000 0x1000>;
379 ranges = <0x0 0x24000 0x1000>;
380 local-mac-address = [ 00 00 00 00 00 00 ];
381 interrupts = <29 2 30 2 34 2>;
382 interrupt-parent = <&mpic>;
383 tbi-handle = <&tbi0>;
384 phy-handle = <&phy0>;
385 phy-connection-type = "sgmii";
386
387 mdio@520 {
388 #address-cells = <1>;
389 #size-cells = <0>;
390 compatible = "fsl,gianfar-mdio";
391 reg = <0x520 0x20>;
392
393 phy0: ethernet-phy@1 {
394 interrupt-parent = <&mpic>;
395 interrupts = <8 1>;
396 reg = <0x1>;
397 };
398 phy1: ethernet-phy@2 {
399 interrupt-parent = <&mpic>;
400 interrupts = <8 1>;
401 reg = <0x2>;
402 };
403 tbi0: tbi-phy@11 {
404 reg = <0x11>;
405 device_type = "tbi-phy";
406 };
407 };
408 };
409
410 /* eTSEC 2 */
411 enet1: ethernet@25000 {
412 #address-cells = <1>;
413 #size-cells = <1>;
414 cell-index = <1>;
415 device_type = "network";
416 model = "eTSEC";
417 compatible = "gianfar";
418 reg = <0x25000 0x1000>;
419 ranges = <0x0 0x25000 0x1000>;
420 local-mac-address = [ 00 00 00 00 00 00 ];
421 interrupts = <35 2 36 2 40 2>;
422 interrupt-parent = <&mpic>;
423 tbi-handle = <&tbi1>;
424 phy-handle = <&phy1>;
425 phy-connection-type = "sgmii";
426
427 mdio@520 {
428 #address-cells = <1>;
429 #size-cells = <0>;
430 compatible = "fsl,gianfar-tbi";
431 reg = <0x520 0x20>;
432
433 tbi1: tbi-phy@11 {
434 reg = <0x11>;
435 device_type = "tbi-phy";
436 };
437 };
438 };
439
440 /* UART0 */
441 serial0: serial@4500 {
442 cell-index = <0>;
443 device_type = "serial";
444 compatible = "ns16550";
445 reg = <0x4500 0x100>;
446 clock-frequency = <0>;
447 interrupts = <42 2>;
448 interrupt-parent = <&mpic>;
449 };
450
451 /* UART1 */
452 serial1: serial@4600 {
453 cell-index = <1>;
454 device_type = "serial";
455 compatible = "ns16550";
456 reg = <0x4600 0x100>;
457 clock-frequency = <0>;
458 interrupts = <42 2>;
459 interrupt-parent = <&mpic>;
460 };
461
462 global-utilities@e0000 { //global utilities block
463 compatible = "fsl,mpc8572-guts";
464 reg = <0xe0000 0x1000>;
465 fsl,has-rstcr;
466 };
467
468 msi@41600 {
469 compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
470 reg = <0x41600 0x80>;
471 msi-available-ranges = <0 0x100>;
472 interrupts = <
473 0xe0 0
474 0xe1 0
475 0xe2 0
476 0xe3 0
477 0xe4 0
478 0xe5 0
479 0xe6 0
480 0xe7 0>;
481 interrupt-parent = <&mpic>;
482 };
483
484 crypto@30000 {
485 compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
486 "fsl,sec2.1", "fsl,sec2.0";
487 reg = <0x30000 0x10000>;
488 interrupts = <45 2 58 2>;
489 interrupt-parent = <&mpic>;
490 fsl,num-channels = <4>;
491 fsl,channel-fifo-len = <24>;
492 fsl,exec-units-mask = <0x9fe>;
493 fsl,descriptor-types-mask = <0x3ab0ebf>;
494 };
495
496 mpic: pic@40000 {
497 interrupt-controller;
498 #address-cells = <0>;
499 #interrupt-cells = <2>;
500 reg = <0x40000 0x40000>;
501 compatible = "chrp,open-pic";
502 device_type = "open-pic";
503 };
504
505 gpio0: gpio@f000 {
506 compatible = "fsl,mpc8572-gpio";
507 reg = <0xf000 0x1000>;
508 interrupts = <47 2>;
509 interrupt-parent = <&mpic>;
510 #gpio-cells = <2>;
511 gpio-controller;
512 };
513
514 gpio-leds {
515 compatible = "gpio-leds";
516
517 heartbeat {
518 label = "Heartbeat";
519 gpios = <&gpio0 4 1>;
520 linux,default-trigger = "heartbeat";
521 };
522
523 yellow {
524 label = "Yellow";
525 gpios = <&gpio0 5 1>;
526 };
527
528 red {
529 label = "Red";
530 gpios = <&gpio0 6 1>;
531 };
532
533 green {
534 label = "Green";
535 gpios = <&gpio0 7 1>;
536 };
537 };
538
539 /* PME (pattern-matcher) */
540 pme@10000 {
541 compatible = "fsl,mpc8572-pme", "pme8572";
542 reg = <0x10000 0x5000>;
543 interrupts = <57 2 64 2 65 2 66 2 67 2>;
544 interrupt-parent = <&mpic>;
545 };
546
547 tlu@2f000 {
548 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
549 reg = <0x2f000 0x1000>;
550 interupts = <61 2 >;
551 interrupt-parent = <&mpic>;
552 };
553
554 tlu@15000 {
555 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
556 reg = <0x15000 0x1000>;
557 interupts = <75 2>;
558 interrupt-parent = <&mpic>;
559 };
560 };
561
562 /*
563 * PCI Express controller 3 @ ef008000 is not used.
564 * This would have been pci0 on other mpc85xx platforms.
565 */
566
567 /* PCI Express controller 2, wired to XMC P15 connector */
568 pci1: pcie@ef009000 {
569 compatible = "fsl,mpc8548-pcie";
570 device_type = "pci";
571 #interrupt-cells = <1>;
572 #size-cells = <2>;
573 #address-cells = <3>;
574 reg = <0 0xef009000 0 0x1000>;
575 bus-range = <0 255>;
576 ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x10000000
577 0x1000000 0x0 0x00000000 0 0xe8800000 0x0 0x00010000>;
578 clock-frequency = <33333333>;
579 interrupt-parent = <&mpic>;
580 interrupts = <25 2>;
581 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
582 interrupt-map = <
583 /* IDSEL 0x0 */
584 0x0 0x0 0x0 0x1 &mpic 0x4 0x1
585 0x0 0x0 0x0 0x2 &mpic 0x5 0x1
586 0x0 0x0 0x0 0x3 &mpic 0x6 0x1
587 0x0 0x0 0x0 0x4 &mpic 0x7 0x1
588 >;
589 pcie@0 {
590 reg = <0x00000000 0x00000000 0x00000000 0x00000000 0x00000000>;
591 #size-cells = <2>;
592 #address-cells = <3>;
593 device_type = "pci";
594 ranges = <0x2000000 0x0 0xc0000000
595 0x2000000 0x0 0xc0000000
596 0x0 0x10000000
597
598 0x1000000 0x0 0x0
599 0x1000000 0x0 0x0
600 0x0 0x100000>;
601 };
602 };
603
604 /* PCI Express controller 1, wired to PEX8112 for PMC interface */
605 pci2: pcie@ef00a000 {
606 compatible = "fsl,mpc8548-pcie";
607 device_type = "pci";
608 #interrupt-cells = <1>;
609 #size-cells = <2>;
610 #address-cells = <3>;
611 reg = <0 0xef00a000 0 0x1000>;
612 bus-range = <0 255>;
613 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x40000000
614 0x1000000 0x0 0x00000000 0 0xe8000000 0x0 0x10000>;
615 clock-frequency = <33333333>;
616 interrupt-parent = <&mpic>;
617 interrupts = <26 2>;
618 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
619 interrupt-map = <
620 /* IDSEL 0x0 */
621 0x0 0x0 0x0 0x1 &mpic 0x0 0x1
622 0x0 0x0 0x0 0x2 &mpic 0x1 0x1
623 0x0 0x0 0x0 0x3 &mpic 0x2 0x1
624 0x0 0x0 0x0 0x4 &mpic 0x3 0x1
625 >;
626 pcie@0 {
627 reg = <0x0 0x0 0x0 0x0 0x0>;
628 #size-cells = <2>;
629 #address-cells = <3>;
630 device_type = "pci";
631 ranges = <0x2000000 0x0 0x80000000
632 0x2000000 0x0 0x80000000
633 0x0 0x40000000
634
635 0x1000000 0x0 0x0
636 0x1000000 0x0 0x0
637 0x0 0x100000>;
638 };
639 };
640};
diff --git a/arch/powerpc/boot/dts/xpedite5330.dts b/arch/powerpc/boot/dts/xpedite5330.dts
new file mode 100644
index 000000000000..c364ca6ff7d0
--- /dev/null
+++ b/arch/powerpc/boot/dts/xpedite5330.dts
@@ -0,0 +1,707 @@
1/*
2 * Copyright (C) 2008 Extreme Engineering Solutions, Inc.
3 * Based on MPC8572DS device tree from Freescale Semiconductor, Inc.
4 *
5 * XPedite5330 3U CompactPCI module based on MPC8572E
6 *
7 * This 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/dts-v1/;
13/ {
14 model = "xes,xpedite5330";
15 compatible = "xes,xpedite5330", "xes,MPC8572";
16 #address-cells = <2>;
17 #size-cells = <2>;
18 form-factor = "3U CompactPCI";
19 boot-bank = <0x0>; /* 0: Primary flash, 1: Secondary flash */
20
21 aliases {
22 ethernet0 = &enet0;
23 ethernet1 = &enet1;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci0 = &pci0;
27 pci1 = &pci1;
28 pci2 = &pci2;
29 };
30
31 pmcslots {
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 pmcslot@0 {
36 cell-index = <0>;
37 /*
38 * boolean properties (true if defined):
39 * monarch;
40 * module-present;
41 */
42 };
43 };
44
45 xmcslots {
46 #address-cells = <1>;
47 #size-cells = <0>;
48
49 xmcslot@0 {
50 cell-index = <0>;
51 /*
52 * boolean properties (true if defined):
53 * module-present;
54 */
55 };
56 };
57
58 cpci {
59 /*
60 * boolean properties (true if defined):
61 * system-controller;
62 */
63 system-controller;
64 };
65
66 cpus {
67 #address-cells = <1>;
68 #size-cells = <0>;
69
70 PowerPC,8572@0 {
71 device_type = "cpu";
72 reg = <0x0>;
73 d-cache-line-size = <32>; // 32 bytes
74 i-cache-line-size = <32>; // 32 bytes
75 d-cache-size = <0x8000>; // L1, 32K
76 i-cache-size = <0x8000>; // L1, 32K
77 timebase-frequency = <0>;
78 bus-frequency = <0>;
79 clock-frequency = <0>;
80 next-level-cache = <&L2>;
81 };
82
83 PowerPC,8572@1 {
84 device_type = "cpu";
85 reg = <0x1>;
86 d-cache-line-size = <32>; // 32 bytes
87 i-cache-line-size = <32>; // 32 bytes
88 d-cache-size = <0x8000>; // L1, 32K
89 i-cache-size = <0x8000>; // L1, 32K
90 timebase-frequency = <0>;
91 bus-frequency = <0>;
92 clock-frequency = <0>;
93 next-level-cache = <&L2>;
94 };
95 };
96
97 memory {
98 device_type = "memory";
99 reg = <0x0 0x0 0x0 0x0>; // Filled in by U-Boot
100 };
101
102 localbus@ef005000 {
103 #address-cells = <2>;
104 #size-cells = <1>;
105 compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";
106 reg = <0 0xef005000 0 0x1000>;
107 interrupts = <19 2>;
108 interrupt-parent = <&mpic>;
109 /* Local bus region mappings */
110 ranges = <0 0 0 0xf8000000 0x8000000 /* CS0: Boot flash */
111 1 0 0 0xf0000000 0x8000000 /* CS1: Alternate flash */
112 2 0 0 0xef800000 0x40000 /* CS2: NAND CE1 */
113 3 0 0 0xef840000 0x40000>; /* CS3: NAND CE2 */
114
115 nor-boot@0,0 {
116 compatible = "amd,s29gl01gp", "cfi-flash";
117 bank-width = <2>;
118 reg = <0 0 0x8000000>; /* 128MB */
119 #address-cells = <1>;
120 #size-cells = <1>;
121 partition@0 {
122 label = "Primary user space";
123 reg = <0x00000000 0x6f00000>; /* 111 MB */
124 };
125 partition@6f00000 {
126 label = "Primary kernel";
127 reg = <0x6f00000 0x1000000>; /* 16 MB */
128 };
129 partition@7f00000 {
130 label = "Primary DTB";
131 reg = <0x7f00000 0x40000>; /* 256 KB */
132 };
133 partition@7f40000 {
134 label = "Primary U-Boot environment";
135 reg = <0x7f40000 0x40000>; /* 256 KB */
136 };
137 partition@7f80000 {
138 label = "Primary U-Boot";
139 reg = <0x7f80000 0x80000>; /* 512 KB */
140 read-only;
141 };
142 };
143
144 nor-alternate@1,0 {
145 compatible = "amd,s29gl01gp", "cfi-flash";
146 bank-width = <2>;
147 //reg = <0xf0000000 0x08000000>; /* 128MB */
148 reg = <1 0 0x8000000>; /* 128MB */
149 #address-cells = <1>;
150 #size-cells = <1>;
151 partition@0 {
152 label = "Secondary user space";
153 reg = <0x00000000 0x6f00000>; /* 111 MB */
154 };
155 partition@6f00000 {
156 label = "Secondary kernel";
157 reg = <0x6f00000 0x1000000>; /* 16 MB */
158 };
159 partition@7f00000 {
160 label = "Secondary DTB";
161 reg = <0x7f00000 0x40000>; /* 256 KB */
162 };
163 partition@7f40000 {
164 label = "Secondary U-Boot environment";
165 reg = <0x7f40000 0x40000>; /* 256 KB */
166 };
167 partition@7f80000 {
168 label = "Secondary U-Boot";
169 reg = <0x7f80000 0x80000>; /* 512 KB */
170 read-only;
171 };
172 };
173
174 nand@2,0 {
175 #address-cells = <1>;
176 #size-cells = <1>;
177 /*
178 * Actual part could be ST Micro NAND08GW3B2A (1 GB),
179 * Micron MT29F8G08DAA (2x 512 MB), or Micron
180 * MT29F16G08FAA (2x 1 GB), depending on the build
181 * configuration
182 */
183 compatible = "fsl,mpc8572-fcm-nand",
184 "fsl,elbc-fcm-nand";
185 reg = <2 0 0x40000>;
186 /* U-Boot should fix this up if chip size > 1 GB */
187 partition@0 {
188 label = "NAND Filesystem";
189 reg = <0 0x40000000>;
190 };
191 };
192
193 };
194
195 soc8572@ef000000 {
196 #address-cells = <1>;
197 #size-cells = <1>;
198 device_type = "soc";
199 compatible = "fsl,mpc8572-immr", "simple-bus";
200 ranges = <0x0 0 0xef000000 0x100000>;
201 bus-frequency = <0>; // Filled out by uboot.
202
203 ecm-law@0 {
204 compatible = "fsl,ecm-law";
205 reg = <0x0 0x1000>;
206 fsl,num-laws = <12>;
207 };
208
209 ecm@1000 {
210 compatible = "fsl,mpc8572-ecm", "fsl,ecm";
211 reg = <0x1000 0x1000>;
212 interrupts = <17 2>;
213 interrupt-parent = <&mpic>;
214 };
215
216 memory-controller@2000 {
217 compatible = "fsl,mpc8572-memory-controller";
218 reg = <0x2000 0x1000>;
219 interrupt-parent = <&mpic>;
220 interrupts = <18 2>;
221 };
222
223 memory-controller@6000 {
224 compatible = "fsl,mpc8572-memory-controller";
225 reg = <0x6000 0x1000>;
226 interrupt-parent = <&mpic>;
227 interrupts = <18 2>;
228 };
229
230 L2: l2-cache-controller@20000 {
231 compatible = "fsl,mpc8572-l2-cache-controller";
232 reg = <0x20000 0x1000>;
233 cache-line-size = <32>; // 32 bytes
234 cache-size = <0x100000>; // L2, 1M
235 interrupt-parent = <&mpic>;
236 interrupts = <16 2>;
237 };
238
239 i2c@3000 {
240 #address-cells = <1>;
241 #size-cells = <0>;
242 cell-index = <0>;
243 compatible = "fsl-i2c";
244 reg = <0x3000 0x100>;
245 interrupts = <43 2>;
246 interrupt-parent = <&mpic>;
247 dfsrr;
248
249 temp-sensor@48 {
250 compatible = "dallas,ds1631", "dallas,ds1621";
251 reg = <0x48>;
252 };
253
254 temp-sensor@4c {
255 compatible = "adi,adt7461";
256 reg = <0x4c>;
257 };
258
259 cpu-supervisor@51 {
260 compatible = "dallas,ds4510";
261 reg = <0x51>;
262 };
263
264 eeprom@54 {
265 compatible = "atmel,at24c128b";
266 reg = <0x54>;
267 };
268
269 rtc@68 {
270 compatible = "stm,m41t00",
271 "dallas,ds1338";
272 reg = <0x68>;
273 };
274
275 pcie-switch@70 {
276 compatible = "plx,pex8518";
277 reg = <0x70>;
278 };
279
280 gpio1: gpio@18 {
281 compatible = "nxp,pca9557";
282 reg = <0x18>;
283 #gpio-cells = <2>;
284 gpio-controller;
285 polarity = <0x00>;
286 };
287
288 gpio2: gpio@1c {
289 compatible = "nxp,pca9557";
290 reg = <0x1c>;
291 #gpio-cells = <2>;
292 gpio-controller;
293 polarity = <0x00>;
294 };
295
296 gpio3: gpio@1e {
297 compatible = "nxp,pca9557";
298 reg = <0x1e>;
299 #gpio-cells = <2>;
300 gpio-controller;
301 polarity = <0x00>;
302 };
303
304 gpio4: gpio@1f {
305 compatible = "nxp,pca9557";
306 reg = <0x1f>;
307 #gpio-cells = <2>;
308 gpio-controller;
309 polarity = <0x00>;
310 };
311 };
312
313 i2c@3100 {
314 #address-cells = <1>;
315 #size-cells = <0>;
316 cell-index = <1>;
317 compatible = "fsl-i2c";
318 reg = <0x3100 0x100>;
319 interrupts = <43 2>;
320 interrupt-parent = <&mpic>;
321 dfsrr;
322 };
323
324 dma@c300 {
325 #address-cells = <1>;
326 #size-cells = <1>;
327 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
328 reg = <0xc300 0x4>;
329 ranges = <0x0 0xc100 0x200>;
330 cell-index = <1>;
331 dma-channel@0 {
332 compatible = "fsl,mpc8572-dma-channel",
333 "fsl,eloplus-dma-channel";
334 reg = <0x0 0x80>;
335 cell-index = <0>;
336 interrupt-parent = <&mpic>;
337 interrupts = <76 2>;
338 };
339 dma-channel@80 {
340 compatible = "fsl,mpc8572-dma-channel",
341 "fsl,eloplus-dma-channel";
342 reg = <0x80 0x80>;
343 cell-index = <1>;
344 interrupt-parent = <&mpic>;
345 interrupts = <77 2>;
346 };
347 dma-channel@100 {
348 compatible = "fsl,mpc8572-dma-channel",
349 "fsl,eloplus-dma-channel";
350 reg = <0x100 0x80>;
351 cell-index = <2>;
352 interrupt-parent = <&mpic>;
353 interrupts = <78 2>;
354 };
355 dma-channel@180 {
356 compatible = "fsl,mpc8572-dma-channel",
357 "fsl,eloplus-dma-channel";
358 reg = <0x180 0x80>;
359 cell-index = <3>;
360 interrupt-parent = <&mpic>;
361 interrupts = <79 2>;
362 };
363 };
364
365 dma@21300 {
366 #address-cells = <1>;
367 #size-cells = <1>;
368 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
369 reg = <0x21300 0x4>;
370 ranges = <0x0 0x21100 0x200>;
371 cell-index = <0>;
372 dma-channel@0 {
373 compatible = "fsl,mpc8572-dma-channel",
374 "fsl,eloplus-dma-channel";
375 reg = <0x0 0x80>;
376 cell-index = <0>;
377 interrupt-parent = <&mpic>;
378 interrupts = <20 2>;
379 };
380 dma-channel@80 {
381 compatible = "fsl,mpc8572-dma-channel",
382 "fsl,eloplus-dma-channel";
383 reg = <0x80 0x80>;
384 cell-index = <1>;
385 interrupt-parent = <&mpic>;
386 interrupts = <21 2>;
387 };
388 dma-channel@100 {
389 compatible = "fsl,mpc8572-dma-channel",
390 "fsl,eloplus-dma-channel";
391 reg = <0x100 0x80>;
392 cell-index = <2>;
393 interrupt-parent = <&mpic>;
394 interrupts = <22 2>;
395 };
396 dma-channel@180 {
397 compatible = "fsl,mpc8572-dma-channel",
398 "fsl,eloplus-dma-channel";
399 reg = <0x180 0x80>;
400 cell-index = <3>;
401 interrupt-parent = <&mpic>;
402 interrupts = <23 2>;
403 };
404 };
405
406 /* eTSEC 1 */
407 enet0: ethernet@24000 {
408 #address-cells = <1>;
409 #size-cells = <1>;
410 cell-index = <0>;
411 device_type = "network";
412 model = "eTSEC";
413 compatible = "gianfar";
414 reg = <0x24000 0x1000>;
415 ranges = <0x0 0x24000 0x1000>;
416 local-mac-address = [ 00 00 00 00 00 00 ];
417 interrupts = <29 2 30 2 34 2>;
418 interrupt-parent = <&mpic>;
419 tbi-handle = <&tbi0>;
420 phy-handle = <&phy0>;
421 phy-connection-type = "sgmii";
422
423 mdio@520 {
424 #address-cells = <1>;
425 #size-cells = <0>;
426 compatible = "fsl,gianfar-mdio";
427 reg = <0x520 0x20>;
428
429 phy0: ethernet-phy@1 {
430 interrupt-parent = <&mpic>;
431 interrupts = <8 1>;
432 reg = <0x1>;
433 };
434 phy1: ethernet-phy@2 {
435 interrupt-parent = <&mpic>;
436 interrupts = <8 1>;
437 reg = <0x2>;
438 };
439 tbi0: tbi-phy@11 {
440 reg = <0x11>;
441 device_type = "tbi-phy";
442 };
443 };
444 };
445
446 /* eTSEC 2 */
447 enet1: ethernet@25000 {
448 #address-cells = <1>;
449 #size-cells = <1>;
450 cell-index = <1>;
451 device_type = "network";
452 model = "eTSEC";
453 compatible = "gianfar";
454 reg = <0x25000 0x1000>;
455 ranges = <0x0 0x25000 0x1000>;
456 local-mac-address = [ 00 00 00 00 00 00 ];
457 interrupts = <35 2 36 2 40 2>;
458 interrupt-parent = <&mpic>;
459 tbi-handle = <&tbi1>;
460 phy-handle = <&phy1>;
461 phy-connection-type = "sgmii";
462
463 mdio@520 {
464 #address-cells = <1>;
465 #size-cells = <0>;
466 compatible = "fsl,gianfar-tbi";
467 reg = <0x520 0x20>;
468
469 tbi1: tbi-phy@11 {
470 reg = <0x11>;
471 device_type = "tbi-phy";
472 };
473 };
474 };
475
476 /* UART0 */
477 serial0: serial@4500 {
478 cell-index = <0>;
479 device_type = "serial";
480 compatible = "ns16550";
481 reg = <0x4500 0x100>;
482 clock-frequency = <0>;
483 interrupts = <42 2>;
484 interrupt-parent = <&mpic>;
485 };
486
487 /* UART1 */
488 serial1: serial@4600 {
489 cell-index = <1>;
490 device_type = "serial";
491 compatible = "ns16550";
492 reg = <0x4600 0x100>;
493 clock-frequency = <0>;
494 interrupts = <42 2>;
495 interrupt-parent = <&mpic>;
496 };
497
498 global-utilities@e0000 { //global utilities block
499 compatible = "fsl,mpc8572-guts";
500 reg = <0xe0000 0x1000>;
501 fsl,has-rstcr;
502 };
503
504 msi@41600 {
505 compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
506 reg = <0x41600 0x80>;
507 msi-available-ranges = <0 0x100>;
508 interrupts = <
509 0xe0 0
510 0xe1 0
511 0xe2 0
512 0xe3 0
513 0xe4 0
514 0xe5 0
515 0xe6 0
516 0xe7 0>;
517 interrupt-parent = <&mpic>;
518 };
519
520 crypto@30000 {
521 compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
522 "fsl,sec2.1", "fsl,sec2.0";
523 reg = <0x30000 0x10000>;
524 interrupts = <45 2 58 2>;
525 interrupt-parent = <&mpic>;
526 fsl,num-channels = <4>;
527 fsl,channel-fifo-len = <24>;
528 fsl,exec-units-mask = <0x9fe>;
529 fsl,descriptor-types-mask = <0x3ab0ebf>;
530 };
531
532 mpic: pic@40000 {
533 interrupt-controller;
534 #address-cells = <0>;
535 #interrupt-cells = <2>;
536 reg = <0x40000 0x40000>;
537 compatible = "chrp,open-pic";
538 device_type = "open-pic";
539 };
540
541 gpio0: gpio@f000 {
542 compatible = "fsl,mpc8572-gpio";
543 reg = <0xf000 0x1000>;
544 interrupts = <47 2>;
545 interrupt-parent = <&mpic>;
546 #gpio-cells = <2>;
547 gpio-controller;
548 };
549
550 gpio-leds {
551 compatible = "gpio-leds";
552
553 heartbeat {
554 label = "Heartbeat";
555 gpios = <&gpio0 4 1>;
556 linux,default-trigger = "heartbeat";
557 };
558
559 yellow {
560 label = "Yellow";
561 gpios = <&gpio0 5 1>;
562 };
563
564 red {
565 label = "Red";
566 gpios = <&gpio0 6 1>;
567 };
568
569 green {
570 label = "Green";
571 gpios = <&gpio0 7 1>;
572 };
573 };
574
575 /* PME (pattern-matcher) */
576 pme@10000 {
577 compatible = "fsl,mpc8572-pme", "pme8572";
578 reg = <0x10000 0x5000>;
579 interrupts = <57 2 64 2 65 2 66 2 67 2>;
580 interrupt-parent = <&mpic>;
581 };
582
583 tlu@2f000 {
584 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
585 reg = <0x2f000 0x1000>;
586 interupts = <61 2 >;
587 interrupt-parent = <&mpic>;
588 };
589
590 tlu@15000 {
591 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
592 reg = <0x15000 0x1000>;
593 interupts = <75 2>;
594 interrupt-parent = <&mpic>;
595 };
596 };
597
598 /* PCI Express controller 3 - CompactPCI bus via PEX8112 bridge */
599 pci0: pcie@ef008000 {
600 compatible = "fsl,mpc8548-pcie";
601 device_type = "pci";
602 #interrupt-cells = <1>;
603 #size-cells = <2>;
604 #address-cells = <3>;
605 reg = <0 0xef008000 0 0x1000>;
606 bus-range = <0 255>;
607 ranges = <0x2000000 0x0 0xe0000000 0 0xe0000000 0x0 0x10000000
608 0x1000000 0x0 0x00000000 0 0xe9000000 0x0 0x10000>;
609 clock-frequency = <33333333>;
610 interrupt-parent = <&mpic>;
611 interrupts = <24 2>;
612 interrupt-map-mask = <0xff00 0x0 0x0 0x7>;
613 interrupt-map = <
614 0x0 0x0 0x0 0x1 &mpic 0x0 0x1
615 0x0 0x0 0x0 0x2 &mpic 0x1 0x1
616 0x0 0x0 0x0 0x3 &mpic 0x2 0x1
617 0x0 0x0 0x0 0x4 &mpic 0x3 0x1
618 >;
619 pcie@0 {
620 reg = <0x0 0x0 0x0 0x0 0x0>;
621 #size-cells = <2>;
622 #address-cells = <3>;
623 device_type = "pci";
624 ranges = <0x02000000 0x0 0xe0000000
625 0x02000000 0x0 0xe0000000
626 0x0 0x10000000
627
628 0x01000000 0x0 0x0
629 0x01000000 0x0 0x0
630 0x0 0x100000>;
631 };
632 };
633
634 /* PCI Express controller 2, PMC module via PEX8112 bridge */
635 pci1: pcie@ef009000 {
636 compatible = "fsl,mpc8548-pcie";
637 device_type = "pci";
638 #interrupt-cells = <1>;
639 #size-cells = <2>;
640 #address-cells = <3>;
641 reg = <0 0xef009000 0 0x1000>;
642 bus-range = <0 255>;
643 ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x10000000
644 0x1000000 0x0 0x00000000 0 0xe8800000 0x0 0x10000>;
645 clock-frequency = <33333333>;
646 interrupt-parent = <&mpic>;
647 interrupts = <25 2>;
648 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
649 interrupt-map = <
650 /* IDSEL 0x0 */
651 0x0 0x0 0x0 0x1 &mpic 0x4 0x1
652 0x0 0x0 0x0 0x2 &mpic 0x5 0x1
653 0x0 0x0 0x0 0x3 &mpic 0x6 0x1
654 0x0 0x0 0x0 0x4 &mpic 0x7 0x1
655 >;
656 pcie@0 {
657 reg = <0x0 0x0 0x0 0x0 0x0>;
658 #size-cells = <2>;
659 #address-cells = <3>;
660 device_type = "pci";
661 ranges = <0x2000000 0x0 0xc0000000
662 0x2000000 0x0 0xc0000000
663 0x0 0x10000000
664
665 0x1000000 0x0 0x0
666 0x1000000 0x0 0x0
667 0x0 0x100000>;
668 };
669 };
670
671 /* PCI Express controller 1, XMC P15 */
672 pci2: pcie@ef00a000 {
673 compatible = "fsl,mpc8548-pcie";
674 device_type = "pci";
675 #interrupt-cells = <1>;
676 #size-cells = <2>;
677 #address-cells = <3>;
678 reg = <0 0xef00a000 0 0x1000>;
679 bus-range = <0 255>;
680 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x40000000
681 0x1000000 0x0 0x00000000 0 0xe8000000 0x0 0x10000>;
682 clock-frequency = <33333333>;
683 interrupt-parent = <&mpic>;
684 interrupts = <26 2>;
685 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
686 interrupt-map = <
687 /* IDSEL 0x0 */
688 0x0 0x0 0x0 0x1 &mpic 0x0 0x1
689 0x0 0x0 0x0 0x2 &mpic 0x1 0x1
690 0x0 0x0 0x0 0x3 &mpic 0x2 0x1
691 0x0 0x0 0x0 0x4 &mpic 0x3 0x1
692 >;
693 pcie@0 {
694 reg = <0x0 0x0 0x0 0x0 0x0>;
695 #size-cells = <2>;
696 #address-cells = <3>;
697 device_type = "pci";
698 ranges = <0x2000000 0x0 0x80000000
699 0x2000000 0x0 0x80000000
700 0x0 0x40000000
701
702 0x1000000 0x0 0x0
703 0x1000000 0x0 0x0
704 0x0 0x100000>;
705 };
706 };
707};
diff --git a/arch/powerpc/boot/dts/xpedite5370.dts b/arch/powerpc/boot/dts/xpedite5370.dts
new file mode 100644
index 000000000000..7a8a4afd56cf
--- /dev/null
+++ b/arch/powerpc/boot/dts/xpedite5370.dts
@@ -0,0 +1,638 @@
1/*
2 * Copyright (C) 2008 Extreme Engineering Solutions, Inc.
3 * Based on MPC8572DS device tree from Freescale Semiconductor, Inc.
4 *
5 * XPedite5370 3U VPX single-board computer based on MPC8572E
6 *
7 * This 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/dts-v1/;
13/ {
14 model = "xes,xpedite5370";
15 compatible = "xes,xpedite5370", "xes,MPC8572";
16 #address-cells = <2>;
17 #size-cells = <2>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci1 = &pci1;
25 pci2 = &pci2;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8572@0 {
33 device_type = "cpu";
34 reg = <0x0>;
35 d-cache-line-size = <32>; // 32 bytes
36 i-cache-line-size = <32>; // 32 bytes
37 d-cache-size = <0x8000>; // L1, 32K
38 i-cache-size = <0x8000>; // L1, 32K
39 timebase-frequency = <0>;
40 bus-frequency = <0>;
41 clock-frequency = <0>;
42 next-level-cache = <&L2>;
43 };
44
45 PowerPC,8572@1 {
46 device_type = "cpu";
47 reg = <0x1>;
48 d-cache-line-size = <32>; // 32 bytes
49 i-cache-line-size = <32>; // 32 bytes
50 d-cache-size = <0x8000>; // L1, 32K
51 i-cache-size = <0x8000>; // L1, 32K
52 timebase-frequency = <0>;
53 bus-frequency = <0>;
54 clock-frequency = <0>;
55 next-level-cache = <&L2>;
56 };
57 };
58
59 memory {
60 device_type = "memory";
61 reg = <0x0 0x0 0x0 0x0>; // Filled in by U-Boot
62 };
63
64 localbus@ef005000 {
65 #address-cells = <2>;
66 #size-cells = <1>;
67 compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";
68 reg = <0 0xef005000 0 0x1000>;
69 interrupts = <19 2>;
70 interrupt-parent = <&mpic>;
71 /* Local bus region mappings */
72 ranges = <0 0 0 0xf8000000 0x8000000 /* CS0: Boot flash */
73 1 0 0 0xf0000000 0x8000000 /* CS1: Alternate flash */
74 2 0 0 0xef800000 0x40000 /* CS2: NAND CE1 */
75 3 0 0 0xef840000 0x40000>; /* CS3: NAND CE2 */
76
77 nor-boot@0,0 {
78 compatible = "amd,s29gl01gp", "cfi-flash";
79 bank-width = <2>;
80 reg = <0 0 0x8000000>; /* 128MB */
81 #address-cells = <1>;
82 #size-cells = <1>;
83 partition@0 {
84 label = "Primary user space";
85 reg = <0x00000000 0x6f00000>; /* 111 MB */
86 };
87 partition@6f00000 {
88 label = "Primary kernel";
89 reg = <0x6f00000 0x1000000>; /* 16 MB */
90 };
91 partition@7f00000 {
92 label = "Primary DTB";
93 reg = <0x7f00000 0x40000>; /* 256 KB */
94 };
95 partition@7f40000 {
96 label = "Primary U-Boot environment";
97 reg = <0x7f40000 0x40000>; /* 256 KB */
98 };
99 partition@7f80000 {
100 label = "Primary U-Boot";
101 reg = <0x7f80000 0x80000>; /* 512 KB */
102 read-only;
103 };
104 };
105
106 nor-alternate@1,0 {
107 compatible = "amd,s29gl01gp", "cfi-flash";
108 bank-width = <2>;
109 //reg = <0xf0000000 0x08000000>; /* 128MB */
110 reg = <1 0 0x8000000>; /* 128MB */
111 #address-cells = <1>;
112 #size-cells = <1>;
113 partition@0 {
114 label = "Secondary user space";
115 reg = <0x00000000 0x6f00000>; /* 111 MB */
116 };
117 partition@6f00000 {
118 label = "Secondary kernel";
119 reg = <0x6f00000 0x1000000>; /* 16 MB */
120 };
121 partition@7f00000 {
122 label = "Secondary DTB";
123 reg = <0x7f00000 0x40000>; /* 256 KB */
124 };
125 partition@7f40000 {
126 label = "Secondary U-Boot environment";
127 reg = <0x7f40000 0x40000>; /* 256 KB */
128 };
129 partition@7f80000 {
130 label = "Secondary U-Boot";
131 reg = <0x7f80000 0x80000>; /* 512 KB */
132 read-only;
133 };
134 };
135
136 nand@2,0 {
137 #address-cells = <1>;
138 #size-cells = <1>;
139 /*
140 * Actual part could be ST Micro NAND08GW3B2A (1 GB),
141 * Micron MT29F8G08DAA (2x 512 MB), or Micron
142 * MT29F16G08FAA (2x 1 GB), depending on the build
143 * configuration
144 */
145 compatible = "fsl,mpc8572-fcm-nand",
146 "fsl,elbc-fcm-nand";
147 reg = <2 0 0x40000>;
148 /* U-Boot should fix this up if chip size > 1 GB */
149 partition@0 {
150 label = "NAND Filesystem";
151 reg = <0 0x40000000>;
152 };
153 };
154
155 };
156
157 soc8572@ef000000 {
158 #address-cells = <1>;
159 #size-cells = <1>;
160 device_type = "soc";
161 compatible = "fsl,mpc8572-immr", "simple-bus";
162 ranges = <0x0 0 0xef000000 0x100000>;
163 bus-frequency = <0>; // Filled out by uboot.
164
165 ecm-law@0 {
166 compatible = "fsl,ecm-law";
167 reg = <0x0 0x1000>;
168 fsl,num-laws = <12>;
169 };
170
171 ecm@1000 {
172 compatible = "fsl,mpc8572-ecm", "fsl,ecm";
173 reg = <0x1000 0x1000>;
174 interrupts = <17 2>;
175 interrupt-parent = <&mpic>;
176 };
177
178 memory-controller@2000 {
179 compatible = "fsl,mpc8572-memory-controller";
180 reg = <0x2000 0x1000>;
181 interrupt-parent = <&mpic>;
182 interrupts = <18 2>;
183 };
184
185 memory-controller@6000 {
186 compatible = "fsl,mpc8572-memory-controller";
187 reg = <0x6000 0x1000>;
188 interrupt-parent = <&mpic>;
189 interrupts = <18 2>;
190 };
191
192 L2: l2-cache-controller@20000 {
193 compatible = "fsl,mpc8572-l2-cache-controller";
194 reg = <0x20000 0x1000>;
195 cache-line-size = <32>; // 32 bytes
196 cache-size = <0x100000>; // L2, 1M
197 interrupt-parent = <&mpic>;
198 interrupts = <16 2>;
199 };
200
201 i2c@3000 {
202 #address-cells = <1>;
203 #size-cells = <0>;
204 cell-index = <0>;
205 compatible = "fsl-i2c";
206 reg = <0x3000 0x100>;
207 interrupts = <43 2>;
208 interrupt-parent = <&mpic>;
209 dfsrr;
210
211 temp-sensor@48 {
212 compatible = "dallas,ds1631", "dallas,ds1621";
213 reg = <0x48>;
214 };
215
216 temp-sensor@4c {
217 compatible = "adi,adt7461";
218 reg = <0x4c>;
219 };
220
221 cpu-supervisor@51 {
222 compatible = "dallas,ds4510";
223 reg = <0x51>;
224 };
225
226 eeprom@54 {
227 compatible = "atmel,at24c128b";
228 reg = <0x54>;
229 };
230
231 rtc@68 {
232 compatible = "stm,m41t00",
233 "dallas,ds1338";
234 reg = <0x68>;
235 };
236
237 pcie-switch@70 {
238 compatible = "plx,pex8518";
239 reg = <0x70>;
240 };
241
242 gpio1: gpio@18 {
243 compatible = "nxp,pca9557";
244 reg = <0x18>;
245 #gpio-cells = <2>;
246 gpio-controller;
247 polarity = <0x00>;
248 };
249
250 gpio2: gpio@1c {
251 compatible = "nxp,pca9557";
252 reg = <0x1c>;
253 #gpio-cells = <2>;
254 gpio-controller;
255 polarity = <0x00>;
256 };
257
258 gpio3: gpio@1e {
259 compatible = "nxp,pca9557";
260 reg = <0x1e>;
261 #gpio-cells = <2>;
262 gpio-controller;
263 polarity = <0x00>;
264 };
265
266 gpio4: gpio@1f {
267 compatible = "nxp,pca9557";
268 reg = <0x1f>;
269 #gpio-cells = <2>;
270 gpio-controller;
271 polarity = <0x00>;
272 };
273 };
274
275 i2c@3100 {
276 #address-cells = <1>;
277 #size-cells = <0>;
278 cell-index = <1>;
279 compatible = "fsl-i2c";
280 reg = <0x3100 0x100>;
281 interrupts = <43 2>;
282 interrupt-parent = <&mpic>;
283 dfsrr;
284 };
285
286 dma@c300 {
287 #address-cells = <1>;
288 #size-cells = <1>;
289 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
290 reg = <0xc300 0x4>;
291 ranges = <0x0 0xc100 0x200>;
292 cell-index = <1>;
293 dma-channel@0 {
294 compatible = "fsl,mpc8572-dma-channel",
295 "fsl,eloplus-dma-channel";
296 reg = <0x0 0x80>;
297 cell-index = <0>;
298 interrupt-parent = <&mpic>;
299 interrupts = <76 2>;
300 };
301 dma-channel@80 {
302 compatible = "fsl,mpc8572-dma-channel",
303 "fsl,eloplus-dma-channel";
304 reg = <0x80 0x80>;
305 cell-index = <1>;
306 interrupt-parent = <&mpic>;
307 interrupts = <77 2>;
308 };
309 dma-channel@100 {
310 compatible = "fsl,mpc8572-dma-channel",
311 "fsl,eloplus-dma-channel";
312 reg = <0x100 0x80>;
313 cell-index = <2>;
314 interrupt-parent = <&mpic>;
315 interrupts = <78 2>;
316 };
317 dma-channel@180 {
318 compatible = "fsl,mpc8572-dma-channel",
319 "fsl,eloplus-dma-channel";
320 reg = <0x180 0x80>;
321 cell-index = <3>;
322 interrupt-parent = <&mpic>;
323 interrupts = <79 2>;
324 };
325 };
326
327 dma@21300 {
328 #address-cells = <1>;
329 #size-cells = <1>;
330 compatible = "fsl,mpc8572-dma", "fsl,eloplus-dma";
331 reg = <0x21300 0x4>;
332 ranges = <0x0 0x21100 0x200>;
333 cell-index = <0>;
334 dma-channel@0 {
335 compatible = "fsl,mpc8572-dma-channel",
336 "fsl,eloplus-dma-channel";
337 reg = <0x0 0x80>;
338 cell-index = <0>;
339 interrupt-parent = <&mpic>;
340 interrupts = <20 2>;
341 };
342 dma-channel@80 {
343 compatible = "fsl,mpc8572-dma-channel",
344 "fsl,eloplus-dma-channel";
345 reg = <0x80 0x80>;
346 cell-index = <1>;
347 interrupt-parent = <&mpic>;
348 interrupts = <21 2>;
349 };
350 dma-channel@100 {
351 compatible = "fsl,mpc8572-dma-channel",
352 "fsl,eloplus-dma-channel";
353 reg = <0x100 0x80>;
354 cell-index = <2>;
355 interrupt-parent = <&mpic>;
356 interrupts = <22 2>;
357 };
358 dma-channel@180 {
359 compatible = "fsl,mpc8572-dma-channel",
360 "fsl,eloplus-dma-channel";
361 reg = <0x180 0x80>;
362 cell-index = <3>;
363 interrupt-parent = <&mpic>;
364 interrupts = <23 2>;
365 };
366 };
367
368 /* eTSEC 1 */
369 enet0: ethernet@24000 {
370 #address-cells = <1>;
371 #size-cells = <1>;
372 cell-index = <0>;
373 device_type = "network";
374 model = "eTSEC";
375 compatible = "gianfar";
376 reg = <0x24000 0x1000>;
377 ranges = <0x0 0x24000 0x1000>;
378 local-mac-address = [ 00 00 00 00 00 00 ];
379 interrupts = <29 2 30 2 34 2>;
380 interrupt-parent = <&mpic>;
381 tbi-handle = <&tbi0>;
382 phy-handle = <&phy0>;
383 phy-connection-type = "sgmii";
384
385 mdio@520 {
386 #address-cells = <1>;
387 #size-cells = <0>;
388 compatible = "fsl,gianfar-mdio";
389 reg = <0x520 0x20>;
390
391 phy0: ethernet-phy@1 {
392 interrupt-parent = <&mpic>;
393 interrupts = <8 1>;
394 reg = <0x1>;
395 };
396 phy1: ethernet-phy@2 {
397 interrupt-parent = <&mpic>;
398 interrupts = <8 1>;
399 reg = <0x2>;
400 };
401 tbi0: tbi-phy@11 {
402 reg = <0x11>;
403 device_type = "tbi-phy";
404 };
405 };
406 };
407
408 /* eTSEC 2 */
409 enet1: ethernet@25000 {
410 #address-cells = <1>;
411 #size-cells = <1>;
412 cell-index = <1>;
413 device_type = "network";
414 model = "eTSEC";
415 compatible = "gianfar";
416 reg = <0x25000 0x1000>;
417 ranges = <0x0 0x25000 0x1000>;
418 local-mac-address = [ 00 00 00 00 00 00 ];
419 interrupts = <35 2 36 2 40 2>;
420 interrupt-parent = <&mpic>;
421 tbi-handle = <&tbi1>;
422 phy-handle = <&phy1>;
423 phy-connection-type = "sgmii";
424
425 mdio@520 {
426 #address-cells = <1>;
427 #size-cells = <0>;
428 compatible = "fsl,gianfar-tbi";
429 reg = <0x520 0x20>;
430
431 tbi1: tbi-phy@11 {
432 reg = <0x11>;
433 device_type = "tbi-phy";
434 };
435 };
436 };
437
438 /* UART0 */
439 serial0: serial@4500 {
440 cell-index = <0>;
441 device_type = "serial";
442 compatible = "ns16550";
443 reg = <0x4500 0x100>;
444 clock-frequency = <0>;
445 interrupts = <42 2>;
446 interrupt-parent = <&mpic>;
447 };
448
449 /* UART1 */
450 serial1: serial@4600 {
451 cell-index = <1>;
452 device_type = "serial";
453 compatible = "ns16550";
454 reg = <0x4600 0x100>;
455 clock-frequency = <0>;
456 interrupts = <42 2>;
457 interrupt-parent = <&mpic>;
458 };
459
460 global-utilities@e0000 { //global utilities block
461 compatible = "fsl,mpc8572-guts";
462 reg = <0xe0000 0x1000>;
463 fsl,has-rstcr;
464 };
465
466 msi@41600 {
467 compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
468 reg = <0x41600 0x80>;
469 msi-available-ranges = <0 0x100>;
470 interrupts = <
471 0xe0 0
472 0xe1 0
473 0xe2 0
474 0xe3 0
475 0xe4 0
476 0xe5 0
477 0xe6 0
478 0xe7 0>;
479 interrupt-parent = <&mpic>;
480 };
481
482 crypto@30000 {
483 compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
484 "fsl,sec2.1", "fsl,sec2.0";
485 reg = <0x30000 0x10000>;
486 interrupts = <45 2 58 2>;
487 interrupt-parent = <&mpic>;
488 fsl,num-channels = <4>;
489 fsl,channel-fifo-len = <24>;
490 fsl,exec-units-mask = <0x9fe>;
491 fsl,descriptor-types-mask = <0x3ab0ebf>;
492 };
493
494 mpic: pic@40000 {
495 interrupt-controller;
496 #address-cells = <0>;
497 #interrupt-cells = <2>;
498 reg = <0x40000 0x40000>;
499 compatible = "chrp,open-pic";
500 device_type = "open-pic";
501 };
502
503 gpio0: gpio@f000 {
504 compatible = "fsl,mpc8572-gpio";
505 reg = <0xf000 0x1000>;
506 interrupts = <47 2>;
507 interrupt-parent = <&mpic>;
508 #gpio-cells = <2>;
509 gpio-controller;
510 };
511
512 gpio-leds {
513 compatible = "gpio-leds";
514
515 heartbeat {
516 label = "Heartbeat";
517 gpios = <&gpio0 4 1>;
518 linux,default-trigger = "heartbeat";
519 };
520
521 yellow {
522 label = "Yellow";
523 gpios = <&gpio0 5 1>;
524 };
525
526 red {
527 label = "Red";
528 gpios = <&gpio0 6 1>;
529 };
530
531 green {
532 label = "Green";
533 gpios = <&gpio0 7 1>;
534 };
535 };
536
537 /* PME (pattern-matcher) */
538 pme@10000 {
539 compatible = "fsl,mpc8572-pme", "pme8572";
540 reg = <0x10000 0x5000>;
541 interrupts = <57 2 64 2 65 2 66 2 67 2>;
542 interrupt-parent = <&mpic>;
543 };
544
545 tlu@2f000 {
546 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
547 reg = <0x2f000 0x1000>;
548 interupts = <61 2 >;
549 interrupt-parent = <&mpic>;
550 };
551
552 tlu@15000 {
553 compatible = "fsl,mpc8572-tlu", "fsl_tlu";
554 reg = <0x15000 0x1000>;
555 interupts = <75 2>;
556 interrupt-parent = <&mpic>;
557 };
558 };
559
560 /*
561 * PCI Express controller 3 @ ef008000 is not used.
562 * This would have been pci0 on other mpc85xx platforms.
563 */
564
565 /* PCI Express controller 2, wired to VPX P1,P2 backplane */
566 pci1: pcie@ef009000 {
567 compatible = "fsl,mpc8548-pcie";
568 device_type = "pci";
569 #interrupt-cells = <1>;
570 #size-cells = <2>;
571 #address-cells = <3>;
572 reg = <0 0xef009000 0 0x1000>;
573 bus-range = <0 255>;
574 ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x10000000
575 0x1000000 0x0 0x00000000 0 0xe8800000 0x0 0x00010000>;
576 clock-frequency = <33333333>;
577 interrupt-parent = <&mpic>;
578 interrupts = <25 2>;
579 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
580 interrupt-map = <
581 /* IDSEL 0x0 */
582 0x0 0x0 0x0 0x1 &mpic 0x4 0x1
583 0x0 0x0 0x0 0x2 &mpic 0x5 0x1
584 0x0 0x0 0x0 0x3 &mpic 0x6 0x1
585 0x0 0x0 0x0 0x4 &mpic 0x7 0x1
586 >;
587 pcie@0 {
588 reg = <0x00000000 0x00000000 0x00000000 0x00000000 0x00000000>;
589 #size-cells = <2>;
590 #address-cells = <3>;
591 device_type = "pci";
592 ranges = <0x2000000 0x0 0xc0000000
593 0x2000000 0x0 0xc0000000
594 0x0 0x10000000
595
596 0x1000000 0x0 0x0
597 0x1000000 0x0 0x0
598 0x0 0x100000>;
599 };
600 };
601
602 /* PCI Express controller 1, wired to PEX8518 PCIe switch */
603 pci2: pcie@ef00a000 {
604 compatible = "fsl,mpc8548-pcie";
605 device_type = "pci";
606 #interrupt-cells = <1>;
607 #size-cells = <2>;
608 #address-cells = <3>;
609 reg = <0 0xef00a000 0 0x1000>;
610 bus-range = <0 255>;
611 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x40000000
612 0x1000000 0x0 0x00000000 0 0xe8000000 0x0 0x10000>;
613 clock-frequency = <33333333>;
614 interrupt-parent = <&mpic>;
615 interrupts = <26 2>;
616 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
617 interrupt-map = <
618 /* IDSEL 0x0 */
619 0x0 0x0 0x0 0x1 &mpic 0x0 0x1
620 0x0 0x0 0x0 0x2 &mpic 0x1 0x1
621 0x0 0x0 0x0 0x3 &mpic 0x2 0x1
622 0x0 0x0 0x0 0x4 &mpic 0x3 0x1
623 >;
624 pcie@0 {
625 reg = <0x0 0x0 0x0 0x0 0x0>;
626 #size-cells = <2>;
627 #address-cells = <3>;
628 device_type = "pci";
629 ranges = <0x2000000 0x0 0x80000000
630 0x2000000 0x0 0x80000000
631 0x0 0x40000000
632
633 0x1000000 0x0 0x0
634 0x1000000 0x0 0x0
635 0x0 0x100000>;
636 };
637 };
638};
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 3ac75aecdb94..4db487d1d2a8 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -225,6 +225,10 @@ asp834x-redboot)
225 platformo="$object/fixed-head.o $object/redboot-83xx.o" 225 platformo="$object/fixed-head.o $object/redboot-83xx.o"
226 binary=y 226 binary=y
227 ;; 227 ;;
228xpedite52*)
229 link_address='0x1400000'
230 platformo=$object/cuboot-85xx.o
231 ;;
228esac 232esac
229 233
230vmz="$tmpdir/`basename \"$kernel\"`.$ext" 234vmz="$tmpdir/`basename \"$kernel\"`.$ext"
diff --git a/arch/powerpc/configs/83xx/kmeter1_defconfig b/arch/powerpc/configs/83xx/kmeter1_defconfig
new file mode 100644
index 000000000000..bf0853f29f31
--- /dev/null
+++ b/arch/powerpc/configs/83xx/kmeter1_defconfig
@@ -0,0 +1,908 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28
4# Fri Apr 3 10:34:33 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18# CONFIG_FSL_EMB_PERFMON is not set
19# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set
23# CONFIG_SMP is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y
43# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
44CONFIG_PPC=y
45CONFIG_EARLY_PRINTK=y
46CONFIG_GENERIC_NVRAM=y
47CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
48CONFIG_ARCH_MAY_HAVE_PC_FDC=y
49CONFIG_PPC_OF=y
50CONFIG_OF=y
51CONFIG_PPC_UDBG_16550=y
52# CONFIG_GENERIC_TBSYNC is not set
53CONFIG_AUDIT_ARCH=y
54CONFIG_GENERIC_BUG=y
55CONFIG_DEFAULT_UIMAGE=y
56CONFIG_ARCH_SUSPEND_POSSIBLE=y
57# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
60
61#
62# General setup
63#
64CONFIG_EXPERIMENTAL=y
65CONFIG_BROKEN_ON_SMP=y
66CONFIG_LOCK_KERNEL=y
67CONFIG_INIT_ENV_ARG_LIMIT=32
68CONFIG_LOCALVERSION=""
69CONFIG_LOCALVERSION_AUTO=y
70# CONFIG_SWAP is not set
71CONFIG_SYSVIPC=y
72CONFIG_SYSVIPC_SYSCTL=y
73CONFIG_POSIX_MQUEUE=y
74# CONFIG_BSD_PROCESS_ACCT is not set
75# CONFIG_TASKSTATS is not set
76# CONFIG_AUDIT is not set
77# CONFIG_IKCONFIG is not set
78CONFIG_LOG_BUF_SHIFT=14
79# CONFIG_CGROUPS is not set
80# CONFIG_GROUP_SCHED is not set
81# CONFIG_SYSFS_DEPRECATED_V2 is not set
82# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set
84# CONFIG_BLK_DEV_INITRD is not set
85CONFIG_CC_OPTIMIZE_FOR_SIZE=y
86CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y
89CONFIG_KALLSYMS=y
90CONFIG_KALLSYMS_ALL=y
91# CONFIG_KALLSYMS_EXTRA_PASS is not set
92# CONFIG_HOTPLUG is not set
93CONFIG_PRINTK=y
94CONFIG_BUG=y
95CONFIG_ELF_CORE=y
96CONFIG_COMPAT_BRK=y
97CONFIG_BASE_FULL=y
98CONFIG_FUTEX=y
99CONFIG_ANON_INODES=y
100CONFIG_EPOLL=y
101CONFIG_SIGNALFD=y
102CONFIG_TIMERFD=y
103CONFIG_EVENTFD=y
104CONFIG_SHMEM=y
105CONFIG_AIO=y
106CONFIG_VM_EVENT_COUNTERS=y
107CONFIG_SLAB=y
108# CONFIG_SLUB is not set
109# CONFIG_SLOB is not set
110# CONFIG_PROFILING is not set
111# CONFIG_MARKERS is not set
112CONFIG_HAVE_OPROFILE=y
113# CONFIG_KPROBES is not set
114CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
115CONFIG_HAVE_IOREMAP_PROT=y
116CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y
118CONFIG_HAVE_ARCH_TRACEHOOK=y
119# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
120CONFIG_SLABINFO=y
121CONFIG_RT_MUTEXES=y
122# CONFIG_TINY_SHMEM is not set
123CONFIG_BASE_SMALL=0
124CONFIG_MODULES=y
125# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y
127# CONFIG_MODULE_FORCE_UNLOAD is not set
128# CONFIG_MODVERSIONS is not set
129# CONFIG_MODULE_SRCVERSION_ALL is not set
130CONFIG_KMOD=y
131CONFIG_BLOCK=y
132# CONFIG_LBD is not set
133# CONFIG_BLK_DEV_IO_TRACE is not set
134# CONFIG_LSF is not set
135# CONFIG_BLK_DEV_BSG is not set
136# CONFIG_BLK_DEV_INTEGRITY is not set
137
138#
139# IO Schedulers
140#
141CONFIG_IOSCHED_NOOP=y
142# CONFIG_IOSCHED_AS is not set
143# CONFIG_IOSCHED_DEADLINE is not set
144# CONFIG_IOSCHED_CFQ is not set
145# CONFIG_DEFAULT_AS is not set
146# CONFIG_DEFAULT_DEADLINE is not set
147# CONFIG_DEFAULT_CFQ is not set
148CONFIG_DEFAULT_NOOP=y
149CONFIG_DEFAULT_IOSCHED="noop"
150CONFIG_CLASSIC_RCU=y
151# CONFIG_FREEZER is not set
152
153#
154# Platform support
155#
156CONFIG_PPC_MULTIPLATFORM=y
157CONFIG_CLASSIC32=y
158# CONFIG_PPC_CHRP is not set
159# CONFIG_MPC5121_ADS is not set
160# CONFIG_MPC5121_GENERIC is not set
161# CONFIG_PPC_MPC52xx is not set
162# CONFIG_PPC_PMAC is not set
163# CONFIG_PPC_CELL is not set
164# CONFIG_PPC_CELL_NATIVE is not set
165# CONFIG_PPC_82xx is not set
166# CONFIG_PQ2ADS is not set
167CONFIG_PPC_83xx=y
168# CONFIG_MPC831x_RDB is not set
169# CONFIG_MPC832x_MDS is not set
170# CONFIG_MPC832x_RDB is not set
171# CONFIG_MPC834x_MDS is not set
172# CONFIG_MPC834x_ITX is not set
173# CONFIG_MPC836x_MDS is not set
174# CONFIG_MPC836x_RDK is not set
175# CONFIG_MPC837x_MDS is not set
176# CONFIG_MPC837x_RDB is not set
177# CONFIG_SBC834x is not set
178# CONFIG_ASP834x is not set
179CONFIG_KMETER1=y
180# CONFIG_PPC_86xx is not set
181# CONFIG_EMBEDDED6xx is not set
182CONFIG_IPIC=y
183# CONFIG_MPIC is not set
184# CONFIG_MPIC_WEIRD is not set
185# CONFIG_PPC_I8259 is not set
186# CONFIG_PPC_RTAS is not set
187# CONFIG_MMIO_NVRAM is not set
188# CONFIG_PPC_MPC106 is not set
189# CONFIG_PPC_970_NAP is not set
190# CONFIG_PPC_INDIRECT_IO is not set
191# CONFIG_GENERIC_IOMAP is not set
192# CONFIG_CPU_FREQ is not set
193# CONFIG_TAU is not set
194CONFIG_QUICC_ENGINE=y
195# CONFIG_QE_GPIO is not set
196# CONFIG_FSL_ULI1575 is not set
197
198#
199# Kernel options
200#
201# CONFIG_HIGHMEM is not set
202CONFIG_TICK_ONESHOT=y
203CONFIG_NO_HZ=y
204CONFIG_HIGH_RES_TIMERS=y
205CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
206# CONFIG_HZ_100 is not set
207CONFIG_HZ_250=y
208# CONFIG_HZ_300 is not set
209# CONFIG_HZ_1000 is not set
210CONFIG_HZ=250
211CONFIG_SCHED_HRTICK=y
212# CONFIG_PREEMPT_NONE is not set
213# CONFIG_PREEMPT_VOLUNTARY is not set
214CONFIG_PREEMPT=y
215# CONFIG_PREEMPT_RCU is not set
216CONFIG_BINFMT_ELF=y
217# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
218# CONFIG_HAVE_AOUT is not set
219# CONFIG_BINFMT_MISC is not set
220# CONFIG_IOMMU_HELPER is not set
221CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
222CONFIG_ARCH_HAS_WALK_MEMORY=y
223CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
224# CONFIG_KEXEC is not set
225CONFIG_ARCH_FLATMEM_ENABLE=y
226CONFIG_ARCH_POPULATES_NODE_MAP=y
227CONFIG_SELECT_MEMORY_MODEL=y
228CONFIG_FLATMEM_MANUAL=y
229# CONFIG_DISCONTIGMEM_MANUAL is not set
230# CONFIG_SPARSEMEM_MANUAL is not set
231CONFIG_FLATMEM=y
232CONFIG_FLAT_NODE_MEM_MAP=y
233CONFIG_PAGEFLAGS_EXTENDED=y
234CONFIG_SPLIT_PTLOCK_CPUS=4
235CONFIG_MIGRATION=y
236# CONFIG_RESOURCES_64BIT is not set
237# CONFIG_PHYS_ADDR_T_64BIT is not set
238CONFIG_ZONE_DMA_FLAG=1
239CONFIG_BOUNCE=y
240CONFIG_VIRT_TO_BUS=y
241CONFIG_UNEVICTABLE_LRU=y
242CONFIG_FORCE_MAX_ZONEORDER=11
243CONFIG_PROC_DEVICETREE=y
244# CONFIG_CMDLINE_BOOL is not set
245CONFIG_EXTRA_TARGETS=""
246# CONFIG_PM is not set
247# CONFIG_SECCOMP is not set
248CONFIG_ISA_DMA_API=y
249
250#
251# Bus options
252#
253CONFIG_ZONE_DMA=y
254CONFIG_GENERIC_ISA_DMA=y
255CONFIG_FSL_SOC=y
256CONFIG_PPC_PCI_CHOICE=y
257# CONFIG_PCI is not set
258# CONFIG_PCI_DOMAINS is not set
259# CONFIG_PCI_SYSCALL is not set
260# CONFIG_ARCH_SUPPORTS_MSI is not set
261# CONFIG_HAS_RAPIDIO is not set
262
263#
264# Advanced setup
265#
266# CONFIG_ADVANCED_OPTIONS is not set
267
268#
269# Default settings for advanced configuration options are used
270#
271CONFIG_LOWMEM_SIZE=0x30000000
272CONFIG_PAGE_OFFSET=0xc0000000
273CONFIG_KERNEL_START=0xc0000000
274CONFIG_PHYSICAL_START=0x00000000
275CONFIG_TASK_SIZE=0xc0000000
276CONFIG_NET=y
277
278#
279# Networking options
280#
281CONFIG_PACKET=y
282# CONFIG_PACKET_MMAP is not set
283CONFIG_UNIX=y
284# CONFIG_NET_KEY is not set
285CONFIG_INET=y
286CONFIG_IP_MULTICAST=y
287# CONFIG_IP_ADVANCED_ROUTER is not set
288CONFIG_IP_FIB_HASH=y
289CONFIG_IP_PNP=y
290# CONFIG_IP_PNP_DHCP is not set
291# CONFIG_IP_PNP_BOOTP is not set
292# CONFIG_IP_PNP_RARP is not set
293# CONFIG_NET_IPIP is not set
294# CONFIG_NET_IPGRE is not set
295# CONFIG_IP_MROUTE is not set
296# CONFIG_ARPD is not set
297# CONFIG_SYN_COOKIES is not set
298# CONFIG_INET_AH is not set
299# CONFIG_INET_ESP is not set
300# CONFIG_INET_IPCOMP is not set
301# CONFIG_INET_XFRM_TUNNEL is not set
302# CONFIG_INET_TUNNEL is not set
303# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
304# CONFIG_INET_XFRM_MODE_TUNNEL is not set
305# CONFIG_INET_XFRM_MODE_BEET is not set
306# CONFIG_INET_LRO is not set
307CONFIG_INET_DIAG=y
308CONFIG_INET_TCP_DIAG=y
309# CONFIG_TCP_CONG_ADVANCED is not set
310CONFIG_TCP_CONG_CUBIC=y
311CONFIG_DEFAULT_TCP_CONG="cubic"
312# CONFIG_TCP_MD5SIG is not set
313# CONFIG_IPV6 is not set
314# CONFIG_NETWORK_SECMARK is not set
315# CONFIG_NETFILTER is not set
316# CONFIG_IP_DCCP is not set
317# CONFIG_IP_SCTP is not set
318# CONFIG_TIPC is not set
319# CONFIG_ATM is not set
320CONFIG_STP=m
321CONFIG_BRIDGE=m
322# CONFIG_NET_DSA is not set
323CONFIG_VLAN_8021Q=y
324# CONFIG_VLAN_8021Q_GVRP is not set
325# CONFIG_DECNET is not set
326CONFIG_LLC=m
327# CONFIG_LLC2 is not set
328# CONFIG_IPX is not set
329# CONFIG_ATALK is not set
330# CONFIG_X25 is not set
331# CONFIG_LAPB is not set
332# CONFIG_ECONET is not set
333# CONFIG_WAN_ROUTER is not set
334# CONFIG_NET_SCHED is not set
335
336#
337# Network testing
338#
339# CONFIG_NET_PKTGEN is not set
340# CONFIG_HAMRADIO is not set
341# CONFIG_CAN is not set
342# CONFIG_IRDA is not set
343# CONFIG_BT is not set
344# CONFIG_AF_RXRPC is not set
345# CONFIG_PHONET is not set
346# CONFIG_WIRELESS is not set
347# CONFIG_RFKILL is not set
348# CONFIG_NET_9P is not set
349
350#
351# Device Drivers
352#
353
354#
355# Generic Driver Options
356#
357CONFIG_STANDALONE=y
358CONFIG_PREVENT_FIRMWARE_BUILD=y
359# CONFIG_SYS_HYPERVISOR is not set
360# CONFIG_CONNECTOR is not set
361CONFIG_MTD=y
362# CONFIG_MTD_DEBUG is not set
363CONFIG_MTD_CONCAT=y
364CONFIG_MTD_PARTITIONS=y
365# CONFIG_MTD_REDBOOT_PARTS is not set
366CONFIG_MTD_CMDLINE_PARTS=y
367CONFIG_MTD_OF_PARTS=y
368# CONFIG_MTD_AR7_PARTS is not set
369
370#
371# User Modules And Translation Layers
372#
373CONFIG_MTD_CHAR=y
374CONFIG_MTD_BLKDEVS=y
375CONFIG_MTD_BLOCK=y
376# CONFIG_FTL is not set
377# CONFIG_NFTL is not set
378# CONFIG_INFTL is not set
379# CONFIG_RFD_FTL is not set
380# CONFIG_SSFDC is not set
381# CONFIG_MTD_OOPS is not set
382
383#
384# RAM/ROM/Flash chip drivers
385#
386CONFIG_MTD_CFI=y
387# CONFIG_MTD_JEDECPROBE is not set
388CONFIG_MTD_GEN_PROBE=y
389# CONFIG_MTD_CFI_ADV_OPTIONS is not set
390CONFIG_MTD_MAP_BANK_WIDTH_1=y
391CONFIG_MTD_MAP_BANK_WIDTH_2=y
392CONFIG_MTD_MAP_BANK_WIDTH_4=y
393# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
394# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
395# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
396CONFIG_MTD_CFI_I1=y
397CONFIG_MTD_CFI_I2=y
398# CONFIG_MTD_CFI_I4 is not set
399# CONFIG_MTD_CFI_I8 is not set
400CONFIG_MTD_CFI_INTELEXT=y
401CONFIG_MTD_CFI_AMDSTD=y
402# CONFIG_MTD_CFI_STAA is not set
403CONFIG_MTD_CFI_UTIL=y
404# CONFIG_MTD_RAM is not set
405# CONFIG_MTD_ROM is not set
406# CONFIG_MTD_ABSENT is not set
407
408#
409# Mapping drivers for chip access
410#
411# CONFIG_MTD_COMPLEX_MAPPINGS is not set
412# CONFIG_MTD_PHYSMAP is not set
413CONFIG_MTD_PHYSMAP_OF=y
414# CONFIG_MTD_PLATRAM is not set
415
416#
417# Self-contained MTD device drivers
418#
419# CONFIG_MTD_SLRAM is not set
420CONFIG_MTD_PHRAM=y
421# CONFIG_MTD_MTDRAM is not set
422# CONFIG_MTD_BLOCK2MTD is not set
423
424#
425# Disk-On-Chip Device Drivers
426#
427# CONFIG_MTD_DOC2000 is not set
428# CONFIG_MTD_DOC2001 is not set
429# CONFIG_MTD_DOC2001PLUS is not set
430# CONFIG_MTD_NAND is not set
431# CONFIG_MTD_ONENAND is not set
432
433#
434# UBI - Unsorted block images
435#
436CONFIG_MTD_UBI=y
437CONFIG_MTD_UBI_WL_THRESHOLD=4096
438CONFIG_MTD_UBI_BEB_RESERVE=1
439CONFIG_MTD_UBI_GLUEBI=y
440
441#
442# UBI debugging options
443#
444CONFIG_MTD_UBI_DEBUG=y
445# CONFIG_MTD_UBI_DEBUG_MSG is not set
446# CONFIG_MTD_UBI_DEBUG_PARANOID is not set
447# CONFIG_MTD_UBI_DEBUG_DISABLE_BGT is not set
448# CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is not set
449# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set
450# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set
451# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set
452
453#
454# Additional UBI debugging messages
455#
456# CONFIG_MTD_UBI_DEBUG_MSG_BLD is not set
457# CONFIG_MTD_UBI_DEBUG_MSG_EBA is not set
458# CONFIG_MTD_UBI_DEBUG_MSG_WL is not set
459# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set
460CONFIG_OF_DEVICE=y
461CONFIG_OF_I2C=y
462# CONFIG_PARPORT is not set
463CONFIG_BLK_DEV=y
464# CONFIG_BLK_DEV_FD is not set
465# CONFIG_BLK_DEV_COW_COMMON is not set
466# CONFIG_BLK_DEV_LOOP is not set
467# CONFIG_BLK_DEV_NBD is not set
468# CONFIG_BLK_DEV_RAM is not set
469# CONFIG_CDROM_PKTCDVD is not set
470# CONFIG_ATA_OVER_ETH is not set
471# CONFIG_BLK_DEV_HD is not set
472# CONFIG_MISC_DEVICES is not set
473CONFIG_HAVE_IDE=y
474# CONFIG_IDE is not set
475
476#
477# SCSI device support
478#
479# CONFIG_RAID_ATTRS is not set
480# CONFIG_SCSI is not set
481# CONFIG_SCSI_DMA is not set
482# CONFIG_SCSI_NETLINK is not set
483# CONFIG_ATA is not set
484# CONFIG_MD is not set
485# CONFIG_MACINTOSH_DRIVERS is not set
486CONFIG_NETDEVICES=y
487CONFIG_DUMMY=y
488# CONFIG_BONDING is not set
489# CONFIG_MACVLAN is not set
490# CONFIG_EQUALIZER is not set
491CONFIG_TUN=y
492# CONFIG_VETH is not set
493CONFIG_PHYLIB=y
494
495#
496# MII PHY device drivers
497#
498CONFIG_MARVELL_PHY=y
499# CONFIG_DAVICOM_PHY is not set
500# CONFIG_QSEMI_PHY is not set
501# CONFIG_LXT_PHY is not set
502# CONFIG_CICADA_PHY is not set
503# CONFIG_VITESSE_PHY is not set
504# CONFIG_SMSC_PHY is not set
505# CONFIG_BROADCOM_PHY is not set
506# CONFIG_ICPLUS_PHY is not set
507# CONFIG_REALTEK_PHY is not set
508# CONFIG_FIXED_PHY is not set
509# CONFIG_MDIO_BITBANG is not set
510CONFIG_NET_ETHERNET=y
511CONFIG_MII=y
512# CONFIG_IBM_NEW_EMAC_ZMII is not set
513# CONFIG_IBM_NEW_EMAC_RGMII is not set
514# CONFIG_IBM_NEW_EMAC_TAH is not set
515# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
516# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
517# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
518# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
519# CONFIG_B44 is not set
520CONFIG_NETDEV_1000=y
521# CONFIG_GIANFAR is not set
522CONFIG_UCC_GETH=y
523# CONFIG_UGETH_MAGIC_PACKET is not set
524# CONFIG_UGETH_FILTERING is not set
525# CONFIG_UGETH_TX_ON_DEMAND is not set
526# CONFIG_MV643XX_ETH is not set
527# CONFIG_NETDEV_10000 is not set
528
529#
530# Wireless LAN
531#
532# CONFIG_WLAN_PRE80211 is not set
533# CONFIG_WLAN_80211 is not set
534# CONFIG_IWLWIFI_LEDS is not set
535CONFIG_WAN=y
536CONFIG_HDLC=y
537# CONFIG_HDLC_RAW is not set
538# CONFIG_HDLC_RAW_ETH is not set
539# CONFIG_HDLC_CISCO is not set
540# CONFIG_HDLC_FR is not set
541# CONFIG_HDLC_PPP is not set
542
543#
544# X.25/LAPB support is disabled
545#
546CONFIG_HDLC_KM=y
547CONFIG_FS_UCC_HDLC=y
548# CONFIG_DLCI is not set
549CONFIG_PPP=y
550CONFIG_PPP_MULTILINK=y
551# CONFIG_PPP_FILTER is not set
552# CONFIG_PPP_ASYNC is not set
553# CONFIG_PPP_SYNC_TTY is not set
554# CONFIG_PPP_DEFLATE is not set
555# CONFIG_PPP_BSDCOMP is not set
556# CONFIG_PPP_MPPE is not set
557CONFIG_PPPOE=y
558# CONFIG_PPPOL2TP is not set
559# CONFIG_SLIP is not set
560CONFIG_SLHC=y
561# CONFIG_NETCONSOLE is not set
562# CONFIG_NETPOLL is not set
563# CONFIG_NET_POLL_CONTROLLER is not set
564# CONFIG_ISDN is not set
565# CONFIG_PHONE is not set
566
567#
568# Input device support
569#
570# CONFIG_INPUT is not set
571
572#
573# Hardware I/O ports
574#
575# CONFIG_SERIO is not set
576# CONFIG_GAMEPORT is not set
577
578#
579# Character devices
580#
581# CONFIG_VT is not set
582# CONFIG_DEVKMEM is not set
583# CONFIG_SERIAL_NONSTANDARD is not set
584
585#
586# Serial drivers
587#
588CONFIG_SERIAL_8250=y
589CONFIG_SERIAL_8250_CONSOLE=y
590CONFIG_SERIAL_8250_NR_UARTS=4
591CONFIG_SERIAL_8250_RUNTIME_UARTS=4
592# CONFIG_SERIAL_8250_EXTENDED is not set
593
594#
595# Non-8250 serial port support
596#
597# CONFIG_SERIAL_UARTLITE is not set
598CONFIG_SERIAL_CORE=y
599CONFIG_SERIAL_CORE_CONSOLE=y
600# CONFIG_SERIAL_OF_PLATFORM is not set
601# CONFIG_SERIAL_QE is not set
602CONFIG_UNIX98_PTYS=y
603CONFIG_LEGACY_PTYS=y
604CONFIG_LEGACY_PTY_COUNT=256
605# CONFIG_IPMI_HANDLER is not set
606CONFIG_HW_RANDOM=y
607# CONFIG_NVRAM is not set
608# CONFIG_GEN_RTC is not set
609# CONFIG_R3964 is not set
610# CONFIG_RAW_DRIVER is not set
611# CONFIG_TCG_TPM is not set
612CONFIG_BOOTCOUNT=y
613CONFIG_I2C=y
614CONFIG_I2C_BOARDINFO=y
615CONFIG_I2C_CHARDEV=y
616CONFIG_I2C_HELPER_AUTO=y
617
618#
619# I2C Hardware Bus support
620#
621
622#
623# I2C system bus drivers (mostly embedded / system-on-chip)
624#
625CONFIG_I2C_MPC=y
626# CONFIG_I2C_OCORES is not set
627# CONFIG_I2C_SIMTEC is not set
628
629#
630# External I2C/SMBus adapter drivers
631#
632# CONFIG_I2C_PARPORT_LIGHT is not set
633# CONFIG_I2C_TAOS_EVM is not set
634
635#
636# Other I2C/SMBus bus drivers
637#
638# CONFIG_I2C_PCA_PLATFORM is not set
639# CONFIG_I2C_STUB is not set
640
641#
642# Miscellaneous I2C Chip support
643#
644# CONFIG_DS1682 is not set
645# CONFIG_AT24 is not set
646# CONFIG_SENSORS_EEPROM is not set
647# CONFIG_SENSORS_PCF8574 is not set
648# CONFIG_PCF8575 is not set
649# CONFIG_SENSORS_PCA9539 is not set
650# CONFIG_SENSORS_PCF8591 is not set
651# CONFIG_SENSORS_MAX6875 is not set
652# CONFIG_SENSORS_TSL2550 is not set
653# CONFIG_MCU_MPC8349EMITX is not set
654# CONFIG_I2C_DEBUG_CORE is not set
655# CONFIG_I2C_DEBUG_ALGO is not set
656# CONFIG_I2C_DEBUG_BUS is not set
657# CONFIG_I2C_DEBUG_CHIP is not set
658# CONFIG_SPI is not set
659CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
660# CONFIG_GPIOLIB is not set
661# CONFIG_W1 is not set
662# CONFIG_POWER_SUPPLY is not set
663# CONFIG_HWMON is not set
664# CONFIG_THERMAL is not set
665# CONFIG_THERMAL_HWMON is not set
666# CONFIG_WATCHDOG is not set
667CONFIG_SSB_POSSIBLE=y
668
669#
670# Sonics Silicon Backplane
671#
672# CONFIG_SSB is not set
673
674#
675# Multifunction device drivers
676#
677# CONFIG_MFD_CORE is not set
678# CONFIG_MFD_SM501 is not set
679# CONFIG_HTC_PASIC3 is not set
680# CONFIG_MFD_TMIO is not set
681# CONFIG_PMIC_DA903X is not set
682# CONFIG_MFD_WM8400 is not set
683# CONFIG_MFD_WM8350_I2C is not set
684# CONFIG_REGULATOR is not set
685
686#
687# Multimedia devices
688#
689
690#
691# Multimedia core support
692#
693# CONFIG_VIDEO_DEV is not set
694# CONFIG_DVB_CORE is not set
695# CONFIG_VIDEO_MEDIA is not set
696
697#
698# Multimedia drivers
699#
700# CONFIG_DAB is not set
701
702#
703# Graphics support
704#
705# CONFIG_VGASTATE is not set
706# CONFIG_VIDEO_OUTPUT_CONTROL is not set
707# CONFIG_FB is not set
708# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
709
710#
711# Display device support
712#
713# CONFIG_DISPLAY_SUPPORT is not set
714# CONFIG_SOUND is not set
715# CONFIG_USB_SUPPORT is not set
716# CONFIG_MMC is not set
717# CONFIG_MEMSTICK is not set
718# CONFIG_NEW_LEDS is not set
719# CONFIG_ACCESSIBILITY is not set
720# CONFIG_EDAC is not set
721# CONFIG_RTC_CLASS is not set
722# CONFIG_DMADEVICES is not set
723CONFIG_UIO=y
724# CONFIG_UIO_PDRV is not set
725# CONFIG_UIO_PDRV_GENIRQ is not set
726# CONFIG_UIO_SMX is not set
727# CONFIG_UIO_SERCOS3 is not set
728# CONFIG_STAGING is not set
729
730#
731# File systems
732#
733# CONFIG_EXT2_FS is not set
734# CONFIG_EXT3_FS is not set
735# CONFIG_EXT4_FS is not set
736# CONFIG_REISERFS_FS is not set
737# CONFIG_JFS_FS is not set
738# CONFIG_FS_POSIX_ACL is not set
739CONFIG_FILE_LOCKING=y
740# CONFIG_XFS_FS is not set
741# CONFIG_OCFS2_FS is not set
742# CONFIG_DNOTIFY is not set
743CONFIG_INOTIFY=y
744CONFIG_INOTIFY_USER=y
745# CONFIG_QUOTA is not set
746# CONFIG_AUTOFS_FS is not set
747# CONFIG_AUTOFS4_FS is not set
748# CONFIG_FUSE_FS is not set
749
750#
751# CD-ROM/DVD Filesystems
752#
753# CONFIG_ISO9660_FS is not set
754# CONFIG_UDF_FS is not set
755
756#
757# DOS/FAT/NT Filesystems
758#
759# CONFIG_MSDOS_FS is not set
760# CONFIG_VFAT_FS is not set
761# CONFIG_NTFS_FS is not set
762
763#
764# Pseudo filesystems
765#
766CONFIG_PROC_FS=y
767# CONFIG_PROC_KCORE is not set
768CONFIG_PROC_SYSCTL=y
769CONFIG_PROC_PAGE_MONITOR=y
770CONFIG_SYSFS=y
771CONFIG_TMPFS=y
772# CONFIG_TMPFS_POSIX_ACL is not set
773# CONFIG_HUGETLB_PAGE is not set
774# CONFIG_CONFIGFS_FS is not set
775
776#
777# Miscellaneous filesystems
778#
779# CONFIG_ADFS_FS is not set
780# CONFIG_AFFS_FS is not set
781# CONFIG_HFS_FS is not set
782# CONFIG_HFSPLUS_FS is not set
783# CONFIG_BEFS_FS is not set
784# CONFIG_BFS_FS is not set
785# CONFIG_EFS_FS is not set
786CONFIG_JFFS2_FS=y
787CONFIG_JFFS2_FS_DEBUG=0
788CONFIG_JFFS2_FS_WRITEBUFFER=y
789# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
790# CONFIG_JFFS2_SUMMARY is not set
791# CONFIG_JFFS2_FS_XATTR is not set
792# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
793CONFIG_JFFS2_ZLIB=y
794# CONFIG_JFFS2_LZO is not set
795CONFIG_JFFS2_RTIME=y
796# CONFIG_JFFS2_RUBIN is not set
797# CONFIG_UBIFS_FS is not set
798# CONFIG_CRAMFS is not set
799# CONFIG_VXFS_FS is not set
800# CONFIG_MINIX_FS is not set
801# CONFIG_OMFS_FS is not set
802# CONFIG_HPFS_FS is not set
803# CONFIG_QNX4FS_FS is not set
804# CONFIG_ROMFS_FS is not set
805# CONFIG_SYSV_FS is not set
806# CONFIG_UFS_FS is not set
807CONFIG_NETWORK_FILESYSTEMS=y
808CONFIG_NFS_FS=y
809CONFIG_NFS_V3=y
810# CONFIG_NFS_V3_ACL is not set
811# CONFIG_NFS_V4 is not set
812CONFIG_ROOT_NFS=y
813# CONFIG_NFSD is not set
814CONFIG_LOCKD=y
815CONFIG_LOCKD_V4=y
816CONFIG_NFS_COMMON=y
817CONFIG_SUNRPC=y
818# CONFIG_SUNRPC_REGISTER_V4 is not set
819# CONFIG_RPCSEC_GSS_KRB5 is not set
820# CONFIG_RPCSEC_GSS_SPKM3 is not set
821# CONFIG_SMB_FS is not set
822# CONFIG_CIFS is not set
823# CONFIG_NCP_FS is not set
824# CONFIG_CODA_FS is not set
825# CONFIG_AFS_FS is not set
826
827#
828# Partition Types
829#
830CONFIG_PARTITION_ADVANCED=y
831# CONFIG_ACORN_PARTITION is not set
832# CONFIG_OSF_PARTITION is not set
833# CONFIG_AMIGA_PARTITION is not set
834# CONFIG_ATARI_PARTITION is not set
835# CONFIG_MAC_PARTITION is not set
836# CONFIG_MSDOS_PARTITION is not set
837# CONFIG_LDM_PARTITION is not set
838# CONFIG_SGI_PARTITION is not set
839# CONFIG_ULTRIX_PARTITION is not set
840# CONFIG_SUN_PARTITION is not set
841# CONFIG_KARMA_PARTITION is not set
842# CONFIG_EFI_PARTITION is not set
843# CONFIG_SYSV68_PARTITION is not set
844# CONFIG_NLS is not set
845# CONFIG_DLM is not set
846CONFIG_UCC_FAST=y
847CONFIG_UCC=y
848
849#
850# Library routines
851#
852CONFIG_BITREVERSE=y
853# CONFIG_CRC_CCITT is not set
854# CONFIG_CRC16 is not set
855# CONFIG_CRC_T10DIF is not set
856# CONFIG_CRC_ITU_T is not set
857CONFIG_CRC32=y
858# CONFIG_CRC7 is not set
859# CONFIG_LIBCRC32C is not set
860CONFIG_ZLIB_INFLATE=y
861CONFIG_ZLIB_DEFLATE=y
862CONFIG_PLIST=y
863CONFIG_HAS_IOMEM=y
864CONFIG_HAS_IOPORT=y
865CONFIG_HAS_DMA=y
866CONFIG_HAVE_LMB=y
867
868#
869# Kernel hacking
870#
871# CONFIG_PRINTK_TIME is not set
872CONFIG_ENABLE_WARN_DEPRECATED=y
873CONFIG_ENABLE_MUST_CHECK=y
874CONFIG_FRAME_WARN=1024
875# CONFIG_MAGIC_SYSRQ is not set
876# CONFIG_UNUSED_SYMBOLS is not set
877CONFIG_DEBUG_FS=y
878# CONFIG_HEADERS_CHECK is not set
879# CONFIG_DEBUG_KERNEL is not set
880# CONFIG_DEBUG_BUGVERBOSE is not set
881# CONFIG_DEBUG_MEMORY_INIT is not set
882# CONFIG_RCU_CPU_STALL_DETECTOR is not set
883# CONFIG_LATENCYTOP is not set
884CONFIG_SYSCTL_SYSCALL_CHECK=y
885CONFIG_HAVE_FUNCTION_TRACER=y
886
887#
888# Tracers
889#
890# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
891# CONFIG_SAMPLES is not set
892CONFIG_HAVE_ARCH_KGDB=y
893# CONFIG_IRQSTACKS is not set
894# CONFIG_VIRQ_DEBUG is not set
895# CONFIG_BOOTX_TEXT is not set
896# CONFIG_PPC_EARLY_DEBUG is not set
897
898#
899# Security options
900#
901# CONFIG_KEYS is not set
902# CONFIG_SECURITY is not set
903# CONFIG_SECURITYFS is not set
904# CONFIG_SECURITY_FILE_CAPABILITIES is not set
905# CONFIG_CRYPTO is not set
906# CONFIG_PPC_CLOCK is not set
907CONFIG_PPC_LIB_RHEAP=y
908# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
new file mode 100644
index 000000000000..2552cbefba6b
--- /dev/null
+++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
@@ -0,0 +1,1821 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc6
4# Thu Jun 11 11:25:17 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_E500=y
18# CONFIG_PPC_E500MC is not set
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21CONFIG_FSL_EMB_PERFMON=y
22# CONFIG_PHYS_64BIT is not set
23CONFIG_SPE=y
24CONFIG_PPC_MMU_NOHASH=y
25CONFIG_PPC_BOOK3E_MMU=y
26# CONFIG_PPC_MM_SLICES is not set
27CONFIG_SMP=y
28CONFIG_NR_CPUS=2
29CONFIG_PPC32=y
30CONFIG_WORD_SIZE=32
31# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
32CONFIG_MMU=y
33CONFIG_GENERIC_CMOS_UPDATE=y
34CONFIG_GENERIC_TIME=y
35CONFIG_GENERIC_TIME_VSYSCALL=y
36CONFIG_GENERIC_CLOCKEVENTS=y
37CONFIG_GENERIC_HARDIRQS=y
38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
39CONFIG_IRQ_PER_CPU=y
40CONFIG_STACKTRACE_SUPPORT=y
41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_LOCKDEP_SUPPORT=y
43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
44CONFIG_ARCH_HAS_ILOG2_U32=y
45CONFIG_GENERIC_HWEIGHT=y
46CONFIG_GENERIC_CALIBRATE_DELAY=y
47CONFIG_GENERIC_FIND_NEXT_BIT=y
48CONFIG_GENERIC_GPIO=y
49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
50CONFIG_PPC=y
51CONFIG_EARLY_PRINTK=y
52CONFIG_GENERIC_NVRAM=y
53CONFIG_SCHED_OMIT_FRAME_POINTER=y
54CONFIG_ARCH_MAY_HAVE_PC_FDC=y
55CONFIG_PPC_OF=y
56CONFIG_OF=y
57CONFIG_PPC_UDBG_16550=y
58CONFIG_GENERIC_TBSYNC=y
59CONFIG_AUDIT_ARCH=y
60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
62CONFIG_DEFAULT_UIMAGE=y
63# CONFIG_PPC_DCR_NATIVE is not set
64# CONFIG_PPC_DCR_MMIO is not set
65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67
68#
69# General setup
70#
71CONFIG_EXPERIMENTAL=y
72CONFIG_LOCK_KERNEL=y
73CONFIG_INIT_ENV_ARG_LIMIT=32
74CONFIG_LOCALVERSION=""
75CONFIG_LOCALVERSION_AUTO=y
76CONFIG_SWAP=y
77CONFIG_SYSVIPC=y
78CONFIG_SYSVIPC_SYSCTL=y
79CONFIG_POSIX_MQUEUE=y
80CONFIG_POSIX_MQUEUE_SYSCTL=y
81CONFIG_BSD_PROCESS_ACCT=y
82# CONFIG_BSD_PROCESS_ACCT_V3 is not set
83# CONFIG_TASKSTATS is not set
84CONFIG_AUDIT=y
85# CONFIG_AUDITSYSCALL is not set
86
87#
88# RCU Subsystem
89#
90CONFIG_CLASSIC_RCU=y
91# CONFIG_TREE_RCU is not set
92# CONFIG_PREEMPT_RCU is not set
93# CONFIG_TREE_RCU_TRACE is not set
94# CONFIG_PREEMPT_RCU_TRACE is not set
95CONFIG_IKCONFIG=y
96CONFIG_IKCONFIG_PROC=y
97CONFIG_LOG_BUF_SHIFT=14
98# CONFIG_GROUP_SCHED is not set
99# CONFIG_CGROUPS is not set
100CONFIG_SYSFS_DEPRECATED=y
101CONFIG_SYSFS_DEPRECATED_V2=y
102# CONFIG_RELAY is not set
103# CONFIG_NAMESPACES is not set
104CONFIG_BLK_DEV_INITRD=y
105CONFIG_INITRAMFS_SOURCE=""
106CONFIG_RD_GZIP=y
107# CONFIG_RD_BZIP2 is not set
108# CONFIG_RD_LZMA is not set
109# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
110CONFIG_SYSCTL=y
111CONFIG_ANON_INODES=y
112CONFIG_EMBEDDED=y
113CONFIG_SYSCTL_SYSCALL=y
114CONFIG_KALLSYMS=y
115CONFIG_KALLSYMS_ALL=y
116CONFIG_KALLSYMS_EXTRA_PASS=y
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y
120CONFIG_BUG=y
121CONFIG_ELF_CORE=y
122CONFIG_BASE_FULL=y
123CONFIG_FUTEX=y
124CONFIG_EPOLL=y
125CONFIG_SIGNALFD=y
126CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y
128CONFIG_SHMEM=y
129CONFIG_AIO=y
130CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y
132CONFIG_SLUB_DEBUG=y
133CONFIG_COMPAT_BRK=y
134# CONFIG_SLAB is not set
135CONFIG_SLUB=y
136# CONFIG_SLOB is not set
137# CONFIG_PROFILING is not set
138# CONFIG_MARKERS is not set
139CONFIG_HAVE_OPROFILE=y
140# CONFIG_KPROBES is not set
141CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
142CONFIG_HAVE_IOREMAP_PROT=y
143CONFIG_HAVE_KPROBES=y
144CONFIG_HAVE_KRETPROBES=y
145CONFIG_HAVE_ARCH_TRACEHOOK=y
146CONFIG_USE_GENERIC_SMP_HELPERS=y
147# CONFIG_SLOW_WORK is not set
148# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
149CONFIG_SLABINFO=y
150CONFIG_RT_MUTEXES=y
151CONFIG_BASE_SMALL=0
152CONFIG_MODULES=y
153# CONFIG_MODULE_FORCE_LOAD is not set
154CONFIG_MODULE_UNLOAD=y
155CONFIG_MODULE_FORCE_UNLOAD=y
156CONFIG_MODVERSIONS=y
157# CONFIG_MODULE_SRCVERSION_ALL is not set
158CONFIG_STOP_MACHINE=y
159CONFIG_BLOCK=y
160CONFIG_LBD=y
161# CONFIG_BLK_DEV_BSG is not set
162# CONFIG_BLK_DEV_INTEGRITY is not set
163
164#
165# IO Schedulers
166#
167CONFIG_IOSCHED_NOOP=y
168CONFIG_IOSCHED_AS=y
169CONFIG_IOSCHED_DEADLINE=y
170CONFIG_IOSCHED_CFQ=y
171# CONFIG_DEFAULT_AS is not set
172# CONFIG_DEFAULT_DEADLINE is not set
173CONFIG_DEFAULT_CFQ=y
174# CONFIG_DEFAULT_NOOP is not set
175CONFIG_DEFAULT_IOSCHED="cfq"
176# CONFIG_FREEZER is not set
177CONFIG_PPC_MSI_BITMAP=y
178
179#
180# Platform support
181#
182# CONFIG_PPC_CELL is not set
183# CONFIG_PPC_CELL_NATIVE is not set
184# CONFIG_PQ2ADS is not set
185CONFIG_MPC85xx=y
186# CONFIG_MPC8540_ADS is not set
187# CONFIG_MPC8560_ADS is not set
188# CONFIG_MPC85xx_CDS is not set
189# CONFIG_MPC85xx_MDS is not set
190# CONFIG_MPC8536_DS is not set
191# CONFIG_MPC85xx_DS is not set
192# CONFIG_SOCRATES is not set
193# CONFIG_KSI8560 is not set
194CONFIG_XES_MPC85xx=y
195# CONFIG_STX_GP3 is not set
196# CONFIG_TQM8540 is not set
197# CONFIG_TQM8541 is not set
198# CONFIG_TQM8548 is not set
199# CONFIG_TQM8555 is not set
200# CONFIG_TQM8560 is not set
201# CONFIG_SBC8548 is not set
202# CONFIG_SBC8560 is not set
203# CONFIG_IPIC is not set
204CONFIG_MPIC=y
205# CONFIG_MPIC_WEIRD is not set
206# CONFIG_PPC_I8259 is not set
207# CONFIG_PPC_RTAS is not set
208# CONFIG_MMIO_NVRAM is not set
209# CONFIG_PPC_MPC106 is not set
210# CONFIG_PPC_970_NAP is not set
211# CONFIG_PPC_INDIRECT_IO is not set
212# CONFIG_GENERIC_IOMAP is not set
213# CONFIG_CPU_FREQ is not set
214# CONFIG_QUICC_ENGINE is not set
215# CONFIG_CPM2 is not set
216# CONFIG_FSL_ULI1575 is not set
217CONFIG_MPC8xxx_GPIO=y
218# CONFIG_SIMPLE_GPIO is not set
219
220#
221# Kernel options
222#
223CONFIG_HIGHMEM=y
224# CONFIG_NO_HZ is not set
225# CONFIG_HIGH_RES_TIMERS is not set
226CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
227# CONFIG_HZ_100 is not set
228CONFIG_HZ_250=y
229# CONFIG_HZ_300 is not set
230# CONFIG_HZ_1000 is not set
231CONFIG_HZ=250
232# CONFIG_SCHED_HRTICK is not set
233CONFIG_PREEMPT_NONE=y
234# CONFIG_PREEMPT_VOLUNTARY is not set
235# CONFIG_PREEMPT is not set
236CONFIG_BINFMT_ELF=y
237# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
238# CONFIG_HAVE_AOUT is not set
239# CONFIG_BINFMT_MISC is not set
240CONFIG_MATH_EMULATION=y
241# CONFIG_IOMMU_HELPER is not set
242CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
243CONFIG_ARCH_HAS_WALK_MEMORY=y
244CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
245# CONFIG_IRQ_ALL_CPUS is not set
246CONFIG_ARCH_FLATMEM_ENABLE=y
247CONFIG_ARCH_POPULATES_NODE_MAP=y
248CONFIG_SELECT_MEMORY_MODEL=y
249CONFIG_FLATMEM_MANUAL=y
250# CONFIG_DISCONTIGMEM_MANUAL is not set
251# CONFIG_SPARSEMEM_MANUAL is not set
252CONFIG_FLATMEM=y
253CONFIG_FLAT_NODE_MEM_MAP=y
254CONFIG_PAGEFLAGS_EXTENDED=y
255CONFIG_SPLIT_PTLOCK_CPUS=4
256CONFIG_MIGRATION=y
257# CONFIG_PHYS_ADDR_T_64BIT is not set
258CONFIG_ZONE_DMA_FLAG=1
259CONFIG_BOUNCE=y
260CONFIG_VIRT_TO_BUS=y
261CONFIG_UNEVICTABLE_LRU=y
262CONFIG_HAVE_MLOCK=y
263CONFIG_HAVE_MLOCKED_PAGE_BIT=y
264CONFIG_PPC_4K_PAGES=y
265# CONFIG_PPC_16K_PAGES is not set
266# CONFIG_PPC_64K_PAGES is not set
267# CONFIG_PPC_256K_PAGES is not set
268CONFIG_FORCE_MAX_ZONEORDER=11
269CONFIG_PROC_DEVICETREE=y
270# CONFIG_CMDLINE_BOOL is not set
271CONFIG_EXTRA_TARGETS=""
272# CONFIG_PM is not set
273CONFIG_SECCOMP=y
274CONFIG_ISA_DMA_API=y
275
276#
277# Bus options
278#
279CONFIG_ZONE_DMA=y
280CONFIG_PPC_INDIRECT_PCI=y
281CONFIG_FSL_SOC=y
282CONFIG_FSL_PCI=y
283CONFIG_FSL_LBC=y
284CONFIG_PPC_PCI_CHOICE=y
285CONFIG_PCI=y
286CONFIG_PCI_DOMAINS=y
287CONFIG_PCI_SYSCALL=y
288CONFIG_PCIEPORTBUS=y
289CONFIG_PCIEAER=y
290# CONFIG_PCIEASPM is not set
291CONFIG_ARCH_SUPPORTS_MSI=y
292CONFIG_PCI_MSI=y
293CONFIG_PCI_LEGACY=y
294# CONFIG_PCI_DEBUG is not set
295# CONFIG_PCI_STUB is not set
296# CONFIG_PCI_IOV is not set
297# CONFIG_PCCARD is not set
298# CONFIG_HOTPLUG_PCI is not set
299# CONFIG_HAS_RAPIDIO is not set
300
301#
302# Advanced setup
303#
304CONFIG_ADVANCED_OPTIONS=y
305CONFIG_LOWMEM_SIZE_BOOL=y
306CONFIG_LOWMEM_SIZE=0x40000000
307# CONFIG_LOWMEM_CAM_NUM_BOOL is not set
308CONFIG_LOWMEM_CAM_NUM=3
309# CONFIG_RELOCATABLE is not set
310CONFIG_PAGE_OFFSET_BOOL=y
311CONFIG_PAGE_OFFSET=0x80000000
312CONFIG_KERNEL_START_BOOL=y
313CONFIG_KERNEL_START=0x80000000
314# CONFIG_PHYSICAL_START_BOOL is not set
315CONFIG_PHYSICAL_START=0x00000000
316CONFIG_PHYSICAL_ALIGN=0x04000000
317CONFIG_TASK_SIZE_BOOL=y
318CONFIG_TASK_SIZE=0x80000000
319CONFIG_NET=y
320
321#
322# Networking options
323#
324CONFIG_PACKET=y
325# CONFIG_PACKET_MMAP is not set
326CONFIG_UNIX=y
327CONFIG_XFRM=y
328CONFIG_XFRM_USER=y
329# CONFIG_XFRM_SUB_POLICY is not set
330# CONFIG_XFRM_MIGRATE is not set
331# CONFIG_XFRM_STATISTICS is not set
332CONFIG_NET_KEY=y
333# CONFIG_NET_KEY_MIGRATE is not set
334CONFIG_INET=y
335CONFIG_IP_MULTICAST=y
336CONFIG_IP_ADVANCED_ROUTER=y
337CONFIG_ASK_IP_FIB_HASH=y
338# CONFIG_IP_FIB_TRIE is not set
339CONFIG_IP_FIB_HASH=y
340CONFIG_IP_MULTIPLE_TABLES=y
341CONFIG_IP_ROUTE_MULTIPATH=y
342CONFIG_IP_ROUTE_VERBOSE=y
343CONFIG_IP_PNP=y
344CONFIG_IP_PNP_DHCP=y
345CONFIG_IP_PNP_BOOTP=y
346CONFIG_IP_PNP_RARP=y
347CONFIG_NET_IPIP=y
348CONFIG_NET_IPGRE=y
349CONFIG_NET_IPGRE_BROADCAST=y
350CONFIG_IP_MROUTE=y
351CONFIG_IP_PIMSM_V1=y
352CONFIG_IP_PIMSM_V2=y
353CONFIG_ARPD=y
354# CONFIG_SYN_COOKIES is not set
355# CONFIG_INET_AH is not set
356# CONFIG_INET_ESP is not set
357# CONFIG_INET_IPCOMP is not set
358# CONFIG_INET_XFRM_TUNNEL is not set
359CONFIG_INET_TUNNEL=y
360# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
361# CONFIG_INET_XFRM_MODE_TUNNEL is not set
362# CONFIG_INET_XFRM_MODE_BEET is not set
363# CONFIG_INET_LRO is not set
364CONFIG_INET_DIAG=y
365CONFIG_INET_TCP_DIAG=y
366# CONFIG_TCP_CONG_ADVANCED is not set
367CONFIG_TCP_CONG_CUBIC=y
368CONFIG_DEFAULT_TCP_CONG="cubic"
369# CONFIG_TCP_MD5SIG is not set
370CONFIG_IPV6=y
371# CONFIG_IPV6_PRIVACY is not set
372# CONFIG_IPV6_ROUTER_PREF is not set
373# CONFIG_IPV6_OPTIMISTIC_DAD is not set
374# CONFIG_INET6_AH is not set
375# CONFIG_INET6_ESP is not set
376# CONFIG_INET6_IPCOMP is not set
377# CONFIG_IPV6_MIP6 is not set
378# CONFIG_INET6_XFRM_TUNNEL is not set
379# CONFIG_INET6_TUNNEL is not set
380CONFIG_INET6_XFRM_MODE_TRANSPORT=y
381CONFIG_INET6_XFRM_MODE_TUNNEL=y
382CONFIG_INET6_XFRM_MODE_BEET=y
383# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
384CONFIG_IPV6_SIT=y
385CONFIG_IPV6_NDISC_NODETYPE=y
386# CONFIG_IPV6_TUNNEL is not set
387# CONFIG_IPV6_MULTIPLE_TABLES is not set
388# CONFIG_IPV6_MROUTE is not set
389# CONFIG_NETWORK_SECMARK is not set
390# CONFIG_NETFILTER is not set
391# CONFIG_IP_DCCP is not set
392# CONFIG_IP_SCTP is not set
393# CONFIG_TIPC is not set
394# CONFIG_ATM is not set
395# CONFIG_BRIDGE is not set
396# CONFIG_NET_DSA is not set
397# CONFIG_VLAN_8021Q is not set
398# CONFIG_DECNET is not set
399# CONFIG_LLC2 is not set
400# CONFIG_IPX is not set
401# CONFIG_ATALK is not set
402# CONFIG_X25 is not set
403# CONFIG_LAPB is not set
404# CONFIG_ECONET is not set
405# CONFIG_WAN_ROUTER is not set
406# CONFIG_PHONET is not set
407# CONFIG_NET_SCHED is not set
408# CONFIG_DCB is not set
409
410#
411# Network testing
412#
413# CONFIG_NET_PKTGEN is not set
414# CONFIG_HAMRADIO is not set
415# CONFIG_CAN is not set
416# CONFIG_IRDA is not set
417# CONFIG_BT is not set
418# CONFIG_AF_RXRPC is not set
419CONFIG_FIB_RULES=y
420# CONFIG_WIRELESS is not set
421# CONFIG_WIMAX is not set
422# CONFIG_RFKILL is not set
423# CONFIG_NET_9P is not set
424
425#
426# Device Drivers
427#
428
429#
430# Generic Driver Options
431#
432CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
433CONFIG_STANDALONE=y
434CONFIG_PREVENT_FIRMWARE_BUILD=y
435CONFIG_FW_LOADER=y
436CONFIG_FIRMWARE_IN_KERNEL=y
437CONFIG_EXTRA_FIRMWARE=""
438# CONFIG_DEBUG_DRIVER is not set
439# CONFIG_DEBUG_DEVRES is not set
440# CONFIG_SYS_HYPERVISOR is not set
441# CONFIG_CONNECTOR is not set
442CONFIG_MTD=y
443# CONFIG_MTD_DEBUG is not set
444# CONFIG_MTD_CONCAT is not set
445CONFIG_MTD_PARTITIONS=y
446# CONFIG_MTD_TESTS is not set
447CONFIG_MTD_REDBOOT_PARTS=y
448CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
449# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
450# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
451CONFIG_MTD_CMDLINE_PARTS=y
452CONFIG_MTD_OF_PARTS=y
453# CONFIG_MTD_AR7_PARTS is not set
454
455#
456# User Modules And Translation Layers
457#
458CONFIG_MTD_CHAR=y
459CONFIG_MTD_BLKDEVS=y
460CONFIG_MTD_BLOCK=y
461# CONFIG_FTL is not set
462# CONFIG_NFTL is not set
463# CONFIG_INFTL is not set
464# CONFIG_RFD_FTL is not set
465# CONFIG_SSFDC is not set
466# CONFIG_MTD_OOPS is not set
467
468#
469# RAM/ROM/Flash chip drivers
470#
471CONFIG_MTD_CFI=y
472CONFIG_MTD_JEDECPROBE=y
473CONFIG_MTD_GEN_PROBE=y
474# CONFIG_MTD_CFI_ADV_OPTIONS is not set
475CONFIG_MTD_MAP_BANK_WIDTH_1=y
476CONFIG_MTD_MAP_BANK_WIDTH_2=y
477CONFIG_MTD_MAP_BANK_WIDTH_4=y
478# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
479# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
480# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
481CONFIG_MTD_CFI_I1=y
482CONFIG_MTD_CFI_I2=y
483# CONFIG_MTD_CFI_I4 is not set
484# CONFIG_MTD_CFI_I8 is not set
485CONFIG_MTD_CFI_INTELEXT=y
486CONFIG_MTD_CFI_AMDSTD=y
487CONFIG_MTD_CFI_STAA=y
488CONFIG_MTD_CFI_UTIL=y
489# CONFIG_MTD_RAM is not set
490# CONFIG_MTD_ROM is not set
491# CONFIG_MTD_ABSENT is not set
492
493#
494# Mapping drivers for chip access
495#
496# CONFIG_MTD_COMPLEX_MAPPINGS is not set
497# CONFIG_MTD_PHYSMAP is not set
498CONFIG_MTD_PHYSMAP_OF=y
499# CONFIG_MTD_INTEL_VR_NOR is not set
500# CONFIG_MTD_PLATRAM is not set
501
502#
503# Self-contained MTD device drivers
504#
505# CONFIG_MTD_PMC551 is not set
506# CONFIG_MTD_SLRAM is not set
507# CONFIG_MTD_PHRAM is not set
508# CONFIG_MTD_MTDRAM is not set
509# CONFIG_MTD_BLOCK2MTD is not set
510
511#
512# Disk-On-Chip Device Drivers
513#
514# CONFIG_MTD_DOC2000 is not set
515# CONFIG_MTD_DOC2001 is not set
516# CONFIG_MTD_DOC2001PLUS is not set
517CONFIG_MTD_NAND=y
518# CONFIG_MTD_NAND_VERIFY_WRITE is not set
519# CONFIG_MTD_NAND_ECC_SMC is not set
520# CONFIG_MTD_NAND_MUSEUM_IDS is not set
521CONFIG_MTD_NAND_IDS=y
522# CONFIG_MTD_NAND_DISKONCHIP is not set
523# CONFIG_MTD_NAND_CAFE is not set
524# CONFIG_MTD_NAND_NANDSIM is not set
525# CONFIG_MTD_NAND_PLATFORM is not set
526# CONFIG_MTD_ALAUDA is not set
527CONFIG_MTD_NAND_FSL_ELBC=y
528CONFIG_MTD_NAND_FSL_UPM=y
529# CONFIG_MTD_ONENAND is not set
530
531#
532# LPDDR flash memory drivers
533#
534# CONFIG_MTD_LPDDR is not set
535
536#
537# UBI - Unsorted block images
538#
539# CONFIG_MTD_UBI is not set
540CONFIG_OF_DEVICE=y
541CONFIG_OF_GPIO=y
542CONFIG_OF_I2C=y
543# CONFIG_PARPORT is not set
544CONFIG_BLK_DEV=y
545# CONFIG_BLK_DEV_FD is not set
546# CONFIG_BLK_CPQ_DA is not set
547# CONFIG_BLK_CPQ_CISS_DA is not set
548# CONFIG_BLK_DEV_DAC960 is not set
549# CONFIG_BLK_DEV_UMEM is not set
550# CONFIG_BLK_DEV_COW_COMMON is not set
551CONFIG_BLK_DEV_LOOP=y
552# CONFIG_BLK_DEV_CRYPTOLOOP is not set
553CONFIG_BLK_DEV_NBD=y
554# CONFIG_BLK_DEV_SX8 is not set
555# CONFIG_BLK_DEV_UB is not set
556CONFIG_BLK_DEV_RAM=y
557CONFIG_BLK_DEV_RAM_COUNT=16
558CONFIG_BLK_DEV_RAM_SIZE=131072
559# CONFIG_BLK_DEV_XIP is not set
560# CONFIG_CDROM_PKTCDVD is not set
561# CONFIG_ATA_OVER_ETH is not set
562# CONFIG_BLK_DEV_HD is not set
563CONFIG_MISC_DEVICES=y
564# CONFIG_PHANTOM is not set
565# CONFIG_SGI_IOC4 is not set
566# CONFIG_TIFM_CORE is not set
567# CONFIG_ICS932S401 is not set
568# CONFIG_ENCLOSURE_SERVICES is not set
569# CONFIG_HP_ILO is not set
570# CONFIG_ISL29003 is not set
571# CONFIG_C2PORT is not set
572
573#
574# EEPROM support
575#
576# CONFIG_EEPROM_AT24 is not set
577# CONFIG_EEPROM_LEGACY is not set
578# CONFIG_EEPROM_93CX6 is not set
579CONFIG_HAVE_IDE=y
580# CONFIG_IDE is not set
581
582#
583# SCSI device support
584#
585# CONFIG_RAID_ATTRS is not set
586CONFIG_SCSI=y
587CONFIG_SCSI_DMA=y
588# CONFIG_SCSI_TGT is not set
589# CONFIG_SCSI_NETLINK is not set
590CONFIG_SCSI_PROC_FS=y
591
592#
593# SCSI support type (disk, tape, CD-ROM)
594#
595CONFIG_BLK_DEV_SD=y
596CONFIG_CHR_DEV_ST=y
597# CONFIG_CHR_DEV_OSST is not set
598CONFIG_BLK_DEV_SR=y
599# CONFIG_BLK_DEV_SR_VENDOR is not set
600CONFIG_CHR_DEV_SG=y
601# CONFIG_CHR_DEV_SCH is not set
602
603#
604# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
605#
606CONFIG_SCSI_MULTI_LUN=y
607# CONFIG_SCSI_CONSTANTS is not set
608CONFIG_SCSI_LOGGING=y
609# CONFIG_SCSI_SCAN_ASYNC is not set
610CONFIG_SCSI_WAIT_SCAN=m
611
612#
613# SCSI Transports
614#
615# CONFIG_SCSI_SPI_ATTRS is not set
616# CONFIG_SCSI_FC_ATTRS is not set
617# CONFIG_SCSI_ISCSI_ATTRS is not set
618# CONFIG_SCSI_SAS_LIBSAS is not set
619# CONFIG_SCSI_SRP_ATTRS is not set
620CONFIG_SCSI_LOWLEVEL=y
621# CONFIG_ISCSI_TCP is not set
622# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
623# CONFIG_SCSI_3W_9XXX is not set
624# CONFIG_SCSI_ACARD is not set
625# CONFIG_SCSI_AACRAID is not set
626# CONFIG_SCSI_AIC7XXX is not set
627# CONFIG_SCSI_AIC7XXX_OLD is not set
628# CONFIG_SCSI_AIC79XX is not set
629# CONFIG_SCSI_AIC94XX is not set
630# CONFIG_SCSI_DPT_I2O is not set
631# CONFIG_SCSI_ADVANSYS is not set
632# CONFIG_SCSI_ARCMSR is not set
633# CONFIG_MEGARAID_NEWGEN is not set
634# CONFIG_MEGARAID_LEGACY is not set
635# CONFIG_MEGARAID_SAS is not set
636# CONFIG_SCSI_MPT2SAS is not set
637# CONFIG_SCSI_HPTIOP is not set
638# CONFIG_SCSI_BUSLOGIC is not set
639# CONFIG_LIBFC is not set
640# CONFIG_LIBFCOE is not set
641# CONFIG_FCOE is not set
642# CONFIG_SCSI_DMX3191D is not set
643# CONFIG_SCSI_EATA is not set
644# CONFIG_SCSI_FUTURE_DOMAIN is not set
645# CONFIG_SCSI_GDTH is not set
646# CONFIG_SCSI_IPS is not set
647# CONFIG_SCSI_INITIO is not set
648# CONFIG_SCSI_INIA100 is not set
649# CONFIG_SCSI_MVSAS is not set
650# CONFIG_SCSI_STEX is not set
651# CONFIG_SCSI_SYM53C8XX_2 is not set
652# CONFIG_SCSI_IPR is not set
653# CONFIG_SCSI_QLOGIC_1280 is not set
654# CONFIG_SCSI_QLA_FC is not set
655# CONFIG_SCSI_QLA_ISCSI is not set
656# CONFIG_SCSI_LPFC is not set
657# CONFIG_SCSI_DC395x is not set
658# CONFIG_SCSI_DC390T is not set
659# CONFIG_SCSI_NSP32 is not set
660# CONFIG_SCSI_DEBUG is not set
661# CONFIG_SCSI_SRP is not set
662# CONFIG_SCSI_DH is not set
663# CONFIG_SCSI_OSD_INITIATOR is not set
664CONFIG_ATA=y
665# CONFIG_ATA_NONSTANDARD is not set
666CONFIG_SATA_PMP=y
667CONFIG_SATA_AHCI=y
668# CONFIG_SATA_SIL24 is not set
669# CONFIG_SATA_FSL is not set
670CONFIG_ATA_SFF=y
671# CONFIG_SATA_SVW is not set
672# CONFIG_ATA_PIIX is not set
673# CONFIG_SATA_MV is not set
674# CONFIG_SATA_NV is not set
675# CONFIG_PDC_ADMA is not set
676# CONFIG_SATA_QSTOR is not set
677# CONFIG_SATA_PROMISE is not set
678# CONFIG_SATA_SX4 is not set
679# CONFIG_SATA_SIL is not set
680# CONFIG_SATA_SIS is not set
681# CONFIG_SATA_ULI is not set
682# CONFIG_SATA_VIA is not set
683# CONFIG_SATA_VITESSE is not set
684# CONFIG_SATA_INIC162X is not set
685CONFIG_PATA_ALI=y
686# CONFIG_PATA_AMD is not set
687# CONFIG_PATA_ARTOP is not set
688# CONFIG_PATA_ATIIXP is not set
689# CONFIG_PATA_CMD640_PCI is not set
690# CONFIG_PATA_CMD64X is not set
691# CONFIG_PATA_CS5520 is not set
692# CONFIG_PATA_CS5530 is not set
693# CONFIG_PATA_CYPRESS is not set
694# CONFIG_PATA_EFAR is not set
695# CONFIG_ATA_GENERIC is not set
696# CONFIG_PATA_HPT366 is not set
697# CONFIG_PATA_HPT37X is not set
698# CONFIG_PATA_HPT3X2N is not set
699# CONFIG_PATA_HPT3X3 is not set
700# CONFIG_PATA_IT821X is not set
701# CONFIG_PATA_IT8213 is not set
702# CONFIG_PATA_JMICRON is not set
703# CONFIG_PATA_TRIFLEX is not set
704# CONFIG_PATA_MARVELL is not set
705# CONFIG_PATA_MPIIX is not set
706# CONFIG_PATA_OLDPIIX is not set
707# CONFIG_PATA_NETCELL is not set
708# CONFIG_PATA_NINJA32 is not set
709# CONFIG_PATA_NS87410 is not set
710# CONFIG_PATA_NS87415 is not set
711# CONFIG_PATA_OPTI is not set
712# CONFIG_PATA_OPTIDMA is not set
713# CONFIG_PATA_PDC_OLD is not set
714# CONFIG_PATA_RADISYS is not set
715# CONFIG_PATA_RZ1000 is not set
716# CONFIG_PATA_SC1200 is not set
717# CONFIG_PATA_SERVERWORKS is not set
718# CONFIG_PATA_PDC2027X is not set
719# CONFIG_PATA_SIL680 is not set
720# CONFIG_PATA_SIS is not set
721# CONFIG_PATA_VIA is not set
722# CONFIG_PATA_WINBOND is not set
723# CONFIG_PATA_PLATFORM is not set
724# CONFIG_PATA_SCH is not set
725# CONFIG_MD is not set
726# CONFIG_FUSION is not set
727
728#
729# IEEE 1394 (FireWire) support
730#
731
732#
733# Enable only one of the two stacks, unless you know what you are doing
734#
735# CONFIG_FIREWIRE is not set
736# CONFIG_IEEE1394 is not set
737# CONFIG_I2O is not set
738# CONFIG_MACINTOSH_DRIVERS is not set
739CONFIG_NETDEVICES=y
740CONFIG_COMPAT_NET_DEV_OPS=y
741CONFIG_DUMMY=y
742# CONFIG_BONDING is not set
743# CONFIG_MACVLAN is not set
744# CONFIG_EQUALIZER is not set
745# CONFIG_TUN is not set
746# CONFIG_VETH is not set
747# CONFIG_ARCNET is not set
748CONFIG_PHYLIB=y
749
750#
751# MII PHY device drivers
752#
753# CONFIG_MARVELL_PHY is not set
754# CONFIG_DAVICOM_PHY is not set
755# CONFIG_QSEMI_PHY is not set
756# CONFIG_LXT_PHY is not set
757# CONFIG_CICADA_PHY is not set
758# CONFIG_VITESSE_PHY is not set
759# CONFIG_SMSC_PHY is not set
760CONFIG_BROADCOM_PHY=y
761# CONFIG_ICPLUS_PHY is not set
762# CONFIG_REALTEK_PHY is not set
763# CONFIG_NATIONAL_PHY is not set
764# CONFIG_STE10XP is not set
765# CONFIG_LSI_ET1011C_PHY is not set
766# CONFIG_FIXED_PHY is not set
767# CONFIG_MDIO_BITBANG is not set
768CONFIG_NET_ETHERNET=y
769CONFIG_MII=y
770# CONFIG_HAPPYMEAL is not set
771# CONFIG_SUNGEM is not set
772# CONFIG_CASSINI is not set
773# CONFIG_NET_VENDOR_3COM is not set
774# CONFIG_ETHOC is not set
775# CONFIG_DNET is not set
776# CONFIG_NET_TULIP is not set
777# CONFIG_HP100 is not set
778# CONFIG_IBM_NEW_EMAC_ZMII is not set
779# CONFIG_IBM_NEW_EMAC_RGMII is not set
780# CONFIG_IBM_NEW_EMAC_TAH is not set
781# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
782# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
783# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
784# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
785# CONFIG_NET_PCI is not set
786# CONFIG_B44 is not set
787# CONFIG_ATL2 is not set
788CONFIG_NETDEV_1000=y
789# CONFIG_ACENIC is not set
790# CONFIG_DL2K is not set
791CONFIG_E1000=y
792# CONFIG_E1000E is not set
793# CONFIG_IP1000 is not set
794# CONFIG_IGB is not set
795# CONFIG_IGBVF is not set
796# CONFIG_NS83820 is not set
797# CONFIG_HAMACHI is not set
798# CONFIG_YELLOWFIN is not set
799# CONFIG_R8169 is not set
800# CONFIG_SIS190 is not set
801# CONFIG_SKGE is not set
802# CONFIG_SKY2 is not set
803# CONFIG_VIA_VELOCITY is not set
804# CONFIG_TIGON3 is not set
805# CONFIG_BNX2 is not set
806CONFIG_FSL_PQ_MDIO=y
807CONFIG_GIANFAR=y
808# CONFIG_QLA3XXX is not set
809# CONFIG_ATL1 is not set
810# CONFIG_ATL1E is not set
811# CONFIG_ATL1C is not set
812# CONFIG_JME is not set
813# CONFIG_NETDEV_10000 is not set
814# CONFIG_TR is not set
815
816#
817# Wireless LAN
818#
819# CONFIG_WLAN_PRE80211 is not set
820# CONFIG_WLAN_80211 is not set
821
822#
823# Enable WiMAX (Networking options) to see the WiMAX drivers
824#
825
826#
827# USB Network Adapters
828#
829# CONFIG_USB_CATC is not set
830# CONFIG_USB_KAWETH is not set
831# CONFIG_USB_PEGASUS is not set
832# CONFIG_USB_RTL8150 is not set
833# CONFIG_USB_USBNET is not set
834# CONFIG_WAN is not set
835# CONFIG_FDDI is not set
836# CONFIG_HIPPI is not set
837# CONFIG_PPP is not set
838# CONFIG_SLIP is not set
839# CONFIG_NET_FC is not set
840# CONFIG_NETCONSOLE is not set
841# CONFIG_NETPOLL is not set
842# CONFIG_NET_POLL_CONTROLLER is not set
843# CONFIG_ISDN is not set
844# CONFIG_PHONE is not set
845
846#
847# Input device support
848#
849CONFIG_INPUT=y
850# CONFIG_INPUT_FF_MEMLESS is not set
851# CONFIG_INPUT_POLLDEV is not set
852
853#
854# Userland interfaces
855#
856# CONFIG_INPUT_MOUSEDEV is not set
857# CONFIG_INPUT_JOYDEV is not set
858# CONFIG_INPUT_EVDEV is not set
859# CONFIG_INPUT_EVBUG is not set
860
861#
862# Input Device Drivers
863#
864# CONFIG_INPUT_KEYBOARD is not set
865# CONFIG_INPUT_MOUSE is not set
866# CONFIG_INPUT_JOYSTICK is not set
867# CONFIG_INPUT_TABLET is not set
868# CONFIG_INPUT_TOUCHSCREEN is not set
869# CONFIG_INPUT_MISC is not set
870
871#
872# Hardware I/O ports
873#
874CONFIG_SERIO=y
875CONFIG_SERIO_I8042=y
876CONFIG_SERIO_SERPORT=y
877# CONFIG_SERIO_PCIPS2 is not set
878CONFIG_SERIO_LIBPS2=y
879# CONFIG_SERIO_RAW is not set
880# CONFIG_SERIO_XILINX_XPS_PS2 is not set
881# CONFIG_GAMEPORT is not set
882
883#
884# Character devices
885#
886CONFIG_VT=y
887CONFIG_CONSOLE_TRANSLATIONS=y
888CONFIG_VT_CONSOLE=y
889CONFIG_HW_CONSOLE=y
890# CONFIG_VT_HW_CONSOLE_BINDING is not set
891CONFIG_DEVKMEM=y
892# CONFIG_SERIAL_NONSTANDARD is not set
893# CONFIG_NOZOMI is not set
894
895#
896# Serial drivers
897#
898CONFIG_SERIAL_8250=y
899CONFIG_SERIAL_8250_CONSOLE=y
900CONFIG_SERIAL_8250_PCI=y
901CONFIG_SERIAL_8250_NR_UARTS=2
902CONFIG_SERIAL_8250_RUNTIME_UARTS=2
903CONFIG_SERIAL_8250_EXTENDED=y
904CONFIG_SERIAL_8250_MANY_PORTS=y
905CONFIG_SERIAL_8250_SHARE_IRQ=y
906CONFIG_SERIAL_8250_DETECT_IRQ=y
907CONFIG_SERIAL_8250_RSA=y
908
909#
910# Non-8250 serial port support
911#
912# CONFIG_SERIAL_UARTLITE is not set
913CONFIG_SERIAL_CORE=y
914CONFIG_SERIAL_CORE_CONSOLE=y
915# CONFIG_SERIAL_JSM is not set
916# CONFIG_SERIAL_OF_PLATFORM is not set
917CONFIG_UNIX98_PTYS=y
918# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
919CONFIG_LEGACY_PTYS=y
920CONFIG_LEGACY_PTY_COUNT=256
921# CONFIG_HVC_UDBG is not set
922# CONFIG_IPMI_HANDLER is not set
923# CONFIG_HW_RANDOM is not set
924CONFIG_NVRAM=y
925# CONFIG_R3964 is not set
926# CONFIG_APPLICOM is not set
927# CONFIG_RAW_DRIVER is not set
928# CONFIG_TCG_TPM is not set
929CONFIG_DEVPORT=y
930CONFIG_I2C=y
931CONFIG_I2C_BOARDINFO=y
932CONFIG_I2C_CHARDEV=y
933CONFIG_I2C_HELPER_AUTO=y
934
935#
936# I2C Hardware Bus support
937#
938
939#
940# PC SMBus host controller drivers
941#
942# CONFIG_I2C_ALI1535 is not set
943# CONFIG_I2C_ALI1563 is not set
944# CONFIG_I2C_ALI15X3 is not set
945# CONFIG_I2C_AMD756 is not set
946# CONFIG_I2C_AMD8111 is not set
947# CONFIG_I2C_I801 is not set
948# CONFIG_I2C_ISCH is not set
949# CONFIG_I2C_PIIX4 is not set
950# CONFIG_I2C_NFORCE2 is not set
951# CONFIG_I2C_SIS5595 is not set
952# CONFIG_I2C_SIS630 is not set
953# CONFIG_I2C_SIS96X is not set
954# CONFIG_I2C_VIA is not set
955# CONFIG_I2C_VIAPRO is not set
956
957#
958# I2C system bus drivers (mostly embedded / system-on-chip)
959#
960# CONFIG_I2C_GPIO is not set
961CONFIG_I2C_MPC=y
962# CONFIG_I2C_OCORES is not set
963# CONFIG_I2C_SIMTEC is not set
964
965#
966# External I2C/SMBus adapter drivers
967#
968# CONFIG_I2C_PARPORT_LIGHT is not set
969# CONFIG_I2C_TAOS_EVM is not set
970# CONFIG_I2C_TINY_USB is not set
971
972#
973# Graphics adapter I2C/DDC channel drivers
974#
975# CONFIG_I2C_VOODOO3 is not set
976
977#
978# Other I2C/SMBus bus drivers
979#
980# CONFIG_I2C_PCA_PLATFORM is not set
981# CONFIG_I2C_STUB is not set
982
983#
984# Miscellaneous I2C Chip support
985#
986# CONFIG_DS1682 is not set
987# CONFIG_SENSORS_PCF8574 is not set
988# CONFIG_PCF8575 is not set
989# CONFIG_SENSORS_MAX6875 is not set
990# CONFIG_SENSORS_TSL2550 is not set
991# CONFIG_I2C_DEBUG_CORE is not set
992# CONFIG_I2C_DEBUG_ALGO is not set
993# CONFIG_I2C_DEBUG_BUS is not set
994# CONFIG_I2C_DEBUG_CHIP is not set
995# CONFIG_SPI is not set
996CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
997CONFIG_ARCH_REQUIRE_GPIOLIB=y
998CONFIG_GPIOLIB=y
999# CONFIG_DEBUG_GPIO is not set
1000CONFIG_GPIO_SYSFS=y
1001
1002#
1003# Memory mapped GPIO expanders:
1004#
1005# CONFIG_GPIO_XILINX is not set
1006
1007#
1008# I2C GPIO expanders:
1009#
1010# CONFIG_GPIO_MAX732X is not set
1011CONFIG_GPIO_PCA953X=y
1012# CONFIG_GPIO_PCF857X is not set
1013
1014#
1015# PCI GPIO expanders:
1016#
1017# CONFIG_GPIO_BT8XX is not set
1018
1019#
1020# SPI GPIO expanders:
1021#
1022# CONFIG_W1 is not set
1023# CONFIG_POWER_SUPPLY is not set
1024CONFIG_HWMON=y
1025# CONFIG_HWMON_VID is not set
1026# CONFIG_SENSORS_AD7414 is not set
1027# CONFIG_SENSORS_AD7418 is not set
1028# CONFIG_SENSORS_ADM1021 is not set
1029# CONFIG_SENSORS_ADM1025 is not set
1030# CONFIG_SENSORS_ADM1026 is not set
1031# CONFIG_SENSORS_ADM1029 is not set
1032# CONFIG_SENSORS_ADM1031 is not set
1033# CONFIG_SENSORS_ADM9240 is not set
1034# CONFIG_SENSORS_ADT7462 is not set
1035# CONFIG_SENSORS_ADT7470 is not set
1036# CONFIG_SENSORS_ADT7473 is not set
1037# CONFIG_SENSORS_ADT7475 is not set
1038# CONFIG_SENSORS_ATXP1 is not set
1039CONFIG_SENSORS_DS1621=y
1040# CONFIG_SENSORS_I5K_AMB is not set
1041# CONFIG_SENSORS_F71805F is not set
1042# CONFIG_SENSORS_F71882FG is not set
1043# CONFIG_SENSORS_F75375S is not set
1044# CONFIG_SENSORS_G760A is not set
1045# CONFIG_SENSORS_GL518SM is not set
1046# CONFIG_SENSORS_GL520SM is not set
1047# CONFIG_SENSORS_IT87 is not set
1048# CONFIG_SENSORS_LM63 is not set
1049# CONFIG_SENSORS_LM75 is not set
1050# CONFIG_SENSORS_LM77 is not set
1051# CONFIG_SENSORS_LM78 is not set
1052# CONFIG_SENSORS_LM80 is not set
1053# CONFIG_SENSORS_LM83 is not set
1054# CONFIG_SENSORS_LM85 is not set
1055# CONFIG_SENSORS_LM87 is not set
1056CONFIG_SENSORS_LM90=y
1057# CONFIG_SENSORS_LM92 is not set
1058# CONFIG_SENSORS_LM93 is not set
1059# CONFIG_SENSORS_LTC4215 is not set
1060# CONFIG_SENSORS_LTC4245 is not set
1061# CONFIG_SENSORS_LM95241 is not set
1062# CONFIG_SENSORS_MAX1619 is not set
1063# CONFIG_SENSORS_MAX6650 is not set
1064# CONFIG_SENSORS_PC87360 is not set
1065# CONFIG_SENSORS_PC87427 is not set
1066# CONFIG_SENSORS_PCF8591 is not set
1067# CONFIG_SENSORS_SHT15 is not set
1068# CONFIG_SENSORS_SIS5595 is not set
1069# CONFIG_SENSORS_DME1737 is not set
1070# CONFIG_SENSORS_SMSC47M1 is not set
1071# CONFIG_SENSORS_SMSC47M192 is not set
1072# CONFIG_SENSORS_SMSC47B397 is not set
1073# CONFIG_SENSORS_ADS7828 is not set
1074# CONFIG_SENSORS_THMC50 is not set
1075# CONFIG_SENSORS_VIA686A is not set
1076# CONFIG_SENSORS_VT1211 is not set
1077# CONFIG_SENSORS_VT8231 is not set
1078# CONFIG_SENSORS_W83781D is not set
1079# CONFIG_SENSORS_W83791D is not set
1080# CONFIG_SENSORS_W83792D is not set
1081# CONFIG_SENSORS_W83793 is not set
1082# CONFIG_SENSORS_W83L785TS is not set
1083# CONFIG_SENSORS_W83L786NG is not set
1084# CONFIG_SENSORS_W83627HF is not set
1085# CONFIG_SENSORS_W83627EHF is not set
1086# CONFIG_HWMON_DEBUG_CHIP is not set
1087# CONFIG_THERMAL is not set
1088# CONFIG_THERMAL_HWMON is not set
1089CONFIG_WATCHDOG=y
1090# CONFIG_WATCHDOG_NOWAYOUT is not set
1091
1092#
1093# Watchdog Device Drivers
1094#
1095# CONFIG_SOFT_WATCHDOG is not set
1096# CONFIG_ALIM7101_WDT is not set
1097# CONFIG_BOOKE_WDT is not set
1098
1099#
1100# PCI-based Watchdog Cards
1101#
1102# CONFIG_PCIPCWATCHDOG is not set
1103# CONFIG_WDTPCI is not set
1104
1105#
1106# USB-based Watchdog Cards
1107#
1108# CONFIG_USBPCWATCHDOG is not set
1109CONFIG_SSB_POSSIBLE=y
1110
1111#
1112# Sonics Silicon Backplane
1113#
1114# CONFIG_SSB is not set
1115
1116#
1117# Multifunction device drivers
1118#
1119# CONFIG_MFD_CORE is not set
1120# CONFIG_MFD_SM501 is not set
1121# CONFIG_HTC_PASIC3 is not set
1122# CONFIG_TPS65010 is not set
1123# CONFIG_TWL4030_CORE is not set
1124# CONFIG_MFD_TMIO is not set
1125# CONFIG_PMIC_DA903X is not set
1126# CONFIG_MFD_WM8400 is not set
1127# CONFIG_MFD_WM8350_I2C is not set
1128# CONFIG_MFD_PCF50633 is not set
1129# CONFIG_REGULATOR is not set
1130
1131#
1132# Multimedia devices
1133#
1134
1135#
1136# Multimedia core support
1137#
1138# CONFIG_VIDEO_DEV is not set
1139# CONFIG_DVB_CORE is not set
1140# CONFIG_VIDEO_MEDIA is not set
1141
1142#
1143# Multimedia drivers
1144#
1145# CONFIG_DAB is not set
1146
1147#
1148# Graphics support
1149#
1150# CONFIG_AGP is not set
1151# CONFIG_DRM is not set
1152# CONFIG_VGASTATE is not set
1153CONFIG_VIDEO_OUTPUT_CONTROL=y
1154# CONFIG_FB is not set
1155# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1156
1157#
1158# Display device support
1159#
1160# CONFIG_DISPLAY_SUPPORT is not set
1161
1162#
1163# Console display driver support
1164#
1165CONFIG_VGA_CONSOLE=y
1166# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1167CONFIG_DUMMY_CONSOLE=y
1168# CONFIG_SOUND is not set
1169CONFIG_HID_SUPPORT=y
1170CONFIG_HID=y
1171# CONFIG_HID_DEBUG is not set
1172# CONFIG_HIDRAW is not set
1173
1174#
1175# USB Input Devices
1176#
1177CONFIG_USB_HID=y
1178# CONFIG_HID_PID is not set
1179# CONFIG_USB_HIDDEV is not set
1180
1181#
1182# Special HID drivers
1183#
1184# CONFIG_HID_A4TECH is not set
1185# CONFIG_HID_APPLE is not set
1186# CONFIG_HID_BELKIN is not set
1187# CONFIG_HID_CHERRY is not set
1188# CONFIG_HID_CHICONY is not set
1189# CONFIG_HID_CYPRESS is not set
1190# CONFIG_DRAGONRISE_FF is not set
1191# CONFIG_HID_EZKEY is not set
1192# CONFIG_HID_KYE is not set
1193# CONFIG_HID_GYRATION is not set
1194# CONFIG_HID_KENSINGTON is not set
1195# CONFIG_HID_LOGITECH is not set
1196# CONFIG_HID_MICROSOFT is not set
1197# CONFIG_HID_MONTEREY is not set
1198# CONFIG_HID_NTRIG is not set
1199# CONFIG_HID_PANTHERLORD is not set
1200# CONFIG_HID_PETALYNX is not set
1201# CONFIG_HID_SAMSUNG is not set
1202# CONFIG_HID_SONY is not set
1203# CONFIG_HID_SUNPLUS is not set
1204# CONFIG_GREENASIA_FF is not set
1205# CONFIG_HID_TOPSEED is not set
1206# CONFIG_THRUSTMASTER_FF is not set
1207# CONFIG_ZEROPLUS_FF is not set
1208CONFIG_USB_SUPPORT=y
1209CONFIG_USB_ARCH_HAS_HCD=y
1210CONFIG_USB_ARCH_HAS_OHCI=y
1211CONFIG_USB_ARCH_HAS_EHCI=y
1212CONFIG_USB=y
1213# CONFIG_USB_DEBUG is not set
1214# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1215
1216#
1217# Miscellaneous USB options
1218#
1219CONFIG_USB_DEVICEFS=y
1220# CONFIG_USB_DEVICE_CLASS is not set
1221# CONFIG_USB_DYNAMIC_MINORS is not set
1222# CONFIG_USB_OTG is not set
1223# CONFIG_USB_OTG_WHITELIST is not set
1224# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1225CONFIG_USB_MON=y
1226# CONFIG_USB_WUSB is not set
1227# CONFIG_USB_WUSB_CBAF is not set
1228
1229#
1230# USB Host Controller Drivers
1231#
1232# CONFIG_USB_C67X00_HCD is not set
1233# CONFIG_USB_EHCI_HCD is not set
1234# CONFIG_USB_OXU210HP_HCD is not set
1235# CONFIG_USB_ISP116X_HCD is not set
1236CONFIG_USB_ISP1760_HCD=y
1237# CONFIG_USB_OHCI_HCD is not set
1238# CONFIG_USB_UHCI_HCD is not set
1239# CONFIG_USB_SL811_HCD is not set
1240# CONFIG_USB_R8A66597_HCD is not set
1241# CONFIG_USB_WHCI_HCD is not set
1242# CONFIG_USB_HWA_HCD is not set
1243
1244#
1245# USB Device Class drivers
1246#
1247# CONFIG_USB_ACM is not set
1248# CONFIG_USB_PRINTER is not set
1249# CONFIG_USB_WDM is not set
1250# CONFIG_USB_TMC is not set
1251
1252#
1253# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1254#
1255
1256#
1257# also be needed; see USB_STORAGE Help for more info
1258#
1259CONFIG_USB_STORAGE=y
1260# CONFIG_USB_STORAGE_DEBUG is not set
1261# CONFIG_USB_STORAGE_DATAFAB is not set
1262# CONFIG_USB_STORAGE_FREECOM is not set
1263# CONFIG_USB_STORAGE_ISD200 is not set
1264# CONFIG_USB_STORAGE_USBAT is not set
1265# CONFIG_USB_STORAGE_SDDR09 is not set
1266# CONFIG_USB_STORAGE_SDDR55 is not set
1267# CONFIG_USB_STORAGE_JUMPSHOT is not set
1268# CONFIG_USB_STORAGE_ALAUDA is not set
1269# CONFIG_USB_STORAGE_ONETOUCH is not set
1270# CONFIG_USB_STORAGE_KARMA is not set
1271# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1272# CONFIG_USB_LIBUSUAL is not set
1273
1274#
1275# USB Imaging devices
1276#
1277# CONFIG_USB_MDC800 is not set
1278# CONFIG_USB_MICROTEK is not set
1279
1280#
1281# USB port drivers
1282#
1283# CONFIG_USB_SERIAL is not set
1284
1285#
1286# USB Miscellaneous drivers
1287#
1288# CONFIG_USB_EMI62 is not set
1289# CONFIG_USB_EMI26 is not set
1290# CONFIG_USB_ADUTUX is not set
1291# CONFIG_USB_SEVSEG is not set
1292# CONFIG_USB_RIO500 is not set
1293# CONFIG_USB_LEGOTOWER is not set
1294# CONFIG_USB_LCD is not set
1295# CONFIG_USB_BERRY_CHARGE is not set
1296# CONFIG_USB_LED is not set
1297# CONFIG_USB_CYPRESS_CY7C63 is not set
1298# CONFIG_USB_CYTHERM is not set
1299# CONFIG_USB_IDMOUSE is not set
1300# CONFIG_USB_FTDI_ELAN is not set
1301# CONFIG_USB_APPLEDISPLAY is not set
1302# CONFIG_USB_LD is not set
1303# CONFIG_USB_TRANCEVIBRATOR is not set
1304# CONFIG_USB_IOWARRIOR is not set
1305# CONFIG_USB_TEST is not set
1306# CONFIG_USB_ISIGHTFW is not set
1307# CONFIG_USB_VST is not set
1308# CONFIG_USB_GADGET is not set
1309
1310#
1311# OTG and related infrastructure
1312#
1313# CONFIG_USB_GPIO_VBUS is not set
1314# CONFIG_NOP_USB_XCEIV is not set
1315# CONFIG_UWB is not set
1316# CONFIG_MMC is not set
1317# CONFIG_MEMSTICK is not set
1318CONFIG_NEW_LEDS=y
1319CONFIG_LEDS_CLASS=y
1320
1321#
1322# LED drivers
1323#
1324# CONFIG_LEDS_PCA9532 is not set
1325CONFIG_LEDS_GPIO=y
1326CONFIG_LEDS_GPIO_PLATFORM=y
1327CONFIG_LEDS_GPIO_OF=y
1328# CONFIG_LEDS_LP5521 is not set
1329CONFIG_LEDS_PCA955X=y
1330# CONFIG_LEDS_BD2802 is not set
1331
1332#
1333# LED Triggers
1334#
1335CONFIG_LEDS_TRIGGERS=y
1336CONFIG_LEDS_TRIGGER_TIMER=y
1337CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1338# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1339CONFIG_LEDS_TRIGGER_GPIO=y
1340# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1341
1342#
1343# iptables trigger is under Netfilter config (LED target)
1344#
1345# CONFIG_ACCESSIBILITY is not set
1346# CONFIG_INFINIBAND is not set
1347CONFIG_EDAC=y
1348
1349#
1350# Reporting subsystems
1351#
1352# CONFIG_EDAC_DEBUG is not set
1353CONFIG_EDAC_MM_EDAC=y
1354CONFIG_EDAC_MPC85XX=y
1355# CONFIG_EDAC_AMD8131 is not set
1356# CONFIG_EDAC_AMD8111 is not set
1357CONFIG_RTC_LIB=y
1358CONFIG_RTC_CLASS=y
1359CONFIG_RTC_HCTOSYS=y
1360CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1361# CONFIG_RTC_DEBUG is not set
1362
1363#
1364# RTC interfaces
1365#
1366CONFIG_RTC_INTF_SYSFS=y
1367CONFIG_RTC_INTF_PROC=y
1368CONFIG_RTC_INTF_DEV=y
1369# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1370# CONFIG_RTC_DRV_TEST is not set
1371
1372#
1373# I2C RTC drivers
1374#
1375CONFIG_RTC_DRV_DS1307=y
1376# CONFIG_RTC_DRV_DS1374 is not set
1377# CONFIG_RTC_DRV_DS1672 is not set
1378# CONFIG_RTC_DRV_MAX6900 is not set
1379# CONFIG_RTC_DRV_RS5C372 is not set
1380# CONFIG_RTC_DRV_ISL1208 is not set
1381# CONFIG_RTC_DRV_X1205 is not set
1382# CONFIG_RTC_DRV_PCF8563 is not set
1383# CONFIG_RTC_DRV_PCF8583 is not set
1384# CONFIG_RTC_DRV_M41T80 is not set
1385# CONFIG_RTC_DRV_S35390A is not set
1386# CONFIG_RTC_DRV_FM3130 is not set
1387# CONFIG_RTC_DRV_RX8581 is not set
1388
1389#
1390# SPI RTC drivers
1391#
1392
1393#
1394# Platform RTC drivers
1395#
1396CONFIG_RTC_DRV_CMOS=y
1397# CONFIG_RTC_DRV_DS1286 is not set
1398# CONFIG_RTC_DRV_DS1511 is not set
1399# CONFIG_RTC_DRV_DS1553 is not set
1400# CONFIG_RTC_DRV_DS1742 is not set
1401# CONFIG_RTC_DRV_STK17TA8 is not set
1402# CONFIG_RTC_DRV_M48T86 is not set
1403# CONFIG_RTC_DRV_M48T35 is not set
1404# CONFIG_RTC_DRV_M48T59 is not set
1405# CONFIG_RTC_DRV_BQ4802 is not set
1406# CONFIG_RTC_DRV_V3020 is not set
1407
1408#
1409# on-CPU RTC drivers
1410#
1411# CONFIG_RTC_DRV_GENERIC is not set
1412CONFIG_DMADEVICES=y
1413
1414#
1415# DMA Devices
1416#
1417CONFIG_FSL_DMA=y
1418CONFIG_DMA_ENGINE=y
1419
1420#
1421# DMA Clients
1422#
1423CONFIG_NET_DMA=y
1424# CONFIG_ASYNC_TX_DMA is not set
1425# CONFIG_DMATEST is not set
1426# CONFIG_AUXDISPLAY is not set
1427# CONFIG_UIO is not set
1428# CONFIG_STAGING is not set
1429
1430#
1431# File systems
1432#
1433CONFIG_EXT2_FS=y
1434# CONFIG_EXT2_FS_XATTR is not set
1435# CONFIG_EXT2_FS_XIP is not set
1436CONFIG_EXT3_FS=y
1437# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1438CONFIG_EXT3_FS_XATTR=y
1439# CONFIG_EXT3_FS_POSIX_ACL is not set
1440# CONFIG_EXT3_FS_SECURITY is not set
1441# CONFIG_EXT4_FS is not set
1442CONFIG_JBD=y
1443CONFIG_FS_MBCACHE=y
1444# CONFIG_REISERFS_FS is not set
1445# CONFIG_JFS_FS is not set
1446# CONFIG_FS_POSIX_ACL is not set
1447CONFIG_FILE_LOCKING=y
1448# CONFIG_XFS_FS is not set
1449# CONFIG_GFS2_FS is not set
1450# CONFIG_OCFS2_FS is not set
1451# CONFIG_BTRFS_FS is not set
1452CONFIG_DNOTIFY=y
1453CONFIG_INOTIFY=y
1454CONFIG_INOTIFY_USER=y
1455# CONFIG_QUOTA is not set
1456# CONFIG_AUTOFS_FS is not set
1457# CONFIG_AUTOFS4_FS is not set
1458# CONFIG_FUSE_FS is not set
1459
1460#
1461# Caches
1462#
1463# CONFIG_FSCACHE is not set
1464
1465#
1466# CD-ROM/DVD Filesystems
1467#
1468CONFIG_ISO9660_FS=y
1469CONFIG_JOLIET=y
1470CONFIG_ZISOFS=y
1471CONFIG_UDF_FS=y
1472CONFIG_UDF_NLS=y
1473
1474#
1475# DOS/FAT/NT Filesystems
1476#
1477CONFIG_FAT_FS=y
1478CONFIG_MSDOS_FS=y
1479CONFIG_VFAT_FS=y
1480CONFIG_FAT_DEFAULT_CODEPAGE=437
1481CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1482# CONFIG_NTFS_FS is not set
1483
1484#
1485# Pseudo filesystems
1486#
1487CONFIG_PROC_FS=y
1488CONFIG_PROC_KCORE=y
1489CONFIG_PROC_SYSCTL=y
1490CONFIG_PROC_PAGE_MONITOR=y
1491CONFIG_SYSFS=y
1492CONFIG_TMPFS=y
1493# CONFIG_TMPFS_POSIX_ACL is not set
1494# CONFIG_HUGETLB_PAGE is not set
1495# CONFIG_CONFIGFS_FS is not set
1496CONFIG_MISC_FILESYSTEMS=y
1497# CONFIG_ADFS_FS is not set
1498# CONFIG_AFFS_FS is not set
1499# CONFIG_HFS_FS is not set
1500# CONFIG_HFSPLUS_FS is not set
1501# CONFIG_BEFS_FS is not set
1502# CONFIG_BFS_FS is not set
1503# CONFIG_EFS_FS is not set
1504CONFIG_JFFS2_FS=y
1505CONFIG_JFFS2_FS_DEBUG=0
1506CONFIG_JFFS2_FS_WRITEBUFFER=y
1507# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1508CONFIG_JFFS2_SUMMARY=y
1509# CONFIG_JFFS2_FS_XATTR is not set
1510# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1511CONFIG_JFFS2_ZLIB=y
1512# CONFIG_JFFS2_LZO is not set
1513CONFIG_JFFS2_RTIME=y
1514# CONFIG_JFFS2_RUBIN is not set
1515# CONFIG_CRAMFS is not set
1516# CONFIG_SQUASHFS is not set
1517# CONFIG_VXFS_FS is not set
1518# CONFIG_MINIX_FS is not set
1519# CONFIG_OMFS_FS is not set
1520# CONFIG_HPFS_FS is not set
1521# CONFIG_QNX4FS_FS is not set
1522# CONFIG_ROMFS_FS is not set
1523# CONFIG_SYSV_FS is not set
1524# CONFIG_UFS_FS is not set
1525# CONFIG_NILFS2_FS is not set
1526CONFIG_NETWORK_FILESYSTEMS=y
1527CONFIG_NFS_FS=y
1528CONFIG_NFS_V3=y
1529# CONFIG_NFS_V3_ACL is not set
1530# CONFIG_NFS_V4 is not set
1531CONFIG_ROOT_NFS=y
1532CONFIG_NFSD=y
1533# CONFIG_NFSD_V3 is not set
1534# CONFIG_NFSD_V4 is not set
1535CONFIG_LOCKD=y
1536CONFIG_LOCKD_V4=y
1537CONFIG_EXPORTFS=y
1538CONFIG_NFS_COMMON=y
1539CONFIG_SUNRPC=y
1540# CONFIG_RPCSEC_GSS_KRB5 is not set
1541# CONFIG_RPCSEC_GSS_SPKM3 is not set
1542# CONFIG_SMB_FS is not set
1543# CONFIG_CIFS is not set
1544# CONFIG_NCP_FS is not set
1545# CONFIG_CODA_FS is not set
1546# CONFIG_AFS_FS is not set
1547
1548#
1549# Partition Types
1550#
1551CONFIG_PARTITION_ADVANCED=y
1552# CONFIG_ACORN_PARTITION is not set
1553# CONFIG_OSF_PARTITION is not set
1554# CONFIG_AMIGA_PARTITION is not set
1555# CONFIG_ATARI_PARTITION is not set
1556# CONFIG_MAC_PARTITION is not set
1557CONFIG_MSDOS_PARTITION=y
1558# CONFIG_BSD_DISKLABEL is not set
1559# CONFIG_MINIX_SUBPARTITION is not set
1560# CONFIG_SOLARIS_X86_PARTITION is not set
1561# CONFIG_UNIXWARE_DISKLABEL is not set
1562# CONFIG_LDM_PARTITION is not set
1563# CONFIG_SGI_PARTITION is not set
1564# CONFIG_ULTRIX_PARTITION is not set
1565# CONFIG_SUN_PARTITION is not set
1566# CONFIG_KARMA_PARTITION is not set
1567# CONFIG_EFI_PARTITION is not set
1568# CONFIG_SYSV68_PARTITION is not set
1569CONFIG_NLS=y
1570CONFIG_NLS_DEFAULT="iso8859-1"
1571CONFIG_NLS_CODEPAGE_437=y
1572# CONFIG_NLS_CODEPAGE_737 is not set
1573# CONFIG_NLS_CODEPAGE_775 is not set
1574# CONFIG_NLS_CODEPAGE_850 is not set
1575# CONFIG_NLS_CODEPAGE_852 is not set
1576# CONFIG_NLS_CODEPAGE_855 is not set
1577# CONFIG_NLS_CODEPAGE_857 is not set
1578# CONFIG_NLS_CODEPAGE_860 is not set
1579# CONFIG_NLS_CODEPAGE_861 is not set
1580# CONFIG_NLS_CODEPAGE_862 is not set
1581# CONFIG_NLS_CODEPAGE_863 is not set
1582# CONFIG_NLS_CODEPAGE_864 is not set
1583# CONFIG_NLS_CODEPAGE_865 is not set
1584# CONFIG_NLS_CODEPAGE_866 is not set
1585# CONFIG_NLS_CODEPAGE_869 is not set
1586# CONFIG_NLS_CODEPAGE_936 is not set
1587# CONFIG_NLS_CODEPAGE_950 is not set
1588# CONFIG_NLS_CODEPAGE_932 is not set
1589# CONFIG_NLS_CODEPAGE_949 is not set
1590# CONFIG_NLS_CODEPAGE_874 is not set
1591# CONFIG_NLS_ISO8859_8 is not set
1592# CONFIG_NLS_CODEPAGE_1250 is not set
1593# CONFIG_NLS_CODEPAGE_1251 is not set
1594# CONFIG_NLS_ASCII is not set
1595CONFIG_NLS_ISO8859_1=y
1596# CONFIG_NLS_ISO8859_2 is not set
1597# CONFIG_NLS_ISO8859_3 is not set
1598# CONFIG_NLS_ISO8859_4 is not set
1599# CONFIG_NLS_ISO8859_5 is not set
1600# CONFIG_NLS_ISO8859_6 is not set
1601# CONFIG_NLS_ISO8859_7 is not set
1602# CONFIG_NLS_ISO8859_9 is not set
1603# CONFIG_NLS_ISO8859_13 is not set
1604# CONFIG_NLS_ISO8859_14 is not set
1605# CONFIG_NLS_ISO8859_15 is not set
1606# CONFIG_NLS_KOI8_R is not set
1607# CONFIG_NLS_KOI8_U is not set
1608# CONFIG_NLS_UTF8 is not set
1609# CONFIG_DLM is not set
1610# CONFIG_BINARY_PRINTF is not set
1611
1612#
1613# Library routines
1614#
1615CONFIG_BITREVERSE=y
1616CONFIG_GENERIC_FIND_LAST_BIT=y
1617# CONFIG_CRC_CCITT is not set
1618# CONFIG_CRC16 is not set
1619CONFIG_CRC_T10DIF=y
1620CONFIG_CRC_ITU_T=y
1621CONFIG_CRC32=y
1622# CONFIG_CRC7 is not set
1623# CONFIG_LIBCRC32C is not set
1624CONFIG_ZLIB_INFLATE=y
1625CONFIG_ZLIB_DEFLATE=y
1626CONFIG_DECOMPRESS_GZIP=y
1627CONFIG_HAS_IOMEM=y
1628CONFIG_HAS_IOPORT=y
1629CONFIG_HAS_DMA=y
1630CONFIG_HAVE_LMB=y
1631CONFIG_NLATTR=y
1632
1633#
1634# Kernel hacking
1635#
1636# CONFIG_PRINTK_TIME is not set
1637CONFIG_ENABLE_WARN_DEPRECATED=y
1638CONFIG_ENABLE_MUST_CHECK=y
1639CONFIG_FRAME_WARN=1024
1640# CONFIG_MAGIC_SYSRQ is not set
1641# CONFIG_UNUSED_SYMBOLS is not set
1642# CONFIG_DEBUG_FS is not set
1643# CONFIG_HEADERS_CHECK is not set
1644CONFIG_DEBUG_KERNEL=y
1645# CONFIG_DEBUG_SHIRQ is not set
1646CONFIG_DETECT_SOFTLOCKUP=y
1647# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1648CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1649CONFIG_DETECT_HUNG_TASK=y
1650# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1651CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1652CONFIG_SCHED_DEBUG=y
1653# CONFIG_SCHEDSTATS is not set
1654# CONFIG_TIMER_STATS is not set
1655# CONFIG_DEBUG_OBJECTS is not set
1656# CONFIG_SLUB_DEBUG_ON is not set
1657# CONFIG_SLUB_STATS is not set
1658# CONFIG_DEBUG_RT_MUTEXES is not set
1659# CONFIG_RT_MUTEX_TESTER is not set
1660# CONFIG_DEBUG_SPINLOCK is not set
1661# CONFIG_DEBUG_MUTEXES is not set
1662# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1663# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1664# CONFIG_DEBUG_KOBJECT is not set
1665# CONFIG_DEBUG_HIGHMEM is not set
1666# CONFIG_DEBUG_BUGVERBOSE is not set
1667# CONFIG_DEBUG_INFO is not set
1668# CONFIG_DEBUG_VM is not set
1669# CONFIG_DEBUG_WRITECOUNT is not set
1670# CONFIG_DEBUG_MEMORY_INIT is not set
1671# CONFIG_DEBUG_LIST is not set
1672# CONFIG_DEBUG_SG is not set
1673# CONFIG_DEBUG_NOTIFIERS is not set
1674# CONFIG_BOOT_PRINTK_DELAY is not set
1675# CONFIG_RCU_TORTURE_TEST is not set
1676# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1677# CONFIG_BACKTRACE_SELF_TEST is not set
1678# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1679# CONFIG_FAULT_INJECTION is not set
1680# CONFIG_LATENCYTOP is not set
1681# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1682# CONFIG_DEBUG_PAGEALLOC is not set
1683CONFIG_HAVE_FUNCTION_TRACER=y
1684CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1685CONFIG_HAVE_DYNAMIC_FTRACE=y
1686CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1687CONFIG_TRACING_SUPPORT=y
1688
1689#
1690# Tracers
1691#
1692# CONFIG_FUNCTION_TRACER is not set
1693# CONFIG_SCHED_TRACER is not set
1694# CONFIG_CONTEXT_SWITCH_TRACER is not set
1695# CONFIG_EVENT_TRACER is not set
1696# CONFIG_BOOT_TRACER is not set
1697# CONFIG_TRACE_BRANCH_PROFILING is not set
1698# CONFIG_STACK_TRACER is not set
1699# CONFIG_KMEMTRACE is not set
1700# CONFIG_WORKQUEUE_TRACER is not set
1701# CONFIG_BLK_DEV_IO_TRACE is not set
1702# CONFIG_SAMPLES is not set
1703CONFIG_HAVE_ARCH_KGDB=y
1704# CONFIG_KGDB is not set
1705CONFIG_PRINT_STACK_DEPTH=64
1706# CONFIG_DEBUG_STACKOVERFLOW is not set
1707# CONFIG_DEBUG_STACK_USAGE is not set
1708# CONFIG_CODE_PATCHING_SELFTEST is not set
1709# CONFIG_FTR_FIXUP_SELFTEST is not set
1710# CONFIG_MSI_BITMAP_SELFTEST is not set
1711# CONFIG_XMON is not set
1712# CONFIG_IRQSTACKS is not set
1713# CONFIG_BDI_SWITCH is not set
1714# CONFIG_PPC_EARLY_DEBUG is not set
1715
1716#
1717# Security options
1718#
1719# CONFIG_KEYS is not set
1720# CONFIG_SECURITY is not set
1721# CONFIG_SECURITYFS is not set
1722# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1723CONFIG_CRYPTO=y
1724
1725#
1726# Crypto core or helper
1727#
1728# CONFIG_CRYPTO_FIPS is not set
1729CONFIG_CRYPTO_ALGAPI=y
1730CONFIG_CRYPTO_ALGAPI2=y
1731CONFIG_CRYPTO_AEAD2=y
1732CONFIG_CRYPTO_BLKCIPHER2=y
1733CONFIG_CRYPTO_HASH=y
1734CONFIG_CRYPTO_HASH2=y
1735CONFIG_CRYPTO_RNG2=y
1736CONFIG_CRYPTO_PCOMP=y
1737CONFIG_CRYPTO_MANAGER=y
1738CONFIG_CRYPTO_MANAGER2=y
1739# CONFIG_CRYPTO_GF128MUL is not set
1740# CONFIG_CRYPTO_NULL is not set
1741CONFIG_CRYPTO_WORKQUEUE=y
1742# CONFIG_CRYPTO_CRYPTD is not set
1743# CONFIG_CRYPTO_AUTHENC is not set
1744# CONFIG_CRYPTO_TEST is not set
1745
1746#
1747# Authenticated Encryption with Associated Data
1748#
1749# CONFIG_CRYPTO_CCM is not set
1750# CONFIG_CRYPTO_GCM is not set
1751# CONFIG_CRYPTO_SEQIV is not set
1752
1753#
1754# Block modes
1755#
1756# CONFIG_CRYPTO_CBC is not set
1757# CONFIG_CRYPTO_CTR is not set
1758# CONFIG_CRYPTO_CTS is not set
1759# CONFIG_CRYPTO_ECB is not set
1760# CONFIG_CRYPTO_LRW is not set
1761# CONFIG_CRYPTO_PCBC is not set
1762# CONFIG_CRYPTO_XTS is not set
1763
1764#
1765# Hash modes
1766#
1767CONFIG_CRYPTO_HMAC=y
1768# CONFIG_CRYPTO_XCBC is not set
1769
1770#
1771# Digest
1772#
1773# CONFIG_CRYPTO_CRC32C is not set
1774# CONFIG_CRYPTO_MD4 is not set
1775CONFIG_CRYPTO_MD5=y
1776# CONFIG_CRYPTO_MICHAEL_MIC is not set
1777# CONFIG_CRYPTO_RMD128 is not set
1778# CONFIG_CRYPTO_RMD160 is not set
1779# CONFIG_CRYPTO_RMD256 is not set
1780# CONFIG_CRYPTO_RMD320 is not set
1781# CONFIG_CRYPTO_SHA1 is not set
1782# CONFIG_CRYPTO_SHA256 is not set
1783# CONFIG_CRYPTO_SHA512 is not set
1784# CONFIG_CRYPTO_TGR192 is not set
1785# CONFIG_CRYPTO_WP512 is not set
1786
1787#
1788# Ciphers
1789#
1790# CONFIG_CRYPTO_AES is not set
1791# CONFIG_CRYPTO_ANUBIS is not set
1792# CONFIG_CRYPTO_ARC4 is not set
1793# CONFIG_CRYPTO_BLOWFISH is not set
1794# CONFIG_CRYPTO_CAMELLIA is not set
1795# CONFIG_CRYPTO_CAST5 is not set
1796# CONFIG_CRYPTO_CAST6 is not set
1797# CONFIG_CRYPTO_DES is not set
1798# CONFIG_CRYPTO_FCRYPT is not set
1799# CONFIG_CRYPTO_KHAZAD is not set
1800# CONFIG_CRYPTO_SALSA20 is not set
1801# CONFIG_CRYPTO_SEED is not set
1802# CONFIG_CRYPTO_SERPENT is not set
1803# CONFIG_CRYPTO_TEA is not set
1804# CONFIG_CRYPTO_TWOFISH is not set
1805
1806#
1807# Compression
1808#
1809# CONFIG_CRYPTO_DEFLATE is not set
1810# CONFIG_CRYPTO_ZLIB is not set
1811# CONFIG_CRYPTO_LZO is not set
1812
1813#
1814# Random Number Generation
1815#
1816# CONFIG_CRYPTO_ANSI_CPRNG is not set
1817CONFIG_CRYPTO_HW=y
1818# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1819# CONFIG_CRYPTO_DEV_TALITOS is not set
1820# CONFIG_PPC_CLOCK is not set
1821# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/include/asm/delay.h b/arch/powerpc/include/asm/delay.h
index f9200a65c632..1e2eb41fa057 100644
--- a/arch/powerpc/include/asm/delay.h
+++ b/arch/powerpc/include/asm/delay.h
@@ -2,8 +2,11 @@
2#define _ASM_POWERPC_DELAY_H 2#define _ASM_POWERPC_DELAY_H
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4 4
5#include <asm/time.h>
6
5/* 7/*
6 * Copyright 1996, Paul Mackerras. 8 * Copyright 1996, Paul Mackerras.
9 * Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
7 * 10 *
8 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -30,5 +33,38 @@ extern void udelay(unsigned long usecs);
30#define mdelay(n) udelay((n) * 1000) 33#define mdelay(n) udelay((n) * 1000)
31#endif 34#endif
32 35
36/**
37 * spin_event_timeout - spin until a condition gets true or a timeout elapses
38 * @condition: a C expression to evalate
39 * @timeout: timeout, in microseconds
40 * @delay: the number of microseconds to delay between each evaluation of
41 * @condition
42 *
43 * The process spins until the condition evaluates to true (non-zero) or the
44 * timeout elapses. The return value of this macro is the value of
45 * @condition when the loop terminates. This allows you to determine the cause
46 * of the loop terminates. If the return value is zero, then you know a
47 * timeout has occurred.
48 *
49 * This primary purpose of this macro is to poll on a hardware register
50 * until a status bit changes. The timeout ensures that the loop still
51 * terminates even if the bit never changes. The delay is for devices that
52 * need a delay in between successive reads.
53 *
54 * gcc will optimize out the if-statement if @delay is a constant.
55 */
56#define spin_event_timeout(condition, timeout, delay) \
57({ \
58 typeof(condition) __ret; \
59 unsigned long __loops = tb_ticks_per_usec * timeout; \
60 unsigned long __start = get_tbl(); \
61 while (!(__ret = (condition)) && (tb_ticks_since(__start) <= __loops)) \
62 if (delay) \
63 udelay(delay); \
64 else \
65 cpu_relax(); \
66 __ret; \
67})
68
33#endif /* __KERNEL__ */ 69#endif /* __KERNEL__ */
34#endif /* _ASM_POWERPC_DELAY_H */ 70#endif /* _ASM_POWERPC_DELAY_H */
diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h
index 63a4f779f531..1b5a21041f9b 100644
--- a/arch/powerpc/include/asm/fsl_lbc.h
+++ b/arch/powerpc/include/asm/fsl_lbc.h
@@ -95,8 +95,8 @@ struct fsl_lbc_bank {
95}; 95};
96 96
97struct fsl_lbc_regs { 97struct fsl_lbc_regs {
98 struct fsl_lbc_bank bank[8]; 98 struct fsl_lbc_bank bank[12];
99 u8 res0[0x28]; 99 u8 res0[0x8];
100 __be32 mar; /**< UPM Address Register */ 100 __be32 mar; /**< UPM Address Register */
101 u8 res1[0x4]; 101 u8 res1[0x4];
102 __be32 mamr; /**< UPMA Mode Register */ 102 __be32 mamr; /**< UPMA Mode Register */
diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index 52e049cd9e68..1b4f697abbdd 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -16,6 +16,7 @@
16#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
17#include <asm/types.h> 17#include <asm/types.h>
18#include <asm/prom.h> 18#include <asm/prom.h>
19#include <asm/mpc5xxx.h>
19#endif /* __ASSEMBLY__ */ 20#endif /* __ASSEMBLY__ */
20 21
21#include <linux/suspend.h> 22#include <linux/suspend.h>
@@ -268,7 +269,6 @@ struct mpc52xx_intr {
268#ifndef __ASSEMBLY__ 269#ifndef __ASSEMBLY__
269 270
270/* mpc52xx_common.c */ 271/* mpc52xx_common.c */
271extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
272extern void mpc5200_setup_xlb_arbiter(void); 272extern void mpc5200_setup_xlb_arbiter(void);
273extern void mpc52xx_declare_of_platform_devices(void); 273extern void mpc52xx_declare_of_platform_devices(void);
274extern void mpc52xx_map_common_devices(void); 274extern void mpc52xx_map_common_devices(void);
diff --git a/arch/powerpc/include/asm/mpc512x.h b/arch/powerpc/include/asm/mpc5xxx.h
index c48a1658eeac..5ce9c5fa434a 100644
--- a/arch/powerpc/include/asm/mpc512x.h
+++ b/arch/powerpc/include/asm/mpc5xxx.h
@@ -4,7 +4,7 @@
4 * Author: John Rigby, <jrigby@freescale.com>, Friday Apr 13 2007 4 * Author: John Rigby, <jrigby@freescale.com>, Friday Apr 13 2007
5 * 5 *
6 * Description: 6 * Description:
7 * MPC5121 Prototypes and definitions 7 * MPC5xxx Prototypes and definitions
8 * 8 *
9 * This is free software; you can redistribute it and/or modify it 9 * This is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by 10 * under the terms of the GNU General Public License as published by
@@ -13,10 +13,10 @@
13 * 13 *
14 */ 14 */
15 15
16#ifndef __ASM_POWERPC_MPC512x_H__ 16#ifndef __ASM_POWERPC_MPC5xxx_H__
17#define __ASM_POWERPC_MPC512x_H__ 17#define __ASM_POWERPC_MPC5xxx_H__
18 18
19extern unsigned long mpc512x_find_ips_freq(struct device_node *node); 19extern unsigned long mpc5xxx_get_bus_frequency(struct device_node *node);
20 20
21#endif /* __ASM_POWERPC_MPC512x_H__ */ 21#endif /* __ASM_POWERPC_MPC5xxx_H__ */
22 22
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index a3c28e46947c..1170267736d3 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -755,7 +755,8 @@
755#define mfspr(rn) ({unsigned long rval; \ 755#define mfspr(rn) ({unsigned long rval; \
756 asm volatile("mfspr %0," __stringify(rn) \ 756 asm volatile("mfspr %0," __stringify(rn) \
757 : "=r" (rval)); rval;}) 757 : "=r" (rval)); rval;})
758#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)) 758#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)\
759 : "memory")
759 760
760#ifdef __powerpc64__ 761#ifdef __powerpc64__
761#ifdef CONFIG_PPC_CELL 762#ifdef CONFIG_PPC_CELL
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 601ddbc46002..6bcf364cbb2f 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -389,12 +389,14 @@
389#define ICCR_CACHE 1 /* Cacheable */ 389#define ICCR_CACHE 1 /* Cacheable */
390 390
391/* Bit definitions for L1CSR0. */ 391/* Bit definitions for L1CSR0. */
392#define L1CSR0_CPE 0x00010000 /* Data Cache Parity Enable */
392#define L1CSR0_CLFC 0x00000100 /* Cache Lock Bits Flash Clear */ 393#define L1CSR0_CLFC 0x00000100 /* Cache Lock Bits Flash Clear */
393#define L1CSR0_DCFI 0x00000002 /* Data Cache Flash Invalidate */ 394#define L1CSR0_DCFI 0x00000002 /* Data Cache Flash Invalidate */
394#define L1CSR0_CFI 0x00000002 /* Cache Flash Invalidate */ 395#define L1CSR0_CFI 0x00000002 /* Cache Flash Invalidate */
395#define L1CSR0_DCE 0x00000001 /* Data Cache Enable */ 396#define L1CSR0_DCE 0x00000001 /* Data Cache Enable */
396 397
397/* Bit definitions for L1CSR1. */ 398/* Bit definitions for L1CSR1. */
399#define L1CSR1_CPE 0x00010000 /* Instruction Cache Parity Enable */
398#define L1CSR1_ICLFR 0x00000100 /* Instr Cache Lock Bits Flash Reset */ 400#define L1CSR1_ICLFR 0x00000100 /* Instr Cache Lock Bits Flash Reset */
399#define L1CSR1_ICFI 0x00000002 /* Instr Cache Flash Invalidate */ 401#define L1CSR1_ICFI 0x00000002 /* Instr Cache Flash Invalidate */
400#define L1CSR1_ICE 0x00000001 /* Instr Cache Enable */ 402#define L1CSR1_ICE 0x00000001 /* Instr Cache Enable */
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 612b0c4dc26d..6a4fb29a0618 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -4,6 +4,8 @@
4 4
5CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' 5CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
6 6
7subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
8
7ifeq ($(CONFIG_PPC64),y) 9ifeq ($(CONFIG_PPC64),y)
8CFLAGS_prom_init.o += -mno-minimal-toc 10CFLAGS_prom_init.o += -mno-minimal-toc
9endif 11endif
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S
index 54f767e31a1a..1e9949e68856 100644
--- a/arch/powerpc/kernel/cpu_setup_6xx.S
+++ b/arch/powerpc/kernel/cpu_setup_6xx.S
@@ -239,6 +239,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
239 ori r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE 239 ori r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE
240 ori r11,r11,HID0_LRSTK | HID0_BTIC 240 ori r11,r11,HID0_LRSTK | HID0_BTIC
241 oris r11,r11,HID0_DPM@h 241 oris r11,r11,HID0_DPM@h
242BEGIN_MMU_FTR_SECTION
243 oris r11,r11,HID0_HIGH_BAT@h
244END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
242BEGIN_FTR_SECTION 245BEGIN_FTR_SECTION
243 xori r11,r11,HID0_BTIC 246 xori r11,r11,HID0_BTIC
244END_FTR_SECTION_IFSET(CPU_FTR_NO_BTIC) 247END_FTR_SECTION_IFSET(CPU_FTR_NO_BTIC)
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
index eb4b9adcedb4..0adb50ad8031 100644
--- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S
+++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
@@ -17,6 +17,40 @@
17#include <asm/cputable.h> 17#include <asm/cputable.h>
18#include <asm/ppc_asm.h> 18#include <asm/ppc_asm.h>
19 19
20_GLOBAL(__e500_icache_setup)
21 mfspr r0, SPRN_L1CSR1
22 andi. r3, r0, L1CSR1_ICE
23 bnelr /* Already enabled */
24 oris r0, r0, L1CSR1_CPE@h
25 ori r0, r0, (L1CSR1_ICFI | L1CSR1_ICLFR | L1CSR1_ICE)
26 mtspr SPRN_L1CSR1, r0 /* Enable I-Cache */
27 isync
28 blr
29
30_GLOBAL(__e500_dcache_setup)
31 mfspr r0, SPRN_L1CSR0
32 andi. r3, r0, L1CSR0_DCE
33 bnelr /* Already enabled */
34 msync
35 isync
36 li r0, 0
37 mtspr SPRN_L1CSR0, r0 /* Disable */
38 msync
39 isync
40 li r0, (L1CSR0_DCFI | L1CSR0_CLFC)
41 mtspr SPRN_L1CSR0, r0 /* Invalidate */
42 isync
431: mfspr r0, SPRN_L1CSR0
44 andi. r3, r0, L1CSR0_CLFC
45 bne+ 1b /* Wait for lock bits reset */
46 oris r0, r0, L1CSR0_CPE@h
47 ori r0, r0, L1CSR0_DCE
48 msync
49 isync
50 mtspr SPRN_L1CSR0, r0 /* Enable */
51 isync
52 blr
53
20_GLOBAL(__setup_cpu_e200) 54_GLOBAL(__setup_cpu_e200)
21 /* enable dedicated debug exception handling resources (Debug APU) */ 55 /* enable dedicated debug exception handling resources (Debug APU) */
22 mfspr r3,SPRN_HID0 56 mfspr r3,SPRN_HID0
@@ -25,7 +59,16 @@ _GLOBAL(__setup_cpu_e200)
25 b __setup_e200_ivors 59 b __setup_e200_ivors
26_GLOBAL(__setup_cpu_e500v1) 60_GLOBAL(__setup_cpu_e500v1)
27_GLOBAL(__setup_cpu_e500v2) 61_GLOBAL(__setup_cpu_e500v2)
28 b __setup_e500_ivors 62 mflr r4
63 bl __e500_icache_setup
64 bl __e500_dcache_setup
65 bl __setup_e500_ivors
66 mtlr r4
67 blr
29_GLOBAL(__setup_cpu_e500mc) 68_GLOBAL(__setup_cpu_e500mc)
30 b __setup_e500mc_ivors 69 mflr r4
31 70 bl __e500_icache_setup
71 bl __e500_dcache_setup
72 bl __setup_e500mc_ivors
73 mtlr r4
74 blr
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index ef6f64950e9b..a538824616fd 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1947,8 +1947,47 @@ static void __init fixup_device_tree_maple(void)
1947 prom_setprop(isa, name, "ranges", 1947 prom_setprop(isa, name, "ranges",
1948 isa_ranges, sizeof(isa_ranges)); 1948 isa_ranges, sizeof(isa_ranges));
1949} 1949}
1950
1951#define CPC925_MC_START 0xf8000000
1952#define CPC925_MC_LENGTH 0x1000000
1953/* The values for memory-controller don't have right number of cells */
1954static void __init fixup_device_tree_maple_memory_controller(void)
1955{
1956 phandle mc;
1957 u32 mc_reg[4];
1958 char *name = "/hostbridge@f8000000";
1959 struct prom_t *_prom = &RELOC(prom);
1960 u32 ac, sc;
1961
1962 mc = call_prom("finddevice", 1, 1, ADDR(name));
1963 if (!PHANDLE_VALID(mc))
1964 return;
1965
1966 if (prom_getproplen(mc, "reg") != 8)
1967 return;
1968
1969 prom_getprop(_prom->root, "#address-cells", &ac, sizeof(ac));
1970 prom_getprop(_prom->root, "#size-cells", &sc, sizeof(sc));
1971 if ((ac != 2) || (sc != 2))
1972 return;
1973
1974 if (prom_getprop(mc, "reg", mc_reg, sizeof(mc_reg)) == PROM_ERROR)
1975 return;
1976
1977 if (mc_reg[0] != CPC925_MC_START || mc_reg[1] != CPC925_MC_LENGTH)
1978 return;
1979
1980 prom_printf("Fixing up bogus hostbridge on Maple...\n");
1981
1982 mc_reg[0] = 0x0;
1983 mc_reg[1] = CPC925_MC_START;
1984 mc_reg[2] = 0x0;
1985 mc_reg[3] = CPC925_MC_LENGTH;
1986 prom_setprop(mc, name, "reg", mc_reg, sizeof(mc_reg));
1987}
1950#else 1988#else
1951#define fixup_device_tree_maple() 1989#define fixup_device_tree_maple()
1990#define fixup_device_tree_maple_memory_controller()
1952#endif 1991#endif
1953 1992
1954#ifdef CONFIG_PPC_CHRP 1993#ifdef CONFIG_PPC_CHRP
@@ -2189,6 +2228,7 @@ static void __init fixup_device_tree_efika(void)
2189static void __init fixup_device_tree(void) 2228static void __init fixup_device_tree(void)
2190{ 2229{
2191 fixup_device_tree_maple(); 2230 fixup_device_tree_maple();
2231 fixup_device_tree_maple_memory_controller();
2192 fixup_device_tree_chrp(); 2232 fixup_device_tree_chrp();
2193 fixup_device_tree_pmac(); 2233 fixup_device_tree_pmac();
2194 fixup_device_tree_efika(); 2234 fixup_device_tree_efika();
diff --git a/arch/powerpc/kvm/Makefile b/arch/powerpc/kvm/Makefile
index 4b2df66c79d8..459c7ee580f7 100644
--- a/arch/powerpc/kvm/Makefile
+++ b/arch/powerpc/kvm/Makefile
@@ -2,6 +2,8 @@
2# Makefile for Kernel-based Virtual Machine module 2# Makefile for Kernel-based Virtual Machine module
3# 3#
4 4
5subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
6
5EXTRA_CFLAGS += -Ivirt/kvm -Iarch/powerpc/kvm 7EXTRA_CFLAGS += -Ivirt/kvm -Iarch/powerpc/kvm
6 8
7common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o) 9common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 29b742b90f1f..3040dac18a37 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -2,6 +2,8 @@
2# Makefile for ppc-specific library files.. 2# Makefile for ppc-specific library files..
3# 3#
4 4
5subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
6
5ifeq ($(CONFIG_PPC64),y) 7ifeq ($(CONFIG_PPC64),y)
6EXTRA_CFLAGS += -mno-minimal-toc 8EXTRA_CFLAGS += -mno-minimal-toc
7endif 9endif
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index c4bcf072cb3c..2d2192e48de7 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -2,6 +2,8 @@
2# Makefile for the linux ppc-specific parts of the memory manager. 2# Makefile for the linux ppc-specific parts of the memory manager.
3# 3#
4 4
5subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
6
5ifeq ($(CONFIG_PPC64),y) 7ifeq ($(CONFIG_PPC64),y)
6EXTRA_CFLAGS += -mno-minimal-toc 8EXTRA_CFLAGS += -mno-minimal-toc
7endif 9endif
diff --git a/arch/powerpc/oprofile/Makefile b/arch/powerpc/oprofile/Makefile
index 2ef6b0dddd8c..73e1c2ca0552 100644
--- a/arch/powerpc/oprofile/Makefile
+++ b/arch/powerpc/oprofile/Makefile
@@ -1,3 +1,5 @@
1subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
2
1ifeq ($(CONFIG_PPC64),y) 3ifeq ($(CONFIG_PPC64),y)
2EXTRA_CFLAGS += -mno-minimal-toc 4EXTRA_CFLAGS += -mno-minimal-toc
3endif 5endif
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index c5118802a281..42e09a9f77e2 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -43,7 +43,13 @@ static int __init warp_probe(void)
43{ 43{
44 unsigned long root = of_get_flat_dt_root(); 44 unsigned long root = of_get_flat_dt_root();
45 45
46 return of_flat_dt_is_compatible(root, "pika,warp"); 46 if (!of_flat_dt_is_compatible(root, "pika,warp"))
47 return 0;
48
49 /* For __dma_alloc_coherent */
50 ISA_DMA_THRESHOLD = ~0L;
51
52 return 1;
47} 53}
48 54
49define_machine(warp) { 55define_machine(warp) {
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c
index 1bcff94eb924..84544d072043 100644
--- a/arch/powerpc/platforms/512x/clock.c
+++ b/arch/powerpc/platforms/512x/clock.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <asm/mpc512x.h> 27#include <asm/mpc5xxx.h>
28#include <asm/clk_interface.h> 28#include <asm/clk_interface.h>
29 29
30#undef CLK_DEBUG 30#undef CLK_DEBUG
@@ -83,13 +83,13 @@ static void dump_clocks(void)
83 mutex_lock(&clocks_mutex); 83 mutex_lock(&clocks_mutex);
84 printk(KERN_INFO "CLOCKS:\n"); 84 printk(KERN_INFO "CLOCKS:\n");
85 list_for_each_entry(p, &clocks, node) { 85 list_for_each_entry(p, &clocks, node) {
86 printk(KERN_INFO " %s %ld", p->name, p->rate); 86 pr_info(" %s=%ld", p->name, p->rate);
87 if (p->parent) 87 if (p->parent)
88 printk(KERN_INFO " %s %ld", p->parent->name, 88 pr_cont(" %s=%ld", p->parent->name,
89 p->parent->rate); 89 p->parent->rate);
90 if (p->flags & CLK_HAS_CTRL) 90 if (p->flags & CLK_HAS_CTRL)
91 printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit); 91 pr_cont(" reg/bit=%d/%d", p->reg, p->bit);
92 printk("\n"); 92 pr_cont("\n");
93 } 93 }
94 mutex_unlock(&clocks_mutex); 94 mutex_unlock(&clocks_mutex);
95} 95}
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
index 9c03693cb009..22a5352407e0 100644
--- a/arch/powerpc/platforms/512x/mpc512x.h
+++ b/arch/powerpc/platforms/512x/mpc512x.h
@@ -11,7 +11,6 @@
11 11
12#ifndef __MPC512X_H__ 12#ifndef __MPC512X_H__
13#define __MPC512X_H__ 13#define __MPC512X_H__
14extern unsigned long mpc512x_find_ips_freq(struct device_node *node);
15extern void __init mpc512x_init_IRQ(void); 14extern void __init mpc512x_init_IRQ(void);
16void __init mpc512x_declare_of_platform_devices(void); 15void __init mpc512x_declare_of_platform_devices(void);
17#endif /* __MPC512X_H__ */ 16#endif /* __MPC512X_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index d8cd579f3191..434d683df5a0 100644
--- a/arch/powerpc/platforms/512x/mpc512x_shared.c
+++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
@@ -24,29 +24,6 @@
24 24
25#include "mpc512x.h" 25#include "mpc512x.h"
26 26
27unsigned long
28mpc512x_find_ips_freq(struct device_node *node)
29{
30 struct device_node *np;
31 const unsigned int *p_ips_freq = NULL;
32
33 of_node_get(node);
34 while (node) {
35 p_ips_freq = of_get_property(node, "bus-frequency", NULL);
36 if (p_ips_freq)
37 break;
38
39 np = of_get_parent(node);
40 of_node_put(node);
41 node = np;
42 }
43 if (node)
44 of_node_put(node);
45
46 return p_ips_freq ? *p_ips_freq : 0;
47}
48EXPORT_SYMBOL(mpc512x_find_ips_freq);
49
50void __init mpc512x_init_IRQ(void) 27void __init mpc512x_init_IRQ(void)
51{ 28{
52 struct device_node *np; 29 struct device_node *np;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 8e3dd5a0f228..a46bad0c2339 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -47,36 +47,6 @@ static DEFINE_SPINLOCK(mpc52xx_lock);
47static struct mpc52xx_gpt __iomem *mpc52xx_wdt; 47static struct mpc52xx_gpt __iomem *mpc52xx_wdt;
48static struct mpc52xx_cdm __iomem *mpc52xx_cdm; 48static struct mpc52xx_cdm __iomem *mpc52xx_cdm;
49 49
50/**
51 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
52 * @node: device node
53 *
54 * Returns IPB bus frequency, or 0 if the bus frequency cannot be found.
55 */
56unsigned int
57mpc52xx_find_ipb_freq(struct device_node *node)
58{
59 struct device_node *np;
60 const unsigned int *p_ipb_freq = NULL;
61
62 of_node_get(node);
63 while (node) {
64 p_ipb_freq = of_get_property(node, "bus-frequency", NULL);
65 if (p_ipb_freq)
66 break;
67
68 np = of_get_parent(node);
69 of_node_put(node);
70 node = np;
71 }
72 if (node)
73 of_node_put(node);
74
75 return p_ipb_freq ? *p_ipb_freq : 0;
76}
77EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
78
79
80/* 50/*
81 * Configure the XLB arbiter settings to match what Linux expects. 51 * Configure the XLB arbiter settings to match what Linux expects.
82 */ 52 */
@@ -221,7 +191,7 @@ unsigned int mpc52xx_get_xtal_freq(struct device_node *node)
221 if (!mpc52xx_cdm) 191 if (!mpc52xx_cdm)
222 return 0; 192 return 0;
223 193
224 freq = mpc52xx_find_ipb_freq(node); 194 freq = mpc5xxx_get_bus_frequency(node);
225 if (!freq) 195 if (!freq)
226 return 0; 196 return 0;
227 197
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 437d29a59d72..083ebee9a16d 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -96,6 +96,13 @@ config ASP834x
96 This enables support for the Analogue & Micro ASP 83xx 96 This enables support for the Analogue & Micro ASP 83xx
97 board. 97 board.
98 98
99config KMETER1
100 bool "Keymile KMETER1"
101 select DEFAULT_UIMAGE
102 select QUICC_ENGINE
103 help
104 This enables support for the Keymile KMETER1 board.
105
99 106
100endif 107endif
101 108
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 051777c542c7..e139c36572ec 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -15,3 +15,4 @@ obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o
15obj-$(CONFIG_SBC834x) += sbc834x.o 15obj-$(CONFIG_SBC834x) += sbc834x.o
16obj-$(CONFIG_MPC837x_RDB) += mpc837x_rdb.o 16obj-$(CONFIG_MPC837x_RDB) += mpc837x_rdb.o
17obj-$(CONFIG_ASP834x) += asp834x.o 17obj-$(CONFIG_ASP834x) += asp834x.o
18obj-$(CONFIG_KMETER1) += kmeter1.o
diff --git a/arch/powerpc/platforms/83xx/kmeter1.c b/arch/powerpc/platforms/83xx/kmeter1.c
new file mode 100644
index 000000000000..903acfd851ac
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/kmeter1.c
@@ -0,0 +1,191 @@
1/*
2 * Copyright 2008 DENX Software Engineering GmbH
3 * Author: Heiko Schocher <hs@denx.de>
4 *
5 * Description:
6 * Keymile KMETER1 board specific routines.
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 of the License, or (at your
11 * option) any later version.
12 */
13
14#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/initrd.h>
27#include <linux/of_platform.h>
28#include <linux/of_device.h>
29
30#include <asm/system.h>
31#include <asm/atomic.h>
32#include <asm/time.h>
33#include <asm/io.h>
34#include <asm/machdep.h>
35#include <asm/ipic.h>
36#include <asm/irq.h>
37#include <asm/prom.h>
38#include <asm/udbg.h>
39#include <sysdev/fsl_soc.h>
40#include <sysdev/fsl_pci.h>
41#include <asm/qe.h>
42#include <asm/qe_ic.h>
43
44#include "mpc83xx.h"
45
46#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revision field */
47/* ************************************************************************
48 *
49 * Setup the architecture
50 *
51 */
52static void __init kmeter1_setup_arch(void)
53{
54 struct device_node *np;
55
56 if (ppc_md.progress)
57 ppc_md.progress("kmeter1_setup_arch()", 0);
58
59#ifdef CONFIG_PCI
60 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
61 mpc83xx_add_bridge(np);
62#endif
63
64#ifdef CONFIG_QUICC_ENGINE
65 qe_reset();
66
67 np = of_find_node_by_name(NULL, "par_io");
68 if (np != NULL) {
69 par_io_init(np);
70 of_node_put(np);
71
72 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
73 par_io_of_config(np);
74 }
75
76 np = of_find_compatible_node(NULL, "network", "ucc_geth");
77 if (np != NULL) {
78 uint svid;
79
80 /* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */
81 svid = mfspr(SPRN_SVR);
82 if (SVR_REV(svid) == 0x0021) {
83 struct device_node *np_par;
84 struct resource res;
85 void __iomem *base;
86 int ret;
87
88 np_par = of_find_node_by_name(NULL, "par_io");
89 if (np_par == NULL) {
90 printk(KERN_WARNING "%s couldn;t find par_io node\n",
91 __func__);
92 return;
93 }
94 /* Map Parallel I/O ports registers */
95 ret = of_address_to_resource(np_par, 0, &res);
96 if (ret) {
97 printk(KERN_WARNING "%s couldn;t map par_io registers\n",
98 __func__);
99 return;
100 }
101 base = ioremap(res.start, res.end - res.start + 1);
102
103 /*
104 * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2)
105 * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1)
106 */
107 setbits32((base + 0xa8), 0x0c003000);
108
109 /*
110 * IMMR + 0x14AC[20:27] = 10101010
111 * (data delay for both UCC's)
112 */
113 clrsetbits_be32((base + 0xac), 0xff0, 0xaa0);
114 iounmap(base);
115 of_node_put(np_par);
116 }
117 of_node_put(np);
118 }
119#endif /* CONFIG_QUICC_ENGINE */
120}
121
122static struct of_device_id kmeter_ids[] = {
123 { .type = "soc", },
124 { .compatible = "soc", },
125 { .compatible = "simple-bus", },
126 { .type = "qe", },
127 { .compatible = "fsl,qe", },
128 {},
129};
130
131static int __init kmeter_declare_of_platform_devices(void)
132{
133 /* Publish the QE devices */
134 of_platform_bus_probe(NULL, kmeter_ids, NULL);
135
136 return 0;
137}
138machine_device_initcall(kmeter1, kmeter_declare_of_platform_devices);
139
140static void __init kmeter1_init_IRQ(void)
141{
142 struct device_node *np;
143
144 np = of_find_compatible_node(NULL, NULL, "fsl,pq2pro-pic");
145 if (!np) {
146 np = of_find_node_by_type(NULL, "ipic");
147 if (!np)
148 return;
149 }
150
151 ipic_init(np, 0);
152
153 /* Initialize the default interrupt mapping priorities,
154 * in case the boot rom changed something on us.
155 */
156 ipic_set_default_priority();
157 of_node_put(np);
158
159#ifdef CONFIG_QUICC_ENGINE
160 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
161 if (!np) {
162 np = of_find_node_by_type(NULL, "qeic");
163 if (!np)
164 return;
165 }
166 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
167 of_node_put(np);
168#endif /* CONFIG_QUICC_ENGINE */
169}
170
171/*
172 * Called very early, MMU is off, device-tree isn't unflattened
173 */
174static int __init kmeter1_probe(void)
175{
176 unsigned long root = of_get_flat_dt_root();
177
178 return of_flat_dt_is_compatible(root, "keymile,KMETER1");
179}
180
181define_machine(kmeter1) {
182 .name = "KMETER1",
183 .probe = kmeter1_probe,
184 .setup_arch = kmeter1_setup_arch,
185 .init_IRQ = kmeter1_init_IRQ,
186 .get_irq = ipic_get_irq,
187 .restart = mpc83xx_restart,
188 .time_init = mpc83xx_time_init,
189 .calibrate_decr = generic_calibrate_decr,
190 .progress = udbg_progress,
191};
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 83cfe51526ec..d1dc5b0b4fbf 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -22,8 +22,8 @@
22/* system i/o configuration register low */ 22/* system i/o configuration register low */
23#define MPC83XX_SICRL_OFFS 0x114 23#define MPC83XX_SICRL_OFFS 0x114
24#define MPC834X_SICRL_USB_MASK 0x60000000 24#define MPC834X_SICRL_USB_MASK 0x60000000
25#define MPC834X_SICRL_USB0 0x40000000 25#define MPC834X_SICRL_USB0 0x20000000
26#define MPC834X_SICRL_USB1 0x20000000 26#define MPC834X_SICRL_USB1 0x40000000
27#define MPC831X_SICRL_USB_MASK 0x00000c00 27#define MPC831X_SICRL_USB_MASK 0x00000c00
28#define MPC831X_SICRL_USB_ULPI 0x00000800 28#define MPC831X_SICRL_USB_ULPI 0x00000800
29#define MPC8315_SICRL_USB_MASK 0x000000fc 29#define MPC8315_SICRL_USB_MASK 0x000000fc
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 11e1fac17c7f..3ba4bb7d41bb 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -47,25 +47,25 @@ int mpc834x_usb_cfg(void)
47 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */ 47 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
48 48
49 prop = of_get_property(np, "phy_type", NULL); 49 prop = of_get_property(np, "phy_type", NULL);
50 port1_is_dr = 1;
50 if (prop && (!strcmp(prop, "utmi") || 51 if (prop && (!strcmp(prop, "utmi") ||
51 !strcmp(prop, "utmi_wide"))) { 52 !strcmp(prop, "utmi_wide"))) {
52 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1; 53 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
53 sicrh |= MPC834X_SICRH_USB_UTMI; 54 sicrh |= MPC834X_SICRH_USB_UTMI;
54 port1_is_dr = 1; 55 port0_is_dr = 1;
55 } else if (prop && !strcmp(prop, "serial")) { 56 } else if (prop && !strcmp(prop, "serial")) {
56 dr_mode = of_get_property(np, "dr_mode", NULL); 57 dr_mode = of_get_property(np, "dr_mode", NULL);
57 if (dr_mode && !strcmp(dr_mode, "otg")) { 58 if (dr_mode && !strcmp(dr_mode, "otg")) {
58 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1; 59 sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
59 port1_is_dr = 1; 60 port0_is_dr = 1;
60 } else { 61 } else {
61 sicrl |= MPC834X_SICRL_USB0; 62 sicrl |= MPC834X_SICRL_USB1;
62 } 63 }
63 } else if (prop && !strcmp(prop, "ulpi")) { 64 } else if (prop && !strcmp(prop, "ulpi")) {
64 sicrl |= MPC834X_SICRL_USB0; 65 sicrl |= MPC834X_SICRL_USB1;
65 } else { 66 } else {
66 printk(KERN_WARNING "834x USB PHY type not supported\n"); 67 printk(KERN_WARNING "834x USB PHY type not supported\n");
67 } 68 }
68 port0_is_dr = 1;
69 of_node_put(np); 69 of_node_put(np);
70 } 70 }
71 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph"); 71 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 43d385cedcd7..a9b416688975 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -35,12 +35,14 @@ config MPC85xx_MDS
35 select DEFAULT_UIMAGE 35 select DEFAULT_UIMAGE
36 select PHYLIB 36 select PHYLIB
37 select HAS_RAPIDIO 37 select HAS_RAPIDIO
38 select SWIOTLB
38 help 39 help
39 This option enables support for the MPC85xx MDS board 40 This option enables support for the MPC85xx MDS board
40 41
41config MPC8536_DS 42config MPC8536_DS
42 bool "Freescale MPC8536 DS" 43 bool "Freescale MPC8536 DS"
43 select DEFAULT_UIMAGE 44 select DEFAULT_UIMAGE
45 select SWIOTLB
44 help 46 help
45 This option enables support for the MPC8536 DS board 47 This option enables support for the MPC8536 DS board
46 48
@@ -49,6 +51,7 @@ config MPC85xx_DS
49 select PPC_I8259 51 select PPC_I8259
50 select DEFAULT_UIMAGE 52 select DEFAULT_UIMAGE
51 select FSL_ULI1575 53 select FSL_ULI1575
54 select SWIOTLB
52 help 55 help
53 This option enables support for the MPC85xx DS (MPC8544 DS) board 56 This option enables support for the MPC85xx DS (MPC8544 DS) board
54 57
@@ -64,6 +67,16 @@ config KSI8560
64 help 67 help
65 This option enables support for the Emerson KSI8560 board 68 This option enables support for the Emerson KSI8560 board
66 69
70config XES_MPC85xx
71 bool "X-ES single-board computer"
72 select DEFAULT_UIMAGE
73 help
74 This option enables support for the various single-board
75 computers from Extreme Engineering Solutions (X-ES) based on
76 Freescale MPC85xx processors.
77 Manufacturer: Extreme Engineering Solutions, Inc.
78 URL: <http://www.xes-inc.com/>
79
67config STX_GP3 80config STX_GP3
68 bool "Silicon Turnkey Express GP3" 81 bool "Silicon Turnkey Express GP3"
69 help 82 help
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index a857b35b9828..835733f2b12c 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -15,3 +15,4 @@ obj-$(CONFIG_SBC8560) += sbc8560.o
15obj-$(CONFIG_SBC8548) += sbc8548.o 15obj-$(CONFIG_SBC8548) += sbc8548.o
16obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o 16obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o
17obj-$(CONFIG_KSI8560) += ksi8560.o 17obj-$(CONFIG_KSI8560) += ksi8560.o
18obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o \ No newline at end of file
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index 63efca20d7bd..055ff417bae9 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -17,6 +17,7 @@
17#include <linux/seq_file.h> 17#include <linux/seq_file.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <linux/lmb.h>
20 21
21#include <asm/system.h> 22#include <asm/system.h>
22#include <asm/time.h> 23#include <asm/time.h>
@@ -26,6 +27,7 @@
26#include <asm/prom.h> 27#include <asm/prom.h>
27#include <asm/udbg.h> 28#include <asm/udbg.h>
28#include <asm/mpic.h> 29#include <asm/mpic.h>
30#include <asm/swiotlb.h>
29 31
30#include <sysdev/fsl_soc.h> 32#include <sysdev/fsl_soc.h>
31#include <sysdev/fsl_pci.h> 33#include <sysdev/fsl_pci.h>
@@ -65,7 +67,9 @@ static void __init mpc8536_ds_setup_arch(void)
65{ 67{
66#ifdef CONFIG_PCI 68#ifdef CONFIG_PCI
67 struct device_node *np; 69 struct device_node *np;
70 struct pci_controller *hose;
68#endif 71#endif
72 dma_addr_t max = 0xffffffff;
69 73
70 if (ppc_md.progress) 74 if (ppc_md.progress)
71 ppc_md.progress("mpc8536_ds_setup_arch()", 0); 75 ppc_md.progress("mpc8536_ds_setup_arch()", 0);
@@ -80,11 +84,22 @@ static void __init mpc8536_ds_setup_arch(void)
80 fsl_add_bridge(np, 1); 84 fsl_add_bridge(np, 1);
81 else 85 else
82 fsl_add_bridge(np, 0); 86 fsl_add_bridge(np, 0);
87
88 hose = pci_find_hose_for_OF_device(np);
89 max = min(max, hose->dma_window_base_cur +
90 hose->dma_window_size);
83 } 91 }
84 } 92 }
85 93
86#endif 94#endif
87 95
96#ifdef CONFIG_SWIOTLB
97 if (lmb_end_of_DRAM() > max) {
98 ppc_swiotlb_enable = 1;
99 set_pci_dma_ops(&swiotlb_pci_dma_ops);
100 }
101#endif
102
88 printk("MPC8536 DS board from Freescale Semiconductor\n"); 103 printk("MPC8536 DS board from Freescale Semiconductor\n");
89} 104}
90 105
@@ -102,6 +117,8 @@ static int __init mpc8536_ds_publish_devices(void)
102} 117}
103machine_device_initcall(mpc8536_ds, mpc8536_ds_publish_devices); 118machine_device_initcall(mpc8536_ds, mpc8536_ds_publish_devices);
104 119
120machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier);
121
105/* 122/*
106 * Called very early, device-tree isn't unflattened 123 * Called very early, device-tree isn't unflattened
107 */ 124 */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 53d5851a6c97..849c0ac0025f 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -20,6 +20,7 @@
20#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <linux/lmb.h>
23 24
24#include <asm/system.h> 25#include <asm/system.h>
25#include <asm/time.h> 26#include <asm/time.h>
@@ -30,6 +31,7 @@
30#include <asm/udbg.h> 31#include <asm/udbg.h>
31#include <asm/mpic.h> 32#include <asm/mpic.h>
32#include <asm/i8259.h> 33#include <asm/i8259.h>
34#include <asm/swiotlb.h>
33 35
34#include <sysdev/fsl_soc.h> 36#include <sysdev/fsl_soc.h>
35#include <sysdev/fsl_pci.h> 37#include <sysdev/fsl_pci.h>
@@ -155,7 +157,9 @@ static void __init mpc85xx_ds_setup_arch(void)
155{ 157{
156#ifdef CONFIG_PCI 158#ifdef CONFIG_PCI
157 struct device_node *np; 159 struct device_node *np;
160 struct pci_controller *hose;
158#endif 161#endif
162 dma_addr_t max = 0xffffffff;
159 163
160 if (ppc_md.progress) 164 if (ppc_md.progress)
161 ppc_md.progress("mpc85xx_ds_setup_arch()", 0); 165 ppc_md.progress("mpc85xx_ds_setup_arch()", 0);
@@ -171,6 +175,10 @@ static void __init mpc85xx_ds_setup_arch(void)
171 fsl_add_bridge(np, 1); 175 fsl_add_bridge(np, 1);
172 else 176 else
173 fsl_add_bridge(np, 0); 177 fsl_add_bridge(np, 0);
178
179 hose = pci_find_hose_for_OF_device(np);
180 max = min(max, hose->dma_window_base_cur +
181 hose->dma_window_size);
174 } 182 }
175 } 183 }
176 184
@@ -181,6 +189,13 @@ static void __init mpc85xx_ds_setup_arch(void)
181 mpc85xx_smp_init(); 189 mpc85xx_smp_init();
182#endif 190#endif
183 191
192#ifdef CONFIG_SWIOTLB
193 if (lmb_end_of_DRAM() > max) {
194 ppc_swiotlb_enable = 1;
195 set_pci_dma_ops(&swiotlb_pci_dma_ops);
196 }
197#endif
198
184 printk("MPC85xx DS board from Freescale Semiconductor\n"); 199 printk("MPC85xx DS board from Freescale Semiconductor\n");
185} 200}
186 201
@@ -217,6 +232,10 @@ machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices);
217machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices); 232machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices);
218machine_device_initcall(p2020_ds, mpc85xxds_publish_devices); 233machine_device_initcall(p2020_ds, mpc85xxds_publish_devices);
219 234
235machine_arch_initcall(mpc8544_ds, swiotlb_setup_bus_notifier);
236machine_arch_initcall(mpc8572_ds, swiotlb_setup_bus_notifier);
237machine_arch_initcall(p2020_ds, swiotlb_setup_bus_notifier);
238
220/* 239/*
221 * Called very early, device-tree isn't unflattened 240 * Called very early, device-tree isn't unflattened
222 */ 241 */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index b2c0a4319973..77f90b356356 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -33,6 +33,7 @@
33#include <linux/of_platform.h> 33#include <linux/of_platform.h>
34#include <linux/of_device.h> 34#include <linux/of_device.h>
35#include <linux/phy.h> 35#include <linux/phy.h>
36#include <linux/lmb.h>
36 37
37#include <asm/system.h> 38#include <asm/system.h>
38#include <asm/atomic.h> 39#include <asm/atomic.h>
@@ -49,6 +50,7 @@
49#include <asm/qe.h> 50#include <asm/qe.h>
50#include <asm/qe_ic.h> 51#include <asm/qe_ic.h>
51#include <asm/mpic.h> 52#include <asm/mpic.h>
53#include <asm/swiotlb.h>
52 54
53#undef DEBUG 55#undef DEBUG
54#ifdef DEBUG 56#ifdef DEBUG
@@ -155,6 +157,10 @@ static void __init mpc85xx_mds_setup_arch(void)
155{ 157{
156 struct device_node *np; 158 struct device_node *np;
157 static u8 __iomem *bcsr_regs = NULL; 159 static u8 __iomem *bcsr_regs = NULL;
160#ifdef CONFIG_PCI
161 struct pci_controller *hose;
162#endif
163 dma_addr_t max = 0xffffffff;
158 164
159 if (ppc_md.progress) 165 if (ppc_md.progress)
160 ppc_md.progress("mpc85xx_mds_setup_arch()", 0); 166 ppc_md.progress("mpc85xx_mds_setup_arch()", 0);
@@ -179,6 +185,10 @@ static void __init mpc85xx_mds_setup_arch(void)
179 fsl_add_bridge(np, 1); 185 fsl_add_bridge(np, 1);
180 else 186 else
181 fsl_add_bridge(np, 0); 187 fsl_add_bridge(np, 0);
188
189 hose = pci_find_hose_for_OF_device(np);
190 max = min(max, hose->dma_window_base_cur +
191 hose->dma_window_size);
182 } 192 }
183 } 193 }
184#endif 194#endif
@@ -227,6 +237,13 @@ static void __init mpc85xx_mds_setup_arch(void)
227 iounmap(bcsr_regs); 237 iounmap(bcsr_regs);
228 } 238 }
229#endif /* CONFIG_QUICC_ENGINE */ 239#endif /* CONFIG_QUICC_ENGINE */
240
241#ifdef CONFIG_SWIOTLB
242 if (lmb_end_of_DRAM() > max) {
243 ppc_swiotlb_enable = 1;
244 set_pci_dma_ops(&swiotlb_pci_dma_ops);
245 }
246#endif
230} 247}
231 248
232 249
@@ -281,6 +298,9 @@ static int __init mpc85xx_publish_devices(void)
281machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices); 298machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices);
282machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices); 299machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices);
283 300
301machine_arch_initcall(mpc8568_mds, swiotlb_setup_bus_notifier);
302machine_arch_initcall(mpc8569_mds, swiotlb_setup_bus_notifier);
303
284static void __init mpc85xx_mds_pic_init(void) 304static void __init mpc85xx_mds_pic_init(void)
285{ 305{
286 struct mpic *mpic; 306 struct mpic *mpic;
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
new file mode 100644
index 000000000000..ee01532786e4
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
@@ -0,0 +1,282 @@
1/*
2 * Copyright (C) 2009 Extreme Engineering Solutions, Inc.
3 *
4 * X-ES board-specific functionality
5 *
6 * Based on mpc85xx_ds code from Freescale Semiconductor, Inc.
7 *
8 * Author: Nate Case <ncase@xes-inc.com>
9 *
10 * This 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
15#include <linux/stddef.h>
16#include <linux/kernel.h>
17#include <linux/pci.h>
18#include <linux/kdev_t.h>
19#include <linux/delay.h>
20#include <linux/seq_file.h>
21#include <linux/interrupt.h>
22#include <linux/of_platform.h>
23
24#include <asm/system.h>
25#include <asm/time.h>
26#include <asm/machdep.h>
27#include <asm/pci-bridge.h>
28#include <mm/mmu_decl.h>
29#include <asm/prom.h>
30#include <asm/udbg.h>
31#include <asm/mpic.h>
32
33#include <sysdev/fsl_soc.h>
34#include <sysdev/fsl_pci.h>
35#include <linux/of_platform.h>
36
37/* A few bit definitions needed for fixups on some boards */
38#define MPC85xx_L2CTL_L2E 0x80000000 /* L2 enable */
39#define MPC85xx_L2CTL_L2I 0x40000000 /* L2 flash invalidate */
40#define MPC85xx_L2CTL_L2SIZ_MASK 0x30000000 /* L2 SRAM size (R/O) */
41
42void __init xes_mpc85xx_pic_init(void)
43{
44 struct mpic *mpic;
45 struct resource r;
46 struct device_node *np;
47
48 np = of_find_node_by_type(NULL, "open-pic");
49 if (np == NULL) {
50 printk(KERN_ERR "Could not find open-pic node\n");
51 return;
52 }
53
54 if (of_address_to_resource(np, 0, &r)) {
55 printk(KERN_ERR "Failed to map mpic register space\n");
56 of_node_put(np);
57 return;
58 }
59
60 mpic = mpic_alloc(np, r.start,
61 MPIC_PRIMARY | MPIC_WANTS_RESET |
62 MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
63 0, 256, " OpenPIC ");
64 BUG_ON(mpic == NULL);
65 of_node_put(np);
66
67 mpic_init(mpic);
68}
69
70static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
71{
72 volatile uint32_t ctl, tmp;
73
74 asm volatile("msync; isync");
75 tmp = in_be32(l2_base);
76
77 /*
78 * xMon may have enabled part of L2 as SRAM, so we need to set it
79 * up for all cache mode just to be safe.
80 */
81 printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n");
82
83 ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I;
84 if (machine_is_compatible("MPC8540") ||
85 machine_is_compatible("MPC8560"))
86 /*
87 * Assume L2 SRAM is used fully for cache, so set
88 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).
89 */
90 ctl |= (tmp & MPC85xx_L2CTL_L2SIZ_MASK) >> 2;
91
92 asm volatile("msync; isync");
93 out_be32(l2_base, ctl);
94 asm volatile("msync; isync");
95}
96
97static void xes_mpc85xx_fixups(void)
98{
99 struct device_node *np;
100 int err;
101
102 /*
103 * Legacy xMon firmware on some X-ES boards does not enable L2
104 * as cache. We must ensure that they get enabled here.
105 */
106 for_each_node_by_name(np, "l2-cache-controller") {
107 struct resource r[2];
108 void __iomem *l2_base;
109
110 /* Only MPC8548, MPC8540, and MPC8560 boards are affected */
111 if (!of_device_is_compatible(np,
112 "fsl,mpc8548-l2-cache-controller") &&
113 !of_device_is_compatible(np,
114 "fsl,mpc8540-l2-cache-controller") &&
115 !of_device_is_compatible(np,
116 "fsl,mpc8560-l2-cache-controller"))
117 continue;
118
119 err = of_address_to_resource(np, 0, &r[0]);
120 if (err) {
121 printk(KERN_WARNING "xes_mpc85xx: Could not get "
122 "resource for device tree node '%s'",
123 np->full_name);
124 continue;
125 }
126
127 l2_base = ioremap(r[0].start, r[0].end - r[0].start + 1);
128
129 xes_mpc85xx_configure_l2(l2_base);
130 }
131}
132
133#ifdef CONFIG_PCI
134static int primary_phb_addr;
135#endif
136
137/*
138 * Setup the architecture
139 */
140#ifdef CONFIG_SMP
141extern void __init mpc85xx_smp_init(void);
142#endif
143static void __init xes_mpc85xx_setup_arch(void)
144{
145#ifdef CONFIG_PCI
146 struct device_node *np;
147#endif
148 struct device_node *root;
149 const char *model = "Unknown";
150
151 root = of_find_node_by_path("/");
152 if (root == NULL)
153 return;
154
155 model = of_get_property(root, "model", NULL);
156
157 printk(KERN_INFO "X-ES MPC85xx-based single-board computer: %s\n",
158 model + strlen("xes,"));
159
160 xes_mpc85xx_fixups();
161
162#ifdef CONFIG_PCI
163 for_each_node_by_type(np, "pci") {
164 if (of_device_is_compatible(np, "fsl,mpc8540-pci") ||
165 of_device_is_compatible(np, "fsl,mpc8548-pcie")) {
166 struct resource rsrc;
167 of_address_to_resource(np, 0, &rsrc);
168 if ((rsrc.start & 0xfffff) == primary_phb_addr)
169 fsl_add_bridge(np, 1);
170 else
171 fsl_add_bridge(np, 0);
172 }
173 }
174#endif
175
176#ifdef CONFIG_SMP
177 mpc85xx_smp_init();
178#endif
179}
180
181static struct of_device_id __initdata xes_mpc85xx_ids[] = {
182 { .type = "soc", },
183 { .compatible = "soc", },
184 { .compatible = "simple-bus", },
185 { .compatible = "gianfar", },
186 {},
187};
188
189static int __init xes_mpc85xx_publish_devices(void)
190{
191 return of_platform_bus_probe(NULL, xes_mpc85xx_ids, NULL);
192}
193machine_device_initcall(xes_mpc8572, xes_mpc85xx_publish_devices);
194machine_device_initcall(xes_mpc8548, xes_mpc85xx_publish_devices);
195machine_device_initcall(xes_mpc8540, xes_mpc85xx_publish_devices);
196
197/*
198 * Called very early, device-tree isn't unflattened
199 */
200static int __init xes_mpc8572_probe(void)
201{
202 unsigned long root = of_get_flat_dt_root();
203
204 if (of_flat_dt_is_compatible(root, "xes,MPC8572")) {
205#ifdef CONFIG_PCI
206 primary_phb_addr = 0x8000;
207#endif
208 return 1;
209 } else {
210 return 0;
211 }
212}
213
214static int __init xes_mpc8548_probe(void)
215{
216 unsigned long root = of_get_flat_dt_root();
217
218 if (of_flat_dt_is_compatible(root, "xes,MPC8548")) {
219#ifdef CONFIG_PCI
220 primary_phb_addr = 0xb000;
221#endif
222 return 1;
223 } else {
224 return 0;
225 }
226}
227
228static int __init xes_mpc8540_probe(void)
229{
230 unsigned long root = of_get_flat_dt_root();
231
232 if (of_flat_dt_is_compatible(root, "xes,MPC8540")) {
233#ifdef CONFIG_PCI
234 primary_phb_addr = 0xb000;
235#endif
236 return 1;
237 } else {
238 return 0;
239 }
240}
241
242define_machine(xes_mpc8572) {
243 .name = "X-ES MPC8572",
244 .probe = xes_mpc8572_probe,
245 .setup_arch = xes_mpc85xx_setup_arch,
246 .init_IRQ = xes_mpc85xx_pic_init,
247#ifdef CONFIG_PCI
248 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
249#endif
250 .get_irq = mpic_get_irq,
251 .restart = fsl_rstcr_restart,
252 .calibrate_decr = generic_calibrate_decr,
253 .progress = udbg_progress,
254};
255
256define_machine(xes_mpc8548) {
257 .name = "X-ES MPC8548",
258 .probe = xes_mpc8548_probe,
259 .setup_arch = xes_mpc85xx_setup_arch,
260 .init_IRQ = xes_mpc85xx_pic_init,
261#ifdef CONFIG_PCI
262 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
263#endif
264 .get_irq = mpic_get_irq,
265 .restart = fsl_rstcr_restart,
266 .calibrate_decr = generic_calibrate_decr,
267 .progress = udbg_progress,
268};
269
270define_machine(xes_mpc8540) {
271 .name = "X-ES MPC8540",
272 .probe = xes_mpc8540_probe,
273 .setup_arch = xes_mpc85xx_setup_arch,
274 .init_IRQ = xes_mpc85xx_pic_init,
275#ifdef CONFIG_PCI
276 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
277#endif
278 .get_irq = mpic_get_irq,
279 .restart = fsl_rstcr_restart,
280 .calibrate_decr = generic_calibrate_decr,
281 .progress = udbg_progress,
282};
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index fdaf4ddaa955..9c7b64a3402b 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -15,6 +15,7 @@ config MPC8641_HPCN
15 select DEFAULT_UIMAGE 15 select DEFAULT_UIMAGE
16 select FSL_ULI1575 16 select FSL_ULI1575
17 select HAS_RAPIDIO 17 select HAS_RAPIDIO
18 select SWIOTLB
18 help 19 help
19 This option enables support for the MPC8641 HPCN board. 20 This option enables support for the MPC8641 HPCN board.
20 21
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 51eec0cd5519..627908a4cd77 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -37,6 +37,7 @@
37#include <linux/of_platform.h> 37#include <linux/of_platform.h>
38#include <sysdev/fsl_pci.h> 38#include <sysdev/fsl_pci.h>
39#include <sysdev/fsl_soc.h> 39#include <sysdev/fsl_soc.h>
40#include <sysdev/simple_gpio.h>
40 41
41#include "mpc86xx.h" 42#include "mpc86xx.h"
42 43
@@ -51,6 +52,9 @@ static struct of_device_id __initdata mpc8610_ids[] = {
51 52
52static int __init mpc8610_declare_of_platform_devices(void) 53static int __init mpc8610_declare_of_platform_devices(void)
53{ 54{
55 /* Firstly, register PIXIS GPIOs. */
56 simple_gpiochip_init("fsl,fpga-pixis-gpio-bank");
57
54 /* Without this call, the SSI device driver won't get probed. */ 58 /* Without this call, the SSI device driver won't get probed. */
55 of_platform_bus_probe(NULL, mpc8610_ids, NULL); 59 of_platform_bus_probe(NULL, mpc8610_ids, NULL);
56 60
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 7e9e83c04a8a..66327024a6a6 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -19,6 +19,7 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/of_platform.h> 21#include <linux/of_platform.h>
22#include <linux/lmb.h>
22 23
23#include <asm/system.h> 24#include <asm/system.h>
24#include <asm/time.h> 25#include <asm/time.h>
@@ -27,6 +28,7 @@
27#include <asm/prom.h> 28#include <asm/prom.h>
28#include <mm/mmu_decl.h> 29#include <mm/mmu_decl.h>
29#include <asm/udbg.h> 30#include <asm/udbg.h>
31#include <asm/swiotlb.h>
30 32
31#include <asm/mpic.h> 33#include <asm/mpic.h>
32 34
@@ -70,7 +72,9 @@ mpc86xx_hpcn_setup_arch(void)
70{ 72{
71#ifdef CONFIG_PCI 73#ifdef CONFIG_PCI
72 struct device_node *np; 74 struct device_node *np;
75 struct pci_controller *hose;
73#endif 76#endif
77 dma_addr_t max = 0xffffffff;
74 78
75 if (ppc_md.progress) 79 if (ppc_md.progress)
76 ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); 80 ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0);
@@ -83,6 +87,9 @@ mpc86xx_hpcn_setup_arch(void)
83 fsl_add_bridge(np, 1); 87 fsl_add_bridge(np, 1);
84 else 88 else
85 fsl_add_bridge(np, 0); 89 fsl_add_bridge(np, 0);
90 hose = pci_find_hose_for_OF_device(np);
91 max = min(max, hose->dma_window_base_cur +
92 hose->dma_window_size);
86 } 93 }
87 94
88 ppc_md.pci_exclude_device = mpc86xx_exclude_device; 95 ppc_md.pci_exclude_device = mpc86xx_exclude_device;
@@ -94,6 +101,13 @@ mpc86xx_hpcn_setup_arch(void)
94#ifdef CONFIG_SMP 101#ifdef CONFIG_SMP
95 mpc86xx_smp_init(); 102 mpc86xx_smp_init();
96#endif 103#endif
104
105#ifdef CONFIG_SWIOTLB
106 if (lmb_end_of_DRAM() > max) {
107 ppc_swiotlb_enable = 1;
108 set_pci_dma_ops(&swiotlb_pci_dma_ops);
109 }
110#endif
97} 111}
98 112
99 113
@@ -158,6 +172,7 @@ static int __init declare_of_platform_devices(void)
158 return 0; 172 return 0;
159} 173}
160machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices); 174machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices);
175machine_arch_initcall(mpc86xx_hpcn, swiotlb_setup_bus_notifier);
161 176
162define_machine(mpc86xx_hpcn) { 177define_machine(mpc86xx_hpcn) {
163 .name = "MPC86xx HPCN", 178 .name = "MPC86xx HPCN",
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index cca6b4fc719a..c4192542b809 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -21,7 +21,7 @@ choice
21 21
22 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx. 22 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
23 23
24config PPC_BOOK3S 24config PPC_BOOK3S_32
25 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx" 25 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx"
26 select PPC_FPU 26 select PPC_FPU
27 27
@@ -57,11 +57,14 @@ config E200
57 57
58endchoice 58endchoice
59 59
60config PPC_BOOK3S 60config PPC_BOOK3S_64
61 default y 61 def_bool y
62 depends on PPC64 62 depends on PPC64
63 select PPC_FPU 63 select PPC_FPU
64 64
65config PPC_BOOK3S
66 def_bool y
67 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
65 68
66config POWER4_ONLY 69config POWER4_ONLY
67 bool "Optimize for POWER4" 70 bool "Optimize for POWER4"
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index f7419198e635..a6812ee00100 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -1,4 +1,6 @@
1 1
2subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
3
2obj-$(CONFIG_FSL_ULI1575) += fsl_uli1575.o 4obj-$(CONFIG_FSL_ULI1575) += fsl_uli1575.o
3 5
4obj-$(CONFIG_PPC_PMAC) += powermac/ 6obj-$(CONFIG_PPC_PMAC) += powermac/
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index bfd60e4accee..0636a3df6978 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -335,3 +335,62 @@ define_machine(maple) {
335 .progress = maple_progress, 335 .progress = maple_progress,
336 .power_save = power4_idle, 336 .power_save = power4_idle,
337}; 337};
338
339#ifdef CONFIG_EDAC
340/*
341 * Register a platform device for CPC925 memory controller on
342 * Motorola ATCA-6101 blade.
343 */
344#define MAPLE_CPC925_MODEL "Motorola,ATCA-6101"
345static int __init maple_cpc925_edac_setup(void)
346{
347 struct platform_device *pdev;
348 struct device_node *np = NULL;
349 struct resource r;
350 const unsigned char *model;
351 int ret;
352
353 np = of_find_node_by_path("/");
354 if (!np) {
355 printk(KERN_ERR "%s: Unable to get root node\n", __func__);
356 return -ENODEV;
357 }
358
359 model = (const unsigned char *)of_get_property(np, "model", NULL);
360 if (!model) {
361 printk(KERN_ERR "%s: Unabel to get model info\n", __func__);
362 return -ENODEV;
363 }
364
365 ret = strcmp(model, MAPLE_CPC925_MODEL);
366 of_node_put(np);
367
368 if (ret != 0)
369 return 0;
370
371 np = of_find_node_by_type(NULL, "memory-controller");
372 if (!np) {
373 printk(KERN_ERR "%s: Unable to find memory-controller node\n",
374 __func__);
375 return -ENODEV;
376 }
377
378 ret = of_address_to_resource(np, 0, &r);
379 of_node_put(np);
380
381 if (ret < 0) {
382 printk(KERN_ERR "%s: Unable to get memory-controller reg\n",
383 __func__);
384 return -ENODEV;
385 }
386
387 pdev = platform_device_register_simple("cpc925_edac", 0, &r, 1);
388 if (IS_ERR(pdev))
389 return PTR_ERR(pdev);
390
391 printk(KERN_INFO "%s: CPC925 platform device created\n", __func__);
392
393 return 0;
394}
395machine_device_initcall(maple, maple_cpc925_edac_setup);
396#endif
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 2d1c87dd5d14..9d4b17462f13 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -1,3 +1,5 @@
1subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
2
1ifeq ($(CONFIG_PPC64),y) 3ifeq ($(CONFIG_PPC64),y)
2EXTRA_CFLAGS += -mno-minimal-toc 4EXTRA_CFLAGS += -mno-minimal-toc
3endif 5endif
@@ -48,6 +50,9 @@ obj-$(CONFIG_PPC_DCR) += dcr.o
48obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o 50obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o
49obj-$(CONFIG_UCODE_PATCH) += micropatch.o 51obj-$(CONFIG_UCODE_PATCH) += micropatch.o
50 52
53obj-$(CONFIG_PPC_MPC512x) += mpc5xxx_clocks.o
54obj-$(CONFIG_PPC_MPC52xx) += mpc5xxx_clocks.o
55
51ifeq ($(CONFIG_SUSPEND),y) 56ifeq ($(CONFIG_SUSPEND),y)
52obj-$(CONFIG_6xx) += 6xx-suspend.o 57obj-$(CONFIG_6xx) += 6xx-suspend.o
53endif 58endif
diff --git a/arch/powerpc/sysdev/mpc5xxx_clocks.c b/arch/powerpc/sysdev/mpc5xxx_clocks.c
new file mode 100644
index 000000000000..34e12f9995fe
--- /dev/null
+++ b/arch/powerpc/sysdev/mpc5xxx_clocks.c
@@ -0,0 +1,33 @@
1/**
2 * mpc5xxx_get_bus_frequency - Find the bus frequency for a device
3 * @node: device node
4 *
5 * Returns bus frequency (IPS on MPC512x, IPB on MPC52xx),
6 * or 0 if the bus frequency cannot be found.
7 */
8
9#include <linux/kernel.h>
10#include <linux/of_platform.h>
11
12unsigned int
13mpc5xxx_get_bus_frequency(struct device_node *node)
14{
15 struct device_node *np;
16 const unsigned int *p_bus_freq = NULL;
17
18 of_node_get(node);
19 while (node) {
20 p_bus_freq = of_get_property(node, "bus-frequency", NULL);
21 if (p_bus_freq)
22 break;
23
24 np = of_get_parent(node);
25 of_node_put(node);
26 node = np;
27 }
28 if (node)
29 of_node_put(node);
30
31 return p_bus_freq ? *p_bus_freq : 0;
32}
33EXPORT_SYMBOL(mpc5xxx_get_bus_frequency);
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile
index 9cb03b71b9d6..85ab97ab840a 100644
--- a/arch/powerpc/xmon/Makefile
+++ b/arch/powerpc/xmon/Makefile
@@ -1,5 +1,7 @@
1# Makefile for xmon 1# Makefile for xmon
2 2
3subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
4
3ifdef CONFIG_PPC64 5ifdef CONFIG_PPC64
4EXTRA_CFLAGS += -mno-minimal-toc 6EXTRA_CFLAGS += -mno-minimal-toc
5endif 7endif
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 002c70d3cb75..9ab188d67a3d 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -461,9 +461,6 @@ asmlinkage long sys32_execve(void)
461 result = rc; 461 result = rc;
462 goto out_putname; 462 goto out_putname;
463 } 463 }
464 task_lock(current);
465 current->ptrace &= ~PT_DTRACE;
466 task_unlock(current);
467 current->thread.fp_regs.fpc=0; 464 current->thread.fp_regs.fpc=0;
468 asm volatile("sfpc %0,0" : : "d" (0)); 465 asm volatile("sfpc %0,0" : : "d" (0));
469 result = regs->gprs[2]; 466 result = regs->gprs[2];
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 355f7a30c3f1..5a43f27eec13 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -266,9 +266,6 @@ SYSCALL_DEFINE0(vfork)
266 266
267asmlinkage void execve_tail(void) 267asmlinkage void execve_tail(void)
268{ 268{
269 task_lock(current);
270 current->ptrace &= ~PT_DTRACE;
271 task_unlock(current);
272 current->thread.fp_regs.fpc = 0; 269 current->thread.fp_regs.fpc = 0;
273 if (MACHINE_HAS_IEEE) 270 if (MACHINE_HAS_IEEE)
274 asm volatile("sfpc %0,%0" : : "d" (0)); 271 asm volatile("sfpc %0,%0" : : "d" (0));
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 586cd045e2db..ac1c620d1c7d 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -15,7 +15,9 @@ config SUPERH
15 select HAVE_IOREMAP_PROT if MMU 15 select HAVE_IOREMAP_PROT if MMU
16 select HAVE_ARCH_TRACEHOOK 16 select HAVE_ARCH_TRACEHOOK
17 select HAVE_DMA_API_DEBUG 17 select HAVE_DMA_API_DEBUG
18 select HAVE_PERF_COUNTER
18 select RTC_LIB 19 select RTC_LIB
20 select GENERIC_ATOMIC64
19 help 21 help
20 The SuperH is a RISC processor targeted for use in embedded systems 22 The SuperH is a RISC processor targeted for use in embedded systems
21 and consumer electronics; it was also used in the Sega Dreamcast 23 and consumer electronics; it was also used in the Sega Dreamcast
@@ -50,6 +52,10 @@ config GENERIC_BUG
50 def_bool y 52 def_bool y
51 depends on BUG && SUPERH32 53 depends on BUG && SUPERH32
52 54
55config GENERIC_CSUM
56 def_bool y
57 depends on SUPERH64
58
53config GENERIC_FIND_NEXT_BIT 59config GENERIC_FIND_NEXT_BIT
54 def_bool y 60 def_bool y
55 61
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 8179cc9be9a4..8ece0b5bd028 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -39,6 +39,7 @@ config EARLY_SCIF_CONSOLE_PORT
39 CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \ 39 CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
40 CPU_SUBTYPE_SH7343 40 CPU_SUBTYPE_SH7343
41 default "0xffea0000" if CPU_SUBTYPE_SH7785 41 default "0xffea0000" if CPU_SUBTYPE_SH7785
42 default "0xffeb0000" if CPU_SUBTYPE_SH7786
42 default "0xfffe8000" if CPU_SUBTYPE_SH7203 43 default "0xfffe8000" if CPU_SUBTYPE_SH7203
43 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263 44 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
44 default "0xffe80000" if CPU_SH4 45 default "0xffe80000" if CPU_SH4
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index 1c91b1f565d5..2b1af0eefa6a 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -175,6 +175,7 @@ config SH_URQUELL
175 bool "Urquell" 175 bool "Urquell"
176 depends on CPU_SUBTYPE_SH7786 176 depends on CPU_SUBTYPE_SH7786
177 select ARCH_REQUIRE_GPIOLIB 177 select ARCH_REQUIRE_GPIOLIB
178 select SYS_SUPPORTS_PCI
178 179
179config SH_MIGOR 180config SH_MIGOR
180 bool "Migo-R" 181 bool "Migo-R"
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 1c4d83ef2a47..7ffd1b4315bd 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -349,15 +349,6 @@ static int ov7725_power(struct device *dev, int mode)
349 return 0; 349 return 0;
350} 350}
351 351
352static struct ov772x_camera_info ov7725_info = {
353 .buswidth = SOCAM_DATAWIDTH_8,
354 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
355 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
356 .link = {
357 .power = ov7725_power,
358 },
359};
360
361static struct sh_mobile_ceu_info sh_mobile_ceu_info = { 352static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
362 .flags = SH_CEU_FLAG_USE_8BIT_BUS, 353 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
363}; 354};
@@ -402,25 +393,48 @@ static struct platform_device sdcard_cn3_device = {
402 }, 393 },
403}; 394};
404 395
405static struct platform_device *ap325rxa_devices[] __initdata = {
406 &smsc9118_device,
407 &ap325rxa_nor_flash_device,
408 &lcdc_device,
409 &ceu_device,
410 &nand_flash_device,
411 &sdcard_cn3_device,
412};
413
414static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { 396static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
415 { 397 {
416 I2C_BOARD_INFO("pcf8563", 0x51), 398 I2C_BOARD_INFO("pcf8563", 0x51),
417 }, 399 },
400};
401
402static struct i2c_board_info ap325rxa_i2c_camera[] = {
418 { 403 {
419 I2C_BOARD_INFO("ov772x", 0x21), 404 I2C_BOARD_INFO("ov772x", 0x21),
420 .platform_data = &ov7725_info,
421 }, 405 },
422}; 406};
423 407
408static struct ov772x_camera_info ov7725_info = {
409 .buswidth = SOCAM_DATAWIDTH_8,
410 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
411 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
412 .link = {
413 .power = ov7725_power,
414 .board_info = &ap325rxa_i2c_camera[0],
415 .i2c_adapter_id = 0,
416 .module_name = "ov772x",
417 },
418};
419
420static struct platform_device ap325rxa_camera = {
421 .name = "soc-camera-pdrv",
422 .id = 0,
423 .dev = {
424 .platform_data = &ov7725_info.link,
425 },
426};
427
428static struct platform_device *ap325rxa_devices[] __initdata = {
429 &smsc9118_device,
430 &ap325rxa_nor_flash_device,
431 &lcdc_device,
432 &ceu_device,
433 &nand_flash_device,
434 &sdcard_cn3_device,
435 &ap325rxa_camera,
436};
437
424static struct spi_board_info ap325rxa_spi_devices[] = { 438static struct spi_board_info ap325rxa_spi_devices[] = {
425 { 439 {
426 .modalias = "mmc_spi", 440 .modalias = "mmc_spi",
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index 7be56fb06c1f..42410a15d255 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -15,16 +15,18 @@
15#include <linux/fb.h> 15#include <linux/fb.h>
16#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/interrupt.h>
18#include <linux/i2c.h> 19#include <linux/i2c.h>
19#include <linux/i2c-pca-platform.h> 20#include <linux/i2c-pca-platform.h>
20#include <linux/i2c-algo-pca.h> 21#include <linux/i2c-algo-pca.h>
22#include <linux/usb/r8a66597.h>
21#include <linux/irq.h> 23#include <linux/irq.h>
22#include <linux/clk.h> 24#include <linux/clk.h>
23#include <linux/errno.h> 25#include <linux/errno.h>
24#include <mach/sh7785lcr.h> 26#include <mach/sh7785lcr.h>
27#include <cpu/sh7785.h>
25#include <asm/heartbeat.h> 28#include <asm/heartbeat.h>
26#include <asm/clock.h> 29#include <asm/clock.h>
27#include <cpu/sh7785.h>
28 30
29/* 31/*
30 * NOTE: This board has 2 physical memory maps. 32 * NOTE: This board has 2 physical memory maps.
@@ -98,18 +100,21 @@ static struct platform_device nor_flash_device = {
98 .resource = nor_flash_resources, 100 .resource = nor_flash_resources,
99}; 101};
100 102
103static struct r8a66597_platdata r8a66597_data = {
104 .xtal = R8A66597_PLATDATA_XTAL_12MHZ,
105 .vif = 1,
106};
107
101static struct resource r8a66597_usb_host_resources[] = { 108static struct resource r8a66597_usb_host_resources[] = {
102 [0] = { 109 [0] = {
103 .name = "r8a66597_hcd",
104 .start = R8A66597_ADDR, 110 .start = R8A66597_ADDR,
105 .end = R8A66597_ADDR + R8A66597_SIZE - 1, 111 .end = R8A66597_ADDR + R8A66597_SIZE - 1,
106 .flags = IORESOURCE_MEM, 112 .flags = IORESOURCE_MEM,
107 }, 113 },
108 [1] = { 114 [1] = {
109 .name = "r8a66597_hcd",
110 .start = 2, 115 .start = 2,
111 .end = 2, 116 .end = 2,
112 .flags = IORESOURCE_IRQ, 117 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
113 }, 118 },
114}; 119};
115 120
@@ -119,6 +124,7 @@ static struct platform_device r8a66597_usb_host_device = {
119 .dev = { 124 .dev = {
120 .dma_mask = NULL, 125 .dma_mask = NULL,
121 .coherent_dma_mask = 0xffffffff, 126 .coherent_dma_mask = 0xffffffff,
127 .platform_data = &r8a66597_data,
122 }, 128 },
123 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), 129 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources),
124 .resource = r8a66597_usb_host_resources, 130 .resource = r8a66597_usb_host_resources,
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c
index beb88c4da2c1..36b8bac9b124 100644
--- a/arch/sh/boards/board-urquell.c
+++ b/arch/sh/boards/board-urquell.c
@@ -2,6 +2,7 @@
2 * Renesas Technology Corp. SH7786 Urquell Support. 2 * Renesas Technology Corp. SH7786 Urquell Support.
3 * 3 *
4 * Copyright (C) 2008 Kuninori Morimoto <morimoto.kuninori@renesas.com> 4 * Copyright (C) 2008 Kuninori Morimoto <morimoto.kuninori@renesas.com>
5 * Copyright (C) 2009 Paul Mundt
5 * 6 *
6 * Based on board-sh7785lcr.c 7 * Based on board-sh7785lcr.c
7 * Copyright (C) 2008 Yoshihiro Shimoda 8 * Copyright (C) 2008 Yoshihiro Shimoda
@@ -178,6 +179,11 @@ static void __init urquell_init_irq(void)
178 plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK); 179 plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK);
179} 180}
180 181
182static int urquell_mode_pins(void)
183{
184 return __raw_readw(UBOARDREG(MDSWMR));
185}
186
181/* Initialize the board */ 187/* Initialize the board */
182static void __init urquell_setup(char **cmdline_p) 188static void __init urquell_setup(char **cmdline_p)
183{ 189{
@@ -193,4 +199,5 @@ static struct sh_machine_vector mv_urquell __initmv = {
193 .mv_name = "Urquell", 199 .mv_name = "Urquell",
194 .mv_setup = urquell_setup, 200 .mv_setup = urquell_setup,
195 .mv_init_irq = urquell_init_irq, 201 .mv_init_irq = urquell_init_irq,
202 .mv_mode_pins = urquell_mode_pins,
196}; 203};
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index 20fe72c515d5..1639f8915000 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -17,8 +17,11 @@
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/ata_platform.h> 18#include <linux/ata_platform.h>
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/mtd/physmap.h>
20#include <linux/i2c.h> 21#include <linux/i2c.h>
21#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/interrupt.h>
24#include <linux/usb/r8a66597.h>
22#include <net/ax88796.h> 25#include <net/ax88796.h>
23#include <asm/machvec.h> 26#include <asm/machvec.h>
24#include <mach/highlander.h> 27#include <mach/highlander.h>
@@ -27,18 +30,21 @@
27#include <asm/io.h> 30#include <asm/io.h>
28#include <asm/io_trapped.h> 31#include <asm/io_trapped.h>
29 32
33static struct r8a66597_platdata r8a66597_data = {
34 .xtal = R8A66597_PLATDATA_XTAL_12MHZ,
35 .vif = 1,
36};
37
30static struct resource r8a66597_usb_host_resources[] = { 38static struct resource r8a66597_usb_host_resources[] = {
31 [0] = { 39 [0] = {
32 .name = "r8a66597_hcd",
33 .start = 0xA4200000, 40 .start = 0xA4200000,
34 .end = 0xA42000FF, 41 .end = 0xA42000FF,
35 .flags = IORESOURCE_MEM, 42 .flags = IORESOURCE_MEM,
36 }, 43 },
37 [1] = { 44 [1] = {
38 .name = "r8a66597_hcd",
39 .start = IRQ_EXT1, /* irq number */ 45 .start = IRQ_EXT1, /* irq number */
40 .end = IRQ_EXT1, 46 .end = IRQ_EXT1,
41 .flags = IORESOURCE_IRQ, 47 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
42 }, 48 },
43}; 49};
44 50
@@ -48,6 +54,7 @@ static struct platform_device r8a66597_usb_host_device = {
48 .dev = { 54 .dev = {
49 .dma_mask = NULL, /* don't use dma */ 55 .dma_mask = NULL, /* don't use dma */
50 .coherent_dma_mask = 0xffffffff, 56 .coherent_dma_mask = 0xffffffff,
57 .platform_data = &r8a66597_data,
51 }, 58 },
52 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), 59 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources),
53 .resource = r8a66597_usb_host_resources, 60 .resource = r8a66597_usb_host_resources,
@@ -178,6 +185,53 @@ static struct platform_device ax88796_device = {
178 .resource = ax88796_resources, 185 .resource = ax88796_resources,
179}; 186};
180 187
188static struct mtd_partition nor_flash_partitions[] = {
189 {
190 .name = "loader",
191 .offset = 0x00000000,
192 .size = 512 * 1024,
193 },
194 {
195 .name = "bootenv",
196 .offset = MTDPART_OFS_APPEND,
197 .size = 512 * 1024,
198 },
199 {
200 .name = "kernel",
201 .offset = MTDPART_OFS_APPEND,
202 .size = 4 * 1024 * 1024,
203 },
204 {
205 .name = "data",
206 .offset = MTDPART_OFS_APPEND,
207 .size = MTDPART_SIZ_FULL,
208 },
209};
210
211static struct physmap_flash_data nor_flash_data = {
212 .width = 4,
213 .parts = nor_flash_partitions,
214 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
215};
216
217/* This config is flash board for mass production. */
218static struct resource nor_flash_resources[] = {
219 [0] = {
220 .start = PA_NORFLASH_ADDR,
221 .end = PA_NORFLASH_ADDR + PA_NORFLASH_SIZE - 1,
222 .flags = IORESOURCE_MEM,
223 }
224};
225
226static struct platform_device nor_flash_device = {
227 .name = "physmap-flash",
228 .dev = {
229 .platform_data = &nor_flash_data,
230 },
231 .num_resources = ARRAY_SIZE(nor_flash_resources),
232 .resource = nor_flash_resources,
233};
234
181static struct resource smbus_resources[] = { 235static struct resource smbus_resources[] = {
182 [0] = { 236 [0] = {
183 .start = PA_SMCR, 237 .start = PA_SMCR,
@@ -209,6 +263,7 @@ static struct platform_device *r7780rp_devices[] __initdata = {
209 &m66592_usb_peripheral_device, 263 &m66592_usb_peripheral_device,
210 &heartbeat_device, 264 &heartbeat_device,
211 &smbus_device, 265 &smbus_device,
266 &nor_flash_device,
212#ifndef CONFIG_SH_R7780RP 267#ifndef CONFIG_SH_R7780RP
213 &ax88796_device, 268 &ax88796_device,
214#endif 269#endif
@@ -247,9 +302,10 @@ device_initcall(r7780rp_devices_setup);
247/* 302/*
248 * Platform specific clocks 303 * Platform specific clocks
249 */ 304 */
250static void ivdr_clk_enable(struct clk *clk) 305static int ivdr_clk_enable(struct clk *clk)
251{ 306{
252 ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL); 307 ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL);
308 return 0;
253} 309}
254 310
255static void ivdr_clk_disable(struct clk *clk) 311static void ivdr_clk_disable(struct clk *clk)
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 6ed401cd3156..f70f4644deb4 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -381,21 +381,6 @@ static struct platform_device migor_ceu_device = {
381 }, 381 },
382}; 382};
383 383
384static struct ov772x_camera_info ov7725_info = {
385 .buswidth = SOCAM_DATAWIDTH_8,
386 .link = {
387 .power = ov7725_power,
388 },
389};
390
391static struct tw9910_video_info tw9910_info = {
392 .buswidth = SOCAM_DATAWIDTH_8,
393 .mpout = TW9910_MPO_FIELD,
394 .link = {
395 .power = tw9910_power,
396 }
397};
398
399struct spi_gpio_platform_data sdcard_cn9_platform_data = { 384struct spi_gpio_platform_data sdcard_cn9_platform_data = {
400 .sck = GPIO_PTD0, 385 .sck = GPIO_PTD0,
401 .mosi = GPIO_PTD1, 386 .mosi = GPIO_PTD1,
@@ -410,16 +395,6 @@ static struct platform_device sdcard_cn9_device = {
410 }, 395 },
411}; 396};
412 397
413static struct platform_device *migor_devices[] __initdata = {
414 &smc91x_eth_device,
415 &sh_keysc_device,
416 &migor_lcdc_device,
417 &migor_ceu_device,
418 &migor_nor_flash_device,
419 &migor_nand_flash_device,
420 &sdcard_cn9_device,
421};
422
423static struct i2c_board_info migor_i2c_devices[] = { 398static struct i2c_board_info migor_i2c_devices[] = {
424 { 399 {
425 I2C_BOARD_INFO("rs5c372b", 0x32), 400 I2C_BOARD_INFO("rs5c372b", 0x32),
@@ -428,16 +403,66 @@ static struct i2c_board_info migor_i2c_devices[] = {
428 I2C_BOARD_INFO("migor_ts", 0x51), 403 I2C_BOARD_INFO("migor_ts", 0x51),
429 .irq = 38, /* IRQ6 */ 404 .irq = 38, /* IRQ6 */
430 }, 405 },
406};
407
408static struct i2c_board_info migor_i2c_camera[] = {
431 { 409 {
432 I2C_BOARD_INFO("ov772x", 0x21), 410 I2C_BOARD_INFO("ov772x", 0x21),
433 .platform_data = &ov7725_info,
434 }, 411 },
435 { 412 {
436 I2C_BOARD_INFO("tw9910", 0x45), 413 I2C_BOARD_INFO("tw9910", 0x45),
437 .platform_data = &tw9910_info,
438 }, 414 },
439}; 415};
440 416
417static struct ov772x_camera_info ov7725_info = {
418 .buswidth = SOCAM_DATAWIDTH_8,
419 .link = {
420 .power = ov7725_power,
421 .board_info = &migor_i2c_camera[0],
422 .i2c_adapter_id = 0,
423 .module_name = "ov772x",
424 },
425};
426
427static struct tw9910_video_info tw9910_info = {
428 .buswidth = SOCAM_DATAWIDTH_8,
429 .mpout = TW9910_MPO_FIELD,
430 .link = {
431 .power = tw9910_power,
432 .board_info = &migor_i2c_camera[1],
433 .i2c_adapter_id = 0,
434 .module_name = "tw9910",
435 }
436};
437
438static struct platform_device migor_camera[] = {
439 {
440 .name = "soc-camera-pdrv",
441 .id = 0,
442 .dev = {
443 .platform_data = &ov7725_info.link,
444 },
445 }, {
446 .name = "soc-camera-pdrv",
447 .id = 1,
448 .dev = {
449 .platform_data = &tw9910_info.link,
450 },
451 },
452};
453
454static struct platform_device *migor_devices[] __initdata = {
455 &smc91x_eth_device,
456 &sh_keysc_device,
457 &migor_lcdc_device,
458 &migor_ceu_device,
459 &migor_nor_flash_device,
460 &migor_nand_flash_device,
461 &sdcard_cn9_device,
462 &migor_camera[0],
463 &migor_camera[1],
464};
465
441static struct spi_board_info migor_spi_devices[] = { 466static struct spi_board_info migor_spi_devices[] = {
442 { 467 {
443 .modalias = "mmc_spi", 468 .modalias = "mmc_spi",
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c
index d8a65ea91665..4af3a771c058 100644
--- a/arch/sh/boards/mach-rsk/devices-rsk7203.c
+++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c
@@ -26,13 +26,13 @@ static struct smsc911x_platform_config smsc911x_config = {
26 .phy_interface = PHY_INTERFACE_MODE_MII, 26 .phy_interface = PHY_INTERFACE_MODE_MII,
27 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 27 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
28 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, 28 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
29 .flags = SMSC911X_USE_16BIT, 29 .flags = SMSC911X_USE_32BIT | SMSC911X_SWAP_FIFO,
30}; 30};
31 31
32static struct resource smsc911x_resources[] = { 32static struct resource smsc911x_resources[] = {
33 [0] = { 33 [0] = {
34 .start = 0x24000000, 34 .start = 0x24000000,
35 .end = 0x24000000 + 0x100, 35 .end = 0x240000ff,
36 .flags = IORESOURCE_MEM, 36 .flags = IORESOURCE_MEM,
37 }, 37 },
38 [1] = { 38 [1] = {
@@ -99,6 +99,10 @@ static int __init rsk7203_devices_setup(void)
99 gpio_request(GPIO_FN_TXD0, NULL); 99 gpio_request(GPIO_FN_TXD0, NULL);
100 gpio_request(GPIO_FN_RXD0, NULL); 100 gpio_request(GPIO_FN_RXD0, NULL);
101 101
102 /* Setup LAN9118: CS1 in 16-bit Big Endian Mode, IRQ0 at Port B */
103 ctrl_outl(0x36db0400, 0xfffc0008); /* CS1BCR */
104 gpio_request(GPIO_FN_IRQ0_PB, NULL);
105
102 return platform_add_devices(rsk7203_devices, 106 return platform_add_devices(rsk7203_devices,
103 ARRAY_SIZE(rsk7203_devices)); 107 ARRAY_SIZE(rsk7203_devices));
104} 108}
diff --git a/arch/sh/boards/mach-se/7780/irq.c b/arch/sh/boards/mach-se/7780/irq.c
index b8d43b638fcf..121744c08714 100644
--- a/arch/sh/boards/mach-se/7780/irq.c
+++ b/arch/sh/boards/mach-se/7780/irq.c
@@ -12,7 +12,6 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/io.h> 15#include <linux/io.h>
17#include <mach-se/mach/se7780.h> 16#include <mach-se/mach/se7780.h>
18 17
diff --git a/arch/sh/boards/mach-x3proto/setup.c b/arch/sh/boards/mach-x3proto/setup.c
index a340492087fa..8913ae39a802 100644
--- a/arch/sh/boards/mach-x3proto/setup.c
+++ b/arch/sh/boards/mach-x3proto/setup.c
@@ -15,6 +15,8 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/smc91x.h> 16#include <linux/smc91x.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/interrupt.h>
19#include <linux/usb/r8a66597.h>
18#include <asm/ilsel.h> 20#include <asm/ilsel.h>
19 21
20static struct resource heartbeat_resources[] = { 22static struct resource heartbeat_resources[] = {
@@ -58,17 +60,20 @@ static struct platform_device smc91x_device = {
58 }, 60 },
59}; 61};
60 62
63static struct r8a66597_platdata r8a66597_data = {
64 .xtal = R8A66597_PLATDATA_XTAL_12MHZ,
65 .vif = 1,
66};
67
61static struct resource r8a66597_usb_host_resources[] = { 68static struct resource r8a66597_usb_host_resources[] = {
62 [0] = { 69 [0] = {
63 .name = "r8a66597_hcd",
64 .start = 0x18040000, 70 .start = 0x18040000,
65 .end = 0x18080000 - 1, 71 .end = 0x18080000 - 1,
66 .flags = IORESOURCE_MEM, 72 .flags = IORESOURCE_MEM,
67 }, 73 },
68 [1] = { 74 [1] = {
69 .name = "r8a66597_hcd",
70 /* Filled in by ilsel */ 75 /* Filled in by ilsel */
71 .flags = IORESOURCE_IRQ, 76 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
72 }, 77 },
73}; 78};
74 79
@@ -78,6 +83,7 @@ static struct platform_device r8a66597_usb_host_device = {
78 .dev = { 83 .dev = {
79 .dma_mask = NULL, /* don't use dma */ 84 .dma_mask = NULL, /* don't use dma */
80 .coherent_dma_mask = 0xffffffff, 85 .coherent_dma_mask = 0xffffffff,
86 .platform_data = &r8a66597_data,
81 }, 87 },
82 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), 88 .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources),
83 .resource = r8a66597_usb_host_resources, 89 .resource = r8a66597_usb_host_resources,
diff --git a/arch/sh/configs/ap325rxa_defconfig b/arch/sh/configs/ap325rxa_defconfig
index 022f70e0ea03..6c38a43594fc 100644
--- a/arch/sh/configs/ap325rxa_defconfig
+++ b/arch/sh/configs/ap325rxa_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:42:06 2009 4# Thu Jun 18 16:04:11 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20CONFIG_ARCH_SUSPEND_POSSIBLE=y 20CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_CMT=y 22CONFIG_SYS_SUPPORTS_CMT=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -75,7 +76,6 @@ CONFIG_EMBEDDED=y
75CONFIG_UID16=y 76CONFIG_UID16=y
76CONFIG_SYSCTL_SYSCALL=y 77CONFIG_SYSCTL_SYSCALL=y
77# CONFIG_KALLSYMS is not set 78# CONFIG_KALLSYMS is not set
78# CONFIG_STRIP_ASM_SYMS is not set
79CONFIG_HOTPLUG=y 79CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y 80CONFIG_PRINTK=y
81CONFIG_BUG=y 81CONFIG_BUG=y
@@ -88,7 +88,12 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 88CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 89CONFIG_SHMEM=y
90CONFIG_AIO=y 90CONFIG_AIO=y
91
92#
93# Performance Counters
94#
91CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
96# CONFIG_STRIP_ASM_SYMS is not set
92CONFIG_COMPAT_BRK=y 97CONFIG_COMPAT_BRK=y
93CONFIG_SLAB=y 98CONFIG_SLAB=y
94# CONFIG_SLUB is not set 99# CONFIG_SLUB is not set
@@ -180,6 +185,7 @@ CONFIG_CPU_SUBTYPE_SH7723=y
180CONFIG_QUICKLIST=y 185CONFIG_QUICKLIST=y
181CONFIG_MMU=y 186CONFIG_MMU=y
182CONFIG_PAGE_OFFSET=0x80000000 187CONFIG_PAGE_OFFSET=0x80000000
188CONFIG_FORCE_MAX_ZONEORDER=11
183CONFIG_MEMORY_START=0x08000000 189CONFIG_MEMORY_START=0x08000000
184CONFIG_MEMORY_SIZE=0x08000000 190CONFIG_MEMORY_SIZE=0x08000000
185CONFIG_29BIT=y 191CONFIG_29BIT=y
@@ -195,7 +201,6 @@ CONFIG_PAGE_SIZE_4KB=y
195# CONFIG_PAGE_SIZE_8KB is not set 201# CONFIG_PAGE_SIZE_8KB is not set
196# CONFIG_PAGE_SIZE_16KB is not set 202# CONFIG_PAGE_SIZE_16KB is not set
197# CONFIG_PAGE_SIZE_64KB is not set 203# CONFIG_PAGE_SIZE_64KB is not set
198CONFIG_ENTRY_OFFSET=0x00001000
199CONFIG_SELECT_MEMORY_MODEL=y 204CONFIG_SELECT_MEMORY_MODEL=y
200CONFIG_FLATMEM_MANUAL=y 205CONFIG_FLATMEM_MANUAL=y
201# CONFIG_DISCONTIGMEM_MANUAL is not set 206# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -208,9 +213,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
208# CONFIG_PHYS_ADDR_T_64BIT is not set 213# CONFIG_PHYS_ADDR_T_64BIT is not set
209CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
211CONFIG_UNEVICTABLE_LRU=y
212CONFIG_HAVE_MLOCK=y 216CONFIG_HAVE_MLOCK=y
213CONFIG_HAVE_MLOCKED_PAGE_BIT=y 217CONFIG_HAVE_MLOCKED_PAGE_BIT=y
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 219
215# 220#
216# Cache configuration 221# Cache configuration
@@ -228,7 +233,6 @@ CONFIG_SH_FPU=y
228# CONFIG_SH_STORE_QUEUES is not set 233# CONFIG_SH_STORE_QUEUES is not set
229CONFIG_CPU_HAS_INTEVT=y 234CONFIG_CPU_HAS_INTEVT=y
230CONFIG_CPU_HAS_SR_RB=y 235CONFIG_CPU_HAS_SR_RB=y
231CONFIG_CPU_HAS_PTEA=y
232CONFIG_CPU_HAS_FPU=y 236CONFIG_CPU_HAS_FPU=y
233 237
234# 238#
@@ -239,10 +243,10 @@ CONFIG_SH_AP325RXA=y
239# 243#
240# Timer and clock configuration 244# Timer and clock configuration
241# 245#
242CONFIG_SH_TMU=y 246CONFIG_SH_TIMER_TMU=y
243# CONFIG_SH_TIMER_CMT is not set 247# CONFIG_SH_TIMER_CMT is not set
244CONFIG_SH_TIMER_IRQ=16
245CONFIG_SH_PCLK_FREQ=33333333 248CONFIG_SH_PCLK_FREQ=33333333
249CONFIG_SH_CLK_CPG=y
246CONFIG_TICK_ONESHOT=y 250CONFIG_TICK_ONESHOT=y
247# CONFIG_NO_HZ is not set 251# CONFIG_NO_HZ is not set
248CONFIG_HIGH_RES_TIMERS=y 252CONFIG_HIGH_RES_TIMERS=y
@@ -284,12 +288,14 @@ CONFIG_SECCOMP=y
284# CONFIG_PREEMPT_VOLUNTARY is not set 288# CONFIG_PREEMPT_VOLUNTARY is not set
285CONFIG_PREEMPT=y 289CONFIG_PREEMPT=y
286CONFIG_GUSA=y 290CONFIG_GUSA=y
291# CONFIG_SPARSE_IRQ is not set
287 292
288# 293#
289# Boot options 294# Boot options
290# 295#
291CONFIG_ZERO_PAGE_OFFSET=0x00001000 296CONFIG_ZERO_PAGE_OFFSET=0x00001000
292CONFIG_BOOT_LINK_OFFSET=0x00800000 297CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000
293CONFIG_CMDLINE_BOOL=y 299CONFIG_CMDLINE_BOOL=y
294CONFIG_CMDLINE="console=tty1 console=ttySC5,38400 root=/dev/nfs ip=dhcp" 300CONFIG_CMDLINE="console=tty1 console=ttySC5,38400 root=/dev/nfs ip=dhcp"
295 301
@@ -372,6 +378,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
372# CONFIG_ECONET is not set 378# CONFIG_ECONET is not set
373# CONFIG_WAN_ROUTER is not set 379# CONFIG_WAN_ROUTER is not set
374# CONFIG_PHONET is not set 380# CONFIG_PHONET is not set
381# CONFIG_IEEE802154 is not set
375# CONFIG_NET_SCHED is not set 382# CONFIG_NET_SCHED is not set
376# CONFIG_DCB is not set 383# CONFIG_DCB is not set
377 384
@@ -389,7 +396,11 @@ CONFIG_WIRELESS=y
389# CONFIG_WIRELESS_OLD_REGULATORY is not set 396# CONFIG_WIRELESS_OLD_REGULATORY is not set
390# CONFIG_WIRELESS_EXT is not set 397# CONFIG_WIRELESS_EXT is not set
391# CONFIG_LIB80211 is not set 398# CONFIG_LIB80211 is not set
392# CONFIG_MAC80211 is not set 399
400#
401# CFG80211 needs to be enabled for MAC80211
402#
403CONFIG_MAC80211_DEFAULT_PS_VALUE=0
393# CONFIG_WIMAX is not set 404# CONFIG_WIMAX is not set
394# CONFIG_RFKILL is not set 405# CONFIG_RFKILL is not set
395# CONFIG_NET_9P is not set 406# CONFIG_NET_9P is not set
@@ -532,6 +543,7 @@ CONFIG_MISC_DEVICES=y
532# CONFIG_EEPROM_AT24 is not set 543# CONFIG_EEPROM_AT24 is not set
533# CONFIG_EEPROM_AT25 is not set 544# CONFIG_EEPROM_AT25 is not set
534# CONFIG_EEPROM_LEGACY is not set 545# CONFIG_EEPROM_LEGACY is not set
546# CONFIG_EEPROM_MAX6875 is not set
535# CONFIG_EEPROM_93CX6 is not set 547# CONFIG_EEPROM_93CX6 is not set
536CONFIG_HAVE_IDE=y 548CONFIG_HAVE_IDE=y
537# CONFIG_IDE is not set 549# CONFIG_IDE is not set
@@ -555,10 +567,6 @@ CONFIG_BLK_DEV_SD=y
555# CONFIG_BLK_DEV_SR is not set 567# CONFIG_BLK_DEV_SR is not set
556# CONFIG_CHR_DEV_SG is not set 568# CONFIG_CHR_DEV_SG is not set
557# CONFIG_CHR_DEV_SCH is not set 569# CONFIG_CHR_DEV_SCH is not set
558
559#
560# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
561#
562# CONFIG_SCSI_MULTI_LUN is not set 570# CONFIG_SCSI_MULTI_LUN is not set
563# CONFIG_SCSI_CONSTANTS is not set 571# CONFIG_SCSI_CONSTANTS is not set
564# CONFIG_SCSI_LOGGING is not set 572# CONFIG_SCSI_LOGGING is not set
@@ -575,6 +583,7 @@ CONFIG_SCSI_WAIT_SCAN=m
575# CONFIG_SCSI_SRP_ATTRS is not set 583# CONFIG_SCSI_SRP_ATTRS is not set
576CONFIG_SCSI_LOWLEVEL=y 584CONFIG_SCSI_LOWLEVEL=y
577# CONFIG_ISCSI_TCP is not set 585# CONFIG_ISCSI_TCP is not set
586# CONFIG_SCSI_BNX2_ISCSI is not set
578# CONFIG_LIBFC is not set 587# CONFIG_LIBFC is not set
579# CONFIG_LIBFCOE is not set 588# CONFIG_LIBFCOE is not set
580# CONFIG_SCSI_DEBUG is not set 589# CONFIG_SCSI_DEBUG is not set
@@ -583,7 +592,6 @@ CONFIG_SCSI_LOWLEVEL=y
583# CONFIG_ATA is not set 592# CONFIG_ATA is not set
584# CONFIG_MD is not set 593# CONFIG_MD is not set
585CONFIG_NETDEVICES=y 594CONFIG_NETDEVICES=y
586CONFIG_COMPAT_NET_DEV_OPS=y
587# CONFIG_DUMMY is not set 595# CONFIG_DUMMY is not set
588# CONFIG_BONDING is not set 596# CONFIG_BONDING is not set
589# CONFIG_MACVLAN is not set 597# CONFIG_MACVLAN is not set
@@ -628,6 +636,7 @@ CONFIG_SMSC911X=y
628# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 636# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
629# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 637# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
630# CONFIG_B44 is not set 638# CONFIG_B44 is not set
639# CONFIG_KS8842 is not set
631# CONFIG_NETDEV_1000 is not set 640# CONFIG_NETDEV_1000 is not set
632# CONFIG_NETDEV_10000 is not set 641# CONFIG_NETDEV_10000 is not set
633 642
@@ -751,7 +760,6 @@ CONFIG_I2C_SH_MOBILE=y
751# CONFIG_SENSORS_PCF8574 is not set 760# CONFIG_SENSORS_PCF8574 is not set
752# CONFIG_PCF8575 is not set 761# CONFIG_PCF8575 is not set
753# CONFIG_SENSORS_PCA9539 is not set 762# CONFIG_SENSORS_PCA9539 is not set
754# CONFIG_SENSORS_MAX6875 is not set
755# CONFIG_SENSORS_TSL2550 is not set 763# CONFIG_SENSORS_TSL2550 is not set
756# CONFIG_I2C_DEBUG_CORE is not set 764# CONFIG_I2C_DEBUG_CORE is not set
757# CONFIG_I2C_DEBUG_ALGO is not set 765# CONFIG_I2C_DEBUG_ALGO is not set
@@ -823,10 +831,7 @@ CONFIG_SSB_POSSIBLE=y
823# CONFIG_MFD_WM8350_I2C is not set 831# CONFIG_MFD_WM8350_I2C is not set
824# CONFIG_MFD_PCF50633 is not set 832# CONFIG_MFD_PCF50633 is not set
825# CONFIG_REGULATOR is not set 833# CONFIG_REGULATOR is not set
826 834CONFIG_MEDIA_SUPPORT=y
827#
828# Multimedia devices
829#
830 835
831# 836#
832# Multimedia core support 837# Multimedia core support
@@ -1017,6 +1022,7 @@ CONFIG_RTC_DRV_PCF8563=y
1017# on-CPU RTC drivers 1022# on-CPU RTC drivers
1018# 1023#
1019# CONFIG_RTC_DRV_SH is not set 1024# CONFIG_RTC_DRV_SH is not set
1025# CONFIG_RTC_DRV_GENERIC is not set
1020# CONFIG_DMADEVICES is not set 1026# CONFIG_DMADEVICES is not set
1021# CONFIG_AUXDISPLAY is not set 1027# CONFIG_AUXDISPLAY is not set
1022CONFIG_UIO=y 1028CONFIG_UIO=y
@@ -1024,6 +1030,10 @@ CONFIG_UIO=y
1024CONFIG_UIO_PDRV_GENIRQ=y 1030CONFIG_UIO_PDRV_GENIRQ=y
1025# CONFIG_UIO_SMX is not set 1031# CONFIG_UIO_SMX is not set
1026# CONFIG_UIO_SERCOS3 is not set 1032# CONFIG_UIO_SERCOS3 is not set
1033
1034#
1035# TI VLYNQ
1036#
1027# CONFIG_STAGING is not set 1037# CONFIG_STAGING is not set
1028 1038
1029# 1039#
@@ -1045,10 +1055,11 @@ CONFIG_FS_MBCACHE=y
1045# CONFIG_REISERFS_FS is not set 1055# CONFIG_REISERFS_FS is not set
1046# CONFIG_JFS_FS is not set 1056# CONFIG_JFS_FS is not set
1047CONFIG_FS_POSIX_ACL=y 1057CONFIG_FS_POSIX_ACL=y
1048CONFIG_FILE_LOCKING=y
1049# CONFIG_XFS_FS is not set 1058# CONFIG_XFS_FS is not set
1050# CONFIG_OCFS2_FS is not set 1059# CONFIG_OCFS2_FS is not set
1051# CONFIG_BTRFS_FS is not set 1060# CONFIG_BTRFS_FS is not set
1061CONFIG_FILE_LOCKING=y
1062CONFIG_FSNOTIFY=y
1052CONFIG_DNOTIFY=y 1063CONFIG_DNOTIFY=y
1053CONFIG_INOTIFY=y 1064CONFIG_INOTIFY=y
1054CONFIG_INOTIFY_USER=y 1065CONFIG_INOTIFY_USER=y
@@ -1204,28 +1215,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1204CONFIG_HAVE_DYNAMIC_FTRACE=y 1215CONFIG_HAVE_DYNAMIC_FTRACE=y
1205CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1216CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1206CONFIG_TRACING_SUPPORT=y 1217CONFIG_TRACING_SUPPORT=y
1207 1218# CONFIG_FTRACE is not set
1208#
1209# Tracers
1210#
1211# CONFIG_FUNCTION_TRACER is not set
1212# CONFIG_IRQSOFF_TRACER is not set
1213# CONFIG_PREEMPT_TRACER is not set
1214# CONFIG_SCHED_TRACER is not set
1215# CONFIG_CONTEXT_SWITCH_TRACER is not set
1216# CONFIG_EVENT_TRACER is not set
1217# CONFIG_BOOT_TRACER is not set
1218# CONFIG_TRACE_BRANCH_PROFILING is not set
1219# CONFIG_STACK_TRACER is not set
1220# CONFIG_KMEMTRACE is not set
1221# CONFIG_WORKQUEUE_TRACER is not set
1222# CONFIG_BLK_DEV_IO_TRACE is not set
1223# CONFIG_DMA_API_DEBUG is not set 1219# CONFIG_DMA_API_DEBUG is not set
1224# CONFIG_SAMPLES is not set 1220# CONFIG_SAMPLES is not set
1225CONFIG_HAVE_ARCH_KGDB=y 1221CONFIG_HAVE_ARCH_KGDB=y
1226# CONFIG_SH_STANDARD_BIOS is not set 1222# CONFIG_SH_STANDARD_BIOS is not set
1227# CONFIG_EARLY_SCIF_CONSOLE is not set 1223# CONFIG_EARLY_SCIF_CONSOLE is not set
1228# CONFIG_MORE_COMPILE_OPTIONS is not set
1229 1224
1230# 1225#
1231# Security options 1226# Security options
@@ -1347,3 +1342,4 @@ CONFIG_HAS_IOMEM=y
1347CONFIG_HAS_IOPORT=y 1342CONFIG_HAS_IOPORT=y
1348CONFIG_HAS_DMA=y 1343CONFIG_HAS_DMA=y
1349CONFIG_NLATTR=y 1344CONFIG_NLATTR=y
1345CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/cayman_defconfig b/arch/sh/configs/cayman_defconfig
index 40301f86a45c..6b863cb1e248 100644
--- a/arch/sh/configs/cayman_defconfig
+++ b/arch/sh/configs/cayman_defconfig
@@ -1,24 +1,26 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:42:53 2009 4# Thu Jun 18 12:21:54 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7# CONFIG_SUPERH32 is not set 7# CONFIG_SUPERH32 is not set
8CONFIG_SUPERH64=y 8CONFIG_SUPERH64=y
9CONFIG_ARCH_DEFCONFIG="arch/sh/configs/cayman_defconfig" 9CONFIG_ARCH_DEFCONFIG="arch/sh/configs/cayman_defconfig"
10CONFIG_RWSEM_GENERIC_SPINLOCK=y 10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11CONFIG_GENERIC_CSUM=y
11CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
14CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
15CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
16# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
17# CONFIG_GENERIC_TIME is not set 18CONFIG_GENERIC_TIME=y
18# CONFIG_GENERIC_CLOCKEVENTS is not set 19CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
21CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -71,7 +73,6 @@ CONFIG_SYSCTL_SYSCALL=y
71CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_ALL is not set 74# CONFIG_KALLSYMS_ALL is not set
73# CONFIG_KALLSYMS_EXTRA_PASS is not set 75# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y 76CONFIG_HOTPLUG=y
76CONFIG_PRINTK=y 77CONFIG_PRINTK=y
77CONFIG_BUG=y 78CONFIG_BUG=y
@@ -84,8 +85,13 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 85CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 86CONFIG_SHMEM=y
86CONFIG_AIO=y 87CONFIG_AIO=y
88
89#
90# Performance Counters
91#
87CONFIG_VM_EVENT_COUNTERS=y 92CONFIG_VM_EVENT_COUNTERS=y
88CONFIG_PCI_QUIRKS=y 93CONFIG_PCI_QUIRKS=y
94# CONFIG_STRIP_ASM_SYMS is not set
89CONFIG_COMPAT_BRK=y 95CONFIG_COMPAT_BRK=y
90CONFIG_SLAB=y 96CONFIG_SLAB=y
91# CONFIG_SLUB is not set 97# CONFIG_SLUB is not set
@@ -140,6 +146,7 @@ CONFIG_CPU_SUBTYPE_SH5_101=y
140CONFIG_QUICKLIST=y 146CONFIG_QUICKLIST=y
141CONFIG_MMU=y 147CONFIG_MMU=y
142CONFIG_PAGE_OFFSET=0x20000000 148CONFIG_PAGE_OFFSET=0x20000000
149CONFIG_FORCE_MAX_ZONEORDER=11
143CONFIG_MEMORY_START=0x80000000 150CONFIG_MEMORY_START=0x80000000
144CONFIG_MEMORY_SIZE=0x00400000 151CONFIG_MEMORY_SIZE=0x00400000
145CONFIG_32BIT=y 152CONFIG_32BIT=y
@@ -153,7 +160,6 @@ CONFIG_PAGE_SIZE_4KB=y
153# CONFIG_PAGE_SIZE_8KB is not set 160# CONFIG_PAGE_SIZE_8KB is not set
154# CONFIG_PAGE_SIZE_16KB is not set 161# CONFIG_PAGE_SIZE_16KB is not set
155# CONFIG_PAGE_SIZE_64KB is not set 162# CONFIG_PAGE_SIZE_64KB is not set
156CONFIG_ENTRY_OFFSET=0x00001000
157CONFIG_HUGETLB_PAGE_SIZE_64K=y 163CONFIG_HUGETLB_PAGE_SIZE_64K=y
158# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 164# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
159# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 165# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -172,9 +178,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
172# CONFIG_PHYS_ADDR_T_64BIT is not set 178# CONFIG_PHYS_ADDR_T_64BIT is not set
173CONFIG_ZONE_DMA_FLAG=0 179CONFIG_ZONE_DMA_FLAG=0
174CONFIG_NR_QUICK=2 180CONFIG_NR_QUICK=2
175CONFIG_UNEVICTABLE_LRU=y
176CONFIG_HAVE_MLOCK=y 181CONFIG_HAVE_MLOCK=y
177CONFIG_HAVE_MLOCKED_PAGE_BIT=y 182CONFIG_HAVE_MLOCKED_PAGE_BIT=y
183CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
178 184
179# 185#
180# Cache configuration 186# Cache configuration
@@ -190,7 +196,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
190# CONFIG_CPU_BIG_ENDIAN is not set 196# CONFIG_CPU_BIG_ENDIAN is not set
191CONFIG_SH_FPU=y 197CONFIG_SH_FPU=y
192# CONFIG_SH64_FPU_DENORM_FLUSH is not set 198# CONFIG_SH64_FPU_DENORM_FLUSH is not set
193CONFIG_SH64_USER_MISALIGNED_FIXUP=y
194CONFIG_SH64_ID2815_WORKAROUND=y 199CONFIG_SH64_ID2815_WORKAROUND=y
195CONFIG_CPU_HAS_FPU=y 200CONFIG_CPU_HAS_FPU=y
196 201
@@ -202,8 +207,13 @@ CONFIG_SH_CAYMAN=y
202# 207#
203# Timer and clock configuration 208# Timer and clock configuration
204# 209#
205CONFIG_SH_TIMER_IRQ=16 210CONFIG_SH_TIMER_TMU=y
206CONFIG_SH_PCLK_FREQ=50000000 211CONFIG_SH_PCLK_FREQ=50000000
212CONFIG_SH_CLK_CPG=y
213CONFIG_SH_CLK_CPG_LEGACY=y
214# CONFIG_NO_HZ is not set
215# CONFIG_HIGH_RES_TIMERS is not set
216CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
207 217
208# 218#
209# CPU Frequency scaling 219# CPU Frequency scaling
@@ -237,12 +247,14 @@ CONFIG_HZ=250
237# CONFIG_PREEMPT_NONE is not set 247# CONFIG_PREEMPT_NONE is not set
238# CONFIG_PREEMPT_VOLUNTARY is not set 248# CONFIG_PREEMPT_VOLUNTARY is not set
239CONFIG_PREEMPT=y 249CONFIG_PREEMPT=y
250# CONFIG_SPARSE_IRQ is not set
240 251
241# 252#
242# Boot options 253# Boot options
243# 254#
244CONFIG_ZERO_PAGE_OFFSET=0x00001000 255CONFIG_ZERO_PAGE_OFFSET=0x00001000
245CONFIG_BOOT_LINK_OFFSET=0x00800000 256CONFIG_BOOT_LINK_OFFSET=0x00400000
257CONFIG_ENTRY_OFFSET=0x00001000
246# CONFIG_CMDLINE_BOOL is not set 258# CONFIG_CMDLINE_BOOL is not set
247 259
248# 260#
@@ -332,6 +344,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
332# CONFIG_ECONET is not set 344# CONFIG_ECONET is not set
333# CONFIG_WAN_ROUTER is not set 345# CONFIG_WAN_ROUTER is not set
334# CONFIG_PHONET is not set 346# CONFIG_PHONET is not set
347# CONFIG_IEEE802154 is not set
335# CONFIG_NET_SCHED is not set 348# CONFIG_NET_SCHED is not set
336# CONFIG_DCB is not set 349# CONFIG_DCB is not set
337 350
@@ -349,7 +362,11 @@ CONFIG_WIRELESS=y
349# CONFIG_WIRELESS_OLD_REGULATORY is not set 362# CONFIG_WIRELESS_OLD_REGULATORY is not set
350# CONFIG_WIRELESS_EXT is not set 363# CONFIG_WIRELESS_EXT is not set
351# CONFIG_LIB80211 is not set 364# CONFIG_LIB80211 is not set
352# CONFIG_MAC80211 is not set 365
366#
367# CFG80211 needs to be enabled for MAC80211
368#
369CONFIG_MAC80211_DEFAULT_PS_VALUE=0
353# CONFIG_WIMAX is not set 370# CONFIG_WIMAX is not set
354# CONFIG_RFKILL is not set 371# CONFIG_RFKILL is not set
355# CONFIG_NET_9P is not set 372# CONFIG_NET_9P is not set
@@ -402,7 +419,9 @@ CONFIG_MISC_DEVICES=y
402# 419#
403# CONFIG_EEPROM_AT24 is not set 420# CONFIG_EEPROM_AT24 is not set
404# CONFIG_EEPROM_LEGACY is not set 421# CONFIG_EEPROM_LEGACY is not set
422# CONFIG_EEPROM_MAX6875 is not set
405# CONFIG_EEPROM_93CX6 is not set 423# CONFIG_EEPROM_93CX6 is not set
424# CONFIG_CB710_CORE is not set
406CONFIG_HAVE_IDE=y 425CONFIG_HAVE_IDE=y
407# CONFIG_IDE is not set 426# CONFIG_IDE is not set
408 427
@@ -425,10 +444,6 @@ CONFIG_BLK_DEV_SD=y
425# CONFIG_BLK_DEV_SR is not set 444# CONFIG_BLK_DEV_SR is not set
426# CONFIG_CHR_DEV_SG is not set 445# CONFIG_CHR_DEV_SG is not set
427# CONFIG_CHR_DEV_SCH is not set 446# CONFIG_CHR_DEV_SCH is not set
428
429#
430# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
431#
432CONFIG_SCSI_MULTI_LUN=y 447CONFIG_SCSI_MULTI_LUN=y
433# CONFIG_SCSI_CONSTANTS is not set 448# CONFIG_SCSI_CONSTANTS is not set
434# CONFIG_SCSI_LOGGING is not set 449# CONFIG_SCSI_LOGGING is not set
@@ -446,6 +461,7 @@ CONFIG_SCSI_SPI_ATTRS=y
446CONFIG_SCSI_LOWLEVEL=y 461CONFIG_SCSI_LOWLEVEL=y
447# CONFIG_ISCSI_TCP is not set 462# CONFIG_ISCSI_TCP is not set
448# CONFIG_SCSI_CXGB3_ISCSI is not set 463# CONFIG_SCSI_CXGB3_ISCSI is not set
464# CONFIG_SCSI_BNX2_ISCSI is not set
449# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 465# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
450# CONFIG_SCSI_3W_9XXX is not set 466# CONFIG_SCSI_3W_9XXX is not set
451# CONFIG_SCSI_ACARD is not set 467# CONFIG_SCSI_ACARD is not set
@@ -454,6 +470,7 @@ CONFIG_SCSI_LOWLEVEL=y
454# CONFIG_SCSI_AIC7XXX_OLD is not set 470# CONFIG_SCSI_AIC7XXX_OLD is not set
455# CONFIG_SCSI_AIC79XX is not set 471# CONFIG_SCSI_AIC79XX is not set
456# CONFIG_SCSI_AIC94XX is not set 472# CONFIG_SCSI_AIC94XX is not set
473# CONFIG_SCSI_MVSAS is not set
457# CONFIG_SCSI_ARCMSR is not set 474# CONFIG_SCSI_ARCMSR is not set
458# CONFIG_MEGARAID_NEWGEN is not set 475# CONFIG_MEGARAID_NEWGEN is not set
459# CONFIG_MEGARAID_LEGACY is not set 476# CONFIG_MEGARAID_LEGACY is not set
@@ -468,7 +485,6 @@ CONFIG_SCSI_LOWLEVEL=y
468# CONFIG_SCSI_IPS is not set 485# CONFIG_SCSI_IPS is not set
469# CONFIG_SCSI_INITIO is not set 486# CONFIG_SCSI_INITIO is not set
470# CONFIG_SCSI_INIA100 is not set 487# CONFIG_SCSI_INIA100 is not set
471# CONFIG_SCSI_MVSAS is not set
472# CONFIG_SCSI_STEX is not set 488# CONFIG_SCSI_STEX is not set
473# CONFIG_SCSI_SYM53C8XX_2 is not set 489# CONFIG_SCSI_SYM53C8XX_2 is not set
474# CONFIG_SCSI_QLOGIC_1280 is not set 490# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -497,7 +513,6 @@ CONFIG_SCSI_LOWLEVEL=y
497# CONFIG_IEEE1394 is not set 513# CONFIG_IEEE1394 is not set
498# CONFIG_I2O is not set 514# CONFIG_I2O is not set
499CONFIG_NETDEVICES=y 515CONFIG_NETDEVICES=y
500CONFIG_COMPAT_NET_DEV_OPS=y
501# CONFIG_DUMMY is not set 516# CONFIG_DUMMY is not set
502# CONFIG_BONDING is not set 517# CONFIG_BONDING is not set
503# CONFIG_MACVLAN is not set 518# CONFIG_MACVLAN is not set
@@ -530,6 +545,7 @@ CONFIG_NET_ETHERNET=y
530# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 545# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
531# CONFIG_NET_PCI is not set 546# CONFIG_NET_PCI is not set
532# CONFIG_B44 is not set 547# CONFIG_B44 is not set
548# CONFIG_KS8842 is not set
533# CONFIG_ATL2 is not set 549# CONFIG_ATL2 is not set
534CONFIG_NETDEV_1000=y 550CONFIG_NETDEV_1000=y
535# CONFIG_ACENIC is not set 551# CONFIG_ACENIC is not set
@@ -722,7 +738,6 @@ CONFIG_I2C_HELPER_AUTO=y
722# CONFIG_SENSORS_PCF8574 is not set 738# CONFIG_SENSORS_PCF8574 is not set
723# CONFIG_PCF8575 is not set 739# CONFIG_PCF8575 is not set
724# CONFIG_SENSORS_PCA9539 is not set 740# CONFIG_SENSORS_PCA9539 is not set
725# CONFIG_SENSORS_MAX6875 is not set
726# CONFIG_SENSORS_TSL2550 is not set 741# CONFIG_SENSORS_TSL2550 is not set
727# CONFIG_I2C_DEBUG_CORE is not set 742# CONFIG_I2C_DEBUG_CORE is not set
728# CONFIG_I2C_DEBUG_ALGO is not set 743# CONFIG_I2C_DEBUG_ALGO is not set
@@ -781,6 +796,7 @@ CONFIG_HWMON=y
781# CONFIG_SENSORS_SMSC47B397 is not set 796# CONFIG_SENSORS_SMSC47B397 is not set
782# CONFIG_SENSORS_ADS7828 is not set 797# CONFIG_SENSORS_ADS7828 is not set
783# CONFIG_SENSORS_THMC50 is not set 798# CONFIG_SENSORS_THMC50 is not set
799# CONFIG_SENSORS_TMP401 is not set
784# CONFIG_SENSORS_VIA686A is not set 800# CONFIG_SENSORS_VIA686A is not set
785# CONFIG_SENSORS_VT1211 is not set 801# CONFIG_SENSORS_VT1211 is not set
786# CONFIG_SENSORS_VT8231 is not set 802# CONFIG_SENSORS_VT8231 is not set
@@ -827,92 +843,7 @@ CONFIG_SSB_POSSIBLE=y
827# CONFIG_MFD_WM8350_I2C is not set 843# CONFIG_MFD_WM8350_I2C is not set
828# CONFIG_MFD_PCF50633 is not set 844# CONFIG_MFD_PCF50633 is not set
829# CONFIG_REGULATOR is not set 845# CONFIG_REGULATOR is not set
830 846# CONFIG_MEDIA_SUPPORT is not set
831#
832# Multimedia devices
833#
834
835#
836# Multimedia core support
837#
838CONFIG_VIDEO_DEV=m
839CONFIG_VIDEO_V4L2_COMMON=m
840CONFIG_VIDEO_ALLOW_V4L1=y
841CONFIG_VIDEO_V4L1_COMPAT=y
842CONFIG_DVB_CORE=y
843CONFIG_VIDEO_MEDIA=m
844
845#
846# Multimedia drivers
847#
848# CONFIG_MEDIA_ATTACH is not set
849CONFIG_MEDIA_TUNER=m
850# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
851CONFIG_MEDIA_TUNER_SIMPLE=m
852CONFIG_MEDIA_TUNER_TDA8290=m
853CONFIG_MEDIA_TUNER_TDA9887=m
854CONFIG_MEDIA_TUNER_TEA5761=m
855CONFIG_MEDIA_TUNER_TEA5767=m
856CONFIG_MEDIA_TUNER_MT20XX=m
857CONFIG_MEDIA_TUNER_XC2028=m
858CONFIG_MEDIA_TUNER_XC5000=m
859CONFIG_MEDIA_TUNER_MC44S803=m
860CONFIG_VIDEO_V4L2=m
861CONFIG_VIDEO_V4L1=m
862CONFIG_VIDEO_CAPTURE_DRIVERS=y
863# CONFIG_VIDEO_ADV_DEBUG is not set
864# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
865CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
866# CONFIG_VIDEO_VIVI is not set
867# CONFIG_VIDEO_BT848 is not set
868# CONFIG_VIDEO_CPIA is not set
869# CONFIG_VIDEO_SAA5246A is not set
870# CONFIG_VIDEO_SAA5249 is not set
871# CONFIG_VIDEO_SAA7134 is not set
872# CONFIG_VIDEO_MXB is not set
873# CONFIG_VIDEO_HEXIUM_ORION is not set
874# CONFIG_VIDEO_HEXIUM_GEMINI is not set
875# CONFIG_VIDEO_CX88 is not set
876# CONFIG_VIDEO_CX23885 is not set
877# CONFIG_VIDEO_IVTV is not set
878# CONFIG_VIDEO_CX18 is not set
879# CONFIG_VIDEO_CAFE_CCIC is not set
880# CONFIG_SOC_CAMERA is not set
881# CONFIG_RADIO_ADAPTERS is not set
882# CONFIG_DVB_DYNAMIC_MINORS is not set
883CONFIG_DVB_CAPTURE_DRIVERS=y
884
885#
886# Supported SAA7146 based PCI Adapters
887#
888# CONFIG_TTPCI_EEPROM is not set
889# CONFIG_DVB_AV7110 is not set
890# CONFIG_DVB_BUDGET_CORE is not set
891
892#
893# Supported FlexCopII (B2C2) Adapters
894#
895# CONFIG_DVB_B2C2_FLEXCOP is not set
896
897#
898# Supported BT878 Adapters
899#
900
901#
902# Supported Pluto2 Adapters
903#
904# CONFIG_DVB_PLUTO2 is not set
905
906#
907# Supported SDMC DM1105 Adapters
908#
909# CONFIG_DVB_DM1105 is not set
910
911#
912# Supported DVB Frontends
913#
914# CONFIG_DVB_FE_CUSTOMISE is not set
915CONFIG_DAB=y
916 847
917# 848#
918# Graphics support 849# Graphics support
@@ -1041,10 +972,15 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1041# CONFIG_NEW_LEDS is not set 972# CONFIG_NEW_LEDS is not set
1042# CONFIG_ACCESSIBILITY is not set 973# CONFIG_ACCESSIBILITY is not set
1043# CONFIG_INFINIBAND is not set 974# CONFIG_INFINIBAND is not set
975CONFIG_RTC_LIB=y
1044# CONFIG_RTC_CLASS is not set 976# CONFIG_RTC_CLASS is not set
1045# CONFIG_DMADEVICES is not set 977# CONFIG_DMADEVICES is not set
1046# CONFIG_AUXDISPLAY is not set 978# CONFIG_AUXDISPLAY is not set
1047# CONFIG_UIO is not set 979# CONFIG_UIO is not set
980
981#
982# TI VLYNQ
983#
1048# CONFIG_STAGING is not set 984# CONFIG_STAGING is not set
1049 985
1050# 986#
@@ -1065,10 +1001,11 @@ CONFIG_FS_MBCACHE=y
1065# CONFIG_REISERFS_FS is not set 1001# CONFIG_REISERFS_FS is not set
1066# CONFIG_JFS_FS is not set 1002# CONFIG_JFS_FS is not set
1067# CONFIG_FS_POSIX_ACL is not set 1003# CONFIG_FS_POSIX_ACL is not set
1068CONFIG_FILE_LOCKING=y
1069# CONFIG_XFS_FS is not set 1004# CONFIG_XFS_FS is not set
1070# CONFIG_OCFS2_FS is not set 1005# CONFIG_OCFS2_FS is not set
1071# CONFIG_BTRFS_FS is not set 1006# CONFIG_BTRFS_FS is not set
1007CONFIG_FILE_LOCKING=y
1008CONFIG_FSNOTIFY=y
1072CONFIG_DNOTIFY=y 1009CONFIG_DNOTIFY=y
1073CONFIG_INOTIFY=y 1010CONFIG_INOTIFY=y
1074CONFIG_INOTIFY_USER=y 1011CONFIG_INOTIFY_USER=y
@@ -1228,29 +1165,28 @@ CONFIG_FRAME_POINTER=y
1228# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1165# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1229# CONFIG_PAGE_POISONING is not set 1166# CONFIG_PAGE_POISONING is not set
1230CONFIG_TRACING_SUPPORT=y 1167CONFIG_TRACING_SUPPORT=y
1231 1168CONFIG_FTRACE=y
1232# 1169# CONFIG_IRQSOFF_TRACER is not set
1233# Tracers 1170# CONFIG_PREEMPT_TRACER is not set
1234#
1235# CONFIG_SCHED_TRACER is not set 1171# CONFIG_SCHED_TRACER is not set
1236# CONFIG_CONTEXT_SWITCH_TRACER is not set 1172# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1237# CONFIG_EVENT_TRACER is not set
1238# CONFIG_BOOT_TRACER is not set 1173# CONFIG_BOOT_TRACER is not set
1239# CONFIG_TRACE_BRANCH_PROFILING is not set 1174CONFIG_BRANCH_PROFILE_NONE=y
1175# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1176# CONFIG_PROFILE_ALL_BRANCHES is not set
1240# CONFIG_KMEMTRACE is not set 1177# CONFIG_KMEMTRACE is not set
1241# CONFIG_WORKQUEUE_TRACER is not set 1178# CONFIG_WORKQUEUE_TRACER is not set
1242# CONFIG_BLK_DEV_IO_TRACE is not set 1179# CONFIG_BLK_DEV_IO_TRACE is not set
1243# CONFIG_DYNAMIC_DEBUG is not set 1180# CONFIG_DYNAMIC_DEBUG is not set
1244# CONFIG_DMA_API_DEBUG is not set 1181# CONFIG_DMA_API_DEBUG is not set
1245# CONFIG_SAMPLES is not set 1182# CONFIG_SAMPLES is not set
1183# CONFIG_KMEMCHECK is not set
1246# CONFIG_EARLY_SCIF_CONSOLE is not set 1184# CONFIG_EARLY_SCIF_CONSOLE is not set
1247# CONFIG_DEBUG_BOOTMEM is not set 1185# CONFIG_DEBUG_BOOTMEM is not set
1248# CONFIG_DEBUG_STACK_USAGE is not set 1186# CONFIG_DEBUG_STACK_USAGE is not set
1249# CONFIG_4KSTACKS is not set 1187# CONFIG_4KSTACKS is not set
1250# CONFIG_SH_NO_BSS_INIT is not set 1188# CONFIG_SH_NO_BSS_INIT is not set
1251# CONFIG_MORE_COMPILE_OPTIONS is not set
1252CONFIG_SH64_SR_WATCH=y 1189CONFIG_SH64_SR_WATCH=y
1253# CONFIG_POOR_MANS_STRACE is not set
1254 1190
1255# 1191#
1256# Security options 1192# Security options
@@ -1364,3 +1300,4 @@ CONFIG_HAS_IOMEM=y
1364CONFIG_HAS_IOPORT=y 1300CONFIG_HAS_IOPORT=y
1365CONFIG_HAS_DMA=y 1301CONFIG_HAS_DMA=y
1366CONFIG_NLATTR=y 1302CONFIG_NLATTR=y
1303CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig
index 1f3cc98330bf..95717a041ed6 100644
--- a/arch/sh/configs/dreamcast_defconfig
+++ b/arch/sh/configs/dreamcast_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:44:27 2009 4# Thu Jun 18 12:24:48 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,9 +17,11 @@ CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 18CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20CONFIG_GENERIC_CMOS_UPDATE=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 21# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 23CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -72,7 +74,6 @@ CONFIG_UID16=y
72# CONFIG_SYSCTL_SYSCALL is not set 74# CONFIG_SYSCTL_SYSCALL is not set
73CONFIG_KALLSYMS=y 75CONFIG_KALLSYMS=y
74# CONFIG_KALLSYMS_EXTRA_PASS is not set 76# CONFIG_KALLSYMS_EXTRA_PASS is not set
75# CONFIG_STRIP_ASM_SYMS is not set
76CONFIG_HOTPLUG=y 77CONFIG_HOTPLUG=y
77CONFIG_PRINTK=y 78CONFIG_PRINTK=y
78CONFIG_BUG=y 79CONFIG_BUG=y
@@ -85,8 +86,13 @@ CONFIG_TIMERFD=y
85CONFIG_EVENTFD=y 86CONFIG_EVENTFD=y
86CONFIG_SHMEM=y 87CONFIG_SHMEM=y
87CONFIG_AIO=y 88CONFIG_AIO=y
89
90#
91# Performance Counters
92#
88CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_PCI_QUIRKS=y 94CONFIG_PCI_QUIRKS=y
95# CONFIG_STRIP_ASM_SYMS is not set
90CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
91CONFIG_SLAB=y 97CONFIG_SLAB=y
92# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
@@ -177,6 +183,7 @@ CONFIG_CPU_SUBTYPE_SH7091=y
177CONFIG_QUICKLIST=y 183CONFIG_QUICKLIST=y
178CONFIG_MMU=y 184CONFIG_MMU=y
179CONFIG_PAGE_OFFSET=0x80000000 185CONFIG_PAGE_OFFSET=0x80000000
186CONFIG_FORCE_MAX_ZONEORDER=11
180CONFIG_MEMORY_START=0x0c000000 187CONFIG_MEMORY_START=0x0c000000
181CONFIG_MEMORY_SIZE=0x01000000 188CONFIG_MEMORY_SIZE=0x01000000
182CONFIG_29BIT=y 189CONFIG_29BIT=y
@@ -191,7 +198,6 @@ CONFIG_PAGE_SIZE_4KB=y
191# CONFIG_PAGE_SIZE_8KB is not set 198# CONFIG_PAGE_SIZE_8KB is not set
192# CONFIG_PAGE_SIZE_16KB is not set 199# CONFIG_PAGE_SIZE_16KB is not set
193# CONFIG_PAGE_SIZE_64KB is not set 200# CONFIG_PAGE_SIZE_64KB is not set
194CONFIG_ENTRY_OFFSET=0x00001000
195CONFIG_HUGETLB_PAGE_SIZE_64K=y 201CONFIG_HUGETLB_PAGE_SIZE_64K=y
196# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 202# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
197# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 203# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -210,9 +216,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
210# CONFIG_PHYS_ADDR_T_64BIT is not set 216# CONFIG_PHYS_ADDR_T_64BIT is not set
211CONFIG_ZONE_DMA_FLAG=0 217CONFIG_ZONE_DMA_FLAG=0
212CONFIG_NR_QUICK=2 218CONFIG_NR_QUICK=2
213CONFIG_UNEVICTABLE_LRU=y
214CONFIG_HAVE_MLOCK=y 219CONFIG_HAVE_MLOCK=y
215CONFIG_HAVE_MLOCKED_PAGE_BIT=y 220CONFIG_HAVE_MLOCKED_PAGE_BIT=y
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
216 222
217# 223#
218# Cache configuration 224# Cache configuration
@@ -230,7 +236,6 @@ CONFIG_SH_FPU=y
230CONFIG_SH_STORE_QUEUES=y 236CONFIG_SH_STORE_QUEUES=y
231CONFIG_CPU_HAS_INTEVT=y 237CONFIG_CPU_HAS_INTEVT=y
232CONFIG_CPU_HAS_SR_RB=y 238CONFIG_CPU_HAS_SR_RB=y
233CONFIG_CPU_HAS_PTEA=y
234CONFIG_CPU_HAS_FPU=y 239CONFIG_CPU_HAS_FPU=y
235 240
236# 241#
@@ -241,9 +246,10 @@ CONFIG_SH_DREAMCAST=y
241# 246#
242# Timer and clock configuration 247# Timer and clock configuration
243# 248#
244CONFIG_SH_TMU=y 249CONFIG_SH_TIMER_TMU=y
245CONFIG_SH_TIMER_IRQ=16
246CONFIG_SH_PCLK_FREQ=49876504 250CONFIG_SH_PCLK_FREQ=49876504
251CONFIG_SH_CLK_CPG=y
252CONFIG_SH_CLK_CPG_LEGACY=y
247# CONFIG_NO_HZ is not set 253# CONFIG_NO_HZ is not set
248# CONFIG_HIGH_RES_TIMERS is not set 254# CONFIG_HIGH_RES_TIMERS is not set
249CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 255CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -307,12 +313,14 @@ CONFIG_SECCOMP=y
307CONFIG_PREEMPT=y 313CONFIG_PREEMPT=y
308CONFIG_GUSA=y 314CONFIG_GUSA=y
309# CONFIG_GUSA_RB is not set 315# CONFIG_GUSA_RB is not set
316# CONFIG_SPARSE_IRQ is not set
310 317
311# 318#
312# Boot options 319# Boot options
313# 320#
314CONFIG_ZERO_PAGE_OFFSET=0x00001000 321CONFIG_ZERO_PAGE_OFFSET=0x00001000
315CONFIG_BOOT_LINK_OFFSET=0x00800000 322CONFIG_BOOT_LINK_OFFSET=0x00800000
323CONFIG_ENTRY_OFFSET=0x00001000
316# CONFIG_UBC_WAKEUP is not set 324# CONFIG_UBC_WAKEUP is not set
317CONFIG_CMDLINE_BOOL=y 325CONFIG_CMDLINE_BOOL=y
318CONFIG_CMDLINE="console=ttySC1,115200 panic=3" 326CONFIG_CMDLINE="console=ttySC1,115200 panic=3"
@@ -401,6 +409,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
401# CONFIG_ECONET is not set 409# CONFIG_ECONET is not set
402# CONFIG_WAN_ROUTER is not set 410# CONFIG_WAN_ROUTER is not set
403# CONFIG_PHONET is not set 411# CONFIG_PHONET is not set
412# CONFIG_IEEE802154 is not set
404# CONFIG_NET_SCHED is not set 413# CONFIG_NET_SCHED is not set
405# CONFIG_DCB is not set 414# CONFIG_DCB is not set
406 415
@@ -418,7 +427,11 @@ CONFIG_WIRELESS=y
418# CONFIG_WIRELESS_OLD_REGULATORY is not set 427# CONFIG_WIRELESS_OLD_REGULATORY is not set
419# CONFIG_WIRELESS_EXT is not set 428# CONFIG_WIRELESS_EXT is not set
420# CONFIG_LIB80211 is not set 429# CONFIG_LIB80211 is not set
421# CONFIG_MAC80211 is not set 430
431#
432# CFG80211 needs to be enabled for MAC80211
433#
434CONFIG_MAC80211_DEFAULT_PS_VALUE=0
422# CONFIG_WIMAX is not set 435# CONFIG_WIMAX is not set
423# CONFIG_RFKILL is not set 436# CONFIG_RFKILL is not set
424# CONFIG_NET_9P is not set 437# CONFIG_NET_9P is not set
@@ -463,6 +476,7 @@ CONFIG_MISC_DEVICES=y
463# EEPROM support 476# EEPROM support
464# 477#
465# CONFIG_EEPROM_93CX6 is not set 478# CONFIG_EEPROM_93CX6 is not set
479# CONFIG_CB710_CORE is not set
466CONFIG_HAVE_IDE=y 480CONFIG_HAVE_IDE=y
467# CONFIG_IDE is not set 481# CONFIG_IDE is not set
468 482
@@ -488,7 +502,6 @@ CONFIG_HAVE_IDE=y
488# CONFIG_IEEE1394 is not set 502# CONFIG_IEEE1394 is not set
489# CONFIG_I2O is not set 503# CONFIG_I2O is not set
490CONFIG_NETDEVICES=y 504CONFIG_NETDEVICES=y
491CONFIG_COMPAT_NET_DEV_OPS=y
492# CONFIG_DUMMY is not set 505# CONFIG_DUMMY is not set
493# CONFIG_BONDING is not set 506# CONFIG_BONDING is not set
494# CONFIG_MACVLAN is not set 507# CONFIG_MACVLAN is not set
@@ -541,6 +554,7 @@ CONFIG_8139TOO=y
541# CONFIG_SMSC9420 is not set 554# CONFIG_SMSC9420 is not set
542# CONFIG_SUNDANCE is not set 555# CONFIG_SUNDANCE is not set
543# CONFIG_TLAN is not set 556# CONFIG_TLAN is not set
557# CONFIG_KS8842 is not set
544# CONFIG_VIA_RHINE is not set 558# CONFIG_VIA_RHINE is not set
545# CONFIG_SC92031 is not set 559# CONFIG_SC92031 is not set
546# CONFIG_ATL2 is not set 560# CONFIG_ATL2 is not set
@@ -697,22 +711,7 @@ CONFIG_SSB_POSSIBLE=y
697# CONFIG_HTC_PASIC3 is not set 711# CONFIG_HTC_PASIC3 is not set
698# CONFIG_MFD_TMIO is not set 712# CONFIG_MFD_TMIO is not set
699# CONFIG_REGULATOR is not set 713# CONFIG_REGULATOR is not set
700 714# CONFIG_MEDIA_SUPPORT is not set
701#
702# Multimedia devices
703#
704
705#
706# Multimedia core support
707#
708# CONFIG_VIDEO_DEV is not set
709# CONFIG_DVB_CORE is not set
710# CONFIG_VIDEO_MEDIA is not set
711
712#
713# Multimedia drivers
714#
715# CONFIG_DAB is not set
716 715
717# 716#
718# Graphics support 717# Graphics support
@@ -841,10 +840,15 @@ CONFIG_USB_ARCH_HAS_EHCI=y
841# CONFIG_NEW_LEDS is not set 840# CONFIG_NEW_LEDS is not set
842# CONFIG_ACCESSIBILITY is not set 841# CONFIG_ACCESSIBILITY is not set
843# CONFIG_INFINIBAND is not set 842# CONFIG_INFINIBAND is not set
843CONFIG_RTC_LIB=y
844# CONFIG_RTC_CLASS is not set 844# CONFIG_RTC_CLASS is not set
845# CONFIG_DMADEVICES is not set 845# CONFIG_DMADEVICES is not set
846# CONFIG_AUXDISPLAY is not set 846# CONFIG_AUXDISPLAY is not set
847# CONFIG_UIO is not set 847# CONFIG_UIO is not set
848
849#
850# TI VLYNQ
851#
848# CONFIG_STAGING is not set 852# CONFIG_STAGING is not set
849 853
850# 854#
@@ -856,10 +860,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
856# CONFIG_REISERFS_FS is not set 860# CONFIG_REISERFS_FS is not set
857# CONFIG_JFS_FS is not set 861# CONFIG_JFS_FS is not set
858# CONFIG_FS_POSIX_ACL is not set 862# CONFIG_FS_POSIX_ACL is not set
859CONFIG_FILE_LOCKING=y
860# CONFIG_XFS_FS is not set 863# CONFIG_XFS_FS is not set
861# CONFIG_OCFS2_FS is not set 864# CONFIG_OCFS2_FS is not set
862# CONFIG_BTRFS_FS is not set 865# CONFIG_BTRFS_FS is not set
866CONFIG_FILE_LOCKING=y
867CONFIG_FSNOTIFY=y
863# CONFIG_DNOTIFY is not set 868# CONFIG_DNOTIFY is not set
864CONFIG_INOTIFY=y 869CONFIG_INOTIFY=y
865CONFIG_INOTIFY_USER=y 870CONFIG_INOTIFY_USER=y
@@ -956,28 +961,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
956CONFIG_HAVE_DYNAMIC_FTRACE=y 961CONFIG_HAVE_DYNAMIC_FTRACE=y
957CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 962CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
958CONFIG_TRACING_SUPPORT=y 963CONFIG_TRACING_SUPPORT=y
959 964# CONFIG_FTRACE is not set
960#
961# Tracers
962#
963# CONFIG_FUNCTION_TRACER is not set
964# CONFIG_IRQSOFF_TRACER is not set
965# CONFIG_PREEMPT_TRACER is not set
966# CONFIG_SCHED_TRACER is not set
967# CONFIG_CONTEXT_SWITCH_TRACER is not set
968# CONFIG_EVENT_TRACER is not set
969# CONFIG_BOOT_TRACER is not set
970# CONFIG_TRACE_BRANCH_PROFILING is not set
971# CONFIG_STACK_TRACER is not set
972# CONFIG_KMEMTRACE is not set
973# CONFIG_WORKQUEUE_TRACER is not set
974# CONFIG_BLK_DEV_IO_TRACE is not set
975# CONFIG_DMA_API_DEBUG is not set 965# CONFIG_DMA_API_DEBUG is not set
976# CONFIG_SAMPLES is not set 966# CONFIG_SAMPLES is not set
977CONFIG_HAVE_ARCH_KGDB=y 967CONFIG_HAVE_ARCH_KGDB=y
978# CONFIG_SH_STANDARD_BIOS is not set 968# CONFIG_SH_STANDARD_BIOS is not set
979# CONFIG_EARLY_SCIF_CONSOLE is not set 969# CONFIG_EARLY_SCIF_CONSOLE is not set
980# CONFIG_MORE_COMPILE_OPTIONS is not set
981 970
982# 971#
983# Security options 972# Security options
@@ -1091,3 +1080,4 @@ CONFIG_HAS_IOMEM=y
1091CONFIG_HAS_IOPORT=y 1080CONFIG_HAS_IOPORT=y
1092CONFIG_HAS_DMA=y 1081CONFIG_HAS_DMA=y
1093CONFIG_NLATTR=y 1082CONFIG_NLATTR=y
1083CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/edosk7705_defconfig b/arch/sh/configs/edosk7705_defconfig
index d7092457ddc7..497414c439f4 100644
--- a/arch/sh/configs/edosk7705_defconfig
+++ b/arch/sh/configs/edosk7705_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:45:04 2009 4# Thu Jun 18 12:25:35 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,6 +18,7 @@ CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20CONFIG_ARCH_HIBERNATION_POSSIBLE=y 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_TMU=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -57,7 +58,6 @@ CONFIG_EMBEDDED=y
57# CONFIG_UID16 is not set 58# CONFIG_UID16 is not set
58# CONFIG_SYSCTL_SYSCALL is not set 59# CONFIG_SYSCTL_SYSCALL is not set
59# CONFIG_KALLSYMS is not set 60# CONFIG_KALLSYMS is not set
60# CONFIG_STRIP_ASM_SYMS is not set
61# CONFIG_HOTPLUG is not set 61# CONFIG_HOTPLUG is not set
62# CONFIG_PRINTK is not set 62# CONFIG_PRINTK is not set
63# CONFIG_BUG is not set 63# CONFIG_BUG is not set
@@ -70,7 +70,12 @@ CONFIG_EMBEDDED=y
70# CONFIG_EVENTFD is not set 70# CONFIG_EVENTFD is not set
71CONFIG_SHMEM=y 71CONFIG_SHMEM=y
72# CONFIG_AIO is not set 72# CONFIG_AIO is not set
73
74#
75# Performance Counters
76#
73# CONFIG_VM_EVENT_COUNTERS is not set 77# CONFIG_VM_EVENT_COUNTERS is not set
78# CONFIG_STRIP_ASM_SYMS is not set
74# CONFIG_COMPAT_BRK is not set 79# CONFIG_COMPAT_BRK is not set
75# CONFIG_SLAB is not set 80# CONFIG_SLAB is not set
76CONFIG_SLUB=y 81CONFIG_SLUB=y
@@ -136,6 +141,7 @@ CONFIG_CPU_SUBTYPE_SH7705=y
136CONFIG_QUICKLIST=y 141CONFIG_QUICKLIST=y
137CONFIG_MMU=y 142CONFIG_MMU=y
138CONFIG_PAGE_OFFSET=0x80000000 143CONFIG_PAGE_OFFSET=0x80000000
144CONFIG_FORCE_MAX_ZONEORDER=11
139CONFIG_MEMORY_START=0x08000000 145CONFIG_MEMORY_START=0x08000000
140CONFIG_MEMORY_SIZE=0x04000000 146CONFIG_MEMORY_SIZE=0x04000000
141CONFIG_29BIT=y 147CONFIG_29BIT=y
@@ -152,7 +158,6 @@ CONFIG_PAGE_SIZE_4KB=y
152# CONFIG_PAGE_SIZE_8KB is not set 158# CONFIG_PAGE_SIZE_8KB is not set
153# CONFIG_PAGE_SIZE_16KB is not set 159# CONFIG_PAGE_SIZE_16KB is not set
154# CONFIG_PAGE_SIZE_64KB is not set 160# CONFIG_PAGE_SIZE_64KB is not set
155CONFIG_ENTRY_OFFSET=0x00001000
156CONFIG_SELECT_MEMORY_MODEL=y 161CONFIG_SELECT_MEMORY_MODEL=y
157# CONFIG_FLATMEM_MANUAL is not set 162# CONFIG_FLATMEM_MANUAL is not set
158# CONFIG_DISCONTIGMEM_MANUAL is not set 163# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -166,9 +171,9 @@ CONFIG_MIGRATION=y
166# CONFIG_PHYS_ADDR_T_64BIT is not set 171# CONFIG_PHYS_ADDR_T_64BIT is not set
167CONFIG_ZONE_DMA_FLAG=0 172CONFIG_ZONE_DMA_FLAG=0
168CONFIG_NR_QUICK=2 173CONFIG_NR_QUICK=2
169CONFIG_UNEVICTABLE_LRU=y
170CONFIG_HAVE_MLOCK=y 174CONFIG_HAVE_MLOCK=y
171CONFIG_HAVE_MLOCKED_PAGE_BIT=y 175CONFIG_HAVE_MLOCKED_PAGE_BIT=y
176CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
172 177
173# 178#
174# Cache configuration 179# Cache configuration
@@ -196,9 +201,10 @@ CONFIG_SH_EDOSK7705=y
196# 201#
197# Timer and clock configuration 202# Timer and clock configuration
198# 203#
199CONFIG_SH_TMU=y 204CONFIG_SH_TIMER_TMU=y
200CONFIG_SH_TIMER_IRQ=16
201CONFIG_SH_PCLK_FREQ=31250000 205CONFIG_SH_PCLK_FREQ=31250000
206CONFIG_SH_CLK_CPG=y
207CONFIG_SH_CLK_CPG_LEGACY=y
202# CONFIG_NO_HZ is not set 208# CONFIG_NO_HZ is not set
203# CONFIG_HIGH_RES_TIMERS is not set 209# CONFIG_HIGH_RES_TIMERS is not set
204CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 210CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -243,6 +249,7 @@ CONFIG_GUSA=y
243# 249#
244CONFIG_ZERO_PAGE_OFFSET=0x00001000 250CONFIG_ZERO_PAGE_OFFSET=0x00001000
245CONFIG_BOOT_LINK_OFFSET=0x00800000 251CONFIG_BOOT_LINK_OFFSET=0x00800000
252CONFIG_ENTRY_OFFSET=0x00001000
246# CONFIG_CMDLINE_BOOL is not set 253# CONFIG_CMDLINE_BOOL is not set
247 254
248# 255#
@@ -335,21 +342,7 @@ CONFIG_SSB_POSSIBLE=y
335# CONFIG_HTC_PASIC3 is not set 342# CONFIG_HTC_PASIC3 is not set
336# CONFIG_MFD_TMIO is not set 343# CONFIG_MFD_TMIO is not set
337# CONFIG_REGULATOR is not set 344# CONFIG_REGULATOR is not set
338 345# CONFIG_MEDIA_SUPPORT is not set
339#
340# Multimedia devices
341#
342
343#
344# Multimedia core support
345#
346# CONFIG_VIDEO_DEV is not set
347# CONFIG_VIDEO_MEDIA is not set
348
349#
350# Multimedia drivers
351#
352# CONFIG_DAB is not set
353 346
354# 347#
355# Graphics support 348# Graphics support
@@ -369,17 +362,25 @@ CONFIG_SSB_POSSIBLE=y
369# CONFIG_MEMSTICK is not set 362# CONFIG_MEMSTICK is not set
370# CONFIG_NEW_LEDS is not set 363# CONFIG_NEW_LEDS is not set
371# CONFIG_ACCESSIBILITY is not set 364# CONFIG_ACCESSIBILITY is not set
365CONFIG_RTC_LIB=y
372# CONFIG_RTC_CLASS is not set 366# CONFIG_RTC_CLASS is not set
373# CONFIG_DMADEVICES is not set 367# CONFIG_DMADEVICES is not set
374# CONFIG_AUXDISPLAY is not set 368# CONFIG_AUXDISPLAY is not set
375# CONFIG_UIO is not set 369# CONFIG_UIO is not set
370
371#
372# TI VLYNQ
373#
376# CONFIG_STAGING is not set 374# CONFIG_STAGING is not set
377 375
378# 376#
379# File systems 377# File systems
380# 378#
379CONFIG_FILE_LOCKING=y
380CONFIG_FSNOTIFY=y
381# CONFIG_DNOTIFY is not set 381# CONFIG_DNOTIFY is not set
382# CONFIG_INOTIFY is not set 382# CONFIG_INOTIFY is not set
383CONFIG_INOTIFY_USER=y
383# CONFIG_QUOTA is not set 384# CONFIG_QUOTA is not set
384# CONFIG_AUTOFS_FS is not set 385# CONFIG_AUTOFS_FS is not set
385# CONFIG_AUTOFS4_FS is not set 386# CONFIG_AUTOFS4_FS is not set
@@ -418,26 +419,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
418CONFIG_HAVE_DYNAMIC_FTRACE=y 419CONFIG_HAVE_DYNAMIC_FTRACE=y
419CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 420CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
420CONFIG_TRACING_SUPPORT=y 421CONFIG_TRACING_SUPPORT=y
421 422# CONFIG_FTRACE is not set
422#
423# Tracers
424#
425# CONFIG_FUNCTION_TRACER is not set
426# CONFIG_IRQSOFF_TRACER is not set
427# CONFIG_SCHED_TRACER is not set
428# CONFIG_CONTEXT_SWITCH_TRACER is not set
429# CONFIG_EVENT_TRACER is not set
430# CONFIG_BOOT_TRACER is not set
431# CONFIG_TRACE_BRANCH_PROFILING is not set
432# CONFIG_STACK_TRACER is not set
433# CONFIG_KMEMTRACE is not set
434# CONFIG_WORKQUEUE_TRACER is not set
435# CONFIG_DMA_API_DEBUG is not set 423# CONFIG_DMA_API_DEBUG is not set
436# CONFIG_SAMPLES is not set 424# CONFIG_SAMPLES is not set
437CONFIG_HAVE_ARCH_KGDB=y 425CONFIG_HAVE_ARCH_KGDB=y
438# CONFIG_SH_STANDARD_BIOS is not set 426# CONFIG_SH_STANDARD_BIOS is not set
439# CONFIG_EARLY_SCIF_CONSOLE is not set 427# CONFIG_EARLY_SCIF_CONSOLE is not set
440# CONFIG_MORE_COMPILE_OPTIONS is not set
441 428
442# 429#
443# Security options 430# Security options
@@ -462,3 +449,4 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
462CONFIG_HAS_IOMEM=y 449CONFIG_HAS_IOMEM=y
463CONFIG_HAS_IOPORT=y 450CONFIG_HAS_IOPORT=y
464CONFIG_HAS_DMA=y 451CONFIG_HAS_DMA=y
452CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/edosk7760_defconfig b/arch/sh/configs/edosk7760_defconfig
index a822b1d8c116..77684ed91270 100644
--- a/arch/sh/configs/edosk7760_defconfig
+++ b/arch/sh/configs/edosk7760_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:45:25 2009 4# Thu Jun 18 12:25:55 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -78,7 +79,6 @@ CONFIG_SYSCTL_SYSCALL=y
78CONFIG_KALLSYMS=y 79CONFIG_KALLSYMS=y
79CONFIG_KALLSYMS_ALL=y 80CONFIG_KALLSYMS_ALL=y
80# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
81# CONFIG_STRIP_ASM_SYMS is not set
82CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
83CONFIG_PRINTK=y 83CONFIG_PRINTK=y
84CONFIG_BUG=y 84CONFIG_BUG=y
@@ -91,8 +91,13 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 92CONFIG_SHMEM=y
93CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
94CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
95CONFIG_SLUB_DEBUG=y 99CONFIG_SLUB_DEBUG=y
100# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 101CONFIG_COMPAT_BRK=y
97# CONFIG_SLAB is not set 102# CONFIG_SLAB is not set
98CONFIG_SLUB=y 103CONFIG_SLUB=y
@@ -182,6 +187,7 @@ CONFIG_CPU_SUBTYPE_SH7760=y
182CONFIG_QUICKLIST=y 187CONFIG_QUICKLIST=y
183CONFIG_MMU=y 188CONFIG_MMU=y
184CONFIG_PAGE_OFFSET=0x80000000 189CONFIG_PAGE_OFFSET=0x80000000
190CONFIG_FORCE_MAX_ZONEORDER=11
185CONFIG_MEMORY_START=0x0c000000 191CONFIG_MEMORY_START=0x0c000000
186CONFIG_MEMORY_SIZE=0x04000000 192CONFIG_MEMORY_SIZE=0x04000000
187CONFIG_29BIT=y 193CONFIG_29BIT=y
@@ -196,7 +202,6 @@ CONFIG_PAGE_SIZE_4KB=y
196# CONFIG_PAGE_SIZE_8KB is not set 202# CONFIG_PAGE_SIZE_8KB is not set
197# CONFIG_PAGE_SIZE_16KB is not set 203# CONFIG_PAGE_SIZE_16KB is not set
198# CONFIG_PAGE_SIZE_64KB is not set 204# CONFIG_PAGE_SIZE_64KB is not set
199CONFIG_ENTRY_OFFSET=0x00001000
200CONFIG_SELECT_MEMORY_MODEL=y 205CONFIG_SELECT_MEMORY_MODEL=y
201CONFIG_FLATMEM_MANUAL=y 206CONFIG_FLATMEM_MANUAL=y
202# CONFIG_DISCONTIGMEM_MANUAL is not set 207# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -209,9 +214,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
209# CONFIG_PHYS_ADDR_T_64BIT is not set 214# CONFIG_PHYS_ADDR_T_64BIT is not set
210CONFIG_ZONE_DMA_FLAG=0 215CONFIG_ZONE_DMA_FLAG=0
211CONFIG_NR_QUICK=2 216CONFIG_NR_QUICK=2
212CONFIG_UNEVICTABLE_LRU=y
213CONFIG_HAVE_MLOCK=y 217CONFIG_HAVE_MLOCK=y
214CONFIG_HAVE_MLOCKED_PAGE_BIT=y 218CONFIG_HAVE_MLOCKED_PAGE_BIT=y
219CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
215 220
216# 221#
217# Cache configuration 222# Cache configuration
@@ -229,7 +234,6 @@ CONFIG_SH_FPU=y
229CONFIG_SH_STORE_QUEUES=y 234CONFIG_SH_STORE_QUEUES=y
230CONFIG_CPU_HAS_INTEVT=y 235CONFIG_CPU_HAS_INTEVT=y
231CONFIG_CPU_HAS_SR_RB=y 236CONFIG_CPU_HAS_SR_RB=y
232CONFIG_CPU_HAS_PTEA=y
233CONFIG_CPU_HAS_FPU=y 237CONFIG_CPU_HAS_FPU=y
234 238
235# 239#
@@ -240,9 +244,10 @@ CONFIG_SH_EDOSK7760=y
240# 244#
241# Timer and clock configuration 245# Timer and clock configuration
242# 246#
243CONFIG_SH_TMU=y 247CONFIG_SH_TIMER_TMU=y
244CONFIG_SH_TIMER_IRQ=16
245CONFIG_SH_PCLK_FREQ=33333333 248CONFIG_SH_PCLK_FREQ=33333333
249CONFIG_SH_CLK_CPG=y
250CONFIG_SH_CLK_CPG_LEGACY=y
246CONFIG_TICK_ONESHOT=y 251CONFIG_TICK_ONESHOT=y
247# CONFIG_NO_HZ is not set 252# CONFIG_NO_HZ is not set
248CONFIG_HIGH_RES_TIMERS=y 253CONFIG_HIGH_RES_TIMERS=y
@@ -258,6 +263,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
258# 263#
259CONFIG_SH_DMA_API=y 264CONFIG_SH_DMA_API=y
260CONFIG_SH_DMA=y 265CONFIG_SH_DMA=y
266CONFIG_SH_DMA_IRQ_MULTI=y
261CONFIG_NR_ONCHIP_DMA_CHANNELS=8 267CONFIG_NR_ONCHIP_DMA_CHANNELS=8
262# CONFIG_NR_DMA_CHANNELS_BOOL is not set 268# CONFIG_NR_DMA_CHANNELS_BOOL is not set
263# CONFIG_SH_DMABRG is not set 269# CONFIG_SH_DMABRG is not set
@@ -289,12 +295,14 @@ CONFIG_SCHED_HRTICK=y
289CONFIG_PREEMPT=y 295CONFIG_PREEMPT=y
290CONFIG_GUSA=y 296CONFIG_GUSA=y
291# CONFIG_GUSA_RB is not set 297# CONFIG_GUSA_RB is not set
298# CONFIG_SPARSE_IRQ is not set
292 299
293# 300#
294# Boot options 301# Boot options
295# 302#
296CONFIG_ZERO_PAGE_OFFSET=0x00001000 303CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x02000000 304CONFIG_BOOT_LINK_OFFSET=0x02000000
305CONFIG_ENTRY_OFFSET=0x00001000
298# CONFIG_UBC_WAKEUP is not set 306# CONFIG_UBC_WAKEUP is not set
299CONFIG_CMDLINE_BOOL=y 307CONFIG_CMDLINE_BOOL=y
300CONFIG_CMDLINE="mem=64M console=ttySC2,115200 root=/dev/nfs rw nfsroot=192.168.0.3:/scripts/filesys ip=192.168.0.4" 308CONFIG_CMDLINE="mem=64M console=ttySC2,115200 root=/dev/nfs rw nfsroot=192.168.0.3:/scripts/filesys ip=192.168.0.4"
@@ -373,6 +381,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_ECONET is not set 381# CONFIG_ECONET is not set
374# CONFIG_WAN_ROUTER is not set 382# CONFIG_WAN_ROUTER is not set
375# CONFIG_PHONET is not set 383# CONFIG_PHONET is not set
384# CONFIG_IEEE802154 is not set
376# CONFIG_NET_SCHED is not set 385# CONFIG_NET_SCHED is not set
377# CONFIG_DCB is not set 386# CONFIG_DCB is not set
378 387
@@ -390,7 +399,11 @@ CONFIG_WIRELESS=y
390# CONFIG_WIRELESS_OLD_REGULATORY is not set 399# CONFIG_WIRELESS_OLD_REGULATORY is not set
391# CONFIG_WIRELESS_EXT is not set 400# CONFIG_WIRELESS_EXT is not set
392# CONFIG_LIB80211 is not set 401# CONFIG_LIB80211 is not set
393# CONFIG_MAC80211 is not set 402
403#
404# CFG80211 needs to be enabled for MAC80211
405#
406CONFIG_MAC80211_DEFAULT_PS_VALUE=0
394# CONFIG_WIMAX is not set 407# CONFIG_WIMAX is not set
395# CONFIG_RFKILL is not set 408# CONFIG_RFKILL is not set
396# CONFIG_NET_9P is not set 409# CONFIG_NET_9P is not set
@@ -523,7 +536,6 @@ CONFIG_HAVE_IDE=y
523# CONFIG_ATA is not set 536# CONFIG_ATA is not set
524# CONFIG_MD is not set 537# CONFIG_MD is not set
525CONFIG_NETDEVICES=y 538CONFIG_NETDEVICES=y
526CONFIG_COMPAT_NET_DEV_OPS=y
527# CONFIG_DUMMY is not set 539# CONFIG_DUMMY is not set
528# CONFIG_BONDING is not set 540# CONFIG_BONDING is not set
529# CONFIG_MACVLAN is not set 541# CONFIG_MACVLAN is not set
@@ -548,6 +560,7 @@ CONFIG_SMC91X=y
548# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 560# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
549# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 561# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
550# CONFIG_B44 is not set 562# CONFIG_B44 is not set
563# CONFIG_KS8842 is not set
551# CONFIG_NETDEV_1000 is not set 564# CONFIG_NETDEV_1000 is not set
552# CONFIG_NETDEV_10000 is not set 565# CONFIG_NETDEV_10000 is not set
553 566
@@ -670,7 +683,6 @@ CONFIG_I2C_SH7760=y
670# CONFIG_SENSORS_PCF8574 is not set 683# CONFIG_SENSORS_PCF8574 is not set
671# CONFIG_PCF8575 is not set 684# CONFIG_PCF8575 is not set
672# CONFIG_SENSORS_PCA9539 is not set 685# CONFIG_SENSORS_PCA9539 is not set
673# CONFIG_SENSORS_MAX6875 is not set
674# CONFIG_SENSORS_TSL2550 is not set 686# CONFIG_SENSORS_TSL2550 is not set
675CONFIG_I2C_DEBUG_CORE=y 687CONFIG_I2C_DEBUG_CORE=y
676CONFIG_I2C_DEBUG_ALGO=y 688CONFIG_I2C_DEBUG_ALGO=y
@@ -703,22 +715,7 @@ CONFIG_SSB_POSSIBLE=y
703# CONFIG_MFD_WM8350_I2C is not set 715# CONFIG_MFD_WM8350_I2C is not set
704# CONFIG_MFD_PCF50633 is not set 716# CONFIG_MFD_PCF50633 is not set
705# CONFIG_REGULATOR is not set 717# CONFIG_REGULATOR is not set
706 718# CONFIG_MEDIA_SUPPORT is not set
707#
708# Multimedia devices
709#
710
711#
712# Multimedia core support
713#
714# CONFIG_VIDEO_DEV is not set
715# CONFIG_DVB_CORE is not set
716# CONFIG_VIDEO_MEDIA is not set
717
718#
719# Multimedia drivers
720#
721# CONFIG_DAB is not set
722 719
723# 720#
724# Graphics support 721# Graphics support
@@ -783,6 +780,11 @@ CONFIG_SND_JACK=y
783# CONFIG_SND_VERBOSE_PROCFS is not set 780# CONFIG_SND_VERBOSE_PROCFS is not set
784CONFIG_SND_VERBOSE_PRINTK=y 781CONFIG_SND_VERBOSE_PRINTK=y
785# CONFIG_SND_DEBUG is not set 782# CONFIG_SND_DEBUG is not set
783# CONFIG_SND_RAWMIDI_SEQ is not set
784# CONFIG_SND_OPL3_LIB_SEQ is not set
785# CONFIG_SND_OPL4_LIB_SEQ is not set
786# CONFIG_SND_SBAWE_SEQ is not set
787# CONFIG_SND_EMU10K1_SEQ is not set
786CONFIG_SND_DRIVERS=y 788CONFIG_SND_DRIVERS=y
787# CONFIG_SND_DUMMY is not set 789# CONFIG_SND_DUMMY is not set
788# CONFIG_SND_MTPAV is not set 790# CONFIG_SND_MTPAV is not set
@@ -803,10 +805,15 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
803# CONFIG_MEMSTICK is not set 805# CONFIG_MEMSTICK is not set
804# CONFIG_NEW_LEDS is not set 806# CONFIG_NEW_LEDS is not set
805# CONFIG_ACCESSIBILITY is not set 807# CONFIG_ACCESSIBILITY is not set
808CONFIG_RTC_LIB=y
806# CONFIG_RTC_CLASS is not set 809# CONFIG_RTC_CLASS is not set
807# CONFIG_DMADEVICES is not set 810# CONFIG_DMADEVICES is not set
808# CONFIG_AUXDISPLAY is not set 811# CONFIG_AUXDISPLAY is not set
809# CONFIG_UIO is not set 812# CONFIG_UIO is not set
813
814#
815# TI VLYNQ
816#
810# CONFIG_STAGING is not set 817# CONFIG_STAGING is not set
811 818
812# 819#
@@ -829,10 +836,11 @@ CONFIG_FS_MBCACHE=y
829# CONFIG_REISERFS_FS is not set 836# CONFIG_REISERFS_FS is not set
830# CONFIG_JFS_FS is not set 837# CONFIG_JFS_FS is not set
831CONFIG_FS_POSIX_ACL=y 838CONFIG_FS_POSIX_ACL=y
832CONFIG_FILE_LOCKING=y
833# CONFIG_XFS_FS is not set 839# CONFIG_XFS_FS is not set
834# CONFIG_OCFS2_FS is not set 840# CONFIG_OCFS2_FS is not set
835# CONFIG_BTRFS_FS is not set 841# CONFIG_BTRFS_FS is not set
842CONFIG_FILE_LOCKING=y
843CONFIG_FSNOTIFY=y
836CONFIG_DNOTIFY=y 844CONFIG_DNOTIFY=y
837CONFIG_INOTIFY=y 845CONFIG_INOTIFY=y
838CONFIG_INOTIFY_USER=y 846CONFIG_INOTIFY_USER=y
@@ -1015,18 +1023,16 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1015CONFIG_HAVE_DYNAMIC_FTRACE=y 1023CONFIG_HAVE_DYNAMIC_FTRACE=y
1016CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1024CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1017CONFIG_TRACING_SUPPORT=y 1025CONFIG_TRACING_SUPPORT=y
1018 1026CONFIG_FTRACE=y
1019#
1020# Tracers
1021#
1022# CONFIG_FUNCTION_TRACER is not set 1027# CONFIG_FUNCTION_TRACER is not set
1023# CONFIG_IRQSOFF_TRACER is not set 1028# CONFIG_IRQSOFF_TRACER is not set
1024# CONFIG_PREEMPT_TRACER is not set 1029# CONFIG_PREEMPT_TRACER is not set
1025# CONFIG_SCHED_TRACER is not set 1030# CONFIG_SCHED_TRACER is not set
1026# CONFIG_CONTEXT_SWITCH_TRACER is not set 1031# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1027# CONFIG_EVENT_TRACER is not set
1028# CONFIG_BOOT_TRACER is not set 1032# CONFIG_BOOT_TRACER is not set
1029# CONFIG_TRACE_BRANCH_PROFILING is not set 1033CONFIG_BRANCH_PROFILE_NONE=y
1034# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1035# CONFIG_PROFILE_ALL_BRANCHES is not set
1030# CONFIG_STACK_TRACER is not set 1036# CONFIG_STACK_TRACER is not set
1031# CONFIG_KMEMTRACE is not set 1037# CONFIG_KMEMTRACE is not set
1032# CONFIG_WORKQUEUE_TRACER is not set 1038# CONFIG_WORKQUEUE_TRACER is not set
@@ -1043,10 +1049,8 @@ CONFIG_EARLY_PRINTK=y
1043CONFIG_DEBUG_STACKOVERFLOW=y 1049CONFIG_DEBUG_STACKOVERFLOW=y
1044# CONFIG_DEBUG_STACK_USAGE is not set 1050# CONFIG_DEBUG_STACK_USAGE is not set
1045# CONFIG_4KSTACKS is not set 1051# CONFIG_4KSTACKS is not set
1046# CONFIG_IRQSTACKS is not set
1047CONFIG_DUMP_CODE=y 1052CONFIG_DUMP_CODE=y
1048# CONFIG_SH_NO_BSS_INIT is not set 1053# CONFIG_SH_NO_BSS_INIT is not set
1049# CONFIG_MORE_COMPILE_OPTIONS is not set
1050 1054
1051# 1055#
1052# Security options 1056# Security options
@@ -1165,3 +1169,4 @@ CONFIG_HAS_IOMEM=y
1165CONFIG_HAS_IOPORT=y 1169CONFIG_HAS_IOPORT=y
1166CONFIG_HAS_DMA=y 1170CONFIG_HAS_DMA=y
1167CONFIG_NLATTR=y 1171CONFIG_NLATTR=y
1172CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/espt_defconfig b/arch/sh/configs/espt_defconfig
index c5b50077913d..881128eeab35 100644
--- a/arch/sh/configs/espt_defconfig
+++ b/arch/sh/configs/espt_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:46:26 2009 4# Thu Jun 18 12:27:21 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -79,7 +80,6 @@ CONFIG_UID16=y
79# CONFIG_SYSCTL_SYSCALL is not set 80# CONFIG_SYSCTL_SYSCALL is not set
80CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_EXTRA_PASS is not set 82# CONFIG_KALLSYMS_EXTRA_PASS is not set
82# CONFIG_STRIP_ASM_SYMS is not set
83CONFIG_HOTPLUG=y 83CONFIG_HOTPLUG=y
84CONFIG_PRINTK=y 84CONFIG_PRINTK=y
85CONFIG_BUG=y 85CONFIG_BUG=y
@@ -92,14 +92,19 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 92CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 93CONFIG_SHMEM=y
94CONFIG_AIO=y 94CONFIG_AIO=y
95
96#
97# Performance Counters
98#
95CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 101CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 102CONFIG_SLAB=y
98# CONFIG_SLUB is not set 103# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 104# CONFIG_SLOB is not set
100CONFIG_PROFILING=y 105CONFIG_PROFILING=y
101CONFIG_TRACEPOINTS=y 106CONFIG_TRACEPOINTS=y
102# CONFIG_MARKERS is not set 107CONFIG_MARKERS=y
103CONFIG_OPROFILE=y 108CONFIG_OPROFILE=y
104CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set 110# CONFIG_KPROBES is not set
@@ -184,6 +189,7 @@ CONFIG_CPU_SUBTYPE_SH7763=y
184CONFIG_QUICKLIST=y 189CONFIG_QUICKLIST=y
185CONFIG_MMU=y 190CONFIG_MMU=y
186CONFIG_PAGE_OFFSET=0x80000000 191CONFIG_PAGE_OFFSET=0x80000000
192CONFIG_FORCE_MAX_ZONEORDER=11
187CONFIG_MEMORY_START=0x0c000000 193CONFIG_MEMORY_START=0x0c000000
188CONFIG_MEMORY_SIZE=0x04000000 194CONFIG_MEMORY_SIZE=0x04000000
189CONFIG_29BIT=y 195CONFIG_29BIT=y
@@ -200,7 +206,6 @@ CONFIG_PAGE_SIZE_4KB=y
200# CONFIG_PAGE_SIZE_8KB is not set 206# CONFIG_PAGE_SIZE_8KB is not set
201# CONFIG_PAGE_SIZE_16KB is not set 207# CONFIG_PAGE_SIZE_16KB is not set
202# CONFIG_PAGE_SIZE_64KB is not set 208# CONFIG_PAGE_SIZE_64KB is not set
203CONFIG_ENTRY_OFFSET=0x00001000
204CONFIG_SELECT_MEMORY_MODEL=y 209CONFIG_SELECT_MEMORY_MODEL=y
205# CONFIG_FLATMEM_MANUAL is not set 210# CONFIG_FLATMEM_MANUAL is not set
206# CONFIG_DISCONTIGMEM_MANUAL is not set 211# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -215,9 +220,9 @@ CONFIG_MIGRATION=y
215# CONFIG_PHYS_ADDR_T_64BIT is not set 220# CONFIG_PHYS_ADDR_T_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=0 221CONFIG_ZONE_DMA_FLAG=0
217CONFIG_NR_QUICK=2 222CONFIG_NR_QUICK=2
218CONFIG_UNEVICTABLE_LRU=y
219CONFIG_HAVE_MLOCK=y 223CONFIG_HAVE_MLOCK=y
220CONFIG_HAVE_MLOCKED_PAGE_BIT=y 224CONFIG_HAVE_MLOCKED_PAGE_BIT=y
225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
221 226
222# 227#
223# Cache configuration 228# Cache configuration
@@ -246,9 +251,10 @@ CONFIG_SH_ESPT=y
246# 251#
247# Timer and clock configuration 252# Timer and clock configuration
248# 253#
249CONFIG_SH_TMU=y 254CONFIG_SH_TIMER_TMU=y
250CONFIG_SH_TIMER_IRQ=28
251CONFIG_SH_PCLK_FREQ=66666666 255CONFIG_SH_PCLK_FREQ=66666666
256CONFIG_SH_CLK_CPG=y
257CONFIG_SH_CLK_CPG_LEGACY=y
252# CONFIG_NO_HZ is not set 258# CONFIG_NO_HZ is not set
253# CONFIG_HIGH_RES_TIMERS is not set 259# CONFIG_HIGH_RES_TIMERS is not set
254CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 260CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -289,12 +295,14 @@ CONFIG_PREEMPT_NONE=y
289# CONFIG_PREEMPT_VOLUNTARY is not set 295# CONFIG_PREEMPT_VOLUNTARY is not set
290# CONFIG_PREEMPT is not set 296# CONFIG_PREEMPT is not set
291CONFIG_GUSA=y 297CONFIG_GUSA=y
298# CONFIG_SPARSE_IRQ is not set
292 299
293# 300#
294# Boot options 301# Boot options
295# 302#
296CONFIG_ZERO_PAGE_OFFSET=0x00001000 303CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 304CONFIG_BOOT_LINK_OFFSET=0x00800000
305CONFIG_ENTRY_OFFSET=0x00001000
298CONFIG_CMDLINE_BOOL=y 306CONFIG_CMDLINE_BOOL=y
299CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=bootp" 307CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=bootp"
300 308
@@ -377,6 +385,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
377# CONFIG_ECONET is not set 385# CONFIG_ECONET is not set
378# CONFIG_WAN_ROUTER is not set 386# CONFIG_WAN_ROUTER is not set
379# CONFIG_PHONET is not set 387# CONFIG_PHONET is not set
388# CONFIG_IEEE802154 is not set
380# CONFIG_NET_SCHED is not set 389# CONFIG_NET_SCHED is not set
381# CONFIG_DCB is not set 390# CONFIG_DCB is not set
382 391
@@ -529,10 +538,6 @@ CONFIG_BLK_DEV_SD=y
529# CONFIG_BLK_DEV_SR is not set 538# CONFIG_BLK_DEV_SR is not set
530# CONFIG_CHR_DEV_SG is not set 539# CONFIG_CHR_DEV_SG is not set
531# CONFIG_CHR_DEV_SCH is not set 540# CONFIG_CHR_DEV_SCH is not set
532
533#
534# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
535#
536# CONFIG_SCSI_MULTI_LUN is not set 541# CONFIG_SCSI_MULTI_LUN is not set
537# CONFIG_SCSI_CONSTANTS is not set 542# CONFIG_SCSI_CONSTANTS is not set
538# CONFIG_SCSI_LOGGING is not set 543# CONFIG_SCSI_LOGGING is not set
@@ -549,6 +554,7 @@ CONFIG_SCSI_WAIT_SCAN=m
549# CONFIG_SCSI_SRP_ATTRS is not set 554# CONFIG_SCSI_SRP_ATTRS is not set
550CONFIG_SCSI_LOWLEVEL=y 555CONFIG_SCSI_LOWLEVEL=y
551# CONFIG_ISCSI_TCP is not set 556# CONFIG_ISCSI_TCP is not set
557# CONFIG_SCSI_BNX2_ISCSI is not set
552# CONFIG_LIBFC is not set 558# CONFIG_LIBFC is not set
553# CONFIG_LIBFCOE is not set 559# CONFIG_LIBFCOE is not set
554# CONFIG_SCSI_DEBUG is not set 560# CONFIG_SCSI_DEBUG is not set
@@ -557,7 +563,6 @@ CONFIG_SCSI_LOWLEVEL=y
557# CONFIG_ATA is not set 563# CONFIG_ATA is not set
558# CONFIG_MD is not set 564# CONFIG_MD is not set
559CONFIG_NETDEVICES=y 565CONFIG_NETDEVICES=y
560CONFIG_COMPAT_NET_DEV_OPS=y
561# CONFIG_DUMMY is not set 566# CONFIG_DUMMY is not set
562# CONFIG_BONDING is not set 567# CONFIG_BONDING is not set
563# CONFIG_MACVLAN is not set 568# CONFIG_MACVLAN is not set
@@ -602,6 +607,7 @@ CONFIG_SH_ETH=y
602# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 607# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
603# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 608# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
604# CONFIG_B44 is not set 609# CONFIG_B44 is not set
610# CONFIG_KS8842 is not set
605# CONFIG_NETDEV_1000 is not set 611# CONFIG_NETDEV_1000 is not set
606# CONFIG_NETDEV_10000 is not set 612# CONFIG_NETDEV_10000 is not set
607 613
@@ -720,22 +726,7 @@ CONFIG_SSB_POSSIBLE=y
720# CONFIG_HTC_PASIC3 is not set 726# CONFIG_HTC_PASIC3 is not set
721# CONFIG_MFD_TMIO is not set 727# CONFIG_MFD_TMIO is not set
722# CONFIG_REGULATOR is not set 728# CONFIG_REGULATOR is not set
723 729# CONFIG_MEDIA_SUPPORT is not set
724#
725# Multimedia devices
726#
727
728#
729# Multimedia core support
730#
731# CONFIG_VIDEO_DEV is not set
732# CONFIG_DVB_CORE is not set
733# CONFIG_VIDEO_MEDIA is not set
734
735#
736# Multimedia drivers
737#
738# CONFIG_DAB is not set
739 730
740# 731#
741# Graphics support 732# Graphics support
@@ -909,10 +900,15 @@ CONFIG_USB_STORAGE=y
909# CONFIG_MEMSTICK is not set 900# CONFIG_MEMSTICK is not set
910# CONFIG_NEW_LEDS is not set 901# CONFIG_NEW_LEDS is not set
911# CONFIG_ACCESSIBILITY is not set 902# CONFIG_ACCESSIBILITY is not set
903CONFIG_RTC_LIB=y
912# CONFIG_RTC_CLASS is not set 904# CONFIG_RTC_CLASS is not set
913# CONFIG_DMADEVICES is not set 905# CONFIG_DMADEVICES is not set
914# CONFIG_AUXDISPLAY is not set 906# CONFIG_AUXDISPLAY is not set
915# CONFIG_UIO is not set 907# CONFIG_UIO is not set
908
909#
910# TI VLYNQ
911#
916# CONFIG_STAGING is not set 912# CONFIG_STAGING is not set
917 913
918# 914#
@@ -933,10 +929,11 @@ CONFIG_FS_MBCACHE=y
933# CONFIG_REISERFS_FS is not set 929# CONFIG_REISERFS_FS is not set
934# CONFIG_JFS_FS is not set 930# CONFIG_JFS_FS is not set
935CONFIG_FS_POSIX_ACL=y 931CONFIG_FS_POSIX_ACL=y
936CONFIG_FILE_LOCKING=y
937# CONFIG_XFS_FS is not set 932# CONFIG_XFS_FS is not set
938# CONFIG_OCFS2_FS is not set 933# CONFIG_OCFS2_FS is not set
939# CONFIG_BTRFS_FS is not set 934# CONFIG_BTRFS_FS is not set
935CONFIG_FILE_LOCKING=y
936CONFIG_FSNOTIFY=y
940CONFIG_DNOTIFY=y 937CONFIG_DNOTIFY=y
941CONFIG_INOTIFY=y 938CONFIG_INOTIFY=y
942CONFIG_INOTIFY_USER=y 939CONFIG_INOTIFY_USER=y
@@ -1088,31 +1085,17 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1088CONFIG_HAVE_DYNAMIC_FTRACE=y 1085CONFIG_HAVE_DYNAMIC_FTRACE=y
1089CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1086CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1090CONFIG_RING_BUFFER=y 1087CONFIG_RING_BUFFER=y
1088CONFIG_EVENT_TRACING=y
1089CONFIG_CONTEXT_SWITCH_TRACER=y
1091CONFIG_TRACING=y 1090CONFIG_TRACING=y
1092CONFIG_TRACING_SUPPORT=y 1091CONFIG_TRACING_SUPPORT=y
1093 1092# CONFIG_FTRACE is not set
1094#
1095# Tracers
1096#
1097# CONFIG_FUNCTION_TRACER is not set
1098# CONFIG_IRQSOFF_TRACER is not set
1099# CONFIG_SCHED_TRACER is not set
1100# CONFIG_CONTEXT_SWITCH_TRACER is not set
1101# CONFIG_EVENT_TRACER is not set
1102# CONFIG_BOOT_TRACER is not set
1103# CONFIG_TRACE_BRANCH_PROFILING is not set
1104# CONFIG_STACK_TRACER is not set
1105# CONFIG_KMEMTRACE is not set
1106# CONFIG_WORKQUEUE_TRACER is not set
1107# CONFIG_BLK_DEV_IO_TRACE is not set
1108# CONFIG_FTRACE_STARTUP_TEST is not set
1109# CONFIG_DYNAMIC_DEBUG is not set 1093# CONFIG_DYNAMIC_DEBUG is not set
1110# CONFIG_DMA_API_DEBUG is not set 1094# CONFIG_DMA_API_DEBUG is not set
1111# CONFIG_SAMPLES is not set 1095# CONFIG_SAMPLES is not set
1112CONFIG_HAVE_ARCH_KGDB=y 1096CONFIG_HAVE_ARCH_KGDB=y
1113# CONFIG_SH_STANDARD_BIOS is not set 1097# CONFIG_SH_STANDARD_BIOS is not set
1114# CONFIG_EARLY_SCIF_CONSOLE is not set 1098# CONFIG_EARLY_SCIF_CONSOLE is not set
1115# CONFIG_MORE_COMPILE_OPTIONS is not set
1116 1099
1117# 1100#
1118# Security options 1101# Security options
@@ -1226,3 +1209,4 @@ CONFIG_HAS_IOMEM=y
1226CONFIG_HAS_IOPORT=y 1209CONFIG_HAS_IOPORT=y
1227CONFIG_HAS_DMA=y 1210CONFIG_HAS_DMA=y
1228CONFIG_NLATTR=y 1211CONFIG_NLATTR=y
1212CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/hp6xx_defconfig b/arch/sh/configs/hp6xx_defconfig
index 8e13027eecc3..3249d46fdc13 100644
--- a/arch/sh/configs/hp6xx_defconfig
+++ b/arch/sh/configs/hp6xx_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:47:15 2009 4# Thu Jun 18 12:28:12 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20CONFIG_ARCH_SUSPEND_POSSIBLE=y 20CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_APM_EMULATION=y 22CONFIG_SYS_SUPPORTS_APM_EMULATION=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -68,7 +69,6 @@ CONFIG_UID16=y
68# CONFIG_SYSCTL_SYSCALL is not set 69# CONFIG_SYSCTL_SYSCALL is not set
69CONFIG_KALLSYMS=y 70CONFIG_KALLSYMS=y
70# CONFIG_KALLSYMS_EXTRA_PASS is not set 71# CONFIG_KALLSYMS_EXTRA_PASS is not set
71# CONFIG_STRIP_ASM_SYMS is not set
72CONFIG_HOTPLUG=y 72CONFIG_HOTPLUG=y
73CONFIG_PRINTK=y 73CONFIG_PRINTK=y
74CONFIG_BUG=y 74CONFIG_BUG=y
@@ -81,7 +81,12 @@ CONFIG_TIMERFD=y
81CONFIG_EVENTFD=y 81CONFIG_EVENTFD=y
82CONFIG_SHMEM=y 82CONFIG_SHMEM=y
83CONFIG_AIO=y 83CONFIG_AIO=y
84
85#
86# Performance Counters
87#
84CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
89# CONFIG_STRIP_ASM_SYMS is not set
85CONFIG_COMPAT_BRK=y 90CONFIG_COMPAT_BRK=y
86CONFIG_SLAB=y 91CONFIG_SLAB=y
87# CONFIG_SLUB is not set 92# CONFIG_SLUB is not set
@@ -165,6 +170,7 @@ CONFIG_CPU_SUBTYPE_SH7709=y
165CONFIG_QUICKLIST=y 170CONFIG_QUICKLIST=y
166CONFIG_MMU=y 171CONFIG_MMU=y
167CONFIG_PAGE_OFFSET=0x80000000 172CONFIG_PAGE_OFFSET=0x80000000
173CONFIG_FORCE_MAX_ZONEORDER=11
168CONFIG_MEMORY_START=0x0d000000 174CONFIG_MEMORY_START=0x0d000000
169CONFIG_MEMORY_SIZE=0x00400000 175CONFIG_MEMORY_SIZE=0x00400000
170CONFIG_29BIT=y 176CONFIG_29BIT=y
@@ -179,7 +185,6 @@ CONFIG_PAGE_SIZE_4KB=y
179# CONFIG_PAGE_SIZE_8KB is not set 185# CONFIG_PAGE_SIZE_8KB is not set
180# CONFIG_PAGE_SIZE_16KB is not set 186# CONFIG_PAGE_SIZE_16KB is not set
181# CONFIG_PAGE_SIZE_64KB is not set 187# CONFIG_PAGE_SIZE_64KB is not set
182CONFIG_ENTRY_OFFSET=0x00001000
183CONFIG_SELECT_MEMORY_MODEL=y 188CONFIG_SELECT_MEMORY_MODEL=y
184CONFIG_FLATMEM_MANUAL=y 189CONFIG_FLATMEM_MANUAL=y
185# CONFIG_DISCONTIGMEM_MANUAL is not set 190# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -192,9 +197,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
192# CONFIG_PHYS_ADDR_T_64BIT is not set 197# CONFIG_PHYS_ADDR_T_64BIT is not set
193CONFIG_ZONE_DMA_FLAG=0 198CONFIG_ZONE_DMA_FLAG=0
194CONFIG_NR_QUICK=2 199CONFIG_NR_QUICK=2
195CONFIG_UNEVICTABLE_LRU=y
196CONFIG_HAVE_MLOCK=y 200CONFIG_HAVE_MLOCK=y
197CONFIG_HAVE_MLOCKED_PAGE_BIT=y 201CONFIG_HAVE_MLOCKED_PAGE_BIT=y
202CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
198 203
199# 204#
200# Cache configuration 205# Cache configuration
@@ -223,9 +228,10 @@ CONFIG_SH_HP6XX=y
223# 228#
224# Timer and clock configuration 229# Timer and clock configuration
225# 230#
226CONFIG_SH_TMU=y 231CONFIG_SH_TIMER_TMU=y
227CONFIG_SH_TIMER_IRQ=16
228CONFIG_SH_PCLK_FREQ=22110000 232CONFIG_SH_PCLK_FREQ=22110000
233CONFIG_SH_CLK_CPG=y
234CONFIG_SH_CLK_CPG_LEGACY=y
229# CONFIG_NO_HZ is not set 235# CONFIG_NO_HZ is not set
230# CONFIG_HIGH_RES_TIMERS is not set 236# CONFIG_HIGH_RES_TIMERS is not set
231CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 237CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -249,7 +255,6 @@ CONFIG_NR_ONCHIP_DMA_CHANNELS=6
249CONFIG_HD6446X_SERIES=y 255CONFIG_HD6446X_SERIES=y
250CONFIG_HD64461=y 256CONFIG_HD64461=y
251CONFIG_HD64461_IRQ=36 257CONFIG_HD64461_IRQ=36
252CONFIG_HD64461_IOBASE=0xb0000000
253CONFIG_HD64461_ENABLER=y 258CONFIG_HD64461_ENABLER=y
254 259
255# 260#
@@ -275,12 +280,14 @@ CONFIG_PREEMPT_NONE=y
275# CONFIG_PREEMPT is not set 280# CONFIG_PREEMPT is not set
276CONFIG_GUSA=y 281CONFIG_GUSA=y
277# CONFIG_GUSA_RB is not set 282# CONFIG_GUSA_RB is not set
283# CONFIG_SPARSE_IRQ is not set
278 284
279# 285#
280# Boot options 286# Boot options
281# 287#
282CONFIG_ZERO_PAGE_OFFSET=0x00001000 288CONFIG_ZERO_PAGE_OFFSET=0x00001000
283CONFIG_BOOT_LINK_OFFSET=0x00800000 289CONFIG_BOOT_LINK_OFFSET=0x00800000
290CONFIG_ENTRY_OFFSET=0x00001000
284# CONFIG_CMDLINE_BOOL is not set 291# CONFIG_CMDLINE_BOOL is not set
285 292
286# 293#
@@ -370,10 +377,6 @@ CONFIG_BLK_DEV_SD=y
370# CONFIG_BLK_DEV_SR is not set 377# CONFIG_BLK_DEV_SR is not set
371# CONFIG_CHR_DEV_SG is not set 378# CONFIG_CHR_DEV_SG is not set
372# CONFIG_CHR_DEV_SCH is not set 379# CONFIG_CHR_DEV_SCH is not set
373
374#
375# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
376#
377# CONFIG_SCSI_MULTI_LUN is not set 380# CONFIG_SCSI_MULTI_LUN is not set
378# CONFIG_SCSI_CONSTANTS is not set 381# CONFIG_SCSI_CONSTANTS is not set
379# CONFIG_SCSI_LOGGING is not set 382# CONFIG_SCSI_LOGGING is not set
@@ -387,6 +390,7 @@ CONFIG_BLK_DEV_SD=y
387# CONFIG_SCSI_SAS_LIBSAS is not set 390# CONFIG_SCSI_SAS_LIBSAS is not set
388# CONFIG_SCSI_SRP_ATTRS is not set 391# CONFIG_SCSI_SRP_ATTRS is not set
389CONFIG_SCSI_LOWLEVEL=y 392CONFIG_SCSI_LOWLEVEL=y
393# CONFIG_SCSI_BNX2_ISCSI is not set
390# CONFIG_LIBFC is not set 394# CONFIG_LIBFC is not set
391# CONFIG_LIBFCOE is not set 395# CONFIG_LIBFCOE is not set
392# CONFIG_SCSI_DEBUG is not set 396# CONFIG_SCSI_DEBUG is not set
@@ -524,21 +528,7 @@ CONFIG_SSB_POSSIBLE=y
524# CONFIG_HTC_PASIC3 is not set 528# CONFIG_HTC_PASIC3 is not set
525# CONFIG_MFD_TMIO is not set 529# CONFIG_MFD_TMIO is not set
526# CONFIG_REGULATOR is not set 530# CONFIG_REGULATOR is not set
527 531# CONFIG_MEDIA_SUPPORT is not set
528#
529# Multimedia devices
530#
531
532#
533# Multimedia core support
534#
535# CONFIG_VIDEO_DEV is not set
536# CONFIG_VIDEO_MEDIA is not set
537
538#
539# Multimedia drivers
540#
541# CONFIG_DAB is not set
542 532
543# 533#
544# Graphics support 534# Graphics support
@@ -651,9 +641,14 @@ CONFIG_RTC_INTF_DEV=y
651# on-CPU RTC drivers 641# on-CPU RTC drivers
652# 642#
653CONFIG_RTC_DRV_SH=y 643CONFIG_RTC_DRV_SH=y
644# CONFIG_RTC_DRV_GENERIC is not set
654# CONFIG_DMADEVICES is not set 645# CONFIG_DMADEVICES is not set
655# CONFIG_AUXDISPLAY is not set 646# CONFIG_AUXDISPLAY is not set
656# CONFIG_UIO is not set 647# CONFIG_UIO is not set
648
649#
650# TI VLYNQ
651#
657# CONFIG_STAGING is not set 652# CONFIG_STAGING is not set
658 653
659# 654#
@@ -667,9 +662,10 @@ CONFIG_EXT2_FS=y
667# CONFIG_REISERFS_FS is not set 662# CONFIG_REISERFS_FS is not set
668# CONFIG_JFS_FS is not set 663# CONFIG_JFS_FS is not set
669# CONFIG_FS_POSIX_ACL is not set 664# CONFIG_FS_POSIX_ACL is not set
670CONFIG_FILE_LOCKING=y
671# CONFIG_XFS_FS is not set 665# CONFIG_XFS_FS is not set
672# CONFIG_BTRFS_FS is not set 666# CONFIG_BTRFS_FS is not set
667CONFIG_FILE_LOCKING=y
668CONFIG_FSNOTIFY=y
673CONFIG_DNOTIFY=y 669CONFIG_DNOTIFY=y
674CONFIG_INOTIFY=y 670CONFIG_INOTIFY=y
675CONFIG_INOTIFY_USER=y 671CONFIG_INOTIFY_USER=y
@@ -798,27 +794,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
798CONFIG_HAVE_DYNAMIC_FTRACE=y 794CONFIG_HAVE_DYNAMIC_FTRACE=y
799CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 795CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
800CONFIG_TRACING_SUPPORT=y 796CONFIG_TRACING_SUPPORT=y
801 797# CONFIG_FTRACE is not set
802#
803# Tracers
804#
805# CONFIG_FUNCTION_TRACER is not set
806# CONFIG_IRQSOFF_TRACER is not set
807# CONFIG_SCHED_TRACER is not set
808# CONFIG_CONTEXT_SWITCH_TRACER is not set
809# CONFIG_EVENT_TRACER is not set
810# CONFIG_BOOT_TRACER is not set
811# CONFIG_TRACE_BRANCH_PROFILING is not set
812# CONFIG_STACK_TRACER is not set
813# CONFIG_KMEMTRACE is not set
814# CONFIG_WORKQUEUE_TRACER is not set
815# CONFIG_BLK_DEV_IO_TRACE is not set
816# CONFIG_DMA_API_DEBUG is not set 798# CONFIG_DMA_API_DEBUG is not set
817# CONFIG_SAMPLES is not set 799# CONFIG_SAMPLES is not set
818CONFIG_HAVE_ARCH_KGDB=y 800CONFIG_HAVE_ARCH_KGDB=y
819# CONFIG_SH_STANDARD_BIOS is not set 801# CONFIG_SH_STANDARD_BIOS is not set
820# CONFIG_EARLY_SCIF_CONSOLE is not set 802# CONFIG_EARLY_SCIF_CONSOLE is not set
821# CONFIG_MORE_COMPILE_OPTIONS is not set
822 803
823# 804#
824# Security options 805# Security options
@@ -939,3 +920,4 @@ CONFIG_CRC32=y
939CONFIG_HAS_IOMEM=y 920CONFIG_HAS_IOMEM=y
940CONFIG_HAS_IOPORT=y 921CONFIG_HAS_IOPORT=y
941CONFIG_HAS_DMA=y 922CONFIG_HAS_DMA=y
923CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig
index 7f549aef0dfd..ba05739fda21 100644
--- a/arch/sh/configs/landisk_defconfig
+++ b/arch/sh/configs/landisk_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:47:48 2009 4# Thu Jun 18 12:28:45 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -70,7 +71,6 @@ CONFIG_UID16=y
70# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
72CONFIG_KALLSYMS_EXTRA_PASS=y 73CONFIG_KALLSYMS_EXTRA_PASS=y
73# CONFIG_STRIP_ASM_SYMS is not set
74CONFIG_HOTPLUG=y 74CONFIG_HOTPLUG=y
75CONFIG_PRINTK=y 75CONFIG_PRINTK=y
76CONFIG_BUG=y 76CONFIG_BUG=y
@@ -83,8 +83,13 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y 85CONFIG_AIO=y
86
87#
88# Performance Counters
89#
86CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
87CONFIG_PCI_QUIRKS=y 91CONFIG_PCI_QUIRKS=y
92# CONFIG_STRIP_ASM_SYMS is not set
88CONFIG_COMPAT_BRK=y 93CONFIG_COMPAT_BRK=y
89CONFIG_SLAB=y 94CONFIG_SLAB=y
90# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
@@ -174,6 +179,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
174CONFIG_QUICKLIST=y 179CONFIG_QUICKLIST=y
175CONFIG_MMU=y 180CONFIG_MMU=y
176CONFIG_PAGE_OFFSET=0x80000000 181CONFIG_PAGE_OFFSET=0x80000000
182CONFIG_FORCE_MAX_ZONEORDER=11
177CONFIG_MEMORY_START=0x0c000000 183CONFIG_MEMORY_START=0x0c000000
178CONFIG_MEMORY_SIZE=0x04000000 184CONFIG_MEMORY_SIZE=0x04000000
179CONFIG_29BIT=y 185CONFIG_29BIT=y
@@ -188,7 +194,6 @@ CONFIG_PAGE_SIZE_4KB=y
188# CONFIG_PAGE_SIZE_8KB is not set 194# CONFIG_PAGE_SIZE_8KB is not set
189# CONFIG_PAGE_SIZE_16KB is not set 195# CONFIG_PAGE_SIZE_16KB is not set
190# CONFIG_PAGE_SIZE_64KB is not set 196# CONFIG_PAGE_SIZE_64KB is not set
191CONFIG_ENTRY_OFFSET=0x00001000
192CONFIG_SELECT_MEMORY_MODEL=y 197CONFIG_SELECT_MEMORY_MODEL=y
193CONFIG_FLATMEM_MANUAL=y 198CONFIG_FLATMEM_MANUAL=y
194# CONFIG_DISCONTIGMEM_MANUAL is not set 199# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -201,9 +206,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
201# CONFIG_PHYS_ADDR_T_64BIT is not set 206# CONFIG_PHYS_ADDR_T_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=0 207CONFIG_ZONE_DMA_FLAG=0
203CONFIG_NR_QUICK=2 208CONFIG_NR_QUICK=2
204CONFIG_UNEVICTABLE_LRU=y
205CONFIG_HAVE_MLOCK=y 209CONFIG_HAVE_MLOCK=y
206CONFIG_HAVE_MLOCKED_PAGE_BIT=y 210CONFIG_HAVE_MLOCKED_PAGE_BIT=y
211CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
207 212
208# 213#
209# Cache configuration 214# Cache configuration
@@ -221,7 +226,6 @@ CONFIG_SH_FPU=y
221# CONFIG_SH_STORE_QUEUES is not set 226# CONFIG_SH_STORE_QUEUES is not set
222CONFIG_CPU_HAS_INTEVT=y 227CONFIG_CPU_HAS_INTEVT=y
223CONFIG_CPU_HAS_SR_RB=y 228CONFIG_CPU_HAS_SR_RB=y
224CONFIG_CPU_HAS_PTEA=y
225CONFIG_CPU_HAS_FPU=y 229CONFIG_CPU_HAS_FPU=y
226 230
227# 231#
@@ -237,9 +241,10 @@ CONFIG_SH_LANDISK=y
237# 241#
238# Timer and clock configuration 242# Timer and clock configuration
239# 243#
240CONFIG_SH_TMU=y 244CONFIG_SH_TIMER_TMU=y
241CONFIG_SH_TIMER_IRQ=16
242CONFIG_SH_PCLK_FREQ=33333333 245CONFIG_SH_PCLK_FREQ=33333333
246CONFIG_SH_CLK_CPG=y
247CONFIG_SH_CLK_CPG_LEGACY=y
243# CONFIG_NO_HZ is not set 248# CONFIG_NO_HZ is not set
244# CONFIG_HIGH_RES_TIMERS is not set 249# CONFIG_HIGH_RES_TIMERS is not set
245CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 250CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -281,12 +286,14 @@ CONFIG_PREEMPT_NONE=y
281# CONFIG_PREEMPT is not set 286# CONFIG_PREEMPT is not set
282CONFIG_GUSA=y 287CONFIG_GUSA=y
283# CONFIG_GUSA_RB is not set 288# CONFIG_GUSA_RB is not set
289# CONFIG_SPARSE_IRQ is not set
284 290
285# 291#
286# Boot options 292# Boot options
287# 293#
288CONFIG_ZERO_PAGE_OFFSET=0x00001000 294CONFIG_ZERO_PAGE_OFFSET=0x00001000
289CONFIG_BOOT_LINK_OFFSET=0x00800000 295CONFIG_BOOT_LINK_OFFSET=0x00800000
296CONFIG_ENTRY_OFFSET=0x00001000
290# CONFIG_UBC_WAKEUP is not set 297# CONFIG_UBC_WAKEUP is not set
291# CONFIG_CMDLINE_BOOL is not set 298# CONFIG_CMDLINE_BOOL is not set
292 299
@@ -420,6 +427,7 @@ CONFIG_ATALK=m
420# CONFIG_ECONET is not set 427# CONFIG_ECONET is not set
421# CONFIG_WAN_ROUTER is not set 428# CONFIG_WAN_ROUTER is not set
422# CONFIG_PHONET is not set 429# CONFIG_PHONET is not set
430# CONFIG_IEEE802154 is not set
423# CONFIG_NET_SCHED is not set 431# CONFIG_NET_SCHED is not set
424# CONFIG_DCB is not set 432# CONFIG_DCB is not set
425 433
@@ -437,7 +445,11 @@ CONFIG_WIRELESS=y
437# CONFIG_WIRELESS_OLD_REGULATORY is not set 445# CONFIG_WIRELESS_OLD_REGULATORY is not set
438# CONFIG_WIRELESS_EXT is not set 446# CONFIG_WIRELESS_EXT is not set
439# CONFIG_LIB80211 is not set 447# CONFIG_LIB80211 is not set
440# CONFIG_MAC80211 is not set 448
449#
450# CFG80211 needs to be enabled for MAC80211
451#
452CONFIG_MAC80211_DEFAULT_PS_VALUE=0
441# CONFIG_WIMAX is not set 453# CONFIG_WIMAX is not set
442# CONFIG_RFKILL is not set 454# CONFIG_RFKILL is not set
443# CONFIG_NET_9P is not set 455# CONFIG_NET_9P is not set
@@ -488,6 +500,7 @@ CONFIG_MISC_DEVICES=y
488# EEPROM support 500# EEPROM support
489# 501#
490# CONFIG_EEPROM_93CX6 is not set 502# CONFIG_EEPROM_93CX6 is not set
503# CONFIG_CB710_CORE is not set
491CONFIG_HAVE_IDE=y 504CONFIG_HAVE_IDE=y
492CONFIG_IDE=y 505CONFIG_IDE=y
493 506
@@ -567,10 +580,6 @@ CONFIG_BLK_DEV_SD=y
567# CONFIG_BLK_DEV_SR is not set 580# CONFIG_BLK_DEV_SR is not set
568# CONFIG_CHR_DEV_SG is not set 581# CONFIG_CHR_DEV_SG is not set
569# CONFIG_CHR_DEV_SCH is not set 582# CONFIG_CHR_DEV_SCH is not set
570
571#
572# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
573#
574CONFIG_SCSI_MULTI_LUN=y 583CONFIG_SCSI_MULTI_LUN=y
575# CONFIG_SCSI_CONSTANTS is not set 584# CONFIG_SCSI_CONSTANTS is not set
576# CONFIG_SCSI_LOGGING is not set 585# CONFIG_SCSI_LOGGING is not set
@@ -588,6 +597,7 @@ CONFIG_SCSI_WAIT_SCAN=m
588CONFIG_SCSI_LOWLEVEL=y 597CONFIG_SCSI_LOWLEVEL=y
589# CONFIG_ISCSI_TCP is not set 598# CONFIG_ISCSI_TCP is not set
590# CONFIG_SCSI_CXGB3_ISCSI is not set 599# CONFIG_SCSI_CXGB3_ISCSI is not set
600# CONFIG_SCSI_BNX2_ISCSI is not set
591# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 601# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
592# CONFIG_SCSI_3W_9XXX is not set 602# CONFIG_SCSI_3W_9XXX is not set
593# CONFIG_SCSI_ACARD is not set 603# CONFIG_SCSI_ACARD is not set
@@ -596,6 +606,7 @@ CONFIG_SCSI_LOWLEVEL=y
596# CONFIG_SCSI_AIC7XXX_OLD is not set 606# CONFIG_SCSI_AIC7XXX_OLD is not set
597# CONFIG_SCSI_AIC79XX is not set 607# CONFIG_SCSI_AIC79XX is not set
598# CONFIG_SCSI_AIC94XX is not set 608# CONFIG_SCSI_AIC94XX is not set
609# CONFIG_SCSI_MVSAS is not set
599# CONFIG_SCSI_ARCMSR is not set 610# CONFIG_SCSI_ARCMSR is not set
600# CONFIG_MEGARAID_NEWGEN is not set 611# CONFIG_MEGARAID_NEWGEN is not set
601# CONFIG_MEGARAID_LEGACY is not set 612# CONFIG_MEGARAID_LEGACY is not set
@@ -610,7 +621,6 @@ CONFIG_SCSI_LOWLEVEL=y
610# CONFIG_SCSI_IPS is not set 621# CONFIG_SCSI_IPS is not set
611# CONFIG_SCSI_INITIO is not set 622# CONFIG_SCSI_INITIO is not set
612# CONFIG_SCSI_INIA100 is not set 623# CONFIG_SCSI_INIA100 is not set
613# CONFIG_SCSI_MVSAS is not set
614# CONFIG_SCSI_STEX is not set 624# CONFIG_SCSI_STEX is not set
615# CONFIG_SCSI_SYM53C8XX_2 is not set 625# CONFIG_SCSI_SYM53C8XX_2 is not set
616# CONFIG_SCSI_QLOGIC_1280 is not set 626# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -649,7 +659,6 @@ CONFIG_MD_RAID1=m
649# CONFIG_IEEE1394 is not set 659# CONFIG_IEEE1394 is not set
650# CONFIG_I2O is not set 660# CONFIG_I2O is not set
651CONFIG_NETDEVICES=y 661CONFIG_NETDEVICES=y
652CONFIG_COMPAT_NET_DEV_OPS=y
653# CONFIG_DUMMY is not set 662# CONFIG_DUMMY is not set
654# CONFIG_BONDING is not set 663# CONFIG_BONDING is not set
655# CONFIG_MACVLAN is not set 664# CONFIG_MACVLAN is not set
@@ -698,6 +707,7 @@ CONFIG_8139CP=y
698# CONFIG_SMSC9420 is not set 707# CONFIG_SMSC9420 is not set
699# CONFIG_SUNDANCE is not set 708# CONFIG_SUNDANCE is not set
700# CONFIG_TLAN is not set 709# CONFIG_TLAN is not set
710# CONFIG_KS8842 is not set
701# CONFIG_VIA_RHINE is not set 711# CONFIG_VIA_RHINE is not set
702# CONFIG_SC92031 is not set 712# CONFIG_SC92031 is not set
703# CONFIG_ATL2 is not set 713# CONFIG_ATL2 is not set
@@ -895,65 +905,7 @@ CONFIG_SSB_POSSIBLE=y
895# CONFIG_HTC_PASIC3 is not set 905# CONFIG_HTC_PASIC3 is not set
896# CONFIG_MFD_TMIO is not set 906# CONFIG_MFD_TMIO is not set
897# CONFIG_REGULATOR is not set 907# CONFIG_REGULATOR is not set
898 908# CONFIG_MEDIA_SUPPORT is not set
899#
900# Multimedia devices
901#
902
903#
904# Multimedia core support
905#
906CONFIG_VIDEO_DEV=m
907CONFIG_VIDEO_V4L2_COMMON=m
908CONFIG_VIDEO_ALLOW_V4L1=y
909CONFIG_VIDEO_V4L1_COMPAT=y
910# CONFIG_DVB_CORE is not set
911CONFIG_VIDEO_MEDIA=m
912
913#
914# Multimedia drivers
915#
916# CONFIG_MEDIA_ATTACH is not set
917CONFIG_VIDEO_V4L2=m
918CONFIG_VIDEO_V4L1=m
919CONFIG_VIDEO_CAPTURE_DRIVERS=y
920# CONFIG_VIDEO_ADV_DEBUG is not set
921# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
922CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
923# CONFIG_VIDEO_VIVI is not set
924# CONFIG_VIDEO_CPIA is not set
925# CONFIG_VIDEO_CPIA2 is not set
926# CONFIG_SOC_CAMERA is not set
927CONFIG_V4L_USB_DRIVERS=y
928# CONFIG_USB_VIDEO_CLASS is not set
929CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
930# CONFIG_USB_GSPCA is not set
931# CONFIG_VIDEO_HDPVR is not set
932CONFIG_VIDEO_USBVIDEO=m
933CONFIG_USB_VICAM=m
934CONFIG_USB_IBMCAM=m
935CONFIG_USB_KONICAWC=m
936# CONFIG_USB_QUICKCAM_MESSENGER is not set
937# CONFIG_USB_ET61X251 is not set
938CONFIG_USB_OV511=m
939CONFIG_USB_SE401=m
940CONFIG_USB_SN9C102=m
941CONFIG_USB_STV680=m
942# CONFIG_USB_ZC0301 is not set
943CONFIG_USB_PWC=m
944# CONFIG_USB_PWC_DEBUG is not set
945CONFIG_USB_PWC_INPUT_EVDEV=y
946# CONFIG_USB_ZR364XX is not set
947# CONFIG_USB_STKWEBCAM is not set
948# CONFIG_USB_S2255 is not set
949CONFIG_RADIO_ADAPTERS=y
950# CONFIG_RADIO_GEMTEK_PCI is not set
951# CONFIG_RADIO_MAXIRADIO is not set
952# CONFIG_RADIO_MAESTRO is not set
953CONFIG_USB_DSBR=m
954# CONFIG_USB_SI470X is not set
955# CONFIG_USB_MR800 is not set
956# CONFIG_DAB is not set
957 909
958# 910#
959# Graphics support 911# Graphics support
@@ -1005,7 +957,7 @@ CONFIG_HID_BELKIN=m
1005CONFIG_HID_CHERRY=m 957CONFIG_HID_CHERRY=m
1006CONFIG_HID_CHICONY=m 958CONFIG_HID_CHICONY=m
1007CONFIG_HID_CYPRESS=m 959CONFIG_HID_CYPRESS=m
1008# CONFIG_DRAGONRISE_FF is not set 960# CONFIG_HID_DRAGONRISE is not set
1009CONFIG_HID_EZKEY=m 961CONFIG_HID_EZKEY=m
1010# CONFIG_HID_KYE is not set 962# CONFIG_HID_KYE is not set
1011CONFIG_HID_GYRATION=m 963CONFIG_HID_GYRATION=m
@@ -1022,10 +974,11 @@ CONFIG_HID_PETALYNX=m
1022CONFIG_HID_SAMSUNG=m 974CONFIG_HID_SAMSUNG=m
1023CONFIG_HID_SONY=m 975CONFIG_HID_SONY=m
1024CONFIG_HID_SUNPLUS=m 976CONFIG_HID_SUNPLUS=m
1025# CONFIG_GREENASIA_FF is not set 977# CONFIG_HID_GREENASIA is not set
978# CONFIG_HID_SMARTJOYPLUS is not set
1026# CONFIG_HID_TOPSEED is not set 979# CONFIG_HID_TOPSEED is not set
1027CONFIG_THRUSTMASTER_FF=m 980# CONFIG_HID_THRUSTMASTER is not set
1028CONFIG_ZEROPLUS_FF=m 981# CONFIG_HID_ZEROPLUS is not set
1029CONFIG_USB_SUPPORT=y 982CONFIG_USB_SUPPORT=y
1030CONFIG_USB_ARCH_HAS_HCD=y 983CONFIG_USB_ARCH_HAS_HCD=y
1031CONFIG_USB_ARCH_HAS_OHCI=y 984CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1051,6 +1004,7 @@ CONFIG_USB_MON=y
1051# USB Host Controller Drivers 1004# USB Host Controller Drivers
1052# 1005#
1053# CONFIG_USB_C67X00_HCD is not set 1006# CONFIG_USB_C67X00_HCD is not set
1007# CONFIG_USB_XHCI_HCD is not set
1054CONFIG_USB_EHCI_HCD=y 1008CONFIG_USB_EHCI_HCD=y
1055# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1009# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1056# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1010# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1191,10 +1145,15 @@ CONFIG_USB_SISUSBVGA_CON=y
1191# CONFIG_NEW_LEDS is not set 1145# CONFIG_NEW_LEDS is not set
1192# CONFIG_ACCESSIBILITY is not set 1146# CONFIG_ACCESSIBILITY is not set
1193# CONFIG_INFINIBAND is not set 1147# CONFIG_INFINIBAND is not set
1148CONFIG_RTC_LIB=y
1194# CONFIG_RTC_CLASS is not set 1149# CONFIG_RTC_CLASS is not set
1195# CONFIG_DMADEVICES is not set 1150# CONFIG_DMADEVICES is not set
1196# CONFIG_AUXDISPLAY is not set 1151# CONFIG_AUXDISPLAY is not set
1197# CONFIG_UIO is not set 1152# CONFIG_UIO is not set
1153
1154#
1155# TI VLYNQ
1156#
1198# CONFIG_STAGING is not set 1157# CONFIG_STAGING is not set
1199 1158
1200# 1159#
@@ -1217,10 +1176,11 @@ CONFIG_REISERFS_FS=y
1217# CONFIG_REISERFS_FS_XATTR is not set 1176# CONFIG_REISERFS_FS_XATTR is not set
1218# CONFIG_JFS_FS is not set 1177# CONFIG_JFS_FS is not set
1219# CONFIG_FS_POSIX_ACL is not set 1178# CONFIG_FS_POSIX_ACL is not set
1220CONFIG_FILE_LOCKING=y
1221# CONFIG_XFS_FS is not set 1179# CONFIG_XFS_FS is not set
1222# CONFIG_OCFS2_FS is not set 1180# CONFIG_OCFS2_FS is not set
1223# CONFIG_BTRFS_FS is not set 1181# CONFIG_BTRFS_FS is not set
1182CONFIG_FILE_LOCKING=y
1183CONFIG_FSNOTIFY=y
1224CONFIG_DNOTIFY=y 1184CONFIG_DNOTIFY=y
1225CONFIG_INOTIFY=y 1185CONFIG_INOTIFY=y
1226CONFIG_INOTIFY_USER=y 1186CONFIG_INOTIFY_USER=y
@@ -1383,28 +1343,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1383CONFIG_HAVE_DYNAMIC_FTRACE=y 1343CONFIG_HAVE_DYNAMIC_FTRACE=y
1384CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1344CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1385CONFIG_TRACING_SUPPORT=y 1345CONFIG_TRACING_SUPPORT=y
1386 1346# CONFIG_FTRACE is not set
1387#
1388# Tracers
1389#
1390# CONFIG_FUNCTION_TRACER is not set
1391# CONFIG_IRQSOFF_TRACER is not set
1392# CONFIG_SCHED_TRACER is not set
1393# CONFIG_CONTEXT_SWITCH_TRACER is not set
1394# CONFIG_EVENT_TRACER is not set
1395# CONFIG_BOOT_TRACER is not set
1396# CONFIG_TRACE_BRANCH_PROFILING is not set
1397# CONFIG_STACK_TRACER is not set
1398# CONFIG_KMEMTRACE is not set
1399# CONFIG_WORKQUEUE_TRACER is not set
1400# CONFIG_BLK_DEV_IO_TRACE is not set
1401# CONFIG_DMA_API_DEBUG is not set 1347# CONFIG_DMA_API_DEBUG is not set
1402# CONFIG_SAMPLES is not set 1348# CONFIG_SAMPLES is not set
1403CONFIG_HAVE_ARCH_KGDB=y 1349CONFIG_HAVE_ARCH_KGDB=y
1404CONFIG_SH_STANDARD_BIOS=y 1350CONFIG_SH_STANDARD_BIOS=y
1405# CONFIG_EARLY_SCIF_CONSOLE is not set 1351# CONFIG_EARLY_SCIF_CONSOLE is not set
1406# CONFIG_EARLY_PRINTK is not set 1352# CONFIG_EARLY_PRINTK is not set
1407# CONFIG_MORE_COMPILE_OPTIONS is not set
1408 1353
1409# 1354#
1410# Security options 1355# Security options
@@ -1518,3 +1463,4 @@ CONFIG_HAS_IOMEM=y
1518CONFIG_HAS_IOPORT=y 1463CONFIG_HAS_IOPORT=y
1519CONFIG_HAS_DMA=y 1464CONFIG_HAS_DMA=y
1520CONFIG_NLATTR=y 1465CONFIG_NLATTR=y
1466CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/lboxre2_defconfig b/arch/sh/configs/lboxre2_defconfig
index a7db539f2800..c0bc2fd033b9 100644
--- a/arch/sh/configs/lboxre2_defconfig
+++ b/arch/sh/configs/lboxre2_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:48:54 2009 4# Thu Jun 18 12:29:50 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -70,7 +71,6 @@ CONFIG_UID16=y
70# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
72CONFIG_KALLSYMS_EXTRA_PASS=y 73CONFIG_KALLSYMS_EXTRA_PASS=y
73# CONFIG_STRIP_ASM_SYMS is not set
74CONFIG_HOTPLUG=y 74CONFIG_HOTPLUG=y
75CONFIG_PRINTK=y 75CONFIG_PRINTK=y
76CONFIG_BUG=y 76CONFIG_BUG=y
@@ -83,8 +83,13 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y 85CONFIG_AIO=y
86
87#
88# Performance Counters
89#
86CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
87CONFIG_PCI_QUIRKS=y 91CONFIG_PCI_QUIRKS=y
92# CONFIG_STRIP_ASM_SYMS is not set
88CONFIG_COMPAT_BRK=y 93CONFIG_COMPAT_BRK=y
89CONFIG_SLAB=y 94CONFIG_SLAB=y
90# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
@@ -174,6 +179,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
174CONFIG_QUICKLIST=y 179CONFIG_QUICKLIST=y
175CONFIG_MMU=y 180CONFIG_MMU=y
176CONFIG_PAGE_OFFSET=0x80000000 181CONFIG_PAGE_OFFSET=0x80000000
182CONFIG_FORCE_MAX_ZONEORDER=11
177CONFIG_MEMORY_START=0x0c000000 183CONFIG_MEMORY_START=0x0c000000
178CONFIG_MEMORY_SIZE=0x04000000 184CONFIG_MEMORY_SIZE=0x04000000
179CONFIG_29BIT=y 185CONFIG_29BIT=y
@@ -188,7 +194,6 @@ CONFIG_PAGE_SIZE_4KB=y
188# CONFIG_PAGE_SIZE_8KB is not set 194# CONFIG_PAGE_SIZE_8KB is not set
189# CONFIG_PAGE_SIZE_16KB is not set 195# CONFIG_PAGE_SIZE_16KB is not set
190# CONFIG_PAGE_SIZE_64KB is not set 196# CONFIG_PAGE_SIZE_64KB is not set
191CONFIG_ENTRY_OFFSET=0x00001000
192CONFIG_SELECT_MEMORY_MODEL=y 197CONFIG_SELECT_MEMORY_MODEL=y
193CONFIG_FLATMEM_MANUAL=y 198CONFIG_FLATMEM_MANUAL=y
194# CONFIG_DISCONTIGMEM_MANUAL is not set 199# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -201,9 +206,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
201# CONFIG_PHYS_ADDR_T_64BIT is not set 206# CONFIG_PHYS_ADDR_T_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=0 207CONFIG_ZONE_DMA_FLAG=0
203CONFIG_NR_QUICK=2 208CONFIG_NR_QUICK=2
204CONFIG_UNEVICTABLE_LRU=y
205CONFIG_HAVE_MLOCK=y 209CONFIG_HAVE_MLOCK=y
206CONFIG_HAVE_MLOCKED_PAGE_BIT=y 210CONFIG_HAVE_MLOCKED_PAGE_BIT=y
211CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
207 212
208# 213#
209# Cache configuration 214# Cache configuration
@@ -221,7 +226,6 @@ CONFIG_SH_FPU=y
221# CONFIG_SH_STORE_QUEUES is not set 226# CONFIG_SH_STORE_QUEUES is not set
222CONFIG_CPU_HAS_INTEVT=y 227CONFIG_CPU_HAS_INTEVT=y
223CONFIG_CPU_HAS_SR_RB=y 228CONFIG_CPU_HAS_SR_RB=y
224CONFIG_CPU_HAS_PTEA=y
225CONFIG_CPU_HAS_FPU=y 229CONFIG_CPU_HAS_FPU=y
226 230
227# 231#
@@ -237,9 +241,10 @@ CONFIG_SH_LBOX_RE2=y
237# 241#
238# Timer and clock configuration 242# Timer and clock configuration
239# 243#
240CONFIG_SH_TMU=y 244CONFIG_SH_TIMER_TMU=y
241CONFIG_SH_TIMER_IRQ=16
242CONFIG_SH_PCLK_FREQ=40000000 245CONFIG_SH_PCLK_FREQ=40000000
246CONFIG_SH_CLK_CPG=y
247CONFIG_SH_CLK_CPG_LEGACY=y
243# CONFIG_NO_HZ is not set 248# CONFIG_NO_HZ is not set
244# CONFIG_HIGH_RES_TIMERS is not set 249# CONFIG_HIGH_RES_TIMERS is not set
245CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 250CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -281,12 +286,14 @@ CONFIG_PREEMPT_NONE=y
281# CONFIG_PREEMPT is not set 286# CONFIG_PREEMPT is not set
282CONFIG_GUSA=y 287CONFIG_GUSA=y
283# CONFIG_GUSA_RB is not set 288# CONFIG_GUSA_RB is not set
289# CONFIG_SPARSE_IRQ is not set
284 290
285# 291#
286# Boot options 292# Boot options
287# 293#
288CONFIG_ZERO_PAGE_OFFSET=0x00001000 294CONFIG_ZERO_PAGE_OFFSET=0x00001000
289CONFIG_BOOT_LINK_OFFSET=0x00800000 295CONFIG_BOOT_LINK_OFFSET=0x00800000
296CONFIG_ENTRY_OFFSET=0x00001000
290# CONFIG_UBC_WAKEUP is not set 297# CONFIG_UBC_WAKEUP is not set
291CONFIG_CMDLINE_BOOL=y 298CONFIG_CMDLINE_BOOL=y
292CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/sda1" 299CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/sda1"
@@ -418,6 +425,7 @@ CONFIG_NETFILTER_ADVANCED=y
418# CONFIG_ECONET is not set 425# CONFIG_ECONET is not set
419# CONFIG_WAN_ROUTER is not set 426# CONFIG_WAN_ROUTER is not set
420# CONFIG_PHONET is not set 427# CONFIG_PHONET is not set
428# CONFIG_IEEE802154 is not set
421# CONFIG_NET_SCHED is not set 429# CONFIG_NET_SCHED is not set
422# CONFIG_DCB is not set 430# CONFIG_DCB is not set
423 431
@@ -435,7 +443,11 @@ CONFIG_WIRELESS=y
435# CONFIG_WIRELESS_OLD_REGULATORY is not set 443# CONFIG_WIRELESS_OLD_REGULATORY is not set
436# CONFIG_WIRELESS_EXT is not set 444# CONFIG_WIRELESS_EXT is not set
437# CONFIG_LIB80211 is not set 445# CONFIG_LIB80211 is not set
438# CONFIG_MAC80211 is not set 446
447#
448# CFG80211 needs to be enabled for MAC80211
449#
450CONFIG_MAC80211_DEFAULT_PS_VALUE=0
439# CONFIG_WIMAX is not set 451# CONFIG_WIMAX is not set
440# CONFIG_RFKILL is not set 452# CONFIG_RFKILL is not set
441# CONFIG_NET_9P is not set 453# CONFIG_NET_9P is not set
@@ -485,6 +497,7 @@ CONFIG_MISC_DEVICES=y
485# EEPROM support 497# EEPROM support
486# 498#
487# CONFIG_EEPROM_93CX6 is not set 499# CONFIG_EEPROM_93CX6 is not set
500# CONFIG_CB710_CORE is not set
488CONFIG_HAVE_IDE=y 501CONFIG_HAVE_IDE=y
489# CONFIG_IDE is not set 502# CONFIG_IDE is not set
490 503
@@ -507,10 +520,6 @@ CONFIG_BLK_DEV_SD=y
507# CONFIG_BLK_DEV_SR is not set 520# CONFIG_BLK_DEV_SR is not set
508# CONFIG_CHR_DEV_SG is not set 521# CONFIG_CHR_DEV_SG is not set
509# CONFIG_CHR_DEV_SCH is not set 522# CONFIG_CHR_DEV_SCH is not set
510
511#
512# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
513#
514# CONFIG_SCSI_MULTI_LUN is not set 523# CONFIG_SCSI_MULTI_LUN is not set
515# CONFIG_SCSI_CONSTANTS is not set 524# CONFIG_SCSI_CONSTANTS is not set
516# CONFIG_SCSI_LOGGING is not set 525# CONFIG_SCSI_LOGGING is not set
@@ -528,6 +537,7 @@ CONFIG_SCSI_WAIT_SCAN=m
528CONFIG_SCSI_LOWLEVEL=y 537CONFIG_SCSI_LOWLEVEL=y
529# CONFIG_ISCSI_TCP is not set 538# CONFIG_ISCSI_TCP is not set
530# CONFIG_SCSI_CXGB3_ISCSI is not set 539# CONFIG_SCSI_CXGB3_ISCSI is not set
540# CONFIG_SCSI_BNX2_ISCSI is not set
531# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 541# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
532# CONFIG_SCSI_3W_9XXX is not set 542# CONFIG_SCSI_3W_9XXX is not set
533# CONFIG_SCSI_ACARD is not set 543# CONFIG_SCSI_ACARD is not set
@@ -536,6 +546,7 @@ CONFIG_SCSI_LOWLEVEL=y
536# CONFIG_SCSI_AIC7XXX_OLD is not set 546# CONFIG_SCSI_AIC7XXX_OLD is not set
537# CONFIG_SCSI_AIC79XX is not set 547# CONFIG_SCSI_AIC79XX is not set
538# CONFIG_SCSI_AIC94XX is not set 548# CONFIG_SCSI_AIC94XX is not set
549# CONFIG_SCSI_MVSAS is not set
539# CONFIG_SCSI_ARCMSR is not set 550# CONFIG_SCSI_ARCMSR is not set
540# CONFIG_MEGARAID_NEWGEN is not set 551# CONFIG_MEGARAID_NEWGEN is not set
541# CONFIG_MEGARAID_LEGACY is not set 552# CONFIG_MEGARAID_LEGACY is not set
@@ -550,7 +561,6 @@ CONFIG_SCSI_LOWLEVEL=y
550# CONFIG_SCSI_IPS is not set 561# CONFIG_SCSI_IPS is not set
551# CONFIG_SCSI_INITIO is not set 562# CONFIG_SCSI_INITIO is not set
552# CONFIG_SCSI_INIA100 is not set 563# CONFIG_SCSI_INIA100 is not set
553# CONFIG_SCSI_MVSAS is not set
554# CONFIG_SCSI_STEX is not set 564# CONFIG_SCSI_STEX is not set
555# CONFIG_SCSI_SYM53C8XX_2 is not set 565# CONFIG_SCSI_SYM53C8XX_2 is not set
556# CONFIG_SCSI_IPR is not set 566# CONFIG_SCSI_IPR is not set
@@ -641,7 +651,6 @@ CONFIG_PATA_PLATFORM=y
641# CONFIG_IEEE1394 is not set 651# CONFIG_IEEE1394 is not set
642# CONFIG_I2O is not set 652# CONFIG_I2O is not set
643CONFIG_NETDEVICES=y 653CONFIG_NETDEVICES=y
644CONFIG_COMPAT_NET_DEV_OPS=y
645# CONFIG_DUMMY is not set 654# CONFIG_DUMMY is not set
646# CONFIG_BONDING is not set 655# CONFIG_BONDING is not set
647# CONFIG_MACVLAN is not set 656# CONFIG_MACVLAN is not set
@@ -694,6 +703,7 @@ CONFIG_8139TOO_TUNE_TWISTER=y
694# CONFIG_SMSC9420 is not set 703# CONFIG_SMSC9420 is not set
695# CONFIG_SUNDANCE is not set 704# CONFIG_SUNDANCE is not set
696# CONFIG_TLAN is not set 705# CONFIG_TLAN is not set
706# CONFIG_KS8842 is not set
697# CONFIG_VIA_RHINE is not set 707# CONFIG_VIA_RHINE is not set
698# CONFIG_SC92031 is not set 708# CONFIG_SC92031 is not set
699# CONFIG_ATL2 is not set 709# CONFIG_ATL2 is not set
@@ -890,22 +900,7 @@ CONFIG_SSB_POSSIBLE=y
890# CONFIG_HTC_PASIC3 is not set 900# CONFIG_HTC_PASIC3 is not set
891# CONFIG_MFD_TMIO is not set 901# CONFIG_MFD_TMIO is not set
892# CONFIG_REGULATOR is not set 902# CONFIG_REGULATOR is not set
893 903# CONFIG_MEDIA_SUPPORT is not set
894#
895# Multimedia devices
896#
897
898#
899# Multimedia core support
900#
901# CONFIG_VIDEO_DEV is not set
902# CONFIG_DVB_CORE is not set
903# CONFIG_VIDEO_MEDIA is not set
904
905#
906# Multimedia drivers
907#
908# CONFIG_DAB is not set
909 904
910# 905#
911# Graphics support 906# Graphics support
@@ -998,9 +993,14 @@ CONFIG_RTC_INTF_DEV=y
998# on-CPU RTC drivers 993# on-CPU RTC drivers
999# 994#
1000# CONFIG_RTC_DRV_SH is not set 995# CONFIG_RTC_DRV_SH is not set
996# CONFIG_RTC_DRV_GENERIC is not set
1001# CONFIG_DMADEVICES is not set 997# CONFIG_DMADEVICES is not set
1002# CONFIG_AUXDISPLAY is not set 998# CONFIG_AUXDISPLAY is not set
1003# CONFIG_UIO is not set 999# CONFIG_UIO is not set
1000
1001#
1002# TI VLYNQ
1003#
1004# CONFIG_STAGING is not set 1004# CONFIG_STAGING is not set
1005 1005
1006# 1006#
@@ -1020,10 +1020,11 @@ CONFIG_FS_MBCACHE=y
1020# CONFIG_REISERFS_FS is not set 1020# CONFIG_REISERFS_FS is not set
1021# CONFIG_JFS_FS is not set 1021# CONFIG_JFS_FS is not set
1022# CONFIG_FS_POSIX_ACL is not set 1022# CONFIG_FS_POSIX_ACL is not set
1023CONFIG_FILE_LOCKING=y
1024# CONFIG_XFS_FS is not set 1023# CONFIG_XFS_FS is not set
1025# CONFIG_OCFS2_FS is not set 1024# CONFIG_OCFS2_FS is not set
1026# CONFIG_BTRFS_FS is not set 1025# CONFIG_BTRFS_FS is not set
1026CONFIG_FILE_LOCKING=y
1027CONFIG_FSNOTIFY=y
1027CONFIG_DNOTIFY=y 1028CONFIG_DNOTIFY=y
1028CONFIG_INOTIFY=y 1029CONFIG_INOTIFY=y
1029CONFIG_INOTIFY_USER=y 1030CONFIG_INOTIFY_USER=y
@@ -1166,28 +1167,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1166CONFIG_HAVE_DYNAMIC_FTRACE=y 1167CONFIG_HAVE_DYNAMIC_FTRACE=y
1167CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1168CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1168CONFIG_TRACING_SUPPORT=y 1169CONFIG_TRACING_SUPPORT=y
1169 1170# CONFIG_FTRACE is not set
1170#
1171# Tracers
1172#
1173# CONFIG_FUNCTION_TRACER is not set
1174# CONFIG_IRQSOFF_TRACER is not set
1175# CONFIG_SCHED_TRACER is not set
1176# CONFIG_CONTEXT_SWITCH_TRACER is not set
1177# CONFIG_EVENT_TRACER is not set
1178# CONFIG_BOOT_TRACER is not set
1179# CONFIG_TRACE_BRANCH_PROFILING is not set
1180# CONFIG_STACK_TRACER is not set
1181# CONFIG_KMEMTRACE is not set
1182# CONFIG_WORKQUEUE_TRACER is not set
1183# CONFIG_BLK_DEV_IO_TRACE is not set
1184# CONFIG_DMA_API_DEBUG is not set 1171# CONFIG_DMA_API_DEBUG is not set
1185# CONFIG_SAMPLES is not set 1172# CONFIG_SAMPLES is not set
1186CONFIG_HAVE_ARCH_KGDB=y 1173CONFIG_HAVE_ARCH_KGDB=y
1187CONFIG_SH_STANDARD_BIOS=y 1174CONFIG_SH_STANDARD_BIOS=y
1188# CONFIG_EARLY_SCIF_CONSOLE is not set 1175# CONFIG_EARLY_SCIF_CONSOLE is not set
1189# CONFIG_EARLY_PRINTK is not set 1176# CONFIG_EARLY_PRINTK is not set
1190# CONFIG_MORE_COMPILE_OPTIONS is not set
1191 1177
1192# 1178#
1193# Security options 1179# Security options
@@ -1301,3 +1287,4 @@ CONFIG_HAS_IOMEM=y
1301CONFIG_HAS_IOPORT=y 1287CONFIG_HAS_IOPORT=y
1302CONFIG_HAS_DMA=y 1288CONFIG_HAS_DMA=y
1303CONFIG_NLATTR=y 1289CONFIG_NLATTR=y
1290CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/magicpanelr2_defconfig b/arch/sh/configs/magicpanelr2_defconfig
index 58bec61506fa..c5859e82d916 100644
--- a/arch/sh/configs/magicpanelr2_defconfig
+++ b/arch/sh/configs/magicpanelr2_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:49:32 2009 4# Thu Jun 18 12:30:31 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,8 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_CMT=y
23CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -77,7 +79,6 @@ CONFIG_SYSCTL_SYSCALL=y
77CONFIG_KALLSYMS=y 79CONFIG_KALLSYMS=y
78CONFIG_KALLSYMS_ALL=y 80CONFIG_KALLSYMS_ALL=y
79# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
80# CONFIG_STRIP_ASM_SYMS is not set
81CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y 83CONFIG_PRINTK=y
83CONFIG_BUG=y 84CONFIG_BUG=y
@@ -90,7 +91,12 @@ CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 92CONFIG_SHMEM=y
92CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99# CONFIG_STRIP_ASM_SYMS is not set
94CONFIG_COMPAT_BRK=y 100CONFIG_COMPAT_BRK=y
95CONFIG_SLAB=y 101CONFIG_SLAB=y
96# CONFIG_SLUB is not set 102# CONFIG_SLUB is not set
@@ -180,6 +186,7 @@ CONFIG_CPU_SUBTYPE_SH7720=y
180CONFIG_QUICKLIST=y 186CONFIG_QUICKLIST=y
181CONFIG_MMU=y 187CONFIG_MMU=y
182CONFIG_PAGE_OFFSET=0x80000000 188CONFIG_PAGE_OFFSET=0x80000000
189CONFIG_FORCE_MAX_ZONEORDER=11
183CONFIG_MEMORY_START=0x0C000000 190CONFIG_MEMORY_START=0x0C000000
184CONFIG_MEMORY_SIZE=0x03F00000 191CONFIG_MEMORY_SIZE=0x03F00000
185CONFIG_29BIT=y 192CONFIG_29BIT=y
@@ -194,7 +201,6 @@ CONFIG_PAGE_SIZE_4KB=y
194# CONFIG_PAGE_SIZE_8KB is not set 201# CONFIG_PAGE_SIZE_8KB is not set
195# CONFIG_PAGE_SIZE_16KB is not set 202# CONFIG_PAGE_SIZE_16KB is not set
196# CONFIG_PAGE_SIZE_64KB is not set 203# CONFIG_PAGE_SIZE_64KB is not set
197CONFIG_ENTRY_OFFSET=0x00001000
198CONFIG_SELECT_MEMORY_MODEL=y 204CONFIG_SELECT_MEMORY_MODEL=y
199CONFIG_FLATMEM_MANUAL=y 205CONFIG_FLATMEM_MANUAL=y
200# CONFIG_DISCONTIGMEM_MANUAL is not set 206# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -207,9 +213,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
207# CONFIG_PHYS_ADDR_T_64BIT is not set 213# CONFIG_PHYS_ADDR_T_64BIT is not set
208CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
209CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
210CONFIG_UNEVICTABLE_LRU=y
211CONFIG_HAVE_MLOCK=y 216CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y 217CONFIG_HAVE_MLOCKED_PAGE_BIT=y
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
213 219
214# 220#
215# Cache configuration 221# Cache configuration
@@ -243,9 +249,11 @@ CONFIG_SH_MAGIC_PANEL_R2_VERSION=3
243# 249#
244# Timer and clock configuration 250# Timer and clock configuration
245# 251#
246CONFIG_SH_TMU=y 252CONFIG_SH_TIMER_TMU=y
247CONFIG_SH_TIMER_IRQ=16 253CONFIG_SH_TIMER_CMT=y
248CONFIG_SH_PCLK_FREQ=24000000 254CONFIG_SH_PCLK_FREQ=24000000
255CONFIG_SH_CLK_CPG=y
256CONFIG_SH_CLK_CPG_LEGACY=y
249# CONFIG_NO_HZ is not set 257# CONFIG_NO_HZ is not set
250# CONFIG_HIGH_RES_TIMERS is not set 258# CONFIG_HIGH_RES_TIMERS is not set
251CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 259CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -290,12 +298,14 @@ CONFIG_PREEMPT_NONE=y
290# CONFIG_PREEMPT is not set 298# CONFIG_PREEMPT is not set
291CONFIG_GUSA=y 299CONFIG_GUSA=y
292# CONFIG_GUSA_RB is not set 300# CONFIG_GUSA_RB is not set
301# CONFIG_SPARSE_IRQ is not set
293 302
294# 303#
295# Boot options 304# Boot options
296# 305#
297CONFIG_ZERO_PAGE_OFFSET=0x00001000 306CONFIG_ZERO_PAGE_OFFSET=0x00001000
298CONFIG_BOOT_LINK_OFFSET=0x00800000 307CONFIG_BOOT_LINK_OFFSET=0x00800000
308CONFIG_ENTRY_OFFSET=0x00001000
299# CONFIG_CMDLINE_BOOL is not set 309# CONFIG_CMDLINE_BOOL is not set
300 310
301# 311#
@@ -372,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
372# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
373# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
374# CONFIG_PHONET is not set 384# CONFIG_PHONET is not set
385# CONFIG_IEEE802154 is not set
375# CONFIG_NET_SCHED is not set 386# CONFIG_NET_SCHED is not set
376# CONFIG_DCB is not set 387# CONFIG_DCB is not set
377 388
@@ -389,7 +400,11 @@ CONFIG_WIRELESS=y
389# CONFIG_WIRELESS_OLD_REGULATORY is not set 400# CONFIG_WIRELESS_OLD_REGULATORY is not set
390# CONFIG_WIRELESS_EXT is not set 401# CONFIG_WIRELESS_EXT is not set
391# CONFIG_LIB80211 is not set 402# CONFIG_LIB80211 is not set
392# CONFIG_MAC80211 is not set 403
404#
405# CFG80211 needs to be enabled for MAC80211
406#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
393# CONFIG_WIMAX is not set 408# CONFIG_WIMAX is not set
394# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
395# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
@@ -528,7 +543,6 @@ CONFIG_HAVE_IDE=y
528# CONFIG_ATA is not set 543# CONFIG_ATA is not set
529# CONFIG_MD is not set 544# CONFIG_MD is not set
530CONFIG_NETDEVICES=y 545CONFIG_NETDEVICES=y
531CONFIG_COMPAT_NET_DEV_OPS=y
532# CONFIG_DUMMY is not set 546# CONFIG_DUMMY is not set
533# CONFIG_BONDING is not set 547# CONFIG_BONDING is not set
534# CONFIG_MACVLAN is not set 548# CONFIG_MACVLAN is not set
@@ -572,6 +586,7 @@ CONFIG_SMSC911X=y
572# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 586# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
573# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 587# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
574# CONFIG_B44 is not set 588# CONFIG_B44 is not set
589# CONFIG_KS8842 is not set
575# CONFIG_NETDEV_1000 is not set 590# CONFIG_NETDEV_1000 is not set
576# CONFIG_NETDEV_10000 is not set 591# CONFIG_NETDEV_10000 is not set
577 592
@@ -727,22 +742,7 @@ CONFIG_SSB_POSSIBLE=y
727# CONFIG_HTC_PASIC3 is not set 742# CONFIG_HTC_PASIC3 is not set
728# CONFIG_MFD_TMIO is not set 743# CONFIG_MFD_TMIO is not set
729# CONFIG_REGULATOR is not set 744# CONFIG_REGULATOR is not set
730 745# CONFIG_MEDIA_SUPPORT is not set
731#
732# Multimedia devices
733#
734
735#
736# Multimedia core support
737#
738# CONFIG_VIDEO_DEV is not set
739# CONFIG_DVB_CORE is not set
740# CONFIG_VIDEO_MEDIA is not set
741
742#
743# Multimedia drivers
744#
745CONFIG_DAB=y
746 746
747# 747#
748# Graphics support 748# Graphics support
@@ -804,9 +804,14 @@ CONFIG_RTC_INTF_DEV=y
804# on-CPU RTC drivers 804# on-CPU RTC drivers
805# 805#
806CONFIG_RTC_DRV_SH=y 806CONFIG_RTC_DRV_SH=y
807# CONFIG_RTC_DRV_GENERIC is not set
807# CONFIG_DMADEVICES is not set 808# CONFIG_DMADEVICES is not set
808# CONFIG_AUXDISPLAY is not set 809# CONFIG_AUXDISPLAY is not set
809# CONFIG_UIO is not set 810# CONFIG_UIO is not set
811
812#
813# TI VLYNQ
814#
810# CONFIG_STAGING is not set 815# CONFIG_STAGING is not set
811 816
812# 817#
@@ -823,12 +828,14 @@ CONFIG_JBD=y
823# CONFIG_REISERFS_FS is not set 828# CONFIG_REISERFS_FS is not set
824# CONFIG_JFS_FS is not set 829# CONFIG_JFS_FS is not set
825# CONFIG_FS_POSIX_ACL is not set 830# CONFIG_FS_POSIX_ACL is not set
826CONFIG_FILE_LOCKING=y
827# CONFIG_XFS_FS is not set 831# CONFIG_XFS_FS is not set
828# CONFIG_OCFS2_FS is not set 832# CONFIG_OCFS2_FS is not set
829# CONFIG_BTRFS_FS is not set 833# CONFIG_BTRFS_FS is not set
834CONFIG_FILE_LOCKING=y
835CONFIG_FSNOTIFY=y
830# CONFIG_DNOTIFY is not set 836# CONFIG_DNOTIFY is not set
831# CONFIG_INOTIFY is not set 837# CONFIG_INOTIFY is not set
838CONFIG_INOTIFY_USER=y
832# CONFIG_QUOTA is not set 839# CONFIG_QUOTA is not set
833# CONFIG_AUTOFS_FS is not set 840# CONFIG_AUTOFS_FS is not set
834# CONFIG_AUTOFS4_FS is not set 841# CONFIG_AUTOFS4_FS is not set
@@ -1012,17 +1019,15 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1012CONFIG_HAVE_DYNAMIC_FTRACE=y 1019CONFIG_HAVE_DYNAMIC_FTRACE=y
1013CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1020CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1014CONFIG_TRACING_SUPPORT=y 1021CONFIG_TRACING_SUPPORT=y
1015 1022CONFIG_FTRACE=y
1016#
1017# Tracers
1018#
1019# CONFIG_FUNCTION_TRACER is not set 1023# CONFIG_FUNCTION_TRACER is not set
1020# CONFIG_IRQSOFF_TRACER is not set 1024# CONFIG_IRQSOFF_TRACER is not set
1021# CONFIG_SCHED_TRACER is not set 1025# CONFIG_SCHED_TRACER is not set
1022# CONFIG_CONTEXT_SWITCH_TRACER is not set 1026# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1023# CONFIG_EVENT_TRACER is not set
1024# CONFIG_BOOT_TRACER is not set 1027# CONFIG_BOOT_TRACER is not set
1025# CONFIG_TRACE_BRANCH_PROFILING is not set 1028CONFIG_BRANCH_PROFILE_NONE=y
1029# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1030# CONFIG_PROFILE_ALL_BRANCHES is not set
1026# CONFIG_STACK_TRACER is not set 1031# CONFIG_STACK_TRACER is not set
1027# CONFIG_KMEMTRACE is not set 1032# CONFIG_KMEMTRACE is not set
1028# CONFIG_WORKQUEUE_TRACER is not set 1033# CONFIG_WORKQUEUE_TRACER is not set
@@ -1031,6 +1036,7 @@ CONFIG_TRACING_SUPPORT=y
1031# CONFIG_SAMPLES is not set 1036# CONFIG_SAMPLES is not set
1032CONFIG_HAVE_ARCH_KGDB=y 1037CONFIG_HAVE_ARCH_KGDB=y
1033# CONFIG_KGDB is not set 1038# CONFIG_KGDB is not set
1039# CONFIG_KMEMCHECK is not set
1034# CONFIG_SH_STANDARD_BIOS is not set 1040# CONFIG_SH_STANDARD_BIOS is not set
1035CONFIG_EARLY_SCIF_CONSOLE=y 1041CONFIG_EARLY_SCIF_CONSOLE=y
1036CONFIG_EARLY_SCIF_CONSOLE_PORT=0xa4430000 1042CONFIG_EARLY_SCIF_CONSOLE_PORT=0xa4430000
@@ -1039,10 +1045,8 @@ CONFIG_EARLY_PRINTK=y
1039# CONFIG_DEBUG_STACKOVERFLOW is not set 1045# CONFIG_DEBUG_STACKOVERFLOW is not set
1040# CONFIG_DEBUG_STACK_USAGE is not set 1046# CONFIG_DEBUG_STACK_USAGE is not set
1041# CONFIG_4KSTACKS is not set 1047# CONFIG_4KSTACKS is not set
1042# CONFIG_IRQSTACKS is not set
1043CONFIG_DUMP_CODE=y 1048CONFIG_DUMP_CODE=y
1044# CONFIG_SH_NO_BSS_INIT is not set 1049# CONFIG_SH_NO_BSS_INIT is not set
1045# CONFIG_MORE_COMPILE_OPTIONS is not set
1046 1050
1047# 1051#
1048# Security options 1052# Security options
@@ -1074,3 +1078,4 @@ CONFIG_HAS_IOMEM=y
1074CONFIG_HAS_IOPORT=y 1078CONFIG_HAS_IOPORT=y
1075CONFIG_HAS_DMA=y 1079CONFIG_HAS_DMA=y
1076CONFIG_NLATTR=y 1080CONFIG_NLATTR=y
1081CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/microdev_defconfig b/arch/sh/configs/microdev_defconfig
index 2886fc84bc1c..e5a21e1d625c 100644
--- a/arch/sh/configs/microdev_defconfig
+++ b/arch/sh/configs/microdev_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:50:51 2009 4# Thu Jun 18 12:31:56 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -74,7 +75,6 @@ CONFIG_UID16=y
74# CONFIG_SYSCTL_SYSCALL is not set 75# CONFIG_SYSCTL_SYSCALL is not set
75CONFIG_KALLSYMS=y 76CONFIG_KALLSYMS=y
76# CONFIG_KALLSYMS_EXTRA_PASS is not set 77# CONFIG_KALLSYMS_EXTRA_PASS is not set
77# CONFIG_STRIP_ASM_SYMS is not set
78CONFIG_HOTPLUG=y 78CONFIG_HOTPLUG=y
79CONFIG_PRINTK=y 79CONFIG_PRINTK=y
80CONFIG_BUG=y 80CONFIG_BUG=y
@@ -87,7 +87,12 @@ CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 87CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 88CONFIG_SHMEM=y
89CONFIG_AIO=y 89CONFIG_AIO=y
90
91#
92# Performance Counters
93#
90CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
91CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 97CONFIG_SLAB=y
93# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
@@ -171,6 +176,7 @@ CONFIG_CPU_SUBTYPE_SH4_202=y
171CONFIG_QUICKLIST=y 176CONFIG_QUICKLIST=y
172CONFIG_MMU=y 177CONFIG_MMU=y
173CONFIG_PAGE_OFFSET=0x80000000 178CONFIG_PAGE_OFFSET=0x80000000
179CONFIG_FORCE_MAX_ZONEORDER=11
174CONFIG_MEMORY_START=0x08000000 180CONFIG_MEMORY_START=0x08000000
175CONFIG_MEMORY_SIZE=0x04000000 181CONFIG_MEMORY_SIZE=0x04000000
176CONFIG_29BIT=y 182CONFIG_29BIT=y
@@ -185,7 +191,6 @@ CONFIG_PAGE_SIZE_4KB=y
185# CONFIG_PAGE_SIZE_8KB is not set 191# CONFIG_PAGE_SIZE_8KB is not set
186# CONFIG_PAGE_SIZE_16KB is not set 192# CONFIG_PAGE_SIZE_16KB is not set
187# CONFIG_PAGE_SIZE_64KB is not set 193# CONFIG_PAGE_SIZE_64KB is not set
188CONFIG_ENTRY_OFFSET=0x00001000
189CONFIG_HUGETLB_PAGE_SIZE_64K=y 194CONFIG_HUGETLB_PAGE_SIZE_64K=y
190# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 195# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
191# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 196# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -204,9 +209,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
204# CONFIG_PHYS_ADDR_T_64BIT is not set 209# CONFIG_PHYS_ADDR_T_64BIT is not set
205CONFIG_ZONE_DMA_FLAG=0 210CONFIG_ZONE_DMA_FLAG=0
206CONFIG_NR_QUICK=2 211CONFIG_NR_QUICK=2
207CONFIG_UNEVICTABLE_LRU=y
208CONFIG_HAVE_MLOCK=y 212CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y 213CONFIG_HAVE_MLOCKED_PAGE_BIT=y
214CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
210 215
211# 216#
212# Cache configuration 217# Cache configuration
@@ -224,7 +229,6 @@ CONFIG_SH_FPU=y
224# CONFIG_SH_STORE_QUEUES is not set 229# CONFIG_SH_STORE_QUEUES is not set
225CONFIG_CPU_HAS_INTEVT=y 230CONFIG_CPU_HAS_INTEVT=y
226CONFIG_CPU_HAS_SR_RB=y 231CONFIG_CPU_HAS_SR_RB=y
227CONFIG_CPU_HAS_PTEA=y
228CONFIG_CPU_HAS_FPU=y 232CONFIG_CPU_HAS_FPU=y
229 233
230# 234#
@@ -235,9 +239,10 @@ CONFIG_SH_SH4202_MICRODEV=y
235# 239#
236# Timer and clock configuration 240# Timer and clock configuration
237# 241#
238CONFIG_SH_TMU=y 242CONFIG_SH_TIMER_TMU=y
239CONFIG_SH_TIMER_IRQ=16
240CONFIG_SH_PCLK_FREQ=66000000 243CONFIG_SH_PCLK_FREQ=66000000
244CONFIG_SH_CLK_CPG=y
245CONFIG_SH_CLK_CPG_LEGACY=y
241# CONFIG_NO_HZ is not set 246# CONFIG_NO_HZ is not set
242# CONFIG_HIGH_RES_TIMERS is not set 247# CONFIG_HIGH_RES_TIMERS is not set
243CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 248CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -282,12 +287,14 @@ CONFIG_HZ=250
282CONFIG_PREEMPT=y 287CONFIG_PREEMPT=y
283CONFIG_GUSA=y 288CONFIG_GUSA=y
284# CONFIG_GUSA_RB is not set 289# CONFIG_GUSA_RB is not set
290# CONFIG_SPARSE_IRQ is not set
285 291
286# 292#
287# Boot options 293# Boot options
288# 294#
289CONFIG_ZERO_PAGE_OFFSET=0x00001000 295CONFIG_ZERO_PAGE_OFFSET=0x00001000
290CONFIG_BOOT_LINK_OFFSET=0x00800000 296CONFIG_BOOT_LINK_OFFSET=0x00800000
297CONFIG_ENTRY_OFFSET=0x00001000
291# CONFIG_UBC_WAKEUP is not set 298# CONFIG_UBC_WAKEUP is not set
292CONFIG_CMDLINE_BOOL=y 299CONFIG_CMDLINE_BOOL=y
293CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/hda1" 300CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/hda1"
@@ -371,6 +378,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
371# CONFIG_ECONET is not set 378# CONFIG_ECONET is not set
372# CONFIG_WAN_ROUTER is not set 379# CONFIG_WAN_ROUTER is not set
373# CONFIG_PHONET is not set 380# CONFIG_PHONET is not set
381# CONFIG_IEEE802154 is not set
374# CONFIG_NET_SCHED is not set 382# CONFIG_NET_SCHED is not set
375# CONFIG_DCB is not set 383# CONFIG_DCB is not set
376 384
@@ -388,7 +396,11 @@ CONFIG_WIRELESS=y
388# CONFIG_WIRELESS_OLD_REGULATORY is not set 396# CONFIG_WIRELESS_OLD_REGULATORY is not set
389# CONFIG_WIRELESS_EXT is not set 397# CONFIG_WIRELESS_EXT is not set
390# CONFIG_LIB80211 is not set 398# CONFIG_LIB80211 is not set
391# CONFIG_MAC80211 is not set 399
400#
401# CFG80211 needs to be enabled for MAC80211
402#
403CONFIG_MAC80211_DEFAULT_PS_VALUE=0
392# CONFIG_WIMAX is not set 404# CONFIG_WIMAX is not set
393# CONFIG_RFKILL is not set 405# CONFIG_RFKILL is not set
394# CONFIG_NET_9P is not set 406# CONFIG_NET_9P is not set
@@ -460,7 +472,6 @@ CONFIG_IDE_PROC_FS=y
460# CONFIG_ATA is not set 472# CONFIG_ATA is not set
461# CONFIG_MD is not set 473# CONFIG_MD is not set
462CONFIG_NETDEVICES=y 474CONFIG_NETDEVICES=y
463CONFIG_COMPAT_NET_DEV_OPS=y
464# CONFIG_DUMMY is not set 475# CONFIG_DUMMY is not set
465# CONFIG_BONDING is not set 476# CONFIG_BONDING is not set
466# CONFIG_MACVLAN is not set 477# CONFIG_MACVLAN is not set
@@ -485,6 +496,7 @@ CONFIG_SMC91X=y
485# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 496# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
486# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 497# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
487# CONFIG_B44 is not set 498# CONFIG_B44 is not set
499# CONFIG_KS8842 is not set
488CONFIG_NETDEV_1000=y 500CONFIG_NETDEV_1000=y
489CONFIG_NETDEV_10000=y 501CONFIG_NETDEV_10000=y
490 502
@@ -582,22 +594,7 @@ CONFIG_SSB_POSSIBLE=y
582# CONFIG_HTC_PASIC3 is not set 594# CONFIG_HTC_PASIC3 is not set
583# CONFIG_MFD_TMIO is not set 595# CONFIG_MFD_TMIO is not set
584# CONFIG_REGULATOR is not set 596# CONFIG_REGULATOR is not set
585 597# CONFIG_MEDIA_SUPPORT is not set
586#
587# Multimedia devices
588#
589
590#
591# Multimedia core support
592#
593# CONFIG_VIDEO_DEV is not set
594# CONFIG_DVB_CORE is not set
595# CONFIG_VIDEO_MEDIA is not set
596
597#
598# Multimedia drivers
599#
600# CONFIG_DAB is not set
601 598
602# 599#
603# Graphics support 600# Graphics support
@@ -636,10 +633,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
636# CONFIG_MEMSTICK is not set 633# CONFIG_MEMSTICK is not set
637# CONFIG_NEW_LEDS is not set 634# CONFIG_NEW_LEDS is not set
638# CONFIG_ACCESSIBILITY is not set 635# CONFIG_ACCESSIBILITY is not set
636CONFIG_RTC_LIB=y
639# CONFIG_RTC_CLASS is not set 637# CONFIG_RTC_CLASS is not set
640# CONFIG_DMADEVICES is not set 638# CONFIG_DMADEVICES is not set
641# CONFIG_AUXDISPLAY is not set 639# CONFIG_AUXDISPLAY is not set
642# CONFIG_UIO is not set 640# CONFIG_UIO is not set
641
642#
643# TI VLYNQ
644#
643# CONFIG_STAGING is not set 645# CONFIG_STAGING is not set
644 646
645# 647#
@@ -659,10 +661,11 @@ CONFIG_FS_MBCACHE=y
659# CONFIG_REISERFS_FS is not set 661# CONFIG_REISERFS_FS is not set
660# CONFIG_JFS_FS is not set 662# CONFIG_JFS_FS is not set
661# CONFIG_FS_POSIX_ACL is not set 663# CONFIG_FS_POSIX_ACL is not set
662CONFIG_FILE_LOCKING=y
663# CONFIG_XFS_FS is not set 664# CONFIG_XFS_FS is not set
664# CONFIG_OCFS2_FS is not set 665# CONFIG_OCFS2_FS is not set
665# CONFIG_BTRFS_FS is not set 666# CONFIG_BTRFS_FS is not set
667CONFIG_FILE_LOCKING=y
668CONFIG_FSNOTIFY=y
666CONFIG_DNOTIFY=y 669CONFIG_DNOTIFY=y
667CONFIG_INOTIFY=y 670CONFIG_INOTIFY=y
668CONFIG_INOTIFY_USER=y 671CONFIG_INOTIFY_USER=y
@@ -812,28 +815,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
812CONFIG_HAVE_DYNAMIC_FTRACE=y 815CONFIG_HAVE_DYNAMIC_FTRACE=y
813CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 816CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
814CONFIG_TRACING_SUPPORT=y 817CONFIG_TRACING_SUPPORT=y
815 818# CONFIG_FTRACE is not set
816#
817# Tracers
818#
819# CONFIG_FUNCTION_TRACER is not set
820# CONFIG_IRQSOFF_TRACER is not set
821# CONFIG_PREEMPT_TRACER is not set
822# CONFIG_SCHED_TRACER is not set
823# CONFIG_CONTEXT_SWITCH_TRACER is not set
824# CONFIG_EVENT_TRACER is not set
825# CONFIG_BOOT_TRACER is not set
826# CONFIG_TRACE_BRANCH_PROFILING is not set
827# CONFIG_STACK_TRACER is not set
828# CONFIG_KMEMTRACE is not set
829# CONFIG_WORKQUEUE_TRACER is not set
830# CONFIG_BLK_DEV_IO_TRACE is not set
831# CONFIG_DMA_API_DEBUG is not set 819# CONFIG_DMA_API_DEBUG is not set
832# CONFIG_SAMPLES is not set 820# CONFIG_SAMPLES is not set
833CONFIG_HAVE_ARCH_KGDB=y 821CONFIG_HAVE_ARCH_KGDB=y
834# CONFIG_SH_STANDARD_BIOS is not set 822# CONFIG_SH_STANDARD_BIOS is not set
835# CONFIG_EARLY_SCIF_CONSOLE is not set 823# CONFIG_EARLY_SCIF_CONSOLE is not set
836# CONFIG_MORE_COMPILE_OPTIONS is not set
837 824
838# 825#
839# Security options 826# Security options
@@ -957,3 +944,4 @@ CONFIG_HAS_IOMEM=y
957CONFIG_HAS_IOPORT=y 944CONFIG_HAS_IOPORT=y
958CONFIG_HAS_DMA=y 945CONFIG_HAS_DMA=y
959CONFIG_NLATTR=y 946CONFIG_NLATTR=y
947CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig
index 8ecceb4bf27e..da627d22c009 100644
--- a/arch/sh/configs/migor_defconfig
+++ b/arch/sh/configs/migor_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:51:34 2009 4# Thu Jun 18 16:06:48 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -21,6 +21,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_CMT=y 23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
24CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
25CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
26CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -76,7 +77,6 @@ CONFIG_UID16=y
76# CONFIG_SYSCTL_SYSCALL is not set 77# CONFIG_SYSCTL_SYSCALL is not set
77CONFIG_KALLSYMS=y 78CONFIG_KALLSYMS=y
78# CONFIG_KALLSYMS_EXTRA_PASS is not set 79# CONFIG_KALLSYMS_EXTRA_PASS is not set
79# CONFIG_STRIP_ASM_SYMS is not set
80CONFIG_HOTPLUG=y 80CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y 81CONFIG_PRINTK=y
82CONFIG_BUG=y 82CONFIG_BUG=y
@@ -89,14 +89,19 @@ CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y 89CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 90CONFIG_SHMEM=y
91CONFIG_AIO=y 91CONFIG_AIO=y
92
93#
94# Performance Counters
95#
92CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y 98CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 99CONFIG_SLAB=y
95# CONFIG_SLUB is not set 100# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set 101# CONFIG_SLOB is not set
97CONFIG_PROFILING=y 102CONFIG_PROFILING=y
98CONFIG_TRACEPOINTS=y 103CONFIG_TRACEPOINTS=y
99# CONFIG_MARKERS is not set 104CONFIG_MARKERS=y
100CONFIG_OPROFILE=y 105CONFIG_OPROFILE=y
101CONFIG_HAVE_OPROFILE=y 106CONFIG_HAVE_OPROFILE=y
102# CONFIG_KPROBES is not set 107# CONFIG_KPROBES is not set
@@ -184,6 +189,7 @@ CONFIG_CPU_SUBTYPE_SH7722=y
184CONFIG_QUICKLIST=y 189CONFIG_QUICKLIST=y
185CONFIG_MMU=y 190CONFIG_MMU=y
186CONFIG_PAGE_OFFSET=0x80000000 191CONFIG_PAGE_OFFSET=0x80000000
192CONFIG_FORCE_MAX_ZONEORDER=11
187CONFIG_MEMORY_START=0x0c000000 193CONFIG_MEMORY_START=0x0c000000
188CONFIG_MEMORY_SIZE=0x04000000 194CONFIG_MEMORY_SIZE=0x04000000
189CONFIG_29BIT=y 195CONFIG_29BIT=y
@@ -202,7 +208,6 @@ CONFIG_PAGE_SIZE_4KB=y
202# CONFIG_PAGE_SIZE_8KB is not set 208# CONFIG_PAGE_SIZE_8KB is not set
203# CONFIG_PAGE_SIZE_16KB is not set 209# CONFIG_PAGE_SIZE_16KB is not set
204# CONFIG_PAGE_SIZE_64KB is not set 210# CONFIG_PAGE_SIZE_64KB is not set
205CONFIG_ENTRY_OFFSET=0x00001000
206CONFIG_SELECT_MEMORY_MODEL=y 211CONFIG_SELECT_MEMORY_MODEL=y
207# CONFIG_FLATMEM_MANUAL is not set 212# CONFIG_FLATMEM_MANUAL is not set
208# CONFIG_DISCONTIGMEM_MANUAL is not set 213# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -217,9 +222,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
217# CONFIG_PHYS_ADDR_T_64BIT is not set 222# CONFIG_PHYS_ADDR_T_64BIT is not set
218CONFIG_ZONE_DMA_FLAG=0 223CONFIG_ZONE_DMA_FLAG=0
219CONFIG_NR_QUICK=2 224CONFIG_NR_QUICK=2
220CONFIG_UNEVICTABLE_LRU=y
221CONFIG_HAVE_MLOCK=y 225CONFIG_HAVE_MLOCK=y
222CONFIG_HAVE_MLOCKED_PAGE_BIT=y 226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
223 228
224# 229#
225# Cache configuration 230# Cache configuration
@@ -238,7 +243,6 @@ CONFIG_SH_DSP=y
238# CONFIG_SH_STORE_QUEUES is not set 243# CONFIG_SH_STORE_QUEUES is not set
239CONFIG_CPU_HAS_INTEVT=y 244CONFIG_CPU_HAS_INTEVT=y
240CONFIG_CPU_HAS_SR_RB=y 245CONFIG_CPU_HAS_SR_RB=y
241CONFIG_CPU_HAS_PTEA=y
242CONFIG_CPU_HAS_DSP=y 246CONFIG_CPU_HAS_DSP=y
243 247
244# 248#
@@ -252,10 +256,10 @@ CONFIG_SH_MIGOR_QVGA=y
252# 256#
253# Timer and clock configuration 257# Timer and clock configuration
254# 258#
255CONFIG_SH_TMU=y 259CONFIG_SH_TIMER_TMU=y
256# CONFIG_SH_TIMER_CMT is not set 260# CONFIG_SH_TIMER_CMT is not set
257CONFIG_SH_TIMER_IRQ=16
258CONFIG_SH_PCLK_FREQ=33333333 261CONFIG_SH_PCLK_FREQ=33333333
262CONFIG_SH_CLK_CPG=y
259# CONFIG_NO_HZ is not set 263# CONFIG_NO_HZ is not set
260# CONFIG_HIGH_RES_TIMERS is not set 264# CONFIG_HIGH_RES_TIMERS is not set
261CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 265CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -296,12 +300,14 @@ CONFIG_PREEMPT_NONE=y
296# CONFIG_PREEMPT_VOLUNTARY is not set 300# CONFIG_PREEMPT_VOLUNTARY is not set
297# CONFIG_PREEMPT is not set 301# CONFIG_PREEMPT is not set
298CONFIG_GUSA=y 302CONFIG_GUSA=y
303# CONFIG_SPARSE_IRQ is not set
299 304
300# 305#
301# Boot options 306# Boot options
302# 307#
303CONFIG_ZERO_PAGE_OFFSET=0x00001000 308CONFIG_ZERO_PAGE_OFFSET=0x00001000
304CONFIG_BOOT_LINK_OFFSET=0x00800000 309CONFIG_BOOT_LINK_OFFSET=0x00800000
310CONFIG_ENTRY_OFFSET=0x00001000
305CONFIG_CMDLINE_BOOL=y 311CONFIG_CMDLINE_BOOL=y
306CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp" 312CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp"
307 313
@@ -384,6 +390,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
384# CONFIG_ECONET is not set 390# CONFIG_ECONET is not set
385# CONFIG_WAN_ROUTER is not set 391# CONFIG_WAN_ROUTER is not set
386# CONFIG_PHONET is not set 392# CONFIG_PHONET is not set
393# CONFIG_IEEE802154 is not set
387# CONFIG_NET_SCHED is not set 394# CONFIG_NET_SCHED is not set
388# CONFIG_DCB is not set 395# CONFIG_DCB is not set
389 396
@@ -403,7 +410,11 @@ CONFIG_WIRELESS=y
403CONFIG_WIRELESS_EXT=y 410CONFIG_WIRELESS_EXT=y
404CONFIG_WIRELESS_EXT_SYSFS=y 411CONFIG_WIRELESS_EXT_SYSFS=y
405# CONFIG_LIB80211 is not set 412# CONFIG_LIB80211 is not set
406# CONFIG_MAC80211 is not set 413
414#
415# CFG80211 needs to be enabled for MAC80211
416#
417CONFIG_MAC80211_DEFAULT_PS_VALUE=0
407# CONFIG_WIMAX is not set 418# CONFIG_WIMAX is not set
408# CONFIG_RFKILL is not set 419# CONFIG_RFKILL is not set
409# CONFIG_NET_9P is not set 420# CONFIG_NET_9P is not set
@@ -534,6 +545,7 @@ CONFIG_MISC_DEVICES=y
534# 545#
535# CONFIG_EEPROM_AT24 is not set 546# CONFIG_EEPROM_AT24 is not set
536# CONFIG_EEPROM_LEGACY is not set 547# CONFIG_EEPROM_LEGACY is not set
548# CONFIG_EEPROM_MAX6875 is not set
537# CONFIG_EEPROM_93CX6 is not set 549# CONFIG_EEPROM_93CX6 is not set
538CONFIG_HAVE_IDE=y 550CONFIG_HAVE_IDE=y
539# CONFIG_IDE is not set 551# CONFIG_IDE is not set
@@ -557,10 +569,6 @@ CONFIG_BLK_DEV_SD=y
557# CONFIG_BLK_DEV_SR is not set 569# CONFIG_BLK_DEV_SR is not set
558# CONFIG_CHR_DEV_SG is not set 570# CONFIG_CHR_DEV_SG is not set
559# CONFIG_CHR_DEV_SCH is not set 571# CONFIG_CHR_DEV_SCH is not set
560
561#
562# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
563#
564# CONFIG_SCSI_MULTI_LUN is not set 572# CONFIG_SCSI_MULTI_LUN is not set
565# CONFIG_SCSI_CONSTANTS is not set 573# CONFIG_SCSI_CONSTANTS is not set
566# CONFIG_SCSI_LOGGING is not set 574# CONFIG_SCSI_LOGGING is not set
@@ -577,6 +585,7 @@ CONFIG_SCSI_WAIT_SCAN=m
577# CONFIG_SCSI_SRP_ATTRS is not set 585# CONFIG_SCSI_SRP_ATTRS is not set
578CONFIG_SCSI_LOWLEVEL=y 586CONFIG_SCSI_LOWLEVEL=y
579# CONFIG_ISCSI_TCP is not set 587# CONFIG_ISCSI_TCP is not set
588# CONFIG_SCSI_BNX2_ISCSI is not set
580# CONFIG_LIBFC is not set 589# CONFIG_LIBFC is not set
581# CONFIG_LIBFCOE is not set 590# CONFIG_LIBFCOE is not set
582# CONFIG_SCSI_DEBUG is not set 591# CONFIG_SCSI_DEBUG is not set
@@ -585,7 +594,6 @@ CONFIG_SCSI_LOWLEVEL=y
585# CONFIG_ATA is not set 594# CONFIG_ATA is not set
586# CONFIG_MD is not set 595# CONFIG_MD is not set
587CONFIG_NETDEVICES=y 596CONFIG_NETDEVICES=y
588CONFIG_COMPAT_NET_DEV_OPS=y
589# CONFIG_DUMMY is not set 597# CONFIG_DUMMY is not set
590# CONFIG_BONDING is not set 598# CONFIG_BONDING is not set
591# CONFIG_MACVLAN is not set 599# CONFIG_MACVLAN is not set
@@ -610,6 +618,7 @@ CONFIG_SMC91X=y
610# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 618# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
611# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 619# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
612# CONFIG_B44 is not set 620# CONFIG_B44 is not set
621# CONFIG_KS8842 is not set
613# CONFIG_NETDEV_1000 is not set 622# CONFIG_NETDEV_1000 is not set
614# CONFIG_NETDEV_10000 is not set 623# CONFIG_NETDEV_10000 is not set
615 624
@@ -740,7 +749,6 @@ CONFIG_I2C_SH_MOBILE=y
740# CONFIG_SENSORS_PCF8574 is not set 749# CONFIG_SENSORS_PCF8574 is not set
741# CONFIG_PCF8575 is not set 750# CONFIG_PCF8575 is not set
742# CONFIG_SENSORS_PCA9539 is not set 751# CONFIG_SENSORS_PCA9539 is not set
743# CONFIG_SENSORS_MAX6875 is not set
744# CONFIG_SENSORS_TSL2550 is not set 752# CONFIG_SENSORS_TSL2550 is not set
745# CONFIG_I2C_DEBUG_CORE is not set 753# CONFIG_I2C_DEBUG_CORE is not set
746# CONFIG_I2C_DEBUG_ALGO is not set 754# CONFIG_I2C_DEBUG_ALGO is not set
@@ -796,10 +804,7 @@ CONFIG_SSB_POSSIBLE=y
796# CONFIG_MFD_WM8350_I2C is not set 804# CONFIG_MFD_WM8350_I2C is not set
797# CONFIG_MFD_PCF50633 is not set 805# CONFIG_MFD_PCF50633 is not set
798# CONFIG_REGULATOR is not set 806# CONFIG_REGULATOR is not set
799 807CONFIG_MEDIA_SUPPORT=y
800#
801# Multimedia devices
802#
803 808
804# 809#
805# Multimedia core support 810# Multimedia core support
@@ -899,6 +904,7 @@ CONFIG_USB_GADGET_SELECTED=y
899# CONFIG_USB_GADGET_OMAP is not set 904# CONFIG_USB_GADGET_OMAP is not set
900# CONFIG_USB_GADGET_PXA25X is not set 905# CONFIG_USB_GADGET_PXA25X is not set
901# CONFIG_USB_GADGET_PXA27X is not set 906# CONFIG_USB_GADGET_PXA27X is not set
907# CONFIG_USB_GADGET_S3C_HSOTG is not set
902# CONFIG_USB_GADGET_S3C2410 is not set 908# CONFIG_USB_GADGET_S3C2410 is not set
903# CONFIG_USB_GADGET_IMX is not set 909# CONFIG_USB_GADGET_IMX is not set
904CONFIG_USB_GADGET_M66592=y 910CONFIG_USB_GADGET_M66592=y
@@ -909,9 +915,11 @@ CONFIG_SUPERH_BUILT_IN_M66592=y
909# CONFIG_USB_GADGET_CI13XXX is not set 915# CONFIG_USB_GADGET_CI13XXX is not set
910# CONFIG_USB_GADGET_NET2280 is not set 916# CONFIG_USB_GADGET_NET2280 is not set
911# CONFIG_USB_GADGET_GOKU is not set 917# CONFIG_USB_GADGET_GOKU is not set
918# CONFIG_USB_GADGET_LANGWELL is not set
912# CONFIG_USB_GADGET_DUMMY_HCD is not set 919# CONFIG_USB_GADGET_DUMMY_HCD is not set
913CONFIG_USB_GADGET_DUALSPEED=y 920CONFIG_USB_GADGET_DUALSPEED=y
914# CONFIG_USB_ZERO is not set 921# CONFIG_USB_ZERO is not set
922# CONFIG_USB_AUDIO is not set
915# CONFIG_USB_ETH is not set 923# CONFIG_USB_ETH is not set
916# CONFIG_USB_GADGETFS is not set 924# CONFIG_USB_GADGETFS is not set
917# CONFIG_USB_FILE_STORAGE is not set 925# CONFIG_USB_FILE_STORAGE is not set
@@ -983,6 +991,7 @@ CONFIG_RTC_DRV_RS5C372=y
983# on-CPU RTC drivers 991# on-CPU RTC drivers
984# 992#
985CONFIG_RTC_DRV_SH=y 993CONFIG_RTC_DRV_SH=y
994# CONFIG_RTC_DRV_GENERIC is not set
986# CONFIG_DMADEVICES is not set 995# CONFIG_DMADEVICES is not set
987# CONFIG_AUXDISPLAY is not set 996# CONFIG_AUXDISPLAY is not set
988CONFIG_UIO=y 997CONFIG_UIO=y
@@ -990,6 +999,10 @@ CONFIG_UIO=y
990CONFIG_UIO_PDRV_GENIRQ=y 999CONFIG_UIO_PDRV_GENIRQ=y
991# CONFIG_UIO_SMX is not set 1000# CONFIG_UIO_SMX is not set
992# CONFIG_UIO_SERCOS3 is not set 1001# CONFIG_UIO_SERCOS3 is not set
1002
1003#
1004# TI VLYNQ
1005#
993# CONFIG_STAGING is not set 1006# CONFIG_STAGING is not set
994 1007
995# 1008#
@@ -1001,12 +1014,14 @@ CONFIG_UIO_PDRV_GENIRQ=y
1001# CONFIG_REISERFS_FS is not set 1014# CONFIG_REISERFS_FS is not set
1002# CONFIG_JFS_FS is not set 1015# CONFIG_JFS_FS is not set
1003# CONFIG_FS_POSIX_ACL is not set 1016# CONFIG_FS_POSIX_ACL is not set
1004CONFIG_FILE_LOCKING=y
1005# CONFIG_XFS_FS is not set 1017# CONFIG_XFS_FS is not set
1006# CONFIG_OCFS2_FS is not set 1018# CONFIG_OCFS2_FS is not set
1007# CONFIG_BTRFS_FS is not set 1019# CONFIG_BTRFS_FS is not set
1020CONFIG_FILE_LOCKING=y
1021CONFIG_FSNOTIFY=y
1008# CONFIG_DNOTIFY is not set 1022# CONFIG_DNOTIFY is not set
1009# CONFIG_INOTIFY is not set 1023# CONFIG_INOTIFY is not set
1024CONFIG_INOTIFY_USER=y
1010# CONFIG_QUOTA is not set 1025# CONFIG_QUOTA is not set
1011# CONFIG_AUTOFS_FS is not set 1026# CONFIG_AUTOFS_FS is not set
1012# CONFIG_AUTOFS4_FS is not set 1027# CONFIG_AUTOFS4_FS is not set
@@ -1111,24 +1126,11 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1111CONFIG_HAVE_DYNAMIC_FTRACE=y 1126CONFIG_HAVE_DYNAMIC_FTRACE=y
1112CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1127CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1113CONFIG_RING_BUFFER=y 1128CONFIG_RING_BUFFER=y
1129CONFIG_EVENT_TRACING=y
1130CONFIG_CONTEXT_SWITCH_TRACER=y
1114CONFIG_TRACING=y 1131CONFIG_TRACING=y
1115CONFIG_TRACING_SUPPORT=y 1132CONFIG_TRACING_SUPPORT=y
1116 1133# CONFIG_FTRACE is not set
1117#
1118# Tracers
1119#
1120# CONFIG_FUNCTION_TRACER is not set
1121# CONFIG_IRQSOFF_TRACER is not set
1122# CONFIG_SCHED_TRACER is not set
1123# CONFIG_CONTEXT_SWITCH_TRACER is not set
1124# CONFIG_EVENT_TRACER is not set
1125# CONFIG_BOOT_TRACER is not set
1126# CONFIG_TRACE_BRANCH_PROFILING is not set
1127# CONFIG_STACK_TRACER is not set
1128# CONFIG_KMEMTRACE is not set
1129# CONFIG_WORKQUEUE_TRACER is not set
1130# CONFIG_BLK_DEV_IO_TRACE is not set
1131# CONFIG_FTRACE_STARTUP_TEST is not set
1132# CONFIG_DYNAMIC_DEBUG is not set 1134# CONFIG_DYNAMIC_DEBUG is not set
1133# CONFIG_DMA_API_DEBUG is not set 1135# CONFIG_DMA_API_DEBUG is not set
1134# CONFIG_SAMPLES is not set 1136# CONFIG_SAMPLES is not set
@@ -1137,7 +1139,6 @@ CONFIG_HAVE_ARCH_KGDB=y
1137CONFIG_EARLY_SCIF_CONSOLE=y 1139CONFIG_EARLY_SCIF_CONSOLE=y
1138CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000 1140CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000
1139CONFIG_EARLY_PRINTK=y 1141CONFIG_EARLY_PRINTK=y
1140# CONFIG_MORE_COMPILE_OPTIONS is not set
1141 1142
1142# 1143#
1143# Security options 1144# Security options
@@ -1259,3 +1260,4 @@ CONFIG_HAS_IOMEM=y
1259CONFIG_HAS_IOPORT=y 1260CONFIG_HAS_IOPORT=y
1260CONFIG_HAS_DMA=y 1261CONFIG_HAS_DMA=y
1261CONFIG_NLATTR=y 1262CONFIG_NLATTR=y
1263CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/polaris_defconfig b/arch/sh/configs/polaris_defconfig
index 2b9507286182..67edd3f3f9ba 100644
--- a/arch/sh/configs/polaris_defconfig
+++ b/arch/sh/configs/polaris_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:52:19 2009 4# Thu Jun 18 12:33:28 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -78,7 +79,6 @@ CONFIG_SYSCTL_SYSCALL=y
78CONFIG_KALLSYMS=y 79CONFIG_KALLSYMS=y
79CONFIG_KALLSYMS_ALL=y 80CONFIG_KALLSYMS_ALL=y
80# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
81# CONFIG_STRIP_ASM_SYMS is not set
82CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
83CONFIG_PRINTK=y 83CONFIG_PRINTK=y
84CONFIG_BUG=y 84CONFIG_BUG=y
@@ -91,7 +91,12 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 92CONFIG_SHMEM=y
93CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
94CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99# CONFIG_STRIP_ASM_SYMS is not set
95CONFIG_COMPAT_BRK=y 100CONFIG_COMPAT_BRK=y
96CONFIG_SLAB=y 101CONFIG_SLAB=y
97# CONFIG_SLUB is not set 102# CONFIG_SLUB is not set
@@ -181,6 +186,7 @@ CONFIG_CPU_SUBTYPE_SH7709=y
181CONFIG_QUICKLIST=y 186CONFIG_QUICKLIST=y
182CONFIG_MMU=y 187CONFIG_MMU=y
183CONFIG_PAGE_OFFSET=0x80000000 188CONFIG_PAGE_OFFSET=0x80000000
189CONFIG_FORCE_MAX_ZONEORDER=11
184CONFIG_MEMORY_START=0x0C000000 190CONFIG_MEMORY_START=0x0C000000
185CONFIG_MEMORY_SIZE=0x04000000 191CONFIG_MEMORY_SIZE=0x04000000
186CONFIG_29BIT=y 192CONFIG_29BIT=y
@@ -195,7 +201,6 @@ CONFIG_PAGE_SIZE_4KB=y
195# CONFIG_PAGE_SIZE_8KB is not set 201# CONFIG_PAGE_SIZE_8KB is not set
196# CONFIG_PAGE_SIZE_16KB is not set 202# CONFIG_PAGE_SIZE_16KB is not set
197# CONFIG_PAGE_SIZE_64KB is not set 203# CONFIG_PAGE_SIZE_64KB is not set
198CONFIG_ENTRY_OFFSET=0x00001000
199CONFIG_SELECT_MEMORY_MODEL=y 204CONFIG_SELECT_MEMORY_MODEL=y
200CONFIG_FLATMEM_MANUAL=y 205CONFIG_FLATMEM_MANUAL=y
201# CONFIG_DISCONTIGMEM_MANUAL is not set 206# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -208,9 +213,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
208# CONFIG_PHYS_ADDR_T_64BIT is not set 213# CONFIG_PHYS_ADDR_T_64BIT is not set
209CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
211CONFIG_UNEVICTABLE_LRU=y
212CONFIG_HAVE_MLOCK=y 216CONFIG_HAVE_MLOCK=y
213CONFIG_HAVE_MLOCKED_PAGE_BIT=y 217CONFIG_HAVE_MLOCKED_PAGE_BIT=y
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 219
215# 220#
216# Cache configuration 221# Cache configuration
@@ -240,9 +245,10 @@ CONFIG_SH_POLARIS=y
240# 245#
241# Timer and clock configuration 246# Timer and clock configuration
242# 247#
243CONFIG_SH_TMU=y 248CONFIG_SH_TIMER_TMU=y
244CONFIG_SH_TIMER_IRQ=16
245CONFIG_SH_PCLK_FREQ=33000000 249CONFIG_SH_PCLK_FREQ=33000000
250CONFIG_SH_CLK_CPG=y
251CONFIG_SH_CLK_CPG_LEGACY=y
246CONFIG_TICK_ONESHOT=y 252CONFIG_TICK_ONESHOT=y
247CONFIG_NO_HZ=y 253CONFIG_NO_HZ=y
248CONFIG_HIGH_RES_TIMERS=y 254CONFIG_HIGH_RES_TIMERS=y
@@ -288,12 +294,14 @@ CONFIG_SCHED_HRTICK=y
288CONFIG_PREEMPT=y 294CONFIG_PREEMPT=y
289CONFIG_GUSA=y 295CONFIG_GUSA=y
290# CONFIG_GUSA_RB is not set 296# CONFIG_GUSA_RB is not set
297# CONFIG_SPARSE_IRQ is not set
291 298
292# 299#
293# Boot options 300# Boot options
294# 301#
295CONFIG_ZERO_PAGE_OFFSET=0x00001000 302CONFIG_ZERO_PAGE_OFFSET=0x00001000
296CONFIG_BOOT_LINK_OFFSET=0x00800000 303CONFIG_BOOT_LINK_OFFSET=0x00800000
304CONFIG_ENTRY_OFFSET=0x00001000
297CONFIG_CMDLINE_BOOL=y 305CONFIG_CMDLINE_BOOL=y
298CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/mtdblock2 rootfstype=jffs2 mem=63M mtdparts=physmap-flash.0:0x00100000(bootloader)ro,0x00500000(Kernel)ro,0x00A00000(Filesystem)" 306CONFIG_CMDLINE="console=ttySC1,115200 root=/dev/mtdblock2 rootfstype=jffs2 mem=63M mtdparts=physmap-flash.0:0x00100000(bootloader)ro,0x00500000(Kernel)ro,0x00A00000(Filesystem)"
299 307
@@ -369,6 +377,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
369# CONFIG_ECONET is not set 377# CONFIG_ECONET is not set
370# CONFIG_WAN_ROUTER is not set 378# CONFIG_WAN_ROUTER is not set
371# CONFIG_PHONET is not set 379# CONFIG_PHONET is not set
380# CONFIG_IEEE802154 is not set
372# CONFIG_NET_SCHED is not set 381# CONFIG_NET_SCHED is not set
373# CONFIG_DCB is not set 382# CONFIG_DCB is not set
374 383
@@ -522,7 +531,6 @@ CONFIG_HAVE_IDE=y
522# CONFIG_ATA is not set 531# CONFIG_ATA is not set
523# CONFIG_MD is not set 532# CONFIG_MD is not set
524CONFIG_NETDEVICES=y 533CONFIG_NETDEVICES=y
525CONFIG_COMPAT_NET_DEV_OPS=y
526# CONFIG_DUMMY is not set 534# CONFIG_DUMMY is not set
527# CONFIG_BONDING is not set 535# CONFIG_BONDING is not set
528# CONFIG_MACVLAN is not set 536# CONFIG_MACVLAN is not set
@@ -566,6 +574,7 @@ CONFIG_SMSC911X=y
566# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 574# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
567# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 575# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
568# CONFIG_B44 is not set 576# CONFIG_B44 is not set
577# CONFIG_KS8842 is not set
569# CONFIG_NETDEV_1000 is not set 578# CONFIG_NETDEV_1000 is not set
570# CONFIG_NETDEV_10000 is not set 579# CONFIG_NETDEV_10000 is not set
571 580
@@ -678,22 +687,7 @@ CONFIG_SSB_POSSIBLE=y
678# CONFIG_HTC_PASIC3 is not set 687# CONFIG_HTC_PASIC3 is not set
679# CONFIG_MFD_TMIO is not set 688# CONFIG_MFD_TMIO is not set
680# CONFIG_REGULATOR is not set 689# CONFIG_REGULATOR is not set
681 690# CONFIG_MEDIA_SUPPORT is not set
682#
683# Multimedia devices
684#
685
686#
687# Multimedia core support
688#
689# CONFIG_VIDEO_DEV is not set
690# CONFIG_DVB_CORE is not set
691# CONFIG_VIDEO_MEDIA is not set
692
693#
694# Multimedia drivers
695#
696# CONFIG_DAB is not set
697 691
698# 692#
699# Graphics support 693# Graphics support
@@ -756,9 +750,14 @@ CONFIG_RTC_INTF_DEV=y
756# on-CPU RTC drivers 750# on-CPU RTC drivers
757# 751#
758CONFIG_RTC_DRV_SH=y 752CONFIG_RTC_DRV_SH=y
753# CONFIG_RTC_DRV_GENERIC is not set
759# CONFIG_DMADEVICES is not set 754# CONFIG_DMADEVICES is not set
760# CONFIG_AUXDISPLAY is not set 755# CONFIG_AUXDISPLAY is not set
761# CONFIG_UIO is not set 756# CONFIG_UIO is not set
757
758#
759# TI VLYNQ
760#
762# CONFIG_STAGING is not set 761# CONFIG_STAGING is not set
763 762
764# 763#
@@ -770,12 +769,14 @@ CONFIG_RTC_DRV_SH=y
770# CONFIG_REISERFS_FS is not set 769# CONFIG_REISERFS_FS is not set
771# CONFIG_JFS_FS is not set 770# CONFIG_JFS_FS is not set
772# CONFIG_FS_POSIX_ACL is not set 771# CONFIG_FS_POSIX_ACL is not set
773CONFIG_FILE_LOCKING=y
774# CONFIG_XFS_FS is not set 772# CONFIG_XFS_FS is not set
775# CONFIG_OCFS2_FS is not set 773# CONFIG_OCFS2_FS is not set
776# CONFIG_BTRFS_FS is not set 774# CONFIG_BTRFS_FS is not set
775CONFIG_FILE_LOCKING=y
776CONFIG_FSNOTIFY=y
777# CONFIG_DNOTIFY is not set 777# CONFIG_DNOTIFY is not set
778# CONFIG_INOTIFY is not set 778# CONFIG_INOTIFY is not set
779CONFIG_INOTIFY_USER=y
779# CONFIG_QUOTA is not set 780# CONFIG_QUOTA is not set
780# CONFIG_AUTOFS_FS is not set 781# CONFIG_AUTOFS_FS is not set
781# CONFIG_AUTOFS4_FS is not set 782# CONFIG_AUTOFS4_FS is not set
@@ -928,18 +929,16 @@ CONFIG_HAVE_FUNCTION_TRACER=y
928CONFIG_HAVE_DYNAMIC_FTRACE=y 929CONFIG_HAVE_DYNAMIC_FTRACE=y
929CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 930CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
930CONFIG_TRACING_SUPPORT=y 931CONFIG_TRACING_SUPPORT=y
931 932CONFIG_FTRACE=y
932#
933# Tracers
934#
935# CONFIG_FUNCTION_TRACER is not set 933# CONFIG_FUNCTION_TRACER is not set
936# CONFIG_IRQSOFF_TRACER is not set 934# CONFIG_IRQSOFF_TRACER is not set
937# CONFIG_PREEMPT_TRACER is not set 935# CONFIG_PREEMPT_TRACER is not set
938# CONFIG_SCHED_TRACER is not set 936# CONFIG_SCHED_TRACER is not set
939# CONFIG_CONTEXT_SWITCH_TRACER is not set 937# CONFIG_ENABLE_DEFAULT_TRACERS is not set
940# CONFIG_EVENT_TRACER is not set
941# CONFIG_BOOT_TRACER is not set 938# CONFIG_BOOT_TRACER is not set
942# CONFIG_TRACE_BRANCH_PROFILING is not set 939CONFIG_BRANCH_PROFILE_NONE=y
940# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
941# CONFIG_PROFILE_ALL_BRANCHES is not set
943# CONFIG_STACK_TRACER is not set 942# CONFIG_STACK_TRACER is not set
944# CONFIG_KMEMTRACE is not set 943# CONFIG_KMEMTRACE is not set
945# CONFIG_WORKQUEUE_TRACER is not set 944# CONFIG_WORKQUEUE_TRACER is not set
@@ -948,6 +947,7 @@ CONFIG_TRACING_SUPPORT=y
948# CONFIG_SAMPLES is not set 947# CONFIG_SAMPLES is not set
949CONFIG_HAVE_ARCH_KGDB=y 948CONFIG_HAVE_ARCH_KGDB=y
950# CONFIG_KGDB is not set 949# CONFIG_KGDB is not set
950# CONFIG_KMEMCHECK is not set
951# CONFIG_SH_STANDARD_BIOS is not set 951# CONFIG_SH_STANDARD_BIOS is not set
952CONFIG_EARLY_SCIF_CONSOLE=y 952CONFIG_EARLY_SCIF_CONSOLE=y
953CONFIG_EARLY_SCIF_CONSOLE_PORT=0x00000000 953CONFIG_EARLY_SCIF_CONSOLE_PORT=0x00000000
@@ -956,10 +956,8 @@ CONFIG_EARLY_PRINTK=y
956# CONFIG_DEBUG_STACKOVERFLOW is not set 956# CONFIG_DEBUG_STACKOVERFLOW is not set
957# CONFIG_DEBUG_STACK_USAGE is not set 957# CONFIG_DEBUG_STACK_USAGE is not set
958# CONFIG_4KSTACKS is not set 958# CONFIG_4KSTACKS is not set
959# CONFIG_IRQSTACKS is not set
960CONFIG_DUMP_CODE=y 959CONFIG_DUMP_CODE=y
961# CONFIG_SH_NO_BSS_INIT is not set 960# CONFIG_SH_NO_BSS_INIT is not set
962# CONFIG_MORE_COMPILE_OPTIONS is not set
963 961
964# 962#
965# Security options 963# Security options
@@ -990,3 +988,4 @@ CONFIG_HAS_IOMEM=y
990CONFIG_HAS_IOPORT=y 988CONFIG_HAS_IOPORT=y
991CONFIG_HAS_DMA=y 989CONFIG_HAS_DMA=y
992CONFIG_NLATTR=y 990CONFIG_NLATTR=y
991CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_defconfig
index 943da63a3852..107a8e337ecc 100644
--- a/arch/sh/configs/r7780mp_defconfig
+++ b/arch/sh/configs/r7780mp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:53:28 2009 4# Thu Jun 18 12:34:44 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -79,7 +80,6 @@ CONFIG_UID16=y
79CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
80# CONFIG_KALLSYMS_ALL is not set 81# CONFIG_KALLSYMS_ALL is not set
81# CONFIG_KALLSYMS_EXTRA_PASS is not set 82# CONFIG_KALLSYMS_EXTRA_PASS is not set
82# CONFIG_STRIP_ASM_SYMS is not set
83CONFIG_HOTPLUG=y 83CONFIG_HOTPLUG=y
84CONFIG_PRINTK=y 84CONFIG_PRINTK=y
85CONFIG_BUG=y 85CONFIG_BUG=y
@@ -92,15 +92,20 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 92CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 93CONFIG_SHMEM=y
94CONFIG_AIO=y 94CONFIG_AIO=y
95
96#
97# Performance Counters
98#
95CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_PCI_QUIRKS=y 100CONFIG_PCI_QUIRKS=y
101# CONFIG_STRIP_ASM_SYMS is not set
97CONFIG_COMPAT_BRK=y 102CONFIG_COMPAT_BRK=y
98CONFIG_SLAB=y 103CONFIG_SLAB=y
99# CONFIG_SLUB is not set 104# CONFIG_SLUB is not set
100# CONFIG_SLOB is not set 105# CONFIG_SLOB is not set
101CONFIG_PROFILING=y 106CONFIG_PROFILING=y
102CONFIG_TRACEPOINTS=y 107CONFIG_TRACEPOINTS=y
103# CONFIG_MARKERS is not set 108CONFIG_MARKERS=y
104CONFIG_OPROFILE=m 109CONFIG_OPROFILE=m
105CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
106# CONFIG_KPROBES is not set 111# CONFIG_KPROBES is not set
@@ -185,6 +190,7 @@ CONFIG_CPU_SUBTYPE_SH7780=y
185CONFIG_QUICKLIST=y 190CONFIG_QUICKLIST=y
186CONFIG_MMU=y 191CONFIG_MMU=y
187CONFIG_PAGE_OFFSET=0x80000000 192CONFIG_PAGE_OFFSET=0x80000000
193CONFIG_FORCE_MAX_ZONEORDER=11
188CONFIG_MEMORY_START=0x08000000 194CONFIG_MEMORY_START=0x08000000
189CONFIG_MEMORY_SIZE=0x08000000 195CONFIG_MEMORY_SIZE=0x08000000
190# CONFIG_29BIT is not set 196# CONFIG_29BIT is not set
@@ -203,7 +209,6 @@ CONFIG_PAGE_SIZE_4KB=y
203# CONFIG_PAGE_SIZE_8KB is not set 209# CONFIG_PAGE_SIZE_8KB is not set
204# CONFIG_PAGE_SIZE_16KB is not set 210# CONFIG_PAGE_SIZE_16KB is not set
205# CONFIG_PAGE_SIZE_64KB is not set 211# CONFIG_PAGE_SIZE_64KB is not set
206CONFIG_ENTRY_OFFSET=0x00001000
207CONFIG_HUGETLB_PAGE_SIZE_64K=y 212CONFIG_HUGETLB_PAGE_SIZE_64K=y
208# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 213# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
209# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 214# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -222,9 +227,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
222# CONFIG_PHYS_ADDR_T_64BIT is not set 227# CONFIG_PHYS_ADDR_T_64BIT is not set
223CONFIG_ZONE_DMA_FLAG=0 228CONFIG_ZONE_DMA_FLAG=0
224CONFIG_NR_QUICK=2 229CONFIG_NR_QUICK=2
225CONFIG_UNEVICTABLE_LRU=y
226CONFIG_HAVE_MLOCK=y 230CONFIG_HAVE_MLOCK=y
227CONFIG_HAVE_MLOCKED_PAGE_BIT=y 231CONFIG_HAVE_MLOCKED_PAGE_BIT=y
232CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
228 233
229# 234#
230# Cache configuration 235# Cache configuration
@@ -258,9 +263,10 @@ CONFIG_SH_R7780MP=y
258# 263#
259# Timer and clock configuration 264# Timer and clock configuration
260# 265#
261CONFIG_SH_TMU=y 266CONFIG_SH_TIMER_TMU=y
262CONFIG_SH_TIMER_IRQ=28
263CONFIG_SH_PCLK_FREQ=33333333 267CONFIG_SH_PCLK_FREQ=33333333
268CONFIG_SH_CLK_CPG=y
269CONFIG_SH_CLK_CPG_LEGACY=y
264# CONFIG_NO_HZ is not set 270# CONFIG_NO_HZ is not set
265# CONFIG_HIGH_RES_TIMERS is not set 271# CONFIG_HIGH_RES_TIMERS is not set
266CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 272CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -301,12 +307,14 @@ CONFIG_KEXEC=y
301# CONFIG_PREEMPT_VOLUNTARY is not set 307# CONFIG_PREEMPT_VOLUNTARY is not set
302CONFIG_PREEMPT=y 308CONFIG_PREEMPT=y
303CONFIG_GUSA=y 309CONFIG_GUSA=y
310# CONFIG_SPARSE_IRQ is not set
304 311
305# 312#
306# Boot options 313# Boot options
307# 314#
308CONFIG_ZERO_PAGE_OFFSET=0x00001000 315CONFIG_ZERO_PAGE_OFFSET=0x00001000
309CONFIG_BOOT_LINK_OFFSET=0x00800000 316CONFIG_BOOT_LINK_OFFSET=0x00800000
317CONFIG_ENTRY_OFFSET=0x00001000
310CONFIG_CMDLINE_BOOL=y 318CONFIG_CMDLINE_BOOL=y
311CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" 319CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
312 320
@@ -404,6 +412,7 @@ CONFIG_LLC=m
404# CONFIG_ECONET is not set 412# CONFIG_ECONET is not set
405# CONFIG_WAN_ROUTER is not set 413# CONFIG_WAN_ROUTER is not set
406# CONFIG_PHONET is not set 414# CONFIG_PHONET is not set
415# CONFIG_IEEE802154 is not set
407# CONFIG_NET_SCHED is not set 416# CONFIG_NET_SCHED is not set
408# CONFIG_DCB is not set 417# CONFIG_DCB is not set
409 418
@@ -423,7 +432,11 @@ CONFIG_WIRELESS=y
423CONFIG_WIRELESS_EXT=y 432CONFIG_WIRELESS_EXT=y
424CONFIG_WIRELESS_EXT_SYSFS=y 433CONFIG_WIRELESS_EXT_SYSFS=y
425# CONFIG_LIB80211 is not set 434# CONFIG_LIB80211 is not set
426# CONFIG_MAC80211 is not set 435
436#
437# CFG80211 needs to be enabled for MAC80211
438#
439CONFIG_MAC80211_DEFAULT_PS_VALUE=0
427# CONFIG_WIMAX is not set 440# CONFIG_WIMAX is not set
428# CONFIG_RFKILL is not set 441# CONFIG_RFKILL is not set
429# CONFIG_NET_9P is not set 442# CONFIG_NET_9P is not set
@@ -445,7 +458,91 @@ CONFIG_EXTRA_FIRMWARE=""
445# CONFIG_DEBUG_DEVRES is not set 458# CONFIG_DEBUG_DEVRES is not set
446# CONFIG_SYS_HYPERVISOR is not set 459# CONFIG_SYS_HYPERVISOR is not set
447# CONFIG_CONNECTOR is not set 460# CONFIG_CONNECTOR is not set
448# CONFIG_MTD is not set 461CONFIG_MTD=y
462# CONFIG_MTD_DEBUG is not set
463# CONFIG_MTD_CONCAT is not set
464CONFIG_MTD_PARTITIONS=y
465# CONFIG_MTD_TESTS is not set
466# CONFIG_MTD_REDBOOT_PARTS is not set
467# CONFIG_MTD_CMDLINE_PARTS is not set
468# CONFIG_MTD_AR7_PARTS is not set
469
470#
471# User Modules And Translation Layers
472#
473# CONFIG_MTD_CHAR is not set
474# CONFIG_MTD_BLKDEVS is not set
475# CONFIG_MTD_BLOCK is not set
476# CONFIG_MTD_BLOCK_RO is not set
477# CONFIG_FTL is not set
478# CONFIG_NFTL is not set
479# CONFIG_INFTL is not set
480# CONFIG_RFD_FTL is not set
481# CONFIG_SSFDC is not set
482# CONFIG_MTD_OOPS is not set
483
484#
485# RAM/ROM/Flash chip drivers
486#
487CONFIG_MTD_CFI=y
488# CONFIG_MTD_JEDECPROBE is not set
489CONFIG_MTD_GEN_PROBE=y
490# CONFIG_MTD_CFI_ADV_OPTIONS is not set
491CONFIG_MTD_MAP_BANK_WIDTH_1=y
492CONFIG_MTD_MAP_BANK_WIDTH_2=y
493CONFIG_MTD_MAP_BANK_WIDTH_4=y
494# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
495# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
496# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
497CONFIG_MTD_CFI_I1=y
498CONFIG_MTD_CFI_I2=y
499# CONFIG_MTD_CFI_I4 is not set
500# CONFIG_MTD_CFI_I8 is not set
501# CONFIG_MTD_CFI_INTELEXT is not set
502CONFIG_MTD_CFI_AMDSTD=y
503# CONFIG_MTD_CFI_STAA is not set
504CONFIG_MTD_CFI_UTIL=y
505# CONFIG_MTD_RAM is not set
506# CONFIG_MTD_ROM is not set
507# CONFIG_MTD_ABSENT is not set
508
509#
510# Mapping drivers for chip access
511#
512CONFIG_MTD_COMPLEX_MAPPINGS=y
513CONFIG_MTD_PHYSMAP=y
514# CONFIG_MTD_PHYSMAP_COMPAT is not set
515# CONFIG_MTD_PCI is not set
516# CONFIG_MTD_INTEL_VR_NOR is not set
517# CONFIG_MTD_PLATRAM is not set
518
519#
520# Self-contained MTD device drivers
521#
522# CONFIG_MTD_PMC551 is not set
523# CONFIG_MTD_SLRAM is not set
524# CONFIG_MTD_PHRAM is not set
525# CONFIG_MTD_MTDRAM is not set
526# CONFIG_MTD_BLOCK2MTD is not set
527
528#
529# Disk-On-Chip Device Drivers
530#
531# CONFIG_MTD_DOC2000 is not set
532# CONFIG_MTD_DOC2001 is not set
533# CONFIG_MTD_DOC2001PLUS is not set
534# CONFIG_MTD_NAND is not set
535# CONFIG_MTD_ONENAND is not set
536
537#
538# LPDDR flash memory drivers
539#
540# CONFIG_MTD_LPDDR is not set
541
542#
543# UBI - Unsorted block images
544#
545# CONFIG_MTD_UBI is not set
449# CONFIG_PARPORT is not set 546# CONFIG_PARPORT is not set
450CONFIG_BLK_DEV=y 547CONFIG_BLK_DEV=y
451# CONFIG_BLK_CPQ_CISS_DA is not set 548# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -477,7 +574,9 @@ CONFIG_MISC_DEVICES=y
477# 574#
478# CONFIG_EEPROM_AT24 is not set 575# CONFIG_EEPROM_AT24 is not set
479# CONFIG_EEPROM_LEGACY is not set 576# CONFIG_EEPROM_LEGACY is not set
577# CONFIG_EEPROM_MAX6875 is not set
480CONFIG_EEPROM_93CX6=y 578CONFIG_EEPROM_93CX6=y
579# CONFIG_CB710_CORE is not set
481CONFIG_HAVE_IDE=y 580CONFIG_HAVE_IDE=y
482# CONFIG_IDE is not set 581# CONFIG_IDE is not set
483 582
@@ -500,10 +599,6 @@ CONFIG_BLK_DEV_SD=y
500# CONFIG_BLK_DEV_SR is not set 599# CONFIG_BLK_DEV_SR is not set
501CONFIG_CHR_DEV_SG=m 600CONFIG_CHR_DEV_SG=m
502# CONFIG_CHR_DEV_SCH is not set 601# CONFIG_CHR_DEV_SCH is not set
503
504#
505# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
506#
507# CONFIG_SCSI_MULTI_LUN is not set 602# CONFIG_SCSI_MULTI_LUN is not set
508# CONFIG_SCSI_CONSTANTS is not set 603# CONFIG_SCSI_CONSTANTS is not set
509# CONFIG_SCSI_LOGGING is not set 604# CONFIG_SCSI_LOGGING is not set
@@ -521,6 +616,7 @@ CONFIG_SCSI_WAIT_SCAN=m
521CONFIG_SCSI_LOWLEVEL=y 616CONFIG_SCSI_LOWLEVEL=y
522# CONFIG_ISCSI_TCP is not set 617# CONFIG_ISCSI_TCP is not set
523# CONFIG_SCSI_CXGB3_ISCSI is not set 618# CONFIG_SCSI_CXGB3_ISCSI is not set
619# CONFIG_SCSI_BNX2_ISCSI is not set
524# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 620# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
525# CONFIG_SCSI_3W_9XXX is not set 621# CONFIG_SCSI_3W_9XXX is not set
526# CONFIG_SCSI_ACARD is not set 622# CONFIG_SCSI_ACARD is not set
@@ -529,6 +625,7 @@ CONFIG_SCSI_LOWLEVEL=y
529# CONFIG_SCSI_AIC7XXX_OLD is not set 625# CONFIG_SCSI_AIC7XXX_OLD is not set
530# CONFIG_SCSI_AIC79XX is not set 626# CONFIG_SCSI_AIC79XX is not set
531# CONFIG_SCSI_AIC94XX is not set 627# CONFIG_SCSI_AIC94XX is not set
628# CONFIG_SCSI_MVSAS is not set
532# CONFIG_SCSI_ARCMSR is not set 629# CONFIG_SCSI_ARCMSR is not set
533# CONFIG_MEGARAID_NEWGEN is not set 630# CONFIG_MEGARAID_NEWGEN is not set
534# CONFIG_MEGARAID_LEGACY is not set 631# CONFIG_MEGARAID_LEGACY is not set
@@ -543,7 +640,6 @@ CONFIG_SCSI_LOWLEVEL=y
543# CONFIG_SCSI_IPS is not set 640# CONFIG_SCSI_IPS is not set
544# CONFIG_SCSI_INITIO is not set 641# CONFIG_SCSI_INITIO is not set
545# CONFIG_SCSI_INIA100 is not set 642# CONFIG_SCSI_INIA100 is not set
546# CONFIG_SCSI_MVSAS is not set
547# CONFIG_SCSI_STEX is not set 643# CONFIG_SCSI_STEX is not set
548# CONFIG_SCSI_SYM53C8XX_2 is not set 644# CONFIG_SCSI_SYM53C8XX_2 is not set
549# CONFIG_SCSI_IPR is not set 645# CONFIG_SCSI_IPR is not set
@@ -632,7 +728,6 @@ CONFIG_PATA_PLATFORM=y
632# CONFIG_IEEE1394 is not set 728# CONFIG_IEEE1394 is not set
633# CONFIG_I2O is not set 729# CONFIG_I2O is not set
634CONFIG_NETDEVICES=y 730CONFIG_NETDEVICES=y
635CONFIG_COMPAT_NET_DEV_OPS=y
636# CONFIG_DUMMY is not set 731# CONFIG_DUMMY is not set
637# CONFIG_BONDING is not set 732# CONFIG_BONDING is not set
638# CONFIG_MACVLAN is not set 733# CONFIG_MACVLAN is not set
@@ -686,6 +781,7 @@ CONFIG_8139TOO_8129=y
686# CONFIG_SMSC9420 is not set 781# CONFIG_SMSC9420 is not set
687# CONFIG_SUNDANCE is not set 782# CONFIG_SUNDANCE is not set
688# CONFIG_TLAN is not set 783# CONFIG_TLAN is not set
784# CONFIG_KS8842 is not set
689CONFIG_VIA_RHINE=m 785CONFIG_VIA_RHINE=m
690CONFIG_VIA_RHINE_MMIO=y 786CONFIG_VIA_RHINE_MMIO=y
691# CONFIG_SC92031 is not set 787# CONFIG_SC92031 is not set
@@ -894,7 +990,6 @@ CONFIG_I2C_HIGHLANDER=y
894# CONFIG_SENSORS_PCF8574 is not set 990# CONFIG_SENSORS_PCF8574 is not set
895# CONFIG_PCF8575 is not set 991# CONFIG_PCF8575 is not set
896# CONFIG_SENSORS_PCA9539 is not set 992# CONFIG_SENSORS_PCA9539 is not set
897# CONFIG_SENSORS_MAX6875 is not set
898# CONFIG_SENSORS_TSL2550 is not set 993# CONFIG_SENSORS_TSL2550 is not set
899# CONFIG_I2C_DEBUG_CORE is not set 994# CONFIG_I2C_DEBUG_CORE is not set
900# CONFIG_I2C_DEBUG_ALGO is not set 995# CONFIG_I2C_DEBUG_ALGO is not set
@@ -953,6 +1048,7 @@ CONFIG_HWMON=y
953# CONFIG_SENSORS_SMSC47B397 is not set 1048# CONFIG_SENSORS_SMSC47B397 is not set
954# CONFIG_SENSORS_ADS7828 is not set 1049# CONFIG_SENSORS_ADS7828 is not set
955# CONFIG_SENSORS_THMC50 is not set 1050# CONFIG_SENSORS_THMC50 is not set
1051# CONFIG_SENSORS_TMP401 is not set
956# CONFIG_SENSORS_VIA686A is not set 1052# CONFIG_SENSORS_VIA686A is not set
957# CONFIG_SENSORS_VT1211 is not set 1053# CONFIG_SENSORS_VT1211 is not set
958# CONFIG_SENSORS_VT8231 is not set 1054# CONFIG_SENSORS_VT8231 is not set
@@ -988,22 +1084,7 @@ CONFIG_SSB_POSSIBLE=y
988# CONFIG_MFD_WM8350_I2C is not set 1084# CONFIG_MFD_WM8350_I2C is not set
989# CONFIG_MFD_PCF50633 is not set 1085# CONFIG_MFD_PCF50633 is not set
990# CONFIG_REGULATOR is not set 1086# CONFIG_REGULATOR is not set
991 1087# CONFIG_MEDIA_SUPPORT is not set
992#
993# Multimedia devices
994#
995
996#
997# Multimedia core support
998#
999# CONFIG_VIDEO_DEV is not set
1000# CONFIG_DVB_CORE is not set
1001# CONFIG_VIDEO_MEDIA is not set
1002
1003#
1004# Multimedia drivers
1005#
1006CONFIG_DAB=y
1007 1088
1008# 1089#
1009# Graphics support 1090# Graphics support
@@ -1111,9 +1192,14 @@ CONFIG_RTC_DRV_RS5C372=y
1111# on-CPU RTC drivers 1192# on-CPU RTC drivers
1112# 1193#
1113CONFIG_RTC_DRV_SH=y 1194CONFIG_RTC_DRV_SH=y
1195# CONFIG_RTC_DRV_GENERIC is not set
1114# CONFIG_DMADEVICES is not set 1196# CONFIG_DMADEVICES is not set
1115# CONFIG_AUXDISPLAY is not set 1197# CONFIG_AUXDISPLAY is not set
1116# CONFIG_UIO is not set 1198# CONFIG_UIO is not set
1199
1200#
1201# TI VLYNQ
1202#
1117# CONFIG_STAGING is not set 1203# CONFIG_STAGING is not set
1118 1204
1119# 1205#
@@ -1134,10 +1220,11 @@ CONFIG_FS_MBCACHE=y
1134# CONFIG_REISERFS_FS is not set 1220# CONFIG_REISERFS_FS is not set
1135# CONFIG_JFS_FS is not set 1221# CONFIG_JFS_FS is not set
1136CONFIG_FS_POSIX_ACL=y 1222CONFIG_FS_POSIX_ACL=y
1137CONFIG_FILE_LOCKING=y
1138# CONFIG_XFS_FS is not set 1223# CONFIG_XFS_FS is not set
1139# CONFIG_OCFS2_FS is not set 1224# CONFIG_OCFS2_FS is not set
1140# CONFIG_BTRFS_FS is not set 1225# CONFIG_BTRFS_FS is not set
1226CONFIG_FILE_LOCKING=y
1227CONFIG_FSNOTIFY=y
1141CONFIG_DNOTIFY=y 1228CONFIG_DNOTIFY=y
1142CONFIG_INOTIFY=y 1229CONFIG_INOTIFY=y
1143CONFIG_INOTIFY_USER=y 1230CONFIG_INOTIFY_USER=y
@@ -1145,6 +1232,7 @@ CONFIG_INOTIFY_USER=y
1145# CONFIG_AUTOFS_FS is not set 1232# CONFIG_AUTOFS_FS is not set
1146# CONFIG_AUTOFS4_FS is not set 1233# CONFIG_AUTOFS4_FS is not set
1147CONFIG_FUSE_FS=m 1234CONFIG_FUSE_FS=m
1235# CONFIG_CUSE is not set
1148 1236
1149# 1237#
1150# Caches 1238# Caches
@@ -1190,6 +1278,7 @@ CONFIG_MISC_FILESYSTEMS=y
1190# CONFIG_BEFS_FS is not set 1278# CONFIG_BEFS_FS is not set
1191# CONFIG_BFS_FS is not set 1279# CONFIG_BFS_FS is not set
1192# CONFIG_EFS_FS is not set 1280# CONFIG_EFS_FS is not set
1281# CONFIG_JFFS2_FS is not set
1193# CONFIG_CRAMFS is not set 1282# CONFIG_CRAMFS is not set
1194# CONFIG_SQUASHFS is not set 1283# CONFIG_SQUASHFS is not set
1195# CONFIG_VXFS_FS is not set 1284# CONFIG_VXFS_FS is not set
@@ -1328,41 +1417,40 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1328CONFIG_HAVE_DYNAMIC_FTRACE=y 1417CONFIG_HAVE_DYNAMIC_FTRACE=y
1329CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1418CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1330CONFIG_RING_BUFFER=y 1419CONFIG_RING_BUFFER=y
1420CONFIG_EVENT_TRACING=y
1421CONFIG_CONTEXT_SWITCH_TRACER=y
1331CONFIG_TRACING=y 1422CONFIG_TRACING=y
1332CONFIG_TRACING_SUPPORT=y 1423CONFIG_TRACING_SUPPORT=y
1333 1424CONFIG_FTRACE=y
1334#
1335# Tracers
1336#
1337# CONFIG_FUNCTION_TRACER is not set 1425# CONFIG_FUNCTION_TRACER is not set
1338# CONFIG_IRQSOFF_TRACER is not set 1426# CONFIG_IRQSOFF_TRACER is not set
1339# CONFIG_PREEMPT_TRACER is not set 1427# CONFIG_PREEMPT_TRACER is not set
1340# CONFIG_SCHED_TRACER is not set 1428# CONFIG_SCHED_TRACER is not set
1341# CONFIG_CONTEXT_SWITCH_TRACER is not set 1429# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1342# CONFIG_EVENT_TRACER is not set
1343# CONFIG_BOOT_TRACER is not set 1430# CONFIG_BOOT_TRACER is not set
1344# CONFIG_TRACE_BRANCH_PROFILING is not set 1431CONFIG_BRANCH_PROFILE_NONE=y
1432# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1433# CONFIG_PROFILE_ALL_BRANCHES is not set
1345# CONFIG_STACK_TRACER is not set 1434# CONFIG_STACK_TRACER is not set
1346# CONFIG_KMEMTRACE is not set 1435# CONFIG_KMEMTRACE is not set
1347# CONFIG_WORKQUEUE_TRACER is not set 1436# CONFIG_WORKQUEUE_TRACER is not set
1348# CONFIG_BLK_DEV_IO_TRACE is not set 1437# CONFIG_BLK_DEV_IO_TRACE is not set
1349# CONFIG_FTRACE_STARTUP_TEST is not set 1438# CONFIG_RING_BUFFER_BENCHMARK is not set
1350# CONFIG_DYNAMIC_DEBUG is not set 1439# CONFIG_DYNAMIC_DEBUG is not set
1351# CONFIG_DMA_API_DEBUG is not set 1440# CONFIG_DMA_API_DEBUG is not set
1352# CONFIG_SAMPLES is not set 1441# CONFIG_SAMPLES is not set
1353CONFIG_HAVE_ARCH_KGDB=y 1442CONFIG_HAVE_ARCH_KGDB=y
1354# CONFIG_KGDB is not set 1443# CONFIG_KGDB is not set
1355CONFIG_SH_STANDARD_BIOS=y 1444# CONFIG_SH_STANDARD_BIOS is not set
1356# CONFIG_EARLY_SCIF_CONSOLE is not set 1445CONFIG_EARLY_SCIF_CONSOLE=y
1357CONFIG_EARLY_PRINTK=y 1446CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000
1447# CONFIG_EARLY_PRINTK is not set
1358# CONFIG_DEBUG_BOOTMEM is not set 1448# CONFIG_DEBUG_BOOTMEM is not set
1359CONFIG_DEBUG_STACKOVERFLOW=y 1449CONFIG_DEBUG_STACKOVERFLOW=y
1360# CONFIG_DEBUG_STACK_USAGE is not set 1450# CONFIG_DEBUG_STACK_USAGE is not set
1361# CONFIG_4KSTACKS is not set 1451# CONFIG_4KSTACKS is not set
1362# CONFIG_IRQSTACKS is not set
1363CONFIG_DUMP_CODE=y 1452CONFIG_DUMP_CODE=y
1364# CONFIG_SH_NO_BSS_INIT is not set 1453# CONFIG_SH_NO_BSS_INIT is not set
1365# CONFIG_MORE_COMPILE_OPTIONS is not set
1366 1454
1367# 1455#
1368# Security options 1456# Security options
@@ -1486,3 +1574,4 @@ CONFIG_HAS_IOMEM=y
1486CONFIG_HAS_IOPORT=y 1574CONFIG_HAS_IOPORT=y
1487CONFIG_HAS_DMA=y 1575CONFIG_HAS_DMA=y
1488CONFIG_NLATTR=y 1576CONFIG_NLATTR=y
1577CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 82658f672398..8a3dc300db4a 100644
--- a/arch/sh/configs/r7785rp_defconfig
+++ b/arch/sh/configs/r7785rp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:55:10 2009 4# Thu Jun 18 12:37:20 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_PCI=y 23CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y
24CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
25CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
26CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -80,7 +81,6 @@ CONFIG_UID16=y
80CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
81CONFIG_KALLSYMS_ALL=y 82CONFIG_KALLSYMS_ALL=y
82# CONFIG_KALLSYMS_EXTRA_PASS is not set 83# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y 84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 85CONFIG_PRINTK=y
86CONFIG_BUG=y 86CONFIG_BUG=y
@@ -93,15 +93,20 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 94CONFIG_SHMEM=y
95CONFIG_AIO=y 95CONFIG_AIO=y
96
97#
98# Performance Counters
99#
96CONFIG_VM_EVENT_COUNTERS=y 100CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_PCI_QUIRKS=y 101CONFIG_PCI_QUIRKS=y
102# CONFIG_STRIP_ASM_SYMS is not set
98CONFIG_COMPAT_BRK=y 103CONFIG_COMPAT_BRK=y
99CONFIG_SLAB=y 104CONFIG_SLAB=y
100# CONFIG_SLUB is not set 105# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set 106# CONFIG_SLOB is not set
102CONFIG_PROFILING=y 107CONFIG_PROFILING=y
103CONFIG_TRACEPOINTS=y 108CONFIG_TRACEPOINTS=y
104# CONFIG_MARKERS is not set 109CONFIG_MARKERS=y
105CONFIG_OPROFILE=y 110CONFIG_OPROFILE=y
106CONFIG_HAVE_OPROFILE=y 111CONFIG_HAVE_OPROFILE=y
107CONFIG_KPROBES=y 112CONFIG_KPROBES=y
@@ -189,6 +194,7 @@ CONFIG_CPU_SUBTYPE_SH7785=y
189CONFIG_QUICKLIST=y 194CONFIG_QUICKLIST=y
190CONFIG_MMU=y 195CONFIG_MMU=y
191CONFIG_PAGE_OFFSET=0x80000000 196CONFIG_PAGE_OFFSET=0x80000000
197CONFIG_FORCE_MAX_ZONEORDER=11
192CONFIG_MEMORY_START=0x08000000 198CONFIG_MEMORY_START=0x08000000
193CONFIG_MEMORY_SIZE=0x08000000 199CONFIG_MEMORY_SIZE=0x08000000
194# CONFIG_29BIT is not set 200# CONFIG_29BIT is not set
@@ -211,7 +217,6 @@ CONFIG_PAGE_SIZE_4KB=y
211# CONFIG_PAGE_SIZE_8KB is not set 217# CONFIG_PAGE_SIZE_8KB is not set
212# CONFIG_PAGE_SIZE_16KB is not set 218# CONFIG_PAGE_SIZE_16KB is not set
213# CONFIG_PAGE_SIZE_64KB is not set 219# CONFIG_PAGE_SIZE_64KB is not set
214CONFIG_ENTRY_OFFSET=0x00001000
215# CONFIG_HUGETLB_PAGE_SIZE_64K is not set 220# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
216# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 221# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
217CONFIG_HUGETLB_PAGE_SIZE_1MB=y 222CONFIG_HUGETLB_PAGE_SIZE_1MB=y
@@ -232,9 +237,9 @@ CONFIG_MIGRATION=y
232# CONFIG_PHYS_ADDR_T_64BIT is not set 237# CONFIG_PHYS_ADDR_T_64BIT is not set
233CONFIG_ZONE_DMA_FLAG=0 238CONFIG_ZONE_DMA_FLAG=0
234CONFIG_NR_QUICK=2 239CONFIG_NR_QUICK=2
235CONFIG_UNEVICTABLE_LRU=y
236CONFIG_HAVE_MLOCK=y 240CONFIG_HAVE_MLOCK=y
237CONFIG_HAVE_MLOCKED_PAGE_BIT=y 241CONFIG_HAVE_MLOCKED_PAGE_BIT=y
242CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
238 243
239# 244#
240# Cache configuration 245# Cache configuration
@@ -252,7 +257,6 @@ CONFIG_SH_FPU=y
252CONFIG_SH_STORE_QUEUES=y 257CONFIG_SH_STORE_QUEUES=y
253CONFIG_CPU_HAS_INTEVT=y 258CONFIG_CPU_HAS_INTEVT=y
254CONFIG_CPU_HAS_SR_RB=y 259CONFIG_CPU_HAS_SR_RB=y
255CONFIG_CPU_HAS_PTEA=y
256CONFIG_CPU_HAS_FPU=y 260CONFIG_CPU_HAS_FPU=y
257 261
258# 262#
@@ -267,9 +271,9 @@ CONFIG_SH_R7785RP=y
267# 271#
268# Timer and clock configuration 272# Timer and clock configuration
269# 273#
270CONFIG_SH_TMU=y 274CONFIG_SH_TIMER_TMU=y
271CONFIG_SH_TIMER_IRQ=28
272CONFIG_SH_PCLK_FREQ=33333333 275CONFIG_SH_PCLK_FREQ=33333333
276CONFIG_SH_CLK_CPG=y
273CONFIG_TICK_ONESHOT=y 277CONFIG_TICK_ONESHOT=y
274CONFIG_NO_HZ=y 278CONFIG_NO_HZ=y
275CONFIG_HIGH_RES_TIMERS=y 279CONFIG_HIGH_RES_TIMERS=y
@@ -326,12 +330,14 @@ CONFIG_KEXEC=y
326# CONFIG_PREEMPT_VOLUNTARY is not set 330# CONFIG_PREEMPT_VOLUNTARY is not set
327CONFIG_PREEMPT=y 331CONFIG_PREEMPT=y
328CONFIG_GUSA=y 332CONFIG_GUSA=y
333# CONFIG_SPARSE_IRQ is not set
329 334
330# 335#
331# Boot options 336# Boot options
332# 337#
333CONFIG_ZERO_PAGE_OFFSET=0x00001000 338CONFIG_ZERO_PAGE_OFFSET=0x00001000
334CONFIG_BOOT_LINK_OFFSET=0x00800000 339CONFIG_BOOT_LINK_OFFSET=0x00800000
340CONFIG_ENTRY_OFFSET=0x00001000
335CONFIG_CMDLINE_BOOL=y 341CONFIG_CMDLINE_BOOL=y
336CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" 342CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
337 343
@@ -429,6 +435,7 @@ CONFIG_LLC=m
429# CONFIG_ECONET is not set 435# CONFIG_ECONET is not set
430# CONFIG_WAN_ROUTER is not set 436# CONFIG_WAN_ROUTER is not set
431# CONFIG_PHONET is not set 437# CONFIG_PHONET is not set
438# CONFIG_IEEE802154 is not set
432# CONFIG_NET_SCHED is not set 439# CONFIG_NET_SCHED is not set
433# CONFIG_DCB is not set 440# CONFIG_DCB is not set
434 441
@@ -449,7 +456,11 @@ CONFIG_WIRELESS=y
449CONFIG_WIRELESS_EXT=y 456CONFIG_WIRELESS_EXT=y
450CONFIG_WIRELESS_EXT_SYSFS=y 457CONFIG_WIRELESS_EXT_SYSFS=y
451# CONFIG_LIB80211 is not set 458# CONFIG_LIB80211 is not set
452# CONFIG_MAC80211 is not set 459
460#
461# CFG80211 needs to be enabled for MAC80211
462#
463CONFIG_MAC80211_DEFAULT_PS_VALUE=0
453# CONFIG_WIMAX is not set 464# CONFIG_WIMAX is not set
454# CONFIG_RFKILL is not set 465# CONFIG_RFKILL is not set
455# CONFIG_NET_9P is not set 466# CONFIG_NET_9P is not set
@@ -503,7 +514,9 @@ CONFIG_MISC_DEVICES=y
503# 514#
504# CONFIG_EEPROM_AT24 is not set 515# CONFIG_EEPROM_AT24 is not set
505# CONFIG_EEPROM_LEGACY is not set 516# CONFIG_EEPROM_LEGACY is not set
517# CONFIG_EEPROM_MAX6875 is not set
506CONFIG_EEPROM_93CX6=y 518CONFIG_EEPROM_93CX6=y
519# CONFIG_CB710_CORE is not set
507CONFIG_HAVE_IDE=y 520CONFIG_HAVE_IDE=y
508# CONFIG_IDE is not set 521# CONFIG_IDE is not set
509 522
@@ -526,10 +539,6 @@ CONFIG_BLK_DEV_SD=y
526# CONFIG_BLK_DEV_SR is not set 539# CONFIG_BLK_DEV_SR is not set
527CONFIG_CHR_DEV_SG=m 540CONFIG_CHR_DEV_SG=m
528# CONFIG_CHR_DEV_SCH is not set 541# CONFIG_CHR_DEV_SCH is not set
529
530#
531# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
532#
533# CONFIG_SCSI_MULTI_LUN is not set 542# CONFIG_SCSI_MULTI_LUN is not set
534# CONFIG_SCSI_CONSTANTS is not set 543# CONFIG_SCSI_CONSTANTS is not set
535# CONFIG_SCSI_LOGGING is not set 544# CONFIG_SCSI_LOGGING is not set
@@ -547,6 +556,7 @@ CONFIG_SCSI_WAIT_SCAN=m
547CONFIG_SCSI_LOWLEVEL=y 556CONFIG_SCSI_LOWLEVEL=y
548# CONFIG_ISCSI_TCP is not set 557# CONFIG_ISCSI_TCP is not set
549# CONFIG_SCSI_CXGB3_ISCSI is not set 558# CONFIG_SCSI_CXGB3_ISCSI is not set
559# CONFIG_SCSI_BNX2_ISCSI is not set
550# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 560# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
551# CONFIG_SCSI_3W_9XXX is not set 561# CONFIG_SCSI_3W_9XXX is not set
552# CONFIG_SCSI_ACARD is not set 562# CONFIG_SCSI_ACARD is not set
@@ -555,6 +565,7 @@ CONFIG_SCSI_LOWLEVEL=y
555# CONFIG_SCSI_AIC7XXX_OLD is not set 565# CONFIG_SCSI_AIC7XXX_OLD is not set
556# CONFIG_SCSI_AIC79XX is not set 566# CONFIG_SCSI_AIC79XX is not set
557# CONFIG_SCSI_AIC94XX is not set 567# CONFIG_SCSI_AIC94XX is not set
568# CONFIG_SCSI_MVSAS is not set
558# CONFIG_SCSI_ARCMSR is not set 569# CONFIG_SCSI_ARCMSR is not set
559# CONFIG_MEGARAID_NEWGEN is not set 570# CONFIG_MEGARAID_NEWGEN is not set
560# CONFIG_MEGARAID_LEGACY is not set 571# CONFIG_MEGARAID_LEGACY is not set
@@ -569,7 +580,6 @@ CONFIG_SCSI_LOWLEVEL=y
569# CONFIG_SCSI_IPS is not set 580# CONFIG_SCSI_IPS is not set
570# CONFIG_SCSI_INITIO is not set 581# CONFIG_SCSI_INITIO is not set
571# CONFIG_SCSI_INIA100 is not set 582# CONFIG_SCSI_INIA100 is not set
572# CONFIG_SCSI_MVSAS is not set
573# CONFIG_SCSI_STEX is not set 583# CONFIG_SCSI_STEX is not set
574# CONFIG_SCSI_SYM53C8XX_2 is not set 584# CONFIG_SCSI_SYM53C8XX_2 is not set
575# CONFIG_SCSI_IPR is not set 585# CONFIG_SCSI_IPR is not set
@@ -658,7 +668,6 @@ CONFIG_PATA_PLATFORM=y
658# CONFIG_IEEE1394 is not set 668# CONFIG_IEEE1394 is not set
659# CONFIG_I2O is not set 669# CONFIG_I2O is not set
660CONFIG_NETDEVICES=y 670CONFIG_NETDEVICES=y
661CONFIG_COMPAT_NET_DEV_OPS=y
662# CONFIG_DUMMY is not set 671# CONFIG_DUMMY is not set
663# CONFIG_BONDING is not set 672# CONFIG_BONDING is not set
664# CONFIG_MACVLAN is not set 673# CONFIG_MACVLAN is not set
@@ -692,6 +701,7 @@ CONFIG_AX88796_93CX6=y
692# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 701# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
693# CONFIG_NET_PCI is not set 702# CONFIG_NET_PCI is not set
694# CONFIG_B44 is not set 703# CONFIG_B44 is not set
704# CONFIG_KS8842 is not set
695# CONFIG_ATL2 is not set 705# CONFIG_ATL2 is not set
696CONFIG_NETDEV_1000=y 706CONFIG_NETDEV_1000=y
697# CONFIG_ACENIC is not set 707# CONFIG_ACENIC is not set
@@ -899,7 +909,6 @@ CONFIG_I2C_HIGHLANDER=y
899# CONFIG_SENSORS_PCF8574 is not set 909# CONFIG_SENSORS_PCF8574 is not set
900# CONFIG_PCF8575 is not set 910# CONFIG_PCF8575 is not set
901# CONFIG_SENSORS_PCA9539 is not set 911# CONFIG_SENSORS_PCA9539 is not set
902# CONFIG_SENSORS_MAX6875 is not set
903# CONFIG_SENSORS_TSL2550 is not set 912# CONFIG_SENSORS_TSL2550 is not set
904# CONFIG_I2C_DEBUG_CORE is not set 913# CONFIG_I2C_DEBUG_CORE is not set
905# CONFIG_I2C_DEBUG_ALGO is not set 914# CONFIG_I2C_DEBUG_ALGO is not set
@@ -983,6 +992,7 @@ CONFIG_HWMON=y
983# CONFIG_SENSORS_SMSC47B397 is not set 992# CONFIG_SENSORS_SMSC47B397 is not set
984# CONFIG_SENSORS_ADS7828 is not set 993# CONFIG_SENSORS_ADS7828 is not set
985# CONFIG_SENSORS_THMC50 is not set 994# CONFIG_SENSORS_THMC50 is not set
995# CONFIG_SENSORS_TMP401 is not set
986# CONFIG_SENSORS_VIA686A is not set 996# CONFIG_SENSORS_VIA686A is not set
987# CONFIG_SENSORS_VT1211 is not set 997# CONFIG_SENSORS_VT1211 is not set
988# CONFIG_SENSORS_VT8231 is not set 998# CONFIG_SENSORS_VT8231 is not set
@@ -1019,22 +1029,7 @@ CONFIG_SSB_POSSIBLE=y
1019# CONFIG_MFD_WM8350_I2C is not set 1029# CONFIG_MFD_WM8350_I2C is not set
1020# CONFIG_MFD_PCF50633 is not set 1030# CONFIG_MFD_PCF50633 is not set
1021# CONFIG_REGULATOR is not set 1031# CONFIG_REGULATOR is not set
1022 1032# CONFIG_MEDIA_SUPPORT is not set
1023#
1024# Multimedia devices
1025#
1026
1027#
1028# Multimedia core support
1029#
1030# CONFIG_VIDEO_DEV is not set
1031# CONFIG_DVB_CORE is not set
1032# CONFIG_VIDEO_MEDIA is not set
1033
1034#
1035# Multimedia drivers
1036#
1037# CONFIG_DAB is not set
1038 1033
1039# 1034#
1040# Graphics support 1035# Graphics support
@@ -1195,9 +1190,14 @@ CONFIG_RTC_DRV_RS5C372=y
1195# on-CPU RTC drivers 1190# on-CPU RTC drivers
1196# 1191#
1197CONFIG_RTC_DRV_SH=y 1192CONFIG_RTC_DRV_SH=y
1193# CONFIG_RTC_DRV_GENERIC is not set
1198# CONFIG_DMADEVICES is not set 1194# CONFIG_DMADEVICES is not set
1199# CONFIG_AUXDISPLAY is not set 1195# CONFIG_AUXDISPLAY is not set
1200# CONFIG_UIO is not set 1196# CONFIG_UIO is not set
1197
1198#
1199# TI VLYNQ
1200#
1201# CONFIG_STAGING is not set 1201# CONFIG_STAGING is not set
1202 1202
1203# 1203#
@@ -1218,10 +1218,11 @@ CONFIG_FS_MBCACHE=y
1218# CONFIG_REISERFS_FS is not set 1218# CONFIG_REISERFS_FS is not set
1219# CONFIG_JFS_FS is not set 1219# CONFIG_JFS_FS is not set
1220CONFIG_FS_POSIX_ACL=y 1220CONFIG_FS_POSIX_ACL=y
1221CONFIG_FILE_LOCKING=y
1222# CONFIG_XFS_FS is not set 1221# CONFIG_XFS_FS is not set
1223# CONFIG_OCFS2_FS is not set 1222# CONFIG_OCFS2_FS is not set
1224# CONFIG_BTRFS_FS is not set 1223# CONFIG_BTRFS_FS is not set
1224CONFIG_FILE_LOCKING=y
1225CONFIG_FSNOTIFY=y
1225CONFIG_DNOTIFY=y 1226CONFIG_DNOTIFY=y
1226CONFIG_INOTIFY=y 1227CONFIG_INOTIFY=y
1227CONFIG_INOTIFY_USER=y 1228CONFIG_INOTIFY_USER=y
@@ -1229,6 +1230,7 @@ CONFIG_INOTIFY_USER=y
1229# CONFIG_AUTOFS_FS is not set 1230# CONFIG_AUTOFS_FS is not set
1230# CONFIG_AUTOFS4_FS is not set 1231# CONFIG_AUTOFS4_FS is not set
1231CONFIG_FUSE_FS=m 1232CONFIG_FUSE_FS=m
1233# CONFIG_CUSE is not set
1232 1234
1233# 1235#
1234# Caches 1236# Caches
@@ -1413,25 +1415,25 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1413CONFIG_HAVE_DYNAMIC_FTRACE=y 1415CONFIG_HAVE_DYNAMIC_FTRACE=y
1414CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1416CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1415CONFIG_RING_BUFFER=y 1417CONFIG_RING_BUFFER=y
1418CONFIG_EVENT_TRACING=y
1419CONFIG_CONTEXT_SWITCH_TRACER=y
1416CONFIG_TRACING=y 1420CONFIG_TRACING=y
1417CONFIG_TRACING_SUPPORT=y 1421CONFIG_TRACING_SUPPORT=y
1418 1422CONFIG_FTRACE=y
1419#
1420# Tracers
1421#
1422# CONFIG_FUNCTION_TRACER is not set 1423# CONFIG_FUNCTION_TRACER is not set
1423# CONFIG_IRQSOFF_TRACER is not set 1424# CONFIG_IRQSOFF_TRACER is not set
1424# CONFIG_PREEMPT_TRACER is not set 1425# CONFIG_PREEMPT_TRACER is not set
1425# CONFIG_SCHED_TRACER is not set 1426# CONFIG_SCHED_TRACER is not set
1426# CONFIG_CONTEXT_SWITCH_TRACER is not set 1427# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1427# CONFIG_EVENT_TRACER is not set
1428# CONFIG_BOOT_TRACER is not set 1428# CONFIG_BOOT_TRACER is not set
1429# CONFIG_TRACE_BRANCH_PROFILING is not set 1429CONFIG_BRANCH_PROFILE_NONE=y
1430# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1431# CONFIG_PROFILE_ALL_BRANCHES is not set
1430# CONFIG_STACK_TRACER is not set 1432# CONFIG_STACK_TRACER is not set
1431# CONFIG_KMEMTRACE is not set 1433# CONFIG_KMEMTRACE is not set
1432# CONFIG_WORKQUEUE_TRACER is not set 1434# CONFIG_WORKQUEUE_TRACER is not set
1433# CONFIG_BLK_DEV_IO_TRACE is not set 1435# CONFIG_BLK_DEV_IO_TRACE is not set
1434# CONFIG_FTRACE_STARTUP_TEST is not set 1436# CONFIG_RING_BUFFER_BENCHMARK is not set
1435# CONFIG_DYNAMIC_DEBUG is not set 1437# CONFIG_DYNAMIC_DEBUG is not set
1436# CONFIG_DMA_API_DEBUG is not set 1438# CONFIG_DMA_API_DEBUG is not set
1437# CONFIG_SAMPLES is not set 1439# CONFIG_SAMPLES is not set
@@ -1444,10 +1446,8 @@ CONFIG_EARLY_PRINTK=y
1444CONFIG_DEBUG_STACKOVERFLOW=y 1446CONFIG_DEBUG_STACKOVERFLOW=y
1445CONFIG_DEBUG_STACK_USAGE=y 1447CONFIG_DEBUG_STACK_USAGE=y
1446CONFIG_4KSTACKS=y 1448CONFIG_4KSTACKS=y
1447# CONFIG_IRQSTACKS is not set
1448CONFIG_DUMP_CODE=y 1449CONFIG_DUMP_CODE=y
1449# CONFIG_SH_NO_BSS_INIT is not set 1450# CONFIG_SH_NO_BSS_INIT is not set
1450# CONFIG_MORE_COMPILE_OPTIONS is not set
1451 1451
1452# 1452#
1453# Security options 1453# Security options
@@ -1572,3 +1572,4 @@ CONFIG_HAS_IOMEM=y
1572CONFIG_HAS_IOPORT=y 1572CONFIG_HAS_IOPORT=y
1573CONFIG_HAS_DMA=y 1573CONFIG_HAS_DMA=y
1574CONFIG_NLATTR=y 1574CONFIG_NLATTR=y
1575CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rsk7201_defconfig b/arch/sh/configs/rsk7201_defconfig
index fa4395768d19..55c3656a75c1 100644
--- a/arch/sh/configs/rsk7201_defconfig
+++ b/arch/sh/configs/rsk7201_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:56:29 2009 4# Thu Jun 18 12:39:54 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -15,10 +15,11 @@ CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
18# CONFIG_GENERIC_TIME is not set 18CONFIG_GENERIC_TIME=y
19# CONFIG_GENERIC_CLOCKEVENTS is not set 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
22CONFIG_SYS_SUPPORTS_MTU2=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -74,7 +75,6 @@ CONFIG_UID16=y
74CONFIG_SYSCTL_SYSCALL=y 75CONFIG_SYSCTL_SYSCALL=y
75CONFIG_KALLSYMS=y 76CONFIG_KALLSYMS=y
76# CONFIG_KALLSYMS_EXTRA_PASS is not set 77# CONFIG_KALLSYMS_EXTRA_PASS is not set
77# CONFIG_STRIP_ASM_SYMS is not set
78CONFIG_HOTPLUG=y 78CONFIG_HOTPLUG=y
79CONFIG_PRINTK=y 79CONFIG_PRINTK=y
80CONFIG_BUG=y 80CONFIG_BUG=y
@@ -86,14 +86,19 @@ CONFIG_SIGNALFD=y
86CONFIG_TIMERFD=y 86CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 87CONFIG_EVENTFD=y
88# CONFIG_AIO is not set 88# CONFIG_AIO is not set
89
90#
91# Performance Counters
92#
89CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
94# CONFIG_STRIP_ASM_SYMS is not set
90CONFIG_COMPAT_BRK=y 95CONFIG_COMPAT_BRK=y
91# CONFIG_SLAB is not set 96# CONFIG_SLAB is not set
92# CONFIG_SLUB is not set 97# CONFIG_SLUB is not set
93CONFIG_SLOB=y 98CONFIG_SLOB=y
94CONFIG_PROFILING=y 99CONFIG_PROFILING=y
95CONFIG_TRACEPOINTS=y 100CONFIG_TRACEPOINTS=y
96# CONFIG_MARKERS is not set 101CONFIG_MARKERS=y
97CONFIG_OPROFILE=y 102CONFIG_OPROFILE=y
98CONFIG_HAVE_OPROFILE=y 103CONFIG_HAVE_OPROFILE=y
99# CONFIG_KPROBES is not set 104# CONFIG_KPROBES is not set
@@ -175,6 +180,7 @@ CONFIG_CPU_SUBTYPE_SH7201=y
175# 180#
176CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
177CONFIG_PAGE_OFFSET=0x00000000 182CONFIG_PAGE_OFFSET=0x00000000
183CONFIG_FORCE_MAX_ZONEORDER=14
178CONFIG_MEMORY_START=0x08000000 184CONFIG_MEMORY_START=0x08000000
179CONFIG_MEMORY_SIZE=0x01000000 185CONFIG_MEMORY_SIZE=0x01000000
180CONFIG_29BIT=y 186CONFIG_29BIT=y
@@ -188,7 +194,6 @@ CONFIG_PAGE_SIZE_4KB=y
188# CONFIG_PAGE_SIZE_8KB is not set 194# CONFIG_PAGE_SIZE_8KB is not set
189# CONFIG_PAGE_SIZE_16KB is not set 195# CONFIG_PAGE_SIZE_16KB is not set
190# CONFIG_PAGE_SIZE_64KB is not set 196# CONFIG_PAGE_SIZE_64KB is not set
191CONFIG_ENTRY_OFFSET=0x00001000
192CONFIG_SELECT_MEMORY_MODEL=y 197CONFIG_SELECT_MEMORY_MODEL=y
193CONFIG_FLATMEM_MANUAL=y 198CONFIG_FLATMEM_MANUAL=y
194# CONFIG_DISCONTIGMEM_MANUAL is not set 199# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -201,7 +206,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
201# CONFIG_PHYS_ADDR_T_64BIT is not set 206# CONFIG_PHYS_ADDR_T_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=0 207CONFIG_ZONE_DMA_FLAG=0
203CONFIG_NR_QUICK=2 208CONFIG_NR_QUICK=2
204CONFIG_UNEVICTABLE_LRU=y 209CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
210CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
205 211
206# 212#
207# Cache configuration 213# Cache configuration
@@ -228,10 +234,14 @@ CONFIG_SH_RSK7201=y
228# 234#
229# Timer and clock configuration 235# Timer and clock configuration
230# 236#
231CONFIG_SH_MTU2=y 237CONFIG_SH_TIMER_MTU2=y
232CONFIG_SH_TIMER_IRQ=16
233CONFIG_SH_PCLK_FREQ=40000000 238CONFIG_SH_PCLK_FREQ=40000000
239CONFIG_SH_CLK_CPG=y
240CONFIG_SH_CLK_CPG_LEGACY=y
234CONFIG_SH_CLK_MD=0 241CONFIG_SH_CLK_MD=0
242# CONFIG_NO_HZ is not set
243# CONFIG_HIGH_RES_TIMERS is not set
244CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
235 245
236# 246#
237# CPU Frequency scaling 247# CPU Frequency scaling
@@ -267,12 +277,14 @@ CONFIG_PREEMPT_NONE=y
267# CONFIG_PREEMPT_VOLUNTARY is not set 277# CONFIG_PREEMPT_VOLUNTARY is not set
268# CONFIG_PREEMPT is not set 278# CONFIG_PREEMPT is not set
269CONFIG_GUSA=y 279CONFIG_GUSA=y
280# CONFIG_SPARSE_IRQ is not set
270 281
271# 282#
272# Boot options 283# Boot options
273# 284#
274CONFIG_ZERO_PAGE_OFFSET=0x00001000 285CONFIG_ZERO_PAGE_OFFSET=0x00001000
275CONFIG_BOOT_LINK_OFFSET=0x00800000 286CONFIG_BOOT_LINK_OFFSET=0x00800000
287CONFIG_ENTRY_OFFSET=0x00001000
276CONFIG_CMDLINE_BOOL=y 288CONFIG_CMDLINE_BOOL=y
277CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel" 289CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
278 290
@@ -506,21 +518,7 @@ CONFIG_SSB_POSSIBLE=y
506# CONFIG_HTC_PASIC3 is not set 518# CONFIG_HTC_PASIC3 is not set
507# CONFIG_MFD_TMIO is not set 519# CONFIG_MFD_TMIO is not set
508# CONFIG_REGULATOR is not set 520# CONFIG_REGULATOR is not set
509 521# CONFIG_MEDIA_SUPPORT is not set
510#
511# Multimedia devices
512#
513
514#
515# Multimedia core support
516#
517# CONFIG_VIDEO_DEV is not set
518# CONFIG_VIDEO_MEDIA is not set
519
520#
521# Multimedia drivers
522#
523CONFIG_DAB=y
524 522
525# 523#
526# Graphics support 524# Graphics support
@@ -578,9 +576,14 @@ CONFIG_RTC_INTF_DEV=y
578# on-CPU RTC drivers 576# on-CPU RTC drivers
579# 577#
580CONFIG_RTC_DRV_SH=y 578CONFIG_RTC_DRV_SH=y
579# CONFIG_RTC_DRV_GENERIC is not set
581# CONFIG_DMADEVICES is not set 580# CONFIG_DMADEVICES is not set
582# CONFIG_AUXDISPLAY is not set 581# CONFIG_AUXDISPLAY is not set
583# CONFIG_UIO is not set 582# CONFIG_UIO is not set
583
584#
585# TI VLYNQ
586#
584# CONFIG_STAGING is not set 587# CONFIG_STAGING is not set
585 588
586# 589#
@@ -593,11 +596,13 @@ CONFIG_EXT2_FS=y
593# CONFIG_REISERFS_FS is not set 596# CONFIG_REISERFS_FS is not set
594# CONFIG_JFS_FS is not set 597# CONFIG_JFS_FS is not set
595# CONFIG_FS_POSIX_ACL is not set 598# CONFIG_FS_POSIX_ACL is not set
596# CONFIG_FILE_LOCKING is not set
597# CONFIG_XFS_FS is not set 599# CONFIG_XFS_FS is not set
598# CONFIG_BTRFS_FS is not set 600# CONFIG_BTRFS_FS is not set
601# CONFIG_FILE_LOCKING is not set
602CONFIG_FSNOTIFY=y
599# CONFIG_DNOTIFY is not set 603# CONFIG_DNOTIFY is not set
600# CONFIG_INOTIFY is not set 604# CONFIG_INOTIFY is not set
605CONFIG_INOTIFY_USER=y
601# CONFIG_QUOTA is not set 606# CONFIG_QUOTA is not set
602# CONFIG_AUTOFS_FS is not set 607# CONFIG_AUTOFS_FS is not set
603# CONFIG_AUTOFS4_FS is not set 608# CONFIG_AUTOFS4_FS is not set
@@ -696,30 +701,17 @@ CONFIG_HAVE_FUNCTION_TRACER=y
696CONFIG_HAVE_DYNAMIC_FTRACE=y 701CONFIG_HAVE_DYNAMIC_FTRACE=y
697CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 702CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
698CONFIG_RING_BUFFER=y 703CONFIG_RING_BUFFER=y
704CONFIG_EVENT_TRACING=y
705CONFIG_CONTEXT_SWITCH_TRACER=y
699CONFIG_TRACING=y 706CONFIG_TRACING=y
700CONFIG_TRACING_SUPPORT=y 707CONFIG_TRACING_SUPPORT=y
701 708# CONFIG_FTRACE is not set
702#
703# Tracers
704#
705# CONFIG_FUNCTION_TRACER is not set
706# CONFIG_SCHED_TRACER is not set
707# CONFIG_CONTEXT_SWITCH_TRACER is not set
708# CONFIG_EVENT_TRACER is not set
709# CONFIG_BOOT_TRACER is not set
710# CONFIG_TRACE_BRANCH_PROFILING is not set
711# CONFIG_STACK_TRACER is not set
712# CONFIG_KMEMTRACE is not set
713# CONFIG_WORKQUEUE_TRACER is not set
714# CONFIG_BLK_DEV_IO_TRACE is not set
715# CONFIG_FTRACE_STARTUP_TEST is not set
716# CONFIG_DYNAMIC_DEBUG is not set 709# CONFIG_DYNAMIC_DEBUG is not set
717# CONFIG_DMA_API_DEBUG is not set 710# CONFIG_DMA_API_DEBUG is not set
718# CONFIG_SAMPLES is not set 711# CONFIG_SAMPLES is not set
719CONFIG_HAVE_ARCH_KGDB=y 712CONFIG_HAVE_ARCH_KGDB=y
720# CONFIG_SH_STANDARD_BIOS is not set 713# CONFIG_SH_STANDARD_BIOS is not set
721# CONFIG_EARLY_SCIF_CONSOLE is not set 714# CONFIG_EARLY_SCIF_CONSOLE is not set
722# CONFIG_MORE_COMPILE_OPTIONS is not set
723 715
724# 716#
725# Security options 717# Security options
@@ -749,3 +741,4 @@ CONFIG_DECOMPRESS_GZIP=y
749CONFIG_HAS_IOMEM=y 741CONFIG_HAS_IOMEM=y
750CONFIG_HAS_IOPORT=y 742CONFIG_HAS_IOPORT=y
751CONFIG_HAS_DMA=y 743CONFIG_HAS_DMA=y
744CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig
index e3a65f819f0a..69e619967b7b 100644
--- a/arch/sh/configs/rsk7203_defconfig
+++ b/arch/sh/configs/rsk7203_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:57:06 2009 4# Thu Jun 18 12:40:44 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -15,11 +15,12 @@ CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_GPIO=y 17CONFIG_GENERIC_GPIO=y
18# CONFIG_GENERIC_TIME is not set 18CONFIG_GENERIC_TIME=y
19# CONFIG_GENERIC_CLOCKEVENTS is not set 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
22CONFIG_SYS_SUPPORTS_CMT=y 22CONFIG_SYS_SUPPORTS_CMT=y
23CONFIG_SYS_SUPPORTS_MTU2=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -81,7 +82,6 @@ CONFIG_SYSCTL_SYSCALL=y
81CONFIG_KALLSYMS=y 82CONFIG_KALLSYMS=y
82CONFIG_KALLSYMS_ALL=y 83CONFIG_KALLSYMS_ALL=y
83# CONFIG_KALLSYMS_EXTRA_PASS is not set 84# CONFIG_KALLSYMS_EXTRA_PASS is not set
84# CONFIG_STRIP_ASM_SYMS is not set
85CONFIG_HOTPLUG=y 85CONFIG_HOTPLUG=y
86CONFIG_PRINTK=y 86CONFIG_PRINTK=y
87CONFIG_BUG=y 87CONFIG_BUG=y
@@ -93,14 +93,19 @@ CONFIG_SIGNALFD=y
93CONFIG_TIMERFD=y 93CONFIG_TIMERFD=y
94CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
95CONFIG_AIO=y 95CONFIG_AIO=y
96
97#
98# Performance Counters
99#
96CONFIG_VM_EVENT_COUNTERS=y 100CONFIG_VM_EVENT_COUNTERS=y
101# CONFIG_STRIP_ASM_SYMS is not set
97CONFIG_COMPAT_BRK=y 102CONFIG_COMPAT_BRK=y
98# CONFIG_SLAB is not set 103# CONFIG_SLAB is not set
99# CONFIG_SLUB is not set 104# CONFIG_SLUB is not set
100CONFIG_SLOB=y 105CONFIG_SLOB=y
101CONFIG_PROFILING=y 106CONFIG_PROFILING=y
102CONFIG_TRACEPOINTS=y 107CONFIG_TRACEPOINTS=y
103# CONFIG_MARKERS is not set 108CONFIG_MARKERS=y
104CONFIG_OPROFILE=y 109CONFIG_OPROFILE=y
105CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
106# CONFIG_KPROBES is not set 111# CONFIG_KPROBES is not set
@@ -182,6 +187,7 @@ CONFIG_CPU_SUBTYPE_SH7203=y
182# 187#
183CONFIG_QUICKLIST=y 188CONFIG_QUICKLIST=y
184CONFIG_PAGE_OFFSET=0x00000000 189CONFIG_PAGE_OFFSET=0x00000000
190CONFIG_FORCE_MAX_ZONEORDER=14
185CONFIG_MEMORY_START=0x0c000000 191CONFIG_MEMORY_START=0x0c000000
186CONFIG_MEMORY_SIZE=0x01000000 192CONFIG_MEMORY_SIZE=0x01000000
187CONFIG_29BIT=y 193CONFIG_29BIT=y
@@ -195,7 +201,6 @@ CONFIG_PAGE_SIZE_4KB=y
195# CONFIG_PAGE_SIZE_8KB is not set 201# CONFIG_PAGE_SIZE_8KB is not set
196# CONFIG_PAGE_SIZE_16KB is not set 202# CONFIG_PAGE_SIZE_16KB is not set
197# CONFIG_PAGE_SIZE_64KB is not set 203# CONFIG_PAGE_SIZE_64KB is not set
198CONFIG_ENTRY_OFFSET=0x00001000
199CONFIG_SELECT_MEMORY_MODEL=y 204CONFIG_SELECT_MEMORY_MODEL=y
200CONFIG_FLATMEM_MANUAL=y 205CONFIG_FLATMEM_MANUAL=y
201# CONFIG_DISCONTIGMEM_MANUAL is not set 206# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -208,7 +213,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
208# CONFIG_PHYS_ADDR_T_64BIT is not set 213# CONFIG_PHYS_ADDR_T_64BIT is not set
209CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
211CONFIG_UNEVICTABLE_LRU=y 216CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
217CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
212 218
213# 219#
214# Cache configuration 220# Cache configuration
@@ -235,11 +241,15 @@ CONFIG_SH_RSK7203=y
235# 241#
236# Timer and clock configuration 242# Timer and clock configuration
237# 243#
238CONFIG_SH_CMT=y 244CONFIG_SH_TIMER_CMT=y
239# CONFIG_SH_MTU2 is not set 245CONFIG_SH_TIMER_MTU2=y
240CONFIG_SH_TIMER_IRQ=142
241CONFIG_SH_PCLK_FREQ=16670800 246CONFIG_SH_PCLK_FREQ=16670800
247CONFIG_SH_CLK_CPG=y
248CONFIG_SH_CLK_CPG_LEGACY=y
242CONFIG_SH_CLK_MD=0 249CONFIG_SH_CLK_MD=0
250# CONFIG_NO_HZ is not set
251# CONFIG_HIGH_RES_TIMERS is not set
252CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
243 253
244# 254#
245# CPU Frequency scaling 255# CPU Frequency scaling
@@ -290,12 +300,14 @@ CONFIG_PREEMPT_NONE=y
290# CONFIG_PREEMPT_VOLUNTARY is not set 300# CONFIG_PREEMPT_VOLUNTARY is not set
291# CONFIG_PREEMPT is not set 301# CONFIG_PREEMPT is not set
292CONFIG_GUSA=y 302CONFIG_GUSA=y
303# CONFIG_SPARSE_IRQ is not set
293 304
294# 305#
295# Boot options 306# Boot options
296# 307#
297CONFIG_ZERO_PAGE_OFFSET=0x00001000 308CONFIG_ZERO_PAGE_OFFSET=0x00001000
298CONFIG_BOOT_LINK_OFFSET=0x00800000 309CONFIG_BOOT_LINK_OFFSET=0x00800000
310CONFIG_ENTRY_OFFSET=0x00001000
299CONFIG_CMDLINE_BOOL=y 311CONFIG_CMDLINE_BOOL=y
300CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel" 312CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
301 313
@@ -375,6 +387,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
375# CONFIG_ECONET is not set 387# CONFIG_ECONET is not set
376# CONFIG_WAN_ROUTER is not set 388# CONFIG_WAN_ROUTER is not set
377# CONFIG_PHONET is not set 389# CONFIG_PHONET is not set
390# CONFIG_IEEE802154 is not set
378# CONFIG_NET_SCHED is not set 391# CONFIG_NET_SCHED is not set
379# CONFIG_DCB is not set 392# CONFIG_DCB is not set
380 393
@@ -393,7 +406,11 @@ CONFIG_WIRELESS=y
393# CONFIG_WIRELESS_OLD_REGULATORY is not set 406# CONFIG_WIRELESS_OLD_REGULATORY is not set
394# CONFIG_WIRELESS_EXT is not set 407# CONFIG_WIRELESS_EXT is not set
395# CONFIG_LIB80211 is not set 408# CONFIG_LIB80211 is not set
396# CONFIG_MAC80211 is not set 409
410#
411# CFG80211 needs to be enabled for MAC80211
412#
413CONFIG_MAC80211_DEFAULT_PS_VALUE=0
397# CONFIG_WIMAX is not set 414# CONFIG_WIMAX is not set
398# CONFIG_RFKILL is not set 415# CONFIG_RFKILL is not set
399# CONFIG_NET_9P is not set 416# CONFIG_NET_9P is not set
@@ -528,7 +545,6 @@ CONFIG_HAVE_IDE=y
528# CONFIG_ATA is not set 545# CONFIG_ATA is not set
529# CONFIG_MD is not set 546# CONFIG_MD is not set
530CONFIG_NETDEVICES=y 547CONFIG_NETDEVICES=y
531CONFIG_COMPAT_NET_DEV_OPS=y
532# CONFIG_DUMMY is not set 548# CONFIG_DUMMY is not set
533# CONFIG_BONDING is not set 549# CONFIG_BONDING is not set
534# CONFIG_MACVLAN is not set 550# CONFIG_MACVLAN is not set
@@ -572,6 +588,7 @@ CONFIG_SMSC911X=y
572# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 588# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
573# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 589# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
574# CONFIG_B44 is not set 590# CONFIG_B44 is not set
591# CONFIG_KS8842 is not set
575# CONFIG_NETDEV_1000 is not set 592# CONFIG_NETDEV_1000 is not set
576# CONFIG_NETDEV_10000 is not set 593# CONFIG_NETDEV_10000 is not set
577 594
@@ -705,24 +722,9 @@ CONFIG_REGULATOR=y
705# CONFIG_REGULATOR_DEBUG is not set 722# CONFIG_REGULATOR_DEBUG is not set
706# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 723# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
707# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 724# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
725# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
708# CONFIG_REGULATOR_BQ24022 is not set 726# CONFIG_REGULATOR_BQ24022 is not set
709 727# CONFIG_MEDIA_SUPPORT is not set
710#
711# Multimedia devices
712#
713
714#
715# Multimedia core support
716#
717# CONFIG_VIDEO_DEV is not set
718# CONFIG_DVB_CORE is not set
719# CONFIG_VIDEO_MEDIA is not set
720
721#
722# Multimedia drivers
723#
724CONFIG_DAB=y
725# CONFIG_USB_DABUSB is not set
726 728
727# 729#
728# Graphics support 730# Graphics support
@@ -758,7 +760,7 @@ CONFIG_HID_BELKIN=y
758CONFIG_HID_CHERRY=y 760CONFIG_HID_CHERRY=y
759CONFIG_HID_CHICONY=y 761CONFIG_HID_CHICONY=y
760CONFIG_HID_CYPRESS=y 762CONFIG_HID_CYPRESS=y
761# CONFIG_DRAGONRISE_FF is not set 763# CONFIG_HID_DRAGONRISE is not set
762CONFIG_HID_EZKEY=y 764CONFIG_HID_EZKEY=y
763# CONFIG_HID_KYE is not set 765# CONFIG_HID_KYE is not set
764CONFIG_HID_GYRATION=y 766CONFIG_HID_GYRATION=y
@@ -775,10 +777,11 @@ CONFIG_HID_PETALYNX=y
775CONFIG_HID_SAMSUNG=y 777CONFIG_HID_SAMSUNG=y
776CONFIG_HID_SONY=y 778CONFIG_HID_SONY=y
777CONFIG_HID_SUNPLUS=y 779CONFIG_HID_SUNPLUS=y
778# CONFIG_GREENASIA_FF is not set 780# CONFIG_HID_GREENASIA is not set
781# CONFIG_HID_SMARTJOYPLUS is not set
779# CONFIG_HID_TOPSEED is not set 782# CONFIG_HID_TOPSEED is not set
780CONFIG_THRUSTMASTER_FF=m 783# CONFIG_HID_THRUSTMASTER is not set
781CONFIG_ZEROPLUS_FF=m 784# CONFIG_HID_ZEROPLUS is not set
782CONFIG_USB_SUPPORT=y 785CONFIG_USB_SUPPORT=y
783CONFIG_USB_ARCH_HAS_HCD=y 786CONFIG_USB_ARCH_HAS_HCD=y
784# CONFIG_USB_ARCH_HAS_OHCI is not set 787# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -931,9 +934,14 @@ CONFIG_RTC_INTF_DEV=y
931# on-CPU RTC drivers 934# on-CPU RTC drivers
932# 935#
933CONFIG_RTC_DRV_SH=y 936CONFIG_RTC_DRV_SH=y
937# CONFIG_RTC_DRV_GENERIC is not set
934# CONFIG_DMADEVICES is not set 938# CONFIG_DMADEVICES is not set
935# CONFIG_AUXDISPLAY is not set 939# CONFIG_AUXDISPLAY is not set
936# CONFIG_UIO is not set 940# CONFIG_UIO is not set
941
942#
943# TI VLYNQ
944#
937# CONFIG_STAGING is not set 945# CONFIG_STAGING is not set
938 946
939# 947#
@@ -945,12 +953,14 @@ CONFIG_RTC_DRV_SH=y
945# CONFIG_REISERFS_FS is not set 953# CONFIG_REISERFS_FS is not set
946# CONFIG_JFS_FS is not set 954# CONFIG_JFS_FS is not set
947# CONFIG_FS_POSIX_ACL is not set 955# CONFIG_FS_POSIX_ACL is not set
948CONFIG_FILE_LOCKING=y
949# CONFIG_XFS_FS is not set 956# CONFIG_XFS_FS is not set
950# CONFIG_OCFS2_FS is not set 957# CONFIG_OCFS2_FS is not set
951# CONFIG_BTRFS_FS is not set 958# CONFIG_BTRFS_FS is not set
959CONFIG_FILE_LOCKING=y
960CONFIG_FSNOTIFY=y
952# CONFIG_DNOTIFY is not set 961# CONFIG_DNOTIFY is not set
953# CONFIG_INOTIFY is not set 962# CONFIG_INOTIFY is not set
963CONFIG_INOTIFY_USER=y
954# CONFIG_QUOTA is not set 964# CONFIG_QUOTA is not set
955# CONFIG_AUTOFS_FS is not set 965# CONFIG_AUTOFS_FS is not set
956# CONFIG_AUTOFS4_FS is not set 966# CONFIG_AUTOFS4_FS is not set
@@ -1029,7 +1039,46 @@ CONFIG_SUNRPC=y
1029# 1039#
1030# CONFIG_PARTITION_ADVANCED is not set 1040# CONFIG_PARTITION_ADVANCED is not set
1031CONFIG_MSDOS_PARTITION=y 1041CONFIG_MSDOS_PARTITION=y
1032# CONFIG_NLS is not set 1042CONFIG_NLS=y
1043CONFIG_NLS_DEFAULT="iso8859-1"
1044# CONFIG_NLS_CODEPAGE_437 is not set
1045# CONFIG_NLS_CODEPAGE_737 is not set
1046# CONFIG_NLS_CODEPAGE_775 is not set
1047# CONFIG_NLS_CODEPAGE_850 is not set
1048# CONFIG_NLS_CODEPAGE_852 is not set
1049# CONFIG_NLS_CODEPAGE_855 is not set
1050# CONFIG_NLS_CODEPAGE_857 is not set
1051# CONFIG_NLS_CODEPAGE_860 is not set
1052# CONFIG_NLS_CODEPAGE_861 is not set
1053# CONFIG_NLS_CODEPAGE_862 is not set
1054# CONFIG_NLS_CODEPAGE_863 is not set
1055# CONFIG_NLS_CODEPAGE_864 is not set
1056# CONFIG_NLS_CODEPAGE_865 is not set
1057# CONFIG_NLS_CODEPAGE_866 is not set
1058# CONFIG_NLS_CODEPAGE_869 is not set
1059# CONFIG_NLS_CODEPAGE_936 is not set
1060# CONFIG_NLS_CODEPAGE_950 is not set
1061# CONFIG_NLS_CODEPAGE_932 is not set
1062# CONFIG_NLS_CODEPAGE_949 is not set
1063# CONFIG_NLS_CODEPAGE_874 is not set
1064# CONFIG_NLS_ISO8859_8 is not set
1065# CONFIG_NLS_CODEPAGE_1250 is not set
1066# CONFIG_NLS_CODEPAGE_1251 is not set
1067# CONFIG_NLS_ASCII is not set
1068# CONFIG_NLS_ISO8859_1 is not set
1069# CONFIG_NLS_ISO8859_2 is not set
1070# CONFIG_NLS_ISO8859_3 is not set
1071# CONFIG_NLS_ISO8859_4 is not set
1072# CONFIG_NLS_ISO8859_5 is not set
1073# CONFIG_NLS_ISO8859_6 is not set
1074# CONFIG_NLS_ISO8859_7 is not set
1075# CONFIG_NLS_ISO8859_9 is not set
1076# CONFIG_NLS_ISO8859_13 is not set
1077# CONFIG_NLS_ISO8859_14 is not set
1078# CONFIG_NLS_ISO8859_15 is not set
1079# CONFIG_NLS_KOI8_R is not set
1080# CONFIG_NLS_KOI8_U is not set
1081# CONFIG_NLS_UTF8 is not set
1033# CONFIG_DLM is not set 1082# CONFIG_DLM is not set
1034 1083
1035# 1084#
@@ -1094,23 +1143,24 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1094CONFIG_HAVE_DYNAMIC_FTRACE=y 1143CONFIG_HAVE_DYNAMIC_FTRACE=y
1095CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1144CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1096CONFIG_RING_BUFFER=y 1145CONFIG_RING_BUFFER=y
1146CONFIG_EVENT_TRACING=y
1147CONFIG_CONTEXT_SWITCH_TRACER=y
1097CONFIG_TRACING=y 1148CONFIG_TRACING=y
1098CONFIG_TRACING_SUPPORT=y 1149CONFIG_TRACING_SUPPORT=y
1099 1150CONFIG_FTRACE=y
1100#
1101# Tracers
1102#
1103# CONFIG_FUNCTION_TRACER is not set 1151# CONFIG_FUNCTION_TRACER is not set
1152# CONFIG_IRQSOFF_TRACER is not set
1104# CONFIG_SCHED_TRACER is not set 1153# CONFIG_SCHED_TRACER is not set
1105# CONFIG_CONTEXT_SWITCH_TRACER is not set 1154# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1106# CONFIG_EVENT_TRACER is not set
1107# CONFIG_BOOT_TRACER is not set 1155# CONFIG_BOOT_TRACER is not set
1108# CONFIG_TRACE_BRANCH_PROFILING is not set 1156CONFIG_BRANCH_PROFILE_NONE=y
1157# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1158# CONFIG_PROFILE_ALL_BRANCHES is not set
1109# CONFIG_STACK_TRACER is not set 1159# CONFIG_STACK_TRACER is not set
1110# CONFIG_KMEMTRACE is not set 1160# CONFIG_KMEMTRACE is not set
1111# CONFIG_WORKQUEUE_TRACER is not set 1161# CONFIG_WORKQUEUE_TRACER is not set
1112# CONFIG_BLK_DEV_IO_TRACE is not set 1162# CONFIG_BLK_DEV_IO_TRACE is not set
1113# CONFIG_FTRACE_STARTUP_TEST is not set 1163# CONFIG_RING_BUFFER_BENCHMARK is not set
1114# CONFIG_DYNAMIC_DEBUG is not set 1164# CONFIG_DYNAMIC_DEBUG is not set
1115# CONFIG_DMA_API_DEBUG is not set 1165# CONFIG_DMA_API_DEBUG is not set
1116# CONFIG_SAMPLES is not set 1166# CONFIG_SAMPLES is not set
@@ -1123,10 +1173,8 @@ CONFIG_EARLY_PRINTK=y
1123CONFIG_DEBUG_BOOTMEM=y 1173CONFIG_DEBUG_BOOTMEM=y
1124CONFIG_DEBUG_STACKOVERFLOW=y 1174CONFIG_DEBUG_STACKOVERFLOW=y
1125CONFIG_DEBUG_STACK_USAGE=y 1175CONFIG_DEBUG_STACK_USAGE=y
1126# CONFIG_IRQSTACKS is not set
1127CONFIG_DUMP_CODE=y 1176CONFIG_DUMP_CODE=y
1128# CONFIG_SH_NO_BSS_INIT is not set 1177# CONFIG_SH_NO_BSS_INIT is not set
1129# CONFIG_MORE_COMPILE_OPTIONS is not set
1130 1178
1131# 1179#
1132# Security options 1180# Security options
@@ -1156,3 +1204,4 @@ CONFIG_HAS_IOMEM=y
1156CONFIG_HAS_IOPORT=y 1204CONFIG_HAS_IOPORT=y
1157CONFIG_HAS_DMA=y 1205CONFIG_HAS_DMA=y
1158CONFIG_NLATTR=y 1206CONFIG_NLATTR=y
1207CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rts7751r2d1_defconfig b/arch/sh/configs/rts7751r2d1_defconfig
index a4a59f6205ab..c6e9b1c0fa3e 100644
--- a/arch/sh/configs/rts7751r2d1_defconfig
+++ b/arch/sh/configs/rts7751r2d1_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:58:13 2009 4# Thu Jun 18 12:42:26 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -71,7 +72,6 @@ CONFIG_UID16=y
71# CONFIG_SYSCTL_SYSCALL is not set 72# CONFIG_SYSCTL_SYSCALL is not set
72CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
73# CONFIG_KALLSYMS_EXTRA_PASS is not set 74# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y 75CONFIG_HOTPLUG=y
76CONFIG_PRINTK=y 76CONFIG_PRINTK=y
77CONFIG_BUG=y 77CONFIG_BUG=y
@@ -84,15 +84,20 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 85CONFIG_SHMEM=y
86CONFIG_AIO=y 86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
87CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
88CONFIG_PCI_QUIRKS=y 92CONFIG_PCI_QUIRKS=y
93# CONFIG_STRIP_ASM_SYMS is not set
89CONFIG_COMPAT_BRK=y 94CONFIG_COMPAT_BRK=y
90CONFIG_SLAB=y 95CONFIG_SLAB=y
91# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
92# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
93CONFIG_PROFILING=y 98CONFIG_PROFILING=y
94CONFIG_TRACEPOINTS=y 99CONFIG_TRACEPOINTS=y
95# CONFIG_MARKERS is not set 100CONFIG_MARKERS=y
96CONFIG_OPROFILE=y 101CONFIG_OPROFILE=y
97CONFIG_HAVE_OPROFILE=y 102CONFIG_HAVE_OPROFILE=y
98# CONFIG_KPROBES is not set 103# CONFIG_KPROBES is not set
@@ -176,6 +181,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
176CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
177CONFIG_MMU=y 182CONFIG_MMU=y
178CONFIG_PAGE_OFFSET=0x80000000 183CONFIG_PAGE_OFFSET=0x80000000
184CONFIG_FORCE_MAX_ZONEORDER=11
179CONFIG_MEMORY_START=0x0c000000 185CONFIG_MEMORY_START=0x0c000000
180CONFIG_MEMORY_SIZE=0x04000000 186CONFIG_MEMORY_SIZE=0x04000000
181CONFIG_29BIT=y 187CONFIG_29BIT=y
@@ -190,7 +196,6 @@ CONFIG_PAGE_SIZE_4KB=y
190# CONFIG_PAGE_SIZE_8KB is not set 196# CONFIG_PAGE_SIZE_8KB is not set
191# CONFIG_PAGE_SIZE_16KB is not set 197# CONFIG_PAGE_SIZE_16KB is not set
192# CONFIG_PAGE_SIZE_64KB is not set 198# CONFIG_PAGE_SIZE_64KB is not set
193CONFIG_ENTRY_OFFSET=0x00001000
194CONFIG_SELECT_MEMORY_MODEL=y 199CONFIG_SELECT_MEMORY_MODEL=y
195CONFIG_FLATMEM_MANUAL=y 200CONFIG_FLATMEM_MANUAL=y
196# CONFIG_DISCONTIGMEM_MANUAL is not set 201# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -203,9 +208,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
203# CONFIG_PHYS_ADDR_T_64BIT is not set 208# CONFIG_PHYS_ADDR_T_64BIT is not set
204CONFIG_ZONE_DMA_FLAG=0 209CONFIG_ZONE_DMA_FLAG=0
205CONFIG_NR_QUICK=2 210CONFIG_NR_QUICK=2
206CONFIG_UNEVICTABLE_LRU=y
207CONFIG_HAVE_MLOCK=y 211CONFIG_HAVE_MLOCK=y
208CONFIG_HAVE_MLOCKED_PAGE_BIT=y 212CONFIG_HAVE_MLOCKED_PAGE_BIT=y
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
209 214
210# 215#
211# Cache configuration 216# Cache configuration
@@ -223,7 +228,6 @@ CONFIG_SH_FPU=y
223# CONFIG_SH_STORE_QUEUES is not set 228# CONFIG_SH_STORE_QUEUES is not set
224CONFIG_CPU_HAS_INTEVT=y 229CONFIG_CPU_HAS_INTEVT=y
225CONFIG_CPU_HAS_SR_RB=y 230CONFIG_CPU_HAS_SR_RB=y
226CONFIG_CPU_HAS_PTEA=y
227CONFIG_CPU_HAS_FPU=y 231CONFIG_CPU_HAS_FPU=y
228 232
229# 233#
@@ -245,9 +249,10 @@ CONFIG_RTS7751R2D_1=y
245# 249#
246# Timer and clock configuration 250# Timer and clock configuration
247# 251#
248CONFIG_SH_TMU=y 252CONFIG_SH_TIMER_TMU=y
249CONFIG_SH_TIMER_IRQ=16
250CONFIG_SH_PCLK_FREQ=60000000 253CONFIG_SH_PCLK_FREQ=60000000
254CONFIG_SH_CLK_CPG=y
255CONFIG_SH_CLK_CPG_LEGACY=y
251# CONFIG_NO_HZ is not set 256# CONFIG_NO_HZ is not set
252# CONFIG_HIGH_RES_TIMERS is not set 257# CONFIG_HIGH_RES_TIMERS is not set
253CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 258CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -289,12 +294,14 @@ CONFIG_PREEMPT_NONE=y
289# CONFIG_PREEMPT is not set 294# CONFIG_PREEMPT is not set
290CONFIG_GUSA=y 295CONFIG_GUSA=y
291# CONFIG_GUSA_RB is not set 296# CONFIG_GUSA_RB is not set
297# CONFIG_SPARSE_IRQ is not set
292 298
293# 299#
294# Boot options 300# Boot options
295# 301#
296CONFIG_ZERO_PAGE_OFFSET=0x00010000 302CONFIG_ZERO_PAGE_OFFSET=0x00010000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 303CONFIG_BOOT_LINK_OFFSET=0x00800000
304CONFIG_ENTRY_OFFSET=0x00001000
298# CONFIG_UBC_WAKEUP is not set 305# CONFIG_UBC_WAKEUP is not set
299CONFIG_CMDLINE_BOOL=y 306CONFIG_CMDLINE_BOOL=y
300CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 307CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
@@ -385,6 +392,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
385# CONFIG_ECONET is not set 392# CONFIG_ECONET is not set
386# CONFIG_WAN_ROUTER is not set 393# CONFIG_WAN_ROUTER is not set
387# CONFIG_PHONET is not set 394# CONFIG_PHONET is not set
395# CONFIG_IEEE802154 is not set
388# CONFIG_NET_SCHED is not set 396# CONFIG_NET_SCHED is not set
389# CONFIG_DCB is not set 397# CONFIG_DCB is not set
390 398
@@ -404,7 +412,11 @@ CONFIG_WIRELESS=y
404CONFIG_WIRELESS_EXT=y 412CONFIG_WIRELESS_EXT=y
405CONFIG_WIRELESS_EXT_SYSFS=y 413CONFIG_WIRELESS_EXT_SYSFS=y
406# CONFIG_LIB80211 is not set 414# CONFIG_LIB80211 is not set
407# CONFIG_MAC80211 is not set 415
416#
417# CFG80211 needs to be enabled for MAC80211
418#
419CONFIG_MAC80211_DEFAULT_PS_VALUE=0
408# CONFIG_WIMAX is not set 420# CONFIG_WIMAX is not set
409# CONFIG_RFKILL is not set 421# CONFIG_RFKILL is not set
410# CONFIG_NET_9P is not set 422# CONFIG_NET_9P is not set
@@ -455,6 +467,7 @@ CONFIG_MISC_DEVICES=y
455# 467#
456# CONFIG_EEPROM_AT25 is not set 468# CONFIG_EEPROM_AT25 is not set
457# CONFIG_EEPROM_93CX6 is not set 469# CONFIG_EEPROM_93CX6 is not set
470# CONFIG_CB710_CORE is not set
458CONFIG_HAVE_IDE=y 471CONFIG_HAVE_IDE=y
459# CONFIG_IDE is not set 472# CONFIG_IDE is not set
460 473
@@ -477,10 +490,6 @@ CONFIG_BLK_DEV_SD=y
477# CONFIG_BLK_DEV_SR is not set 490# CONFIG_BLK_DEV_SR is not set
478# CONFIG_CHR_DEV_SG is not set 491# CONFIG_CHR_DEV_SG is not set
479# CONFIG_CHR_DEV_SCH is not set 492# CONFIG_CHR_DEV_SCH is not set
480
481#
482# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
483#
484# CONFIG_SCSI_MULTI_LUN is not set 493# CONFIG_SCSI_MULTI_LUN is not set
485# CONFIG_SCSI_CONSTANTS is not set 494# CONFIG_SCSI_CONSTANTS is not set
486# CONFIG_SCSI_LOGGING is not set 495# CONFIG_SCSI_LOGGING is not set
@@ -498,6 +507,7 @@ CONFIG_SCSI_WAIT_SCAN=m
498CONFIG_SCSI_LOWLEVEL=y 507CONFIG_SCSI_LOWLEVEL=y
499# CONFIG_ISCSI_TCP is not set 508# CONFIG_ISCSI_TCP is not set
500# CONFIG_SCSI_CXGB3_ISCSI is not set 509# CONFIG_SCSI_CXGB3_ISCSI is not set
510# CONFIG_SCSI_BNX2_ISCSI is not set
501# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 511# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
502# CONFIG_SCSI_3W_9XXX is not set 512# CONFIG_SCSI_3W_9XXX is not set
503# CONFIG_SCSI_ACARD is not set 513# CONFIG_SCSI_ACARD is not set
@@ -506,6 +516,7 @@ CONFIG_SCSI_LOWLEVEL=y
506# CONFIG_SCSI_AIC7XXX_OLD is not set 516# CONFIG_SCSI_AIC7XXX_OLD is not set
507# CONFIG_SCSI_AIC79XX is not set 517# CONFIG_SCSI_AIC79XX is not set
508# CONFIG_SCSI_AIC94XX is not set 518# CONFIG_SCSI_AIC94XX is not set
519# CONFIG_SCSI_MVSAS is not set
509# CONFIG_SCSI_ARCMSR is not set 520# CONFIG_SCSI_ARCMSR is not set
510# CONFIG_MEGARAID_NEWGEN is not set 521# CONFIG_MEGARAID_NEWGEN is not set
511# CONFIG_MEGARAID_LEGACY is not set 522# CONFIG_MEGARAID_LEGACY is not set
@@ -520,7 +531,6 @@ CONFIG_SCSI_LOWLEVEL=y
520# CONFIG_SCSI_IPS is not set 531# CONFIG_SCSI_IPS is not set
521# CONFIG_SCSI_INITIO is not set 532# CONFIG_SCSI_INITIO is not set
522# CONFIG_SCSI_INIA100 is not set 533# CONFIG_SCSI_INIA100 is not set
523# CONFIG_SCSI_MVSAS is not set
524# CONFIG_SCSI_STEX is not set 534# CONFIG_SCSI_STEX is not set
525# CONFIG_SCSI_SYM53C8XX_2 is not set 535# CONFIG_SCSI_SYM53C8XX_2 is not set
526# CONFIG_SCSI_IPR is not set 536# CONFIG_SCSI_IPR is not set
@@ -609,7 +619,6 @@ CONFIG_PATA_PLATFORM=y
609# CONFIG_IEEE1394 is not set 619# CONFIG_IEEE1394 is not set
610# CONFIG_I2O is not set 620# CONFIG_I2O is not set
611CONFIG_NETDEVICES=y 621CONFIG_NETDEVICES=y
612CONFIG_COMPAT_NET_DEV_OPS=y
613# CONFIG_DUMMY is not set 622# CONFIG_DUMMY is not set
614# CONFIG_BONDING is not set 623# CONFIG_BONDING is not set
615# CONFIG_MACVLAN is not set 624# CONFIG_MACVLAN is not set
@@ -663,6 +672,7 @@ CONFIG_8139TOO=y
663# CONFIG_SMSC9420 is not set 672# CONFIG_SMSC9420 is not set
664# CONFIG_SUNDANCE is not set 673# CONFIG_SUNDANCE is not set
665# CONFIG_TLAN is not set 674# CONFIG_TLAN is not set
675# CONFIG_KS8842 is not set
666# CONFIG_VIA_RHINE is not set 676# CONFIG_VIA_RHINE is not set
667# CONFIG_SC92031 is not set 677# CONFIG_SC92031 is not set
668# CONFIG_ATL2 is not set 678# CONFIG_ATL2 is not set
@@ -871,23 +881,7 @@ CONFIG_MFD_SM501=y
871# CONFIG_HTC_PASIC3 is not set 881# CONFIG_HTC_PASIC3 is not set
872# CONFIG_MFD_TMIO is not set 882# CONFIG_MFD_TMIO is not set
873# CONFIG_REGULATOR is not set 883# CONFIG_REGULATOR is not set
874 884# CONFIG_MEDIA_SUPPORT is not set
875#
876# Multimedia devices
877#
878
879#
880# Multimedia core support
881#
882# CONFIG_VIDEO_DEV is not set
883# CONFIG_DVB_CORE is not set
884# CONFIG_VIDEO_MEDIA is not set
885
886#
887# Multimedia drivers
888#
889CONFIG_DAB=y
890# CONFIG_USB_DABUSB is not set
891 885
892# 886#
893# Graphics support 887# Graphics support
@@ -989,6 +983,11 @@ CONFIG_SND_VERBOSE_PROCFS=y
989# CONFIG_SND_VERBOSE_PRINTK is not set 983# CONFIG_SND_VERBOSE_PRINTK is not set
990# CONFIG_SND_DEBUG is not set 984# CONFIG_SND_DEBUG is not set
991CONFIG_SND_VMASTER=y 985CONFIG_SND_VMASTER=y
986# CONFIG_SND_RAWMIDI_SEQ is not set
987# CONFIG_SND_OPL3_LIB_SEQ is not set
988# CONFIG_SND_OPL4_LIB_SEQ is not set
989# CONFIG_SND_SBAWE_SEQ is not set
990# CONFIG_SND_EMU10K1_SEQ is not set
992CONFIG_SND_MPU401_UART=m 991CONFIG_SND_MPU401_UART=m
993CONFIG_SND_OPL3_LIB=m 992CONFIG_SND_OPL3_LIB=m
994CONFIG_SND_AC97_CODEC=m 993CONFIG_SND_AC97_CODEC=m
@@ -1015,6 +1014,7 @@ CONFIG_SND_PCI=y
1015# CONFIG_SND_OXYGEN is not set 1014# CONFIG_SND_OXYGEN is not set
1016# CONFIG_SND_CS4281 is not set 1015# CONFIG_SND_CS4281 is not set
1017# CONFIG_SND_CS46XX is not set 1016# CONFIG_SND_CS46XX is not set
1017# CONFIG_SND_CTXFI is not set
1018# CONFIG_SND_DARLA20 is not set 1018# CONFIG_SND_DARLA20 is not set
1019# CONFIG_SND_GINA20 is not set 1019# CONFIG_SND_GINA20 is not set
1020# CONFIG_SND_LAYLA20 is not set 1020# CONFIG_SND_LAYLA20 is not set
@@ -1045,6 +1045,7 @@ CONFIG_SND_PCI=y
1045# CONFIG_SND_INTEL8X0 is not set 1045# CONFIG_SND_INTEL8X0 is not set
1046# CONFIG_SND_INTEL8X0M is not set 1046# CONFIG_SND_INTEL8X0M is not set
1047# CONFIG_SND_KORG1212 is not set 1047# CONFIG_SND_KORG1212 is not set
1048# CONFIG_SND_LX6464ES is not set
1048# CONFIG_SND_MAESTRO3 is not set 1049# CONFIG_SND_MAESTRO3 is not set
1049# CONFIG_SND_MIXART is not set 1050# CONFIG_SND_MIXART is not set
1050# CONFIG_SND_NM256 is not set 1051# CONFIG_SND_NM256 is not set
@@ -1089,7 +1090,7 @@ CONFIG_HID_BELKIN=y
1089CONFIG_HID_CHERRY=y 1090CONFIG_HID_CHERRY=y
1090CONFIG_HID_CHICONY=y 1091CONFIG_HID_CHICONY=y
1091CONFIG_HID_CYPRESS=y 1092CONFIG_HID_CYPRESS=y
1092# CONFIG_DRAGONRISE_FF is not set 1093# CONFIG_HID_DRAGONRISE is not set
1093CONFIG_HID_EZKEY=y 1094CONFIG_HID_EZKEY=y
1094# CONFIG_HID_KYE is not set 1095# CONFIG_HID_KYE is not set
1095CONFIG_HID_GYRATION=y 1096CONFIG_HID_GYRATION=y
@@ -1106,10 +1107,11 @@ CONFIG_HID_PETALYNX=y
1106CONFIG_HID_SAMSUNG=y 1107CONFIG_HID_SAMSUNG=y
1107CONFIG_HID_SONY=y 1108CONFIG_HID_SONY=y
1108CONFIG_HID_SUNPLUS=y 1109CONFIG_HID_SUNPLUS=y
1109# CONFIG_GREENASIA_FF is not set 1110# CONFIG_HID_GREENASIA is not set
1111# CONFIG_HID_SMARTJOYPLUS is not set
1110# CONFIG_HID_TOPSEED is not set 1112# CONFIG_HID_TOPSEED is not set
1111CONFIG_THRUSTMASTER_FF=m 1113# CONFIG_HID_THRUSTMASTER is not set
1112CONFIG_ZEROPLUS_FF=m 1114# CONFIG_HID_ZEROPLUS is not set
1113CONFIG_USB_SUPPORT=y 1115CONFIG_USB_SUPPORT=y
1114CONFIG_USB_ARCH_HAS_HCD=y 1116CONFIG_USB_ARCH_HAS_HCD=y
1115CONFIG_USB_ARCH_HAS_OHCI=y 1117CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1135,6 +1137,7 @@ CONFIG_USB_DEVICE_CLASS=y
1135# USB Host Controller Drivers 1137# USB Host Controller Drivers
1136# 1138#
1137# CONFIG_USB_C67X00_HCD is not set 1139# CONFIG_USB_C67X00_HCD is not set
1140# CONFIG_USB_XHCI_HCD is not set
1138# CONFIG_USB_EHCI_HCD is not set 1141# CONFIG_USB_EHCI_HCD is not set
1139# CONFIG_USB_OXU210HP_HCD is not set 1142# CONFIG_USB_OXU210HP_HCD is not set
1140# CONFIG_USB_ISP116X_HCD is not set 1143# CONFIG_USB_ISP116X_HCD is not set
@@ -1268,9 +1271,14 @@ CONFIG_RTC_DRV_R9701=y
1268# on-CPU RTC drivers 1271# on-CPU RTC drivers
1269# 1272#
1270# CONFIG_RTC_DRV_SH is not set 1273# CONFIG_RTC_DRV_SH is not set
1274# CONFIG_RTC_DRV_GENERIC is not set
1271# CONFIG_DMADEVICES is not set 1275# CONFIG_DMADEVICES is not set
1272# CONFIG_AUXDISPLAY is not set 1276# CONFIG_AUXDISPLAY is not set
1273# CONFIG_UIO is not set 1277# CONFIG_UIO is not set
1278
1279#
1280# TI VLYNQ
1281#
1274# CONFIG_STAGING is not set 1282# CONFIG_STAGING is not set
1275 1283
1276# 1284#
@@ -1284,10 +1292,11 @@ CONFIG_EXT2_FS=y
1284# CONFIG_REISERFS_FS is not set 1292# CONFIG_REISERFS_FS is not set
1285# CONFIG_JFS_FS is not set 1293# CONFIG_JFS_FS is not set
1286# CONFIG_FS_POSIX_ACL is not set 1294# CONFIG_FS_POSIX_ACL is not set
1287CONFIG_FILE_LOCKING=y
1288# CONFIG_XFS_FS is not set 1295# CONFIG_XFS_FS is not set
1289# CONFIG_OCFS2_FS is not set 1296# CONFIG_OCFS2_FS is not set
1290# CONFIG_BTRFS_FS is not set 1297# CONFIG_BTRFS_FS is not set
1298CONFIG_FILE_LOCKING=y
1299CONFIG_FSNOTIFY=y
1291CONFIG_DNOTIFY=y 1300CONFIG_DNOTIFY=y
1292CONFIG_INOTIFY=y 1301CONFIG_INOTIFY=y
1293CONFIG_INOTIFY_USER=y 1302CONFIG_INOTIFY_USER=y
@@ -1428,24 +1437,11 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1428CONFIG_HAVE_DYNAMIC_FTRACE=y 1437CONFIG_HAVE_DYNAMIC_FTRACE=y
1429CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1438CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1430CONFIG_RING_BUFFER=y 1439CONFIG_RING_BUFFER=y
1440CONFIG_EVENT_TRACING=y
1441CONFIG_CONTEXT_SWITCH_TRACER=y
1431CONFIG_TRACING=y 1442CONFIG_TRACING=y
1432CONFIG_TRACING_SUPPORT=y 1443CONFIG_TRACING_SUPPORT=y
1433 1444# CONFIG_FTRACE is not set
1434#
1435# Tracers
1436#
1437# CONFIG_FUNCTION_TRACER is not set
1438# CONFIG_IRQSOFF_TRACER is not set
1439# CONFIG_SCHED_TRACER is not set
1440# CONFIG_CONTEXT_SWITCH_TRACER is not set
1441# CONFIG_EVENT_TRACER is not set
1442# CONFIG_BOOT_TRACER is not set
1443# CONFIG_TRACE_BRANCH_PROFILING is not set
1444# CONFIG_STACK_TRACER is not set
1445# CONFIG_KMEMTRACE is not set
1446# CONFIG_WORKQUEUE_TRACER is not set
1447# CONFIG_BLK_DEV_IO_TRACE is not set
1448# CONFIG_FTRACE_STARTUP_TEST is not set
1449# CONFIG_DYNAMIC_DEBUG is not set 1445# CONFIG_DYNAMIC_DEBUG is not set
1450# CONFIG_DMA_API_DEBUG is not set 1446# CONFIG_DMA_API_DEBUG is not set
1451# CONFIG_SAMPLES is not set 1447# CONFIG_SAMPLES is not set
@@ -1454,7 +1450,6 @@ CONFIG_HAVE_ARCH_KGDB=y
1454CONFIG_EARLY_SCIF_CONSOLE=y 1450CONFIG_EARLY_SCIF_CONSOLE=y
1455CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000 1451CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1456CONFIG_EARLY_PRINTK=y 1452CONFIG_EARLY_PRINTK=y
1457# CONFIG_MORE_COMPILE_OPTIONS is not set
1458 1453
1459# 1454#
1460# Security options 1455# Security options
@@ -1568,3 +1563,4 @@ CONFIG_HAS_IOMEM=y
1568CONFIG_HAS_IOPORT=y 1563CONFIG_HAS_IOPORT=y
1569CONFIG_HAS_DMA=y 1564CONFIG_HAS_DMA=y
1570CONFIG_NLATTR=y 1565CONFIG_NLATTR=y
1566CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/rts7751r2dplus_defconfig b/arch/sh/configs/rts7751r2dplus_defconfig
index a860435b8847..bc10469d31f0 100644
--- a/arch/sh/configs/rts7751r2dplus_defconfig
+++ b/arch/sh/configs/rts7751r2dplus_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:59:01 2009 4# Thu Jun 18 12:43:19 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -71,7 +72,6 @@ CONFIG_UID16=y
71# CONFIG_SYSCTL_SYSCALL is not set 72# CONFIG_SYSCTL_SYSCALL is not set
72CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
73# CONFIG_KALLSYMS_EXTRA_PASS is not set 74# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y 75CONFIG_HOTPLUG=y
76CONFIG_PRINTK=y 76CONFIG_PRINTK=y
77CONFIG_BUG=y 77CONFIG_BUG=y
@@ -84,15 +84,20 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 85CONFIG_SHMEM=y
86CONFIG_AIO=y 86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
87CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
88CONFIG_PCI_QUIRKS=y 92CONFIG_PCI_QUIRKS=y
93# CONFIG_STRIP_ASM_SYMS is not set
89CONFIG_COMPAT_BRK=y 94CONFIG_COMPAT_BRK=y
90CONFIG_SLAB=y 95CONFIG_SLAB=y
91# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
92# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
93CONFIG_PROFILING=y 98CONFIG_PROFILING=y
94CONFIG_TRACEPOINTS=y 99CONFIG_TRACEPOINTS=y
95# CONFIG_MARKERS is not set 100CONFIG_MARKERS=y
96CONFIG_OPROFILE=y 101CONFIG_OPROFILE=y
97CONFIG_HAVE_OPROFILE=y 102CONFIG_HAVE_OPROFILE=y
98# CONFIG_KPROBES is not set 103# CONFIG_KPROBES is not set
@@ -176,6 +181,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
176CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
177CONFIG_MMU=y 182CONFIG_MMU=y
178CONFIG_PAGE_OFFSET=0x80000000 183CONFIG_PAGE_OFFSET=0x80000000
184CONFIG_FORCE_MAX_ZONEORDER=11
179CONFIG_MEMORY_START=0x0c000000 185CONFIG_MEMORY_START=0x0c000000
180CONFIG_MEMORY_SIZE=0x04000000 186CONFIG_MEMORY_SIZE=0x04000000
181CONFIG_29BIT=y 187CONFIG_29BIT=y
@@ -190,7 +196,6 @@ CONFIG_PAGE_SIZE_4KB=y
190# CONFIG_PAGE_SIZE_8KB is not set 196# CONFIG_PAGE_SIZE_8KB is not set
191# CONFIG_PAGE_SIZE_16KB is not set 197# CONFIG_PAGE_SIZE_16KB is not set
192# CONFIG_PAGE_SIZE_64KB is not set 198# CONFIG_PAGE_SIZE_64KB is not set
193CONFIG_ENTRY_OFFSET=0x00001000
194CONFIG_SELECT_MEMORY_MODEL=y 199CONFIG_SELECT_MEMORY_MODEL=y
195CONFIG_FLATMEM_MANUAL=y 200CONFIG_FLATMEM_MANUAL=y
196# CONFIG_DISCONTIGMEM_MANUAL is not set 201# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -203,9 +208,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
203# CONFIG_PHYS_ADDR_T_64BIT is not set 208# CONFIG_PHYS_ADDR_T_64BIT is not set
204CONFIG_ZONE_DMA_FLAG=0 209CONFIG_ZONE_DMA_FLAG=0
205CONFIG_NR_QUICK=2 210CONFIG_NR_QUICK=2
206CONFIG_UNEVICTABLE_LRU=y
207CONFIG_HAVE_MLOCK=y 211CONFIG_HAVE_MLOCK=y
208CONFIG_HAVE_MLOCKED_PAGE_BIT=y 212CONFIG_HAVE_MLOCKED_PAGE_BIT=y
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
209 214
210# 215#
211# Cache configuration 216# Cache configuration
@@ -223,7 +228,6 @@ CONFIG_SH_FPU=y
223# CONFIG_SH_STORE_QUEUES is not set 228# CONFIG_SH_STORE_QUEUES is not set
224CONFIG_CPU_HAS_INTEVT=y 229CONFIG_CPU_HAS_INTEVT=y
225CONFIG_CPU_HAS_SR_RB=y 230CONFIG_CPU_HAS_SR_RB=y
226CONFIG_CPU_HAS_PTEA=y
227CONFIG_CPU_HAS_FPU=y 231CONFIG_CPU_HAS_FPU=y
228 232
229# 233#
@@ -245,9 +249,10 @@ CONFIG_RTS7751R2D_PLUS=y
245# 249#
246# Timer and clock configuration 250# Timer and clock configuration
247# 251#
248CONFIG_SH_TMU=y 252CONFIG_SH_TIMER_TMU=y
249CONFIG_SH_TIMER_IRQ=16
250CONFIG_SH_PCLK_FREQ=60000000 253CONFIG_SH_PCLK_FREQ=60000000
254CONFIG_SH_CLK_CPG=y
255CONFIG_SH_CLK_CPG_LEGACY=y
251# CONFIG_NO_HZ is not set 256# CONFIG_NO_HZ is not set
252# CONFIG_HIGH_RES_TIMERS is not set 257# CONFIG_HIGH_RES_TIMERS is not set
253CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 258CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -289,12 +294,14 @@ CONFIG_PREEMPT_NONE=y
289# CONFIG_PREEMPT is not set 294# CONFIG_PREEMPT is not set
290CONFIG_GUSA=y 295CONFIG_GUSA=y
291# CONFIG_GUSA_RB is not set 296# CONFIG_GUSA_RB is not set
297# CONFIG_SPARSE_IRQ is not set
292 298
293# 299#
294# Boot options 300# Boot options
295# 301#
296CONFIG_ZERO_PAGE_OFFSET=0x00010000 302CONFIG_ZERO_PAGE_OFFSET=0x00010000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 303CONFIG_BOOT_LINK_OFFSET=0x00800000
304CONFIG_ENTRY_OFFSET=0x00001000
298# CONFIG_UBC_WAKEUP is not set 305# CONFIG_UBC_WAKEUP is not set
299CONFIG_CMDLINE_BOOL=y 306CONFIG_CMDLINE_BOOL=y
300CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 307CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
@@ -385,6 +392,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
385# CONFIG_ECONET is not set 392# CONFIG_ECONET is not set
386# CONFIG_WAN_ROUTER is not set 393# CONFIG_WAN_ROUTER is not set
387# CONFIG_PHONET is not set 394# CONFIG_PHONET is not set
395# CONFIG_IEEE802154 is not set
388# CONFIG_NET_SCHED is not set 396# CONFIG_NET_SCHED is not set
389# CONFIG_DCB is not set 397# CONFIG_DCB is not set
390 398
@@ -404,7 +412,11 @@ CONFIG_WIRELESS=y
404CONFIG_WIRELESS_EXT=y 412CONFIG_WIRELESS_EXT=y
405CONFIG_WIRELESS_EXT_SYSFS=y 413CONFIG_WIRELESS_EXT_SYSFS=y
406# CONFIG_LIB80211 is not set 414# CONFIG_LIB80211 is not set
407# CONFIG_MAC80211 is not set 415
416#
417# CFG80211 needs to be enabled for MAC80211
418#
419CONFIG_MAC80211_DEFAULT_PS_VALUE=0
408# CONFIG_WIMAX is not set 420# CONFIG_WIMAX is not set
409# CONFIG_RFKILL is not set 421# CONFIG_RFKILL is not set
410# CONFIG_NET_9P is not set 422# CONFIG_NET_9P is not set
@@ -540,6 +552,7 @@ CONFIG_MISC_DEVICES=y
540# 552#
541# CONFIG_EEPROM_AT25 is not set 553# CONFIG_EEPROM_AT25 is not set
542# CONFIG_EEPROM_93CX6 is not set 554# CONFIG_EEPROM_93CX6 is not set
555# CONFIG_CB710_CORE is not set
543CONFIG_HAVE_IDE=y 556CONFIG_HAVE_IDE=y
544# CONFIG_IDE is not set 557# CONFIG_IDE is not set
545 558
@@ -562,10 +575,6 @@ CONFIG_BLK_DEV_SD=y
562# CONFIG_BLK_DEV_SR is not set 575# CONFIG_BLK_DEV_SR is not set
563# CONFIG_CHR_DEV_SG is not set 576# CONFIG_CHR_DEV_SG is not set
564# CONFIG_CHR_DEV_SCH is not set 577# CONFIG_CHR_DEV_SCH is not set
565
566#
567# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
568#
569# CONFIG_SCSI_MULTI_LUN is not set 578# CONFIG_SCSI_MULTI_LUN is not set
570# CONFIG_SCSI_CONSTANTS is not set 579# CONFIG_SCSI_CONSTANTS is not set
571# CONFIG_SCSI_LOGGING is not set 580# CONFIG_SCSI_LOGGING is not set
@@ -583,6 +592,7 @@ CONFIG_SCSI_WAIT_SCAN=m
583CONFIG_SCSI_LOWLEVEL=y 592CONFIG_SCSI_LOWLEVEL=y
584# CONFIG_ISCSI_TCP is not set 593# CONFIG_ISCSI_TCP is not set
585# CONFIG_SCSI_CXGB3_ISCSI is not set 594# CONFIG_SCSI_CXGB3_ISCSI is not set
595# CONFIG_SCSI_BNX2_ISCSI is not set
586# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 596# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
587# CONFIG_SCSI_3W_9XXX is not set 597# CONFIG_SCSI_3W_9XXX is not set
588# CONFIG_SCSI_ACARD is not set 598# CONFIG_SCSI_ACARD is not set
@@ -591,6 +601,7 @@ CONFIG_SCSI_LOWLEVEL=y
591# CONFIG_SCSI_AIC7XXX_OLD is not set 601# CONFIG_SCSI_AIC7XXX_OLD is not set
592# CONFIG_SCSI_AIC79XX is not set 602# CONFIG_SCSI_AIC79XX is not set
593# CONFIG_SCSI_AIC94XX is not set 603# CONFIG_SCSI_AIC94XX is not set
604# CONFIG_SCSI_MVSAS is not set
594# CONFIG_SCSI_ARCMSR is not set 605# CONFIG_SCSI_ARCMSR is not set
595# CONFIG_MEGARAID_NEWGEN is not set 606# CONFIG_MEGARAID_NEWGEN is not set
596# CONFIG_MEGARAID_LEGACY is not set 607# CONFIG_MEGARAID_LEGACY is not set
@@ -605,7 +616,6 @@ CONFIG_SCSI_LOWLEVEL=y
605# CONFIG_SCSI_IPS is not set 616# CONFIG_SCSI_IPS is not set
606# CONFIG_SCSI_INITIO is not set 617# CONFIG_SCSI_INITIO is not set
607# CONFIG_SCSI_INIA100 is not set 618# CONFIG_SCSI_INIA100 is not set
608# CONFIG_SCSI_MVSAS is not set
609# CONFIG_SCSI_STEX is not set 619# CONFIG_SCSI_STEX is not set
610# CONFIG_SCSI_SYM53C8XX_2 is not set 620# CONFIG_SCSI_SYM53C8XX_2 is not set
611# CONFIG_SCSI_IPR is not set 621# CONFIG_SCSI_IPR is not set
@@ -694,7 +704,6 @@ CONFIG_PATA_PLATFORM=y
694# CONFIG_IEEE1394 is not set 704# CONFIG_IEEE1394 is not set
695# CONFIG_I2O is not set 705# CONFIG_I2O is not set
696CONFIG_NETDEVICES=y 706CONFIG_NETDEVICES=y
697CONFIG_COMPAT_NET_DEV_OPS=y
698# CONFIG_DUMMY is not set 707# CONFIG_DUMMY is not set
699# CONFIG_BONDING is not set 708# CONFIG_BONDING is not set
700# CONFIG_MACVLAN is not set 709# CONFIG_MACVLAN is not set
@@ -748,6 +757,7 @@ CONFIG_8139TOO=y
748# CONFIG_SMSC9420 is not set 757# CONFIG_SMSC9420 is not set
749# CONFIG_SUNDANCE is not set 758# CONFIG_SUNDANCE is not set
750# CONFIG_TLAN is not set 759# CONFIG_TLAN is not set
760# CONFIG_KS8842 is not set
751# CONFIG_VIA_RHINE is not set 761# CONFIG_VIA_RHINE is not set
752# CONFIG_SC92031 is not set 762# CONFIG_SC92031 is not set
753# CONFIG_ATL2 is not set 763# CONFIG_ATL2 is not set
@@ -956,23 +966,7 @@ CONFIG_MFD_SM501=y
956# CONFIG_HTC_PASIC3 is not set 966# CONFIG_HTC_PASIC3 is not set
957# CONFIG_MFD_TMIO is not set 967# CONFIG_MFD_TMIO is not set
958# CONFIG_REGULATOR is not set 968# CONFIG_REGULATOR is not set
959 969# CONFIG_MEDIA_SUPPORT is not set
960#
961# Multimedia devices
962#
963
964#
965# Multimedia core support
966#
967# CONFIG_VIDEO_DEV is not set
968# CONFIG_DVB_CORE is not set
969# CONFIG_VIDEO_MEDIA is not set
970
971#
972# Multimedia drivers
973#
974CONFIG_DAB=y
975# CONFIG_USB_DABUSB is not set
976 970
977# 971#
978# Graphics support 972# Graphics support
@@ -1074,6 +1068,11 @@ CONFIG_SND_VERBOSE_PROCFS=y
1074# CONFIG_SND_VERBOSE_PRINTK is not set 1068# CONFIG_SND_VERBOSE_PRINTK is not set
1075# CONFIG_SND_DEBUG is not set 1069# CONFIG_SND_DEBUG is not set
1076CONFIG_SND_VMASTER=y 1070CONFIG_SND_VMASTER=y
1071# CONFIG_SND_RAWMIDI_SEQ is not set
1072# CONFIG_SND_OPL3_LIB_SEQ is not set
1073# CONFIG_SND_OPL4_LIB_SEQ is not set
1074# CONFIG_SND_SBAWE_SEQ is not set
1075# CONFIG_SND_EMU10K1_SEQ is not set
1077CONFIG_SND_MPU401_UART=m 1076CONFIG_SND_MPU401_UART=m
1078CONFIG_SND_OPL3_LIB=m 1077CONFIG_SND_OPL3_LIB=m
1079CONFIG_SND_AC97_CODEC=m 1078CONFIG_SND_AC97_CODEC=m
@@ -1100,6 +1099,7 @@ CONFIG_SND_PCI=y
1100# CONFIG_SND_OXYGEN is not set 1099# CONFIG_SND_OXYGEN is not set
1101# CONFIG_SND_CS4281 is not set 1100# CONFIG_SND_CS4281 is not set
1102# CONFIG_SND_CS46XX is not set 1101# CONFIG_SND_CS46XX is not set
1102# CONFIG_SND_CTXFI is not set
1103# CONFIG_SND_DARLA20 is not set 1103# CONFIG_SND_DARLA20 is not set
1104# CONFIG_SND_GINA20 is not set 1104# CONFIG_SND_GINA20 is not set
1105# CONFIG_SND_LAYLA20 is not set 1105# CONFIG_SND_LAYLA20 is not set
@@ -1130,6 +1130,7 @@ CONFIG_SND_PCI=y
1130# CONFIG_SND_INTEL8X0 is not set 1130# CONFIG_SND_INTEL8X0 is not set
1131# CONFIG_SND_INTEL8X0M is not set 1131# CONFIG_SND_INTEL8X0M is not set
1132# CONFIG_SND_KORG1212 is not set 1132# CONFIG_SND_KORG1212 is not set
1133# CONFIG_SND_LX6464ES is not set
1133# CONFIG_SND_MAESTRO3 is not set 1134# CONFIG_SND_MAESTRO3 is not set
1134# CONFIG_SND_MIXART is not set 1135# CONFIG_SND_MIXART is not set
1135# CONFIG_SND_NM256 is not set 1136# CONFIG_SND_NM256 is not set
@@ -1174,7 +1175,7 @@ CONFIG_HID_BELKIN=y
1174CONFIG_HID_CHERRY=y 1175CONFIG_HID_CHERRY=y
1175CONFIG_HID_CHICONY=y 1176CONFIG_HID_CHICONY=y
1176CONFIG_HID_CYPRESS=y 1177CONFIG_HID_CYPRESS=y
1177# CONFIG_DRAGONRISE_FF is not set 1178# CONFIG_HID_DRAGONRISE is not set
1178CONFIG_HID_EZKEY=y 1179CONFIG_HID_EZKEY=y
1179# CONFIG_HID_KYE is not set 1180# CONFIG_HID_KYE is not set
1180CONFIG_HID_GYRATION=y 1181CONFIG_HID_GYRATION=y
@@ -1191,10 +1192,11 @@ CONFIG_HID_PETALYNX=y
1191CONFIG_HID_SAMSUNG=y 1192CONFIG_HID_SAMSUNG=y
1192CONFIG_HID_SONY=y 1193CONFIG_HID_SONY=y
1193CONFIG_HID_SUNPLUS=y 1194CONFIG_HID_SUNPLUS=y
1194# CONFIG_GREENASIA_FF is not set 1195# CONFIG_HID_GREENASIA is not set
1196# CONFIG_HID_SMARTJOYPLUS is not set
1195# CONFIG_HID_TOPSEED is not set 1197# CONFIG_HID_TOPSEED is not set
1196CONFIG_THRUSTMASTER_FF=m 1198# CONFIG_HID_THRUSTMASTER is not set
1197CONFIG_ZEROPLUS_FF=m 1199# CONFIG_HID_ZEROPLUS is not set
1198CONFIG_USB_SUPPORT=y 1200CONFIG_USB_SUPPORT=y
1199CONFIG_USB_ARCH_HAS_HCD=y 1201CONFIG_USB_ARCH_HAS_HCD=y
1200CONFIG_USB_ARCH_HAS_OHCI=y 1202CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1220,6 +1222,7 @@ CONFIG_USB_DEVICE_CLASS=y
1220# USB Host Controller Drivers 1222# USB Host Controller Drivers
1221# 1223#
1222# CONFIG_USB_C67X00_HCD is not set 1224# CONFIG_USB_C67X00_HCD is not set
1225# CONFIG_USB_XHCI_HCD is not set
1223# CONFIG_USB_EHCI_HCD is not set 1226# CONFIG_USB_EHCI_HCD is not set
1224# CONFIG_USB_OXU210HP_HCD is not set 1227# CONFIG_USB_OXU210HP_HCD is not set
1225# CONFIG_USB_ISP116X_HCD is not set 1228# CONFIG_USB_ISP116X_HCD is not set
@@ -1353,9 +1356,14 @@ CONFIG_RTC_DRV_R9701=y
1353# on-CPU RTC drivers 1356# on-CPU RTC drivers
1354# 1357#
1355# CONFIG_RTC_DRV_SH is not set 1358# CONFIG_RTC_DRV_SH is not set
1359# CONFIG_RTC_DRV_GENERIC is not set
1356# CONFIG_DMADEVICES is not set 1360# CONFIG_DMADEVICES is not set
1357# CONFIG_AUXDISPLAY is not set 1361# CONFIG_AUXDISPLAY is not set
1358# CONFIG_UIO is not set 1362# CONFIG_UIO is not set
1363
1364#
1365# TI VLYNQ
1366#
1359# CONFIG_STAGING is not set 1367# CONFIG_STAGING is not set
1360 1368
1361# 1369#
@@ -1369,10 +1377,11 @@ CONFIG_EXT2_FS=y
1369# CONFIG_REISERFS_FS is not set 1377# CONFIG_REISERFS_FS is not set
1370# CONFIG_JFS_FS is not set 1378# CONFIG_JFS_FS is not set
1371# CONFIG_FS_POSIX_ACL is not set 1379# CONFIG_FS_POSIX_ACL is not set
1372CONFIG_FILE_LOCKING=y
1373# CONFIG_XFS_FS is not set 1380# CONFIG_XFS_FS is not set
1374# CONFIG_OCFS2_FS is not set 1381# CONFIG_OCFS2_FS is not set
1375# CONFIG_BTRFS_FS is not set 1382# CONFIG_BTRFS_FS is not set
1383CONFIG_FILE_LOCKING=y
1384CONFIG_FSNOTIFY=y
1376CONFIG_DNOTIFY=y 1385CONFIG_DNOTIFY=y
1377CONFIG_INOTIFY=y 1386CONFIG_INOTIFY=y
1378CONFIG_INOTIFY_USER=y 1387CONFIG_INOTIFY_USER=y
@@ -1423,6 +1432,7 @@ CONFIG_MISC_FILESYSTEMS=y
1423# CONFIG_BEFS_FS is not set 1432# CONFIG_BEFS_FS is not set
1424# CONFIG_BFS_FS is not set 1433# CONFIG_BFS_FS is not set
1425# CONFIG_EFS_FS is not set 1434# CONFIG_EFS_FS is not set
1435# CONFIG_JFFS2_FS is not set
1426# CONFIG_CRAMFS is not set 1436# CONFIG_CRAMFS is not set
1427# CONFIG_SQUASHFS is not set 1437# CONFIG_SQUASHFS is not set
1428# CONFIG_VXFS_FS is not set 1438# CONFIG_VXFS_FS is not set
@@ -1513,24 +1523,11 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1513CONFIG_HAVE_DYNAMIC_FTRACE=y 1523CONFIG_HAVE_DYNAMIC_FTRACE=y
1514CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1524CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1515CONFIG_RING_BUFFER=y 1525CONFIG_RING_BUFFER=y
1526CONFIG_EVENT_TRACING=y
1527CONFIG_CONTEXT_SWITCH_TRACER=y
1516CONFIG_TRACING=y 1528CONFIG_TRACING=y
1517CONFIG_TRACING_SUPPORT=y 1529CONFIG_TRACING_SUPPORT=y
1518 1530# CONFIG_FTRACE is not set
1519#
1520# Tracers
1521#
1522# CONFIG_FUNCTION_TRACER is not set
1523# CONFIG_IRQSOFF_TRACER is not set
1524# CONFIG_SCHED_TRACER is not set
1525# CONFIG_CONTEXT_SWITCH_TRACER is not set
1526# CONFIG_EVENT_TRACER is not set
1527# CONFIG_BOOT_TRACER is not set
1528# CONFIG_TRACE_BRANCH_PROFILING is not set
1529# CONFIG_STACK_TRACER is not set
1530# CONFIG_KMEMTRACE is not set
1531# CONFIG_WORKQUEUE_TRACER is not set
1532# CONFIG_BLK_DEV_IO_TRACE is not set
1533# CONFIG_FTRACE_STARTUP_TEST is not set
1534# CONFIG_DYNAMIC_DEBUG is not set 1531# CONFIG_DYNAMIC_DEBUG is not set
1535# CONFIG_DMA_API_DEBUG is not set 1532# CONFIG_DMA_API_DEBUG is not set
1536# CONFIG_SAMPLES is not set 1533# CONFIG_SAMPLES is not set
@@ -1539,7 +1536,6 @@ CONFIG_HAVE_ARCH_KGDB=y
1539CONFIG_EARLY_SCIF_CONSOLE=y 1536CONFIG_EARLY_SCIF_CONSOLE=y
1540CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000 1537CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1541CONFIG_EARLY_PRINTK=y 1538CONFIG_EARLY_PRINTK=y
1542# CONFIG_MORE_COMPILE_OPTIONS is not set
1543 1539
1544# 1540#
1545# Security options 1541# Security options
@@ -1653,3 +1649,4 @@ CONFIG_HAS_IOMEM=y
1653CONFIG_HAS_IOPORT=y 1649CONFIG_HAS_IOPORT=y
1654CONFIG_HAS_DMA=y 1650CONFIG_HAS_DMA=y
1655CONFIG_NLATTR=y 1651CONFIG_NLATTR=y
1652CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sdk7780_defconfig b/arch/sh/configs/sdk7780_defconfig
index a629b79a1844..753fb276e9f5 100644
--- a/arch/sh/configs/sdk7780_defconfig
+++ b/arch/sh/configs/sdk7780_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 12:59:32 2009 4# Thu Jun 18 12:43:54 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -75,7 +76,6 @@ CONFIG_SYSCTL_SYSCALL=y
75CONFIG_KALLSYMS=y 76CONFIG_KALLSYMS=y
76CONFIG_KALLSYMS_ALL=y 77CONFIG_KALLSYMS_ALL=y
77# CONFIG_KALLSYMS_EXTRA_PASS is not set 78# CONFIG_KALLSYMS_EXTRA_PASS is not set
78# CONFIG_STRIP_ASM_SYMS is not set
79CONFIG_HOTPLUG=y 79CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y 80CONFIG_PRINTK=y
81CONFIG_BUG=y 81CONFIG_BUG=y
@@ -88,9 +88,14 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 88CONFIG_EVENTFD=y
89CONFIG_SHMEM=y 89CONFIG_SHMEM=y
90CONFIG_AIO=y 90CONFIG_AIO=y
91
92#
93# Performance Counters
94#
91CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
92CONFIG_PCI_QUIRKS=y 96CONFIG_PCI_QUIRKS=y
93CONFIG_SLUB_DEBUG=y 97CONFIG_SLUB_DEBUG=y
98# CONFIG_STRIP_ASM_SYMS is not set
94CONFIG_COMPAT_BRK=y 99CONFIG_COMPAT_BRK=y
95# CONFIG_SLAB is not set 100# CONFIG_SLAB is not set
96CONFIG_SLUB=y 101CONFIG_SLUB=y
@@ -181,6 +186,7 @@ CONFIG_CPU_SUBTYPE_SH7780=y
181CONFIG_QUICKLIST=y 186CONFIG_QUICKLIST=y
182CONFIG_MMU=y 187CONFIG_MMU=y
183CONFIG_PAGE_OFFSET=0x80000000 188CONFIG_PAGE_OFFSET=0x80000000
189CONFIG_FORCE_MAX_ZONEORDER=11
184CONFIG_MEMORY_START=0x08000000 190CONFIG_MEMORY_START=0x08000000
185CONFIG_MEMORY_SIZE=0x08000000 191CONFIG_MEMORY_SIZE=0x08000000
186# CONFIG_29BIT is not set 192# CONFIG_29BIT is not set
@@ -199,7 +205,6 @@ CONFIG_PAGE_SIZE_4KB=y
199# CONFIG_PAGE_SIZE_8KB is not set 205# CONFIG_PAGE_SIZE_8KB is not set
200# CONFIG_PAGE_SIZE_16KB is not set 206# CONFIG_PAGE_SIZE_16KB is not set
201# CONFIG_PAGE_SIZE_64KB is not set 207# CONFIG_PAGE_SIZE_64KB is not set
202CONFIG_ENTRY_OFFSET=0x00001000
203CONFIG_HUGETLB_PAGE_SIZE_64K=y 208CONFIG_HUGETLB_PAGE_SIZE_64K=y
204# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 209# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
205# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 210# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -218,9 +223,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
218# CONFIG_PHYS_ADDR_T_64BIT is not set 223# CONFIG_PHYS_ADDR_T_64BIT is not set
219CONFIG_ZONE_DMA_FLAG=0 224CONFIG_ZONE_DMA_FLAG=0
220CONFIG_NR_QUICK=2 225CONFIG_NR_QUICK=2
221CONFIG_UNEVICTABLE_LRU=y
222CONFIG_HAVE_MLOCK=y 226CONFIG_HAVE_MLOCK=y
223CONFIG_HAVE_MLOCKED_PAGE_BIT=y 227CONFIG_HAVE_MLOCKED_PAGE_BIT=y
228CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
224 229
225# 230#
226# Cache configuration 231# Cache configuration
@@ -252,9 +257,10 @@ CONFIG_SH_SDK7780_BASE=y
252# 257#
253# Timer and clock configuration 258# Timer and clock configuration
254# 259#
255CONFIG_SH_TMU=y 260CONFIG_SH_TIMER_TMU=y
256CONFIG_SH_TIMER_IRQ=28
257CONFIG_SH_PCLK_FREQ=33333333 261CONFIG_SH_PCLK_FREQ=33333333
262CONFIG_SH_CLK_CPG=y
263CONFIG_SH_CLK_CPG_LEGACY=y
258CONFIG_TICK_ONESHOT=y 264CONFIG_TICK_ONESHOT=y
259# CONFIG_NO_HZ is not set 265# CONFIG_NO_HZ is not set
260CONFIG_HIGH_RES_TIMERS=y 266CONFIG_HIGH_RES_TIMERS=y
@@ -300,12 +306,14 @@ CONFIG_SCHED_HRTICK=y
300# CONFIG_PREEMPT_VOLUNTARY is not set 306# CONFIG_PREEMPT_VOLUNTARY is not set
301CONFIG_PREEMPT=y 307CONFIG_PREEMPT=y
302CONFIG_GUSA=y 308CONFIG_GUSA=y
309# CONFIG_SPARSE_IRQ is not set
303 310
304# 311#
305# Boot options 312# Boot options
306# 313#
307CONFIG_ZERO_PAGE_OFFSET=0x00001000 314CONFIG_ZERO_PAGE_OFFSET=0x00001000
308CONFIG_BOOT_LINK_OFFSET=0x01800000 315CONFIG_BOOT_LINK_OFFSET=0x01800000
316CONFIG_ENTRY_OFFSET=0x00001000
309CONFIG_CMDLINE_BOOL=y 317CONFIG_CMDLINE_BOOL=y
310CONFIG_CMDLINE="mem=128M console=tty0 console=ttySC0,115200 ip=bootp root=/dev/nfs nfsroot=192.168.0.1:/home/rootfs" 318CONFIG_CMDLINE="mem=128M console=tty0 console=ttySC0,115200 ip=bootp root=/dev/nfs nfsroot=192.168.0.1:/home/rootfs"
311 319
@@ -441,6 +449,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
441# CONFIG_ECONET is not set 449# CONFIG_ECONET is not set
442# CONFIG_WAN_ROUTER is not set 450# CONFIG_WAN_ROUTER is not set
443# CONFIG_PHONET is not set 451# CONFIG_PHONET is not set
452# CONFIG_IEEE802154 is not set
444CONFIG_NET_SCHED=y 453CONFIG_NET_SCHED=y
445 454
446# 455#
@@ -490,7 +499,11 @@ CONFIG_WIRELESS=y
490# CONFIG_WIRELESS_OLD_REGULATORY is not set 499# CONFIG_WIRELESS_OLD_REGULATORY is not set
491# CONFIG_WIRELESS_EXT is not set 500# CONFIG_WIRELESS_EXT is not set
492# CONFIG_LIB80211 is not set 501# CONFIG_LIB80211 is not set
493# CONFIG_MAC80211 is not set 502
503#
504# CFG80211 needs to be enabled for MAC80211
505#
506CONFIG_MAC80211_DEFAULT_PS_VALUE=0
494# CONFIG_WIMAX is not set 507# CONFIG_WIMAX is not set
495# CONFIG_RFKILL is not set 508# CONFIG_RFKILL is not set
496# CONFIG_NET_9P is not set 509# CONFIG_NET_9P is not set
@@ -613,10 +626,6 @@ CONFIG_BLK_DEV_SR=y
613# CONFIG_BLK_DEV_SR_VENDOR is not set 626# CONFIG_BLK_DEV_SR_VENDOR is not set
614CONFIG_CHR_DEV_SG=y 627CONFIG_CHR_DEV_SG=y
615# CONFIG_CHR_DEV_SCH is not set 628# CONFIG_CHR_DEV_SCH is not set
616
617#
618# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
619#
620# CONFIG_SCSI_MULTI_LUN is not set 629# CONFIG_SCSI_MULTI_LUN is not set
621# CONFIG_SCSI_CONSTANTS is not set 630# CONFIG_SCSI_CONSTANTS is not set
622# CONFIG_SCSI_LOGGING is not set 631# CONFIG_SCSI_LOGGING is not set
@@ -633,6 +642,7 @@ CONFIG_SCSI_FC_ATTRS=y
633# CONFIG_SCSI_SRP_ATTRS is not set 642# CONFIG_SCSI_SRP_ATTRS is not set
634CONFIG_SCSI_LOWLEVEL=y 643CONFIG_SCSI_LOWLEVEL=y
635# CONFIG_ISCSI_TCP is not set 644# CONFIG_ISCSI_TCP is not set
645# CONFIG_SCSI_BNX2_ISCSI is not set
636# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 646# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
637# CONFIG_SCSI_3W_9XXX is not set 647# CONFIG_SCSI_3W_9XXX is not set
638# CONFIG_SCSI_ACARD is not set 648# CONFIG_SCSI_ACARD is not set
@@ -641,6 +651,7 @@ CONFIG_SCSI_LOWLEVEL=y
641# CONFIG_SCSI_AIC7XXX_OLD is not set 651# CONFIG_SCSI_AIC7XXX_OLD is not set
642# CONFIG_SCSI_AIC79XX is not set 652# CONFIG_SCSI_AIC79XX is not set
643# CONFIG_SCSI_AIC94XX is not set 653# CONFIG_SCSI_AIC94XX is not set
654# CONFIG_SCSI_MVSAS is not set
644# CONFIG_SCSI_ARCMSR is not set 655# CONFIG_SCSI_ARCMSR is not set
645# CONFIG_MEGARAID_NEWGEN is not set 656# CONFIG_MEGARAID_NEWGEN is not set
646# CONFIG_MEGARAID_LEGACY is not set 657# CONFIG_MEGARAID_LEGACY is not set
@@ -655,7 +666,6 @@ CONFIG_SCSI_LOWLEVEL=y
655# CONFIG_SCSI_IPS is not set 666# CONFIG_SCSI_IPS is not set
656# CONFIG_SCSI_INITIO is not set 667# CONFIG_SCSI_INITIO is not set
657# CONFIG_SCSI_INIA100 is not set 668# CONFIG_SCSI_INIA100 is not set
658# CONFIG_SCSI_MVSAS is not set
659# CONFIG_SCSI_STEX is not set 669# CONFIG_SCSI_STEX is not set
660# CONFIG_SCSI_SYM53C8XX_2 is not set 670# CONFIG_SCSI_SYM53C8XX_2 is not set
661# CONFIG_SCSI_IPR is not set 671# CONFIG_SCSI_IPR is not set
@@ -756,7 +766,6 @@ CONFIG_BLK_DEV_DM=y
756# CONFIG_IEEE1394 is not set 766# CONFIG_IEEE1394 is not set
757# CONFIG_I2O is not set 767# CONFIG_I2O is not set
758CONFIG_NETDEVICES=y 768CONFIG_NETDEVICES=y
759CONFIG_COMPAT_NET_DEV_OPS=y
760# CONFIG_DUMMY is not set 769# CONFIG_DUMMY is not set
761# CONFIG_BONDING is not set 770# CONFIG_BONDING is not set
762# CONFIG_MACVLAN is not set 771# CONFIG_MACVLAN is not set
@@ -789,6 +798,7 @@ CONFIG_SMC91X=y
789# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 798# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
790# CONFIG_NET_PCI is not set 799# CONFIG_NET_PCI is not set
791# CONFIG_B44 is not set 800# CONFIG_B44 is not set
801# CONFIG_KS8842 is not set
792# CONFIG_NET_POCKET is not set 802# CONFIG_NET_POCKET is not set
793# CONFIG_ATL2 is not set 803# CONFIG_ATL2 is not set
794# CONFIG_NETDEV_1000 is not set 804# CONFIG_NETDEV_1000 is not set
@@ -971,22 +981,7 @@ CONFIG_SSB_DRIVER_PCICORE=y
971# CONFIG_HTC_PASIC3 is not set 981# CONFIG_HTC_PASIC3 is not set
972# CONFIG_MFD_TMIO is not set 982# CONFIG_MFD_TMIO is not set
973# CONFIG_REGULATOR is not set 983# CONFIG_REGULATOR is not set
974 984# CONFIG_MEDIA_SUPPORT is not set
975#
976# Multimedia devices
977#
978
979#
980# Multimedia core support
981#
982# CONFIG_VIDEO_DEV is not set
983# CONFIG_DVB_CORE is not set
984# CONFIG_VIDEO_MEDIA is not set
985
986#
987# Multimedia drivers
988#
989# CONFIG_DAB is not set
990 985
991# 986#
992# Graphics support 987# Graphics support
@@ -1100,7 +1095,7 @@ CONFIG_HID_BELKIN=y
1100CONFIG_HID_CHERRY=y 1095CONFIG_HID_CHERRY=y
1101CONFIG_HID_CHICONY=y 1096CONFIG_HID_CHICONY=y
1102CONFIG_HID_CYPRESS=y 1097CONFIG_HID_CYPRESS=y
1103# CONFIG_DRAGONRISE_FF is not set 1098# CONFIG_HID_DRAGONRISE is not set
1104CONFIG_HID_EZKEY=y 1099CONFIG_HID_EZKEY=y
1105# CONFIG_HID_KYE is not set 1100# CONFIG_HID_KYE is not set
1106CONFIG_HID_GYRATION=y 1101CONFIG_HID_GYRATION=y
@@ -1117,10 +1112,11 @@ CONFIG_HID_PETALYNX=y
1117CONFIG_HID_SAMSUNG=y 1112CONFIG_HID_SAMSUNG=y
1118CONFIG_HID_SONY=y 1113CONFIG_HID_SONY=y
1119CONFIG_HID_SUNPLUS=y 1114CONFIG_HID_SUNPLUS=y
1120# CONFIG_GREENASIA_FF is not set 1115# CONFIG_HID_GREENASIA is not set
1116# CONFIG_HID_SMARTJOYPLUS is not set
1121# CONFIG_HID_TOPSEED is not set 1117# CONFIG_HID_TOPSEED is not set
1122CONFIG_THRUSTMASTER_FF=m 1118# CONFIG_HID_THRUSTMASTER is not set
1123CONFIG_ZEROPLUS_FF=m 1119# CONFIG_HID_ZEROPLUS is not set
1124CONFIG_USB_SUPPORT=y 1120CONFIG_USB_SUPPORT=y
1125CONFIG_USB_ARCH_HAS_HCD=y 1121CONFIG_USB_ARCH_HAS_HCD=y
1126CONFIG_USB_ARCH_HAS_OHCI=y 1122CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1146,6 +1142,7 @@ CONFIG_USB_MON=y
1146# USB Host Controller Drivers 1142# USB Host Controller Drivers
1147# 1143#
1148# CONFIG_USB_C67X00_HCD is not set 1144# CONFIG_USB_C67X00_HCD is not set
1145# CONFIG_USB_XHCI_HCD is not set
1149CONFIG_USB_EHCI_HCD=y 1146CONFIG_USB_EHCI_HCD=y
1150# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1147# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1151# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1148# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1247,10 +1244,15 @@ CONFIG_LEDS_CLASS=y
1247# CONFIG_LEDS_TRIGGERS is not set 1244# CONFIG_LEDS_TRIGGERS is not set
1248# CONFIG_ACCESSIBILITY is not set 1245# CONFIG_ACCESSIBILITY is not set
1249# CONFIG_INFINIBAND is not set 1246# CONFIG_INFINIBAND is not set
1247CONFIG_RTC_LIB=y
1250# CONFIG_RTC_CLASS is not set 1248# CONFIG_RTC_CLASS is not set
1251# CONFIG_DMADEVICES is not set 1249# CONFIG_DMADEVICES is not set
1252# CONFIG_AUXDISPLAY is not set 1250# CONFIG_AUXDISPLAY is not set
1253# CONFIG_UIO is not set 1251# CONFIG_UIO is not set
1252
1253#
1254# TI VLYNQ
1255#
1254# CONFIG_STAGING is not set 1256# CONFIG_STAGING is not set
1255 1257
1256# 1258#
@@ -1272,11 +1274,12 @@ CONFIG_FS_MBCACHE=y
1272# CONFIG_REISERFS_FS is not set 1274# CONFIG_REISERFS_FS is not set
1273# CONFIG_JFS_FS is not set 1275# CONFIG_JFS_FS is not set
1274CONFIG_FS_POSIX_ACL=y 1276CONFIG_FS_POSIX_ACL=y
1275CONFIG_FILE_LOCKING=y
1276# CONFIG_XFS_FS is not set 1277# CONFIG_XFS_FS is not set
1277# CONFIG_GFS2_FS is not set 1278# CONFIG_GFS2_FS is not set
1278# CONFIG_OCFS2_FS is not set 1279# CONFIG_OCFS2_FS is not set
1279# CONFIG_BTRFS_FS is not set 1280# CONFIG_BTRFS_FS is not set
1281CONFIG_FILE_LOCKING=y
1282CONFIG_FSNOTIFY=y
1280CONFIG_DNOTIFY=y 1283CONFIG_DNOTIFY=y
1281CONFIG_INOTIFY=y 1284CONFIG_INOTIFY=y
1282CONFIG_INOTIFY_USER=y 1285CONFIG_INOTIFY_USER=y
@@ -1471,18 +1474,16 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1471CONFIG_HAVE_DYNAMIC_FTRACE=y 1474CONFIG_HAVE_DYNAMIC_FTRACE=y
1472CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1475CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1473CONFIG_TRACING_SUPPORT=y 1476CONFIG_TRACING_SUPPORT=y
1474 1477CONFIG_FTRACE=y
1475#
1476# Tracers
1477#
1478# CONFIG_FUNCTION_TRACER is not set 1478# CONFIG_FUNCTION_TRACER is not set
1479# CONFIG_IRQSOFF_TRACER is not set 1479# CONFIG_IRQSOFF_TRACER is not set
1480# CONFIG_PREEMPT_TRACER is not set 1480# CONFIG_PREEMPT_TRACER is not set
1481# CONFIG_SCHED_TRACER is not set 1481# CONFIG_SCHED_TRACER is not set
1482# CONFIG_CONTEXT_SWITCH_TRACER is not set 1482# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1483# CONFIG_EVENT_TRACER is not set
1484# CONFIG_BOOT_TRACER is not set 1483# CONFIG_BOOT_TRACER is not set
1485# CONFIG_TRACE_BRANCH_PROFILING is not set 1484CONFIG_BRANCH_PROFILE_NONE=y
1485# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1486# CONFIG_PROFILE_ALL_BRANCHES is not set
1486# CONFIG_STACK_TRACER is not set 1487# CONFIG_STACK_TRACER is not set
1487# CONFIG_KMEMTRACE is not set 1488# CONFIG_KMEMTRACE is not set
1488# CONFIG_WORKQUEUE_TRACER is not set 1489# CONFIG_WORKQUEUE_TRACER is not set
@@ -1498,10 +1499,8 @@ CONFIG_SH_STANDARD_BIOS=y
1498CONFIG_DEBUG_STACKOVERFLOW=y 1499CONFIG_DEBUG_STACKOVERFLOW=y
1499# CONFIG_DEBUG_STACK_USAGE is not set 1500# CONFIG_DEBUG_STACK_USAGE is not set
1500# CONFIG_4KSTACKS is not set 1501# CONFIG_4KSTACKS is not set
1501# CONFIG_IRQSTACKS is not set
1502CONFIG_DUMP_CODE=y 1502CONFIG_DUMP_CODE=y
1503# CONFIG_SH_NO_BSS_INIT is not set 1503# CONFIG_SH_NO_BSS_INIT is not set
1504# CONFIG_MORE_COMPILE_OPTIONS is not set
1505 1504
1506# 1505#
1507# Security options 1506# Security options
@@ -1619,3 +1618,4 @@ CONFIG_HAS_IOMEM=y
1619CONFIG_HAS_IOPORT=y 1618CONFIG_HAS_IOPORT=y
1620CONFIG_HAS_DMA=y 1619CONFIG_HAS_DMA=y
1621CONFIG_NLATTR=y 1620CONFIG_NLATTR=y
1621CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 5caf85a3312d..8dd2f130e491 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:01:02 2009 4# Thu Jun 18 12:46:15 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -15,11 +15,12 @@ CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
18# CONFIG_GENERIC_TIME is not set 18CONFIG_GENERIC_TIME=y
19# CONFIG_GENERIC_CLOCKEVENTS is not set 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
22CONFIG_SYS_SUPPORTS_CMT=y 22CONFIG_SYS_SUPPORTS_CMT=y
23CONFIG_SYS_SUPPORTS_MTU2=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -47,6 +48,7 @@ CONFIG_BSD_PROCESS_ACCT=y
47# CONFIG_TASKSTATS is not set 48# CONFIG_TASKSTATS is not set
48CONFIG_AUDIT=y 49CONFIG_AUDIT=y
49CONFIG_AUDITSYSCALL=y 50CONFIG_AUDITSYSCALL=y
51CONFIG_AUDIT_TREE=y
50 52
51# 53#
52# RCU Subsystem 54# RCU Subsystem
@@ -92,7 +94,6 @@ CONFIG_EMBEDDED=y
92CONFIG_KALLSYMS=y 94CONFIG_KALLSYMS=y
93CONFIG_KALLSYMS_ALL=y 95CONFIG_KALLSYMS_ALL=y
94# CONFIG_KALLSYMS_EXTRA_PASS is not set 96# CONFIG_KALLSYMS_EXTRA_PASS is not set
95# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_HOTPLUG=y 97CONFIG_HOTPLUG=y
97CONFIG_PRINTK=y 98CONFIG_PRINTK=y
98CONFIG_BUG=y 99CONFIG_BUG=y
@@ -104,14 +105,19 @@ CONFIG_SIGNALFD=y
104CONFIG_TIMERFD=y 105CONFIG_TIMERFD=y
105CONFIG_EVENTFD=y 106CONFIG_EVENTFD=y
106CONFIG_AIO=y 107CONFIG_AIO=y
108
109#
110# Performance Counters
111#
107CONFIG_VM_EVENT_COUNTERS=y 112CONFIG_VM_EVENT_COUNTERS=y
113# CONFIG_STRIP_ASM_SYMS is not set
108# CONFIG_COMPAT_BRK is not set 114# CONFIG_COMPAT_BRK is not set
109# CONFIG_SLAB is not set 115# CONFIG_SLAB is not set
110# CONFIG_SLUB is not set 116# CONFIG_SLUB is not set
111CONFIG_SLOB=y 117CONFIG_SLOB=y
112CONFIG_PROFILING=y 118CONFIG_PROFILING=y
113CONFIG_TRACEPOINTS=y 119CONFIG_TRACEPOINTS=y
114# CONFIG_MARKERS is not set 120CONFIG_MARKERS=y
115CONFIG_OPROFILE=y 121CONFIG_OPROFILE=y
116CONFIG_HAVE_OPROFILE=y 122CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 123# CONFIG_KPROBES is not set
@@ -194,6 +200,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y
194# 200#
195CONFIG_QUICKLIST=y 201CONFIG_QUICKLIST=y
196CONFIG_PAGE_OFFSET=0x00000000 202CONFIG_PAGE_OFFSET=0x00000000
203CONFIG_FORCE_MAX_ZONEORDER=14
197CONFIG_MEMORY_START=0x0c000000 204CONFIG_MEMORY_START=0x0c000000
198CONFIG_MEMORY_SIZE=0x04000000 205CONFIG_MEMORY_SIZE=0x04000000
199CONFIG_29BIT=y 206CONFIG_29BIT=y
@@ -207,7 +214,6 @@ CONFIG_PAGE_SIZE_4KB=y
207# CONFIG_PAGE_SIZE_8KB is not set 214# CONFIG_PAGE_SIZE_8KB is not set
208# CONFIG_PAGE_SIZE_16KB is not set 215# CONFIG_PAGE_SIZE_16KB is not set
209# CONFIG_PAGE_SIZE_64KB is not set 216# CONFIG_PAGE_SIZE_64KB is not set
210CONFIG_ENTRY_OFFSET=0x00001000
211CONFIG_SELECT_MEMORY_MODEL=y 217CONFIG_SELECT_MEMORY_MODEL=y
212CONFIG_FLATMEM_MANUAL=y 218CONFIG_FLATMEM_MANUAL=y
213# CONFIG_DISCONTIGMEM_MANUAL is not set 219# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -220,7 +226,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
220# CONFIG_PHYS_ADDR_T_64BIT is not set 226# CONFIG_PHYS_ADDR_T_64BIT is not set
221CONFIG_ZONE_DMA_FLAG=0 227CONFIG_ZONE_DMA_FLAG=0
222CONFIG_NR_QUICK=2 228CONFIG_NR_QUICK=2
223CONFIG_UNEVICTABLE_LRU=y 229CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
230CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
224 231
225# 232#
226# Cache configuration 233# Cache configuration
@@ -245,11 +252,15 @@ CONFIG_SH_7206_SOLUTION_ENGINE=y
245# 252#
246# Timer and clock configuration 253# Timer and clock configuration
247# 254#
248CONFIG_SH_CMT=y 255CONFIG_SH_TIMER_CMT=y
249# CONFIG_SH_MTU2 is not set 256CONFIG_SH_TIMER_MTU2=y
250CONFIG_SH_TIMER_IRQ=140
251CONFIG_SH_PCLK_FREQ=33333333 257CONFIG_SH_PCLK_FREQ=33333333
258CONFIG_SH_CLK_CPG=y
259CONFIG_SH_CLK_CPG_LEGACY=y
252CONFIG_SH_CLK_MD=6 260CONFIG_SH_CLK_MD=6
261# CONFIG_NO_HZ is not set
262# CONFIG_HIGH_RES_TIMERS is not set
263CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
253 264
254# 265#
255# CPU Frequency scaling 266# CPU Frequency scaling
@@ -300,12 +311,14 @@ CONFIG_HZ=1000
300# CONFIG_PREEMPT_VOLUNTARY is not set 311# CONFIG_PREEMPT_VOLUNTARY is not set
301CONFIG_PREEMPT=y 312CONFIG_PREEMPT=y
302CONFIG_GUSA=y 313CONFIG_GUSA=y
314# CONFIG_SPARSE_IRQ is not set
303 315
304# 316#
305# Boot options 317# Boot options
306# 318#
307CONFIG_ZERO_PAGE_OFFSET=0x00001000 319CONFIG_ZERO_PAGE_OFFSET=0x00001000
308CONFIG_BOOT_LINK_OFFSET=0x00800000 320CONFIG_BOOT_LINK_OFFSET=0x00800000
321CONFIG_ENTRY_OFFSET=0x00001000
309CONFIG_CMDLINE_BOOL=y 322CONFIG_CMDLINE_BOOL=y
310CONFIG_CMDLINE="console=ttySC3,115200 ignore_loglevel earlyprintk=serial" 323CONFIG_CMDLINE="console=ttySC3,115200 ignore_loglevel earlyprintk=serial"
311 324
@@ -390,6 +403,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
390# CONFIG_ECONET is not set 403# CONFIG_ECONET is not set
391# CONFIG_WAN_ROUTER is not set 404# CONFIG_WAN_ROUTER is not set
392# CONFIG_PHONET is not set 405# CONFIG_PHONET is not set
406# CONFIG_IEEE802154 is not set
393# CONFIG_NET_SCHED is not set 407# CONFIG_NET_SCHED is not set
394# CONFIG_DCB is not set 408# CONFIG_DCB is not set
395 409
@@ -408,7 +422,11 @@ CONFIG_WIRELESS=y
408# CONFIG_WIRELESS_OLD_REGULATORY is not set 422# CONFIG_WIRELESS_OLD_REGULATORY is not set
409# CONFIG_WIRELESS_EXT is not set 423# CONFIG_WIRELESS_EXT is not set
410# CONFIG_LIB80211 is not set 424# CONFIG_LIB80211 is not set
411# CONFIG_MAC80211 is not set 425
426#
427# CFG80211 needs to be enabled for MAC80211
428#
429CONFIG_MAC80211_DEFAULT_PS_VALUE=0
412# CONFIG_WIMAX is not set 430# CONFIG_WIMAX is not set
413# CONFIG_RFKILL is not set 431# CONFIG_RFKILL is not set
414# CONFIG_NET_9P is not set 432# CONFIG_NET_9P is not set
@@ -543,7 +561,6 @@ CONFIG_HAVE_IDE=y
543# CONFIG_ATA is not set 561# CONFIG_ATA is not set
544# CONFIG_MD is not set 562# CONFIG_MD is not set
545CONFIG_NETDEVICES=y 563CONFIG_NETDEVICES=y
546CONFIG_COMPAT_NET_DEV_OPS=y
547# CONFIG_DUMMY is not set 564# CONFIG_DUMMY is not set
548# CONFIG_BONDING is not set 565# CONFIG_BONDING is not set
549# CONFIG_MACVLAN is not set 566# CONFIG_MACVLAN is not set
@@ -568,6 +585,7 @@ CONFIG_SMC91X=y
568# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 585# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
569# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 586# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
570# CONFIG_B44 is not set 587# CONFIG_B44 is not set
588# CONFIG_KS8842 is not set
571# CONFIG_NETDEV_1000 is not set 589# CONFIG_NETDEV_1000 is not set
572# CONFIG_NETDEV_10000 is not set 590# CONFIG_NETDEV_10000 is not set
573 591
@@ -650,22 +668,7 @@ CONFIG_SSB_POSSIBLE=y
650# CONFIG_HTC_PASIC3 is not set 668# CONFIG_HTC_PASIC3 is not set
651# CONFIG_MFD_TMIO is not set 669# CONFIG_MFD_TMIO is not set
652# CONFIG_REGULATOR is not set 670# CONFIG_REGULATOR is not set
653 671# CONFIG_MEDIA_SUPPORT is not set
654#
655# Multimedia devices
656#
657
658#
659# Multimedia core support
660#
661# CONFIG_VIDEO_DEV is not set
662# CONFIG_DVB_CORE is not set
663# CONFIG_VIDEO_MEDIA is not set
664
665#
666# Multimedia drivers
667#
668# CONFIG_DAB is not set
669 672
670# 673#
671# Graphics support 674# Graphics support
@@ -722,9 +725,14 @@ CONFIG_RTC_INTF_DEV=y
722# on-CPU RTC drivers 725# on-CPU RTC drivers
723# 726#
724CONFIG_RTC_DRV_SH=y 727CONFIG_RTC_DRV_SH=y
728# CONFIG_RTC_DRV_GENERIC is not set
725# CONFIG_DMADEVICES is not set 729# CONFIG_DMADEVICES is not set
726# CONFIG_AUXDISPLAY is not set 730# CONFIG_AUXDISPLAY is not set
727# CONFIG_UIO is not set 731# CONFIG_UIO is not set
732
733#
734# TI VLYNQ
735#
728# CONFIG_STAGING is not set 736# CONFIG_STAGING is not set
729 737
730# 738#
@@ -737,12 +745,14 @@ CONFIG_EXT2_FS=y
737# CONFIG_REISERFS_FS is not set 745# CONFIG_REISERFS_FS is not set
738# CONFIG_JFS_FS is not set 746# CONFIG_JFS_FS is not set
739# CONFIG_FS_POSIX_ACL is not set 747# CONFIG_FS_POSIX_ACL is not set
740CONFIG_FILE_LOCKING=y
741# CONFIG_XFS_FS is not set 748# CONFIG_XFS_FS is not set
742# CONFIG_OCFS2_FS is not set 749# CONFIG_OCFS2_FS is not set
743# CONFIG_BTRFS_FS is not set 750# CONFIG_BTRFS_FS is not set
751CONFIG_FILE_LOCKING=y
752CONFIG_FSNOTIFY=y
744# CONFIG_DNOTIFY is not set 753# CONFIG_DNOTIFY is not set
745# CONFIG_INOTIFY is not set 754CONFIG_INOTIFY=y
755CONFIG_INOTIFY_USER=y
746# CONFIG_QUOTA is not set 756# CONFIG_QUOTA is not set
747# CONFIG_AUTOFS_FS is not set 757# CONFIG_AUTOFS_FS is not set
748# CONFIG_AUTOFS4_FS is not set 758# CONFIG_AUTOFS4_FS is not set
@@ -884,23 +894,25 @@ CONFIG_HAVE_FUNCTION_TRACER=y
884CONFIG_HAVE_DYNAMIC_FTRACE=y 894CONFIG_HAVE_DYNAMIC_FTRACE=y
885CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 895CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
886CONFIG_RING_BUFFER=y 896CONFIG_RING_BUFFER=y
897CONFIG_EVENT_TRACING=y
898CONFIG_CONTEXT_SWITCH_TRACER=y
887CONFIG_TRACING=y 899CONFIG_TRACING=y
888CONFIG_TRACING_SUPPORT=y 900CONFIG_TRACING_SUPPORT=y
889 901CONFIG_FTRACE=y
890#
891# Tracers
892#
893# CONFIG_FUNCTION_TRACER is not set 902# CONFIG_FUNCTION_TRACER is not set
903# CONFIG_IRQSOFF_TRACER is not set
904# CONFIG_PREEMPT_TRACER is not set
894# CONFIG_SCHED_TRACER is not set 905# CONFIG_SCHED_TRACER is not set
895# CONFIG_CONTEXT_SWITCH_TRACER is not set 906# CONFIG_ENABLE_DEFAULT_TRACERS is not set
896# CONFIG_EVENT_TRACER is not set
897# CONFIG_BOOT_TRACER is not set 907# CONFIG_BOOT_TRACER is not set
898# CONFIG_TRACE_BRANCH_PROFILING is not set 908CONFIG_BRANCH_PROFILE_NONE=y
909# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
910# CONFIG_PROFILE_ALL_BRANCHES is not set
899# CONFIG_STACK_TRACER is not set 911# CONFIG_STACK_TRACER is not set
900# CONFIG_KMEMTRACE is not set 912# CONFIG_KMEMTRACE is not set
901# CONFIG_WORKQUEUE_TRACER is not set 913# CONFIG_WORKQUEUE_TRACER is not set
902# CONFIG_BLK_DEV_IO_TRACE is not set 914# CONFIG_BLK_DEV_IO_TRACE is not set
903# CONFIG_FTRACE_STARTUP_TEST is not set 915# CONFIG_RING_BUFFER_BENCHMARK is not set
904# CONFIG_DYNAMIC_DEBUG is not set 916# CONFIG_DYNAMIC_DEBUG is not set
905# CONFIG_DMA_API_DEBUG is not set 917# CONFIG_DMA_API_DEBUG is not set
906# CONFIG_SAMPLES is not set 918# CONFIG_SAMPLES is not set
@@ -911,10 +923,8 @@ CONFIG_HAVE_ARCH_KGDB=y
911# CONFIG_DEBUG_BOOTMEM is not set 923# CONFIG_DEBUG_BOOTMEM is not set
912CONFIG_DEBUG_STACKOVERFLOW=y 924CONFIG_DEBUG_STACKOVERFLOW=y
913CONFIG_DEBUG_STACK_USAGE=y 925CONFIG_DEBUG_STACK_USAGE=y
914# CONFIG_IRQSTACKS is not set
915CONFIG_DUMP_CODE=y 926CONFIG_DUMP_CODE=y
916# CONFIG_SH_NO_BSS_INIT is not set 927# CONFIG_SH_NO_BSS_INIT is not set
917# CONFIG_MORE_COMPILE_OPTIONS is not set
918 928
919# 929#
920# Security options 930# Security options
@@ -1037,3 +1047,4 @@ CONFIG_HAS_IOMEM=y
1037CONFIG_HAS_IOPORT=y 1047CONFIG_HAS_IOPORT=y
1038CONFIG_HAS_DMA=y 1048CONFIG_HAS_DMA=y
1039CONFIG_NLATTR=y 1049CONFIG_NLATTR=y
1050CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7343_defconfig b/arch/sh/configs/se7343_defconfig
index 004d531716dc..18f46debf92a 100644
--- a/arch/sh/configs/se7343_defconfig
+++ b/arch/sh/configs/se7343_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:01:44 2009 4# Thu Jun 18 12:47:07 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20CONFIG_ARCH_SUSPEND_POSSIBLE=y 20CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_CMT=y 22CONFIG_SYS_SUPPORTS_CMT=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -75,7 +76,6 @@ CONFIG_UID16=y
75# CONFIG_SYSCTL_SYSCALL is not set 76# CONFIG_SYSCTL_SYSCALL is not set
76CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
77# CONFIG_KALLSYMS_EXTRA_PASS is not set 78# CONFIG_KALLSYMS_EXTRA_PASS is not set
78# CONFIG_STRIP_ASM_SYMS is not set
79CONFIG_HOTPLUG=y 79CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y 80CONFIG_PRINTK=y
81CONFIG_BUG=y 81CONFIG_BUG=y
@@ -88,7 +88,12 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 88CONFIG_EVENTFD=y
89# CONFIG_SHMEM is not set 89# CONFIG_SHMEM is not set
90CONFIG_AIO=y 90CONFIG_AIO=y
91
92#
93# Performance Counters
94#
91CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
96# CONFIG_STRIP_ASM_SYMS is not set
92CONFIG_COMPAT_BRK=y 97CONFIG_COMPAT_BRK=y
93CONFIG_SLAB=y 98CONFIG_SLAB=y
94# CONFIG_SLUB is not set 99# CONFIG_SLUB is not set
@@ -180,6 +185,7 @@ CONFIG_CPU_SUBTYPE_SH7343=y
180CONFIG_QUICKLIST=y 185CONFIG_QUICKLIST=y
181CONFIG_MMU=y 186CONFIG_MMU=y
182CONFIG_PAGE_OFFSET=0x80000000 187CONFIG_PAGE_OFFSET=0x80000000
188CONFIG_FORCE_MAX_ZONEORDER=11
183CONFIG_MEMORY_START=0x0c000000 189CONFIG_MEMORY_START=0x0c000000
184CONFIG_MEMORY_SIZE=0x01000000 190CONFIG_MEMORY_SIZE=0x01000000
185CONFIG_29BIT=y 191CONFIG_29BIT=y
@@ -194,7 +200,6 @@ CONFIG_PAGE_SIZE_4KB=y
194# CONFIG_PAGE_SIZE_8KB is not set 200# CONFIG_PAGE_SIZE_8KB is not set
195# CONFIG_PAGE_SIZE_16KB is not set 201# CONFIG_PAGE_SIZE_16KB is not set
196# CONFIG_PAGE_SIZE_64KB is not set 202# CONFIG_PAGE_SIZE_64KB is not set
197CONFIG_ENTRY_OFFSET=0x00001000
198CONFIG_SELECT_MEMORY_MODEL=y 203CONFIG_SELECT_MEMORY_MODEL=y
199CONFIG_FLATMEM_MANUAL=y 204CONFIG_FLATMEM_MANUAL=y
200# CONFIG_DISCONTIGMEM_MANUAL is not set 205# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -207,9 +212,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
207# CONFIG_PHYS_ADDR_T_64BIT is not set 212# CONFIG_PHYS_ADDR_T_64BIT is not set
208CONFIG_ZONE_DMA_FLAG=0 213CONFIG_ZONE_DMA_FLAG=0
209CONFIG_NR_QUICK=2 214CONFIG_NR_QUICK=2
210CONFIG_UNEVICTABLE_LRU=y
211CONFIG_HAVE_MLOCK=y 215CONFIG_HAVE_MLOCK=y
212CONFIG_HAVE_MLOCKED_PAGE_BIT=y 216CONFIG_HAVE_MLOCKED_PAGE_BIT=y
217CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
213 218
214# 219#
215# Cache configuration 220# Cache configuration
@@ -239,10 +244,10 @@ CONFIG_SH_7343_SOLUTION_ENGINE=y
239# 244#
240# Timer and clock configuration 245# Timer and clock configuration
241# 246#
242CONFIG_SH_TMU=y 247CONFIG_SH_TIMER_TMU=y
243# CONFIG_SH_TIMER_CMT is not set 248# CONFIG_SH_TIMER_CMT is not set
244CONFIG_SH_TIMER_IRQ=16
245CONFIG_SH_PCLK_FREQ=33333333 249CONFIG_SH_PCLK_FREQ=33333333
250CONFIG_SH_CLK_CPG=y
246# CONFIG_NO_HZ is not set 251# CONFIG_NO_HZ is not set
247# CONFIG_HIGH_RES_TIMERS is not set 252# CONFIG_HIGH_RES_TIMERS is not set
248CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 253CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -283,12 +288,14 @@ CONFIG_PREEMPT_NONE=y
283# CONFIG_PREEMPT_VOLUNTARY is not set 288# CONFIG_PREEMPT_VOLUNTARY is not set
284# CONFIG_PREEMPT is not set 289# CONFIG_PREEMPT is not set
285CONFIG_GUSA=y 290CONFIG_GUSA=y
291# CONFIG_SPARSE_IRQ is not set
286 292
287# 293#
288# Boot options 294# Boot options
289# 295#
290CONFIG_ZERO_PAGE_OFFSET=0x00001000 296CONFIG_ZERO_PAGE_OFFSET=0x00001000
291CONFIG_BOOT_LINK_OFFSET=0x00800000 297CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000
292CONFIG_CMDLINE_BOOL=y 299CONFIG_CMDLINE_BOOL=y
293CONFIG_CMDLINE="console=ttySC0,115200" 300CONFIG_CMDLINE="console=ttySC0,115200"
294 301
@@ -367,6 +374,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
367# CONFIG_ECONET is not set 374# CONFIG_ECONET is not set
368# CONFIG_WAN_ROUTER is not set 375# CONFIG_WAN_ROUTER is not set
369# CONFIG_PHONET is not set 376# CONFIG_PHONET is not set
377# CONFIG_IEEE802154 is not set
370# CONFIG_NET_SCHED is not set 378# CONFIG_NET_SCHED is not set
371# CONFIG_DCB is not set 379# CONFIG_DCB is not set
372 380
@@ -384,7 +392,11 @@ CONFIG_WIRELESS=y
384# CONFIG_WIRELESS_OLD_REGULATORY is not set 392# CONFIG_WIRELESS_OLD_REGULATORY is not set
385# CONFIG_WIRELESS_EXT is not set 393# CONFIG_WIRELESS_EXT is not set
386# CONFIG_LIB80211 is not set 394# CONFIG_LIB80211 is not set
387# CONFIG_MAC80211 is not set 395
396#
397# CFG80211 needs to be enabled for MAC80211
398#
399CONFIG_MAC80211_DEFAULT_PS_VALUE=0
388# CONFIG_WIMAX is not set 400# CONFIG_WIMAX is not set
389# CONFIG_RFKILL is not set 401# CONFIG_RFKILL is not set
390# CONFIG_NET_9P is not set 402# CONFIG_NET_9P is not set
@@ -518,10 +530,6 @@ CONFIG_SCSI_PROC_FS=y
518# CONFIG_BLK_DEV_SR is not set 530# CONFIG_BLK_DEV_SR is not set
519# CONFIG_CHR_DEV_SG is not set 531# CONFIG_CHR_DEV_SG is not set
520# CONFIG_CHR_DEV_SCH is not set 532# CONFIG_CHR_DEV_SCH is not set
521
522#
523# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
524#
525CONFIG_SCSI_MULTI_LUN=y 533CONFIG_SCSI_MULTI_LUN=y
526# CONFIG_SCSI_CONSTANTS is not set 534# CONFIG_SCSI_CONSTANTS is not set
527# CONFIG_SCSI_LOGGING is not set 535# CONFIG_SCSI_LOGGING is not set
@@ -542,7 +550,6 @@ CONFIG_SCSI_WAIT_SCAN=m
542# CONFIG_ATA is not set 550# CONFIG_ATA is not set
543# CONFIG_MD is not set 551# CONFIG_MD is not set
544CONFIG_NETDEVICES=y 552CONFIG_NETDEVICES=y
545CONFIG_COMPAT_NET_DEV_OPS=y
546# CONFIG_DUMMY is not set 553# CONFIG_DUMMY is not set
547# CONFIG_BONDING is not set 554# CONFIG_BONDING is not set
548# CONFIG_MACVLAN is not set 555# CONFIG_MACVLAN is not set
@@ -574,6 +581,7 @@ CONFIG_MII=y
574CONFIG_USB_USBNET=y 581CONFIG_USB_USBNET=y
575# CONFIG_USB_NET_AX8817X is not set 582# CONFIG_USB_NET_AX8817X is not set
576CONFIG_USB_NET_CDCETHER=y 583CONFIG_USB_NET_CDCETHER=y
584# CONFIG_USB_NET_CDC_EEM is not set
577CONFIG_USB_NET_DM9601=y 585CONFIG_USB_NET_DM9601=y
578# CONFIG_USB_NET_SMSC95XX is not set 586# CONFIG_USB_NET_SMSC95XX is not set
579# CONFIG_USB_NET_GL620A is not set 587# CONFIG_USB_NET_GL620A is not set
@@ -583,6 +591,7 @@ CONFIG_USB_NET_DM9601=y
583# CONFIG_USB_NET_RNDIS_HOST is not set 591# CONFIG_USB_NET_RNDIS_HOST is not set
584# CONFIG_USB_NET_CDC_SUBSET is not set 592# CONFIG_USB_NET_CDC_SUBSET is not set
585# CONFIG_USB_NET_ZAURUS is not set 593# CONFIG_USB_NET_ZAURUS is not set
594# CONFIG_USB_NET_INT51X1 is not set
586# CONFIG_WAN is not set 595# CONFIG_WAN is not set
587# CONFIG_PPP is not set 596# CONFIG_PPP is not set
588# CONFIG_SLIP is not set 597# CONFIG_SLIP is not set
@@ -696,7 +705,6 @@ CONFIG_I2C_SH_MOBILE=y
696# CONFIG_SENSORS_PCF8574 is not set 705# CONFIG_SENSORS_PCF8574 is not set
697# CONFIG_PCF8575 is not set 706# CONFIG_PCF8575 is not set
698# CONFIG_SENSORS_PCA9539 is not set 707# CONFIG_SENSORS_PCA9539 is not set
699# CONFIG_SENSORS_MAX6875 is not set
700# CONFIG_SENSORS_TSL2550 is not set 708# CONFIG_SENSORS_TSL2550 is not set
701# CONFIG_I2C_DEBUG_CORE is not set 709# CONFIG_I2C_DEBUG_CORE is not set
702# CONFIG_I2C_DEBUG_ALGO is not set 710# CONFIG_I2C_DEBUG_ALGO is not set
@@ -729,106 +737,7 @@ CONFIG_SSB_POSSIBLE=y
729# CONFIG_MFD_WM8350_I2C is not set 737# CONFIG_MFD_WM8350_I2C is not set
730# CONFIG_MFD_PCF50633 is not set 738# CONFIG_MFD_PCF50633 is not set
731# CONFIG_REGULATOR is not set 739# CONFIG_REGULATOR is not set
732 740# CONFIG_MEDIA_SUPPORT is not set
733#
734# Multimedia devices
735#
736
737#
738# Multimedia core support
739#
740CONFIG_VIDEO_DEV=y
741CONFIG_VIDEO_V4L2_COMMON=y
742CONFIG_VIDEO_ALLOW_V4L1=y
743CONFIG_VIDEO_V4L1_COMPAT=y
744# CONFIG_DVB_CORE is not set
745CONFIG_VIDEO_MEDIA=y
746
747#
748# Multimedia drivers
749#
750# CONFIG_MEDIA_ATTACH is not set
751CONFIG_MEDIA_TUNER=y
752# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
753CONFIG_MEDIA_TUNER_SIMPLE=y
754CONFIG_MEDIA_TUNER_TDA8290=y
755CONFIG_MEDIA_TUNER_TDA9887=y
756CONFIG_MEDIA_TUNER_TEA5761=y
757CONFIG_MEDIA_TUNER_TEA5767=y
758CONFIG_MEDIA_TUNER_MT20XX=y
759CONFIG_MEDIA_TUNER_XC2028=y
760CONFIG_MEDIA_TUNER_XC5000=y
761CONFIG_MEDIA_TUNER_MC44S803=y
762CONFIG_VIDEO_V4L2=y
763CONFIG_VIDEO_V4L1=y
764CONFIG_VIDEO_CAPTURE_DRIVERS=y
765# CONFIG_VIDEO_ADV_DEBUG is not set
766# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
767CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
768# CONFIG_VIDEO_VIVI is not set
769# CONFIG_VIDEO_CPIA is not set
770# CONFIG_VIDEO_CPIA2 is not set
771# CONFIG_VIDEO_SAA5246A is not set
772# CONFIG_VIDEO_SAA5249 is not set
773# CONFIG_SOC_CAMERA is not set
774CONFIG_V4L_USB_DRIVERS=y
775# CONFIG_USB_VIDEO_CLASS is not set
776CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
777CONFIG_USB_GSPCA=m
778# CONFIG_USB_M5602 is not set
779# CONFIG_USB_STV06XX is not set
780# CONFIG_USB_GSPCA_CONEX is not set
781# CONFIG_USB_GSPCA_ETOMS is not set
782# CONFIG_USB_GSPCA_FINEPIX is not set
783# CONFIG_USB_GSPCA_MARS is not set
784# CONFIG_USB_GSPCA_MR97310A is not set
785# CONFIG_USB_GSPCA_OV519 is not set
786# CONFIG_USB_GSPCA_OV534 is not set
787# CONFIG_USB_GSPCA_PAC207 is not set
788# CONFIG_USB_GSPCA_PAC7311 is not set
789# CONFIG_USB_GSPCA_SONIXB is not set
790# CONFIG_USB_GSPCA_SONIXJ is not set
791# CONFIG_USB_GSPCA_SPCA500 is not set
792# CONFIG_USB_GSPCA_SPCA501 is not set
793# CONFIG_USB_GSPCA_SPCA505 is not set
794# CONFIG_USB_GSPCA_SPCA506 is not set
795# CONFIG_USB_GSPCA_SPCA508 is not set
796# CONFIG_USB_GSPCA_SPCA561 is not set
797# CONFIG_USB_GSPCA_SQ905 is not set
798# CONFIG_USB_GSPCA_SQ905C is not set
799# CONFIG_USB_GSPCA_STK014 is not set
800# CONFIG_USB_GSPCA_SUNPLUS is not set
801# CONFIG_USB_GSPCA_T613 is not set
802# CONFIG_USB_GSPCA_TV8532 is not set
803# CONFIG_USB_GSPCA_VC032X is not set
804# CONFIG_USB_GSPCA_ZC3XX is not set
805# CONFIG_VIDEO_PVRUSB2 is not set
806# CONFIG_VIDEO_HDPVR is not set
807# CONFIG_VIDEO_EM28XX is not set
808# CONFIG_VIDEO_CX231XX is not set
809# CONFIG_VIDEO_USBVISION is not set
810# CONFIG_USB_VICAM is not set
811# CONFIG_USB_IBMCAM is not set
812# CONFIG_USB_KONICAWC is not set
813# CONFIG_USB_QUICKCAM_MESSENGER is not set
814# CONFIG_USB_ET61X251 is not set
815# CONFIG_VIDEO_OVCAMCHIP is not set
816# CONFIG_USB_OV511 is not set
817# CONFIG_USB_SE401 is not set
818# CONFIG_USB_SN9C102 is not set
819# CONFIG_USB_STV680 is not set
820# CONFIG_USB_ZC0301 is not set
821# CONFIG_USB_PWC is not set
822CONFIG_USB_PWC_INPUT_EVDEV=y
823# CONFIG_USB_ZR364XX is not set
824# CONFIG_USB_STKWEBCAM is not set
825# CONFIG_USB_S2255 is not set
826CONFIG_RADIO_ADAPTERS=y
827# CONFIG_USB_DSBR is not set
828# CONFIG_USB_SI470X is not set
829# CONFIG_USB_MR800 is not set
830# CONFIG_RADIO_TEA5764 is not set
831# CONFIG_DAB is not set
832 741
833# 742#
834# Graphics support 743# Graphics support
@@ -894,6 +803,11 @@ CONFIG_SND_SUPPORT_OLD_API=y
894CONFIG_SND_VERBOSE_PROCFS=y 803CONFIG_SND_VERBOSE_PROCFS=y
895# CONFIG_SND_VERBOSE_PRINTK is not set 804# CONFIG_SND_VERBOSE_PRINTK is not set
896# CONFIG_SND_DEBUG is not set 805# CONFIG_SND_DEBUG is not set
806# CONFIG_SND_RAWMIDI_SEQ is not set
807# CONFIG_SND_OPL3_LIB_SEQ is not set
808# CONFIG_SND_OPL4_LIB_SEQ is not set
809# CONFIG_SND_SBAWE_SEQ is not set
810# CONFIG_SND_EMU10K1_SEQ is not set
897CONFIG_SND_DRIVERS=y 811CONFIG_SND_DRIVERS=y
898# CONFIG_SND_DUMMY is not set 812# CONFIG_SND_DUMMY is not set
899# CONFIG_SND_VIRMIDI is not set 813# CONFIG_SND_VIRMIDI is not set
@@ -927,7 +841,7 @@ CONFIG_HID_BELKIN=y
927CONFIG_HID_CHERRY=y 841CONFIG_HID_CHERRY=y
928CONFIG_HID_CHICONY=y 842CONFIG_HID_CHICONY=y
929CONFIG_HID_CYPRESS=y 843CONFIG_HID_CYPRESS=y
930# CONFIG_DRAGONRISE_FF is not set 844# CONFIG_HID_DRAGONRISE is not set
931CONFIG_HID_EZKEY=y 845CONFIG_HID_EZKEY=y
932# CONFIG_HID_KYE is not set 846# CONFIG_HID_KYE is not set
933CONFIG_HID_GYRATION=y 847CONFIG_HID_GYRATION=y
@@ -944,10 +858,11 @@ CONFIG_HID_PETALYNX=y
944CONFIG_HID_SAMSUNG=y 858CONFIG_HID_SAMSUNG=y
945CONFIG_HID_SONY=y 859CONFIG_HID_SONY=y
946CONFIG_HID_SUNPLUS=y 860CONFIG_HID_SUNPLUS=y
947# CONFIG_GREENASIA_FF is not set 861# CONFIG_HID_GREENASIA is not set
862# CONFIG_HID_SMARTJOYPLUS is not set
948# CONFIG_HID_TOPSEED is not set 863# CONFIG_HID_TOPSEED is not set
949# CONFIG_THRUSTMASTER_FF is not set 864# CONFIG_HID_THRUSTMASTER is not set
950# CONFIG_ZEROPLUS_FF is not set 865# CONFIG_HID_ZEROPLUS is not set
951CONFIG_USB_SUPPORT=y 866CONFIG_USB_SUPPORT=y
952CONFIG_USB_ARCH_HAS_HCD=y 867CONFIG_USB_ARCH_HAS_HCD=y
953# CONFIG_USB_ARCH_HAS_OHCI is not set 868# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -1042,6 +957,7 @@ CONFIG_USB_ISP116X_HCD=y
1042# CONFIG_MEMSTICK is not set 957# CONFIG_MEMSTICK is not set
1043# CONFIG_NEW_LEDS is not set 958# CONFIG_NEW_LEDS is not set
1044# CONFIG_ACCESSIBILITY is not set 959# CONFIG_ACCESSIBILITY is not set
960CONFIG_RTC_LIB=y
1045# CONFIG_RTC_CLASS is not set 961# CONFIG_RTC_CLASS is not set
1046# CONFIG_DMADEVICES is not set 962# CONFIG_DMADEVICES is not set
1047# CONFIG_AUXDISPLAY is not set 963# CONFIG_AUXDISPLAY is not set
@@ -1050,6 +966,10 @@ CONFIG_UIO=y
1050# CONFIG_UIO_PDRV_GENIRQ is not set 966# CONFIG_UIO_PDRV_GENIRQ is not set
1051# CONFIG_UIO_SMX is not set 967# CONFIG_UIO_SMX is not set
1052# CONFIG_UIO_SERCOS3 is not set 968# CONFIG_UIO_SERCOS3 is not set
969
970#
971# TI VLYNQ
972#
1053# CONFIG_STAGING is not set 973# CONFIG_STAGING is not set
1054 974
1055# 975#
@@ -1069,12 +989,14 @@ CONFIG_FS_MBCACHE=y
1069# CONFIG_REISERFS_FS is not set 989# CONFIG_REISERFS_FS is not set
1070# CONFIG_JFS_FS is not set 990# CONFIG_JFS_FS is not set
1071# CONFIG_FS_POSIX_ACL is not set 991# CONFIG_FS_POSIX_ACL is not set
1072CONFIG_FILE_LOCKING=y
1073# CONFIG_XFS_FS is not set 992# CONFIG_XFS_FS is not set
1074# CONFIG_OCFS2_FS is not set 993# CONFIG_OCFS2_FS is not set
1075# CONFIG_BTRFS_FS is not set 994# CONFIG_BTRFS_FS is not set
995CONFIG_FILE_LOCKING=y
996CONFIG_FSNOTIFY=y
1076# CONFIG_DNOTIFY is not set 997# CONFIG_DNOTIFY is not set
1077# CONFIG_INOTIFY is not set 998# CONFIG_INOTIFY is not set
999CONFIG_INOTIFY_USER=y
1078# CONFIG_QUOTA is not set 1000# CONFIG_QUOTA is not set
1079# CONFIG_AUTOFS_FS is not set 1001# CONFIG_AUTOFS_FS is not set
1080# CONFIG_AUTOFS4_FS is not set 1002# CONFIG_AUTOFS4_FS is not set
@@ -1167,7 +1089,46 @@ CONFIG_SUNRPC=y
1167# 1089#
1168# CONFIG_PARTITION_ADVANCED is not set 1090# CONFIG_PARTITION_ADVANCED is not set
1169CONFIG_MSDOS_PARTITION=y 1091CONFIG_MSDOS_PARTITION=y
1170# CONFIG_NLS is not set 1092CONFIG_NLS=y
1093CONFIG_NLS_DEFAULT="iso8859-1"
1094# CONFIG_NLS_CODEPAGE_437 is not set
1095# CONFIG_NLS_CODEPAGE_737 is not set
1096# CONFIG_NLS_CODEPAGE_775 is not set
1097# CONFIG_NLS_CODEPAGE_850 is not set
1098# CONFIG_NLS_CODEPAGE_852 is not set
1099# CONFIG_NLS_CODEPAGE_855 is not set
1100# CONFIG_NLS_CODEPAGE_857 is not set
1101# CONFIG_NLS_CODEPAGE_860 is not set
1102# CONFIG_NLS_CODEPAGE_861 is not set
1103# CONFIG_NLS_CODEPAGE_862 is not set
1104# CONFIG_NLS_CODEPAGE_863 is not set
1105# CONFIG_NLS_CODEPAGE_864 is not set
1106# CONFIG_NLS_CODEPAGE_865 is not set
1107# CONFIG_NLS_CODEPAGE_866 is not set
1108# CONFIG_NLS_CODEPAGE_869 is not set
1109# CONFIG_NLS_CODEPAGE_936 is not set
1110# CONFIG_NLS_CODEPAGE_950 is not set
1111# CONFIG_NLS_CODEPAGE_932 is not set
1112# CONFIG_NLS_CODEPAGE_949 is not set
1113# CONFIG_NLS_CODEPAGE_874 is not set
1114# CONFIG_NLS_ISO8859_8 is not set
1115# CONFIG_NLS_CODEPAGE_1250 is not set
1116# CONFIG_NLS_CODEPAGE_1251 is not set
1117# CONFIG_NLS_ASCII is not set
1118# CONFIG_NLS_ISO8859_1 is not set
1119# CONFIG_NLS_ISO8859_2 is not set
1120# CONFIG_NLS_ISO8859_3 is not set
1121# CONFIG_NLS_ISO8859_4 is not set
1122# CONFIG_NLS_ISO8859_5 is not set
1123# CONFIG_NLS_ISO8859_6 is not set
1124# CONFIG_NLS_ISO8859_7 is not set
1125# CONFIG_NLS_ISO8859_9 is not set
1126# CONFIG_NLS_ISO8859_13 is not set
1127# CONFIG_NLS_ISO8859_14 is not set
1128# CONFIG_NLS_ISO8859_15 is not set
1129# CONFIG_NLS_KOI8_R is not set
1130# CONFIG_NLS_KOI8_U is not set
1131# CONFIG_NLS_UTF8 is not set
1171# CONFIG_DLM is not set 1132# CONFIG_DLM is not set
1172 1133
1173# 1134#
@@ -1191,21 +1152,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1191CONFIG_HAVE_DYNAMIC_FTRACE=y 1152CONFIG_HAVE_DYNAMIC_FTRACE=y
1192CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1153CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1193CONFIG_TRACING_SUPPORT=y 1154CONFIG_TRACING_SUPPORT=y
1194 1155# CONFIG_FTRACE is not set
1195#
1196# Tracers
1197#
1198# CONFIG_FUNCTION_TRACER is not set
1199# CONFIG_IRQSOFF_TRACER is not set
1200# CONFIG_SCHED_TRACER is not set
1201# CONFIG_CONTEXT_SWITCH_TRACER is not set
1202# CONFIG_EVENT_TRACER is not set
1203# CONFIG_BOOT_TRACER is not set
1204# CONFIG_TRACE_BRANCH_PROFILING is not set
1205# CONFIG_STACK_TRACER is not set
1206# CONFIG_KMEMTRACE is not set
1207# CONFIG_WORKQUEUE_TRACER is not set
1208# CONFIG_BLK_DEV_IO_TRACE is not set
1209# CONFIG_DMA_API_DEBUG is not set 1156# CONFIG_DMA_API_DEBUG is not set
1210# CONFIG_SAMPLES is not set 1157# CONFIG_SAMPLES is not set
1211CONFIG_HAVE_ARCH_KGDB=y 1158CONFIG_HAVE_ARCH_KGDB=y
@@ -1213,7 +1160,6 @@ CONFIG_HAVE_ARCH_KGDB=y
1213CONFIG_EARLY_SCIF_CONSOLE=y 1160CONFIG_EARLY_SCIF_CONSOLE=y
1214CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000 1161CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe00000
1215CONFIG_EARLY_PRINTK=y 1162CONFIG_EARLY_PRINTK=y
1216# CONFIG_MORE_COMPILE_OPTIONS is not set
1217 1163
1218# 1164#
1219# Security options 1165# Security options
@@ -1328,3 +1274,4 @@ CONFIG_HAS_IOMEM=y
1328CONFIG_HAS_IOPORT=y 1274CONFIG_HAS_IOPORT=y
1329CONFIG_HAS_DMA=y 1275CONFIG_HAS_DMA=y
1330CONFIG_NLATTR=y 1276CONFIG_NLATTR=y
1277CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig
index edbece52afc1..724bb77c9dc9 100644
--- a/arch/sh/configs/se7619_defconfig
+++ b/arch/sh/configs/se7619_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:02:32 2009 4# Thu Jun 18 12:47:56 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -15,8 +15,8 @@ CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 15CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
18# CONFIG_GENERIC_TIME is not set 18CONFIG_GENERIC_TIME=y
19# CONFIG_GENERIC_CLOCKEVENTS is not set 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set 21# CONFIG_ARCH_HIBERNATION_POSSIBLE is not set
22CONFIG_SYS_SUPPORTS_CMT=y 22CONFIG_SYS_SUPPORTS_CMT=y
@@ -62,7 +62,6 @@ CONFIG_EMBEDDED=y
62# CONFIG_UID16 is not set 62# CONFIG_UID16 is not set
63# CONFIG_SYSCTL_SYSCALL is not set 63# CONFIG_SYSCTL_SYSCALL is not set
64# CONFIG_KALLSYMS is not set 64# CONFIG_KALLSYMS is not set
65# CONFIG_STRIP_ASM_SYMS is not set
66# CONFIG_HOTPLUG is not set 65# CONFIG_HOTPLUG is not set
67CONFIG_PRINTK=y 66CONFIG_PRINTK=y
68CONFIG_BUG=y 67CONFIG_BUG=y
@@ -74,7 +73,12 @@ CONFIG_SIGNALFD=y
74CONFIG_TIMERFD=y 73CONFIG_TIMERFD=y
75CONFIG_EVENTFD=y 74CONFIG_EVENTFD=y
76CONFIG_AIO=y 75CONFIG_AIO=y
76
77#
78# Performance Counters
79#
77# CONFIG_VM_EVENT_COUNTERS is not set 80# CONFIG_VM_EVENT_COUNTERS is not set
81# CONFIG_STRIP_ASM_SYMS is not set
78CONFIG_COMPAT_BRK=y 82CONFIG_COMPAT_BRK=y
79CONFIG_SLAB=y 83CONFIG_SLAB=y
80# CONFIG_SLUB is not set 84# CONFIG_SLUB is not set
@@ -155,6 +159,7 @@ CONFIG_CPU_SUBTYPE_SH7619=y
155# 159#
156CONFIG_QUICKLIST=y 160CONFIG_QUICKLIST=y
157CONFIG_PAGE_OFFSET=0x00000000 161CONFIG_PAGE_OFFSET=0x00000000
162CONFIG_FORCE_MAX_ZONEORDER=14
158CONFIG_MEMORY_START=0x0c000000 163CONFIG_MEMORY_START=0x0c000000
159CONFIG_MEMORY_SIZE=0x04000000 164CONFIG_MEMORY_SIZE=0x04000000
160CONFIG_29BIT=y 165CONFIG_29BIT=y
@@ -168,7 +173,6 @@ CONFIG_PAGE_SIZE_4KB=y
168# CONFIG_PAGE_SIZE_8KB is not set 173# CONFIG_PAGE_SIZE_8KB is not set
169# CONFIG_PAGE_SIZE_16KB is not set 174# CONFIG_PAGE_SIZE_16KB is not set
170# CONFIG_PAGE_SIZE_64KB is not set 175# CONFIG_PAGE_SIZE_64KB is not set
171CONFIG_ENTRY_OFFSET=0x00001000
172CONFIG_SELECT_MEMORY_MODEL=y 176CONFIG_SELECT_MEMORY_MODEL=y
173CONFIG_FLATMEM_MANUAL=y 177CONFIG_FLATMEM_MANUAL=y
174# CONFIG_DISCONTIGMEM_MANUAL is not set 178# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -181,7 +185,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
181# CONFIG_PHYS_ADDR_T_64BIT is not set 185# CONFIG_PHYS_ADDR_T_64BIT is not set
182CONFIG_ZONE_DMA_FLAG=0 186CONFIG_ZONE_DMA_FLAG=0
183CONFIG_NR_QUICK=2 187CONFIG_NR_QUICK=2
184CONFIG_UNEVICTABLE_LRU=y 188CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
189CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
185 190
186# 191#
187# Cache configuration 192# Cache configuration
@@ -206,10 +211,14 @@ CONFIG_SH_7619_SOLUTION_ENGINE=y
206# 211#
207# Timer and clock configuration 212# Timer and clock configuration
208# 213#
209CONFIG_SH_CMT=y 214CONFIG_SH_TIMER_CMT=y
210CONFIG_SH_TIMER_IRQ=86
211CONFIG_SH_PCLK_FREQ=31250000 215CONFIG_SH_PCLK_FREQ=31250000
216CONFIG_SH_CLK_CPG=y
217CONFIG_SH_CLK_CPG_LEGACY=y
212CONFIG_SH_CLK_MD=5 218CONFIG_SH_CLK_MD=5
219# CONFIG_NO_HZ is not set
220# CONFIG_HIGH_RES_TIMERS is not set
221CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
213 222
214# 223#
215# CPU Frequency scaling 224# CPU Frequency scaling
@@ -245,12 +254,14 @@ CONFIG_PREEMPT_NONE=y
245# CONFIG_PREEMPT_VOLUNTARY is not set 254# CONFIG_PREEMPT_VOLUNTARY is not set
246# CONFIG_PREEMPT is not set 255# CONFIG_PREEMPT is not set
247CONFIG_GUSA=y 256CONFIG_GUSA=y
257# CONFIG_SPARSE_IRQ is not set
248 258
249# 259#
250# Boot options 260# Boot options
251# 261#
252CONFIG_ZERO_PAGE_OFFSET=0x00001000 262CONFIG_ZERO_PAGE_OFFSET=0x00001000
253CONFIG_BOOT_LINK_OFFSET=0x00800000 263CONFIG_BOOT_LINK_OFFSET=0x00800000
264CONFIG_ENTRY_OFFSET=0x00001000
254# CONFIG_CMDLINE_BOOL is not set 265# CONFIG_CMDLINE_BOOL is not set
255 266
256# 267#
@@ -479,21 +490,7 @@ CONFIG_SSB_POSSIBLE=y
479# CONFIG_HTC_PASIC3 is not set 490# CONFIG_HTC_PASIC3 is not set
480# CONFIG_MFD_TMIO is not set 491# CONFIG_MFD_TMIO is not set
481# CONFIG_REGULATOR is not set 492# CONFIG_REGULATOR is not set
482 493# CONFIG_MEDIA_SUPPORT is not set
483#
484# Multimedia devices
485#
486
487#
488# Multimedia core support
489#
490# CONFIG_VIDEO_DEV is not set
491# CONFIG_VIDEO_MEDIA is not set
492
493#
494# Multimedia drivers
495#
496CONFIG_DAB=y
497 494
498# 495#
499# Graphics support 496# Graphics support
@@ -541,10 +538,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
541# CONFIG_MEMSTICK is not set 538# CONFIG_MEMSTICK is not set
542# CONFIG_NEW_LEDS is not set 539# CONFIG_NEW_LEDS is not set
543# CONFIG_ACCESSIBILITY is not set 540# CONFIG_ACCESSIBILITY is not set
541CONFIG_RTC_LIB=y
544# CONFIG_RTC_CLASS is not set 542# CONFIG_RTC_CLASS is not set
545# CONFIG_DMADEVICES is not set 543# CONFIG_DMADEVICES is not set
546# CONFIG_AUXDISPLAY is not set 544# CONFIG_AUXDISPLAY is not set
547# CONFIG_UIO is not set 545# CONFIG_UIO is not set
546
547#
548# TI VLYNQ
549#
548# CONFIG_STAGING is not set 550# CONFIG_STAGING is not set
549 551
550# 552#
@@ -556,11 +558,13 @@ CONFIG_USB_ARCH_HAS_HCD=y
556# CONFIG_REISERFS_FS is not set 558# CONFIG_REISERFS_FS is not set
557# CONFIG_JFS_FS is not set 559# CONFIG_JFS_FS is not set
558# CONFIG_FS_POSIX_ACL is not set 560# CONFIG_FS_POSIX_ACL is not set
559CONFIG_FILE_LOCKING=y
560# CONFIG_XFS_FS is not set 561# CONFIG_XFS_FS is not set
561# CONFIG_BTRFS_FS is not set 562# CONFIG_BTRFS_FS is not set
563CONFIG_FILE_LOCKING=y
564CONFIG_FSNOTIFY=y
562# CONFIG_DNOTIFY is not set 565# CONFIG_DNOTIFY is not set
563# CONFIG_INOTIFY is not set 566# CONFIG_INOTIFY is not set
567CONFIG_INOTIFY_USER=y
564# CONFIG_QUOTA is not set 568# CONFIG_QUOTA is not set
565# CONFIG_AUTOFS_FS is not set 569# CONFIG_AUTOFS_FS is not set
566# CONFIG_AUTOFS4_FS is not set 570# CONFIG_AUTOFS4_FS is not set
@@ -644,25 +648,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
644CONFIG_HAVE_DYNAMIC_FTRACE=y 648CONFIG_HAVE_DYNAMIC_FTRACE=y
645CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 649CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
646CONFIG_TRACING_SUPPORT=y 650CONFIG_TRACING_SUPPORT=y
647 651# CONFIG_FTRACE is not set
648#
649# Tracers
650#
651# CONFIG_FUNCTION_TRACER is not set
652# CONFIG_SCHED_TRACER is not set
653# CONFIG_CONTEXT_SWITCH_TRACER is not set
654# CONFIG_EVENT_TRACER is not set
655# CONFIG_BOOT_TRACER is not set
656# CONFIG_TRACE_BRANCH_PROFILING is not set
657# CONFIG_STACK_TRACER is not set
658# CONFIG_KMEMTRACE is not set
659# CONFIG_WORKQUEUE_TRACER is not set
660# CONFIG_DMA_API_DEBUG is not set 652# CONFIG_DMA_API_DEBUG is not set
661# CONFIG_SAMPLES is not set 653# CONFIG_SAMPLES is not set
662CONFIG_HAVE_ARCH_KGDB=y 654CONFIG_HAVE_ARCH_KGDB=y
663# CONFIG_SH_STANDARD_BIOS is not set 655# CONFIG_SH_STANDARD_BIOS is not set
664# CONFIG_EARLY_SCIF_CONSOLE is not set 656# CONFIG_EARLY_SCIF_CONSOLE is not set
665# CONFIG_MORE_COMPILE_OPTIONS is not set
666 657
667# 658#
668# Security options 659# Security options
@@ -689,3 +680,4 @@ CONFIG_ZLIB_INFLATE=y
689CONFIG_HAS_IOMEM=y 680CONFIG_HAS_IOMEM=y
690CONFIG_HAS_IOPORT=y 681CONFIG_HAS_IOPORT=y
691CONFIG_HAS_DMA=y 682CONFIG_HAS_DMA=y
683CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7705_defconfig b/arch/sh/configs/se7705_defconfig
index bae161c66835..6ca6a2fc06e9 100644
--- a/arch/sh/configs/se7705_defconfig
+++ b/arch/sh/configs/se7705_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:02:52 2009 4# Thu Jun 18 12:48:18 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -70,7 +71,6 @@ CONFIG_EMBEDDED=y
70CONFIG_UID16=y 71CONFIG_UID16=y
71# CONFIG_SYSCTL_SYSCALL is not set 72# CONFIG_SYSCTL_SYSCALL is not set
72# CONFIG_KALLSYMS is not set 73# CONFIG_KALLSYMS is not set
73# CONFIG_STRIP_ASM_SYMS is not set
74# CONFIG_HOTPLUG is not set 74# CONFIG_HOTPLUG is not set
75CONFIG_PRINTK=y 75CONFIG_PRINTK=y
76CONFIG_BUG=y 76CONFIG_BUG=y
@@ -83,7 +83,12 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y 85CONFIG_AIO=y
86
87#
88# Performance Counters
89#
86CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
91# CONFIG_STRIP_ASM_SYMS is not set
87CONFIG_COMPAT_BRK=y 92CONFIG_COMPAT_BRK=y
88CONFIG_SLAB=y 93CONFIG_SLAB=y
89# CONFIG_SLUB is not set 94# CONFIG_SLUB is not set
@@ -171,6 +176,7 @@ CONFIG_CPU_SUBTYPE_SH7705=y
171CONFIG_QUICKLIST=y 176CONFIG_QUICKLIST=y
172CONFIG_MMU=y 177CONFIG_MMU=y
173CONFIG_PAGE_OFFSET=0x80000000 178CONFIG_PAGE_OFFSET=0x80000000
179CONFIG_FORCE_MAX_ZONEORDER=11
174CONFIG_MEMORY_START=0x0c000000 180CONFIG_MEMORY_START=0x0c000000
175CONFIG_MEMORY_SIZE=0x02000000 181CONFIG_MEMORY_SIZE=0x02000000
176CONFIG_29BIT=y 182CONFIG_29BIT=y
@@ -185,7 +191,6 @@ CONFIG_PAGE_SIZE_4KB=y
185# CONFIG_PAGE_SIZE_8KB is not set 191# CONFIG_PAGE_SIZE_8KB is not set
186# CONFIG_PAGE_SIZE_16KB is not set 192# CONFIG_PAGE_SIZE_16KB is not set
187# CONFIG_PAGE_SIZE_64KB is not set 193# CONFIG_PAGE_SIZE_64KB is not set
188CONFIG_ENTRY_OFFSET=0x00001000
189CONFIG_SELECT_MEMORY_MODEL=y 194CONFIG_SELECT_MEMORY_MODEL=y
190CONFIG_FLATMEM_MANUAL=y 195CONFIG_FLATMEM_MANUAL=y
191# CONFIG_DISCONTIGMEM_MANUAL is not set 196# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -198,9 +203,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
198# CONFIG_PHYS_ADDR_T_64BIT is not set 203# CONFIG_PHYS_ADDR_T_64BIT is not set
199CONFIG_ZONE_DMA_FLAG=0 204CONFIG_ZONE_DMA_FLAG=0
200CONFIG_NR_QUICK=2 205CONFIG_NR_QUICK=2
201CONFIG_UNEVICTABLE_LRU=y
202CONFIG_HAVE_MLOCK=y 206CONFIG_HAVE_MLOCK=y
203CONFIG_HAVE_MLOCKED_PAGE_BIT=y 207CONFIG_HAVE_MLOCKED_PAGE_BIT=y
208CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
204 209
205# 210#
206# Cache configuration 211# Cache configuration
@@ -231,9 +236,10 @@ CONFIG_SH_SOLUTION_ENGINE=y
231# 236#
232# Timer and clock configuration 237# Timer and clock configuration
233# 238#
234CONFIG_SH_TMU=y 239CONFIG_SH_TIMER_TMU=y
235CONFIG_SH_TIMER_IRQ=16
236CONFIG_SH_PCLK_FREQ=33333333 240CONFIG_SH_PCLK_FREQ=33333333
241CONFIG_SH_CLK_CPG=y
242CONFIG_SH_CLK_CPG_LEGACY=y
237# CONFIG_NO_HZ is not set 243# CONFIG_NO_HZ is not set
238# CONFIG_HIGH_RES_TIMERS is not set 244# CONFIG_HIGH_RES_TIMERS is not set
239CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 245CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -275,12 +281,14 @@ CONFIG_HZ=250
275CONFIG_PREEMPT=y 281CONFIG_PREEMPT=y
276CONFIG_GUSA=y 282CONFIG_GUSA=y
277# CONFIG_GUSA_RB is not set 283# CONFIG_GUSA_RB is not set
284# CONFIG_SPARSE_IRQ is not set
278 285
279# 286#
280# Boot options 287# Boot options
281# 288#
282CONFIG_ZERO_PAGE_OFFSET=0x00001000 289CONFIG_ZERO_PAGE_OFFSET=0x00001000
283CONFIG_BOOT_LINK_OFFSET=0x00800000 290CONFIG_BOOT_LINK_OFFSET=0x00800000
291CONFIG_ENTRY_OFFSET=0x00001000
284# CONFIG_CMDLINE_BOOL is not set 292# CONFIG_CMDLINE_BOOL is not set
285 293
286# 294#
@@ -361,6 +369,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
361# CONFIG_ECONET is not set 369# CONFIG_ECONET is not set
362# CONFIG_WAN_ROUTER is not set 370# CONFIG_WAN_ROUTER is not set
363# CONFIG_PHONET is not set 371# CONFIG_PHONET is not set
372# CONFIG_IEEE802154 is not set
364# CONFIG_NET_SCHED is not set 373# CONFIG_NET_SCHED is not set
365# CONFIG_DCB is not set 374# CONFIG_DCB is not set
366 375
@@ -378,7 +387,11 @@ CONFIG_WIRELESS=y
378# CONFIG_WIRELESS_OLD_REGULATORY is not set 387# CONFIG_WIRELESS_OLD_REGULATORY is not set
379# CONFIG_WIRELESS_EXT is not set 388# CONFIG_WIRELESS_EXT is not set
380# CONFIG_LIB80211 is not set 389# CONFIG_LIB80211 is not set
381# CONFIG_MAC80211 is not set 390
391#
392# CFG80211 needs to be enabled for MAC80211
393#
394CONFIG_MAC80211_DEFAULT_PS_VALUE=0
382# CONFIG_WIMAX is not set 395# CONFIG_WIMAX is not set
383# CONFIG_RFKILL is not set 396# CONFIG_RFKILL is not set
384# CONFIG_NET_9P is not set 397# CONFIG_NET_9P is not set
@@ -507,7 +520,6 @@ CONFIG_HAVE_IDE=y
507# CONFIG_ATA is not set 520# CONFIG_ATA is not set
508# CONFIG_MD is not set 521# CONFIG_MD is not set
509CONFIG_NETDEVICES=y 522CONFIG_NETDEVICES=y
510CONFIG_COMPAT_NET_DEV_OPS=y
511# CONFIG_DUMMY is not set 523# CONFIG_DUMMY is not set
512# CONFIG_BONDING is not set 524# CONFIG_BONDING is not set
513# CONFIG_MACVLAN is not set 525# CONFIG_MACVLAN is not set
@@ -532,6 +544,7 @@ CONFIG_STNIC=y
532# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 544# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
533# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 545# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
534# CONFIG_B44 is not set 546# CONFIG_B44 is not set
547# CONFIG_KS8842 is not set
535CONFIG_NETDEV_1000=y 548CONFIG_NETDEV_1000=y
536CONFIG_NETDEV_10000=y 549CONFIG_NETDEV_10000=y
537 550
@@ -662,22 +675,7 @@ CONFIG_SSB_POSSIBLE=y
662# CONFIG_HTC_PASIC3 is not set 675# CONFIG_HTC_PASIC3 is not set
663# CONFIG_MFD_TMIO is not set 676# CONFIG_MFD_TMIO is not set
664# CONFIG_REGULATOR is not set 677# CONFIG_REGULATOR is not set
665 678# CONFIG_MEDIA_SUPPORT is not set
666#
667# Multimedia devices
668#
669
670#
671# Multimedia core support
672#
673# CONFIG_VIDEO_DEV is not set
674# CONFIG_DVB_CORE is not set
675# CONFIG_VIDEO_MEDIA is not set
676
677#
678# Multimedia drivers
679#
680# CONFIG_DAB is not set
681 679
682# 680#
683# Graphics support 681# Graphics support
@@ -725,10 +723,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
725# CONFIG_MEMSTICK is not set 723# CONFIG_MEMSTICK is not set
726# CONFIG_NEW_LEDS is not set 724# CONFIG_NEW_LEDS is not set
727# CONFIG_ACCESSIBILITY is not set 725# CONFIG_ACCESSIBILITY is not set
726CONFIG_RTC_LIB=y
728# CONFIG_RTC_CLASS is not set 727# CONFIG_RTC_CLASS is not set
729# CONFIG_DMADEVICES is not set 728# CONFIG_DMADEVICES is not set
730# CONFIG_AUXDISPLAY is not set 729# CONFIG_AUXDISPLAY is not set
731# CONFIG_UIO is not set 730# CONFIG_UIO is not set
731
732#
733# TI VLYNQ
734#
732# CONFIG_STAGING is not set 735# CONFIG_STAGING is not set
733 736
734# 737#
@@ -742,9 +745,10 @@ CONFIG_EXT2_FS=y
742# CONFIG_REISERFS_FS is not set 745# CONFIG_REISERFS_FS is not set
743# CONFIG_JFS_FS is not set 746# CONFIG_JFS_FS is not set
744# CONFIG_FS_POSIX_ACL is not set 747# CONFIG_FS_POSIX_ACL is not set
745CONFIG_FILE_LOCKING=y
746# CONFIG_XFS_FS is not set 748# CONFIG_XFS_FS is not set
747# CONFIG_BTRFS_FS is not set 749# CONFIG_BTRFS_FS is not set
750CONFIG_FILE_LOCKING=y
751CONFIG_FSNOTIFY=y
748CONFIG_DNOTIFY=y 752CONFIG_DNOTIFY=y
749CONFIG_INOTIFY=y 753CONFIG_INOTIFY=y
750CONFIG_INOTIFY_USER=y 754CONFIG_INOTIFY_USER=y
@@ -856,27 +860,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
856CONFIG_HAVE_DYNAMIC_FTRACE=y 860CONFIG_HAVE_DYNAMIC_FTRACE=y
857CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 861CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
858CONFIG_TRACING_SUPPORT=y 862CONFIG_TRACING_SUPPORT=y
859 863# CONFIG_FTRACE is not set
860#
861# Tracers
862#
863# CONFIG_FUNCTION_TRACER is not set
864# CONFIG_IRQSOFF_TRACER is not set
865# CONFIG_PREEMPT_TRACER is not set
866# CONFIG_SCHED_TRACER is not set
867# CONFIG_CONTEXT_SWITCH_TRACER is not set
868# CONFIG_EVENT_TRACER is not set
869# CONFIG_BOOT_TRACER is not set
870# CONFIG_TRACE_BRANCH_PROFILING is not set
871# CONFIG_STACK_TRACER is not set
872# CONFIG_KMEMTRACE is not set
873# CONFIG_WORKQUEUE_TRACER is not set
874# CONFIG_DMA_API_DEBUG is not set 864# CONFIG_DMA_API_DEBUG is not set
875# CONFIG_SAMPLES is not set 865# CONFIG_SAMPLES is not set
876CONFIG_HAVE_ARCH_KGDB=y 866CONFIG_HAVE_ARCH_KGDB=y
877# CONFIG_SH_STANDARD_BIOS is not set 867# CONFIG_SH_STANDARD_BIOS is not set
878# CONFIG_EARLY_SCIF_CONSOLE is not set 868# CONFIG_EARLY_SCIF_CONSOLE is not set
879# CONFIG_MORE_COMPILE_OPTIONS is not set
880 869
881# 870#
882# Security options 871# Security options
@@ -991,3 +980,4 @@ CONFIG_HAS_IOMEM=y
991CONFIG_HAS_IOPORT=y 980CONFIG_HAS_IOPORT=y
992CONFIG_HAS_DMA=y 981CONFIG_HAS_DMA=y
993CONFIG_NLATTR=y 982CONFIG_NLATTR=y
983CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7712_defconfig b/arch/sh/configs/se7712_defconfig
index 330043f3c316..b8aae11bc8fa 100644
--- a/arch/sh/configs/se7712_defconfig
+++ b/arch/sh/configs/se7712_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:03:27 2009 4# Thu Jun 18 12:49:00 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,6 +18,7 @@ CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20CONFIG_ARCH_HIBERNATION_POSSIBLE=y 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_TMU=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -71,7 +72,6 @@ CONFIG_SYSCTL_SYSCALL=y
71CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
72CONFIG_KALLSYMS_ALL=y 73CONFIG_KALLSYMS_ALL=y
73# CONFIG_KALLSYMS_EXTRA_PASS is not set 74# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y 75CONFIG_HOTPLUG=y
76CONFIG_PRINTK=y 76CONFIG_PRINTK=y
77# CONFIG_BUG is not set 77# CONFIG_BUG is not set
@@ -84,7 +84,12 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85# CONFIG_SHMEM is not set 85# CONFIG_SHMEM is not set
86CONFIG_AIO=y 86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
87CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
88CONFIG_COMPAT_BRK=y 93CONFIG_COMPAT_BRK=y
89CONFIG_SLAB=y 94CONFIG_SLAB=y
90# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
@@ -173,6 +178,7 @@ CONFIG_CPU_SUBTYPE_SH7712=y
173CONFIG_QUICKLIST=y 178CONFIG_QUICKLIST=y
174CONFIG_MMU=y 179CONFIG_MMU=y
175CONFIG_PAGE_OFFSET=0x80000000 180CONFIG_PAGE_OFFSET=0x80000000
181CONFIG_FORCE_MAX_ZONEORDER=11
176CONFIG_MEMORY_START=0x0c000000 182CONFIG_MEMORY_START=0x0c000000
177CONFIG_MEMORY_SIZE=0x02000000 183CONFIG_MEMORY_SIZE=0x02000000
178CONFIG_29BIT=y 184CONFIG_29BIT=y
@@ -187,7 +193,6 @@ CONFIG_PAGE_SIZE_4KB=y
187# CONFIG_PAGE_SIZE_8KB is not set 193# CONFIG_PAGE_SIZE_8KB is not set
188# CONFIG_PAGE_SIZE_16KB is not set 194# CONFIG_PAGE_SIZE_16KB is not set
189# CONFIG_PAGE_SIZE_64KB is not set 195# CONFIG_PAGE_SIZE_64KB is not set
190CONFIG_ENTRY_OFFSET=0x00001000
191CONFIG_SELECT_MEMORY_MODEL=y 196CONFIG_SELECT_MEMORY_MODEL=y
192CONFIG_FLATMEM_MANUAL=y 197CONFIG_FLATMEM_MANUAL=y
193# CONFIG_DISCONTIGMEM_MANUAL is not set 198# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -200,9 +205,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_PHYS_ADDR_T_64BIT is not set 205# CONFIG_PHYS_ADDR_T_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=0 206CONFIG_ZONE_DMA_FLAG=0
202CONFIG_NR_QUICK=2 207CONFIG_NR_QUICK=2
203CONFIG_UNEVICTABLE_LRU=y
204CONFIG_HAVE_MLOCK=y 208CONFIG_HAVE_MLOCK=y
205CONFIG_HAVE_MLOCKED_PAGE_BIT=y 209CONFIG_HAVE_MLOCKED_PAGE_BIT=y
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
206 211
207# 212#
208# Cache configuration 213# Cache configuration
@@ -233,9 +238,10 @@ CONFIG_SH_SOLUTION_ENGINE=y
233# 238#
234# Timer and clock configuration 239# Timer and clock configuration
235# 240#
236CONFIG_SH_TMU=y 241CONFIG_SH_TIMER_TMU=y
237CONFIG_SH_TIMER_IRQ=16
238CONFIG_SH_PCLK_FREQ=66666666 242CONFIG_SH_PCLK_FREQ=66666666
243CONFIG_SH_CLK_CPG=y
244CONFIG_SH_CLK_CPG_LEGACY=y
239# CONFIG_NO_HZ is not set 245# CONFIG_NO_HZ is not set
240# CONFIG_HIGH_RES_TIMERS is not set 246# CONFIG_HIGH_RES_TIMERS is not set
241CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 247CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -277,12 +283,14 @@ CONFIG_PREEMPT_VOLUNTARY=y
277# CONFIG_PREEMPT is not set 283# CONFIG_PREEMPT is not set
278CONFIG_GUSA=y 284CONFIG_GUSA=y
279# CONFIG_GUSA_RB is not set 285# CONFIG_GUSA_RB is not set
286# CONFIG_SPARSE_IRQ is not set
280 287
281# 288#
282# Boot options 289# Boot options
283# 290#
284CONFIG_ZERO_PAGE_OFFSET=0x00001000 291CONFIG_ZERO_PAGE_OFFSET=0x00001000
285CONFIG_BOOT_LINK_OFFSET=0x00800000 292CONFIG_BOOT_LINK_OFFSET=0x00800000
293CONFIG_ENTRY_OFFSET=0x00001000
286CONFIG_CMDLINE_BOOL=y 294CONFIG_CMDLINE_BOOL=y
287CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" 295CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
288 296
@@ -374,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
374# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
375# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
376# CONFIG_PHONET is not set 384# CONFIG_PHONET is not set
385# CONFIG_IEEE802154 is not set
377CONFIG_NET_SCHED=y 386CONFIG_NET_SCHED=y
378 387
379# 388#
@@ -427,7 +436,11 @@ CONFIG_WIRELESS=y
427# CONFIG_WIRELESS_OLD_REGULATORY is not set 436# CONFIG_WIRELESS_OLD_REGULATORY is not set
428# CONFIG_WIRELESS_EXT is not set 437# CONFIG_WIRELESS_EXT is not set
429# CONFIG_LIB80211 is not set 438# CONFIG_LIB80211 is not set
430# CONFIG_MAC80211 is not set 439
440#
441# CFG80211 needs to be enabled for MAC80211
442#
443CONFIG_MAC80211_DEFAULT_PS_VALUE=0
431# CONFIG_WIMAX is not set 444# CONFIG_WIMAX is not set
432# CONFIG_RFKILL is not set 445# CONFIG_RFKILL is not set
433# CONFIG_NET_9P is not set 446# CONFIG_NET_9P is not set
@@ -568,10 +581,6 @@ CONFIG_BLK_DEV_SD=y
568# CONFIG_BLK_DEV_SR is not set 581# CONFIG_BLK_DEV_SR is not set
569# CONFIG_CHR_DEV_SG is not set 582# CONFIG_CHR_DEV_SG is not set
570# CONFIG_CHR_DEV_SCH is not set 583# CONFIG_CHR_DEV_SCH is not set
571
572#
573# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
574#
575# CONFIG_SCSI_MULTI_LUN is not set 584# CONFIG_SCSI_MULTI_LUN is not set
576# CONFIG_SCSI_CONSTANTS is not set 585# CONFIG_SCSI_CONSTANTS is not set
577# CONFIG_SCSI_LOGGING is not set 586# CONFIG_SCSI_LOGGING is not set
@@ -588,6 +597,7 @@ CONFIG_SCSI_WAIT_SCAN=m
588# CONFIG_SCSI_SRP_ATTRS is not set 597# CONFIG_SCSI_SRP_ATTRS is not set
589CONFIG_SCSI_LOWLEVEL=y 598CONFIG_SCSI_LOWLEVEL=y
590# CONFIG_ISCSI_TCP is not set 599# CONFIG_ISCSI_TCP is not set
600# CONFIG_SCSI_BNX2_ISCSI is not set
591# CONFIG_LIBFC is not set 601# CONFIG_LIBFC is not set
592# CONFIG_LIBFCOE is not set 602# CONFIG_LIBFCOE is not set
593# CONFIG_SCSI_DEBUG is not set 603# CONFIG_SCSI_DEBUG is not set
@@ -601,7 +611,6 @@ CONFIG_ATA_SFF=y
601CONFIG_PATA_PLATFORM=y 611CONFIG_PATA_PLATFORM=y
602# CONFIG_MD is not set 612# CONFIG_MD is not set
603CONFIG_NETDEVICES=y 613CONFIG_NETDEVICES=y
604CONFIG_COMPAT_NET_DEV_OPS=y
605# CONFIG_DUMMY is not set 614# CONFIG_DUMMY is not set
606# CONFIG_BONDING is not set 615# CONFIG_BONDING is not set
607# CONFIG_MACVLAN is not set 616# CONFIG_MACVLAN is not set
@@ -646,6 +655,7 @@ CONFIG_SH_ETH=y
646# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 655# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
647# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 656# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
648# CONFIG_B44 is not set 657# CONFIG_B44 is not set
658# CONFIG_KS8842 is not set
649CONFIG_NETDEV_1000=y 659CONFIG_NETDEV_1000=y
650CONFIG_NETDEV_10000=y 660CONFIG_NETDEV_10000=y
651 661
@@ -730,22 +740,7 @@ CONFIG_SSB_POSSIBLE=y
730# CONFIG_HTC_PASIC3 is not set 740# CONFIG_HTC_PASIC3 is not set
731# CONFIG_MFD_TMIO is not set 741# CONFIG_MFD_TMIO is not set
732# CONFIG_REGULATOR is not set 742# CONFIG_REGULATOR is not set
733 743# CONFIG_MEDIA_SUPPORT is not set
734#
735# Multimedia devices
736#
737
738#
739# Multimedia core support
740#
741# CONFIG_VIDEO_DEV is not set
742# CONFIG_DVB_CORE is not set
743# CONFIG_VIDEO_MEDIA is not set
744
745#
746# Multimedia drivers
747#
748# CONFIG_DAB is not set
749 744
750# 745#
751# Graphics support 746# Graphics support
@@ -802,10 +797,15 @@ CONFIG_LEDS_TRIGGERS=y
802# iptables trigger is under Netfilter config (LED target) 797# iptables trigger is under Netfilter config (LED target)
803# 798#
804# CONFIG_ACCESSIBILITY is not set 799# CONFIG_ACCESSIBILITY is not set
800CONFIG_RTC_LIB=y
805# CONFIG_RTC_CLASS is not set 801# CONFIG_RTC_CLASS is not set
806# CONFIG_DMADEVICES is not set 802# CONFIG_DMADEVICES is not set
807# CONFIG_AUXDISPLAY is not set 803# CONFIG_AUXDISPLAY is not set
808# CONFIG_UIO is not set 804# CONFIG_UIO is not set
805
806#
807# TI VLYNQ
808#
809# CONFIG_STAGING is not set 809# CONFIG_STAGING is not set
810 810
811# 811#
@@ -827,12 +827,14 @@ CONFIG_FS_MBCACHE=y
827# CONFIG_REISERFS_FS is not set 827# CONFIG_REISERFS_FS is not set
828# CONFIG_JFS_FS is not set 828# CONFIG_JFS_FS is not set
829CONFIG_FS_POSIX_ACL=y 829CONFIG_FS_POSIX_ACL=y
830CONFIG_FILE_LOCKING=y
831# CONFIG_XFS_FS is not set 830# CONFIG_XFS_FS is not set
832# CONFIG_OCFS2_FS is not set 831# CONFIG_OCFS2_FS is not set
833# CONFIG_BTRFS_FS is not set 832# CONFIG_BTRFS_FS is not set
833CONFIG_FILE_LOCKING=y
834CONFIG_FSNOTIFY=y
834# CONFIG_DNOTIFY is not set 835# CONFIG_DNOTIFY is not set
835# CONFIG_INOTIFY is not set 836# CONFIG_INOTIFY is not set
837CONFIG_INOTIFY_USER=y
836# CONFIG_QUOTA is not set 838# CONFIG_QUOTA is not set
837# CONFIG_AUTOFS_FS is not set 839# CONFIG_AUTOFS_FS is not set
838# CONFIG_AUTOFS4_FS is not set 840# CONFIG_AUTOFS4_FS is not set
@@ -975,17 +977,15 @@ CONFIG_HAVE_FUNCTION_TRACER=y
975CONFIG_HAVE_DYNAMIC_FTRACE=y 977CONFIG_HAVE_DYNAMIC_FTRACE=y
976CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 978CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
977CONFIG_TRACING_SUPPORT=y 979CONFIG_TRACING_SUPPORT=y
978 980CONFIG_FTRACE=y
979#
980# Tracers
981#
982# CONFIG_FUNCTION_TRACER is not set 981# CONFIG_FUNCTION_TRACER is not set
983# CONFIG_IRQSOFF_TRACER is not set 982# CONFIG_IRQSOFF_TRACER is not set
984# CONFIG_SCHED_TRACER is not set 983# CONFIG_SCHED_TRACER is not set
985# CONFIG_CONTEXT_SWITCH_TRACER is not set 984# CONFIG_ENABLE_DEFAULT_TRACERS is not set
986# CONFIG_EVENT_TRACER is not set
987# CONFIG_BOOT_TRACER is not set 985# CONFIG_BOOT_TRACER is not set
988# CONFIG_TRACE_BRANCH_PROFILING is not set 986CONFIG_BRANCH_PROFILE_NONE=y
987# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
988# CONFIG_PROFILE_ALL_BRANCHES is not set
989# CONFIG_STACK_TRACER is not set 989# CONFIG_STACK_TRACER is not set
990# CONFIG_KMEMTRACE is not set 990# CONFIG_KMEMTRACE is not set
991# CONFIG_WORKQUEUE_TRACER is not set 991# CONFIG_WORKQUEUE_TRACER is not set
@@ -994,16 +994,15 @@ CONFIG_TRACING_SUPPORT=y
994# CONFIG_SAMPLES is not set 994# CONFIG_SAMPLES is not set
995CONFIG_HAVE_ARCH_KGDB=y 995CONFIG_HAVE_ARCH_KGDB=y
996# CONFIG_KGDB is not set 996# CONFIG_KGDB is not set
997# CONFIG_KMEMCHECK is not set
997# CONFIG_SH_STANDARD_BIOS is not set 998# CONFIG_SH_STANDARD_BIOS is not set
998# CONFIG_EARLY_SCIF_CONSOLE is not set 999# CONFIG_EARLY_SCIF_CONSOLE is not set
999# CONFIG_DEBUG_BOOTMEM is not set 1000# CONFIG_DEBUG_BOOTMEM is not set
1000# CONFIG_DEBUG_STACKOVERFLOW is not set 1001# CONFIG_DEBUG_STACKOVERFLOW is not set
1001# CONFIG_DEBUG_STACK_USAGE is not set 1002# CONFIG_DEBUG_STACK_USAGE is not set
1002# CONFIG_4KSTACKS is not set 1003# CONFIG_4KSTACKS is not set
1003# CONFIG_IRQSTACKS is not set
1004# CONFIG_DUMP_CODE is not set 1004# CONFIG_DUMP_CODE is not set
1005# CONFIG_SH_NO_BSS_INIT is not set 1005# CONFIG_SH_NO_BSS_INIT is not set
1006# CONFIG_MORE_COMPILE_OPTIONS is not set
1007 1006
1008# 1007#
1009# Security options 1008# Security options
@@ -1129,3 +1128,4 @@ CONFIG_HAS_IOMEM=y
1129CONFIG_HAS_IOPORT=y 1128CONFIG_HAS_IOPORT=y
1130CONFIG_HAS_DMA=y 1129CONFIG_HAS_DMA=y
1131CONFIG_NLATTR=y 1130CONFIG_NLATTR=y
1131CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7721_defconfig b/arch/sh/configs/se7721_defconfig
index 56478918440d..306e21c4253d 100644
--- a/arch/sh/configs/se7721_defconfig
+++ b/arch/sh/configs/se7721_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:04:19 2009 4# Thu Jun 18 12:50:49 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,6 +18,8 @@ CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20CONFIG_ARCH_HIBERNATION_POSSIBLE=y 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_CMT=y
22CONFIG_SYS_SUPPORTS_TMU=y
21CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -75,7 +77,6 @@ CONFIG_SYSCTL_SYSCALL=y
75CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
76CONFIG_KALLSYMS_ALL=y 78CONFIG_KALLSYMS_ALL=y
77# CONFIG_KALLSYMS_EXTRA_PASS is not set 79# CONFIG_KALLSYMS_EXTRA_PASS is not set
78# CONFIG_STRIP_ASM_SYMS is not set
79CONFIG_HOTPLUG=y 80CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y 81CONFIG_PRINTK=y
81# CONFIG_BUG is not set 82# CONFIG_BUG is not set
@@ -88,7 +89,12 @@ CONFIG_TIMERFD=y
88CONFIG_EVENTFD=y 89CONFIG_EVENTFD=y
89# CONFIG_SHMEM is not set 90# CONFIG_SHMEM is not set
90CONFIG_AIO=y 91CONFIG_AIO=y
92
93#
94# Performance Counters
95#
91CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97# CONFIG_STRIP_ASM_SYMS is not set
92CONFIG_COMPAT_BRK=y 98CONFIG_COMPAT_BRK=y
93CONFIG_SLAB=y 99CONFIG_SLAB=y
94# CONFIG_SLUB is not set 100# CONFIG_SLUB is not set
@@ -177,6 +183,7 @@ CONFIG_CPU_SUBTYPE_SH7721=y
177CONFIG_QUICKLIST=y 183CONFIG_QUICKLIST=y
178CONFIG_MMU=y 184CONFIG_MMU=y
179CONFIG_PAGE_OFFSET=0x80000000 185CONFIG_PAGE_OFFSET=0x80000000
186CONFIG_FORCE_MAX_ZONEORDER=11
180CONFIG_MEMORY_START=0x0c000000 187CONFIG_MEMORY_START=0x0c000000
181CONFIG_MEMORY_SIZE=0x02000000 188CONFIG_MEMORY_SIZE=0x02000000
182CONFIG_29BIT=y 189CONFIG_29BIT=y
@@ -191,7 +198,6 @@ CONFIG_PAGE_SIZE_4KB=y
191# CONFIG_PAGE_SIZE_8KB is not set 198# CONFIG_PAGE_SIZE_8KB is not set
192# CONFIG_PAGE_SIZE_16KB is not set 199# CONFIG_PAGE_SIZE_16KB is not set
193# CONFIG_PAGE_SIZE_64KB is not set 200# CONFIG_PAGE_SIZE_64KB is not set
194CONFIG_ENTRY_OFFSET=0x00001000
195CONFIG_SELECT_MEMORY_MODEL=y 201CONFIG_SELECT_MEMORY_MODEL=y
196CONFIG_FLATMEM_MANUAL=y 202CONFIG_FLATMEM_MANUAL=y
197# CONFIG_DISCONTIGMEM_MANUAL is not set 203# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -204,9 +210,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
204# CONFIG_PHYS_ADDR_T_64BIT is not set 210# CONFIG_PHYS_ADDR_T_64BIT is not set
205CONFIG_ZONE_DMA_FLAG=0 211CONFIG_ZONE_DMA_FLAG=0
206CONFIG_NR_QUICK=2 212CONFIG_NR_QUICK=2
207CONFIG_UNEVICTABLE_LRU=y
208CONFIG_HAVE_MLOCK=y 213CONFIG_HAVE_MLOCK=y
209CONFIG_HAVE_MLOCKED_PAGE_BIT=y 214CONFIG_HAVE_MLOCKED_PAGE_BIT=y
215CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
210 216
211# 217#
212# Cache configuration 218# Cache configuration
@@ -236,9 +242,11 @@ CONFIG_SH_7721_SOLUTION_ENGINE=y
236# 242#
237# Timer and clock configuration 243# Timer and clock configuration
238# 244#
239CONFIG_SH_TMU=y 245CONFIG_SH_TIMER_TMU=y
240CONFIG_SH_TIMER_IRQ=16 246CONFIG_SH_TIMER_CMT=y
241CONFIG_SH_PCLK_FREQ=33333333 247CONFIG_SH_PCLK_FREQ=33333333
248CONFIG_SH_CLK_CPG=y
249CONFIG_SH_CLK_CPG_LEGACY=y
242# CONFIG_NO_HZ is not set 250# CONFIG_NO_HZ is not set
243# CONFIG_HIGH_RES_TIMERS is not set 251# CONFIG_HIGH_RES_TIMERS is not set
244CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 252CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -280,12 +288,14 @@ CONFIG_PREEMPT_VOLUNTARY=y
280# CONFIG_PREEMPT is not set 288# CONFIG_PREEMPT is not set
281CONFIG_GUSA=y 289CONFIG_GUSA=y
282# CONFIG_GUSA_RB is not set 290# CONFIG_GUSA_RB is not set
291# CONFIG_SPARSE_IRQ is not set
283 292
284# 293#
285# Boot options 294# Boot options
286# 295#
287CONFIG_ZERO_PAGE_OFFSET=0x00001000 296CONFIG_ZERO_PAGE_OFFSET=0x00001000
288CONFIG_BOOT_LINK_OFFSET=0x00800000 297CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000
289CONFIG_CMDLINE_BOOL=y 299CONFIG_CMDLINE_BOOL=y
290CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda2" 300CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda2"
291 301
@@ -377,6 +387,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
377# CONFIG_ECONET is not set 387# CONFIG_ECONET is not set
378# CONFIG_WAN_ROUTER is not set 388# CONFIG_WAN_ROUTER is not set
379# CONFIG_PHONET is not set 389# CONFIG_PHONET is not set
390# CONFIG_IEEE802154 is not set
380CONFIG_NET_SCHED=y 391CONFIG_NET_SCHED=y
381 392
382# 393#
@@ -430,7 +441,11 @@ CONFIG_WIRELESS=y
430# CONFIG_WIRELESS_OLD_REGULATORY is not set 441# CONFIG_WIRELESS_OLD_REGULATORY is not set
431# CONFIG_WIRELESS_EXT is not set 442# CONFIG_WIRELESS_EXT is not set
432# CONFIG_LIB80211 is not set 443# CONFIG_LIB80211 is not set
433# CONFIG_MAC80211 is not set 444
445#
446# CFG80211 needs to be enabled for MAC80211
447#
448CONFIG_MAC80211_DEFAULT_PS_VALUE=0
434# CONFIG_WIMAX is not set 449# CONFIG_WIMAX is not set
435# CONFIG_RFKILL is not set 450# CONFIG_RFKILL is not set
436# CONFIG_NET_9P is not set 451# CONFIG_NET_9P is not set
@@ -572,10 +587,6 @@ CONFIG_BLK_DEV_SD=y
572# CONFIG_BLK_DEV_SR is not set 587# CONFIG_BLK_DEV_SR is not set
573# CONFIG_CHR_DEV_SG is not set 588# CONFIG_CHR_DEV_SG is not set
574# CONFIG_CHR_DEV_SCH is not set 589# CONFIG_CHR_DEV_SCH is not set
575
576#
577# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
578#
579CONFIG_SCSI_MULTI_LUN=y 590CONFIG_SCSI_MULTI_LUN=y
580# CONFIG_SCSI_CONSTANTS is not set 591# CONFIG_SCSI_CONSTANTS is not set
581# CONFIG_SCSI_LOGGING is not set 592# CONFIG_SCSI_LOGGING is not set
@@ -601,7 +612,6 @@ CONFIG_ATA_SFF=y
601CONFIG_PATA_PLATFORM=y 612CONFIG_PATA_PLATFORM=y
602# CONFIG_MD is not set 613# CONFIG_MD is not set
603CONFIG_NETDEVICES=y 614CONFIG_NETDEVICES=y
604CONFIG_COMPAT_NET_DEV_OPS=y
605# CONFIG_DUMMY is not set 615# CONFIG_DUMMY is not set
606# CONFIG_BONDING is not set 616# CONFIG_BONDING is not set
607# CONFIG_MACVLAN is not set 617# CONFIG_MACVLAN is not set
@@ -735,22 +745,7 @@ CONFIG_SSB_POSSIBLE=y
735# CONFIG_HTC_PASIC3 is not set 745# CONFIG_HTC_PASIC3 is not set
736# CONFIG_MFD_TMIO is not set 746# CONFIG_MFD_TMIO is not set
737# CONFIG_REGULATOR is not set 747# CONFIG_REGULATOR is not set
738 748# CONFIG_MEDIA_SUPPORT is not set
739#
740# Multimedia devices
741#
742
743#
744# Multimedia core support
745#
746# CONFIG_VIDEO_DEV is not set
747# CONFIG_DVB_CORE is not set
748# CONFIG_VIDEO_MEDIA is not set
749
750#
751# Multimedia drivers
752#
753# CONFIG_DAB is not set
754 749
755# 750#
756# Graphics support 751# Graphics support
@@ -786,7 +781,7 @@ CONFIG_HID_BELKIN=y
786CONFIG_HID_CHERRY=y 781CONFIG_HID_CHERRY=y
787CONFIG_HID_CHICONY=y 782CONFIG_HID_CHICONY=y
788CONFIG_HID_CYPRESS=y 783CONFIG_HID_CYPRESS=y
789# CONFIG_DRAGONRISE_FF is not set 784# CONFIG_HID_DRAGONRISE is not set
790CONFIG_HID_EZKEY=y 785CONFIG_HID_EZKEY=y
791# CONFIG_HID_KYE is not set 786# CONFIG_HID_KYE is not set
792CONFIG_HID_GYRATION=y 787CONFIG_HID_GYRATION=y
@@ -803,10 +798,11 @@ CONFIG_HID_PETALYNX=y
803CONFIG_HID_SAMSUNG=y 798CONFIG_HID_SAMSUNG=y
804CONFIG_HID_SONY=y 799CONFIG_HID_SONY=y
805CONFIG_HID_SUNPLUS=y 800CONFIG_HID_SUNPLUS=y
806# CONFIG_GREENASIA_FF is not set 801# CONFIG_HID_GREENASIA is not set
802# CONFIG_HID_SMARTJOYPLUS is not set
807# CONFIG_HID_TOPSEED is not set 803# CONFIG_HID_TOPSEED is not set
808CONFIG_THRUSTMASTER_FF=m 804# CONFIG_HID_THRUSTMASTER is not set
809CONFIG_ZEROPLUS_FF=m 805# CONFIG_HID_ZEROPLUS is not set
810CONFIG_USB_SUPPORT=y 806CONFIG_USB_SUPPORT=y
811CONFIG_USB_ARCH_HAS_HCD=y 807CONFIG_USB_ARCH_HAS_HCD=y
812CONFIG_USB_ARCH_HAS_OHCI=y 808CONFIG_USB_ARCH_HAS_OHCI=y
@@ -934,10 +930,15 @@ CONFIG_LEDS_TRIGGERS=y
934# iptables trigger is under Netfilter config (LED target) 930# iptables trigger is under Netfilter config (LED target)
935# 931#
936# CONFIG_ACCESSIBILITY is not set 932# CONFIG_ACCESSIBILITY is not set
933CONFIG_RTC_LIB=y
937# CONFIG_RTC_CLASS is not set 934# CONFIG_RTC_CLASS is not set
938# CONFIG_DMADEVICES is not set 935# CONFIG_DMADEVICES is not set
939# CONFIG_AUXDISPLAY is not set 936# CONFIG_AUXDISPLAY is not set
940# CONFIG_UIO is not set 937# CONFIG_UIO is not set
938
939#
940# TI VLYNQ
941#
941# CONFIG_STAGING is not set 942# CONFIG_STAGING is not set
942 943
943# 944#
@@ -959,12 +960,14 @@ CONFIG_FS_MBCACHE=y
959# CONFIG_REISERFS_FS is not set 960# CONFIG_REISERFS_FS is not set
960# CONFIG_JFS_FS is not set 961# CONFIG_JFS_FS is not set
961CONFIG_FS_POSIX_ACL=y 962CONFIG_FS_POSIX_ACL=y
962CONFIG_FILE_LOCKING=y
963# CONFIG_XFS_FS is not set 963# CONFIG_XFS_FS is not set
964# CONFIG_OCFS2_FS is not set 964# CONFIG_OCFS2_FS is not set
965# CONFIG_BTRFS_FS is not set 965# CONFIG_BTRFS_FS is not set
966CONFIG_FILE_LOCKING=y
967CONFIG_FSNOTIFY=y
966# CONFIG_DNOTIFY is not set 968# CONFIG_DNOTIFY is not set
967# CONFIG_INOTIFY is not set 969# CONFIG_INOTIFY is not set
970CONFIG_INOTIFY_USER=y
968# CONFIG_QUOTA is not set 971# CONFIG_QUOTA is not set
969# CONFIG_AUTOFS_FS is not set 972# CONFIG_AUTOFS_FS is not set
970# CONFIG_AUTOFS4_FS is not set 973# CONFIG_AUTOFS4_FS is not set
@@ -1134,17 +1137,15 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1134CONFIG_HAVE_DYNAMIC_FTRACE=y 1137CONFIG_HAVE_DYNAMIC_FTRACE=y
1135CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1138CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1136CONFIG_TRACING_SUPPORT=y 1139CONFIG_TRACING_SUPPORT=y
1137 1140CONFIG_FTRACE=y
1138#
1139# Tracers
1140#
1141# CONFIG_FUNCTION_TRACER is not set 1141# CONFIG_FUNCTION_TRACER is not set
1142# CONFIG_IRQSOFF_TRACER is not set 1142# CONFIG_IRQSOFF_TRACER is not set
1143# CONFIG_SCHED_TRACER is not set 1143# CONFIG_SCHED_TRACER is not set
1144# CONFIG_CONTEXT_SWITCH_TRACER is not set 1144# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1145# CONFIG_EVENT_TRACER is not set
1146# CONFIG_BOOT_TRACER is not set 1145# CONFIG_BOOT_TRACER is not set
1147# CONFIG_TRACE_BRANCH_PROFILING is not set 1146CONFIG_BRANCH_PROFILE_NONE=y
1147# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1148# CONFIG_PROFILE_ALL_BRANCHES is not set
1148# CONFIG_STACK_TRACER is not set 1149# CONFIG_STACK_TRACER is not set
1149# CONFIG_KMEMTRACE is not set 1150# CONFIG_KMEMTRACE is not set
1150# CONFIG_WORKQUEUE_TRACER is not set 1151# CONFIG_WORKQUEUE_TRACER is not set
@@ -1153,16 +1154,15 @@ CONFIG_TRACING_SUPPORT=y
1153# CONFIG_SAMPLES is not set 1154# CONFIG_SAMPLES is not set
1154CONFIG_HAVE_ARCH_KGDB=y 1155CONFIG_HAVE_ARCH_KGDB=y
1155# CONFIG_KGDB is not set 1156# CONFIG_KGDB is not set
1157# CONFIG_KMEMCHECK is not set
1156# CONFIG_SH_STANDARD_BIOS is not set 1158# CONFIG_SH_STANDARD_BIOS is not set
1157# CONFIG_EARLY_SCIF_CONSOLE is not set 1159# CONFIG_EARLY_SCIF_CONSOLE is not set
1158# CONFIG_DEBUG_BOOTMEM is not set 1160# CONFIG_DEBUG_BOOTMEM is not set
1159# CONFIG_DEBUG_STACKOVERFLOW is not set 1161# CONFIG_DEBUG_STACKOVERFLOW is not set
1160# CONFIG_DEBUG_STACK_USAGE is not set 1162# CONFIG_DEBUG_STACK_USAGE is not set
1161# CONFIG_4KSTACKS is not set 1163# CONFIG_4KSTACKS is not set
1162# CONFIG_IRQSTACKS is not set
1163# CONFIG_DUMP_CODE is not set 1164# CONFIG_DUMP_CODE is not set
1164# CONFIG_SH_NO_BSS_INIT is not set 1165# CONFIG_SH_NO_BSS_INIT is not set
1165# CONFIG_MORE_COMPILE_OPTIONS is not set
1166 1166
1167# 1167#
1168# Security options 1168# Security options
@@ -1288,3 +1288,4 @@ CONFIG_HAS_IOMEM=y
1288CONFIG_HAS_IOPORT=y 1288CONFIG_HAS_IOPORT=y
1289CONFIG_HAS_DMA=y 1289CONFIG_HAS_DMA=y
1290CONFIG_NLATTR=y 1290CONFIG_NLATTR=y
1291CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7722_defconfig b/arch/sh/configs/se7722_defconfig
index 726fdbdb2807..619438299847 100644
--- a/arch/sh/configs/se7722_defconfig
+++ b/arch/sh/configs/se7722_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:05:29 2009 4# Thu Jun 18 12:54:24 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -21,6 +21,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_CMT=y 23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
24CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
25CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
26CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -78,7 +79,6 @@ CONFIG_UID16=y
78CONFIG_SYSCTL_SYSCALL=y 79CONFIG_SYSCTL_SYSCALL=y
79CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
80# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
81# CONFIG_STRIP_ASM_SYMS is not set
82CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
83CONFIG_PRINTK=y 83CONFIG_PRINTK=y
84CONFIG_BUG=y 84CONFIG_BUG=y
@@ -91,8 +91,13 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 92CONFIG_SHMEM=y
93CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
94CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
95CONFIG_SLUB_DEBUG=y 99CONFIG_SLUB_DEBUG=y
100# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 101CONFIG_COMPAT_BRK=y
97# CONFIG_SLAB is not set 102# CONFIG_SLAB is not set
98CONFIG_SLUB=y 103CONFIG_SLUB=y
@@ -187,6 +192,7 @@ CONFIG_CPU_SUBTYPE_SH7722=y
187CONFIG_QUICKLIST=y 192CONFIG_QUICKLIST=y
188CONFIG_MMU=y 193CONFIG_MMU=y
189CONFIG_PAGE_OFFSET=0x80000000 194CONFIG_PAGE_OFFSET=0x80000000
195CONFIG_FORCE_MAX_ZONEORDER=11
190CONFIG_MEMORY_START=0x0c000000 196CONFIG_MEMORY_START=0x0c000000
191CONFIG_MEMORY_SIZE=0x04000000 197CONFIG_MEMORY_SIZE=0x04000000
192CONFIG_29BIT=y 198CONFIG_29BIT=y
@@ -205,7 +211,6 @@ CONFIG_PAGE_SIZE_4KB=y
205# CONFIG_PAGE_SIZE_8KB is not set 211# CONFIG_PAGE_SIZE_8KB is not set
206# CONFIG_PAGE_SIZE_16KB is not set 212# CONFIG_PAGE_SIZE_16KB is not set
207# CONFIG_PAGE_SIZE_64KB is not set 213# CONFIG_PAGE_SIZE_64KB is not set
208CONFIG_ENTRY_OFFSET=0x00001000
209CONFIG_HUGETLB_PAGE_SIZE_64K=y 214CONFIG_HUGETLB_PAGE_SIZE_64K=y
210# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 215# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
211# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 216# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -226,9 +231,9 @@ CONFIG_MIGRATION=y
226# CONFIG_PHYS_ADDR_T_64BIT is not set 231# CONFIG_PHYS_ADDR_T_64BIT is not set
227CONFIG_ZONE_DMA_FLAG=0 232CONFIG_ZONE_DMA_FLAG=0
228CONFIG_NR_QUICK=2 233CONFIG_NR_QUICK=2
229CONFIG_UNEVICTABLE_LRU=y
230CONFIG_HAVE_MLOCK=y 234CONFIG_HAVE_MLOCK=y
231CONFIG_HAVE_MLOCKED_PAGE_BIT=y 235CONFIG_HAVE_MLOCKED_PAGE_BIT=y
236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
232 237
233# 238#
234# Cache configuration 239# Cache configuration
@@ -247,7 +252,6 @@ CONFIG_SH_DSP=y
247CONFIG_SH_STORE_QUEUES=y 252CONFIG_SH_STORE_QUEUES=y
248CONFIG_CPU_HAS_INTEVT=y 253CONFIG_CPU_HAS_INTEVT=y
249CONFIG_CPU_HAS_SR_RB=y 254CONFIG_CPU_HAS_SR_RB=y
250CONFIG_CPU_HAS_PTEA=y
251CONFIG_CPU_HAS_DSP=y 255CONFIG_CPU_HAS_DSP=y
252 256
253# 257#
@@ -260,10 +264,10 @@ CONFIG_SH_7722_SOLUTION_ENGINE=y
260# 264#
261# Timer and clock configuration 265# Timer and clock configuration
262# 266#
263CONFIG_SH_TMU=y 267CONFIG_SH_TIMER_TMU=y
264# CONFIG_SH_TIMER_CMT is not set 268# CONFIG_SH_TIMER_CMT is not set
265CONFIG_SH_TIMER_IRQ=16
266CONFIG_SH_PCLK_FREQ=33333333 269CONFIG_SH_PCLK_FREQ=33333333
270CONFIG_SH_CLK_CPG=y
267CONFIG_TICK_ONESHOT=y 271CONFIG_TICK_ONESHOT=y
268CONFIG_NO_HZ=y 272CONFIG_NO_HZ=y
269CONFIG_HIGH_RES_TIMERS=y 273CONFIG_HIGH_RES_TIMERS=y
@@ -305,12 +309,14 @@ CONFIG_KEXEC=y
305# CONFIG_PREEMPT_VOLUNTARY is not set 309# CONFIG_PREEMPT_VOLUNTARY is not set
306CONFIG_PREEMPT=y 310CONFIG_PREEMPT=y
307CONFIG_GUSA=y 311CONFIG_GUSA=y
312# CONFIG_SPARSE_IRQ is not set
308 313
309# 314#
310# Boot options 315# Boot options
311# 316#
312CONFIG_ZERO_PAGE_OFFSET=0x00001000 317CONFIG_ZERO_PAGE_OFFSET=0x00001000
313CONFIG_BOOT_LINK_OFFSET=0x00800000 318CONFIG_BOOT_LINK_OFFSET=0x00800000
319CONFIG_ENTRY_OFFSET=0x00001000
314# CONFIG_CMDLINE_BOOL is not set 320# CONFIG_CMDLINE_BOOL is not set
315 321
316# 322#
@@ -389,6 +395,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
389# CONFIG_ECONET is not set 395# CONFIG_ECONET is not set
390# CONFIG_WAN_ROUTER is not set 396# CONFIG_WAN_ROUTER is not set
391# CONFIG_PHONET is not set 397# CONFIG_PHONET is not set
398# CONFIG_IEEE802154 is not set
392# CONFIG_NET_SCHED is not set 399# CONFIG_NET_SCHED is not set
393# CONFIG_DCB is not set 400# CONFIG_DCB is not set
394 401
@@ -406,7 +413,11 @@ CONFIG_WIRELESS=y
406# CONFIG_WIRELESS_OLD_REGULATORY is not set 413# CONFIG_WIRELESS_OLD_REGULATORY is not set
407# CONFIG_WIRELESS_EXT is not set 414# CONFIG_WIRELESS_EXT is not set
408# CONFIG_LIB80211 is not set 415# CONFIG_LIB80211 is not set
409# CONFIG_MAC80211 is not set 416
417#
418# CFG80211 needs to be enabled for MAC80211
419#
420CONFIG_MAC80211_DEFAULT_PS_VALUE=0
410# CONFIG_WIMAX is not set 421# CONFIG_WIMAX is not set
411# CONFIG_RFKILL is not set 422# CONFIG_RFKILL is not set
412# CONFIG_NET_9P is not set 423# CONFIG_NET_9P is not set
@@ -467,10 +478,6 @@ CONFIG_BLK_DEV_SD=y
467# CONFIG_BLK_DEV_SR is not set 478# CONFIG_BLK_DEV_SR is not set
468# CONFIG_CHR_DEV_SG is not set 479# CONFIG_CHR_DEV_SG is not set
469# CONFIG_CHR_DEV_SCH is not set 480# CONFIG_CHR_DEV_SCH is not set
470
471#
472# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
473#
474# CONFIG_SCSI_MULTI_LUN is not set 481# CONFIG_SCSI_MULTI_LUN is not set
475# CONFIG_SCSI_CONSTANTS is not set 482# CONFIG_SCSI_CONSTANTS is not set
476# CONFIG_SCSI_LOGGING is not set 483# CONFIG_SCSI_LOGGING is not set
@@ -487,6 +494,7 @@ CONFIG_SCSI_WAIT_SCAN=m
487# CONFIG_SCSI_SRP_ATTRS is not set 494# CONFIG_SCSI_SRP_ATTRS is not set
488CONFIG_SCSI_LOWLEVEL=y 495CONFIG_SCSI_LOWLEVEL=y
489# CONFIG_ISCSI_TCP is not set 496# CONFIG_ISCSI_TCP is not set
497# CONFIG_SCSI_BNX2_ISCSI is not set
490# CONFIG_LIBFC is not set 498# CONFIG_LIBFC is not set
491# CONFIG_LIBFCOE is not set 499# CONFIG_LIBFCOE is not set
492# CONFIG_SCSI_DEBUG is not set 500# CONFIG_SCSI_DEBUG is not set
@@ -500,7 +508,6 @@ CONFIG_ATA_SFF=y
500CONFIG_PATA_PLATFORM=y 508CONFIG_PATA_PLATFORM=y
501# CONFIG_MD is not set 509# CONFIG_MD is not set
502CONFIG_NETDEVICES=y 510CONFIG_NETDEVICES=y
503CONFIG_COMPAT_NET_DEV_OPS=y
504# CONFIG_DUMMY is not set 511# CONFIG_DUMMY is not set
505# CONFIG_BONDING is not set 512# CONFIG_BONDING is not set
506# CONFIG_MACVLAN is not set 513# CONFIG_MACVLAN is not set
@@ -525,6 +532,7 @@ CONFIG_SMC91X=y
525# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 532# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
526# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 533# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
527# CONFIG_B44 is not set 534# CONFIG_B44 is not set
535# CONFIG_KS8842 is not set
528CONFIG_NETDEV_1000=y 536CONFIG_NETDEV_1000=y
529CONFIG_NETDEV_10000=y 537CONFIG_NETDEV_10000=y
530 538
@@ -656,22 +664,7 @@ CONFIG_SSB_POSSIBLE=y
656# CONFIG_HTC_PASIC3 is not set 664# CONFIG_HTC_PASIC3 is not set
657# CONFIG_MFD_TMIO is not set 665# CONFIG_MFD_TMIO is not set
658# CONFIG_REGULATOR is not set 666# CONFIG_REGULATOR is not set
659 667# CONFIG_MEDIA_SUPPORT is not set
660#
661# Multimedia devices
662#
663
664#
665# Multimedia core support
666#
667# CONFIG_VIDEO_DEV is not set
668# CONFIG_DVB_CORE is not set
669# CONFIG_VIDEO_MEDIA is not set
670
671#
672# Multimedia drivers
673#
674CONFIG_DAB=y
675 668
676# 669#
677# Graphics support 670# Graphics support
@@ -756,9 +749,14 @@ CONFIG_RTC_INTF_DEV=y
756# on-CPU RTC drivers 749# on-CPU RTC drivers
757# 750#
758CONFIG_RTC_DRV_SH=y 751CONFIG_RTC_DRV_SH=y
752# CONFIG_RTC_DRV_GENERIC is not set
759# CONFIG_DMADEVICES is not set 753# CONFIG_DMADEVICES is not set
760# CONFIG_AUXDISPLAY is not set 754# CONFIG_AUXDISPLAY is not set
761# CONFIG_UIO is not set 755# CONFIG_UIO is not set
756
757#
758# TI VLYNQ
759#
762# CONFIG_STAGING is not set 760# CONFIG_STAGING is not set
763 761
764# 762#
@@ -779,10 +777,11 @@ CONFIG_FS_MBCACHE=y
779# CONFIG_REISERFS_FS is not set 777# CONFIG_REISERFS_FS is not set
780# CONFIG_JFS_FS is not set 778# CONFIG_JFS_FS is not set
781# CONFIG_FS_POSIX_ACL is not set 779# CONFIG_FS_POSIX_ACL is not set
782CONFIG_FILE_LOCKING=y
783# CONFIG_XFS_FS is not set 780# CONFIG_XFS_FS is not set
784# CONFIG_OCFS2_FS is not set 781# CONFIG_OCFS2_FS is not set
785# CONFIG_BTRFS_FS is not set 782# CONFIG_BTRFS_FS is not set
783CONFIG_FILE_LOCKING=y
784CONFIG_FSNOTIFY=y
786CONFIG_DNOTIFY=y 785CONFIG_DNOTIFY=y
787CONFIG_INOTIFY=y 786CONFIG_INOTIFY=y
788CONFIG_INOTIFY_USER=y 787CONFIG_INOTIFY_USER=y
@@ -882,22 +881,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y
882CONFIG_HAVE_DYNAMIC_FTRACE=y 881CONFIG_HAVE_DYNAMIC_FTRACE=y
883CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 882CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
884CONFIG_TRACING_SUPPORT=y 883CONFIG_TRACING_SUPPORT=y
885 884# CONFIG_FTRACE is not set
886#
887# Tracers
888#
889# CONFIG_FUNCTION_TRACER is not set
890# CONFIG_IRQSOFF_TRACER is not set
891# CONFIG_PREEMPT_TRACER is not set
892# CONFIG_SCHED_TRACER is not set
893# CONFIG_CONTEXT_SWITCH_TRACER is not set
894# CONFIG_EVENT_TRACER is not set
895# CONFIG_BOOT_TRACER is not set
896# CONFIG_TRACE_BRANCH_PROFILING is not set
897# CONFIG_STACK_TRACER is not set
898# CONFIG_KMEMTRACE is not set
899# CONFIG_WORKQUEUE_TRACER is not set
900# CONFIG_BLK_DEV_IO_TRACE is not set
901# CONFIG_DYNAMIC_DEBUG is not set 885# CONFIG_DYNAMIC_DEBUG is not set
902# CONFIG_DMA_API_DEBUG is not set 886# CONFIG_DMA_API_DEBUG is not set
903# CONFIG_SAMPLES is not set 887# CONFIG_SAMPLES is not set
@@ -905,7 +889,6 @@ CONFIG_HAVE_ARCH_KGDB=y
905CONFIG_SH_STANDARD_BIOS=y 889CONFIG_SH_STANDARD_BIOS=y
906# CONFIG_EARLY_SCIF_CONSOLE is not set 890# CONFIG_EARLY_SCIF_CONSOLE is not set
907# CONFIG_EARLY_PRINTK is not set 891# CONFIG_EARLY_PRINTK is not set
908# CONFIG_MORE_COMPILE_OPTIONS is not set
909 892
910# 893#
911# Security options 894# Security options
@@ -1020,3 +1003,4 @@ CONFIG_HAS_IOMEM=y
1020CONFIG_HAS_IOPORT=y 1003CONFIG_HAS_IOPORT=y
1021CONFIG_HAS_DMA=y 1004CONFIG_HAS_DMA=y
1022CONFIG_NLATTR=y 1005CONFIG_NLATTR=y
1006CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7724_defconfig b/arch/sh/configs/se7724_defconfig
index 96d2587467e6..3840270283e4 100644
--- a/arch/sh/configs/se7724_defconfig
+++ b/arch/sh/configs/se7724_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc6 3# Linux kernel version: 2.6.30
4# Tue May 26 13:18:09 2009 4# Thu Jun 18 16:09:05 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -76,7 +76,6 @@ CONFIG_EMBEDDED=y
76CONFIG_UID16=y 76CONFIG_UID16=y
77CONFIG_SYSCTL_SYSCALL=y 77CONFIG_SYSCTL_SYSCALL=y
78# CONFIG_KALLSYMS is not set 78# CONFIG_KALLSYMS is not set
79# CONFIG_STRIP_ASM_SYMS is not set
80CONFIG_HOTPLUG=y 79CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y 80CONFIG_PRINTK=y
82CONFIG_BUG=y 81CONFIG_BUG=y
@@ -89,7 +88,12 @@ CONFIG_TIMERFD=y
89CONFIG_EVENTFD=y 88CONFIG_EVENTFD=y
90CONFIG_SHMEM=y 89CONFIG_SHMEM=y
91CONFIG_AIO=y 90CONFIG_AIO=y
91
92#
93# Performance Counters
94#
92CONFIG_VM_EVENT_COUNTERS=y 95CONFIG_VM_EVENT_COUNTERS=y
96# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y 97CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y 98CONFIG_SLAB=y
95# CONFIG_SLUB is not set 99# CONFIG_SLUB is not set
@@ -209,9 +213,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
209# CONFIG_PHYS_ADDR_T_64BIT is not set 213# CONFIG_PHYS_ADDR_T_64BIT is not set
210CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
211CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
212CONFIG_UNEVICTABLE_LRU=y
213CONFIG_HAVE_MLOCK=y 216CONFIG_HAVE_MLOCK=y
214CONFIG_HAVE_MLOCKED_PAGE_BIT=y 217CONFIG_HAVE_MLOCKED_PAGE_BIT=y
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
215 219
216# 220#
217# Cache configuration 221# Cache configuration
@@ -229,7 +233,6 @@ CONFIG_SH_FPU=y
229# CONFIG_SH_STORE_QUEUES is not set 233# CONFIG_SH_STORE_QUEUES is not set
230CONFIG_CPU_HAS_INTEVT=y 234CONFIG_CPU_HAS_INTEVT=y
231CONFIG_CPU_HAS_SR_RB=y 235CONFIG_CPU_HAS_SR_RB=y
232CONFIG_CPU_HAS_PTEA=y
233CONFIG_CPU_HAS_FPU=y 236CONFIG_CPU_HAS_FPU=y
234 237
235# 238#
@@ -244,6 +247,7 @@ CONFIG_SH_7724_SOLUTION_ENGINE=y
244CONFIG_SH_TIMER_TMU=y 247CONFIG_SH_TIMER_TMU=y
245# CONFIG_SH_TIMER_CMT is not set 248# CONFIG_SH_TIMER_CMT is not set
246CONFIG_SH_PCLK_FREQ=33333333 249CONFIG_SH_PCLK_FREQ=33333333
250CONFIG_SH_CLK_CPG=y
247# CONFIG_NO_HZ is not set 251# CONFIG_NO_HZ is not set
248# CONFIG_HIGH_RES_TIMERS is not set 252# CONFIG_HIGH_RES_TIMERS is not set
249CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 253CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -284,6 +288,7 @@ CONFIG_SECCOMP=y
284# CONFIG_PREEMPT_VOLUNTARY is not set 288# CONFIG_PREEMPT_VOLUNTARY is not set
285CONFIG_PREEMPT=y 289CONFIG_PREEMPT=y
286CONFIG_GUSA=y 290CONFIG_GUSA=y
291# CONFIG_SPARSE_IRQ is not set
287 292
288# 293#
289# Boot options 294# Boot options
@@ -373,6 +378,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
373# CONFIG_ECONET is not set 378# CONFIG_ECONET is not set
374# CONFIG_WAN_ROUTER is not set 379# CONFIG_WAN_ROUTER is not set
375# CONFIG_PHONET is not set 380# CONFIG_PHONET is not set
381# CONFIG_IEEE802154 is not set
376# CONFIG_NET_SCHED is not set 382# CONFIG_NET_SCHED is not set
377# CONFIG_DCB is not set 383# CONFIG_DCB is not set
378 384
@@ -390,7 +396,11 @@ CONFIG_WIRELESS=y
390# CONFIG_WIRELESS_OLD_REGULATORY is not set 396# CONFIG_WIRELESS_OLD_REGULATORY is not set
391# CONFIG_WIRELESS_EXT is not set 397# CONFIG_WIRELESS_EXT is not set
392# CONFIG_LIB80211 is not set 398# CONFIG_LIB80211 is not set
393# CONFIG_MAC80211 is not set 399
400#
401# CFG80211 needs to be enabled for MAC80211
402#
403CONFIG_MAC80211_DEFAULT_PS_VALUE=0
394# CONFIG_WIMAX is not set 404# CONFIG_WIMAX is not set
395# CONFIG_RFKILL is not set 405# CONFIG_RFKILL is not set
396# CONFIG_NET_9P is not set 406# CONFIG_NET_9P is not set
@@ -534,6 +544,7 @@ CONFIG_MISC_DEVICES=y
534# CONFIG_EEPROM_AT24 is not set 544# CONFIG_EEPROM_AT24 is not set
535# CONFIG_EEPROM_AT25 is not set 545# CONFIG_EEPROM_AT25 is not set
536# CONFIG_EEPROM_LEGACY is not set 546# CONFIG_EEPROM_LEGACY is not set
547# CONFIG_EEPROM_MAX6875 is not set
537# CONFIG_EEPROM_93CX6 is not set 548# CONFIG_EEPROM_93CX6 is not set
538CONFIG_HAVE_IDE=y 549CONFIG_HAVE_IDE=y
539# CONFIG_IDE is not set 550# CONFIG_IDE is not set
@@ -557,10 +568,6 @@ CONFIG_BLK_DEV_SD=y
557# CONFIG_BLK_DEV_SR is not set 568# CONFIG_BLK_DEV_SR is not set
558# CONFIG_CHR_DEV_SG is not set 569# CONFIG_CHR_DEV_SG is not set
559# CONFIG_CHR_DEV_SCH is not set 570# CONFIG_CHR_DEV_SCH is not set
560
561#
562# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
563#
564# CONFIG_SCSI_MULTI_LUN is not set 571# CONFIG_SCSI_MULTI_LUN is not set
565# CONFIG_SCSI_CONSTANTS is not set 572# CONFIG_SCSI_CONSTANTS is not set
566# CONFIG_SCSI_LOGGING is not set 573# CONFIG_SCSI_LOGGING is not set
@@ -577,6 +584,7 @@ CONFIG_SCSI_WAIT_SCAN=m
577# CONFIG_SCSI_SRP_ATTRS is not set 584# CONFIG_SCSI_SRP_ATTRS is not set
578CONFIG_SCSI_LOWLEVEL=y 585CONFIG_SCSI_LOWLEVEL=y
579# CONFIG_ISCSI_TCP is not set 586# CONFIG_ISCSI_TCP is not set
587# CONFIG_SCSI_BNX2_ISCSI is not set
580# CONFIG_LIBFC is not set 588# CONFIG_LIBFC is not set
581# CONFIG_LIBFCOE is not set 589# CONFIG_LIBFCOE is not set
582# CONFIG_SCSI_DEBUG is not set 590# CONFIG_SCSI_DEBUG is not set
@@ -585,7 +593,6 @@ CONFIG_SCSI_LOWLEVEL=y
585# CONFIG_ATA is not set 593# CONFIG_ATA is not set
586# CONFIG_MD is not set 594# CONFIG_MD is not set
587CONFIG_NETDEVICES=y 595CONFIG_NETDEVICES=y
588CONFIG_COMPAT_NET_DEV_OPS=y
589# CONFIG_DUMMY is not set 596# CONFIG_DUMMY is not set
590# CONFIG_BONDING is not set 597# CONFIG_BONDING is not set
591# CONFIG_MACVLAN is not set 598# CONFIG_MACVLAN is not set
@@ -617,6 +624,7 @@ CONFIG_NET_ETHERNET=y
617CONFIG_MII=y 624CONFIG_MII=y
618# CONFIG_AX88796 is not set 625# CONFIG_AX88796 is not set
619# CONFIG_STNIC is not set 626# CONFIG_STNIC is not set
627# CONFIG_SH_ETH is not set
620CONFIG_SMC91X=y 628CONFIG_SMC91X=y
621# CONFIG_ENC28J60 is not set 629# CONFIG_ENC28J60 is not set
622# CONFIG_ETHOC is not set 630# CONFIG_ETHOC is not set
@@ -631,6 +639,7 @@ CONFIG_SMC91X=y
631# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 639# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
632# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 640# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
633# CONFIG_B44 is not set 641# CONFIG_B44 is not set
642# CONFIG_KS8842 is not set
634# CONFIG_NETDEV_1000 is not set 643# CONFIG_NETDEV_1000 is not set
635# CONFIG_NETDEV_10000 is not set 644# CONFIG_NETDEV_10000 is not set
636 645
@@ -772,7 +781,6 @@ CONFIG_I2C_SH_MOBILE=y
772# CONFIG_SENSORS_PCF8574 is not set 781# CONFIG_SENSORS_PCF8574 is not set
773# CONFIG_PCF8575 is not set 782# CONFIG_PCF8575 is not set
774# CONFIG_SENSORS_PCA9539 is not set 783# CONFIG_SENSORS_PCA9539 is not set
775# CONFIG_SENSORS_MAX6875 is not set
776# CONFIG_SENSORS_TSL2550 is not set 784# CONFIG_SENSORS_TSL2550 is not set
777# CONFIG_I2C_DEBUG_CORE is not set 785# CONFIG_I2C_DEBUG_CORE is not set
778# CONFIG_I2C_DEBUG_ALGO is not set 786# CONFIG_I2C_DEBUG_ALGO is not set
@@ -844,10 +852,7 @@ CONFIG_SSB_POSSIBLE=y
844# CONFIG_MFD_WM8350_I2C is not set 852# CONFIG_MFD_WM8350_I2C is not set
845# CONFIG_MFD_PCF50633 is not set 853# CONFIG_MFD_PCF50633 is not set
846# CONFIG_REGULATOR is not set 854# CONFIG_REGULATOR is not set
847 855CONFIG_MEDIA_SUPPORT=y
848#
849# Multimedia devices
850#
851 856
852# 857#
853# Multimedia core support 858# Multimedia core support
@@ -1019,7 +1024,7 @@ CONFIG_USB_HID=y
1019# CONFIG_HID_CHERRY is not set 1024# CONFIG_HID_CHERRY is not set
1020# CONFIG_HID_CHICONY is not set 1025# CONFIG_HID_CHICONY is not set
1021# CONFIG_HID_CYPRESS is not set 1026# CONFIG_HID_CYPRESS is not set
1022# CONFIG_DRAGONRISE_FF is not set 1027# CONFIG_HID_DRAGONRISE is not set
1023# CONFIG_HID_EZKEY is not set 1028# CONFIG_HID_EZKEY is not set
1024# CONFIG_HID_KYE is not set 1029# CONFIG_HID_KYE is not set
1025# CONFIG_HID_GYRATION is not set 1030# CONFIG_HID_GYRATION is not set
@@ -1033,10 +1038,11 @@ CONFIG_USB_HID=y
1033# CONFIG_HID_SAMSUNG is not set 1038# CONFIG_HID_SAMSUNG is not set
1034# CONFIG_HID_SONY is not set 1039# CONFIG_HID_SONY is not set
1035# CONFIG_HID_SUNPLUS is not set 1040# CONFIG_HID_SUNPLUS is not set
1036# CONFIG_GREENASIA_FF is not set 1041# CONFIG_HID_GREENASIA is not set
1042# CONFIG_HID_SMARTJOYPLUS is not set
1037# CONFIG_HID_TOPSEED is not set 1043# CONFIG_HID_TOPSEED is not set
1038# CONFIG_THRUSTMASTER_FF is not set 1044# CONFIG_HID_THRUSTMASTER is not set
1039# CONFIG_ZEROPLUS_FF is not set 1045# CONFIG_HID_ZEROPLUS is not set
1040CONFIG_USB_SUPPORT=y 1046CONFIG_USB_SUPPORT=y
1041CONFIG_USB_ARCH_HAS_HCD=y 1047CONFIG_USB_ARCH_HAS_HCD=y
1042# CONFIG_USB_ARCH_HAS_OHCI is not set 1048# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -1228,6 +1234,10 @@ CONFIG_UIO=y
1228CONFIG_UIO_PDRV_GENIRQ=y 1234CONFIG_UIO_PDRV_GENIRQ=y
1229# CONFIG_UIO_SMX is not set 1235# CONFIG_UIO_SMX is not set
1230# CONFIG_UIO_SERCOS3 is not set 1236# CONFIG_UIO_SERCOS3 is not set
1237
1238#
1239# TI VLYNQ
1240#
1231# CONFIG_STAGING is not set 1241# CONFIG_STAGING is not set
1232 1242
1233# 1243#
@@ -1249,10 +1259,11 @@ CONFIG_FS_MBCACHE=y
1249# CONFIG_REISERFS_FS is not set 1259# CONFIG_REISERFS_FS is not set
1250# CONFIG_JFS_FS is not set 1260# CONFIG_JFS_FS is not set
1251CONFIG_FS_POSIX_ACL=y 1261CONFIG_FS_POSIX_ACL=y
1252CONFIG_FILE_LOCKING=y
1253# CONFIG_XFS_FS is not set 1262# CONFIG_XFS_FS is not set
1254# CONFIG_OCFS2_FS is not set 1263# CONFIG_OCFS2_FS is not set
1255# CONFIG_BTRFS_FS is not set 1264# CONFIG_BTRFS_FS is not set
1265CONFIG_FILE_LOCKING=y
1266CONFIG_FSNOTIFY=y
1256CONFIG_DNOTIFY=y 1267CONFIG_DNOTIFY=y
1257CONFIG_INOTIFY=y 1268CONFIG_INOTIFY=y
1258CONFIG_INOTIFY_USER=y 1269CONFIG_INOTIFY_USER=y
@@ -1408,22 +1419,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1408CONFIG_HAVE_DYNAMIC_FTRACE=y 1419CONFIG_HAVE_DYNAMIC_FTRACE=y
1409CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1420CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1410CONFIG_TRACING_SUPPORT=y 1421CONFIG_TRACING_SUPPORT=y
1411 1422# CONFIG_FTRACE is not set
1412#
1413# Tracers
1414#
1415# CONFIG_FUNCTION_TRACER is not set
1416# CONFIG_IRQSOFF_TRACER is not set
1417# CONFIG_PREEMPT_TRACER is not set
1418# CONFIG_SCHED_TRACER is not set
1419# CONFIG_CONTEXT_SWITCH_TRACER is not set
1420# CONFIG_EVENT_TRACER is not set
1421# CONFIG_BOOT_TRACER is not set
1422# CONFIG_TRACE_BRANCH_PROFILING is not set
1423# CONFIG_STACK_TRACER is not set
1424# CONFIG_KMEMTRACE is not set
1425# CONFIG_WORKQUEUE_TRACER is not set
1426# CONFIG_BLK_DEV_IO_TRACE is not set
1427# CONFIG_DMA_API_DEBUG is not set 1423# CONFIG_DMA_API_DEBUG is not set
1428# CONFIG_SAMPLES is not set 1424# CONFIG_SAMPLES is not set
1429CONFIG_HAVE_ARCH_KGDB=y 1425CONFIG_HAVE_ARCH_KGDB=y
@@ -1550,3 +1546,4 @@ CONFIG_HAS_IOMEM=y
1550CONFIG_HAS_IOPORT=y 1546CONFIG_HAS_IOPORT=y
1551CONFIG_HAS_DMA=y 1547CONFIG_HAS_DMA=y
1552CONFIG_NLATTR=y 1548CONFIG_NLATTR=y
1549CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7750_defconfig b/arch/sh/configs/se7750_defconfig
index ed1a1230f636..564bf7bdce6b 100644
--- a/arch/sh/configs/se7750_defconfig
+++ b/arch/sh/configs/se7750_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:06:02 2009 4# Thu Jun 18 13:00:01 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -71,7 +72,6 @@ CONFIG_UID16=y
71# CONFIG_SYSCTL_SYSCALL is not set 72# CONFIG_SYSCTL_SYSCALL is not set
72CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
73# CONFIG_KALLSYMS_EXTRA_PASS is not set 74# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
75# CONFIG_HOTPLUG is not set 75# CONFIG_HOTPLUG is not set
76CONFIG_PRINTK=y 76CONFIG_PRINTK=y
77CONFIG_BUG=y 77CONFIG_BUG=y
@@ -84,7 +84,12 @@ CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85CONFIG_SHMEM=y 85CONFIG_SHMEM=y
86CONFIG_AIO=y 86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
87CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
88CONFIG_COMPAT_BRK=y 93CONFIG_COMPAT_BRK=y
89CONFIG_SLAB=y 94CONFIG_SLAB=y
90# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
@@ -173,6 +178,7 @@ CONFIG_CPU_SUBTYPE_SH7750=y
173CONFIG_QUICKLIST=y 178CONFIG_QUICKLIST=y
174CONFIG_MMU=y 179CONFIG_MMU=y
175CONFIG_PAGE_OFFSET=0x80000000 180CONFIG_PAGE_OFFSET=0x80000000
181CONFIG_FORCE_MAX_ZONEORDER=11
176CONFIG_MEMORY_START=0x0c000000 182CONFIG_MEMORY_START=0x0c000000
177CONFIG_MEMORY_SIZE=0x02000000 183CONFIG_MEMORY_SIZE=0x02000000
178CONFIG_29BIT=y 184CONFIG_29BIT=y
@@ -187,7 +193,6 @@ CONFIG_PAGE_SIZE_4KB=y
187# CONFIG_PAGE_SIZE_8KB is not set 193# CONFIG_PAGE_SIZE_8KB is not set
188# CONFIG_PAGE_SIZE_16KB is not set 194# CONFIG_PAGE_SIZE_16KB is not set
189# CONFIG_PAGE_SIZE_64KB is not set 195# CONFIG_PAGE_SIZE_64KB is not set
190CONFIG_ENTRY_OFFSET=0x00001000
191CONFIG_SELECT_MEMORY_MODEL=y 196CONFIG_SELECT_MEMORY_MODEL=y
192CONFIG_FLATMEM_MANUAL=y 197CONFIG_FLATMEM_MANUAL=y
193# CONFIG_DISCONTIGMEM_MANUAL is not set 198# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -200,9 +205,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_PHYS_ADDR_T_64BIT is not set 205# CONFIG_PHYS_ADDR_T_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=0 206CONFIG_ZONE_DMA_FLAG=0
202CONFIG_NR_QUICK=2 207CONFIG_NR_QUICK=2
203CONFIG_UNEVICTABLE_LRU=y
204CONFIG_HAVE_MLOCK=y 208CONFIG_HAVE_MLOCK=y
205CONFIG_HAVE_MLOCKED_PAGE_BIT=y 209CONFIG_HAVE_MLOCKED_PAGE_BIT=y
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
206 211
207# 212#
208# Cache configuration 213# Cache configuration
@@ -221,7 +226,6 @@ CONFIG_SH_FPU=y
221CONFIG_CPU_HAS_INTEVT=y 226CONFIG_CPU_HAS_INTEVT=y
222CONFIG_CPU_HAS_IPR_IRQ=y 227CONFIG_CPU_HAS_IPR_IRQ=y
223CONFIG_CPU_HAS_SR_RB=y 228CONFIG_CPU_HAS_SR_RB=y
224CONFIG_CPU_HAS_PTEA=y
225CONFIG_CPU_HAS_FPU=y 229CONFIG_CPU_HAS_FPU=y
226 230
227# 231#
@@ -233,9 +237,10 @@ CONFIG_SH_SOLUTION_ENGINE=y
233# 237#
234# Timer and clock configuration 238# Timer and clock configuration
235# 239#
236CONFIG_SH_TMU=y 240CONFIG_SH_TIMER_TMU=y
237CONFIG_SH_TIMER_IRQ=16
238CONFIG_SH_PCLK_FREQ=33333333 241CONFIG_SH_PCLK_FREQ=33333333
242CONFIG_SH_CLK_CPG=y
243CONFIG_SH_CLK_CPG_LEGACY=y
239# CONFIG_NO_HZ is not set 244# CONFIG_NO_HZ is not set
240# CONFIG_HIGH_RES_TIMERS is not set 245# CONFIG_HIGH_RES_TIMERS is not set
241CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 246CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -277,12 +282,14 @@ CONFIG_PREEMPT_NONE=y
277# CONFIG_PREEMPT is not set 282# CONFIG_PREEMPT is not set
278CONFIG_GUSA=y 283CONFIG_GUSA=y
279# CONFIG_GUSA_RB is not set 284# CONFIG_GUSA_RB is not set
285# CONFIG_SPARSE_IRQ is not set
280 286
281# 287#
282# Boot options 288# Boot options
283# 289#
284CONFIG_ZERO_PAGE_OFFSET=0x00001000 290CONFIG_ZERO_PAGE_OFFSET=0x00001000
285CONFIG_BOOT_LINK_OFFSET=0x00800000 291CONFIG_BOOT_LINK_OFFSET=0x00800000
292CONFIG_ENTRY_OFFSET=0x00001000
286# CONFIG_UBC_WAKEUP is not set 293# CONFIG_UBC_WAKEUP is not set
287# CONFIG_CMDLINE_BOOL is not set 294# CONFIG_CMDLINE_BOOL is not set
288 295
@@ -365,6 +372,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
365# CONFIG_ECONET is not set 372# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 373# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set 374# CONFIG_PHONET is not set
375# CONFIG_IEEE802154 is not set
368# CONFIG_NET_SCHED is not set 376# CONFIG_NET_SCHED is not set
369# CONFIG_DCB is not set 377# CONFIG_DCB is not set
370 378
@@ -382,7 +390,11 @@ CONFIG_WIRELESS=y
382# CONFIG_WIRELESS_OLD_REGULATORY is not set 390# CONFIG_WIRELESS_OLD_REGULATORY is not set
383# CONFIG_WIRELESS_EXT is not set 391# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 392# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 393
394#
395# CFG80211 needs to be enabled for MAC80211
396#
397CONFIG_MAC80211_DEFAULT_PS_VALUE=0
386# CONFIG_WIMAX is not set 398# CONFIG_WIMAX is not set
387# CONFIG_RFKILL is not set 399# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 400# CONFIG_NET_9P is not set
@@ -535,10 +547,6 @@ CONFIG_SCSI_PROC_FS=y
535# CONFIG_BLK_DEV_SR is not set 547# CONFIG_BLK_DEV_SR is not set
536# CONFIG_CHR_DEV_SG is not set 548# CONFIG_CHR_DEV_SG is not set
537# CONFIG_CHR_DEV_SCH is not set 549# CONFIG_CHR_DEV_SCH is not set
538
539#
540# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
541#
542# CONFIG_SCSI_MULTI_LUN is not set 550# CONFIG_SCSI_MULTI_LUN is not set
543# CONFIG_SCSI_CONSTANTS is not set 551# CONFIG_SCSI_CONSTANTS is not set
544# CONFIG_SCSI_LOGGING is not set 552# CONFIG_SCSI_LOGGING is not set
@@ -555,6 +563,7 @@ CONFIG_SCSI_WAIT_SCAN=m
555# CONFIG_SCSI_SRP_ATTRS is not set 563# CONFIG_SCSI_SRP_ATTRS is not set
556CONFIG_SCSI_LOWLEVEL=y 564CONFIG_SCSI_LOWLEVEL=y
557# CONFIG_ISCSI_TCP is not set 565# CONFIG_ISCSI_TCP is not set
566# CONFIG_SCSI_BNX2_ISCSI is not set
558# CONFIG_LIBFC is not set 567# CONFIG_LIBFC is not set
559# CONFIG_LIBFCOE is not set 568# CONFIG_LIBFCOE is not set
560# CONFIG_SCSI_DEBUG is not set 569# CONFIG_SCSI_DEBUG is not set
@@ -563,7 +572,6 @@ CONFIG_SCSI_LOWLEVEL=y
563# CONFIG_ATA is not set 572# CONFIG_ATA is not set
564# CONFIG_MD is not set 573# CONFIG_MD is not set
565CONFIG_NETDEVICES=y 574CONFIG_NETDEVICES=y
566CONFIG_COMPAT_NET_DEV_OPS=y
567# CONFIG_DUMMY is not set 575# CONFIG_DUMMY is not set
568# CONFIG_BONDING is not set 576# CONFIG_BONDING is not set
569# CONFIG_MACVLAN is not set 577# CONFIG_MACVLAN is not set
@@ -588,6 +596,7 @@ CONFIG_STNIC=y
588# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 596# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
589# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 597# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
590# CONFIG_B44 is not set 598# CONFIG_B44 is not set
599# CONFIG_KS8842 is not set
591CONFIG_NETDEV_1000=y 600CONFIG_NETDEV_1000=y
592CONFIG_NETDEV_10000=y 601CONFIG_NETDEV_10000=y
593 602
@@ -697,22 +706,7 @@ CONFIG_SSB_POSSIBLE=y
697# CONFIG_HTC_PASIC3 is not set 706# CONFIG_HTC_PASIC3 is not set
698# CONFIG_MFD_TMIO is not set 707# CONFIG_MFD_TMIO is not set
699# CONFIG_REGULATOR is not set 708# CONFIG_REGULATOR is not set
700 709# CONFIG_MEDIA_SUPPORT is not set
701#
702# Multimedia devices
703#
704
705#
706# Multimedia core support
707#
708# CONFIG_VIDEO_DEV is not set
709# CONFIG_DVB_CORE is not set
710# CONFIG_VIDEO_MEDIA is not set
711
712#
713# Multimedia drivers
714#
715# CONFIG_DAB is not set
716 710
717# 711#
718# Graphics support 712# Graphics support
@@ -751,10 +745,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
751# CONFIG_MEMSTICK is not set 745# CONFIG_MEMSTICK is not set
752# CONFIG_NEW_LEDS is not set 746# CONFIG_NEW_LEDS is not set
753# CONFIG_ACCESSIBILITY is not set 747# CONFIG_ACCESSIBILITY is not set
748CONFIG_RTC_LIB=y
754# CONFIG_RTC_CLASS is not set 749# CONFIG_RTC_CLASS is not set
755# CONFIG_DMADEVICES is not set 750# CONFIG_DMADEVICES is not set
756# CONFIG_AUXDISPLAY is not set 751# CONFIG_AUXDISPLAY is not set
757# CONFIG_UIO is not set 752# CONFIG_UIO is not set
753
754#
755# TI VLYNQ
756#
758# CONFIG_STAGING is not set 757# CONFIG_STAGING is not set
759 758
760# 759#
@@ -766,10 +765,11 @@ CONFIG_USB_ARCH_HAS_HCD=y
766# CONFIG_REISERFS_FS is not set 765# CONFIG_REISERFS_FS is not set
767# CONFIG_JFS_FS is not set 766# CONFIG_JFS_FS is not set
768# CONFIG_FS_POSIX_ACL is not set 767# CONFIG_FS_POSIX_ACL is not set
769CONFIG_FILE_LOCKING=y
770# CONFIG_XFS_FS is not set 768# CONFIG_XFS_FS is not set
771# CONFIG_OCFS2_FS is not set 769# CONFIG_OCFS2_FS is not set
772# CONFIG_BTRFS_FS is not set 770# CONFIG_BTRFS_FS is not set
771CONFIG_FILE_LOCKING=y
772CONFIG_FSNOTIFY=y
773CONFIG_DNOTIFY=y 773CONFIG_DNOTIFY=y
774CONFIG_INOTIFY=y 774CONFIG_INOTIFY=y
775CONFIG_INOTIFY_USER=y 775CONFIG_INOTIFY_USER=y
@@ -897,27 +897,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
897CONFIG_HAVE_DYNAMIC_FTRACE=y 897CONFIG_HAVE_DYNAMIC_FTRACE=y
898CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 898CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
899CONFIG_TRACING_SUPPORT=y 899CONFIG_TRACING_SUPPORT=y
900 900# CONFIG_FTRACE is not set
901#
902# Tracers
903#
904# CONFIG_FUNCTION_TRACER is not set
905# CONFIG_IRQSOFF_TRACER is not set
906# CONFIG_SCHED_TRACER is not set
907# CONFIG_CONTEXT_SWITCH_TRACER is not set
908# CONFIG_EVENT_TRACER is not set
909# CONFIG_BOOT_TRACER is not set
910# CONFIG_TRACE_BRANCH_PROFILING is not set
911# CONFIG_STACK_TRACER is not set
912# CONFIG_KMEMTRACE is not set
913# CONFIG_WORKQUEUE_TRACER is not set
914# CONFIG_BLK_DEV_IO_TRACE is not set
915# CONFIG_DMA_API_DEBUG is not set 901# CONFIG_DMA_API_DEBUG is not set
916# CONFIG_SAMPLES is not set 902# CONFIG_SAMPLES is not set
917CONFIG_HAVE_ARCH_KGDB=y 903CONFIG_HAVE_ARCH_KGDB=y
918# CONFIG_SH_STANDARD_BIOS is not set 904# CONFIG_SH_STANDARD_BIOS is not set
919# CONFIG_EARLY_SCIF_CONSOLE is not set 905# CONFIG_EARLY_SCIF_CONSOLE is not set
920# CONFIG_MORE_COMPILE_OPTIONS is not set
921 906
922# 907#
923# Security options 908# Security options
@@ -1032,3 +1017,4 @@ CONFIG_HAS_IOMEM=y
1032CONFIG_HAS_IOPORT=y 1017CONFIG_HAS_IOPORT=y
1033CONFIG_HAS_DMA=y 1018CONFIG_HAS_DMA=y
1034CONFIG_NLATTR=y 1019CONFIG_NLATTR=y
1020CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7751_defconfig b/arch/sh/configs/se7751_defconfig
index 55f3b788e0cb..eb431c43e994 100644
--- a/arch/sh/configs/se7751_defconfig
+++ b/arch/sh/configs/se7751_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:06:44 2009 4# Thu Jun 18 13:02:26 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -74,7 +75,6 @@ CONFIG_UID16=y
74# CONFIG_SYSCTL_SYSCALL is not set 75# CONFIG_SYSCTL_SYSCALL is not set
75CONFIG_KALLSYMS=y 76CONFIG_KALLSYMS=y
76# CONFIG_KALLSYMS_EXTRA_PASS is not set 77# CONFIG_KALLSYMS_EXTRA_PASS is not set
77# CONFIG_STRIP_ASM_SYMS is not set
78# CONFIG_HOTPLUG is not set 78# CONFIG_HOTPLUG is not set
79CONFIG_PRINTK=y 79CONFIG_PRINTK=y
80CONFIG_BUG=y 80CONFIG_BUG=y
@@ -87,7 +87,12 @@ CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 87CONFIG_EVENTFD=y
88CONFIG_SHMEM=y 88CONFIG_SHMEM=y
89CONFIG_AIO=y 89CONFIG_AIO=y
90
91#
92# Performance Counters
93#
90CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
91CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 97CONFIG_SLAB=y
93# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
@@ -176,6 +181,7 @@ CONFIG_CPU_SUBTYPE_SH7751=y
176CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
177CONFIG_MMU=y 182CONFIG_MMU=y
178CONFIG_PAGE_OFFSET=0x80000000 183CONFIG_PAGE_OFFSET=0x80000000
184CONFIG_FORCE_MAX_ZONEORDER=11
179CONFIG_MEMORY_START=0x0c000000 185CONFIG_MEMORY_START=0x0c000000
180CONFIG_MEMORY_SIZE=0x04000000 186CONFIG_MEMORY_SIZE=0x04000000
181CONFIG_29BIT=y 187CONFIG_29BIT=y
@@ -190,7 +196,6 @@ CONFIG_PAGE_SIZE_4KB=y
190# CONFIG_PAGE_SIZE_8KB is not set 196# CONFIG_PAGE_SIZE_8KB is not set
191# CONFIG_PAGE_SIZE_16KB is not set 197# CONFIG_PAGE_SIZE_16KB is not set
192# CONFIG_PAGE_SIZE_64KB is not set 198# CONFIG_PAGE_SIZE_64KB is not set
193CONFIG_ENTRY_OFFSET=0x00001000
194CONFIG_SELECT_MEMORY_MODEL=y 199CONFIG_SELECT_MEMORY_MODEL=y
195CONFIG_FLATMEM_MANUAL=y 200CONFIG_FLATMEM_MANUAL=y
196# CONFIG_DISCONTIGMEM_MANUAL is not set 201# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -203,9 +208,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
203# CONFIG_PHYS_ADDR_T_64BIT is not set 208# CONFIG_PHYS_ADDR_T_64BIT is not set
204CONFIG_ZONE_DMA_FLAG=0 209CONFIG_ZONE_DMA_FLAG=0
205CONFIG_NR_QUICK=2 210CONFIG_NR_QUICK=2
206CONFIG_UNEVICTABLE_LRU=y
207CONFIG_HAVE_MLOCK=y 211CONFIG_HAVE_MLOCK=y
208CONFIG_HAVE_MLOCKED_PAGE_BIT=y 212CONFIG_HAVE_MLOCKED_PAGE_BIT=y
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
209 214
210# 215#
211# Cache configuration 216# Cache configuration
@@ -224,7 +229,6 @@ CONFIG_SH_FPU=y
224CONFIG_CPU_HAS_INTEVT=y 229CONFIG_CPU_HAS_INTEVT=y
225CONFIG_CPU_HAS_IPR_IRQ=y 230CONFIG_CPU_HAS_IPR_IRQ=y
226CONFIG_CPU_HAS_SR_RB=y 231CONFIG_CPU_HAS_SR_RB=y
227CONFIG_CPU_HAS_PTEA=y
228CONFIG_CPU_HAS_FPU=y 232CONFIG_CPU_HAS_FPU=y
229 233
230# 234#
@@ -237,9 +241,10 @@ CONFIG_SH_7751_SOLUTION_ENGINE=y
237# 241#
238# Timer and clock configuration 242# Timer and clock configuration
239# 243#
240CONFIG_SH_TMU=y 244CONFIG_SH_TIMER_TMU=y
241CONFIG_SH_TIMER_IRQ=16
242CONFIG_SH_PCLK_FREQ=60000000 245CONFIG_SH_PCLK_FREQ=60000000
246CONFIG_SH_CLK_CPG=y
247CONFIG_SH_CLK_CPG_LEGACY=y
243# CONFIG_NO_HZ is not set 248# CONFIG_NO_HZ is not set
244# CONFIG_HIGH_RES_TIMERS is not set 249# CONFIG_HIGH_RES_TIMERS is not set
245CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 250CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -281,12 +286,14 @@ CONFIG_PREEMPT_NONE=y
281# CONFIG_PREEMPT is not set 286# CONFIG_PREEMPT is not set
282CONFIG_GUSA=y 287CONFIG_GUSA=y
283# CONFIG_GUSA_RB is not set 288# CONFIG_GUSA_RB is not set
289# CONFIG_SPARSE_IRQ is not set
284 290
285# 291#
286# Boot options 292# Boot options
287# 293#
288CONFIG_ZERO_PAGE_OFFSET=0x00010000 294CONFIG_ZERO_PAGE_OFFSET=0x00010000
289CONFIG_BOOT_LINK_OFFSET=0x00800000 295CONFIG_BOOT_LINK_OFFSET=0x00800000
296CONFIG_ENTRY_OFFSET=0x00001000
290# CONFIG_UBC_WAKEUP is not set 297# CONFIG_UBC_WAKEUP is not set
291CONFIG_CMDLINE_BOOL=y 298CONFIG_CMDLINE_BOOL=y
292CONFIG_CMDLINE="console=ttySC1,38400" 299CONFIG_CMDLINE="console=ttySC1,38400"
@@ -389,6 +396,7 @@ CONFIG_IP_NF_QUEUE=y
389# CONFIG_ECONET is not set 396# CONFIG_ECONET is not set
390# CONFIG_WAN_ROUTER is not set 397# CONFIG_WAN_ROUTER is not set
391# CONFIG_PHONET is not set 398# CONFIG_PHONET is not set
399# CONFIG_IEEE802154 is not set
392# CONFIG_NET_SCHED is not set 400# CONFIG_NET_SCHED is not set
393# CONFIG_DCB is not set 401# CONFIG_DCB is not set
394 402
@@ -406,7 +414,11 @@ CONFIG_WIRELESS=y
406# CONFIG_WIRELESS_OLD_REGULATORY is not set 414# CONFIG_WIRELESS_OLD_REGULATORY is not set
407# CONFIG_WIRELESS_EXT is not set 415# CONFIG_WIRELESS_EXT is not set
408# CONFIG_LIB80211 is not set 416# CONFIG_LIB80211 is not set
409# CONFIG_MAC80211 is not set 417
418#
419# CFG80211 needs to be enabled for MAC80211
420#
421CONFIG_MAC80211_DEFAULT_PS_VALUE=0
410# CONFIG_WIMAX is not set 422# CONFIG_WIMAX is not set
411# CONFIG_RFKILL is not set 423# CONFIG_RFKILL is not set
412# CONFIG_NET_9P is not set 424# CONFIG_NET_9P is not set
@@ -535,7 +547,6 @@ CONFIG_HAVE_IDE=y
535# CONFIG_ATA is not set 547# CONFIG_ATA is not set
536# CONFIG_MD is not set 548# CONFIG_MD is not set
537CONFIG_NETDEVICES=y 549CONFIG_NETDEVICES=y
538CONFIG_COMPAT_NET_DEV_OPS=y
539# CONFIG_DUMMY is not set 550# CONFIG_DUMMY is not set
540# CONFIG_BONDING is not set 551# CONFIG_BONDING is not set
541# CONFIG_MACVLAN is not set 552# CONFIG_MACVLAN is not set
@@ -560,6 +571,7 @@ CONFIG_MII=y
560# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 571# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
561# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 572# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
562# CONFIG_B44 is not set 573# CONFIG_B44 is not set
574# CONFIG_KS8842 is not set
563CONFIG_NETDEV_1000=y 575CONFIG_NETDEV_1000=y
564CONFIG_NETDEV_10000=y 576CONFIG_NETDEV_10000=y
565 577
@@ -660,22 +672,7 @@ CONFIG_SSB_POSSIBLE=y
660# CONFIG_HTC_PASIC3 is not set 672# CONFIG_HTC_PASIC3 is not set
661# CONFIG_MFD_TMIO is not set 673# CONFIG_MFD_TMIO is not set
662# CONFIG_REGULATOR is not set 674# CONFIG_REGULATOR is not set
663 675# CONFIG_MEDIA_SUPPORT is not set
664#
665# Multimedia devices
666#
667
668#
669# Multimedia core support
670#
671# CONFIG_VIDEO_DEV is not set
672# CONFIG_DVB_CORE is not set
673# CONFIG_VIDEO_MEDIA is not set
674
675#
676# Multimedia drivers
677#
678# CONFIG_DAB is not set
679 676
680# 677#
681# Graphics support 678# Graphics support
@@ -714,10 +711,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
714# CONFIG_MEMSTICK is not set 711# CONFIG_MEMSTICK is not set
715# CONFIG_NEW_LEDS is not set 712# CONFIG_NEW_LEDS is not set
716# CONFIG_ACCESSIBILITY is not set 713# CONFIG_ACCESSIBILITY is not set
714CONFIG_RTC_LIB=y
717# CONFIG_RTC_CLASS is not set 715# CONFIG_RTC_CLASS is not set
718# CONFIG_DMADEVICES is not set 716# CONFIG_DMADEVICES is not set
719# CONFIG_AUXDISPLAY is not set 717# CONFIG_AUXDISPLAY is not set
720# CONFIG_UIO is not set 718# CONFIG_UIO is not set
719
720#
721# TI VLYNQ
722#
721# CONFIG_STAGING is not set 723# CONFIG_STAGING is not set
722 724
723# 725#
@@ -731,10 +733,11 @@ CONFIG_EXT2_FS=y
731# CONFIG_REISERFS_FS is not set 733# CONFIG_REISERFS_FS is not set
732# CONFIG_JFS_FS is not set 734# CONFIG_JFS_FS is not set
733# CONFIG_FS_POSIX_ACL is not set 735# CONFIG_FS_POSIX_ACL is not set
734CONFIG_FILE_LOCKING=y
735# CONFIG_XFS_FS is not set 736# CONFIG_XFS_FS is not set
736# CONFIG_OCFS2_FS is not set 737# CONFIG_OCFS2_FS is not set
737# CONFIG_BTRFS_FS is not set 738# CONFIG_BTRFS_FS is not set
739CONFIG_FILE_LOCKING=y
740CONFIG_FSNOTIFY=y
738CONFIG_DNOTIFY=y 741CONFIG_DNOTIFY=y
739CONFIG_INOTIFY=y 742CONFIG_INOTIFY=y
740CONFIG_INOTIFY_USER=y 743CONFIG_INOTIFY_USER=y
@@ -842,27 +845,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
842CONFIG_HAVE_DYNAMIC_FTRACE=y 845CONFIG_HAVE_DYNAMIC_FTRACE=y
843CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 846CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
844CONFIG_TRACING_SUPPORT=y 847CONFIG_TRACING_SUPPORT=y
845 848# CONFIG_FTRACE is not set
846#
847# Tracers
848#
849# CONFIG_FUNCTION_TRACER is not set
850# CONFIG_IRQSOFF_TRACER is not set
851# CONFIG_SCHED_TRACER is not set
852# CONFIG_CONTEXT_SWITCH_TRACER is not set
853# CONFIG_EVENT_TRACER is not set
854# CONFIG_BOOT_TRACER is not set
855# CONFIG_TRACE_BRANCH_PROFILING is not set
856# CONFIG_STACK_TRACER is not set
857# CONFIG_KMEMTRACE is not set
858# CONFIG_WORKQUEUE_TRACER is not set
859# CONFIG_BLK_DEV_IO_TRACE is not set
860# CONFIG_DMA_API_DEBUG is not set 849# CONFIG_DMA_API_DEBUG is not set
861# CONFIG_SAMPLES is not set 850# CONFIG_SAMPLES is not set
862CONFIG_HAVE_ARCH_KGDB=y 851CONFIG_HAVE_ARCH_KGDB=y
863# CONFIG_SH_STANDARD_BIOS is not set 852# CONFIG_SH_STANDARD_BIOS is not set
864# CONFIG_EARLY_SCIF_CONSOLE is not set 853# CONFIG_EARLY_SCIF_CONSOLE is not set
865# CONFIG_MORE_COMPILE_OPTIONS is not set
866 854
867# 855#
868# Security options 856# Security options
@@ -978,3 +966,4 @@ CONFIG_HAS_IOMEM=y
978CONFIG_HAS_IOPORT=y 966CONFIG_HAS_IOPORT=y
979CONFIG_HAS_DMA=y 967CONFIG_HAS_DMA=y
980CONFIG_NLATTR=y 968CONFIG_NLATTR=y
969CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/se7780_defconfig b/arch/sh/configs/se7780_defconfig
index c4f0af32efa9..756beec5fb28 100644
--- a/arch/sh/configs/se7780_defconfig
+++ b/arch/sh/configs/se7780_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:07:14 2009 4# Thu Jun 18 13:03:56 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -68,7 +69,6 @@ CONFIG_EMBEDDED=y
68CONFIG_UID16=y 69CONFIG_UID16=y
69CONFIG_SYSCTL_SYSCALL=y 70CONFIG_SYSCTL_SYSCALL=y
70# CONFIG_KALLSYMS is not set 71# CONFIG_KALLSYMS is not set
71# CONFIG_STRIP_ASM_SYMS is not set
72# CONFIG_HOTPLUG is not set 72# CONFIG_HOTPLUG is not set
73CONFIG_PRINTK=y 73CONFIG_PRINTK=y
74CONFIG_BUG=y 74CONFIG_BUG=y
@@ -81,8 +81,13 @@ CONFIG_TIMERFD=y
81CONFIG_EVENTFD=y 81CONFIG_EVENTFD=y
82CONFIG_SHMEM=y 82CONFIG_SHMEM=y
83CONFIG_AIO=y 83CONFIG_AIO=y
84
85#
86# Performance Counters
87#
84CONFIG_VM_EVENT_COUNTERS=y 88CONFIG_VM_EVENT_COUNTERS=y
85CONFIG_PCI_QUIRKS=y 89CONFIG_PCI_QUIRKS=y
90# CONFIG_STRIP_ASM_SYMS is not set
86CONFIG_COMPAT_BRK=y 91CONFIG_COMPAT_BRK=y
87CONFIG_SLAB=y 92CONFIG_SLAB=y
88# CONFIG_SLUB is not set 93# CONFIG_SLUB is not set
@@ -170,6 +175,7 @@ CONFIG_CPU_SUBTYPE_SH7780=y
170CONFIG_QUICKLIST=y 175CONFIG_QUICKLIST=y
171CONFIG_MMU=y 176CONFIG_MMU=y
172CONFIG_PAGE_OFFSET=0x80000000 177CONFIG_PAGE_OFFSET=0x80000000
178CONFIG_FORCE_MAX_ZONEORDER=11
173CONFIG_MEMORY_START=0x08000000 179CONFIG_MEMORY_START=0x08000000
174CONFIG_MEMORY_SIZE=0x08000000 180CONFIG_MEMORY_SIZE=0x08000000
175CONFIG_29BIT=y 181CONFIG_29BIT=y
@@ -186,7 +192,6 @@ CONFIG_PAGE_SIZE_4KB=y
186# CONFIG_PAGE_SIZE_8KB is not set 192# CONFIG_PAGE_SIZE_8KB is not set
187# CONFIG_PAGE_SIZE_16KB is not set 193# CONFIG_PAGE_SIZE_16KB is not set
188# CONFIG_PAGE_SIZE_64KB is not set 194# CONFIG_PAGE_SIZE_64KB is not set
189CONFIG_ENTRY_OFFSET=0x00001000
190CONFIG_SELECT_MEMORY_MODEL=y 195CONFIG_SELECT_MEMORY_MODEL=y
191# CONFIG_FLATMEM_MANUAL is not set 196# CONFIG_FLATMEM_MANUAL is not set
192# CONFIG_DISCONTIGMEM_MANUAL is not set 197# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -200,9 +205,9 @@ CONFIG_MIGRATION=y
200# CONFIG_PHYS_ADDR_T_64BIT is not set 205# CONFIG_PHYS_ADDR_T_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=0 206CONFIG_ZONE_DMA_FLAG=0
202CONFIG_NR_QUICK=2 207CONFIG_NR_QUICK=2
203CONFIG_UNEVICTABLE_LRU=y
204CONFIG_HAVE_MLOCK=y 208CONFIG_HAVE_MLOCK=y
205CONFIG_HAVE_MLOCKED_PAGE_BIT=y 209CONFIG_HAVE_MLOCKED_PAGE_BIT=y
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
206 211
207# 212#
208# Cache configuration 213# Cache configuration
@@ -233,9 +238,10 @@ CONFIG_SH_7780_SOLUTION_ENGINE=y
233# 238#
234# Timer and clock configuration 239# Timer and clock configuration
235# 240#
236CONFIG_SH_TMU=y 241CONFIG_SH_TIMER_TMU=y
237CONFIG_SH_TIMER_IRQ=28
238CONFIG_SH_PCLK_FREQ=33333333 242CONFIG_SH_PCLK_FREQ=33333333
243CONFIG_SH_CLK_CPG=y
244CONFIG_SH_CLK_CPG_LEGACY=y
239# CONFIG_NO_HZ is not set 245# CONFIG_NO_HZ is not set
240# CONFIG_HIGH_RES_TIMERS is not set 246# CONFIG_HIGH_RES_TIMERS is not set
241CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 247CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -280,6 +286,7 @@ CONFIG_GUSA=y
280# 286#
281CONFIG_ZERO_PAGE_OFFSET=0x00001000 287CONFIG_ZERO_PAGE_OFFSET=0x00001000
282CONFIG_BOOT_LINK_OFFSET=0x00810000 288CONFIG_BOOT_LINK_OFFSET=0x00810000
289CONFIG_ENTRY_OFFSET=0x00001000
283CONFIG_CMDLINE_BOOL=y 290CONFIG_CMDLINE_BOOL=y
284CONFIG_CMDLINE="console=ttySC0.115200 root=/dev/sda1" 291CONFIG_CMDLINE="console=ttySC0.115200 root=/dev/sda1"
285 292
@@ -323,6 +330,7 @@ CONFIG_IP_PNP=y
323# CONFIG_NET_IPIP is not set 330# CONFIG_NET_IPIP is not set
324# CONFIG_NET_IPGRE is not set 331# CONFIG_NET_IPGRE is not set
325# CONFIG_IP_MROUTE is not set 332# CONFIG_IP_MROUTE is not set
333# CONFIG_ARPD is not set
326# CONFIG_SYN_COOKIES is not set 334# CONFIG_SYN_COOKIES is not set
327# CONFIG_INET_AH is not set 335# CONFIG_INET_AH is not set
328# CONFIG_INET_ESP is not set 336# CONFIG_INET_ESP is not set
@@ -377,7 +385,11 @@ CONFIG_WIRELESS=y
377# CONFIG_WIRELESS_OLD_REGULATORY is not set 385# CONFIG_WIRELESS_OLD_REGULATORY is not set
378# CONFIG_WIRELESS_EXT is not set 386# CONFIG_WIRELESS_EXT is not set
379# CONFIG_LIB80211 is not set 387# CONFIG_LIB80211 is not set
380# CONFIG_MAC80211 is not set 388
389#
390# CFG80211 needs to be enabled for MAC80211
391#
392CONFIG_MAC80211_DEFAULT_PS_VALUE=0
381# CONFIG_WIMAX is not set 393# CONFIG_WIMAX is not set
382# CONFIG_RFKILL is not set 394# CONFIG_RFKILL is not set
383 395
@@ -503,6 +515,7 @@ CONFIG_MISC_DEVICES=y
503# EEPROM support 515# EEPROM support
504# 516#
505# CONFIG_EEPROM_93CX6 is not set 517# CONFIG_EEPROM_93CX6 is not set
518# CONFIG_CB710_CORE is not set
506CONFIG_HAVE_IDE=y 519CONFIG_HAVE_IDE=y
507# CONFIG_IDE is not set 520# CONFIG_IDE is not set
508 521
@@ -524,10 +537,6 @@ CONFIG_BLK_DEV_SD=y
524# CONFIG_BLK_DEV_SR is not set 537# CONFIG_BLK_DEV_SR is not set
525CONFIG_CHR_DEV_SG=y 538CONFIG_CHR_DEV_SG=y
526# CONFIG_CHR_DEV_SCH is not set 539# CONFIG_CHR_DEV_SCH is not set
527
528#
529# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
530#
531# CONFIG_SCSI_MULTI_LUN is not set 540# CONFIG_SCSI_MULTI_LUN is not set
532# CONFIG_SCSI_CONSTANTS is not set 541# CONFIG_SCSI_CONSTANTS is not set
533# CONFIG_SCSI_LOGGING is not set 542# CONFIG_SCSI_LOGGING is not set
@@ -544,6 +553,7 @@ CONFIG_SCSI_WAIT_SCAN=m
544# CONFIG_SCSI_SRP_ATTRS is not set 553# CONFIG_SCSI_SRP_ATTRS is not set
545CONFIG_SCSI_LOWLEVEL=y 554CONFIG_SCSI_LOWLEVEL=y
546# CONFIG_ISCSI_TCP is not set 555# CONFIG_ISCSI_TCP is not set
556# CONFIG_SCSI_BNX2_ISCSI is not set
547# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 557# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
548# CONFIG_SCSI_3W_9XXX is not set 558# CONFIG_SCSI_3W_9XXX is not set
549# CONFIG_SCSI_ACARD is not set 559# CONFIG_SCSI_ACARD is not set
@@ -552,6 +562,7 @@ CONFIG_SCSI_LOWLEVEL=y
552# CONFIG_SCSI_AIC7XXX_OLD is not set 562# CONFIG_SCSI_AIC7XXX_OLD is not set
553# CONFIG_SCSI_AIC79XX is not set 563# CONFIG_SCSI_AIC79XX is not set
554# CONFIG_SCSI_AIC94XX is not set 564# CONFIG_SCSI_AIC94XX is not set
565# CONFIG_SCSI_MVSAS is not set
555# CONFIG_SCSI_ARCMSR is not set 566# CONFIG_SCSI_ARCMSR is not set
556# CONFIG_MEGARAID_NEWGEN is not set 567# CONFIG_MEGARAID_NEWGEN is not set
557# CONFIG_MEGARAID_LEGACY is not set 568# CONFIG_MEGARAID_LEGACY is not set
@@ -566,7 +577,6 @@ CONFIG_SCSI_LOWLEVEL=y
566# CONFIG_SCSI_IPS is not set 577# CONFIG_SCSI_IPS is not set
567# CONFIG_SCSI_INITIO is not set 578# CONFIG_SCSI_INITIO is not set
568# CONFIG_SCSI_INIA100 is not set 579# CONFIG_SCSI_INIA100 is not set
569# CONFIG_SCSI_MVSAS is not set
570# CONFIG_SCSI_STEX is not set 580# CONFIG_SCSI_STEX is not set
571# CONFIG_SCSI_SYM53C8XX_2 is not set 581# CONFIG_SCSI_SYM53C8XX_2 is not set
572# CONFIG_SCSI_IPR is not set 582# CONFIG_SCSI_IPR is not set
@@ -643,7 +653,6 @@ CONFIG_SATA_SIL=y
643# CONFIG_IEEE1394 is not set 653# CONFIG_IEEE1394 is not set
644# CONFIG_I2O is not set 654# CONFIG_I2O is not set
645CONFIG_NETDEVICES=y 655CONFIG_NETDEVICES=y
646CONFIG_COMPAT_NET_DEV_OPS=y
647# CONFIG_DUMMY is not set 656# CONFIG_DUMMY is not set
648# CONFIG_BONDING is not set 657# CONFIG_BONDING is not set
649# CONFIG_EQUALIZER is not set 658# CONFIG_EQUALIZER is not set
@@ -709,6 +718,7 @@ CONFIG_NET_PCI=y
709# CONFIG_SMSC9420 is not set 718# CONFIG_SMSC9420 is not set
710# CONFIG_SUNDANCE is not set 719# CONFIG_SUNDANCE is not set
711# CONFIG_TLAN is not set 720# CONFIG_TLAN is not set
721# CONFIG_KS8842 is not set
712# CONFIG_VIA_RHINE is not set 722# CONFIG_VIA_RHINE is not set
713# CONFIG_ATL2 is not set 723# CONFIG_ATL2 is not set
714# CONFIG_NETDEV_1000 is not set 724# CONFIG_NETDEV_1000 is not set
@@ -842,22 +852,7 @@ CONFIG_SSB_POSSIBLE=y
842# CONFIG_HTC_PASIC3 is not set 852# CONFIG_HTC_PASIC3 is not set
843# CONFIG_MFD_TMIO is not set 853# CONFIG_MFD_TMIO is not set
844# CONFIG_REGULATOR is not set 854# CONFIG_REGULATOR is not set
845 855# CONFIG_MEDIA_SUPPORT is not set
846#
847# Multimedia devices
848#
849
850#
851# Multimedia core support
852#
853# CONFIG_VIDEO_DEV is not set
854# CONFIG_DVB_CORE is not set
855# CONFIG_VIDEO_MEDIA is not set
856
857#
858# Multimedia drivers
859#
860# CONFIG_DAB is not set
861 856
862# 857#
863# Graphics support 858# Graphics support
@@ -965,7 +960,7 @@ CONFIG_HID_BELKIN=y
965CONFIG_HID_CHERRY=y 960CONFIG_HID_CHERRY=y
966CONFIG_HID_CHICONY=y 961CONFIG_HID_CHICONY=y
967CONFIG_HID_CYPRESS=y 962CONFIG_HID_CYPRESS=y
968# CONFIG_DRAGONRISE_FF is not set 963# CONFIG_HID_DRAGONRISE is not set
969CONFIG_HID_EZKEY=y 964CONFIG_HID_EZKEY=y
970# CONFIG_HID_KYE is not set 965# CONFIG_HID_KYE is not set
971CONFIG_HID_GYRATION=y 966CONFIG_HID_GYRATION=y
@@ -982,10 +977,11 @@ CONFIG_HID_PETALYNX=y
982CONFIG_HID_SAMSUNG=y 977CONFIG_HID_SAMSUNG=y
983CONFIG_HID_SONY=y 978CONFIG_HID_SONY=y
984CONFIG_HID_SUNPLUS=y 979CONFIG_HID_SUNPLUS=y
985# CONFIG_GREENASIA_FF is not set 980# CONFIG_HID_GREENASIA is not set
981# CONFIG_HID_SMARTJOYPLUS is not set
986# CONFIG_HID_TOPSEED is not set 982# CONFIG_HID_TOPSEED is not set
987CONFIG_THRUSTMASTER_FF=m 983# CONFIG_HID_THRUSTMASTER is not set
988CONFIG_ZEROPLUS_FF=m 984# CONFIG_HID_ZEROPLUS is not set
989CONFIG_USB_SUPPORT=y 985CONFIG_USB_SUPPORT=y
990CONFIG_USB_ARCH_HAS_HCD=y 986CONFIG_USB_ARCH_HAS_HCD=y
991CONFIG_USB_ARCH_HAS_OHCI=y 987CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1097,10 +1093,15 @@ CONFIG_USB_STORAGE=y
1097# CONFIG_NEW_LEDS is not set 1093# CONFIG_NEW_LEDS is not set
1098# CONFIG_ACCESSIBILITY is not set 1094# CONFIG_ACCESSIBILITY is not set
1099# CONFIG_INFINIBAND is not set 1095# CONFIG_INFINIBAND is not set
1096CONFIG_RTC_LIB=y
1100# CONFIG_RTC_CLASS is not set 1097# CONFIG_RTC_CLASS is not set
1101# CONFIG_DMADEVICES is not set 1098# CONFIG_DMADEVICES is not set
1102# CONFIG_AUXDISPLAY is not set 1099# CONFIG_AUXDISPLAY is not set
1103# CONFIG_UIO is not set 1100# CONFIG_UIO is not set
1101
1102#
1103# TI VLYNQ
1104#
1104# CONFIG_STAGING is not set 1105# CONFIG_STAGING is not set
1105 1106
1106# 1107#
@@ -1114,9 +1115,10 @@ CONFIG_EXT2_FS=y
1114# CONFIG_REISERFS_FS is not set 1115# CONFIG_REISERFS_FS is not set
1115# CONFIG_JFS_FS is not set 1116# CONFIG_JFS_FS is not set
1116# CONFIG_FS_POSIX_ACL is not set 1117# CONFIG_FS_POSIX_ACL is not set
1117CONFIG_FILE_LOCKING=y
1118# CONFIG_XFS_FS is not set 1118# CONFIG_XFS_FS is not set
1119# CONFIG_OCFS2_FS is not set 1119# CONFIG_OCFS2_FS is not set
1120CONFIG_FILE_LOCKING=y
1121CONFIG_FSNOTIFY=y
1120# CONFIG_DNOTIFY is not set 1122# CONFIG_DNOTIFY is not set
1121CONFIG_INOTIFY=y 1123CONFIG_INOTIFY=y
1122CONFIG_INOTIFY_USER=y 1124CONFIG_INOTIFY_USER=y
@@ -1254,28 +1256,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1254CONFIG_HAVE_DYNAMIC_FTRACE=y 1256CONFIG_HAVE_DYNAMIC_FTRACE=y
1255CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1257CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1256CONFIG_TRACING_SUPPORT=y 1258CONFIG_TRACING_SUPPORT=y
1257 1259# CONFIG_FTRACE is not set
1258#
1259# Tracers
1260#
1261# CONFIG_FUNCTION_TRACER is not set
1262# CONFIG_IRQSOFF_TRACER is not set
1263# CONFIG_SCHED_TRACER is not set
1264# CONFIG_CONTEXT_SWITCH_TRACER is not set
1265# CONFIG_EVENT_TRACER is not set
1266# CONFIG_BOOT_TRACER is not set
1267# CONFIG_TRACE_BRANCH_PROFILING is not set
1268# CONFIG_STACK_TRACER is not set
1269# CONFIG_KMEMTRACE is not set
1270# CONFIG_WORKQUEUE_TRACER is not set
1271# CONFIG_BLK_DEV_IO_TRACE is not set
1272# CONFIG_DYNAMIC_DEBUG is not set 1260# CONFIG_DYNAMIC_DEBUG is not set
1273# CONFIG_DMA_API_DEBUG is not set 1261# CONFIG_DMA_API_DEBUG is not set
1274# CONFIG_SAMPLES is not set 1262# CONFIG_SAMPLES is not set
1275CONFIG_HAVE_ARCH_KGDB=y 1263CONFIG_HAVE_ARCH_KGDB=y
1276# CONFIG_SH_STANDARD_BIOS is not set 1264# CONFIG_SH_STANDARD_BIOS is not set
1277# CONFIG_EARLY_SCIF_CONSOLE is not set 1265# CONFIG_EARLY_SCIF_CONSOLE is not set
1278# CONFIG_MORE_COMPILE_OPTIONS is not set
1279 1266
1280# 1267#
1281# Security options 1268# Security options
@@ -1385,3 +1372,4 @@ CONFIG_HAS_IOMEM=y
1385CONFIG_HAS_IOPORT=y 1372CONFIG_HAS_IOPORT=y
1386CONFIG_HAS_DMA=y 1373CONFIG_HAS_DMA=y
1387CONFIG_NLATTR=y 1374CONFIG_NLATTR=y
1375CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig
index f9c6e51dc0b0..7fedaaee861d 100644
--- a/arch/sh/configs/sh03_defconfig
+++ b/arch/sh/configs/sh03_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:07:56 2009 4# Thu Jun 18 13:04:41 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -17,9 +17,11 @@ CONFIG_GENERIC_IRQ_PROBE=y
17# CONFIG_GENERIC_GPIO is not set 17# CONFIG_GENERIC_GPIO is not set
18CONFIG_GENERIC_TIME=y 18CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20CONFIG_GENERIC_CMOS_UPDATE=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 21# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 22CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 23CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -77,7 +79,6 @@ CONFIG_UID16=y
77# CONFIG_SYSCTL_SYSCALL is not set 79# CONFIG_SYSCTL_SYSCALL is not set
78CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
79# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
80# CONFIG_STRIP_ASM_SYMS is not set
81CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y 83CONFIG_PRINTK=y
83CONFIG_BUG=y 84CONFIG_BUG=y
@@ -90,15 +91,20 @@ CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 92CONFIG_SHMEM=y
92CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
93CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_PCI_QUIRKS=y 99CONFIG_PCI_QUIRKS=y
100# CONFIG_STRIP_ASM_SYMS is not set
95CONFIG_COMPAT_BRK=y 101CONFIG_COMPAT_BRK=y
96CONFIG_SLAB=y 102CONFIG_SLAB=y
97# CONFIG_SLUB is not set 103# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set 104# CONFIG_SLOB is not set
99CONFIG_PROFILING=y 105CONFIG_PROFILING=y
100CONFIG_TRACEPOINTS=y 106CONFIG_TRACEPOINTS=y
101# CONFIG_MARKERS is not set 107CONFIG_MARKERS=y
102CONFIG_OPROFILE=m 108CONFIG_OPROFILE=m
103CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
104# CONFIG_KPROBES is not set 110# CONFIG_KPROBES is not set
@@ -183,6 +189,7 @@ CONFIG_CPU_SUBTYPE_SH7751=y
183CONFIG_QUICKLIST=y 189CONFIG_QUICKLIST=y
184CONFIG_MMU=y 190CONFIG_MMU=y
185CONFIG_PAGE_OFFSET=0x80000000 191CONFIG_PAGE_OFFSET=0x80000000
192CONFIG_FORCE_MAX_ZONEORDER=11
186CONFIG_MEMORY_START=0x08000000 193CONFIG_MEMORY_START=0x08000000
187CONFIG_MEMORY_SIZE=0x08000000 194CONFIG_MEMORY_SIZE=0x08000000
188CONFIG_29BIT=y 195CONFIG_29BIT=y
@@ -197,7 +204,6 @@ CONFIG_PAGE_SIZE_4KB=y
197# CONFIG_PAGE_SIZE_8KB is not set 204# CONFIG_PAGE_SIZE_8KB is not set
198# CONFIG_PAGE_SIZE_16KB is not set 205# CONFIG_PAGE_SIZE_16KB is not set
199# CONFIG_PAGE_SIZE_64KB is not set 206# CONFIG_PAGE_SIZE_64KB is not set
200CONFIG_ENTRY_OFFSET=0x00001000
201CONFIG_SELECT_MEMORY_MODEL=y 207CONFIG_SELECT_MEMORY_MODEL=y
202CONFIG_FLATMEM_MANUAL=y 208CONFIG_FLATMEM_MANUAL=y
203# CONFIG_DISCONTIGMEM_MANUAL is not set 209# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -210,9 +216,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
210# CONFIG_PHYS_ADDR_T_64BIT is not set 216# CONFIG_PHYS_ADDR_T_64BIT is not set
211CONFIG_ZONE_DMA_FLAG=0 217CONFIG_ZONE_DMA_FLAG=0
212CONFIG_NR_QUICK=2 218CONFIG_NR_QUICK=2
213CONFIG_UNEVICTABLE_LRU=y
214CONFIG_HAVE_MLOCK=y 219CONFIG_HAVE_MLOCK=y
215CONFIG_HAVE_MLOCKED_PAGE_BIT=y 220CONFIG_HAVE_MLOCKED_PAGE_BIT=y
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
216 222
217# 223#
218# Cache configuration 224# Cache configuration
@@ -231,7 +237,6 @@ CONFIG_SH_FPU=y
231CONFIG_CPU_HAS_INTEVT=y 237CONFIG_CPU_HAS_INTEVT=y
232CONFIG_CPU_HAS_IPR_IRQ=y 238CONFIG_CPU_HAS_IPR_IRQ=y
233CONFIG_CPU_HAS_SR_RB=y 239CONFIG_CPU_HAS_SR_RB=y
234CONFIG_CPU_HAS_PTEA=y
235CONFIG_CPU_HAS_FPU=y 240CONFIG_CPU_HAS_FPU=y
236 241
237# 242#
@@ -243,9 +248,10 @@ CONFIG_SH_SH03=y
243# 248#
244# Timer and clock configuration 249# Timer and clock configuration
245# 250#
246CONFIG_SH_TMU=y 251CONFIG_SH_TIMER_TMU=y
247CONFIG_SH_TIMER_IRQ=16
248CONFIG_SH_PCLK_FREQ=60000000 252CONFIG_SH_PCLK_FREQ=60000000
253CONFIG_SH_CLK_CPG=y
254CONFIG_SH_CLK_CPG_LEGACY=y
249# CONFIG_NO_HZ is not set 255# CONFIG_NO_HZ is not set
250# CONFIG_HIGH_RES_TIMERS is not set 256# CONFIG_HIGH_RES_TIMERS is not set
251CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 257CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -287,12 +293,14 @@ CONFIG_HZ=250
287CONFIG_PREEMPT=y 293CONFIG_PREEMPT=y
288CONFIG_GUSA=y 294CONFIG_GUSA=y
289# CONFIG_GUSA_RB is not set 295# CONFIG_GUSA_RB is not set
296# CONFIG_SPARSE_IRQ is not set
290 297
291# 298#
292# Boot options 299# Boot options
293# 300#
294CONFIG_ZERO_PAGE_OFFSET=0x00004000 301CONFIG_ZERO_PAGE_OFFSET=0x00004000
295CONFIG_BOOT_LINK_OFFSET=0x00800000 302CONFIG_BOOT_LINK_OFFSET=0x00800000
303CONFIG_ENTRY_OFFSET=0x00001000
296# CONFIG_UBC_WAKEUP is not set 304# CONFIG_UBC_WAKEUP is not set
297CONFIG_CMDLINE_BOOL=y 305CONFIG_CMDLINE_BOOL=y
298CONFIG_CMDLINE="console=ttySC1,115200 mem=64M root=/dev/nfs" 306CONFIG_CMDLINE="console=ttySC1,115200 mem=64M root=/dev/nfs"
@@ -388,6 +396,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
388# CONFIG_ECONET is not set 396# CONFIG_ECONET is not set
389# CONFIG_WAN_ROUTER is not set 397# CONFIG_WAN_ROUTER is not set
390# CONFIG_PHONET is not set 398# CONFIG_PHONET is not set
399# CONFIG_IEEE802154 is not set
391# CONFIG_NET_SCHED is not set 400# CONFIG_NET_SCHED is not set
392# CONFIG_DCB is not set 401# CONFIG_DCB is not set
393 402
@@ -406,7 +415,11 @@ CONFIG_WIRELESS=y
406# CONFIG_WIRELESS_OLD_REGULATORY is not set 415# CONFIG_WIRELESS_OLD_REGULATORY is not set
407# CONFIG_WIRELESS_EXT is not set 416# CONFIG_WIRELESS_EXT is not set
408# CONFIG_LIB80211 is not set 417# CONFIG_LIB80211 is not set
409# CONFIG_MAC80211 is not set 418
419#
420# CFG80211 needs to be enabled for MAC80211
421#
422CONFIG_MAC80211_DEFAULT_PS_VALUE=0
410# CONFIG_WIMAX is not set 423# CONFIG_WIMAX is not set
411# CONFIG_RFKILL is not set 424# CONFIG_RFKILL is not set
412# CONFIG_NET_9P is not set 425# CONFIG_NET_9P is not set
@@ -454,6 +467,7 @@ CONFIG_MISC_DEVICES=y
454# EEPROM support 467# EEPROM support
455# 468#
456# CONFIG_EEPROM_93CX6 is not set 469# CONFIG_EEPROM_93CX6 is not set
470# CONFIG_CB710_CORE is not set
457CONFIG_HAVE_IDE=y 471CONFIG_HAVE_IDE=y
458CONFIG_IDE=y 472CONFIG_IDE=y
459 473
@@ -526,10 +540,6 @@ CONFIG_BLK_DEV_SR=m
526CONFIG_BLK_DEV_SR_VENDOR=y 540CONFIG_BLK_DEV_SR_VENDOR=y
527CONFIG_CHR_DEV_SG=m 541CONFIG_CHR_DEV_SG=m
528# CONFIG_CHR_DEV_SCH is not set 542# CONFIG_CHR_DEV_SCH is not set
529
530#
531# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
532#
533# CONFIG_SCSI_MULTI_LUN is not set 543# CONFIG_SCSI_MULTI_LUN is not set
534# CONFIG_SCSI_CONSTANTS is not set 544# CONFIG_SCSI_CONSTANTS is not set
535# CONFIG_SCSI_LOGGING is not set 545# CONFIG_SCSI_LOGGING is not set
@@ -547,6 +557,7 @@ CONFIG_SCSI_WAIT_SCAN=m
547CONFIG_SCSI_LOWLEVEL=y 557CONFIG_SCSI_LOWLEVEL=y
548# CONFIG_ISCSI_TCP is not set 558# CONFIG_ISCSI_TCP is not set
549# CONFIG_SCSI_CXGB3_ISCSI is not set 559# CONFIG_SCSI_CXGB3_ISCSI is not set
560# CONFIG_SCSI_BNX2_ISCSI is not set
550# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 561# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
551# CONFIG_SCSI_3W_9XXX is not set 562# CONFIG_SCSI_3W_9XXX is not set
552# CONFIG_SCSI_ACARD is not set 563# CONFIG_SCSI_ACARD is not set
@@ -555,6 +566,7 @@ CONFIG_SCSI_LOWLEVEL=y
555# CONFIG_SCSI_AIC7XXX_OLD is not set 566# CONFIG_SCSI_AIC7XXX_OLD is not set
556# CONFIG_SCSI_AIC79XX is not set 567# CONFIG_SCSI_AIC79XX is not set
557# CONFIG_SCSI_AIC94XX is not set 568# CONFIG_SCSI_AIC94XX is not set
569# CONFIG_SCSI_MVSAS is not set
558# CONFIG_SCSI_ARCMSR is not set 570# CONFIG_SCSI_ARCMSR is not set
559# CONFIG_MEGARAID_NEWGEN is not set 571# CONFIG_MEGARAID_NEWGEN is not set
560# CONFIG_MEGARAID_LEGACY is not set 572# CONFIG_MEGARAID_LEGACY is not set
@@ -569,7 +581,6 @@ CONFIG_SCSI_LOWLEVEL=y
569# CONFIG_SCSI_IPS is not set 581# CONFIG_SCSI_IPS is not set
570# CONFIG_SCSI_INITIO is not set 582# CONFIG_SCSI_INITIO is not set
571# CONFIG_SCSI_INIA100 is not set 583# CONFIG_SCSI_INIA100 is not set
572# CONFIG_SCSI_MVSAS is not set
573# CONFIG_SCSI_STEX is not set 584# CONFIG_SCSI_STEX is not set
574# CONFIG_SCSI_SYM53C8XX_2 is not set 585# CONFIG_SCSI_SYM53C8XX_2 is not set
575# CONFIG_SCSI_QLOGIC_1280 is not set 586# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -598,7 +609,6 @@ CONFIG_SCSI_LOWLEVEL=y
598# CONFIG_IEEE1394 is not set 609# CONFIG_IEEE1394 is not set
599# CONFIG_I2O is not set 610# CONFIG_I2O is not set
600CONFIG_NETDEVICES=y 611CONFIG_NETDEVICES=y
601CONFIG_COMPAT_NET_DEV_OPS=y
602# CONFIG_DUMMY is not set 612# CONFIG_DUMMY is not set
603# CONFIG_BONDING is not set 613# CONFIG_BONDING is not set
604# CONFIG_MACVLAN is not set 614# CONFIG_MACVLAN is not set
@@ -647,6 +657,7 @@ CONFIG_8139CP=y
647# CONFIG_SMSC9420 is not set 657# CONFIG_SMSC9420 is not set
648# CONFIG_SUNDANCE is not set 658# CONFIG_SUNDANCE is not set
649# CONFIG_TLAN is not set 659# CONFIG_TLAN is not set
660# CONFIG_KS8842 is not set
650# CONFIG_VIA_RHINE is not set 661# CONFIG_VIA_RHINE is not set
651# CONFIG_SC92031 is not set 662# CONFIG_SC92031 is not set
652# CONFIG_ATL2 is not set 663# CONFIG_ATL2 is not set
@@ -845,22 +856,7 @@ CONFIG_SSB_POSSIBLE=y
845# CONFIG_HTC_PASIC3 is not set 856# CONFIG_HTC_PASIC3 is not set
846# CONFIG_MFD_TMIO is not set 857# CONFIG_MFD_TMIO is not set
847# CONFIG_REGULATOR is not set 858# CONFIG_REGULATOR is not set
848 859# CONFIG_MEDIA_SUPPORT is not set
849#
850# Multimedia devices
851#
852
853#
854# Multimedia core support
855#
856# CONFIG_VIDEO_DEV is not set
857# CONFIG_DVB_CORE is not set
858# CONFIG_VIDEO_MEDIA is not set
859
860#
861# Multimedia drivers
862#
863# CONFIG_DAB is not set
864 860
865# 861#
866# Graphics support 862# Graphics support
@@ -916,10 +912,15 @@ CONFIG_USB_ARCH_HAS_EHCI=y
916# CONFIG_NEW_LEDS is not set 912# CONFIG_NEW_LEDS is not set
917# CONFIG_ACCESSIBILITY is not set 913# CONFIG_ACCESSIBILITY is not set
918# CONFIG_INFINIBAND is not set 914# CONFIG_INFINIBAND is not set
915CONFIG_RTC_LIB=y
919# CONFIG_RTC_CLASS is not set 916# CONFIG_RTC_CLASS is not set
920# CONFIG_DMADEVICES is not set 917# CONFIG_DMADEVICES is not set
921# CONFIG_AUXDISPLAY is not set 918# CONFIG_AUXDISPLAY is not set
922# CONFIG_UIO is not set 919# CONFIG_UIO is not set
920
921#
922# TI VLYNQ
923#
923# CONFIG_STAGING is not set 924# CONFIG_STAGING is not set
924 925
925# 926#
@@ -942,10 +943,11 @@ CONFIG_FS_MBCACHE=y
942# CONFIG_REISERFS_FS is not set 943# CONFIG_REISERFS_FS is not set
943# CONFIG_JFS_FS is not set 944# CONFIG_JFS_FS is not set
944CONFIG_FS_POSIX_ACL=y 945CONFIG_FS_POSIX_ACL=y
945CONFIG_FILE_LOCKING=y
946# CONFIG_XFS_FS is not set 946# CONFIG_XFS_FS is not set
947# CONFIG_OCFS2_FS is not set 947# CONFIG_OCFS2_FS is not set
948# CONFIG_BTRFS_FS is not set 948# CONFIG_BTRFS_FS is not set
949CONFIG_FILE_LOCKING=y
950CONFIG_FSNOTIFY=y
949CONFIG_DNOTIFY=y 951CONFIG_DNOTIFY=y
950CONFIG_INOTIFY=y 952CONFIG_INOTIFY=y
951CONFIG_INOTIFY_USER=y 953CONFIG_INOTIFY_USER=y
@@ -1120,25 +1122,11 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1120CONFIG_HAVE_DYNAMIC_FTRACE=y 1122CONFIG_HAVE_DYNAMIC_FTRACE=y
1121CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1123CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1122CONFIG_RING_BUFFER=y 1124CONFIG_RING_BUFFER=y
1125CONFIG_EVENT_TRACING=y
1126CONFIG_CONTEXT_SWITCH_TRACER=y
1123CONFIG_TRACING=y 1127CONFIG_TRACING=y
1124CONFIG_TRACING_SUPPORT=y 1128CONFIG_TRACING_SUPPORT=y
1125 1129# CONFIG_FTRACE is not set
1126#
1127# Tracers
1128#
1129# CONFIG_FUNCTION_TRACER is not set
1130# CONFIG_IRQSOFF_TRACER is not set
1131# CONFIG_PREEMPT_TRACER is not set
1132# CONFIG_SCHED_TRACER is not set
1133# CONFIG_CONTEXT_SWITCH_TRACER is not set
1134# CONFIG_EVENT_TRACER is not set
1135# CONFIG_BOOT_TRACER is not set
1136# CONFIG_TRACE_BRANCH_PROFILING is not set
1137# CONFIG_STACK_TRACER is not set
1138# CONFIG_KMEMTRACE is not set
1139# CONFIG_WORKQUEUE_TRACER is not set
1140# CONFIG_BLK_DEV_IO_TRACE is not set
1141# CONFIG_FTRACE_STARTUP_TEST is not set
1142# CONFIG_DYNAMIC_DEBUG is not set 1130# CONFIG_DYNAMIC_DEBUG is not set
1143# CONFIG_DMA_API_DEBUG is not set 1131# CONFIG_DMA_API_DEBUG is not set
1144# CONFIG_SAMPLES is not set 1132# CONFIG_SAMPLES is not set
@@ -1146,7 +1134,6 @@ CONFIG_HAVE_ARCH_KGDB=y
1146CONFIG_SH_STANDARD_BIOS=y 1134CONFIG_SH_STANDARD_BIOS=y
1147# CONFIG_EARLY_SCIF_CONSOLE is not set 1135# CONFIG_EARLY_SCIF_CONSOLE is not set
1148# CONFIG_EARLY_PRINTK is not set 1136# CONFIG_EARLY_PRINTK is not set
1149# CONFIG_MORE_COMPILE_OPTIONS is not set
1150 1137
1151# 1138#
1152# Security options 1139# Security options
@@ -1273,3 +1260,4 @@ CONFIG_HAS_IOMEM=y
1273CONFIG_HAS_IOPORT=y 1260CONFIG_HAS_IOPORT=y
1274CONFIG_HAS_DMA=y 1261CONFIG_HAS_DMA=y
1275CONFIG_NLATTR=y 1262CONFIG_NLATTR=y
1263CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7710voipgw_defconfig b/arch/sh/configs/sh7710voipgw_defconfig
index 48b58098cf84..c296ca5d95cb 100644
--- a/arch/sh/configs/sh7710voipgw_defconfig
+++ b/arch/sh/configs/sh7710voipgw_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:09:16 2009 4# Thu Jun 18 13:06:13 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -74,7 +75,6 @@ CONFIG_UID16=y
74# CONFIG_SYSCTL_SYSCALL is not set 75# CONFIG_SYSCTL_SYSCALL is not set
75CONFIG_KALLSYMS=y 76CONFIG_KALLSYMS=y
76# CONFIG_KALLSYMS_EXTRA_PASS is not set 77# CONFIG_KALLSYMS_EXTRA_PASS is not set
77# CONFIG_STRIP_ASM_SYMS is not set
78CONFIG_HOTPLUG=y 78CONFIG_HOTPLUG=y
79CONFIG_PRINTK=y 79CONFIG_PRINTK=y
80CONFIG_BUG=y 80CONFIG_BUG=y
@@ -87,7 +87,12 @@ CONFIG_TIMERFD=y
87CONFIG_EVENTFD=y 87CONFIG_EVENTFD=y
88# CONFIG_SHMEM is not set 88# CONFIG_SHMEM is not set
89CONFIG_AIO=y 89CONFIG_AIO=y
90
91#
92# Performance Counters
93#
90CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
91CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 97CONFIG_SLAB=y
93# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
@@ -176,6 +181,7 @@ CONFIG_CPU_SUBTYPE_SH7710=y
176CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
177CONFIG_MMU=y 182CONFIG_MMU=y
178CONFIG_PAGE_OFFSET=0x80000000 183CONFIG_PAGE_OFFSET=0x80000000
184CONFIG_FORCE_MAX_ZONEORDER=11
179CONFIG_MEMORY_START=0x0c000000 185CONFIG_MEMORY_START=0x0c000000
180CONFIG_MEMORY_SIZE=0x00800000 186CONFIG_MEMORY_SIZE=0x00800000
181CONFIG_29BIT=y 187CONFIG_29BIT=y
@@ -190,7 +196,6 @@ CONFIG_PAGE_SIZE_4KB=y
190# CONFIG_PAGE_SIZE_8KB is not set 196# CONFIG_PAGE_SIZE_8KB is not set
191# CONFIG_PAGE_SIZE_16KB is not set 197# CONFIG_PAGE_SIZE_16KB is not set
192# CONFIG_PAGE_SIZE_64KB is not set 198# CONFIG_PAGE_SIZE_64KB is not set
193CONFIG_ENTRY_OFFSET=0x00001000
194CONFIG_SELECT_MEMORY_MODEL=y 199CONFIG_SELECT_MEMORY_MODEL=y
195CONFIG_FLATMEM_MANUAL=y 200CONFIG_FLATMEM_MANUAL=y
196# CONFIG_DISCONTIGMEM_MANUAL is not set 201# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -203,9 +208,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
203# CONFIG_PHYS_ADDR_T_64BIT is not set 208# CONFIG_PHYS_ADDR_T_64BIT is not set
204CONFIG_ZONE_DMA_FLAG=0 209CONFIG_ZONE_DMA_FLAG=0
205CONFIG_NR_QUICK=2 210CONFIG_NR_QUICK=2
206CONFIG_UNEVICTABLE_LRU=y
207CONFIG_HAVE_MLOCK=y 211CONFIG_HAVE_MLOCK=y
208CONFIG_HAVE_MLOCKED_PAGE_BIT=y 212CONFIG_HAVE_MLOCKED_PAGE_BIT=y
213CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
209 214
210# 215#
211# Cache configuration 216# Cache configuration
@@ -234,9 +239,10 @@ CONFIG_CPU_HAS_DSP=y
234# 239#
235# Timer and clock configuration 240# Timer and clock configuration
236# 241#
237CONFIG_SH_TMU=y 242CONFIG_SH_TIMER_TMU=y
238CONFIG_SH_TIMER_IRQ=16
239CONFIG_SH_PCLK_FREQ=32768000 243CONFIG_SH_PCLK_FREQ=32768000
244CONFIG_SH_CLK_CPG=y
245CONFIG_SH_CLK_CPG_LEGACY=y
240# CONFIG_NO_HZ is not set 246# CONFIG_NO_HZ is not set
241# CONFIG_HIGH_RES_TIMERS is not set 247# CONFIG_HIGH_RES_TIMERS is not set
242CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 248CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -278,12 +284,14 @@ CONFIG_PREEMPT_NONE=y
278# CONFIG_PREEMPT is not set 284# CONFIG_PREEMPT is not set
279CONFIG_GUSA=y 285CONFIG_GUSA=y
280# CONFIG_GUSA_RB is not set 286# CONFIG_GUSA_RB is not set
287# CONFIG_SPARSE_IRQ is not set
281 288
282# 289#
283# Boot options 290# Boot options
284# 291#
285CONFIG_ZERO_PAGE_OFFSET=0x00001000 292CONFIG_ZERO_PAGE_OFFSET=0x00001000
286CONFIG_BOOT_LINK_OFFSET=0x00800000 293CONFIG_BOOT_LINK_OFFSET=0x00800000
294CONFIG_ENTRY_OFFSET=0x00001000
287# CONFIG_CMDLINE_BOOL is not set 295# CONFIG_CMDLINE_BOOL is not set
288 296
289# 297#
@@ -380,6 +388,7 @@ CONFIG_NETFILTER_ADVANCED=y
380# CONFIG_ECONET is not set 388# CONFIG_ECONET is not set
381# CONFIG_WAN_ROUTER is not set 389# CONFIG_WAN_ROUTER is not set
382# CONFIG_PHONET is not set 390# CONFIG_PHONET is not set
391# CONFIG_IEEE802154 is not set
383CONFIG_NET_SCHED=y 392CONFIG_NET_SCHED=y
384 393
385# 394#
@@ -434,7 +443,11 @@ CONFIG_WIRELESS=y
434# CONFIG_WIRELESS_OLD_REGULATORY is not set 443# CONFIG_WIRELESS_OLD_REGULATORY is not set
435# CONFIG_WIRELESS_EXT is not set 444# CONFIG_WIRELESS_EXT is not set
436# CONFIG_LIB80211 is not set 445# CONFIG_LIB80211 is not set
437# CONFIG_MAC80211 is not set 446
447#
448# CFG80211 needs to be enabled for MAC80211
449#
450CONFIG_MAC80211_DEFAULT_PS_VALUE=0
438# CONFIG_WIMAX is not set 451# CONFIG_WIMAX is not set
439# CONFIG_RFKILL is not set 452# CONFIG_RFKILL is not set
440# CONFIG_NET_9P is not set 453# CONFIG_NET_9P is not set
@@ -564,7 +577,6 @@ CONFIG_HAVE_IDE=y
564# CONFIG_ATA is not set 577# CONFIG_ATA is not set
565# CONFIG_MD is not set 578# CONFIG_MD is not set
566CONFIG_NETDEVICES=y 579CONFIG_NETDEVICES=y
567CONFIG_COMPAT_NET_DEV_OPS=y
568# CONFIG_DUMMY is not set 580# CONFIG_DUMMY is not set
569# CONFIG_BONDING is not set 581# CONFIG_BONDING is not set
570# CONFIG_MACVLAN is not set 582# CONFIG_MACVLAN is not set
@@ -590,6 +602,7 @@ CONFIG_NET_ETHERNET=y
590# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 602# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
591# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 603# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
592# CONFIG_B44 is not set 604# CONFIG_B44 is not set
605# CONFIG_KS8842 is not set
593CONFIG_NETDEV_1000=y 606CONFIG_NETDEV_1000=y
594CONFIG_NETDEV_10000=y 607CONFIG_NETDEV_10000=y
595 608
@@ -693,22 +706,7 @@ CONFIG_SSB_POSSIBLE=y
693# CONFIG_HTC_PASIC3 is not set 706# CONFIG_HTC_PASIC3 is not set
694# CONFIG_MFD_TMIO is not set 707# CONFIG_MFD_TMIO is not set
695# CONFIG_REGULATOR is not set 708# CONFIG_REGULATOR is not set
696 709# CONFIG_MEDIA_SUPPORT is not set
697#
698# Multimedia devices
699#
700
701#
702# Multimedia core support
703#
704# CONFIG_VIDEO_DEV is not set
705# CONFIG_DVB_CORE is not set
706# CONFIG_VIDEO_MEDIA is not set
707
708#
709# Multimedia drivers
710#
711# CONFIG_DAB is not set
712 710
713# 711#
714# Graphics support 712# Graphics support
@@ -756,10 +754,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
756# CONFIG_MEMSTICK is not set 754# CONFIG_MEMSTICK is not set
757# CONFIG_NEW_LEDS is not set 755# CONFIG_NEW_LEDS is not set
758# CONFIG_ACCESSIBILITY is not set 756# CONFIG_ACCESSIBILITY is not set
757CONFIG_RTC_LIB=y
759# CONFIG_RTC_CLASS is not set 758# CONFIG_RTC_CLASS is not set
760# CONFIG_DMADEVICES is not set 759# CONFIG_DMADEVICES is not set
761# CONFIG_AUXDISPLAY is not set 760# CONFIG_AUXDISPLAY is not set
762# CONFIG_UIO is not set 761# CONFIG_UIO is not set
762
763#
764# TI VLYNQ
765#
763# CONFIG_STAGING is not set 766# CONFIG_STAGING is not set
764 767
765# 768#
@@ -771,12 +774,14 @@ CONFIG_USB_ARCH_HAS_HCD=y
771# CONFIG_REISERFS_FS is not set 774# CONFIG_REISERFS_FS is not set
772# CONFIG_JFS_FS is not set 775# CONFIG_JFS_FS is not set
773# CONFIG_FS_POSIX_ACL is not set 776# CONFIG_FS_POSIX_ACL is not set
774CONFIG_FILE_LOCKING=y
775# CONFIG_XFS_FS is not set 777# CONFIG_XFS_FS is not set
776# CONFIG_OCFS2_FS is not set 778# CONFIG_OCFS2_FS is not set
777# CONFIG_BTRFS_FS is not set 779# CONFIG_BTRFS_FS is not set
780CONFIG_FILE_LOCKING=y
781CONFIG_FSNOTIFY=y
778# CONFIG_DNOTIFY is not set 782# CONFIG_DNOTIFY is not set
779# CONFIG_INOTIFY is not set 783# CONFIG_INOTIFY is not set
784CONFIG_INOTIFY_USER=y
780# CONFIG_QUOTA is not set 785# CONFIG_QUOTA is not set
781# CONFIG_AUTOFS_FS is not set 786# CONFIG_AUTOFS_FS is not set
782# CONFIG_AUTOFS4_FS is not set 787# CONFIG_AUTOFS4_FS is not set
@@ -881,28 +886,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y
881CONFIG_HAVE_DYNAMIC_FTRACE=y 886CONFIG_HAVE_DYNAMIC_FTRACE=y
882CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 887CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
883CONFIG_TRACING_SUPPORT=y 888CONFIG_TRACING_SUPPORT=y
884 889# CONFIG_FTRACE is not set
885#
886# Tracers
887#
888# CONFIG_FUNCTION_TRACER is not set
889# CONFIG_IRQSOFF_TRACER is not set
890# CONFIG_SCHED_TRACER is not set
891# CONFIG_CONTEXT_SWITCH_TRACER is not set
892# CONFIG_EVENT_TRACER is not set
893# CONFIG_BOOT_TRACER is not set
894# CONFIG_TRACE_BRANCH_PROFILING is not set
895# CONFIG_STACK_TRACER is not set
896# CONFIG_KMEMTRACE is not set
897# CONFIG_WORKQUEUE_TRACER is not set
898# CONFIG_BLK_DEV_IO_TRACE is not set
899# CONFIG_DYNAMIC_DEBUG is not set 890# CONFIG_DYNAMIC_DEBUG is not set
900# CONFIG_DMA_API_DEBUG is not set 891# CONFIG_DMA_API_DEBUG is not set
901# CONFIG_SAMPLES is not set 892# CONFIG_SAMPLES is not set
902CONFIG_HAVE_ARCH_KGDB=y 893CONFIG_HAVE_ARCH_KGDB=y
903# CONFIG_SH_STANDARD_BIOS is not set 894# CONFIG_SH_STANDARD_BIOS is not set
904# CONFIG_EARLY_SCIF_CONSOLE is not set 895# CONFIG_EARLY_SCIF_CONSOLE is not set
905# CONFIG_MORE_COMPILE_OPTIONS is not set
906 896
907# 897#
908# Security options 898# Security options
@@ -1017,3 +1007,4 @@ CONFIG_HAS_IOMEM=y
1017CONFIG_HAS_IOPORT=y 1007CONFIG_HAS_IOPORT=y
1018CONFIG_HAS_DMA=y 1008CONFIG_HAS_DMA=y
1019CONFIG_NLATTR=y 1009CONFIG_NLATTR=y
1010CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7724_generic_defconfig b/arch/sh/configs/sh7724_generic_defconfig
index ec8f18c7684c..ba26be1b4134 100644
--- a/arch/sh/configs/sh7724_generic_defconfig
+++ b/arch/sh/configs/sh7724_generic_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:09:47 2009 4# Thu Jun 18 13:06:48 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20CONFIG_ARCH_SUSPEND_POSSIBLE=y 20CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_CMT=y 22CONFIG_SYS_SUPPORTS_CMT=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -79,7 +80,6 @@ CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y 80CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_EXTRA_PASS is not set 82# CONFIG_KALLSYMS_EXTRA_PASS is not set
82# CONFIG_STRIP_ASM_SYMS is not set
83CONFIG_HOTPLUG=y 83CONFIG_HOTPLUG=y
84CONFIG_PRINTK=y 84CONFIG_PRINTK=y
85CONFIG_BUG=y 85CONFIG_BUG=y
@@ -92,14 +92,19 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 92CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 93CONFIG_SHMEM=y
94CONFIG_AIO=y 94CONFIG_AIO=y
95
96#
97# Performance Counters
98#
95CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100# CONFIG_STRIP_ASM_SYMS is not set
96# CONFIG_COMPAT_BRK is not set 101# CONFIG_COMPAT_BRK is not set
97# CONFIG_SLAB is not set 102# CONFIG_SLAB is not set
98CONFIG_SLUB=y 103CONFIG_SLUB=y
99# CONFIG_SLOB is not set 104# CONFIG_SLOB is not set
100CONFIG_PROFILING=y 105CONFIG_PROFILING=y
101CONFIG_TRACEPOINTS=y 106CONFIG_TRACEPOINTS=y
102# CONFIG_MARKERS is not set 107CONFIG_MARKERS=y
103CONFIG_OPROFILE=y 108CONFIG_OPROFILE=y
104CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
105CONFIG_HAVE_IOREMAP_PROT=y 110CONFIG_HAVE_IOREMAP_PROT=y
@@ -180,6 +185,7 @@ CONFIG_CPU_SUBTYPE_SH7724=y
180CONFIG_QUICKLIST=y 185CONFIG_QUICKLIST=y
181CONFIG_MMU=y 186CONFIG_MMU=y
182CONFIG_PAGE_OFFSET=0x80000000 187CONFIG_PAGE_OFFSET=0x80000000
188CONFIG_FORCE_MAX_ZONEORDER=11
183CONFIG_MEMORY_START=0x08000000 189CONFIG_MEMORY_START=0x08000000
184CONFIG_MEMORY_SIZE=0x04000000 190CONFIG_MEMORY_SIZE=0x04000000
185CONFIG_29BIT=y 191CONFIG_29BIT=y
@@ -197,7 +203,6 @@ CONFIG_PAGE_SIZE_4KB=y
197# CONFIG_PAGE_SIZE_8KB is not set 203# CONFIG_PAGE_SIZE_8KB is not set
198# CONFIG_PAGE_SIZE_16KB is not set 204# CONFIG_PAGE_SIZE_16KB is not set
199# CONFIG_PAGE_SIZE_64KB is not set 205# CONFIG_PAGE_SIZE_64KB is not set
200CONFIG_ENTRY_OFFSET=0x00001000
201CONFIG_SELECT_MEMORY_MODEL=y 206CONFIG_SELECT_MEMORY_MODEL=y
202# CONFIG_FLATMEM_MANUAL is not set 207# CONFIG_FLATMEM_MANUAL is not set
203# CONFIG_DISCONTIGMEM_MANUAL is not set 208# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -215,9 +220,9 @@ CONFIG_MIGRATION=y
215# CONFIG_PHYS_ADDR_T_64BIT is not set 220# CONFIG_PHYS_ADDR_T_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=0 221CONFIG_ZONE_DMA_FLAG=0
217CONFIG_NR_QUICK=2 222CONFIG_NR_QUICK=2
218CONFIG_UNEVICTABLE_LRU=y
219CONFIG_HAVE_MLOCK=y 223CONFIG_HAVE_MLOCK=y
220CONFIG_HAVE_MLOCKED_PAGE_BIT=y 224CONFIG_HAVE_MLOCKED_PAGE_BIT=y
225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
221 226
222# 227#
223# Cache configuration 228# Cache configuration
@@ -235,20 +240,20 @@ CONFIG_SH_FPU=y
235# CONFIG_SH_STORE_QUEUES is not set 240# CONFIG_SH_STORE_QUEUES is not set
236CONFIG_CPU_HAS_INTEVT=y 241CONFIG_CPU_HAS_INTEVT=y
237CONFIG_CPU_HAS_SR_RB=y 242CONFIG_CPU_HAS_SR_RB=y
238CONFIG_CPU_HAS_PTEA=y
239CONFIG_CPU_HAS_FPU=y 243CONFIG_CPU_HAS_FPU=y
240 244
241# 245#
242# Board support 246# Board support
243# 247#
248# CONFIG_SH_7724_SOLUTION_ENGINE is not set
244 249
245# 250#
246# Timer and clock configuration 251# Timer and clock configuration
247# 252#
248CONFIG_SH_TMU=y 253CONFIG_SH_TIMER_TMU=y
249CONFIG_SH_TIMER_CMT=y 254CONFIG_SH_TIMER_CMT=y
250CONFIG_SH_TIMER_IRQ=16
251CONFIG_SH_PCLK_FREQ=41666666 255CONFIG_SH_PCLK_FREQ=41666666
256CONFIG_SH_CLK_CPG=y
252CONFIG_TICK_ONESHOT=y 257CONFIG_TICK_ONESHOT=y
253CONFIG_NO_HZ=y 258CONFIG_NO_HZ=y
254CONFIG_HIGH_RES_TIMERS=y 259CONFIG_HIGH_RES_TIMERS=y
@@ -305,12 +310,14 @@ CONFIG_PREEMPT_NONE=y
305# CONFIG_PREEMPT_VOLUNTARY is not set 310# CONFIG_PREEMPT_VOLUNTARY is not set
306# CONFIG_PREEMPT is not set 311# CONFIG_PREEMPT is not set
307CONFIG_GUSA=y 312CONFIG_GUSA=y
313# CONFIG_SPARSE_IRQ is not set
308 314
309# 315#
310# Boot options 316# Boot options
311# 317#
312CONFIG_ZERO_PAGE_OFFSET=0x00001000 318CONFIG_ZERO_PAGE_OFFSET=0x00001000
313CONFIG_BOOT_LINK_OFFSET=0x00800000 319CONFIG_BOOT_LINK_OFFSET=0x00800000
320CONFIG_ENTRY_OFFSET=0x00001000
314# CONFIG_CMDLINE_BOOL is not set 321# CONFIG_CMDLINE_BOOL is not set
315 322
316# 323#
@@ -335,6 +342,7 @@ CONFIG_PM=y
335CONFIG_PM_SLEEP=y 342CONFIG_PM_SLEEP=y
336CONFIG_SUSPEND=y 343CONFIG_SUSPEND=y
337CONFIG_SUSPEND_FREEZER=y 344CONFIG_SUSPEND_FREEZER=y
345CONFIG_HIBERNATION_NVS=y
338CONFIG_HIBERNATION=y 346CONFIG_HIBERNATION=y
339CONFIG_PM_STD_PARTITION="" 347CONFIG_PM_STD_PARTITION=""
340CONFIG_CPU_IDLE=y 348CONFIG_CPU_IDLE=y
@@ -451,7 +459,6 @@ CONFIG_I2C_SH_MOBILE=y
451# CONFIG_SENSORS_PCF8574 is not set 459# CONFIG_SENSORS_PCF8574 is not set
452# CONFIG_PCF8575 is not set 460# CONFIG_PCF8575 is not set
453# CONFIG_SENSORS_PCA9539 is not set 461# CONFIG_SENSORS_PCA9539 is not set
454# CONFIG_SENSORS_MAX6875 is not set
455# CONFIG_SENSORS_TSL2550 is not set 462# CONFIG_SENSORS_TSL2550 is not set
456# CONFIG_I2C_DEBUG_CORE is not set 463# CONFIG_I2C_DEBUG_CORE is not set
457# CONFIG_I2C_DEBUG_ALGO is not set 464# CONFIG_I2C_DEBUG_ALGO is not set
@@ -484,21 +491,7 @@ CONFIG_SSB_POSSIBLE=y
484# CONFIG_MFD_WM8350_I2C is not set 491# CONFIG_MFD_WM8350_I2C is not set
485# CONFIG_MFD_PCF50633 is not set 492# CONFIG_MFD_PCF50633 is not set
486# CONFIG_REGULATOR is not set 493# CONFIG_REGULATOR is not set
487 494# CONFIG_MEDIA_SUPPORT is not set
488#
489# Multimedia devices
490#
491
492#
493# Multimedia core support
494#
495# CONFIG_VIDEO_DEV is not set
496# CONFIG_VIDEO_MEDIA is not set
497
498#
499# Multimedia drivers
500#
501# CONFIG_DAB is not set
502 495
503# 496#
504# Graphics support 497# Graphics support
@@ -570,6 +563,7 @@ CONFIG_RTC_INTF_DEV=y
570# on-CPU RTC drivers 563# on-CPU RTC drivers
571# 564#
572CONFIG_RTC_DRV_SH=y 565CONFIG_RTC_DRV_SH=y
566# CONFIG_RTC_DRV_GENERIC is not set
573# CONFIG_DMADEVICES is not set 567# CONFIG_DMADEVICES is not set
574# CONFIG_AUXDISPLAY is not set 568# CONFIG_AUXDISPLAY is not set
575CONFIG_UIO=y 569CONFIG_UIO=y
@@ -577,6 +571,10 @@ CONFIG_UIO=y
577CONFIG_UIO_PDRV_GENIRQ=y 571CONFIG_UIO_PDRV_GENIRQ=y
578# CONFIG_UIO_SMX is not set 572# CONFIG_UIO_SMX is not set
579# CONFIG_UIO_SERCOS3 is not set 573# CONFIG_UIO_SERCOS3 is not set
574
575#
576# TI VLYNQ
577#
580# CONFIG_STAGING is not set 578# CONFIG_STAGING is not set
581 579
582# 580#
@@ -588,11 +586,13 @@ CONFIG_UIO_PDRV_GENIRQ=y
588# CONFIG_REISERFS_FS is not set 586# CONFIG_REISERFS_FS is not set
589# CONFIG_JFS_FS is not set 587# CONFIG_JFS_FS is not set
590# CONFIG_FS_POSIX_ACL is not set 588# CONFIG_FS_POSIX_ACL is not set
591CONFIG_FILE_LOCKING=y
592# CONFIG_XFS_FS is not set 589# CONFIG_XFS_FS is not set
593# CONFIG_BTRFS_FS is not set 590# CONFIG_BTRFS_FS is not set
591CONFIG_FILE_LOCKING=y
592CONFIG_FSNOTIFY=y
594# CONFIG_DNOTIFY is not set 593# CONFIG_DNOTIFY is not set
595# CONFIG_INOTIFY is not set 594# CONFIG_INOTIFY is not set
595CONFIG_INOTIFY_USER=y
596# CONFIG_QUOTA is not set 596# CONFIG_QUOTA is not set
597# CONFIG_AUTOFS_FS is not set 597# CONFIG_AUTOFS_FS is not set
598# CONFIG_AUTOFS4_FS is not set 598# CONFIG_AUTOFS4_FS is not set
@@ -657,30 +657,17 @@ CONFIG_HAVE_FUNCTION_TRACER=y
657CONFIG_HAVE_DYNAMIC_FTRACE=y 657CONFIG_HAVE_DYNAMIC_FTRACE=y
658CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 658CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
659CONFIG_RING_BUFFER=y 659CONFIG_RING_BUFFER=y
660CONFIG_EVENT_TRACING=y
661CONFIG_CONTEXT_SWITCH_TRACER=y
660CONFIG_TRACING=y 662CONFIG_TRACING=y
661CONFIG_TRACING_SUPPORT=y 663CONFIG_TRACING_SUPPORT=y
662 664# CONFIG_FTRACE is not set
663#
664# Tracers
665#
666# CONFIG_FUNCTION_TRACER is not set
667# CONFIG_IRQSOFF_TRACER is not set
668# CONFIG_SCHED_TRACER is not set
669# CONFIG_CONTEXT_SWITCH_TRACER is not set
670# CONFIG_EVENT_TRACER is not set
671# CONFIG_BOOT_TRACER is not set
672# CONFIG_TRACE_BRANCH_PROFILING is not set
673# CONFIG_STACK_TRACER is not set
674# CONFIG_KMEMTRACE is not set
675# CONFIG_WORKQUEUE_TRACER is not set
676# CONFIG_FTRACE_STARTUP_TEST is not set
677# CONFIG_DYNAMIC_DEBUG is not set 665# CONFIG_DYNAMIC_DEBUG is not set
678# CONFIG_DMA_API_DEBUG is not set 666# CONFIG_DMA_API_DEBUG is not set
679# CONFIG_SAMPLES is not set 667# CONFIG_SAMPLES is not set
680CONFIG_HAVE_ARCH_KGDB=y 668CONFIG_HAVE_ARCH_KGDB=y
681# CONFIG_SH_STANDARD_BIOS is not set 669# CONFIG_SH_STANDARD_BIOS is not set
682# CONFIG_EARLY_SCIF_CONSOLE is not set 670# CONFIG_EARLY_SCIF_CONSOLE is not set
683# CONFIG_MORE_COMPILE_OPTIONS is not set
684 671
685# 672#
686# Security options 673# Security options
@@ -705,3 +692,4 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
705CONFIG_HAS_IOMEM=y 692CONFIG_HAS_IOMEM=y
706CONFIG_HAS_IOPORT=y 693CONFIG_HAS_IOPORT=y
707CONFIG_HAS_DMA=y 694CONFIG_HAS_DMA=y
695CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7763rdp_defconfig b/arch/sh/configs/sh7763rdp_defconfig
index f77bc7998d2f..b1d9b2311e3c 100644
--- a/arch/sh/configs/sh7763rdp_defconfig
+++ b/arch/sh/configs/sh7763rdp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:10:12 2009 4# Thu Jun 18 13:07:15 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -79,7 +80,6 @@ CONFIG_UID16=y
79# CONFIG_SYSCTL_SYSCALL is not set 80# CONFIG_SYSCTL_SYSCALL is not set
80CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_EXTRA_PASS is not set 82# CONFIG_KALLSYMS_EXTRA_PASS is not set
82# CONFIG_STRIP_ASM_SYMS is not set
83CONFIG_HOTPLUG=y 83CONFIG_HOTPLUG=y
84CONFIG_PRINTK=y 84CONFIG_PRINTK=y
85CONFIG_BUG=y 85CONFIG_BUG=y
@@ -92,14 +92,19 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 92CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 93CONFIG_SHMEM=y
94CONFIG_AIO=y 94CONFIG_AIO=y
95
96#
97# Performance Counters
98#
95CONFIG_VM_EVENT_COUNTERS=y 99CONFIG_VM_EVENT_COUNTERS=y
100# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 101CONFIG_COMPAT_BRK=y
97CONFIG_SLAB=y 102CONFIG_SLAB=y
98# CONFIG_SLUB is not set 103# CONFIG_SLUB is not set
99# CONFIG_SLOB is not set 104# CONFIG_SLOB is not set
100CONFIG_PROFILING=y 105CONFIG_PROFILING=y
101CONFIG_TRACEPOINTS=y 106CONFIG_TRACEPOINTS=y
102# CONFIG_MARKERS is not set 107CONFIG_MARKERS=y
103CONFIG_OPROFILE=y 108CONFIG_OPROFILE=y
104CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set 110# CONFIG_KPROBES is not set
@@ -184,6 +189,7 @@ CONFIG_CPU_SUBTYPE_SH7763=y
184CONFIG_QUICKLIST=y 189CONFIG_QUICKLIST=y
185CONFIG_MMU=y 190CONFIG_MMU=y
186CONFIG_PAGE_OFFSET=0x80000000 191CONFIG_PAGE_OFFSET=0x80000000
192CONFIG_FORCE_MAX_ZONEORDER=11
187CONFIG_MEMORY_START=0x0c000000 193CONFIG_MEMORY_START=0x0c000000
188CONFIG_MEMORY_SIZE=0x04000000 194CONFIG_MEMORY_SIZE=0x04000000
189CONFIG_29BIT=y 195CONFIG_29BIT=y
@@ -200,7 +206,6 @@ CONFIG_PAGE_SIZE_4KB=y
200# CONFIG_PAGE_SIZE_8KB is not set 206# CONFIG_PAGE_SIZE_8KB is not set
201# CONFIG_PAGE_SIZE_16KB is not set 207# CONFIG_PAGE_SIZE_16KB is not set
202# CONFIG_PAGE_SIZE_64KB is not set 208# CONFIG_PAGE_SIZE_64KB is not set
203CONFIG_ENTRY_OFFSET=0x00001000
204CONFIG_SELECT_MEMORY_MODEL=y 209CONFIG_SELECT_MEMORY_MODEL=y
205# CONFIG_FLATMEM_MANUAL is not set 210# CONFIG_FLATMEM_MANUAL is not set
206# CONFIG_DISCONTIGMEM_MANUAL is not set 211# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -215,9 +220,9 @@ CONFIG_MIGRATION=y
215# CONFIG_PHYS_ADDR_T_64BIT is not set 220# CONFIG_PHYS_ADDR_T_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=0 221CONFIG_ZONE_DMA_FLAG=0
217CONFIG_NR_QUICK=2 222CONFIG_NR_QUICK=2
218CONFIG_UNEVICTABLE_LRU=y
219CONFIG_HAVE_MLOCK=y 223CONFIG_HAVE_MLOCK=y
220CONFIG_HAVE_MLOCKED_PAGE_BIT=y 224CONFIG_HAVE_MLOCKED_PAGE_BIT=y
225CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
221 226
222# 227#
223# Cache configuration 228# Cache configuration
@@ -246,9 +251,10 @@ CONFIG_SH_SH7763RDP=y
246# 251#
247# Timer and clock configuration 252# Timer and clock configuration
248# 253#
249CONFIG_SH_TMU=y 254CONFIG_SH_TIMER_TMU=y
250CONFIG_SH_TIMER_IRQ=28
251CONFIG_SH_PCLK_FREQ=66666666 255CONFIG_SH_PCLK_FREQ=66666666
256CONFIG_SH_CLK_CPG=y
257CONFIG_SH_CLK_CPG_LEGACY=y
252# CONFIG_NO_HZ is not set 258# CONFIG_NO_HZ is not set
253# CONFIG_HIGH_RES_TIMERS is not set 259# CONFIG_HIGH_RES_TIMERS is not set
254CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 260CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -289,12 +295,14 @@ CONFIG_PREEMPT_NONE=y
289# CONFIG_PREEMPT_VOLUNTARY is not set 295# CONFIG_PREEMPT_VOLUNTARY is not set
290# CONFIG_PREEMPT is not set 296# CONFIG_PREEMPT is not set
291CONFIG_GUSA=y 297CONFIG_GUSA=y
298# CONFIG_SPARSE_IRQ is not set
292 299
293# 300#
294# Boot options 301# Boot options
295# 302#
296CONFIG_ZERO_PAGE_OFFSET=0x00001000 303CONFIG_ZERO_PAGE_OFFSET=0x00001000
297CONFIG_BOOT_LINK_OFFSET=0x00800000 304CONFIG_BOOT_LINK_OFFSET=0x00800000
305CONFIG_ENTRY_OFFSET=0x00001000
298CONFIG_CMDLINE_BOOL=y 306CONFIG_CMDLINE_BOOL=y
299CONFIG_CMDLINE="console=ttySC2,115200 root=/dev/sda1 rootdelay=10" 307CONFIG_CMDLINE="console=ttySC2,115200 root=/dev/sda1 rootdelay=10"
300 308
@@ -377,6 +385,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
377# CONFIG_ECONET is not set 385# CONFIG_ECONET is not set
378# CONFIG_WAN_ROUTER is not set 386# CONFIG_WAN_ROUTER is not set
379# CONFIG_PHONET is not set 387# CONFIG_PHONET is not set
388# CONFIG_IEEE802154 is not set
380# CONFIG_NET_SCHED is not set 389# CONFIG_NET_SCHED is not set
381# CONFIG_DCB is not set 390# CONFIG_DCB is not set
382 391
@@ -396,7 +405,11 @@ CONFIG_WIRELESS=y
396CONFIG_WIRELESS_EXT=y 405CONFIG_WIRELESS_EXT=y
397CONFIG_WIRELESS_EXT_SYSFS=y 406CONFIG_WIRELESS_EXT_SYSFS=y
398# CONFIG_LIB80211 is not set 407# CONFIG_LIB80211 is not set
399# CONFIG_MAC80211 is not set 408
409#
410# CFG80211 needs to be enabled for MAC80211
411#
412CONFIG_MAC80211_DEFAULT_PS_VALUE=0
400# CONFIG_WIMAX is not set 413# CONFIG_WIMAX is not set
401# CONFIG_RFKILL is not set 414# CONFIG_RFKILL is not set
402# CONFIG_NET_9P is not set 415# CONFIG_NET_9P is not set
@@ -536,10 +549,6 @@ CONFIG_BLK_DEV_SD=y
536# CONFIG_BLK_DEV_SR is not set 549# CONFIG_BLK_DEV_SR is not set
537# CONFIG_CHR_DEV_SG is not set 550# CONFIG_CHR_DEV_SG is not set
538# CONFIG_CHR_DEV_SCH is not set 551# CONFIG_CHR_DEV_SCH is not set
539
540#
541# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
542#
543# CONFIG_SCSI_MULTI_LUN is not set 552# CONFIG_SCSI_MULTI_LUN is not set
544# CONFIG_SCSI_CONSTANTS is not set 553# CONFIG_SCSI_CONSTANTS is not set
545# CONFIG_SCSI_LOGGING is not set 554# CONFIG_SCSI_LOGGING is not set
@@ -556,6 +565,7 @@ CONFIG_SCSI_WAIT_SCAN=m
556# CONFIG_SCSI_SRP_ATTRS is not set 565# CONFIG_SCSI_SRP_ATTRS is not set
557CONFIG_SCSI_LOWLEVEL=y 566CONFIG_SCSI_LOWLEVEL=y
558# CONFIG_ISCSI_TCP is not set 567# CONFIG_ISCSI_TCP is not set
568# CONFIG_SCSI_BNX2_ISCSI is not set
559# CONFIG_LIBFC is not set 569# CONFIG_LIBFC is not set
560# CONFIG_LIBFCOE is not set 570# CONFIG_LIBFCOE is not set
561# CONFIG_SCSI_DEBUG is not set 571# CONFIG_SCSI_DEBUG is not set
@@ -564,7 +574,6 @@ CONFIG_SCSI_LOWLEVEL=y
564# CONFIG_ATA is not set 574# CONFIG_ATA is not set
565# CONFIG_MD is not set 575# CONFIG_MD is not set
566CONFIG_NETDEVICES=y 576CONFIG_NETDEVICES=y
567CONFIG_COMPAT_NET_DEV_OPS=y
568# CONFIG_DUMMY is not set 577# CONFIG_DUMMY is not set
569# CONFIG_BONDING is not set 578# CONFIG_BONDING is not set
570# CONFIG_MACVLAN is not set 579# CONFIG_MACVLAN is not set
@@ -609,6 +618,7 @@ CONFIG_SH_ETH=y
609# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 618# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
610# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 619# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
611# CONFIG_B44 is not set 620# CONFIG_B44 is not set
621# CONFIG_KS8842 is not set
612# CONFIG_NETDEV_1000 is not set 622# CONFIG_NETDEV_1000 is not set
613# CONFIG_NETDEV_10000 is not set 623# CONFIG_NETDEV_10000 is not set
614 624
@@ -727,22 +737,7 @@ CONFIG_SSB_POSSIBLE=y
727# CONFIG_HTC_PASIC3 is not set 737# CONFIG_HTC_PASIC3 is not set
728# CONFIG_MFD_TMIO is not set 738# CONFIG_MFD_TMIO is not set
729# CONFIG_REGULATOR is not set 739# CONFIG_REGULATOR is not set
730 740# CONFIG_MEDIA_SUPPORT is not set
731#
732# Multimedia devices
733#
734
735#
736# Multimedia core support
737#
738# CONFIG_VIDEO_DEV is not set
739# CONFIG_DVB_CORE is not set
740# CONFIG_VIDEO_MEDIA is not set
741
742#
743# Multimedia drivers
744#
745# CONFIG_DAB is not set
746 741
747# 742#
748# Graphics support 743# Graphics support
@@ -931,10 +926,15 @@ CONFIG_MMC_BLOCK_BOUNCE=y
931# CONFIG_MEMSTICK is not set 926# CONFIG_MEMSTICK is not set
932# CONFIG_NEW_LEDS is not set 927# CONFIG_NEW_LEDS is not set
933# CONFIG_ACCESSIBILITY is not set 928# CONFIG_ACCESSIBILITY is not set
929CONFIG_RTC_LIB=y
934# CONFIG_RTC_CLASS is not set 930# CONFIG_RTC_CLASS is not set
935# CONFIG_DMADEVICES is not set 931# CONFIG_DMADEVICES is not set
936# CONFIG_AUXDISPLAY is not set 932# CONFIG_AUXDISPLAY is not set
937# CONFIG_UIO is not set 933# CONFIG_UIO is not set
934
935#
936# TI VLYNQ
937#
938# CONFIG_STAGING is not set 938# CONFIG_STAGING is not set
939 939
940# 940#
@@ -955,10 +955,11 @@ CONFIG_FS_MBCACHE=y
955# CONFIG_REISERFS_FS is not set 955# CONFIG_REISERFS_FS is not set
956# CONFIG_JFS_FS is not set 956# CONFIG_JFS_FS is not set
957CONFIG_FS_POSIX_ACL=y 957CONFIG_FS_POSIX_ACL=y
958CONFIG_FILE_LOCKING=y
959# CONFIG_XFS_FS is not set 958# CONFIG_XFS_FS is not set
960# CONFIG_OCFS2_FS is not set 959# CONFIG_OCFS2_FS is not set
961# CONFIG_BTRFS_FS is not set 960# CONFIG_BTRFS_FS is not set
961CONFIG_FILE_LOCKING=y
962CONFIG_FSNOTIFY=y
962CONFIG_DNOTIFY=y 963CONFIG_DNOTIFY=y
963CONFIG_INOTIFY=y 964CONFIG_INOTIFY=y
964CONFIG_INOTIFY_USER=y 965CONFIG_INOTIFY_USER=y
@@ -1109,31 +1110,17 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1109CONFIG_HAVE_DYNAMIC_FTRACE=y 1110CONFIG_HAVE_DYNAMIC_FTRACE=y
1110CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1111CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1111CONFIG_RING_BUFFER=y 1112CONFIG_RING_BUFFER=y
1113CONFIG_EVENT_TRACING=y
1114CONFIG_CONTEXT_SWITCH_TRACER=y
1112CONFIG_TRACING=y 1115CONFIG_TRACING=y
1113CONFIG_TRACING_SUPPORT=y 1116CONFIG_TRACING_SUPPORT=y
1114 1117# CONFIG_FTRACE is not set
1115#
1116# Tracers
1117#
1118# CONFIG_FUNCTION_TRACER is not set
1119# CONFIG_IRQSOFF_TRACER is not set
1120# CONFIG_SCHED_TRACER is not set
1121# CONFIG_CONTEXT_SWITCH_TRACER is not set
1122# CONFIG_EVENT_TRACER is not set
1123# CONFIG_BOOT_TRACER is not set
1124# CONFIG_TRACE_BRANCH_PROFILING is not set
1125# CONFIG_STACK_TRACER is not set
1126# CONFIG_KMEMTRACE is not set
1127# CONFIG_WORKQUEUE_TRACER is not set
1128# CONFIG_BLK_DEV_IO_TRACE is not set
1129# CONFIG_FTRACE_STARTUP_TEST is not set
1130# CONFIG_DYNAMIC_DEBUG is not set 1118# CONFIG_DYNAMIC_DEBUG is not set
1131# CONFIG_DMA_API_DEBUG is not set 1119# CONFIG_DMA_API_DEBUG is not set
1132# CONFIG_SAMPLES is not set 1120# CONFIG_SAMPLES is not set
1133CONFIG_HAVE_ARCH_KGDB=y 1121CONFIG_HAVE_ARCH_KGDB=y
1134# CONFIG_SH_STANDARD_BIOS is not set 1122# CONFIG_SH_STANDARD_BIOS is not set
1135# CONFIG_EARLY_SCIF_CONSOLE is not set 1123# CONFIG_EARLY_SCIF_CONSOLE is not set
1136# CONFIG_MORE_COMPILE_OPTIONS is not set
1137 1124
1138# 1125#
1139# Security options 1126# Security options
@@ -1246,3 +1233,4 @@ CONFIG_HAS_IOMEM=y
1246CONFIG_HAS_IOPORT=y 1233CONFIG_HAS_IOPORT=y
1247CONFIG_HAS_DMA=y 1234CONFIG_HAS_DMA=y
1248CONFIG_NLATTR=y 1235CONFIG_NLATTR=y
1236CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7770_generic_defconfig b/arch/sh/configs/sh7770_generic_defconfig
index d6489b46ca5b..426a88f7a23b 100644
--- a/arch/sh/configs/sh7770_generic_defconfig
+++ b/arch/sh/configs/sh7770_generic_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc4 3# Linux kernel version: 2.6.30
4# Tue May 12 14:48:21 2009 4# Thu Jun 18 13:08:05 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -79,7 +79,6 @@ CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y 79CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
82# CONFIG_STRIP_ASM_SYMS is not set
83CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
84CONFIG_PRINTK=y 83CONFIG_PRINTK=y
85CONFIG_BUG=y 84CONFIG_BUG=y
@@ -92,14 +91,19 @@ CONFIG_TIMERFD=y
92CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
93CONFIG_SHMEM=y 92CONFIG_SHMEM=y
94CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
95CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
99# CONFIG_STRIP_ASM_SYMS is not set
96# CONFIG_COMPAT_BRK is not set 100# CONFIG_COMPAT_BRK is not set
97# CONFIG_SLAB is not set 101# CONFIG_SLAB is not set
98CONFIG_SLUB=y 102CONFIG_SLUB=y
99# CONFIG_SLOB is not set 103# CONFIG_SLOB is not set
100CONFIG_PROFILING=y 104CONFIG_PROFILING=y
101CONFIG_TRACEPOINTS=y 105CONFIG_TRACEPOINTS=y
102# CONFIG_MARKERS is not set 106CONFIG_MARKERS=y
103CONFIG_OPROFILE=y 107CONFIG_OPROFILE=y
104CONFIG_HAVE_OPROFILE=y 108CONFIG_HAVE_OPROFILE=y
105CONFIG_HAVE_IOREMAP_PROT=y 109CONFIG_HAVE_IOREMAP_PROT=y
@@ -178,6 +182,7 @@ CONFIG_CPU_SUBTYPE_SH7770=y
178CONFIG_QUICKLIST=y 182CONFIG_QUICKLIST=y
179CONFIG_MMU=y 183CONFIG_MMU=y
180CONFIG_PAGE_OFFSET=0x80000000 184CONFIG_PAGE_OFFSET=0x80000000
185CONFIG_FORCE_MAX_ZONEORDER=11
181CONFIG_MEMORY_START=0x08000000 186CONFIG_MEMORY_START=0x08000000
182CONFIG_MEMORY_SIZE=0x04000000 187CONFIG_MEMORY_SIZE=0x04000000
183CONFIG_29BIT=y 188CONFIG_29BIT=y
@@ -211,9 +216,9 @@ CONFIG_MIGRATION=y
211# CONFIG_PHYS_ADDR_T_64BIT is not set 216# CONFIG_PHYS_ADDR_T_64BIT is not set
212CONFIG_ZONE_DMA_FLAG=0 217CONFIG_ZONE_DMA_FLAG=0
213CONFIG_NR_QUICK=2 218CONFIG_NR_QUICK=2
214CONFIG_UNEVICTABLE_LRU=y
215CONFIG_HAVE_MLOCK=y 219CONFIG_HAVE_MLOCK=y
216CONFIG_HAVE_MLOCKED_PAGE_BIT=y 220CONFIG_HAVE_MLOCKED_PAGE_BIT=y
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
217 222
218# 223#
219# Cache configuration 224# Cache configuration
@@ -240,9 +245,10 @@ CONFIG_CPU_HAS_FPU=y
240# 245#
241# Timer and clock configuration 246# Timer and clock configuration
242# 247#
243CONFIG_SH_TMU=y 248CONFIG_SH_TIMER_TMU=y
244CONFIG_SH_TIMER_IRQ=16
245CONFIG_SH_PCLK_FREQ=41666666 249CONFIG_SH_PCLK_FREQ=41666666
250CONFIG_SH_CLK_CPG=y
251CONFIG_SH_CLK_CPG_LEGACY=y
246CONFIG_TICK_ONESHOT=y 252CONFIG_TICK_ONESHOT=y
247CONFIG_NO_HZ=y 253CONFIG_NO_HZ=y
248CONFIG_HIGH_RES_TIMERS=y 254CONFIG_HIGH_RES_TIMERS=y
@@ -299,6 +305,7 @@ CONFIG_PREEMPT_NONE=y
299# CONFIG_PREEMPT_VOLUNTARY is not set 305# CONFIG_PREEMPT_VOLUNTARY is not set
300# CONFIG_PREEMPT is not set 306# CONFIG_PREEMPT is not set
301CONFIG_GUSA=y 307CONFIG_GUSA=y
308# CONFIG_SPARSE_IRQ is not set
302 309
303# 310#
304# Boot options 311# Boot options
@@ -328,6 +335,7 @@ CONFIG_BINFMT_ELF=y
328CONFIG_PM=y 335CONFIG_PM=y
329# CONFIG_PM_DEBUG is not set 336# CONFIG_PM_DEBUG is not set
330CONFIG_PM_SLEEP=y 337CONFIG_PM_SLEEP=y
338CONFIG_HIBERNATION_NVS=y
331CONFIG_HIBERNATION=y 339CONFIG_HIBERNATION=y
332CONFIG_PM_STD_PARTITION="" 340CONFIG_PM_STD_PARTITION=""
333CONFIG_CPU_IDLE=y 341CONFIG_CPU_IDLE=y
@@ -444,7 +452,6 @@ CONFIG_I2C_SH_MOBILE=y
444# CONFIG_SENSORS_PCF8574 is not set 452# CONFIG_SENSORS_PCF8574 is not set
445# CONFIG_PCF8575 is not set 453# CONFIG_PCF8575 is not set
446# CONFIG_SENSORS_PCA9539 is not set 454# CONFIG_SENSORS_PCA9539 is not set
447# CONFIG_SENSORS_MAX6875 is not set
448# CONFIG_SENSORS_TSL2550 is not set 455# CONFIG_SENSORS_TSL2550 is not set
449# CONFIG_I2C_DEBUG_CORE is not set 456# CONFIG_I2C_DEBUG_CORE is not set
450# CONFIG_I2C_DEBUG_ALGO is not set 457# CONFIG_I2C_DEBUG_ALGO is not set
@@ -477,21 +484,7 @@ CONFIG_SSB_POSSIBLE=y
477# CONFIG_MFD_WM8350_I2C is not set 484# CONFIG_MFD_WM8350_I2C is not set
478# CONFIG_MFD_PCF50633 is not set 485# CONFIG_MFD_PCF50633 is not set
479# CONFIG_REGULATOR is not set 486# CONFIG_REGULATOR is not set
480 487# CONFIG_MEDIA_SUPPORT is not set
481#
482# Multimedia devices
483#
484
485#
486# Multimedia core support
487#
488# CONFIG_VIDEO_DEV is not set
489# CONFIG_VIDEO_MEDIA is not set
490
491#
492# Multimedia drivers
493#
494# CONFIG_DAB is not set
495 488
496# 489#
497# Graphics support 490# Graphics support
@@ -571,6 +564,10 @@ CONFIG_UIO=y
571CONFIG_UIO_PDRV_GENIRQ=y 564CONFIG_UIO_PDRV_GENIRQ=y
572# CONFIG_UIO_SMX is not set 565# CONFIG_UIO_SMX is not set
573# CONFIG_UIO_SERCOS3 is not set 566# CONFIG_UIO_SERCOS3 is not set
567
568#
569# TI VLYNQ
570#
574# CONFIG_STAGING is not set 571# CONFIG_STAGING is not set
575 572
576# 573#
@@ -582,11 +579,13 @@ CONFIG_UIO_PDRV_GENIRQ=y
582# CONFIG_REISERFS_FS is not set 579# CONFIG_REISERFS_FS is not set
583# CONFIG_JFS_FS is not set 580# CONFIG_JFS_FS is not set
584# CONFIG_FS_POSIX_ACL is not set 581# CONFIG_FS_POSIX_ACL is not set
585CONFIG_FILE_LOCKING=y
586# CONFIG_XFS_FS is not set 582# CONFIG_XFS_FS is not set
587# CONFIG_BTRFS_FS is not set 583# CONFIG_BTRFS_FS is not set
584CONFIG_FILE_LOCKING=y
585CONFIG_FSNOTIFY=y
588# CONFIG_DNOTIFY is not set 586# CONFIG_DNOTIFY is not set
589# CONFIG_INOTIFY is not set 587# CONFIG_INOTIFY is not set
588CONFIG_INOTIFY_USER=y
590# CONFIG_QUOTA is not set 589# CONFIG_QUOTA is not set
591# CONFIG_AUTOFS_FS is not set 590# CONFIG_AUTOFS_FS is not set
592# CONFIG_AUTOFS4_FS is not set 591# CONFIG_AUTOFS4_FS is not set
@@ -651,23 +650,11 @@ CONFIG_HAVE_FUNCTION_TRACER=y
651CONFIG_HAVE_DYNAMIC_FTRACE=y 650CONFIG_HAVE_DYNAMIC_FTRACE=y
652CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 651CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
653CONFIG_RING_BUFFER=y 652CONFIG_RING_BUFFER=y
653CONFIG_EVENT_TRACING=y
654CONFIG_CONTEXT_SWITCH_TRACER=y
654CONFIG_TRACING=y 655CONFIG_TRACING=y
655CONFIG_TRACING_SUPPORT=y 656CONFIG_TRACING_SUPPORT=y
656 657# CONFIG_FTRACE is not set
657#
658# Tracers
659#
660# CONFIG_FUNCTION_TRACER is not set
661# CONFIG_IRQSOFF_TRACER is not set
662# CONFIG_SCHED_TRACER is not set
663# CONFIG_CONTEXT_SWITCH_TRACER is not set
664# CONFIG_EVENT_TRACER is not set
665# CONFIG_BOOT_TRACER is not set
666# CONFIG_TRACE_BRANCH_PROFILING is not set
667# CONFIG_STACK_TRACER is not set
668# CONFIG_KMEMTRACE is not set
669# CONFIG_WORKQUEUE_TRACER is not set
670# CONFIG_FTRACE_STARTUP_TEST is not set
671# CONFIG_DYNAMIC_DEBUG is not set 658# CONFIG_DYNAMIC_DEBUG is not set
672# CONFIG_DMA_API_DEBUG is not set 659# CONFIG_DMA_API_DEBUG is not set
673# CONFIG_SAMPLES is not set 660# CONFIG_SAMPLES is not set
@@ -698,3 +685,4 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
698CONFIG_HAS_IOMEM=y 685CONFIG_HAS_IOMEM=y
699CONFIG_HAS_IOPORT=y 686CONFIG_HAS_IOPORT=y
700CONFIG_HAS_DMA=y 687CONFIG_HAS_DMA=y
688CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index 1c55b800d124..ed316f602db6 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:10:53 2009 4# Thu Jun 18 13:08:29 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_PCI=y 23CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y
24CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
25CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
26CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -80,7 +81,6 @@ CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set 82# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set 83# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y 84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 85CONFIG_PRINTK=y
86CONFIG_BUG=y 86CONFIG_BUG=y
@@ -93,8 +93,13 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 94CONFIG_SHMEM=y
95CONFIG_AIO=y 95CONFIG_AIO=y
96
97#
98# Performance Counters
99#
96CONFIG_VM_EVENT_COUNTERS=y 100CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_PCI_QUIRKS=y 101CONFIG_PCI_QUIRKS=y
102# CONFIG_STRIP_ASM_SYMS is not set
98CONFIG_COMPAT_BRK=y 103CONFIG_COMPAT_BRK=y
99CONFIG_SLAB=y 104CONFIG_SLAB=y
100# CONFIG_SLUB is not set 105# CONFIG_SLUB is not set
@@ -187,6 +192,7 @@ CONFIG_CPU_SUBTYPE_SH7785=y
187CONFIG_QUICKLIST=y 192CONFIG_QUICKLIST=y
188CONFIG_MMU=y 193CONFIG_MMU=y
189CONFIG_PAGE_OFFSET=0x80000000 194CONFIG_PAGE_OFFSET=0x80000000
195CONFIG_FORCE_MAX_ZONEORDER=11
190CONFIG_MEMORY_START=0x40000000 196CONFIG_MEMORY_START=0x40000000
191CONFIG_MEMORY_SIZE=0x20000000 197CONFIG_MEMORY_SIZE=0x20000000
192# CONFIG_29BIT is not set 198# CONFIG_29BIT is not set
@@ -209,7 +215,6 @@ CONFIG_PAGE_SIZE_4KB=y
209# CONFIG_PAGE_SIZE_8KB is not set 215# CONFIG_PAGE_SIZE_8KB is not set
210# CONFIG_PAGE_SIZE_16KB is not set 216# CONFIG_PAGE_SIZE_16KB is not set
211# CONFIG_PAGE_SIZE_64KB is not set 217# CONFIG_PAGE_SIZE_64KB is not set
212CONFIG_ENTRY_OFFSET=0x00001000
213CONFIG_SELECT_MEMORY_MODEL=y 218CONFIG_SELECT_MEMORY_MODEL=y
214# CONFIG_FLATMEM_MANUAL is not set 219# CONFIG_FLATMEM_MANUAL is not set
215# CONFIG_DISCONTIGMEM_MANUAL is not set 220# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -224,9 +229,9 @@ CONFIG_MIGRATION=y
224# CONFIG_PHYS_ADDR_T_64BIT is not set 229# CONFIG_PHYS_ADDR_T_64BIT is not set
225CONFIG_ZONE_DMA_FLAG=0 230CONFIG_ZONE_DMA_FLAG=0
226CONFIG_NR_QUICK=2 231CONFIG_NR_QUICK=2
227CONFIG_UNEVICTABLE_LRU=y
228CONFIG_HAVE_MLOCK=y 232CONFIG_HAVE_MLOCK=y
229CONFIG_HAVE_MLOCKED_PAGE_BIT=y 233CONFIG_HAVE_MLOCKED_PAGE_BIT=y
234CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
230 235
231# 236#
232# Cache configuration 237# Cache configuration
@@ -244,7 +249,6 @@ CONFIG_SH_FPU=y
244CONFIG_SH_STORE_QUEUES=y 249CONFIG_SH_STORE_QUEUES=y
245CONFIG_CPU_HAS_INTEVT=y 250CONFIG_CPU_HAS_INTEVT=y
246CONFIG_CPU_HAS_SR_RB=y 251CONFIG_CPU_HAS_SR_RB=y
247CONFIG_CPU_HAS_PTEA=y
248CONFIG_CPU_HAS_FPU=y 252CONFIG_CPU_HAS_FPU=y
249 253
250# 254#
@@ -256,9 +260,9 @@ CONFIG_SH_SH7785LCR=y
256# 260#
257# Timer and clock configuration 261# Timer and clock configuration
258# 262#
259CONFIG_SH_TMU=y 263CONFIG_SH_TIMER_TMU=y
260CONFIG_SH_TIMER_IRQ=28
261CONFIG_SH_PCLK_FREQ=50000000 264CONFIG_SH_PCLK_FREQ=50000000
265CONFIG_SH_CLK_CPG=y
262CONFIG_TICK_ONESHOT=y 266CONFIG_TICK_ONESHOT=y
263# CONFIG_NO_HZ is not set 267# CONFIG_NO_HZ is not set
264CONFIG_HIGH_RES_TIMERS=y 268CONFIG_HIGH_RES_TIMERS=y
@@ -300,12 +304,14 @@ CONFIG_KEXEC=y
300# CONFIG_PREEMPT_VOLUNTARY is not set 304# CONFIG_PREEMPT_VOLUNTARY is not set
301CONFIG_PREEMPT=y 305CONFIG_PREEMPT=y
302CONFIG_GUSA=y 306CONFIG_GUSA=y
307# CONFIG_SPARSE_IRQ is not set
303 308
304# 309#
305# Boot options 310# Boot options
306# 311#
307CONFIG_ZERO_PAGE_OFFSET=0x00001000 312CONFIG_ZERO_PAGE_OFFSET=0x00001000
308CONFIG_BOOT_LINK_OFFSET=0x00800000 313CONFIG_BOOT_LINK_OFFSET=0x00800000
314CONFIG_ENTRY_OFFSET=0x00001000
309# CONFIG_CMDLINE_BOOL is not set 315# CONFIG_CMDLINE_BOOL is not set
310 316
311# 317#
@@ -400,6 +406,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
400# CONFIG_ECONET is not set 406# CONFIG_ECONET is not set
401# CONFIG_WAN_ROUTER is not set 407# CONFIG_WAN_ROUTER is not set
402# CONFIG_PHONET is not set 408# CONFIG_PHONET is not set
409# CONFIG_IEEE802154 is not set
403# CONFIG_NET_SCHED is not set 410# CONFIG_NET_SCHED is not set
404# CONFIG_DCB is not set 411# CONFIG_DCB is not set
405 412
@@ -418,7 +425,11 @@ CONFIG_WIRELESS=y
418CONFIG_WIRELESS_EXT=y 425CONFIG_WIRELESS_EXT=y
419CONFIG_WIRELESS_EXT_SYSFS=y 426CONFIG_WIRELESS_EXT_SYSFS=y
420# CONFIG_LIB80211 is not set 427# CONFIG_LIB80211 is not set
421# CONFIG_MAC80211 is not set 428
429#
430# CFG80211 needs to be enabled for MAC80211
431#
432CONFIG_MAC80211_DEFAULT_PS_VALUE=0
422# CONFIG_WIMAX is not set 433# CONFIG_WIMAX is not set
423# CONFIG_RFKILL is not set 434# CONFIG_RFKILL is not set
424# CONFIG_NET_9P is not set 435# CONFIG_NET_9P is not set
@@ -561,10 +572,6 @@ CONFIG_BLK_DEV_SD=y
561# CONFIG_BLK_DEV_SR is not set 572# CONFIG_BLK_DEV_SR is not set
562# CONFIG_CHR_DEV_SG is not set 573# CONFIG_CHR_DEV_SG is not set
563# CONFIG_CHR_DEV_SCH is not set 574# CONFIG_CHR_DEV_SCH is not set
564
565#
566# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
567#
568# CONFIG_SCSI_MULTI_LUN is not set 575# CONFIG_SCSI_MULTI_LUN is not set
569# CONFIG_SCSI_CONSTANTS is not set 576# CONFIG_SCSI_CONSTANTS is not set
570# CONFIG_SCSI_LOGGING is not set 577# CONFIG_SCSI_LOGGING is not set
@@ -656,7 +663,6 @@ CONFIG_SATA_SIL=y
656# CONFIG_IEEE1394 is not set 663# CONFIG_IEEE1394 is not set
657# CONFIG_I2O is not set 664# CONFIG_I2O is not set
658CONFIG_NETDEVICES=y 665CONFIG_NETDEVICES=y
659CONFIG_COMPAT_NET_DEV_OPS=y
660# CONFIG_DUMMY is not set 666# CONFIG_DUMMY is not set
661# CONFIG_BONDING is not set 667# CONFIG_BONDING is not set
662# CONFIG_MACVLAN is not set 668# CONFIG_MACVLAN is not set
@@ -861,7 +867,6 @@ CONFIG_I2C_PCA_PLATFORM=y
861# CONFIG_SENSORS_PCF8574 is not set 867# CONFIG_SENSORS_PCF8574 is not set
862# CONFIG_PCF8575 is not set 868# CONFIG_PCF8575 is not set
863# CONFIG_SENSORS_PCA9539 is not set 869# CONFIG_SENSORS_PCA9539 is not set
864# CONFIG_SENSORS_MAX6875 is not set
865# CONFIG_SENSORS_TSL2550 is not set 870# CONFIG_SENSORS_TSL2550 is not set
866# CONFIG_I2C_DEBUG_CORE is not set 871# CONFIG_I2C_DEBUG_CORE is not set
867# CONFIG_I2C_DEBUG_ALGO is not set 872# CONFIG_I2C_DEBUG_ALGO is not set
@@ -894,22 +899,7 @@ CONFIG_MFD_SM501=y
894# CONFIG_MFD_WM8350_I2C is not set 899# CONFIG_MFD_WM8350_I2C is not set
895# CONFIG_MFD_PCF50633 is not set 900# CONFIG_MFD_PCF50633 is not set
896# CONFIG_REGULATOR is not set 901# CONFIG_REGULATOR is not set
897 902# CONFIG_MEDIA_SUPPORT is not set
898#
899# Multimedia devices
900#
901
902#
903# Multimedia core support
904#
905# CONFIG_VIDEO_DEV is not set
906# CONFIG_DVB_CORE is not set
907# CONFIG_VIDEO_MEDIA is not set
908
909#
910# Multimedia drivers
911#
912# CONFIG_DAB is not set
913 903
914# 904#
915# Graphics support 905# Graphics support
@@ -1017,7 +1007,7 @@ CONFIG_HID_BELKIN=y
1017CONFIG_HID_CHERRY=y 1007CONFIG_HID_CHERRY=y
1018CONFIG_HID_CHICONY=y 1008CONFIG_HID_CHICONY=y
1019CONFIG_HID_CYPRESS=y 1009CONFIG_HID_CYPRESS=y
1020# CONFIG_DRAGONRISE_FF is not set 1010# CONFIG_HID_DRAGONRISE is not set
1021CONFIG_HID_EZKEY=y 1011CONFIG_HID_EZKEY=y
1022# CONFIG_HID_KYE is not set 1012# CONFIG_HID_KYE is not set
1023CONFIG_HID_GYRATION=y 1013CONFIG_HID_GYRATION=y
@@ -1034,10 +1024,11 @@ CONFIG_HID_PETALYNX=y
1034CONFIG_HID_SAMSUNG=y 1024CONFIG_HID_SAMSUNG=y
1035CONFIG_HID_SONY=y 1025CONFIG_HID_SONY=y
1036CONFIG_HID_SUNPLUS=y 1026CONFIG_HID_SUNPLUS=y
1037# CONFIG_GREENASIA_FF is not set 1027# CONFIG_HID_GREENASIA is not set
1028# CONFIG_HID_SMARTJOYPLUS is not set
1038# CONFIG_HID_TOPSEED is not set 1029# CONFIG_HID_TOPSEED is not set
1039CONFIG_THRUSTMASTER_FF=m 1030# CONFIG_HID_THRUSTMASTER is not set
1040CONFIG_ZEROPLUS_FF=m 1031# CONFIG_HID_ZEROPLUS is not set
1041CONFIG_USB_SUPPORT=y 1032CONFIG_USB_SUPPORT=y
1042CONFIG_USB_ARCH_HAS_HCD=y 1033CONFIG_USB_ARCH_HAS_HCD=y
1043CONFIG_USB_ARCH_HAS_OHCI=y 1034CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1063,6 +1054,7 @@ CONFIG_USB_MON=y
1063# USB Host Controller Drivers 1054# USB Host Controller Drivers
1064# 1055#
1065# CONFIG_USB_C67X00_HCD is not set 1056# CONFIG_USB_C67X00_HCD is not set
1057# CONFIG_USB_XHCI_HCD is not set
1066CONFIG_USB_EHCI_HCD=m 1058CONFIG_USB_EHCI_HCD=m
1067# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1059# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1068# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1060# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1210,9 +1202,14 @@ CONFIG_RTC_DRV_RS5C372=y
1210# on-CPU RTC drivers 1202# on-CPU RTC drivers
1211# 1203#
1212# CONFIG_RTC_DRV_SH is not set 1204# CONFIG_RTC_DRV_SH is not set
1205# CONFIG_RTC_DRV_GENERIC is not set
1213# CONFIG_DMADEVICES is not set 1206# CONFIG_DMADEVICES is not set
1214# CONFIG_AUXDISPLAY is not set 1207# CONFIG_AUXDISPLAY is not set
1215# CONFIG_UIO is not set 1208# CONFIG_UIO is not set
1209
1210#
1211# TI VLYNQ
1212#
1216# CONFIG_STAGING is not set 1213# CONFIG_STAGING is not set
1217 1214
1218# 1215#
@@ -1232,10 +1229,11 @@ CONFIG_FS_MBCACHE=y
1232# CONFIG_REISERFS_FS is not set 1229# CONFIG_REISERFS_FS is not set
1233# CONFIG_JFS_FS is not set 1230# CONFIG_JFS_FS is not set
1234CONFIG_FS_POSIX_ACL=y 1231CONFIG_FS_POSIX_ACL=y
1235CONFIG_FILE_LOCKING=y
1236# CONFIG_XFS_FS is not set 1232# CONFIG_XFS_FS is not set
1237# CONFIG_OCFS2_FS is not set 1233# CONFIG_OCFS2_FS is not set
1238# CONFIG_BTRFS_FS is not set 1234# CONFIG_BTRFS_FS is not set
1235CONFIG_FILE_LOCKING=y
1236CONFIG_FSNOTIFY=y
1239CONFIG_DNOTIFY=y 1237CONFIG_DNOTIFY=y
1240CONFIG_INOTIFY=y 1238CONFIG_INOTIFY=y
1241CONFIG_INOTIFY_USER=y 1239CONFIG_INOTIFY_USER=y
@@ -1428,18 +1426,16 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1428CONFIG_HAVE_DYNAMIC_FTRACE=y 1426CONFIG_HAVE_DYNAMIC_FTRACE=y
1429CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1427CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1430CONFIG_TRACING_SUPPORT=y 1428CONFIG_TRACING_SUPPORT=y
1431 1429CONFIG_FTRACE=y
1432#
1433# Tracers
1434#
1435# CONFIG_FUNCTION_TRACER is not set 1430# CONFIG_FUNCTION_TRACER is not set
1436# CONFIG_IRQSOFF_TRACER is not set 1431# CONFIG_IRQSOFF_TRACER is not set
1437# CONFIG_PREEMPT_TRACER is not set 1432# CONFIG_PREEMPT_TRACER is not set
1438# CONFIG_SCHED_TRACER is not set 1433# CONFIG_SCHED_TRACER is not set
1439# CONFIG_CONTEXT_SWITCH_TRACER is not set 1434# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1440# CONFIG_EVENT_TRACER is not set
1441# CONFIG_BOOT_TRACER is not set 1435# CONFIG_BOOT_TRACER is not set
1442# CONFIG_TRACE_BRANCH_PROFILING is not set 1436CONFIG_BRANCH_PROFILE_NONE=y
1437# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1438# CONFIG_PROFILE_ALL_BRANCHES is not set
1443# CONFIG_STACK_TRACER is not set 1439# CONFIG_STACK_TRACER is not set
1444# CONFIG_KMEMTRACE is not set 1440# CONFIG_KMEMTRACE is not set
1445# CONFIG_WORKQUEUE_TRACER is not set 1441# CONFIG_WORKQUEUE_TRACER is not set
@@ -1454,10 +1450,8 @@ CONFIG_HAVE_ARCH_KGDB=y
1454# CONFIG_DEBUG_STACKOVERFLOW is not set 1450# CONFIG_DEBUG_STACKOVERFLOW is not set
1455# CONFIG_DEBUG_STACK_USAGE is not set 1451# CONFIG_DEBUG_STACK_USAGE is not set
1456# CONFIG_4KSTACKS is not set 1452# CONFIG_4KSTACKS is not set
1457# CONFIG_IRQSTACKS is not set
1458# CONFIG_DUMP_CODE is not set 1453# CONFIG_DUMP_CODE is not set
1459# CONFIG_SH_NO_BSS_INIT is not set 1454# CONFIG_SH_NO_BSS_INIT is not set
1460# CONFIG_MORE_COMPILE_OPTIONS is not set
1461 1455
1462# 1456#
1463# Security options 1457# Security options
@@ -1580,3 +1574,4 @@ CONFIG_HAS_IOMEM=y
1580CONFIG_HAS_IOPORT=y 1574CONFIG_HAS_IOPORT=y
1581CONFIG_HAS_DMA=y 1575CONFIG_HAS_DMA=y
1582CONFIG_NLATTR=y 1576CONFIG_NLATTR=y
1577CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig
index 4385fe97a780..004e6f5e8a68 100644
--- a/arch/sh/configs/sh7785lcr_defconfig
+++ b/arch/sh/configs/sh7785lcr_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:11:48 2009 4# Thu Jun 18 13:09:34 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_PCI=y 23CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y
24CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
25CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
26CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -80,7 +81,6 @@ CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 81CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set 82# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set 83# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y 84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 85CONFIG_PRINTK=y
86CONFIG_BUG=y 86CONFIG_BUG=y
@@ -93,8 +93,13 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 94CONFIG_SHMEM=y
95CONFIG_AIO=y 95CONFIG_AIO=y
96
97#
98# Performance Counters
99#
96CONFIG_VM_EVENT_COUNTERS=y 100CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_PCI_QUIRKS=y 101CONFIG_PCI_QUIRKS=y
102# CONFIG_STRIP_ASM_SYMS is not set
98CONFIG_COMPAT_BRK=y 103CONFIG_COMPAT_BRK=y
99CONFIG_SLAB=y 104CONFIG_SLAB=y
100# CONFIG_SLUB is not set 105# CONFIG_SLUB is not set
@@ -187,6 +192,7 @@ CONFIG_CPU_SUBTYPE_SH7785=y
187CONFIG_QUICKLIST=y 192CONFIG_QUICKLIST=y
188CONFIG_MMU=y 193CONFIG_MMU=y
189CONFIG_PAGE_OFFSET=0x80000000 194CONFIG_PAGE_OFFSET=0x80000000
195CONFIG_FORCE_MAX_ZONEORDER=11
190CONFIG_MEMORY_START=0x08000000 196CONFIG_MEMORY_START=0x08000000
191CONFIG_MEMORY_SIZE=0x08000000 197CONFIG_MEMORY_SIZE=0x08000000
192CONFIG_29BIT=y 198CONFIG_29BIT=y
@@ -204,7 +210,6 @@ CONFIG_PAGE_SIZE_4KB=y
204# CONFIG_PAGE_SIZE_8KB is not set 210# CONFIG_PAGE_SIZE_8KB is not set
205# CONFIG_PAGE_SIZE_16KB is not set 211# CONFIG_PAGE_SIZE_16KB is not set
206# CONFIG_PAGE_SIZE_64KB is not set 212# CONFIG_PAGE_SIZE_64KB is not set
207CONFIG_ENTRY_OFFSET=0x00001000
208CONFIG_SELECT_MEMORY_MODEL=y 213CONFIG_SELECT_MEMORY_MODEL=y
209CONFIG_FLATMEM_MANUAL=y 214CONFIG_FLATMEM_MANUAL=y
210# CONFIG_DISCONTIGMEM_MANUAL is not set 215# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -217,9 +222,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
217# CONFIG_PHYS_ADDR_T_64BIT is not set 222# CONFIG_PHYS_ADDR_T_64BIT is not set
218CONFIG_ZONE_DMA_FLAG=0 223CONFIG_ZONE_DMA_FLAG=0
219CONFIG_NR_QUICK=2 224CONFIG_NR_QUICK=2
220CONFIG_UNEVICTABLE_LRU=y
221CONFIG_HAVE_MLOCK=y 225CONFIG_HAVE_MLOCK=y
222CONFIG_HAVE_MLOCKED_PAGE_BIT=y 226CONFIG_HAVE_MLOCKED_PAGE_BIT=y
227CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
223 228
224# 229#
225# Cache configuration 230# Cache configuration
@@ -237,7 +242,6 @@ CONFIG_SH_FPU=y
237CONFIG_SH_STORE_QUEUES=y 242CONFIG_SH_STORE_QUEUES=y
238CONFIG_CPU_HAS_INTEVT=y 243CONFIG_CPU_HAS_INTEVT=y
239CONFIG_CPU_HAS_SR_RB=y 244CONFIG_CPU_HAS_SR_RB=y
240CONFIG_CPU_HAS_PTEA=y
241CONFIG_CPU_HAS_FPU=y 245CONFIG_CPU_HAS_FPU=y
242 246
243# 247#
@@ -250,9 +254,9 @@ CONFIG_SH_SH7785LCR_29BIT_PHYSMAPS=y
250# 254#
251# Timer and clock configuration 255# Timer and clock configuration
252# 256#
253CONFIG_SH_TMU=y 257CONFIG_SH_TIMER_TMU=y
254CONFIG_SH_TIMER_IRQ=28
255CONFIG_SH_PCLK_FREQ=50000000 258CONFIG_SH_PCLK_FREQ=50000000
259CONFIG_SH_CLK_CPG=y
256CONFIG_TICK_ONESHOT=y 260CONFIG_TICK_ONESHOT=y
257# CONFIG_NO_HZ is not set 261# CONFIG_NO_HZ is not set
258CONFIG_HIGH_RES_TIMERS=y 262CONFIG_HIGH_RES_TIMERS=y
@@ -294,12 +298,14 @@ CONFIG_KEXEC=y
294# CONFIG_PREEMPT_VOLUNTARY is not set 298# CONFIG_PREEMPT_VOLUNTARY is not set
295CONFIG_PREEMPT=y 299CONFIG_PREEMPT=y
296CONFIG_GUSA=y 300CONFIG_GUSA=y
301# CONFIG_SPARSE_IRQ is not set
297 302
298# 303#
299# Boot options 304# Boot options
300# 305#
301CONFIG_ZERO_PAGE_OFFSET=0x00001000 306CONFIG_ZERO_PAGE_OFFSET=0x00001000
302CONFIG_BOOT_LINK_OFFSET=0x00800000 307CONFIG_BOOT_LINK_OFFSET=0x00800000
308CONFIG_ENTRY_OFFSET=0x00001000
303# CONFIG_CMDLINE_BOOL is not set 309# CONFIG_CMDLINE_BOOL is not set
304 310
305# 311#
@@ -394,6 +400,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
394# CONFIG_ECONET is not set 400# CONFIG_ECONET is not set
395# CONFIG_WAN_ROUTER is not set 401# CONFIG_WAN_ROUTER is not set
396# CONFIG_PHONET is not set 402# CONFIG_PHONET is not set
403# CONFIG_IEEE802154 is not set
397# CONFIG_NET_SCHED is not set 404# CONFIG_NET_SCHED is not set
398# CONFIG_DCB is not set 405# CONFIG_DCB is not set
399 406
@@ -412,7 +419,11 @@ CONFIG_WIRELESS=y
412CONFIG_WIRELESS_EXT=y 419CONFIG_WIRELESS_EXT=y
413CONFIG_WIRELESS_EXT_SYSFS=y 420CONFIG_WIRELESS_EXT_SYSFS=y
414# CONFIG_LIB80211 is not set 421# CONFIG_LIB80211 is not set
415# CONFIG_MAC80211 is not set 422
423#
424# CFG80211 needs to be enabled for MAC80211
425#
426CONFIG_MAC80211_DEFAULT_PS_VALUE=0
416# CONFIG_WIMAX is not set 427# CONFIG_WIMAX is not set
417# CONFIG_RFKILL is not set 428# CONFIG_RFKILL is not set
418# CONFIG_NET_9P is not set 429# CONFIG_NET_9P is not set
@@ -555,10 +566,6 @@ CONFIG_BLK_DEV_SD=y
555# CONFIG_BLK_DEV_SR is not set 566# CONFIG_BLK_DEV_SR is not set
556# CONFIG_CHR_DEV_SG is not set 567# CONFIG_CHR_DEV_SG is not set
557# CONFIG_CHR_DEV_SCH is not set 568# CONFIG_CHR_DEV_SCH is not set
558
559#
560# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
561#
562# CONFIG_SCSI_MULTI_LUN is not set 569# CONFIG_SCSI_MULTI_LUN is not set
563# CONFIG_SCSI_CONSTANTS is not set 570# CONFIG_SCSI_CONSTANTS is not set
564# CONFIG_SCSI_LOGGING is not set 571# CONFIG_SCSI_LOGGING is not set
@@ -650,7 +657,6 @@ CONFIG_SATA_SIL=y
650# CONFIG_IEEE1394 is not set 657# CONFIG_IEEE1394 is not set
651# CONFIG_I2O is not set 658# CONFIG_I2O is not set
652CONFIG_NETDEVICES=y 659CONFIG_NETDEVICES=y
653CONFIG_COMPAT_NET_DEV_OPS=y
654# CONFIG_DUMMY is not set 660# CONFIG_DUMMY is not set
655# CONFIG_BONDING is not set 661# CONFIG_BONDING is not set
656# CONFIG_MACVLAN is not set 662# CONFIG_MACVLAN is not set
@@ -855,7 +861,6 @@ CONFIG_I2C_PCA_PLATFORM=y
855# CONFIG_SENSORS_PCF8574 is not set 861# CONFIG_SENSORS_PCF8574 is not set
856# CONFIG_PCF8575 is not set 862# CONFIG_PCF8575 is not set
857# CONFIG_SENSORS_PCA9539 is not set 863# CONFIG_SENSORS_PCA9539 is not set
858# CONFIG_SENSORS_MAX6875 is not set
859# CONFIG_SENSORS_TSL2550 is not set 864# CONFIG_SENSORS_TSL2550 is not set
860# CONFIG_I2C_DEBUG_CORE is not set 865# CONFIG_I2C_DEBUG_CORE is not set
861# CONFIG_I2C_DEBUG_ALGO is not set 866# CONFIG_I2C_DEBUG_ALGO is not set
@@ -888,22 +893,7 @@ CONFIG_MFD_SM501=y
888# CONFIG_MFD_WM8350_I2C is not set 893# CONFIG_MFD_WM8350_I2C is not set
889# CONFIG_MFD_PCF50633 is not set 894# CONFIG_MFD_PCF50633 is not set
890# CONFIG_REGULATOR is not set 895# CONFIG_REGULATOR is not set
891 896# CONFIG_MEDIA_SUPPORT is not set
892#
893# Multimedia devices
894#
895
896#
897# Multimedia core support
898#
899# CONFIG_VIDEO_DEV is not set
900# CONFIG_DVB_CORE is not set
901# CONFIG_VIDEO_MEDIA is not set
902
903#
904# Multimedia drivers
905#
906# CONFIG_DAB is not set
907 897
908# 898#
909# Graphics support 899# Graphics support
@@ -1011,7 +1001,7 @@ CONFIG_HID_BELKIN=y
1011CONFIG_HID_CHERRY=y 1001CONFIG_HID_CHERRY=y
1012CONFIG_HID_CHICONY=y 1002CONFIG_HID_CHICONY=y
1013CONFIG_HID_CYPRESS=y 1003CONFIG_HID_CYPRESS=y
1014# CONFIG_DRAGONRISE_FF is not set 1004# CONFIG_HID_DRAGONRISE is not set
1015CONFIG_HID_EZKEY=y 1005CONFIG_HID_EZKEY=y
1016# CONFIG_HID_KYE is not set 1006# CONFIG_HID_KYE is not set
1017CONFIG_HID_GYRATION=y 1007CONFIG_HID_GYRATION=y
@@ -1028,10 +1018,11 @@ CONFIG_HID_PETALYNX=y
1028CONFIG_HID_SAMSUNG=y 1018CONFIG_HID_SAMSUNG=y
1029CONFIG_HID_SONY=y 1019CONFIG_HID_SONY=y
1030CONFIG_HID_SUNPLUS=y 1020CONFIG_HID_SUNPLUS=y
1031# CONFIG_GREENASIA_FF is not set 1021# CONFIG_HID_GREENASIA is not set
1022# CONFIG_HID_SMARTJOYPLUS is not set
1032# CONFIG_HID_TOPSEED is not set 1023# CONFIG_HID_TOPSEED is not set
1033CONFIG_THRUSTMASTER_FF=m 1024# CONFIG_HID_THRUSTMASTER is not set
1034CONFIG_ZEROPLUS_FF=m 1025# CONFIG_HID_ZEROPLUS is not set
1035CONFIG_USB_SUPPORT=y 1026CONFIG_USB_SUPPORT=y
1036CONFIG_USB_ARCH_HAS_HCD=y 1027CONFIG_USB_ARCH_HAS_HCD=y
1037CONFIG_USB_ARCH_HAS_OHCI=y 1028CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1057,6 +1048,7 @@ CONFIG_USB_MON=y
1057# USB Host Controller Drivers 1048# USB Host Controller Drivers
1058# 1049#
1059# CONFIG_USB_C67X00_HCD is not set 1050# CONFIG_USB_C67X00_HCD is not set
1051# CONFIG_USB_XHCI_HCD is not set
1060CONFIG_USB_EHCI_HCD=m 1052CONFIG_USB_EHCI_HCD=m
1061# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1053# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1062# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1054# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1204,9 +1196,14 @@ CONFIG_RTC_DRV_RS5C372=y
1204# on-CPU RTC drivers 1196# on-CPU RTC drivers
1205# 1197#
1206# CONFIG_RTC_DRV_SH is not set 1198# CONFIG_RTC_DRV_SH is not set
1199# CONFIG_RTC_DRV_GENERIC is not set
1207# CONFIG_DMADEVICES is not set 1200# CONFIG_DMADEVICES is not set
1208# CONFIG_AUXDISPLAY is not set 1201# CONFIG_AUXDISPLAY is not set
1209# CONFIG_UIO is not set 1202# CONFIG_UIO is not set
1203
1204#
1205# TI VLYNQ
1206#
1210# CONFIG_STAGING is not set 1207# CONFIG_STAGING is not set
1211 1208
1212# 1209#
@@ -1226,10 +1223,11 @@ CONFIG_FS_MBCACHE=y
1226# CONFIG_REISERFS_FS is not set 1223# CONFIG_REISERFS_FS is not set
1227# CONFIG_JFS_FS is not set 1224# CONFIG_JFS_FS is not set
1228CONFIG_FS_POSIX_ACL=y 1225CONFIG_FS_POSIX_ACL=y
1229CONFIG_FILE_LOCKING=y
1230# CONFIG_XFS_FS is not set 1226# CONFIG_XFS_FS is not set
1231# CONFIG_OCFS2_FS is not set 1227# CONFIG_OCFS2_FS is not set
1232# CONFIG_BTRFS_FS is not set 1228# CONFIG_BTRFS_FS is not set
1229CONFIG_FILE_LOCKING=y
1230CONFIG_FSNOTIFY=y
1233CONFIG_DNOTIFY=y 1231CONFIG_DNOTIFY=y
1234CONFIG_INOTIFY=y 1232CONFIG_INOTIFY=y
1235CONFIG_INOTIFY_USER=y 1233CONFIG_INOTIFY_USER=y
@@ -1422,18 +1420,16 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1422CONFIG_HAVE_DYNAMIC_FTRACE=y 1420CONFIG_HAVE_DYNAMIC_FTRACE=y
1423CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1421CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1424CONFIG_TRACING_SUPPORT=y 1422CONFIG_TRACING_SUPPORT=y
1425 1423CONFIG_FTRACE=y
1426#
1427# Tracers
1428#
1429# CONFIG_FUNCTION_TRACER is not set 1424# CONFIG_FUNCTION_TRACER is not set
1430# CONFIG_IRQSOFF_TRACER is not set 1425# CONFIG_IRQSOFF_TRACER is not set
1431# CONFIG_PREEMPT_TRACER is not set 1426# CONFIG_PREEMPT_TRACER is not set
1432# CONFIG_SCHED_TRACER is not set 1427# CONFIG_SCHED_TRACER is not set
1433# CONFIG_CONTEXT_SWITCH_TRACER is not set 1428# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1434# CONFIG_EVENT_TRACER is not set
1435# CONFIG_BOOT_TRACER is not set 1429# CONFIG_BOOT_TRACER is not set
1436# CONFIG_TRACE_BRANCH_PROFILING is not set 1430CONFIG_BRANCH_PROFILE_NONE=y
1431# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1432# CONFIG_PROFILE_ALL_BRANCHES is not set
1437# CONFIG_STACK_TRACER is not set 1433# CONFIG_STACK_TRACER is not set
1438# CONFIG_KMEMTRACE is not set 1434# CONFIG_KMEMTRACE is not set
1439# CONFIG_WORKQUEUE_TRACER is not set 1435# CONFIG_WORKQUEUE_TRACER is not set
@@ -1448,10 +1444,8 @@ CONFIG_HAVE_ARCH_KGDB=y
1448# CONFIG_DEBUG_STACKOVERFLOW is not set 1444# CONFIG_DEBUG_STACKOVERFLOW is not set
1449# CONFIG_DEBUG_STACK_USAGE is not set 1445# CONFIG_DEBUG_STACK_USAGE is not set
1450# CONFIG_4KSTACKS is not set 1446# CONFIG_4KSTACKS is not set
1451# CONFIG_IRQSTACKS is not set
1452# CONFIG_DUMP_CODE is not set 1447# CONFIG_DUMP_CODE is not set
1453# CONFIG_SH_NO_BSS_INIT is not set 1448# CONFIG_SH_NO_BSS_INIT is not set
1454# CONFIG_MORE_COMPILE_OPTIONS is not set
1455 1449
1456# 1450#
1457# Security options 1451# Security options
@@ -1574,3 +1568,4 @@ CONFIG_HAS_IOMEM=y
1574CONFIG_HAS_IOPORT=y 1568CONFIG_HAS_IOPORT=y
1575CONFIG_HAS_DMA=y 1569CONFIG_HAS_DMA=y
1576CONFIG_NLATTR=y 1570CONFIG_NLATTR=y
1571CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/shmin_defconfig b/arch/sh/configs/shmin_defconfig
index 4e120256ec63..ad7d60972fcf 100644
--- a/arch/sh/configs/shmin_defconfig
+++ b/arch/sh/configs/shmin_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:12:41 2009 4# Thu Jun 18 13:10:33 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -18,6 +18,7 @@ CONFIG_GENERIC_TIME=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 19# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
20CONFIG_ARCH_HIBERNATION_POSSIBLE=y 20CONFIG_ARCH_HIBERNATION_POSSIBLE=y
21CONFIG_SYS_SUPPORTS_TMU=y
21CONFIG_STACKTRACE_SUPPORT=y 22CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_LOCKDEP_SUPPORT=y 23CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_HAVE_LATENCYTOP_SUPPORT=y 24CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -64,7 +65,6 @@ CONFIG_EMBEDDED=y
64# CONFIG_UID16 is not set 65# CONFIG_UID16 is not set
65# CONFIG_SYSCTL_SYSCALL is not set 66# CONFIG_SYSCTL_SYSCALL is not set
66# CONFIG_KALLSYMS is not set 67# CONFIG_KALLSYMS is not set
67# CONFIG_STRIP_ASM_SYMS is not set
68# CONFIG_HOTPLUG is not set 68# CONFIG_HOTPLUG is not set
69CONFIG_PRINTK=y 69CONFIG_PRINTK=y
70# CONFIG_BUG is not set 70# CONFIG_BUG is not set
@@ -77,7 +77,12 @@ CONFIG_TIMERFD=y
77CONFIG_EVENTFD=y 77CONFIG_EVENTFD=y
78# CONFIG_SHMEM is not set 78# CONFIG_SHMEM is not set
79CONFIG_AIO=y 79CONFIG_AIO=y
80
81#
82# Performance Counters
83#
80CONFIG_VM_EVENT_COUNTERS=y 84CONFIG_VM_EVENT_COUNTERS=y
85# CONFIG_STRIP_ASM_SYMS is not set
81CONFIG_COMPAT_BRK=y 86CONFIG_COMPAT_BRK=y
82# CONFIG_SLAB is not set 87# CONFIG_SLAB is not set
83# CONFIG_SLUB is not set 88# CONFIG_SLUB is not set
@@ -159,6 +164,7 @@ CONFIG_CPU_SUBTYPE_SH7706=y
159CONFIG_QUICKLIST=y 164CONFIG_QUICKLIST=y
160CONFIG_MMU=y 165CONFIG_MMU=y
161CONFIG_PAGE_OFFSET=0x80000000 166CONFIG_PAGE_OFFSET=0x80000000
167CONFIG_FORCE_MAX_ZONEORDER=11
162CONFIG_MEMORY_START=0x0c000000 168CONFIG_MEMORY_START=0x0c000000
163CONFIG_MEMORY_SIZE=0x00800000 169CONFIG_MEMORY_SIZE=0x00800000
164CONFIG_29BIT=y 170CONFIG_29BIT=y
@@ -173,7 +179,6 @@ CONFIG_PAGE_SIZE_4KB=y
173# CONFIG_PAGE_SIZE_8KB is not set 179# CONFIG_PAGE_SIZE_8KB is not set
174# CONFIG_PAGE_SIZE_16KB is not set 180# CONFIG_PAGE_SIZE_16KB is not set
175# CONFIG_PAGE_SIZE_64KB is not set 181# CONFIG_PAGE_SIZE_64KB is not set
176CONFIG_ENTRY_OFFSET=0x00001000
177CONFIG_SELECT_MEMORY_MODEL=y 182CONFIG_SELECT_MEMORY_MODEL=y
178CONFIG_FLATMEM_MANUAL=y 183CONFIG_FLATMEM_MANUAL=y
179# CONFIG_DISCONTIGMEM_MANUAL is not set 184# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -186,9 +191,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
186# CONFIG_PHYS_ADDR_T_64BIT is not set 191# CONFIG_PHYS_ADDR_T_64BIT is not set
187CONFIG_ZONE_DMA_FLAG=0 192CONFIG_ZONE_DMA_FLAG=0
188CONFIG_NR_QUICK=2 193CONFIG_NR_QUICK=2
189CONFIG_UNEVICTABLE_LRU=y
190CONFIG_HAVE_MLOCK=y 194CONFIG_HAVE_MLOCK=y
191CONFIG_HAVE_MLOCKED_PAGE_BIT=y 195CONFIG_HAVE_MLOCKED_PAGE_BIT=y
196CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
192 197
193# 198#
194# Cache configuration 199# Cache configuration
@@ -216,9 +221,10 @@ CONFIG_SH_SHMIN=y
216# 221#
217# Timer and clock configuration 222# Timer and clock configuration
218# 223#
219CONFIG_SH_TMU=y 224CONFIG_SH_TIMER_TMU=y
220CONFIG_SH_TIMER_IRQ=16
221CONFIG_SH_PCLK_FREQ=32000000 225CONFIG_SH_PCLK_FREQ=32000000
226CONFIG_SH_CLK_CPG=y
227CONFIG_SH_CLK_CPG_LEGACY=y
222# CONFIG_NO_HZ is not set 228# CONFIG_NO_HZ is not set
223# CONFIG_HIGH_RES_TIMERS is not set 229# CONFIG_HIGH_RES_TIMERS is not set
224CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 230CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -260,12 +266,14 @@ CONFIG_PREEMPT_NONE=y
260# CONFIG_PREEMPT is not set 266# CONFIG_PREEMPT is not set
261CONFIG_GUSA=y 267CONFIG_GUSA=y
262# CONFIG_GUSA_RB is not set 268# CONFIG_GUSA_RB is not set
269# CONFIG_SPARSE_IRQ is not set
263 270
264# 271#
265# Boot options 272# Boot options
266# 273#
267CONFIG_ZERO_PAGE_OFFSET=0x00001000 274CONFIG_ZERO_PAGE_OFFSET=0x00001000
268CONFIG_BOOT_LINK_OFFSET=0x00210000 275CONFIG_BOOT_LINK_OFFSET=0x00210000
276CONFIG_ENTRY_OFFSET=0x00001000
269CONFIG_CMDLINE_BOOL=y 277CONFIG_CMDLINE_BOOL=y
270CONFIG_CMDLINE="console=ttySC1,115200 root=1f01 mtdparts=phys_mapped_flash:64k(firm)ro,-(sys) netdev=34,0x300,eth0 " 278CONFIG_CMDLINE="console=ttySC1,115200 root=1f01 mtdparts=phys_mapped_flash:64k(firm)ro,-(sys) netdev=34,0x300,eth0 "
271 279
@@ -345,6 +353,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
345# CONFIG_ECONET is not set 353# CONFIG_ECONET is not set
346# CONFIG_WAN_ROUTER is not set 354# CONFIG_WAN_ROUTER is not set
347# CONFIG_PHONET is not set 355# CONFIG_PHONET is not set
356# CONFIG_IEEE802154 is not set
348# CONFIG_NET_SCHED is not set 357# CONFIG_NET_SCHED is not set
349# CONFIG_DCB is not set 358# CONFIG_DCB is not set
350 359
@@ -362,7 +371,11 @@ CONFIG_WIRELESS=y
362# CONFIG_WIRELESS_OLD_REGULATORY is not set 371# CONFIG_WIRELESS_OLD_REGULATORY is not set
363# CONFIG_WIRELESS_EXT is not set 372# CONFIG_WIRELESS_EXT is not set
364# CONFIG_LIB80211 is not set 373# CONFIG_LIB80211 is not set
365# CONFIG_MAC80211 is not set 374
375#
376# CFG80211 needs to be enabled for MAC80211
377#
378CONFIG_MAC80211_DEFAULT_PS_VALUE=0
366# CONFIG_WIMAX is not set 379# CONFIG_WIMAX is not set
367# CONFIG_RFKILL is not set 380# CONFIG_RFKILL is not set
368# CONFIG_NET_9P is not set 381# CONFIG_NET_9P is not set
@@ -489,7 +502,6 @@ CONFIG_HAVE_IDE=y
489# CONFIG_ATA is not set 502# CONFIG_ATA is not set
490# CONFIG_MD is not set 503# CONFIG_MD is not set
491CONFIG_NETDEVICES=y 504CONFIG_NETDEVICES=y
492CONFIG_COMPAT_NET_DEV_OPS=y
493# CONFIG_DUMMY is not set 505# CONFIG_DUMMY is not set
494# CONFIG_BONDING is not set 506# CONFIG_BONDING is not set
495# CONFIG_MACVLAN is not set 507# CONFIG_MACVLAN is not set
@@ -514,6 +526,7 @@ CONFIG_NET_ETHERNET=y
514# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 526# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
515# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 527# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
516# CONFIG_B44 is not set 528# CONFIG_B44 is not set
529# CONFIG_KS8842 is not set
517CONFIG_NETDEV_1000=y 530CONFIG_NETDEV_1000=y
518CONFIG_NETDEV_10000=y 531CONFIG_NETDEV_10000=y
519 532
@@ -599,22 +612,7 @@ CONFIG_SSB_POSSIBLE=y
599# CONFIG_HTC_PASIC3 is not set 612# CONFIG_HTC_PASIC3 is not set
600# CONFIG_MFD_TMIO is not set 613# CONFIG_MFD_TMIO is not set
601# CONFIG_REGULATOR is not set 614# CONFIG_REGULATOR is not set
602 615# CONFIG_MEDIA_SUPPORT is not set
603#
604# Multimedia devices
605#
606
607#
608# Multimedia core support
609#
610# CONFIG_VIDEO_DEV is not set
611# CONFIG_DVB_CORE is not set
612# CONFIG_VIDEO_MEDIA is not set
613
614#
615# Multimedia drivers
616#
617# CONFIG_DAB is not set
618 616
619# 617#
620# Graphics support 618# Graphics support
@@ -653,10 +651,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
653# CONFIG_MEMSTICK is not set 651# CONFIG_MEMSTICK is not set
654# CONFIG_NEW_LEDS is not set 652# CONFIG_NEW_LEDS is not set
655# CONFIG_ACCESSIBILITY is not set 653# CONFIG_ACCESSIBILITY is not set
654CONFIG_RTC_LIB=y
656# CONFIG_RTC_CLASS is not set 655# CONFIG_RTC_CLASS is not set
657# CONFIG_DMADEVICES is not set 656# CONFIG_DMADEVICES is not set
658# CONFIG_AUXDISPLAY is not set 657# CONFIG_AUXDISPLAY is not set
659# CONFIG_UIO is not set 658# CONFIG_UIO is not set
659
660#
661# TI VLYNQ
662#
660# CONFIG_STAGING is not set 663# CONFIG_STAGING is not set
661 664
662# 665#
@@ -668,11 +671,13 @@ CONFIG_USB_ARCH_HAS_HCD=y
668# CONFIG_REISERFS_FS is not set 671# CONFIG_REISERFS_FS is not set
669# CONFIG_JFS_FS is not set 672# CONFIG_JFS_FS is not set
670# CONFIG_FS_POSIX_ACL is not set 673# CONFIG_FS_POSIX_ACL is not set
671CONFIG_FILE_LOCKING=y
672# CONFIG_XFS_FS is not set 674# CONFIG_XFS_FS is not set
673# CONFIG_BTRFS_FS is not set 675# CONFIG_BTRFS_FS is not set
676CONFIG_FILE_LOCKING=y
677CONFIG_FSNOTIFY=y
674# CONFIG_DNOTIFY is not set 678# CONFIG_DNOTIFY is not set
675# CONFIG_INOTIFY is not set 679# CONFIG_INOTIFY is not set
680CONFIG_INOTIFY_USER=y
676# CONFIG_QUOTA is not set 681# CONFIG_QUOTA is not set
677# CONFIG_AUTOFS_FS is not set 682# CONFIG_AUTOFS_FS is not set
678# CONFIG_AUTOFS4_FS is not set 683# CONFIG_AUTOFS4_FS is not set
@@ -773,27 +778,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y
773CONFIG_HAVE_DYNAMIC_FTRACE=y 778CONFIG_HAVE_DYNAMIC_FTRACE=y
774CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 779CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
775CONFIG_TRACING_SUPPORT=y 780CONFIG_TRACING_SUPPORT=y
776 781# CONFIG_FTRACE is not set
777#
778# Tracers
779#
780# CONFIG_FUNCTION_TRACER is not set
781# CONFIG_IRQSOFF_TRACER is not set
782# CONFIG_SCHED_TRACER is not set
783# CONFIG_CONTEXT_SWITCH_TRACER is not set
784# CONFIG_EVENT_TRACER is not set
785# CONFIG_BOOT_TRACER is not set
786# CONFIG_TRACE_BRANCH_PROFILING is not set
787# CONFIG_STACK_TRACER is not set
788# CONFIG_KMEMTRACE is not set
789# CONFIG_WORKQUEUE_TRACER is not set
790# CONFIG_DMA_API_DEBUG is not set 782# CONFIG_DMA_API_DEBUG is not set
791# CONFIG_SAMPLES is not set 783# CONFIG_SAMPLES is not set
792CONFIG_HAVE_ARCH_KGDB=y 784CONFIG_HAVE_ARCH_KGDB=y
793CONFIG_SH_STANDARD_BIOS=y 785CONFIG_SH_STANDARD_BIOS=y
794# CONFIG_EARLY_SCIF_CONSOLE is not set 786# CONFIG_EARLY_SCIF_CONSOLE is not set
795CONFIG_EARLY_PRINTK=y 787CONFIG_EARLY_PRINTK=y
796# CONFIG_MORE_COMPILE_OPTIONS is not set
797 788
798# 789#
799# Security options 790# Security options
@@ -905,3 +896,4 @@ CONFIG_HAS_IOMEM=y
905CONFIG_HAS_IOPORT=y 896CONFIG_HAS_IOPORT=y
906CONFIG_HAS_DMA=y 897CONFIG_HAS_DMA=y
907CONFIG_NLATTR=y 898CONFIG_NLATTR=y
899CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/shx3_defconfig b/arch/sh/configs/shx3_defconfig
index c088144925fa..207b0c9a8cdf 100644
--- a/arch/sh/configs/shx3_defconfig
+++ b/arch/sh/configs/shx3_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:13:12 2009 4# Thu Jun 18 13:11:03 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -23,6 +23,7 @@ CONFIG_GENERIC_LOCKBREAK=y
23CONFIG_ARCH_HIBERNATION_POSSIBLE=y 23CONFIG_ARCH_HIBERNATION_POSSIBLE=y
24CONFIG_SYS_SUPPORTS_SMP=y 24CONFIG_SYS_SUPPORTS_SMP=y
25CONFIG_SYS_SUPPORTS_NUMA=y 25CONFIG_SYS_SUPPORTS_NUMA=y
26CONFIG_SYS_SUPPORTS_TMU=y
26CONFIG_STACKTRACE_SUPPORT=y 27CONFIG_STACKTRACE_SUPPORT=y
27CONFIG_LOCKDEP_SUPPORT=y 28CONFIG_LOCKDEP_SUPPORT=y
28# CONFIG_ARCH_HAS_ILOG2_U32 is not set 29# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -98,7 +99,6 @@ CONFIG_SYSCTL_SYSCALL=y
98CONFIG_KALLSYMS=y 99CONFIG_KALLSYMS=y
99CONFIG_KALLSYMS_ALL=y 100CONFIG_KALLSYMS_ALL=y
100# CONFIG_KALLSYMS_EXTRA_PASS is not set 101# CONFIG_KALLSYMS_EXTRA_PASS is not set
101# CONFIG_STRIP_ASM_SYMS is not set
102CONFIG_HOTPLUG=y 102CONFIG_HOTPLUG=y
103CONFIG_PRINTK=y 103CONFIG_PRINTK=y
104CONFIG_BUG=y 104CONFIG_BUG=y
@@ -111,14 +111,19 @@ CONFIG_TIMERFD=y
111CONFIG_EVENTFD=y 111CONFIG_EVENTFD=y
112CONFIG_SHMEM=y 112CONFIG_SHMEM=y
113CONFIG_AIO=y 113CONFIG_AIO=y
114
115#
116# Performance Counters
117#
114CONFIG_VM_EVENT_COUNTERS=y 118CONFIG_VM_EVENT_COUNTERS=y
119# CONFIG_STRIP_ASM_SYMS is not set
115CONFIG_COMPAT_BRK=y 120CONFIG_COMPAT_BRK=y
116# CONFIG_SLAB is not set 121# CONFIG_SLAB is not set
117# CONFIG_SLUB is not set 122# CONFIG_SLUB is not set
118CONFIG_SLOB=y 123CONFIG_SLOB=y
119CONFIG_PROFILING=y 124CONFIG_PROFILING=y
120CONFIG_TRACEPOINTS=y 125CONFIG_TRACEPOINTS=y
121# CONFIG_MARKERS is not set 126CONFIG_MARKERS=y
122CONFIG_OPROFILE=y 127CONFIG_OPROFILE=y
123CONFIG_HAVE_OPROFILE=y 128CONFIG_HAVE_OPROFILE=y
124CONFIG_KPROBES=y 129CONFIG_KPROBES=y
@@ -207,6 +212,7 @@ CONFIG_CPU_SUBTYPE_SHX3=y
207CONFIG_QUICKLIST=y 212CONFIG_QUICKLIST=y
208CONFIG_MMU=y 213CONFIG_MMU=y
209CONFIG_PAGE_OFFSET=0x80000000 214CONFIG_PAGE_OFFSET=0x80000000
215CONFIG_FORCE_MAX_ZONEORDER=7
210CONFIG_MEMORY_START=0x0c000000 216CONFIG_MEMORY_START=0x0c000000
211CONFIG_MEMORY_SIZE=0x04000000 217CONFIG_MEMORY_SIZE=0x04000000
212CONFIG_29BIT=y 218CONFIG_29BIT=y
@@ -226,7 +232,6 @@ CONFIG_ARCH_MEMORY_PROBE=y
226# CONFIG_PAGE_SIZE_8KB is not set 232# CONFIG_PAGE_SIZE_8KB is not set
227# CONFIG_PAGE_SIZE_16KB is not set 233# CONFIG_PAGE_SIZE_16KB is not set
228CONFIG_PAGE_SIZE_64KB=y 234CONFIG_PAGE_SIZE_64KB=y
229CONFIG_ENTRY_OFFSET=0x00010000
230# CONFIG_HUGETLB_PAGE_SIZE_64K is not set 235# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
231# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 236# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
232CONFIG_HUGETLB_PAGE_SIZE_1MB=y 237CONFIG_HUGETLB_PAGE_SIZE_1MB=y
@@ -249,9 +254,9 @@ CONFIG_MIGRATION=y
249# CONFIG_PHYS_ADDR_T_64BIT is not set 254# CONFIG_PHYS_ADDR_T_64BIT is not set
250CONFIG_ZONE_DMA_FLAG=0 255CONFIG_ZONE_DMA_FLAG=0
251CONFIG_NR_QUICK=2 256CONFIG_NR_QUICK=2
252CONFIG_UNEVICTABLE_LRU=y
253CONFIG_HAVE_MLOCK=y 257CONFIG_HAVE_MLOCK=y
254CONFIG_HAVE_MLOCKED_PAGE_BIT=y 258CONFIG_HAVE_MLOCKED_PAGE_BIT=y
259CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
255 260
256# 261#
257# Cache configuration 262# Cache configuration
@@ -279,9 +284,10 @@ CONFIG_SH_X3PROTO=y
279# 284#
280# Timer and clock configuration 285# Timer and clock configuration
281# 286#
282CONFIG_SH_TMU=y 287CONFIG_SH_TIMER_TMU=y
283CONFIG_SH_TIMER_IRQ=16
284CONFIG_SH_PCLK_FREQ=50000000 288CONFIG_SH_PCLK_FREQ=50000000
289CONFIG_SH_CLK_CPG=y
290CONFIG_SH_CLK_CPG_LEGACY=y
285CONFIG_TICK_ONESHOT=y 291CONFIG_TICK_ONESHOT=y
286CONFIG_NO_HZ=y 292CONFIG_NO_HZ=y
287CONFIG_HIGH_RES_TIMERS=y 293CONFIG_HIGH_RES_TIMERS=y
@@ -339,12 +345,14 @@ CONFIG_NR_CPUS=4
339# CONFIG_PREEMPT_NONE is not set 345# CONFIG_PREEMPT_NONE is not set
340# CONFIG_PREEMPT_VOLUNTARY is not set 346# CONFIG_PREEMPT_VOLUNTARY is not set
341CONFIG_PREEMPT=y 347CONFIG_PREEMPT=y
348# CONFIG_SPARSE_IRQ is not set
342 349
343# 350#
344# Boot options 351# Boot options
345# 352#
346CONFIG_ZERO_PAGE_OFFSET=0x00001000 353CONFIG_ZERO_PAGE_OFFSET=0x00010000
347CONFIG_BOOT_LINK_OFFSET=0x00800000 354CONFIG_BOOT_LINK_OFFSET=0x00800000
355CONFIG_ENTRY_OFFSET=0x00010000
348CONFIG_CMDLINE_BOOL=y 356CONFIG_CMDLINE_BOOL=y
349CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=bios ignore_loglevel" 357CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=bios ignore_loglevel"
350 358
@@ -444,6 +452,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
444# CONFIG_ECONET is not set 452# CONFIG_ECONET is not set
445# CONFIG_WAN_ROUTER is not set 453# CONFIG_WAN_ROUTER is not set
446# CONFIG_PHONET is not set 454# CONFIG_PHONET is not set
455# CONFIG_IEEE802154 is not set
447# CONFIG_NET_SCHED is not set 456# CONFIG_NET_SCHED is not set
448# CONFIG_DCB is not set 457# CONFIG_DCB is not set
449 458
@@ -462,6 +471,7 @@ CONFIG_CAN_BCM=m
462# CAN Device Drivers 471# CAN Device Drivers
463# 472#
464CONFIG_CAN_VCAN=m 473CONFIG_CAN_VCAN=m
474# CONFIG_CAN_DEV is not set
465# CONFIG_CAN_DEBUG_DEVICES is not set 475# CONFIG_CAN_DEBUG_DEVICES is not set
466# CONFIG_IRDA is not set 476# CONFIG_IRDA is not set
467# CONFIG_BT is not set 477# CONFIG_BT is not set
@@ -512,6 +522,7 @@ CONFIG_MISC_DEVICES=y
512# CONFIG_EEPROM_AT24 is not set 522# CONFIG_EEPROM_AT24 is not set
513# CONFIG_EEPROM_AT25 is not set 523# CONFIG_EEPROM_AT25 is not set
514# CONFIG_EEPROM_LEGACY is not set 524# CONFIG_EEPROM_LEGACY is not set
525# CONFIG_EEPROM_MAX6875 is not set
515# CONFIG_EEPROM_93CX6 is not set 526# CONFIG_EEPROM_93CX6 is not set
516CONFIG_HAVE_IDE=y 527CONFIG_HAVE_IDE=y
517# CONFIG_IDE is not set 528# CONFIG_IDE is not set
@@ -535,10 +546,6 @@ CONFIG_BLK_DEV_SD=y
535# CONFIG_BLK_DEV_SR is not set 546# CONFIG_BLK_DEV_SR is not set
536# CONFIG_CHR_DEV_SG is not set 547# CONFIG_CHR_DEV_SG is not set
537# CONFIG_CHR_DEV_SCH is not set 548# CONFIG_CHR_DEV_SCH is not set
538
539#
540# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
541#
542# CONFIG_SCSI_MULTI_LUN is not set 549# CONFIG_SCSI_MULTI_LUN is not set
543# CONFIG_SCSI_CONSTANTS is not set 550# CONFIG_SCSI_CONSTANTS is not set
544# CONFIG_SCSI_LOGGING is not set 551# CONFIG_SCSI_LOGGING is not set
@@ -555,6 +562,7 @@ CONFIG_SCSI_WAIT_SCAN=m
555# CONFIG_SCSI_SRP_ATTRS is not set 562# CONFIG_SCSI_SRP_ATTRS is not set
556CONFIG_SCSI_LOWLEVEL=y 563CONFIG_SCSI_LOWLEVEL=y
557# CONFIG_ISCSI_TCP is not set 564# CONFIG_ISCSI_TCP is not set
565# CONFIG_SCSI_BNX2_ISCSI is not set
558# CONFIG_LIBFC is not set 566# CONFIG_LIBFC is not set
559# CONFIG_LIBFCOE is not set 567# CONFIG_LIBFCOE is not set
560# CONFIG_SCSI_DEBUG is not set 568# CONFIG_SCSI_DEBUG is not set
@@ -568,7 +576,6 @@ CONFIG_ATA_SFF=y
568CONFIG_PATA_PLATFORM=y 576CONFIG_PATA_PLATFORM=y
569# CONFIG_MD is not set 577# CONFIG_MD is not set
570CONFIG_NETDEVICES=y 578CONFIG_NETDEVICES=y
571CONFIG_COMPAT_NET_DEV_OPS=y
572# CONFIG_DUMMY is not set 579# CONFIG_DUMMY is not set
573# CONFIG_BONDING is not set 580# CONFIG_BONDING is not set
574# CONFIG_MACVLAN is not set 581# CONFIG_MACVLAN is not set
@@ -594,6 +601,7 @@ CONFIG_SMC91X=y
594# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 601# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
595# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 602# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
596# CONFIG_B44 is not set 603# CONFIG_B44 is not set
604# CONFIG_KS8842 is not set
597# CONFIG_NETDEV_1000 is not set 605# CONFIG_NETDEV_1000 is not set
598# CONFIG_NETDEV_10000 is not set 606# CONFIG_NETDEV_10000 is not set
599 607
@@ -701,7 +709,6 @@ CONFIG_I2C_HELPER_AUTO=y
701# CONFIG_SENSORS_PCF8574 is not set 709# CONFIG_SENSORS_PCF8574 is not set
702# CONFIG_PCF8575 is not set 710# CONFIG_PCF8575 is not set
703# CONFIG_SENSORS_PCA9539 is not set 711# CONFIG_SENSORS_PCA9539 is not set
704# CONFIG_SENSORS_MAX6875 is not set
705# CONFIG_SENSORS_TSL2550 is not set 712# CONFIG_SENSORS_TSL2550 is not set
706# CONFIG_I2C_DEBUG_CORE is not set 713# CONFIG_I2C_DEBUG_CORE is not set
707# CONFIG_I2C_DEBUG_ALGO is not set 714# CONFIG_I2C_DEBUG_ALGO is not set
@@ -758,22 +765,7 @@ CONFIG_SSB_POSSIBLE=y
758# CONFIG_MFD_WM8350_I2C is not set 765# CONFIG_MFD_WM8350_I2C is not set
759# CONFIG_MFD_PCF50633 is not set 766# CONFIG_MFD_PCF50633 is not set
760# CONFIG_REGULATOR is not set 767# CONFIG_REGULATOR is not set
761 768# CONFIG_MEDIA_SUPPORT is not set
762#
763# Multimedia devices
764#
765
766#
767# Multimedia core support
768#
769# CONFIG_VIDEO_DEV is not set
770# CONFIG_DVB_CORE is not set
771# CONFIG_VIDEO_MEDIA is not set
772
773#
774# Multimedia drivers
775#
776# CONFIG_DAB is not set
777 769
778# 770#
779# Graphics support 771# Graphics support
@@ -885,6 +877,7 @@ CONFIG_USB_GADGET_SELECTED=y
885# CONFIG_USB_GADGET_OMAP is not set 877# CONFIG_USB_GADGET_OMAP is not set
886# CONFIG_USB_GADGET_PXA25X is not set 878# CONFIG_USB_GADGET_PXA25X is not set
887# CONFIG_USB_GADGET_PXA27X is not set 879# CONFIG_USB_GADGET_PXA27X is not set
880# CONFIG_USB_GADGET_S3C_HSOTG is not set
888# CONFIG_USB_GADGET_S3C2410 is not set 881# CONFIG_USB_GADGET_S3C2410 is not set
889# CONFIG_USB_GADGET_IMX is not set 882# CONFIG_USB_GADGET_IMX is not set
890CONFIG_USB_GADGET_M66592=y 883CONFIG_USB_GADGET_M66592=y
@@ -894,9 +887,11 @@ CONFIG_USB_M66592=y
894# CONFIG_USB_GADGET_CI13XXX is not set 887# CONFIG_USB_GADGET_CI13XXX is not set
895# CONFIG_USB_GADGET_NET2280 is not set 888# CONFIG_USB_GADGET_NET2280 is not set
896# CONFIG_USB_GADGET_GOKU is not set 889# CONFIG_USB_GADGET_GOKU is not set
890# CONFIG_USB_GADGET_LANGWELL is not set
897# CONFIG_USB_GADGET_DUMMY_HCD is not set 891# CONFIG_USB_GADGET_DUMMY_HCD is not set
898CONFIG_USB_GADGET_DUALSPEED=y 892CONFIG_USB_GADGET_DUALSPEED=y
899# CONFIG_USB_ZERO is not set 893# CONFIG_USB_ZERO is not set
894# CONFIG_USB_AUDIO is not set
900# CONFIG_USB_ETH is not set 895# CONFIG_USB_ETH is not set
901# CONFIG_USB_GADGETFS is not set 896# CONFIG_USB_GADGETFS is not set
902# CONFIG_USB_FILE_STORAGE is not set 897# CONFIG_USB_FILE_STORAGE is not set
@@ -974,6 +969,7 @@ CONFIG_RTC_INTF_DEV=y
974# on-CPU RTC drivers 969# on-CPU RTC drivers
975# 970#
976CONFIG_RTC_DRV_SH=y 971CONFIG_RTC_DRV_SH=y
972# CONFIG_RTC_DRV_GENERIC is not set
977# CONFIG_DMADEVICES is not set 973# CONFIG_DMADEVICES is not set
978# CONFIG_AUXDISPLAY is not set 974# CONFIG_AUXDISPLAY is not set
979CONFIG_UIO=m 975CONFIG_UIO=m
@@ -981,6 +977,10 @@ CONFIG_UIO=m
981# CONFIG_UIO_PDRV_GENIRQ is not set 977# CONFIG_UIO_PDRV_GENIRQ is not set
982# CONFIG_UIO_SMX is not set 978# CONFIG_UIO_SMX is not set
983# CONFIG_UIO_SERCOS3 is not set 979# CONFIG_UIO_SERCOS3 is not set
980
981#
982# TI VLYNQ
983#
984# CONFIG_STAGING is not set 984# CONFIG_STAGING is not set
985 985
986# 986#
@@ -1001,10 +1001,11 @@ CONFIG_FS_MBCACHE=y
1001# CONFIG_REISERFS_FS is not set 1001# CONFIG_REISERFS_FS is not set
1002# CONFIG_JFS_FS is not set 1002# CONFIG_JFS_FS is not set
1003# CONFIG_FS_POSIX_ACL is not set 1003# CONFIG_FS_POSIX_ACL is not set
1004CONFIG_FILE_LOCKING=y
1005# CONFIG_XFS_FS is not set 1004# CONFIG_XFS_FS is not set
1006# CONFIG_OCFS2_FS is not set 1005# CONFIG_OCFS2_FS is not set
1007# CONFIG_BTRFS_FS is not set 1006# CONFIG_BTRFS_FS is not set
1007CONFIG_FILE_LOCKING=y
1008CONFIG_FSNOTIFY=y
1008CONFIG_DNOTIFY=y 1009CONFIG_DNOTIFY=y
1009CONFIG_INOTIFY=y 1010CONFIG_INOTIFY=y
1010CONFIG_INOTIFY_USER=y 1011CONFIG_INOTIFY_USER=y
@@ -1077,7 +1078,46 @@ CONFIG_NETWORK_FILESYSTEMS=y
1077# 1078#
1078# CONFIG_PARTITION_ADVANCED is not set 1079# CONFIG_PARTITION_ADVANCED is not set
1079CONFIG_MSDOS_PARTITION=y 1080CONFIG_MSDOS_PARTITION=y
1080# CONFIG_NLS is not set 1081CONFIG_NLS=y
1082CONFIG_NLS_DEFAULT="iso8859-1"
1083# CONFIG_NLS_CODEPAGE_437 is not set
1084# CONFIG_NLS_CODEPAGE_737 is not set
1085# CONFIG_NLS_CODEPAGE_775 is not set
1086# CONFIG_NLS_CODEPAGE_850 is not set
1087# CONFIG_NLS_CODEPAGE_852 is not set
1088# CONFIG_NLS_CODEPAGE_855 is not set
1089# CONFIG_NLS_CODEPAGE_857 is not set
1090# CONFIG_NLS_CODEPAGE_860 is not set
1091# CONFIG_NLS_CODEPAGE_861 is not set
1092# CONFIG_NLS_CODEPAGE_862 is not set
1093# CONFIG_NLS_CODEPAGE_863 is not set
1094# CONFIG_NLS_CODEPAGE_864 is not set
1095# CONFIG_NLS_CODEPAGE_865 is not set
1096# CONFIG_NLS_CODEPAGE_866 is not set
1097# CONFIG_NLS_CODEPAGE_869 is not set
1098# CONFIG_NLS_CODEPAGE_936 is not set
1099# CONFIG_NLS_CODEPAGE_950 is not set
1100# CONFIG_NLS_CODEPAGE_932 is not set
1101# CONFIG_NLS_CODEPAGE_949 is not set
1102# CONFIG_NLS_CODEPAGE_874 is not set
1103# CONFIG_NLS_ISO8859_8 is not set
1104# CONFIG_NLS_CODEPAGE_1250 is not set
1105# CONFIG_NLS_CODEPAGE_1251 is not set
1106# CONFIG_NLS_ASCII is not set
1107# CONFIG_NLS_ISO8859_1 is not set
1108# CONFIG_NLS_ISO8859_2 is not set
1109# CONFIG_NLS_ISO8859_3 is not set
1110# CONFIG_NLS_ISO8859_4 is not set
1111# CONFIG_NLS_ISO8859_5 is not set
1112# CONFIG_NLS_ISO8859_6 is not set
1113# CONFIG_NLS_ISO8859_7 is not set
1114# CONFIG_NLS_ISO8859_9 is not set
1115# CONFIG_NLS_ISO8859_13 is not set
1116# CONFIG_NLS_ISO8859_14 is not set
1117# CONFIG_NLS_ISO8859_15 is not set
1118# CONFIG_NLS_KOI8_R is not set
1119# CONFIG_NLS_KOI8_U is not set
1120# CONFIG_NLS_UTF8 is not set
1081# CONFIG_DLM is not set 1121# CONFIG_DLM is not set
1082 1122
1083# 1123#
@@ -1138,25 +1178,25 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1138CONFIG_HAVE_DYNAMIC_FTRACE=y 1178CONFIG_HAVE_DYNAMIC_FTRACE=y
1139CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1179CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1140CONFIG_RING_BUFFER=y 1180CONFIG_RING_BUFFER=y
1181CONFIG_EVENT_TRACING=y
1182CONFIG_CONTEXT_SWITCH_TRACER=y
1141CONFIG_TRACING=y 1183CONFIG_TRACING=y
1142CONFIG_TRACING_SUPPORT=y 1184CONFIG_TRACING_SUPPORT=y
1143 1185CONFIG_FTRACE=y
1144#
1145# Tracers
1146#
1147# CONFIG_FUNCTION_TRACER is not set 1186# CONFIG_FUNCTION_TRACER is not set
1148# CONFIG_IRQSOFF_TRACER is not set 1187# CONFIG_IRQSOFF_TRACER is not set
1149# CONFIG_PREEMPT_TRACER is not set 1188# CONFIG_PREEMPT_TRACER is not set
1150# CONFIG_SCHED_TRACER is not set 1189# CONFIG_SCHED_TRACER is not set
1151# CONFIG_CONTEXT_SWITCH_TRACER is not set 1190# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1152# CONFIG_EVENT_TRACER is not set
1153# CONFIG_BOOT_TRACER is not set 1191# CONFIG_BOOT_TRACER is not set
1154# CONFIG_TRACE_BRANCH_PROFILING is not set 1192CONFIG_BRANCH_PROFILE_NONE=y
1193# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1194# CONFIG_PROFILE_ALL_BRANCHES is not set
1155# CONFIG_STACK_TRACER is not set 1195# CONFIG_STACK_TRACER is not set
1156# CONFIG_KMEMTRACE is not set 1196# CONFIG_KMEMTRACE is not set
1157# CONFIG_WORKQUEUE_TRACER is not set 1197# CONFIG_WORKQUEUE_TRACER is not set
1158# CONFIG_BLK_DEV_IO_TRACE is not set 1198# CONFIG_BLK_DEV_IO_TRACE is not set
1159# CONFIG_FTRACE_STARTUP_TEST is not set 1199# CONFIG_RING_BUFFER_BENCHMARK is not set
1160# CONFIG_DYNAMIC_DEBUG is not set 1200# CONFIG_DYNAMIC_DEBUG is not set
1161# CONFIG_DMA_API_DEBUG is not set 1201# CONFIG_DMA_API_DEBUG is not set
1162# CONFIG_SAMPLES is not set 1202# CONFIG_SAMPLES is not set
@@ -1168,10 +1208,8 @@ CONFIG_EARLY_PRINTK=y
1168# CONFIG_DEBUG_BOOTMEM is not set 1208# CONFIG_DEBUG_BOOTMEM is not set
1169CONFIG_DEBUG_STACKOVERFLOW=y 1209CONFIG_DEBUG_STACKOVERFLOW=y
1170CONFIG_DEBUG_STACK_USAGE=y 1210CONFIG_DEBUG_STACK_USAGE=y
1171# CONFIG_IRQSTACKS is not set
1172CONFIG_DUMP_CODE=y 1211CONFIG_DUMP_CODE=y
1173# CONFIG_SH_NO_BSS_INIT is not set 1212# CONFIG_SH_NO_BSS_INIT is not set
1174# CONFIG_MORE_COMPILE_OPTIONS is not set
1175 1213
1176# 1214#
1177# Security options 1215# Security options
@@ -1285,3 +1323,4 @@ CONFIG_HAS_IOMEM=y
1285CONFIG_HAS_IOPORT=y 1323CONFIG_HAS_IOPORT=y
1286CONFIG_HAS_DMA=y 1324CONFIG_HAS_DMA=y
1287CONFIG_NLATTR=y 1325CONFIG_NLATTR=y
1326CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/snapgear_defconfig b/arch/sh/configs/snapgear_defconfig
index 54a7a3c41f34..ca3c88a88021 100644
--- a/arch/sh/configs/snapgear_defconfig
+++ b/arch/sh/configs/snapgear_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:14:00 2009 4# Thu Jun 18 13:11:58 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -73,7 +74,6 @@ CONFIG_UID16=y
73# CONFIG_SYSCTL_SYSCALL is not set 74# CONFIG_SYSCTL_SYSCALL is not set
74CONFIG_KALLSYMS=y 75CONFIG_KALLSYMS=y
75# CONFIG_KALLSYMS_EXTRA_PASS is not set 76# CONFIG_KALLSYMS_EXTRA_PASS is not set
76# CONFIG_STRIP_ASM_SYMS is not set
77# CONFIG_HOTPLUG is not set 77# CONFIG_HOTPLUG is not set
78CONFIG_PRINTK=y 78CONFIG_PRINTK=y
79CONFIG_BUG=y 79CONFIG_BUG=y
@@ -86,8 +86,13 @@ CONFIG_TIMERFD=y
86CONFIG_EVENTFD=y 86CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 87CONFIG_SHMEM=y
88CONFIG_AIO=y 88CONFIG_AIO=y
89
90#
91# Performance Counters
92#
89CONFIG_VM_EVENT_COUNTERS=y 93CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_PCI_QUIRKS=y 94CONFIG_PCI_QUIRKS=y
95# CONFIG_STRIP_ASM_SYMS is not set
91CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
92CONFIG_SLAB=y 97CONFIG_SLAB=y
93# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
@@ -171,6 +176,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
171CONFIG_QUICKLIST=y 176CONFIG_QUICKLIST=y
172CONFIG_MMU=y 177CONFIG_MMU=y
173CONFIG_PAGE_OFFSET=0x80000000 178CONFIG_PAGE_OFFSET=0x80000000
179CONFIG_FORCE_MAX_ZONEORDER=11
174CONFIG_MEMORY_START=0x08000000 180CONFIG_MEMORY_START=0x08000000
175CONFIG_MEMORY_SIZE=0x01000000 181CONFIG_MEMORY_SIZE=0x01000000
176CONFIG_29BIT=y 182CONFIG_29BIT=y
@@ -185,7 +191,6 @@ CONFIG_PAGE_SIZE_4KB=y
185# CONFIG_PAGE_SIZE_8KB is not set 191# CONFIG_PAGE_SIZE_8KB is not set
186# CONFIG_PAGE_SIZE_16KB is not set 192# CONFIG_PAGE_SIZE_16KB is not set
187# CONFIG_PAGE_SIZE_64KB is not set 193# CONFIG_PAGE_SIZE_64KB is not set
188CONFIG_ENTRY_OFFSET=0x00001000
189CONFIG_SELECT_MEMORY_MODEL=y 194CONFIG_SELECT_MEMORY_MODEL=y
190CONFIG_FLATMEM_MANUAL=y 195CONFIG_FLATMEM_MANUAL=y
191# CONFIG_DISCONTIGMEM_MANUAL is not set 196# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -198,9 +203,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
198# CONFIG_PHYS_ADDR_T_64BIT is not set 203# CONFIG_PHYS_ADDR_T_64BIT is not set
199CONFIG_ZONE_DMA_FLAG=0 204CONFIG_ZONE_DMA_FLAG=0
200CONFIG_NR_QUICK=2 205CONFIG_NR_QUICK=2
201CONFIG_UNEVICTABLE_LRU=y
202CONFIG_HAVE_MLOCK=y 206CONFIG_HAVE_MLOCK=y
203CONFIG_HAVE_MLOCKED_PAGE_BIT=y 207CONFIG_HAVE_MLOCKED_PAGE_BIT=y
208CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
204 209
205# 210#
206# Cache configuration 211# Cache configuration
@@ -219,7 +224,6 @@ CONFIG_SH_FPU=y
219CONFIG_CPU_HAS_INTEVT=y 224CONFIG_CPU_HAS_INTEVT=y
220CONFIG_CPU_HAS_IPR_IRQ=y 225CONFIG_CPU_HAS_IPR_IRQ=y
221CONFIG_CPU_HAS_SR_RB=y 226CONFIG_CPU_HAS_SR_RB=y
222CONFIG_CPU_HAS_PTEA=y
223CONFIG_CPU_HAS_FPU=y 227CONFIG_CPU_HAS_FPU=y
224 228
225# 229#
@@ -235,9 +239,10 @@ CONFIG_SH_SECUREEDGE5410=y
235# 239#
236# Timer and clock configuration 240# Timer and clock configuration
237# 241#
238CONFIG_SH_TMU=y 242CONFIG_SH_TIMER_TMU=y
239CONFIG_SH_TIMER_IRQ=16
240CONFIG_SH_PCLK_FREQ=60000000 243CONFIG_SH_PCLK_FREQ=60000000
244CONFIG_SH_CLK_CPG=y
245CONFIG_SH_CLK_CPG_LEGACY=y
241# CONFIG_NO_HZ is not set 246# CONFIG_NO_HZ is not set
242# CONFIG_HIGH_RES_TIMERS is not set 247# CONFIG_HIGH_RES_TIMERS is not set
243CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 248CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -283,12 +288,14 @@ CONFIG_PREEMPT_NONE=y
283# CONFIG_PREEMPT is not set 288# CONFIG_PREEMPT is not set
284CONFIG_GUSA=y 289CONFIG_GUSA=y
285# CONFIG_GUSA_RB is not set 290# CONFIG_GUSA_RB is not set
291# CONFIG_SPARSE_IRQ is not set
286 292
287# 293#
288# Boot options 294# Boot options
289# 295#
290CONFIG_ZERO_PAGE_OFFSET=0x00001000 296CONFIG_ZERO_PAGE_OFFSET=0x00001000
291CONFIG_BOOT_LINK_OFFSET=0x00800000 297CONFIG_BOOT_LINK_OFFSET=0x00800000
298CONFIG_ENTRY_OFFSET=0x00001000
292# CONFIG_UBC_WAKEUP is not set 299# CONFIG_UBC_WAKEUP is not set
293# CONFIG_CMDLINE_BOOL is not set 300# CONFIG_CMDLINE_BOOL is not set
294 301
@@ -366,6 +373,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 375# CONFIG_PHONET is not set
376# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 377# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 378# CONFIG_DCB is not set
371 379
@@ -383,7 +391,11 @@ CONFIG_WIRELESS=y
383# CONFIG_WIRELESS_OLD_REGULATORY is not set 391# CONFIG_WIRELESS_OLD_REGULATORY is not set
384# CONFIG_WIRELESS_EXT is not set 392# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 393# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 394
395#
396# CFG80211 needs to be enabled for MAC80211
397#
398CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 399# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 400# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 401# CONFIG_NET_9P is not set
@@ -528,7 +540,6 @@ CONFIG_HAVE_IDE=y
528# CONFIG_IEEE1394 is not set 540# CONFIG_IEEE1394 is not set
529# CONFIG_I2O is not set 541# CONFIG_I2O is not set
530CONFIG_NETDEVICES=y 542CONFIG_NETDEVICES=y
531CONFIG_COMPAT_NET_DEV_OPS=y
532# CONFIG_DUMMY is not set 543# CONFIG_DUMMY is not set
533# CONFIG_BONDING is not set 544# CONFIG_BONDING is not set
534# CONFIG_MACVLAN is not set 545# CONFIG_MACVLAN is not set
@@ -581,6 +592,7 @@ CONFIG_8139TOO_PIO=y
581# CONFIG_SMSC9420 is not set 592# CONFIG_SMSC9420 is not set
582# CONFIG_SUNDANCE is not set 593# CONFIG_SUNDANCE is not set
583# CONFIG_TLAN is not set 594# CONFIG_TLAN is not set
595# CONFIG_KS8842 is not set
584# CONFIG_VIA_RHINE is not set 596# CONFIG_VIA_RHINE is not set
585# CONFIG_SC92031 is not set 597# CONFIG_SC92031 is not set
586# CONFIG_ATL2 is not set 598# CONFIG_ATL2 is not set
@@ -695,22 +707,7 @@ CONFIG_SSB_POSSIBLE=y
695# CONFIG_HTC_PASIC3 is not set 707# CONFIG_HTC_PASIC3 is not set
696# CONFIG_MFD_TMIO is not set 708# CONFIG_MFD_TMIO is not set
697# CONFIG_REGULATOR is not set 709# CONFIG_REGULATOR is not set
698 710# CONFIG_MEDIA_SUPPORT is not set
699#
700# Multimedia devices
701#
702
703#
704# Multimedia core support
705#
706# CONFIG_VIDEO_DEV is not set
707# CONFIG_DVB_CORE is not set
708# CONFIG_VIDEO_MEDIA is not set
709
710#
711# Multimedia drivers
712#
713# CONFIG_DAB is not set
714 711
715# 712#
716# Graphics support 713# Graphics support
@@ -734,10 +731,15 @@ CONFIG_SSB_POSSIBLE=y
734# CONFIG_NEW_LEDS is not set 731# CONFIG_NEW_LEDS is not set
735# CONFIG_ACCESSIBILITY is not set 732# CONFIG_ACCESSIBILITY is not set
736# CONFIG_INFINIBAND is not set 733# CONFIG_INFINIBAND is not set
734CONFIG_RTC_LIB=y
737# CONFIG_RTC_CLASS is not set 735# CONFIG_RTC_CLASS is not set
738# CONFIG_DMADEVICES is not set 736# CONFIG_DMADEVICES is not set
739# CONFIG_AUXDISPLAY is not set 737# CONFIG_AUXDISPLAY is not set
740# CONFIG_UIO is not set 738# CONFIG_UIO is not set
739
740#
741# TI VLYNQ
742#
741# CONFIG_STAGING is not set 743# CONFIG_STAGING is not set
742 744
743# 745#
@@ -751,12 +753,14 @@ CONFIG_EXT2_FS=y
751# CONFIG_REISERFS_FS is not set 753# CONFIG_REISERFS_FS is not set
752# CONFIG_JFS_FS is not set 754# CONFIG_JFS_FS is not set
753# CONFIG_FS_POSIX_ACL is not set 755# CONFIG_FS_POSIX_ACL is not set
754CONFIG_FILE_LOCKING=y
755# CONFIG_XFS_FS is not set 756# CONFIG_XFS_FS is not set
756# CONFIG_OCFS2_FS is not set 757# CONFIG_OCFS2_FS is not set
757# CONFIG_BTRFS_FS is not set 758# CONFIG_BTRFS_FS is not set
759CONFIG_FILE_LOCKING=y
760CONFIG_FSNOTIFY=y
758# CONFIG_DNOTIFY is not set 761# CONFIG_DNOTIFY is not set
759# CONFIG_INOTIFY is not set 762# CONFIG_INOTIFY is not set
763CONFIG_INOTIFY_USER=y
760# CONFIG_QUOTA is not set 764# CONFIG_QUOTA is not set
761# CONFIG_AUTOFS_FS is not set 765# CONFIG_AUTOFS_FS is not set
762# CONFIG_AUTOFS4_FS is not set 766# CONFIG_AUTOFS4_FS is not set
@@ -855,27 +859,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
855CONFIG_HAVE_DYNAMIC_FTRACE=y 859CONFIG_HAVE_DYNAMIC_FTRACE=y
856CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 860CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
857CONFIG_TRACING_SUPPORT=y 861CONFIG_TRACING_SUPPORT=y
858 862# CONFIG_FTRACE is not set
859#
860# Tracers
861#
862# CONFIG_FUNCTION_TRACER is not set
863# CONFIG_IRQSOFF_TRACER is not set
864# CONFIG_SCHED_TRACER is not set
865# CONFIG_CONTEXT_SWITCH_TRACER is not set
866# CONFIG_EVENT_TRACER is not set
867# CONFIG_BOOT_TRACER is not set
868# CONFIG_TRACE_BRANCH_PROFILING is not set
869# CONFIG_STACK_TRACER is not set
870# CONFIG_KMEMTRACE is not set
871# CONFIG_WORKQUEUE_TRACER is not set
872# CONFIG_BLK_DEV_IO_TRACE is not set
873# CONFIG_DMA_API_DEBUG is not set 863# CONFIG_DMA_API_DEBUG is not set
874# CONFIG_SAMPLES is not set 864# CONFIG_SAMPLES is not set
875CONFIG_HAVE_ARCH_KGDB=y 865CONFIG_HAVE_ARCH_KGDB=y
876# CONFIG_SH_STANDARD_BIOS is not set 866# CONFIG_SH_STANDARD_BIOS is not set
877# CONFIG_EARLY_SCIF_CONSOLE is not set 867# CONFIG_EARLY_SCIF_CONSOLE is not set
878# CONFIG_MORE_COMPILE_OPTIONS is not set
879 868
880# 869#
881# Security options 870# Security options
@@ -905,3 +894,4 @@ CONFIG_HAS_IOMEM=y
905CONFIG_HAS_IOPORT=y 894CONFIG_HAS_IOPORT=y
906CONFIG_HAS_DMA=y 895CONFIG_HAS_DMA=y
907CONFIG_NLATTR=y 896CONFIG_NLATTR=y
897CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/systemh_defconfig b/arch/sh/configs/systemh_defconfig
index dbe7e546f0bb..5d970263c096 100644
--- a/arch/sh/configs/systemh_defconfig
+++ b/arch/sh/configs/systemh_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:14:33 2009 4# Thu Jun 18 13:12:28 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -19,6 +19,7 @@ CONFIG_GENERIC_TIME=y
19CONFIG_GENERIC_CLOCKEVENTS=y 19CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_TMU=y
22CONFIG_STACKTRACE_SUPPORT=y 23CONFIG_STACKTRACE_SUPPORT=y
23CONFIG_LOCKDEP_SUPPORT=y 24CONFIG_LOCKDEP_SUPPORT=y
24CONFIG_HAVE_LATENCYTOP_SUPPORT=y 25CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -70,7 +71,6 @@ CONFIG_UID16=y
70# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
73# CONFIG_STRIP_ASM_SYMS is not set
74# CONFIG_HOTPLUG is not set 74# CONFIG_HOTPLUG is not set
75CONFIG_PRINTK=y 75CONFIG_PRINTK=y
76CONFIG_BUG=y 76CONFIG_BUG=y
@@ -83,7 +83,12 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y 85CONFIG_AIO=y
86
87#
88# Performance Counters
89#
86CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
91# CONFIG_STRIP_ASM_SYMS is not set
87CONFIG_COMPAT_BRK=y 92CONFIG_COMPAT_BRK=y
88CONFIG_SLAB=y 93CONFIG_SLAB=y
89# CONFIG_SLUB is not set 94# CONFIG_SLUB is not set
@@ -173,6 +178,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
173CONFIG_QUICKLIST=y 178CONFIG_QUICKLIST=y
174CONFIG_MMU=y 179CONFIG_MMU=y
175CONFIG_PAGE_OFFSET=0x80000000 180CONFIG_PAGE_OFFSET=0x80000000
181CONFIG_FORCE_MAX_ZONEORDER=11
176CONFIG_MEMORY_START=0x0c000000 182CONFIG_MEMORY_START=0x0c000000
177CONFIG_MEMORY_SIZE=0x00400000 183CONFIG_MEMORY_SIZE=0x00400000
178CONFIG_29BIT=y 184CONFIG_29BIT=y
@@ -187,7 +193,6 @@ CONFIG_PAGE_SIZE_4KB=y
187# CONFIG_PAGE_SIZE_8KB is not set 193# CONFIG_PAGE_SIZE_8KB is not set
188# CONFIG_PAGE_SIZE_16KB is not set 194# CONFIG_PAGE_SIZE_16KB is not set
189# CONFIG_PAGE_SIZE_64KB is not set 195# CONFIG_PAGE_SIZE_64KB is not set
190CONFIG_ENTRY_OFFSET=0x00001000
191CONFIG_SELECT_MEMORY_MODEL=y 196CONFIG_SELECT_MEMORY_MODEL=y
192CONFIG_FLATMEM_MANUAL=y 197CONFIG_FLATMEM_MANUAL=y
193# CONFIG_DISCONTIGMEM_MANUAL is not set 198# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -200,9 +205,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_PHYS_ADDR_T_64BIT is not set 205# CONFIG_PHYS_ADDR_T_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=0 206CONFIG_ZONE_DMA_FLAG=0
202CONFIG_NR_QUICK=2 207CONFIG_NR_QUICK=2
203CONFIG_UNEVICTABLE_LRU=y
204CONFIG_HAVE_MLOCK=y 208CONFIG_HAVE_MLOCK=y
205CONFIG_HAVE_MLOCKED_PAGE_BIT=y 209CONFIG_HAVE_MLOCKED_PAGE_BIT=y
210CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
206 211
207# 212#
208# Cache configuration 213# Cache configuration
@@ -220,7 +225,6 @@ CONFIG_SH_FPU=y
220# CONFIG_SH_STORE_QUEUES is not set 225# CONFIG_SH_STORE_QUEUES is not set
221CONFIG_CPU_HAS_INTEVT=y 226CONFIG_CPU_HAS_INTEVT=y
222CONFIG_CPU_HAS_SR_RB=y 227CONFIG_CPU_HAS_SR_RB=y
223CONFIG_CPU_HAS_PTEA=y
224CONFIG_CPU_HAS_FPU=y 228CONFIG_CPU_HAS_FPU=y
225 229
226# 230#
@@ -236,9 +240,10 @@ CONFIG_SH_7751_SYSTEMH=y
236# 240#
237# Timer and clock configuration 241# Timer and clock configuration
238# 242#
239CONFIG_SH_TMU=y 243CONFIG_SH_TIMER_TMU=y
240CONFIG_SH_TIMER_IRQ=16
241CONFIG_SH_PCLK_FREQ=60000000 244CONFIG_SH_PCLK_FREQ=60000000
245CONFIG_SH_CLK_CPG=y
246CONFIG_SH_CLK_CPG_LEGACY=y
242# CONFIG_NO_HZ is not set 247# CONFIG_NO_HZ is not set
243# CONFIG_HIGH_RES_TIMERS is not set 248# CONFIG_HIGH_RES_TIMERS is not set
244CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 249CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -280,12 +285,14 @@ CONFIG_HZ=250
280CONFIG_PREEMPT=y 285CONFIG_PREEMPT=y
281CONFIG_GUSA=y 286CONFIG_GUSA=y
282# CONFIG_GUSA_RB is not set 287# CONFIG_GUSA_RB is not set
288# CONFIG_SPARSE_IRQ is not set
283 289
284# 290#
285# Boot options 291# Boot options
286# 292#
287CONFIG_ZERO_PAGE_OFFSET=0x00001000 293CONFIG_ZERO_PAGE_OFFSET=0x00001000
288CONFIG_BOOT_LINK_OFFSET=0x00800000 294CONFIG_BOOT_LINK_OFFSET=0x00800000
295CONFIG_ENTRY_OFFSET=0x00001000
289# CONFIG_UBC_WAKEUP is not set 296# CONFIG_UBC_WAKEUP is not set
290# CONFIG_CMDLINE_BOOL is not set 297# CONFIG_CMDLINE_BOOL is not set
291 298
@@ -428,21 +435,7 @@ CONFIG_SSB_POSSIBLE=y
428# CONFIG_HTC_PASIC3 is not set 435# CONFIG_HTC_PASIC3 is not set
429# CONFIG_MFD_TMIO is not set 436# CONFIG_MFD_TMIO is not set
430# CONFIG_REGULATOR is not set 437# CONFIG_REGULATOR is not set
431 438# CONFIG_MEDIA_SUPPORT is not set
432#
433# Multimedia devices
434#
435
436#
437# Multimedia core support
438#
439# CONFIG_VIDEO_DEV is not set
440# CONFIG_VIDEO_MEDIA is not set
441
442#
443# Multimedia drivers
444#
445# CONFIG_DAB is not set
446 439
447# 440#
448# Graphics support 441# Graphics support
@@ -481,10 +474,15 @@ CONFIG_USB_ARCH_HAS_HCD=y
481# CONFIG_MEMSTICK is not set 474# CONFIG_MEMSTICK is not set
482# CONFIG_NEW_LEDS is not set 475# CONFIG_NEW_LEDS is not set
483# CONFIG_ACCESSIBILITY is not set 476# CONFIG_ACCESSIBILITY is not set
477CONFIG_RTC_LIB=y
484# CONFIG_RTC_CLASS is not set 478# CONFIG_RTC_CLASS is not set
485# CONFIG_DMADEVICES is not set 479# CONFIG_DMADEVICES is not set
486# CONFIG_AUXDISPLAY is not set 480# CONFIG_AUXDISPLAY is not set
487# CONFIG_UIO is not set 481# CONFIG_UIO is not set
482
483#
484# TI VLYNQ
485#
488# CONFIG_STAGING is not set 486# CONFIG_STAGING is not set
489 487
490# 488#
@@ -496,9 +494,10 @@ CONFIG_USB_ARCH_HAS_HCD=y
496# CONFIG_REISERFS_FS is not set 494# CONFIG_REISERFS_FS is not set
497# CONFIG_JFS_FS is not set 495# CONFIG_JFS_FS is not set
498# CONFIG_FS_POSIX_ACL is not set 496# CONFIG_FS_POSIX_ACL is not set
499CONFIG_FILE_LOCKING=y
500# CONFIG_XFS_FS is not set 497# CONFIG_XFS_FS is not set
501# CONFIG_BTRFS_FS is not set 498# CONFIG_BTRFS_FS is not set
499CONFIG_FILE_LOCKING=y
500CONFIG_FSNOTIFY=y
502CONFIG_DNOTIFY=y 501CONFIG_DNOTIFY=y
503CONFIG_INOTIFY=y 502CONFIG_INOTIFY=y
504CONFIG_INOTIFY_USER=y 503CONFIG_INOTIFY_USER=y
@@ -590,28 +589,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
590CONFIG_HAVE_DYNAMIC_FTRACE=y 589CONFIG_HAVE_DYNAMIC_FTRACE=y
591CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 590CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
592CONFIG_TRACING_SUPPORT=y 591CONFIG_TRACING_SUPPORT=y
593 592# CONFIG_FTRACE is not set
594#
595# Tracers
596#
597# CONFIG_FUNCTION_TRACER is not set
598# CONFIG_IRQSOFF_TRACER is not set
599# CONFIG_PREEMPT_TRACER is not set
600# CONFIG_SCHED_TRACER is not set
601# CONFIG_CONTEXT_SWITCH_TRACER is not set
602# CONFIG_EVENT_TRACER is not set
603# CONFIG_BOOT_TRACER is not set
604# CONFIG_TRACE_BRANCH_PROFILING is not set
605# CONFIG_STACK_TRACER is not set
606# CONFIG_KMEMTRACE is not set
607# CONFIG_WORKQUEUE_TRACER is not set
608# CONFIG_BLK_DEV_IO_TRACE is not set
609# CONFIG_DMA_API_DEBUG is not set 593# CONFIG_DMA_API_DEBUG is not set
610# CONFIG_SAMPLES is not set 594# CONFIG_SAMPLES is not set
611CONFIG_HAVE_ARCH_KGDB=y 595CONFIG_HAVE_ARCH_KGDB=y
612# CONFIG_SH_STANDARD_BIOS is not set 596# CONFIG_SH_STANDARD_BIOS is not set
613# CONFIG_EARLY_SCIF_CONSOLE is not set 597# CONFIG_EARLY_SCIF_CONSOLE is not set
614# CONFIG_MORE_COMPILE_OPTIONS is not set
615 598
616# 599#
617# Security options 600# Security options
@@ -640,3 +623,4 @@ CONFIG_DECOMPRESS_GZIP=y
640CONFIG_HAS_IOMEM=y 623CONFIG_HAS_IOMEM=y
641CONFIG_HAS_IOPORT=y 624CONFIG_HAS_IOPORT=y
642CONFIG_HAS_DMA=y 625CONFIG_HAS_DMA=y
626CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig
index 8ca94ef74278..7ad080e820ce 100644
--- a/arch/sh/configs/titan_defconfig
+++ b/arch/sh/configs/titan_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:14:55 2009 4# Thu Jun 18 13:12:54 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_PCI=y 22CONFIG_SYS_SUPPORTS_PCI=y
23CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 24CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 25CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 26CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -77,7 +78,6 @@ CONFIG_UID16=y
77CONFIG_KALLSYMS=y 78CONFIG_KALLSYMS=y
78# CONFIG_KALLSYMS_ALL is not set 79# CONFIG_KALLSYMS_ALL is not set
79# CONFIG_KALLSYMS_EXTRA_PASS is not set 80# CONFIG_KALLSYMS_EXTRA_PASS is not set
80# CONFIG_STRIP_ASM_SYMS is not set
81CONFIG_HOTPLUG=y 81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y 82CONFIG_PRINTK=y
83CONFIG_BUG=y 83CONFIG_BUG=y
@@ -90,8 +90,13 @@ CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 90CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 91CONFIG_SHMEM=y
92CONFIG_AIO=y 92CONFIG_AIO=y
93
94#
95# Performance Counters
96#
93CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
94CONFIG_PCI_QUIRKS=y 98CONFIG_PCI_QUIRKS=y
99# CONFIG_STRIP_ASM_SYMS is not set
95CONFIG_COMPAT_BRK=y 100CONFIG_COMPAT_BRK=y
96CONFIG_SLAB=y 101CONFIG_SLAB=y
97# CONFIG_SLUB is not set 102# CONFIG_SLUB is not set
@@ -181,6 +186,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
181CONFIG_QUICKLIST=y 186CONFIG_QUICKLIST=y
182CONFIG_MMU=y 187CONFIG_MMU=y
183CONFIG_PAGE_OFFSET=0x80000000 188CONFIG_PAGE_OFFSET=0x80000000
189CONFIG_FORCE_MAX_ZONEORDER=11
184CONFIG_MEMORY_START=0x08030000 190CONFIG_MEMORY_START=0x08030000
185CONFIG_MEMORY_SIZE=0x7fd0000 191CONFIG_MEMORY_SIZE=0x7fd0000
186CONFIG_29BIT=y 192CONFIG_29BIT=y
@@ -195,7 +201,6 @@ CONFIG_PAGE_SIZE_4KB=y
195# CONFIG_PAGE_SIZE_8KB is not set 201# CONFIG_PAGE_SIZE_8KB is not set
196# CONFIG_PAGE_SIZE_16KB is not set 202# CONFIG_PAGE_SIZE_16KB is not set
197# CONFIG_PAGE_SIZE_64KB is not set 203# CONFIG_PAGE_SIZE_64KB is not set
198CONFIG_ENTRY_OFFSET=0x00001000
199CONFIG_SELECT_MEMORY_MODEL=y 204CONFIG_SELECT_MEMORY_MODEL=y
200CONFIG_FLATMEM_MANUAL=y 205CONFIG_FLATMEM_MANUAL=y
201# CONFIG_DISCONTIGMEM_MANUAL is not set 206# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -208,9 +213,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
208# CONFIG_PHYS_ADDR_T_64BIT is not set 213# CONFIG_PHYS_ADDR_T_64BIT is not set
209CONFIG_ZONE_DMA_FLAG=0 214CONFIG_ZONE_DMA_FLAG=0
210CONFIG_NR_QUICK=2 215CONFIG_NR_QUICK=2
211CONFIG_UNEVICTABLE_LRU=y
212CONFIG_HAVE_MLOCK=y 216CONFIG_HAVE_MLOCK=y
213CONFIG_HAVE_MLOCKED_PAGE_BIT=y 217CONFIG_HAVE_MLOCKED_PAGE_BIT=y
218CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
214 219
215# 220#
216# Cache configuration 221# Cache configuration
@@ -229,7 +234,6 @@ CONFIG_SH_FPU=y
229CONFIG_CPU_HAS_INTEVT=y 234CONFIG_CPU_HAS_INTEVT=y
230CONFIG_CPU_HAS_IPR_IRQ=y 235CONFIG_CPU_HAS_IPR_IRQ=y
231CONFIG_CPU_HAS_SR_RB=y 236CONFIG_CPU_HAS_SR_RB=y
232CONFIG_CPU_HAS_PTEA=y
233CONFIG_CPU_HAS_FPU=y 237CONFIG_CPU_HAS_FPU=y
234 238
235# 239#
@@ -245,9 +249,10 @@ CONFIG_SH_TITAN=y
245# 249#
246# Timer and clock configuration 250# Timer and clock configuration
247# 251#
248CONFIG_SH_TMU=y 252CONFIG_SH_TIMER_TMU=y
249CONFIG_SH_TIMER_IRQ=16
250CONFIG_SH_PCLK_FREQ=30000000 253CONFIG_SH_PCLK_FREQ=30000000
254CONFIG_SH_CLK_CPG=y
255CONFIG_SH_CLK_CPG_LEGACY=y
251# CONFIG_NO_HZ is not set 256# CONFIG_NO_HZ is not set
252# CONFIG_HIGH_RES_TIMERS is not set 257# CONFIG_HIGH_RES_TIMERS is not set
253CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 258CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -293,12 +298,14 @@ CONFIG_PREEMPT_VOLUNTARY=y
293# CONFIG_PREEMPT is not set 298# CONFIG_PREEMPT is not set
294CONFIG_GUSA=y 299CONFIG_GUSA=y
295# CONFIG_GUSA_RB is not set 300# CONFIG_GUSA_RB is not set
301# CONFIG_SPARSE_IRQ is not set
296 302
297# 303#
298# Boot options 304# Boot options
299# 305#
300CONFIG_ZERO_PAGE_OFFSET=0x00001000 306CONFIG_ZERO_PAGE_OFFSET=0x00001000
301CONFIG_BOOT_LINK_OFFSET=0x009e0000 307CONFIG_BOOT_LINK_OFFSET=0x009e0000
308CONFIG_ENTRY_OFFSET=0x00001000
302# CONFIG_UBC_WAKEUP is not set 309# CONFIG_UBC_WAKEUP is not set
303CONFIG_CMDLINE_BOOL=y 310CONFIG_CMDLINE_BOOL=y
304CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf rw" 311CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf rw"
@@ -417,6 +424,7 @@ CONFIG_NETFILTER_NETLINK=m
417CONFIG_NETFILTER_NETLINK_QUEUE=m 424CONFIG_NETFILTER_NETLINK_QUEUE=m
418CONFIG_NETFILTER_NETLINK_LOG=m 425CONFIG_NETFILTER_NETLINK_LOG=m
419# CONFIG_NF_CONNTRACK is not set 426# CONFIG_NF_CONNTRACK is not set
427# CONFIG_NETFILTER_TPROXY is not set
420CONFIG_NETFILTER_XTABLES=m 428CONFIG_NETFILTER_XTABLES=m
421CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 429CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
422# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 430# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
@@ -454,6 +462,7 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
454CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 462CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
455# CONFIG_NETFILTER_XT_MATCH_TIME is not set 463# CONFIG_NETFILTER_XT_MATCH_TIME is not set
456# CONFIG_NETFILTER_XT_MATCH_U32 is not set 464# CONFIG_NETFILTER_XT_MATCH_U32 is not set
465# CONFIG_NETFILTER_XT_MATCH_OSF is not set
457# CONFIG_IP_VS is not set 466# CONFIG_IP_VS is not set
458 467
459# 468#
@@ -517,6 +526,7 @@ CONFIG_LLC=y
517# CONFIG_ECONET is not set 526# CONFIG_ECONET is not set
518# CONFIG_WAN_ROUTER is not set 527# CONFIG_WAN_ROUTER is not set
519# CONFIG_PHONET is not set 528# CONFIG_PHONET is not set
529# CONFIG_IEEE802154 is not set
520CONFIG_NET_SCHED=y 530CONFIG_NET_SCHED=y
521 531
522# 532#
@@ -589,7 +599,11 @@ CONFIG_WIRELESS=y
589CONFIG_WIRELESS_EXT=y 599CONFIG_WIRELESS_EXT=y
590CONFIG_WIRELESS_EXT_SYSFS=y 600CONFIG_WIRELESS_EXT_SYSFS=y
591# CONFIG_LIB80211 is not set 601# CONFIG_LIB80211 is not set
592# CONFIG_MAC80211 is not set 602
603#
604# CFG80211 needs to be enabled for MAC80211
605#
606CONFIG_MAC80211_DEFAULT_PS_VALUE=0
593# CONFIG_WIMAX is not set 607# CONFIG_WIMAX is not set
594# CONFIG_RFKILL is not set 608# CONFIG_RFKILL is not set
595# CONFIG_NET_9P is not set 609# CONFIG_NET_9P is not set
@@ -731,6 +745,7 @@ CONFIG_MISC_DEVICES=y
731# EEPROM support 745# EEPROM support
732# 746#
733# CONFIG_EEPROM_93CX6 is not set 747# CONFIG_EEPROM_93CX6 is not set
748# CONFIG_CB710_CORE is not set
734CONFIG_HAVE_IDE=y 749CONFIG_HAVE_IDE=y
735# CONFIG_IDE is not set 750# CONFIG_IDE is not set
736 751
@@ -754,10 +769,6 @@ CONFIG_BLK_DEV_SR=m
754# CONFIG_BLK_DEV_SR_VENDOR is not set 769# CONFIG_BLK_DEV_SR_VENDOR is not set
755CONFIG_CHR_DEV_SG=m 770CONFIG_CHR_DEV_SG=m
756# CONFIG_CHR_DEV_SCH is not set 771# CONFIG_CHR_DEV_SCH is not set
757
758#
759# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
760#
761# CONFIG_SCSI_MULTI_LUN is not set 772# CONFIG_SCSI_MULTI_LUN is not set
762# CONFIG_SCSI_CONSTANTS is not set 773# CONFIG_SCSI_CONSTANTS is not set
763# CONFIG_SCSI_LOGGING is not set 774# CONFIG_SCSI_LOGGING is not set
@@ -775,6 +786,7 @@ CONFIG_SCSI_WAIT_SCAN=m
775CONFIG_SCSI_LOWLEVEL=y 786CONFIG_SCSI_LOWLEVEL=y
776# CONFIG_ISCSI_TCP is not set 787# CONFIG_ISCSI_TCP is not set
777# CONFIG_SCSI_CXGB3_ISCSI is not set 788# CONFIG_SCSI_CXGB3_ISCSI is not set
789# CONFIG_SCSI_BNX2_ISCSI is not set
778# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 790# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
779# CONFIG_SCSI_3W_9XXX is not set 791# CONFIG_SCSI_3W_9XXX is not set
780# CONFIG_SCSI_ACARD is not set 792# CONFIG_SCSI_ACARD is not set
@@ -783,6 +795,7 @@ CONFIG_SCSI_LOWLEVEL=y
783# CONFIG_SCSI_AIC7XXX_OLD is not set 795# CONFIG_SCSI_AIC7XXX_OLD is not set
784# CONFIG_SCSI_AIC79XX is not set 796# CONFIG_SCSI_AIC79XX is not set
785# CONFIG_SCSI_AIC94XX is not set 797# CONFIG_SCSI_AIC94XX is not set
798# CONFIG_SCSI_MVSAS is not set
786# CONFIG_SCSI_ARCMSR is not set 799# CONFIG_SCSI_ARCMSR is not set
787# CONFIG_MEGARAID_NEWGEN is not set 800# CONFIG_MEGARAID_NEWGEN is not set
788# CONFIG_MEGARAID_LEGACY is not set 801# CONFIG_MEGARAID_LEGACY is not set
@@ -797,7 +810,6 @@ CONFIG_SCSI_LOWLEVEL=y
797# CONFIG_SCSI_IPS is not set 810# CONFIG_SCSI_IPS is not set
798# CONFIG_SCSI_INITIO is not set 811# CONFIG_SCSI_INITIO is not set
799# CONFIG_SCSI_INIA100 is not set 812# CONFIG_SCSI_INIA100 is not set
800# CONFIG_SCSI_MVSAS is not set
801# CONFIG_SCSI_STEX is not set 813# CONFIG_SCSI_STEX is not set
802# CONFIG_SCSI_SYM53C8XX_2 is not set 814# CONFIG_SCSI_SYM53C8XX_2 is not set
803# CONFIG_SCSI_QLOGIC_1280 is not set 815# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -826,7 +838,6 @@ CONFIG_SCSI_LOWLEVEL=y
826# CONFIG_IEEE1394 is not set 838# CONFIG_IEEE1394 is not set
827# CONFIG_I2O is not set 839# CONFIG_I2O is not set
828CONFIG_NETDEVICES=y 840CONFIG_NETDEVICES=y
829CONFIG_COMPAT_NET_DEV_OPS=y
830# CONFIG_IFB is not set 841# CONFIG_IFB is not set
831# CONFIG_DUMMY is not set 842# CONFIG_DUMMY is not set
832# CONFIG_BONDING is not set 843# CONFIG_BONDING is not set
@@ -898,6 +909,7 @@ CONFIG_8139_OLD_RX_RESET=y
898# CONFIG_SMSC9420 is not set 909# CONFIG_SMSC9420 is not set
899# CONFIG_SUNDANCE is not set 910# CONFIG_SUNDANCE is not set
900# CONFIG_TLAN is not set 911# CONFIG_TLAN is not set
912# CONFIG_KS8842 is not set
901# CONFIG_VIA_RHINE is not set 913# CONFIG_VIA_RHINE is not set
902# CONFIG_SC92031 is not set 914# CONFIG_SC92031 is not set
903# CONFIG_ATL2 is not set 915# CONFIG_ATL2 is not set
@@ -965,6 +977,7 @@ CONFIG_USB_RTL8150=m
965CONFIG_USB_USBNET=m 977CONFIG_USB_USBNET=m
966CONFIG_USB_NET_AX8817X=m 978CONFIG_USB_NET_AX8817X=m
967CONFIG_USB_NET_CDCETHER=m 979CONFIG_USB_NET_CDCETHER=m
980# CONFIG_USB_NET_CDC_EEM is not set
968# CONFIG_USB_NET_DM9601 is not set 981# CONFIG_USB_NET_DM9601 is not set
969# CONFIG_USB_NET_SMSC95XX is not set 982# CONFIG_USB_NET_SMSC95XX is not set
970# CONFIG_USB_NET_GL620A is not set 983# CONFIG_USB_NET_GL620A is not set
@@ -974,6 +987,7 @@ CONFIG_USB_NET_PLUSB=m
974# CONFIG_USB_NET_RNDIS_HOST is not set 987# CONFIG_USB_NET_RNDIS_HOST is not set
975# CONFIG_USB_NET_CDC_SUBSET is not set 988# CONFIG_USB_NET_CDC_SUBSET is not set
976CONFIG_USB_NET_ZAURUS=m 989CONFIG_USB_NET_ZAURUS=m
990# CONFIG_USB_NET_INT51X1 is not set
977# CONFIG_WAN is not set 991# CONFIG_WAN is not set
978# CONFIG_FDDI is not set 992# CONFIG_FDDI is not set
979# CONFIG_HIPPI is not set 993# CONFIG_HIPPI is not set
@@ -1130,22 +1144,7 @@ CONFIG_SSB_POSSIBLE=y
1130# CONFIG_HTC_PASIC3 is not set 1144# CONFIG_HTC_PASIC3 is not set
1131# CONFIG_MFD_TMIO is not set 1145# CONFIG_MFD_TMIO is not set
1132# CONFIG_REGULATOR is not set 1146# CONFIG_REGULATOR is not set
1133 1147# CONFIG_MEDIA_SUPPORT is not set
1134#
1135# Multimedia devices
1136#
1137
1138#
1139# Multimedia core support
1140#
1141# CONFIG_VIDEO_DEV is not set
1142# CONFIG_DVB_CORE is not set
1143# CONFIG_VIDEO_MEDIA is not set
1144
1145#
1146# Multimedia drivers
1147#
1148# CONFIG_DAB is not set
1149 1148
1150# 1149#
1151# Graphics support 1150# Graphics support
@@ -1211,6 +1210,7 @@ CONFIG_USB_MON=y
1211# USB Host Controller Drivers 1210# USB Host Controller Drivers
1212# 1211#
1213# CONFIG_USB_C67X00_HCD is not set 1212# CONFIG_USB_C67X00_HCD is not set
1213# CONFIG_USB_XHCI_HCD is not set
1214CONFIG_USB_EHCI_HCD=y 1214CONFIG_USB_EHCI_HCD=y
1215CONFIG_USB_EHCI_ROOT_HUB_TT=y 1215CONFIG_USB_EHCI_ROOT_HUB_TT=y
1216CONFIG_USB_EHCI_TT_NEWSCHED=y 1216CONFIG_USB_EHCI_TT_NEWSCHED=y
@@ -1350,7 +1350,7 @@ CONFIG_USB_SERIAL_PL2303=m
1350# CONFIG_NEW_LEDS is not set 1350# CONFIG_NEW_LEDS is not set
1351# CONFIG_ACCESSIBILITY is not set 1351# CONFIG_ACCESSIBILITY is not set
1352# CONFIG_INFINIBAND is not set 1352# CONFIG_INFINIBAND is not set
1353CONFIG_RTC_LIB=m 1353CONFIG_RTC_LIB=y
1354CONFIG_RTC_CLASS=m 1354CONFIG_RTC_CLASS=m
1355 1355
1356# 1356#
@@ -1384,9 +1384,14 @@ CONFIG_RTC_INTF_DEV=y
1384# on-CPU RTC drivers 1384# on-CPU RTC drivers
1385# 1385#
1386CONFIG_RTC_DRV_SH=m 1386CONFIG_RTC_DRV_SH=m
1387# CONFIG_RTC_DRV_GENERIC is not set
1387# CONFIG_DMADEVICES is not set 1388# CONFIG_DMADEVICES is not set
1388# CONFIG_AUXDISPLAY is not set 1389# CONFIG_AUXDISPLAY is not set
1389# CONFIG_UIO is not set 1390# CONFIG_UIO is not set
1391
1392#
1393# TI VLYNQ
1394#
1390# CONFIG_STAGING is not set 1395# CONFIG_STAGING is not set
1391 1396
1392# 1397#
@@ -1406,7 +1411,6 @@ CONFIG_REISERFS_FS=m
1406# CONFIG_REISERFS_FS_XATTR is not set 1411# CONFIG_REISERFS_FS_XATTR is not set
1407# CONFIG_JFS_FS is not set 1412# CONFIG_JFS_FS is not set
1408# CONFIG_FS_POSIX_ACL is not set 1413# CONFIG_FS_POSIX_ACL is not set
1409CONFIG_FILE_LOCKING=y
1410CONFIG_XFS_FS=m 1414CONFIG_XFS_FS=m
1411# CONFIG_XFS_QUOTA is not set 1415# CONFIG_XFS_QUOTA is not set
1412# CONFIG_XFS_POSIX_ACL is not set 1416# CONFIG_XFS_POSIX_ACL is not set
@@ -1414,6 +1418,8 @@ CONFIG_XFS_FS=m
1414# CONFIG_XFS_DEBUG is not set 1418# CONFIG_XFS_DEBUG is not set
1415# CONFIG_OCFS2_FS is not set 1419# CONFIG_OCFS2_FS is not set
1416# CONFIG_BTRFS_FS is not set 1420# CONFIG_BTRFS_FS is not set
1421CONFIG_FILE_LOCKING=y
1422CONFIG_FSNOTIFY=y
1417CONFIG_DNOTIFY=y 1423CONFIG_DNOTIFY=y
1418CONFIG_INOTIFY=y 1424CONFIG_INOTIFY=y
1419CONFIG_INOTIFY_USER=y 1425CONFIG_INOTIFY_USER=y
@@ -1421,6 +1427,7 @@ CONFIG_INOTIFY_USER=y
1421# CONFIG_AUTOFS_FS is not set 1427# CONFIG_AUTOFS_FS is not set
1422# CONFIG_AUTOFS4_FS is not set 1428# CONFIG_AUTOFS4_FS is not set
1423CONFIG_FUSE_FS=m 1429CONFIG_FUSE_FS=m
1430# CONFIG_CUSE is not set
1424 1431
1425# 1432#
1426# Caches 1433# Caches
@@ -1533,7 +1540,7 @@ CONFIG_MSDOS_PARTITION=y
1533# CONFIG_KARMA_PARTITION is not set 1540# CONFIG_KARMA_PARTITION is not set
1534# CONFIG_EFI_PARTITION is not set 1541# CONFIG_EFI_PARTITION is not set
1535# CONFIG_SYSV68_PARTITION is not set 1542# CONFIG_SYSV68_PARTITION is not set
1536CONFIG_NLS=m 1543CONFIG_NLS=y
1537CONFIG_NLS_DEFAULT="iso8859-1" 1544CONFIG_NLS_DEFAULT="iso8859-1"
1538CONFIG_NLS_CODEPAGE_437=m 1545CONFIG_NLS_CODEPAGE_437=m
1539# CONFIG_NLS_CODEPAGE_737 is not set 1546# CONFIG_NLS_CODEPAGE_737 is not set
@@ -1626,17 +1633,15 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1626CONFIG_HAVE_DYNAMIC_FTRACE=y 1633CONFIG_HAVE_DYNAMIC_FTRACE=y
1627CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1634CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1628CONFIG_TRACING_SUPPORT=y 1635CONFIG_TRACING_SUPPORT=y
1629 1636CONFIG_FTRACE=y
1630#
1631# Tracers
1632#
1633# CONFIG_FUNCTION_TRACER is not set 1637# CONFIG_FUNCTION_TRACER is not set
1634# CONFIG_IRQSOFF_TRACER is not set 1638# CONFIG_IRQSOFF_TRACER is not set
1635# CONFIG_SCHED_TRACER is not set 1639# CONFIG_SCHED_TRACER is not set
1636# CONFIG_CONTEXT_SWITCH_TRACER is not set 1640# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1637# CONFIG_EVENT_TRACER is not set
1638# CONFIG_BOOT_TRACER is not set 1641# CONFIG_BOOT_TRACER is not set
1639# CONFIG_TRACE_BRANCH_PROFILING is not set 1642CONFIG_BRANCH_PROFILE_NONE=y
1643# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1644# CONFIG_PROFILE_ALL_BRANCHES is not set
1640# CONFIG_STACK_TRACER is not set 1645# CONFIG_STACK_TRACER is not set
1641# CONFIG_KMEMTRACE is not set 1646# CONFIG_KMEMTRACE is not set
1642# CONFIG_WORKQUEUE_TRACER is not set 1647# CONFIG_WORKQUEUE_TRACER is not set
@@ -1645,16 +1650,15 @@ CONFIG_TRACING_SUPPORT=y
1645# CONFIG_SAMPLES is not set 1650# CONFIG_SAMPLES is not set
1646CONFIG_HAVE_ARCH_KGDB=y 1651CONFIG_HAVE_ARCH_KGDB=y
1647# CONFIG_KGDB is not set 1652# CONFIG_KGDB is not set
1653# CONFIG_KMEMCHECK is not set
1648# CONFIG_SH_STANDARD_BIOS is not set 1654# CONFIG_SH_STANDARD_BIOS is not set
1649# CONFIG_EARLY_SCIF_CONSOLE is not set 1655# CONFIG_EARLY_SCIF_CONSOLE is not set
1650# CONFIG_DEBUG_BOOTMEM is not set 1656# CONFIG_DEBUG_BOOTMEM is not set
1651# CONFIG_DEBUG_STACKOVERFLOW is not set 1657# CONFIG_DEBUG_STACKOVERFLOW is not set
1652# CONFIG_DEBUG_STACK_USAGE is not set 1658# CONFIG_DEBUG_STACK_USAGE is not set
1653# CONFIG_4KSTACKS is not set 1659# CONFIG_4KSTACKS is not set
1654# CONFIG_IRQSTACKS is not set
1655# CONFIG_DUMP_CODE is not set 1660# CONFIG_DUMP_CODE is not set
1656# CONFIG_SH_NO_BSS_INIT is not set 1661# CONFIG_SH_NO_BSS_INIT is not set
1657# CONFIG_MORE_COMPILE_OPTIONS is not set
1658 1662
1659# 1663#
1660# Security options 1664# Security options
@@ -1787,3 +1791,4 @@ CONFIG_HAS_IOMEM=y
1787CONFIG_HAS_IOPORT=y 1791CONFIG_HAS_IOPORT=y
1788CONFIG_HAS_DMA=y 1792CONFIG_HAS_DMA=y
1789CONFIG_NLATTR=y 1793CONFIG_NLATTR=y
1794CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig
index bfb4d9806892..608fe563614c 100644
--- a/arch/sh/configs/ul2_defconfig
+++ b/arch/sh/configs/ul2_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 13:17:05 2009 4# Thu Jun 18 13:14:36 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -21,6 +21,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_CMT=y 23CONFIG_SYS_SUPPORTS_CMT=y
24CONFIG_SYS_SUPPORTS_TMU=y
24CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
25CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
26CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -78,7 +79,6 @@ CONFIG_UID16=y
78CONFIG_SYSCTL_SYSCALL=y 79CONFIG_SYSCTL_SYSCALL=y
79CONFIG_KALLSYMS=y 80CONFIG_KALLSYMS=y
80# CONFIG_KALLSYMS_EXTRA_PASS is not set 81# CONFIG_KALLSYMS_EXTRA_PASS is not set
81# CONFIG_STRIP_ASM_SYMS is not set
82CONFIG_HOTPLUG=y 82CONFIG_HOTPLUG=y
83CONFIG_PRINTK=y 83CONFIG_PRINTK=y
84CONFIG_BUG=y 84CONFIG_BUG=y
@@ -91,8 +91,13 @@ CONFIG_TIMERFD=y
91CONFIG_EVENTFD=y 91CONFIG_EVENTFD=y
92CONFIG_SHMEM=y 92CONFIG_SHMEM=y
93CONFIG_AIO=y 93CONFIG_AIO=y
94
95#
96# Performance Counters
97#
94CONFIG_VM_EVENT_COUNTERS=y 98CONFIG_VM_EVENT_COUNTERS=y
95CONFIG_SLUB_DEBUG=y 99CONFIG_SLUB_DEBUG=y
100# CONFIG_STRIP_ASM_SYMS is not set
96CONFIG_COMPAT_BRK=y 101CONFIG_COMPAT_BRK=y
97# CONFIG_SLAB is not set 102# CONFIG_SLAB is not set
98CONFIG_SLUB=y 103CONFIG_SLUB=y
@@ -187,6 +192,7 @@ CONFIG_CPU_SUBTYPE_SH7366=y
187CONFIG_QUICKLIST=y 192CONFIG_QUICKLIST=y
188CONFIG_MMU=y 193CONFIG_MMU=y
189CONFIG_PAGE_OFFSET=0x80000000 194CONFIG_PAGE_OFFSET=0x80000000
195CONFIG_FORCE_MAX_ZONEORDER=11
190CONFIG_MEMORY_START=0x08000000 196CONFIG_MEMORY_START=0x08000000
191CONFIG_MEMORY_SIZE=0x01f00000 197CONFIG_MEMORY_SIZE=0x01f00000
192CONFIG_29BIT=y 198CONFIG_29BIT=y
@@ -205,7 +211,6 @@ CONFIG_PAGE_SIZE_4KB=y
205# CONFIG_PAGE_SIZE_8KB is not set 211# CONFIG_PAGE_SIZE_8KB is not set
206# CONFIG_PAGE_SIZE_16KB is not set 212# CONFIG_PAGE_SIZE_16KB is not set
207# CONFIG_PAGE_SIZE_64KB is not set 213# CONFIG_PAGE_SIZE_64KB is not set
208CONFIG_ENTRY_OFFSET=0x00001000
209CONFIG_HUGETLB_PAGE_SIZE_64K=y 214CONFIG_HUGETLB_PAGE_SIZE_64K=y
210# CONFIG_HUGETLB_PAGE_SIZE_256K is not set 215# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
211# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set 216# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
@@ -226,9 +231,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
226# CONFIG_PHYS_ADDR_T_64BIT is not set 231# CONFIG_PHYS_ADDR_T_64BIT is not set
227CONFIG_ZONE_DMA_FLAG=0 232CONFIG_ZONE_DMA_FLAG=0
228CONFIG_NR_QUICK=2 233CONFIG_NR_QUICK=2
229CONFIG_UNEVICTABLE_LRU=y
230CONFIG_HAVE_MLOCK=y 234CONFIG_HAVE_MLOCK=y
231CONFIG_HAVE_MLOCKED_PAGE_BIT=y 235CONFIG_HAVE_MLOCKED_PAGE_BIT=y
236CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
232 237
233# 238#
234# Cache configuration 239# Cache configuration
@@ -247,7 +252,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
247# CONFIG_SH_STORE_QUEUES is not set 252# CONFIG_SH_STORE_QUEUES is not set
248CONFIG_CPU_HAS_INTEVT=y 253CONFIG_CPU_HAS_INTEVT=y
249CONFIG_CPU_HAS_SR_RB=y 254CONFIG_CPU_HAS_SR_RB=y
250CONFIG_CPU_HAS_PTEA=y
251CONFIG_CPU_HAS_DSP=y 255CONFIG_CPU_HAS_DSP=y
252 256
253# 257#
@@ -257,10 +261,10 @@ CONFIG_CPU_HAS_DSP=y
257# 261#
258# Timer and clock configuration 262# Timer and clock configuration
259# 263#
260CONFIG_SH_TMU=y 264CONFIG_SH_TIMER_TMU=y
261# CONFIG_SH_TIMER_CMT is not set 265# CONFIG_SH_TIMER_CMT is not set
262CONFIG_SH_TIMER_IRQ=16
263CONFIG_SH_PCLK_FREQ=33333333 266CONFIG_SH_PCLK_FREQ=33333333
267CONFIG_SH_CLK_CPG=y
264CONFIG_TICK_ONESHOT=y 268CONFIG_TICK_ONESHOT=y
265# CONFIG_NO_HZ is not set 269# CONFIG_NO_HZ is not set
266CONFIG_HIGH_RES_TIMERS=y 270CONFIG_HIGH_RES_TIMERS=y
@@ -302,12 +306,14 @@ CONFIG_KEXEC=y
302# CONFIG_PREEMPT_VOLUNTARY is not set 306# CONFIG_PREEMPT_VOLUNTARY is not set
303CONFIG_PREEMPT=y 307CONFIG_PREEMPT=y
304CONFIG_GUSA=y 308CONFIG_GUSA=y
309# CONFIG_SPARSE_IRQ is not set
305 310
306# 311#
307# Boot options 312# Boot options
308# 313#
309CONFIG_ZERO_PAGE_OFFSET=0x00001000 314CONFIG_ZERO_PAGE_OFFSET=0x00001000
310CONFIG_BOOT_LINK_OFFSET=0x00800000 315CONFIG_BOOT_LINK_OFFSET=0x00800000
316CONFIG_ENTRY_OFFSET=0x00001000
311CONFIG_CMDLINE_BOOL=y 317CONFIG_CMDLINE_BOOL=y
312CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=dhcp" 318CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=dhcp"
313 319
@@ -390,6 +396,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
390# CONFIG_ECONET is not set 396# CONFIG_ECONET is not set
391# CONFIG_WAN_ROUTER is not set 397# CONFIG_WAN_ROUTER is not set
392# CONFIG_PHONET is not set 398# CONFIG_PHONET is not set
399# CONFIG_IEEE802154 is not set
393# CONFIG_NET_SCHED is not set 400# CONFIG_NET_SCHED is not set
394# CONFIG_DCB is not set 401# CONFIG_DCB is not set
395 402
@@ -411,6 +418,8 @@ CONFIG_WIRELESS_EXT_SYSFS=y
411CONFIG_LIB80211=m 418CONFIG_LIB80211=m
412# CONFIG_LIB80211_DEBUG is not set 419# CONFIG_LIB80211_DEBUG is not set
413CONFIG_MAC80211=y 420CONFIG_MAC80211=y
421CONFIG_MAC80211_DEFAULT_PS=y
422CONFIG_MAC80211_DEFAULT_PS_VALUE=1
414 423
415# 424#
416# Rate control algorithm selection 425# Rate control algorithm selection
@@ -565,10 +574,6 @@ CONFIG_BLK_DEV_SD=y
565# CONFIG_BLK_DEV_SR is not set 574# CONFIG_BLK_DEV_SR is not set
566# CONFIG_CHR_DEV_SG is not set 575# CONFIG_CHR_DEV_SG is not set
567# CONFIG_CHR_DEV_SCH is not set 576# CONFIG_CHR_DEV_SCH is not set
568
569#
570# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
571#
572# CONFIG_SCSI_MULTI_LUN is not set 577# CONFIG_SCSI_MULTI_LUN is not set
573# CONFIG_SCSI_CONSTANTS is not set 578# CONFIG_SCSI_CONSTANTS is not set
574# CONFIG_SCSI_LOGGING is not set 579# CONFIG_SCSI_LOGGING is not set
@@ -585,6 +590,7 @@ CONFIG_SCSI_WAIT_SCAN=m
585# CONFIG_SCSI_SRP_ATTRS is not set 590# CONFIG_SCSI_SRP_ATTRS is not set
586CONFIG_SCSI_LOWLEVEL=y 591CONFIG_SCSI_LOWLEVEL=y
587# CONFIG_ISCSI_TCP is not set 592# CONFIG_ISCSI_TCP is not set
593# CONFIG_SCSI_BNX2_ISCSI is not set
588# CONFIG_LIBFC is not set 594# CONFIG_LIBFC is not set
589# CONFIG_LIBFCOE is not set 595# CONFIG_LIBFCOE is not set
590# CONFIG_SCSI_DEBUG is not set 596# CONFIG_SCSI_DEBUG is not set
@@ -598,7 +604,6 @@ CONFIG_ATA_SFF=y
598CONFIG_PATA_PLATFORM=y 604CONFIG_PATA_PLATFORM=y
599# CONFIG_MD is not set 605# CONFIG_MD is not set
600CONFIG_NETDEVICES=y 606CONFIG_NETDEVICES=y
601CONFIG_COMPAT_NET_DEV_OPS=y
602# CONFIG_DUMMY is not set 607# CONFIG_DUMMY is not set
603# CONFIG_BONDING is not set 608# CONFIG_BONDING is not set
604# CONFIG_MACVLAN is not set 609# CONFIG_MACVLAN is not set
@@ -623,6 +628,7 @@ CONFIG_MII=y
623# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 628# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
624# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 629# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
625# CONFIG_B44 is not set 630# CONFIG_B44 is not set
631# CONFIG_KS8842 is not set
626# CONFIG_NETDEV_1000 is not set 632# CONFIG_NETDEV_1000 is not set
627# CONFIG_NETDEV_10000 is not set 633# CONFIG_NETDEV_10000 is not set
628 634
@@ -648,6 +654,7 @@ CONFIG_LIBERTAS_DEBUG=y
648# CONFIG_B43LEGACY is not set 654# CONFIG_B43LEGACY is not set
649# CONFIG_ZD1211RW is not set 655# CONFIG_ZD1211RW is not set
650# CONFIG_RT2X00 is not set 656# CONFIG_RT2X00 is not set
657# CONFIG_IWM is not set
651 658
652# 659#
653# Enable WiMAX (Networking options) to see the WiMAX drivers 660# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -663,6 +670,7 @@ CONFIG_LIBERTAS_DEBUG=y
663CONFIG_USB_USBNET=y 670CONFIG_USB_USBNET=y
664CONFIG_USB_NET_AX8817X=y 671CONFIG_USB_NET_AX8817X=y
665CONFIG_USB_NET_CDCETHER=y 672CONFIG_USB_NET_CDCETHER=y
673# CONFIG_USB_NET_CDC_EEM is not set
666# CONFIG_USB_NET_DM9601 is not set 674# CONFIG_USB_NET_DM9601 is not set
667# CONFIG_USB_NET_SMSC95XX is not set 675# CONFIG_USB_NET_SMSC95XX is not set
668# CONFIG_USB_NET_GL620A is not set 676# CONFIG_USB_NET_GL620A is not set
@@ -672,6 +680,7 @@ CONFIG_USB_NET_CDCETHER=y
672# CONFIG_USB_NET_RNDIS_HOST is not set 680# CONFIG_USB_NET_RNDIS_HOST is not set
673# CONFIG_USB_NET_CDC_SUBSET is not set 681# CONFIG_USB_NET_CDC_SUBSET is not set
674# CONFIG_USB_NET_ZAURUS is not set 682# CONFIG_USB_NET_ZAURUS is not set
683# CONFIG_USB_NET_INT51X1 is not set
675# CONFIG_WAN is not set 684# CONFIG_WAN is not set
676# CONFIG_PPP is not set 685# CONFIG_PPP is not set
677# CONFIG_SLIP is not set 686# CONFIG_SLIP is not set
@@ -774,22 +783,7 @@ CONFIG_SSB_POSSIBLE=y
774# CONFIG_HTC_PASIC3 is not set 783# CONFIG_HTC_PASIC3 is not set
775# CONFIG_MFD_TMIO is not set 784# CONFIG_MFD_TMIO is not set
776# CONFIG_REGULATOR is not set 785# CONFIG_REGULATOR is not set
777 786# CONFIG_MEDIA_SUPPORT is not set
778#
779# Multimedia devices
780#
781
782#
783# Multimedia core support
784#
785# CONFIG_VIDEO_DEV is not set
786# CONFIG_DVB_CORE is not set
787# CONFIG_VIDEO_MEDIA is not set
788
789#
790# Multimedia drivers
791#
792# CONFIG_DAB is not set
793 787
794# 788#
795# Graphics support 789# Graphics support
@@ -926,10 +920,15 @@ CONFIG_MMC_BLOCK_BOUNCE=y
926# CONFIG_MEMSTICK is not set 920# CONFIG_MEMSTICK is not set
927# CONFIG_NEW_LEDS is not set 921# CONFIG_NEW_LEDS is not set
928# CONFIG_ACCESSIBILITY is not set 922# CONFIG_ACCESSIBILITY is not set
923CONFIG_RTC_LIB=y
929# CONFIG_RTC_CLASS is not set 924# CONFIG_RTC_CLASS is not set
930# CONFIG_DMADEVICES is not set 925# CONFIG_DMADEVICES is not set
931# CONFIG_AUXDISPLAY is not set 926# CONFIG_AUXDISPLAY is not set
932# CONFIG_UIO is not set 927# CONFIG_UIO is not set
928
929#
930# TI VLYNQ
931#
933# CONFIG_STAGING is not set 932# CONFIG_STAGING is not set
934 933
935# 934#
@@ -949,10 +948,11 @@ CONFIG_FS_MBCACHE=y
949# CONFIG_REISERFS_FS is not set 948# CONFIG_REISERFS_FS is not set
950# CONFIG_JFS_FS is not set 949# CONFIG_JFS_FS is not set
951# CONFIG_FS_POSIX_ACL is not set 950# CONFIG_FS_POSIX_ACL is not set
952CONFIG_FILE_LOCKING=y
953# CONFIG_XFS_FS is not set 951# CONFIG_XFS_FS is not set
954# CONFIG_OCFS2_FS is not set 952# CONFIG_OCFS2_FS is not set
955# CONFIG_BTRFS_FS is not set 953# CONFIG_BTRFS_FS is not set
954CONFIG_FILE_LOCKING=y
955CONFIG_FSNOTIFY=y
956CONFIG_DNOTIFY=y 956CONFIG_DNOTIFY=y
957CONFIG_INOTIFY=y 957CONFIG_INOTIFY=y
958CONFIG_INOTIFY_USER=y 958CONFIG_INOTIFY_USER=y
@@ -1106,28 +1106,12 @@ CONFIG_HAVE_FUNCTION_TRACER=y
1106CONFIG_HAVE_DYNAMIC_FTRACE=y 1106CONFIG_HAVE_DYNAMIC_FTRACE=y
1107CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1107CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1108CONFIG_TRACING_SUPPORT=y 1108CONFIG_TRACING_SUPPORT=y
1109 1109# CONFIG_FTRACE is not set
1110#
1111# Tracers
1112#
1113# CONFIG_FUNCTION_TRACER is not set
1114# CONFIG_IRQSOFF_TRACER is not set
1115# CONFIG_PREEMPT_TRACER is not set
1116# CONFIG_SCHED_TRACER is not set
1117# CONFIG_CONTEXT_SWITCH_TRACER is not set
1118# CONFIG_EVENT_TRACER is not set
1119# CONFIG_BOOT_TRACER is not set
1120# CONFIG_TRACE_BRANCH_PROFILING is not set
1121# CONFIG_STACK_TRACER is not set
1122# CONFIG_KMEMTRACE is not set
1123# CONFIG_WORKQUEUE_TRACER is not set
1124# CONFIG_BLK_DEV_IO_TRACE is not set
1125# CONFIG_DMA_API_DEBUG is not set 1110# CONFIG_DMA_API_DEBUG is not set
1126# CONFIG_SAMPLES is not set 1111# CONFIG_SAMPLES is not set
1127CONFIG_HAVE_ARCH_KGDB=y 1112CONFIG_HAVE_ARCH_KGDB=y
1128# CONFIG_SH_STANDARD_BIOS is not set 1113# CONFIG_SH_STANDARD_BIOS is not set
1129# CONFIG_EARLY_SCIF_CONSOLE is not set 1114# CONFIG_EARLY_SCIF_CONSOLE is not set
1130# CONFIG_MORE_COMPILE_OPTIONS is not set
1131 1115
1132# 1116#
1133# Security options 1117# Security options
@@ -1252,3 +1236,4 @@ CONFIG_HAS_IOMEM=y
1252CONFIG_HAS_IOPORT=y 1236CONFIG_HAS_IOPORT=y
1253CONFIG_HAS_DMA=y 1237CONFIG_HAS_DMA=y
1254CONFIG_NLATTR=y 1238CONFIG_NLATTR=y
1239CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
index 512664fed66c..ee1987e6cc59 100644
--- a/arch/sh/configs/urquell_defconfig
+++ b/arch/sh/configs/urquell_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.30
4# Mon Apr 27 14:02:55 2009 4# Thu Jun 18 13:15:28 2009
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set 20# CONFIG_ARCH_SUSPEND_POSSIBLE is not set
21CONFIG_ARCH_HIBERNATION_POSSIBLE=y 21CONFIG_ARCH_HIBERNATION_POSSIBLE=y
22CONFIG_SYS_SUPPORTS_NUMA=y 22CONFIG_SYS_SUPPORTS_NUMA=y
23CONFIG_SYS_SUPPORTS_PCI=y
24CONFIG_SYS_SUPPORTS_TMU=y
23CONFIG_STACKTRACE_SUPPORT=y 25CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_LOCKDEP_SUPPORT=y 26CONFIG_LOCKDEP_SUPPORT=y
25CONFIG_HAVE_LATENCYTOP_SUPPORT=y 27CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -34,25 +36,30 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34# 36#
35CONFIG_EXPERIMENTAL=y 37CONFIG_EXPERIMENTAL=y
36CONFIG_BROKEN_ON_SMP=y 38CONFIG_BROKEN_ON_SMP=y
37CONFIG_LOCK_KERNEL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 39CONFIG_INIT_ENV_ARG_LIMIT=32
39CONFIG_LOCALVERSION="" 40CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y 41CONFIG_LOCALVERSION_AUTO=y
41CONFIG_SWAP=y 42CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 43CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y 44CONFIG_SYSVIPC_SYSCTL=y
44# CONFIG_POSIX_MQUEUE is not set 45CONFIG_POSIX_MQUEUE=y
46CONFIG_POSIX_MQUEUE_SYSCTL=y
45CONFIG_BSD_PROCESS_ACCT=y 47CONFIG_BSD_PROCESS_ACCT=y
46# CONFIG_BSD_PROCESS_ACCT_V3 is not set 48# CONFIG_BSD_PROCESS_ACCT_V3 is not set
47# CONFIG_TASKSTATS is not set 49# CONFIG_TASKSTATS is not set
48# CONFIG_AUDIT is not set 50CONFIG_AUDIT=y
51CONFIG_AUDITSYSCALL=y
52CONFIG_AUDIT_TREE=y
49 53
50# 54#
51# RCU Subsystem 55# RCU Subsystem
52# 56#
53CONFIG_CLASSIC_RCU=y 57# CONFIG_CLASSIC_RCU is not set
54# CONFIG_TREE_RCU is not set 58CONFIG_TREE_RCU=y
55# CONFIG_PREEMPT_RCU is not set 59# CONFIG_PREEMPT_RCU is not set
60# CONFIG_RCU_TRACE is not set
61CONFIG_RCU_FANOUT=32
62# CONFIG_RCU_FANOUT_EXACT is not set
56# CONFIG_TREE_RCU_TRACE is not set 63# CONFIG_TREE_RCU_TRACE is not set
57# CONFIG_PREEMPT_RCU_TRACE is not set 64# CONFIG_PREEMPT_RCU_TRACE is not set
58CONFIG_IKCONFIG=y 65CONFIG_IKCONFIG=y
@@ -60,15 +67,29 @@ CONFIG_IKCONFIG_PROC=y
60CONFIG_LOG_BUF_SHIFT=14 67CONFIG_LOG_BUF_SHIFT=14
61CONFIG_GROUP_SCHED=y 68CONFIG_GROUP_SCHED=y
62CONFIG_FAIR_GROUP_SCHED=y 69CONFIG_FAIR_GROUP_SCHED=y
63# CONFIG_RT_GROUP_SCHED is not set 70CONFIG_RT_GROUP_SCHED=y
64CONFIG_USER_SCHED=y 71# CONFIG_USER_SCHED is not set
65# CONFIG_CGROUP_SCHED is not set 72CONFIG_CGROUP_SCHED=y
66# CONFIG_CGROUPS is not set 73CONFIG_CGROUPS=y
67CONFIG_SYSFS_DEPRECATED=y 74CONFIG_CGROUP_DEBUG=y
68CONFIG_SYSFS_DEPRECATED_V2=y 75CONFIG_CGROUP_NS=y
76CONFIG_CGROUP_FREEZER=y
77CONFIG_CGROUP_DEVICE=y
78CONFIG_CPUSETS=y
79# CONFIG_PROC_PID_CPUSET is not set
80CONFIG_CGROUP_CPUACCT=y
81CONFIG_RESOURCE_COUNTERS=y
82CONFIG_CGROUP_MEM_RES_CTLR=y
83CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
84CONFIG_MM_OWNER=y
85# CONFIG_SYSFS_DEPRECATED_V2 is not set
69# CONFIG_RELAY is not set 86# CONFIG_RELAY is not set
70# CONFIG_NAMESPACES is not set 87# CONFIG_NAMESPACES is not set
71# CONFIG_BLK_DEV_INITRD is not set 88CONFIG_BLK_DEV_INITRD=y
89CONFIG_INITRAMFS_SOURCE=""
90CONFIG_RD_GZIP=y
91# CONFIG_RD_BZIP2 is not set
92# CONFIG_RD_LZMA is not set
72CONFIG_CC_OPTIMIZE_FOR_SIZE=y 93CONFIG_CC_OPTIMIZE_FOR_SIZE=y
73CONFIG_SYSCTL=y 94CONFIG_SYSCTL=y
74CONFIG_ANON_INODES=y 95CONFIG_ANON_INODES=y
@@ -76,8 +97,8 @@ CONFIG_EMBEDDED=y
76CONFIG_UID16=y 97CONFIG_UID16=y
77CONFIG_SYSCTL_SYSCALL=y 98CONFIG_SYSCTL_SYSCALL=y
78CONFIG_KALLSYMS=y 99CONFIG_KALLSYMS=y
100# CONFIG_KALLSYMS_ALL is not set
79# CONFIG_KALLSYMS_EXTRA_PASS is not set 101# CONFIG_KALLSYMS_EXTRA_PASS is not set
80# CONFIG_STRIP_ASM_SYMS is not set
81CONFIG_HOTPLUG=y 102CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y 103CONFIG_PRINTK=y
83CONFIG_BUG=y 104CONFIG_BUG=y
@@ -90,13 +111,20 @@ CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 111CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 112CONFIG_SHMEM=y
92CONFIG_AIO=y 113CONFIG_AIO=y
114
115#
116# Performance Counters
117#
93CONFIG_VM_EVENT_COUNTERS=y 118CONFIG_VM_EVENT_COUNTERS=y
119CONFIG_PCI_QUIRKS=y
120# CONFIG_STRIP_ASM_SYMS is not set
94CONFIG_COMPAT_BRK=y 121CONFIG_COMPAT_BRK=y
95CONFIG_SLAB=y 122CONFIG_SLAB=y
96# CONFIG_SLUB is not set 123# CONFIG_SLUB is not set
97# CONFIG_SLOB is not set 124# CONFIG_SLOB is not set
98CONFIG_PROFILING=y 125CONFIG_PROFILING=y
99# CONFIG_MARKERS is not set 126CONFIG_TRACEPOINTS=y
127CONFIG_MARKERS=y
100# CONFIG_OPROFILE is not set 128# CONFIG_OPROFILE is not set
101CONFIG_HAVE_OPROFILE=y 129CONFIG_HAVE_OPROFILE=y
102# CONFIG_KPROBES is not set 130# CONFIG_KPROBES is not set
@@ -129,12 +157,12 @@ CONFIG_IOSCHED_NOOP=y
129CONFIG_IOSCHED_AS=y 157CONFIG_IOSCHED_AS=y
130CONFIG_IOSCHED_DEADLINE=y 158CONFIG_IOSCHED_DEADLINE=y
131CONFIG_IOSCHED_CFQ=y 159CONFIG_IOSCHED_CFQ=y
132# CONFIG_DEFAULT_AS is not set 160CONFIG_DEFAULT_AS=y
133# CONFIG_DEFAULT_DEADLINE is not set 161# CONFIG_DEFAULT_DEADLINE is not set
134CONFIG_DEFAULT_CFQ=y 162# CONFIG_DEFAULT_CFQ is not set
135# CONFIG_DEFAULT_NOOP is not set 163# CONFIG_DEFAULT_NOOP is not set
136CONFIG_DEFAULT_IOSCHED="cfq" 164CONFIG_DEFAULT_IOSCHED="anticipatory"
137# CONFIG_FREEZER is not set 165CONFIG_FREEZER=y
138 166
139# 167#
140# System type 168# System type
@@ -183,6 +211,7 @@ CONFIG_CPU_SUBTYPE_SH7786=y
183CONFIG_QUICKLIST=y 211CONFIG_QUICKLIST=y
184CONFIG_MMU=y 212CONFIG_MMU=y
185CONFIG_PAGE_OFFSET=0x80000000 213CONFIG_PAGE_OFFSET=0x80000000
214CONFIG_FORCE_MAX_ZONEORDER=11
186CONFIG_MEMORY_START=0x08000000 215CONFIG_MEMORY_START=0x08000000
187CONFIG_MEMORY_SIZE=0x08000000 216CONFIG_MEMORY_SIZE=0x08000000
188CONFIG_29BIT=y 217CONFIG_29BIT=y
@@ -201,7 +230,12 @@ CONFIG_PAGE_SIZE_4KB=y
201# CONFIG_PAGE_SIZE_8KB is not set 230# CONFIG_PAGE_SIZE_8KB is not set
202# CONFIG_PAGE_SIZE_16KB is not set 231# CONFIG_PAGE_SIZE_16KB is not set
203# CONFIG_PAGE_SIZE_64KB is not set 232# CONFIG_PAGE_SIZE_64KB is not set
204CONFIG_ENTRY_OFFSET=0x00001000 233CONFIG_HUGETLB_PAGE_SIZE_64K=y
234# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
235# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
236# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
237# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
238# CONFIG_HUGETLB_PAGE_SIZE_512MB is not set
205CONFIG_SELECT_MEMORY_MODEL=y 239CONFIG_SELECT_MEMORY_MODEL=y
206# CONFIG_FLATMEM_MANUAL is not set 240# CONFIG_FLATMEM_MANUAL is not set
207# CONFIG_DISCONTIGMEM_MANUAL is not set 241# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -216,9 +250,9 @@ CONFIG_MIGRATION=y
216# CONFIG_PHYS_ADDR_T_64BIT is not set 250# CONFIG_PHYS_ADDR_T_64BIT is not set
217CONFIG_ZONE_DMA_FLAG=0 251CONFIG_ZONE_DMA_FLAG=0
218CONFIG_NR_QUICK=2 252CONFIG_NR_QUICK=2
219CONFIG_UNEVICTABLE_LRU=y
220CONFIG_HAVE_MLOCK=y 253CONFIG_HAVE_MLOCK=y
221CONFIG_HAVE_MLOCKED_PAGE_BIT=y 254CONFIG_HAVE_MLOCKED_PAGE_BIT=y
255CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
222 256
223# 257#
224# Cache configuration 258# Cache configuration
@@ -247,9 +281,10 @@ CONFIG_SH_URQUELL=y
247# 281#
248# Timer and clock configuration 282# Timer and clock configuration
249# 283#
250CONFIG_SH_TMU=y 284CONFIG_SH_TIMER_TMU=y
251CONFIG_SH_TIMER_IRQ=16
252CONFIG_SH_PCLK_FREQ=33333333 285CONFIG_SH_PCLK_FREQ=33333333
286CONFIG_SH_CLK_CPG=y
287CONFIG_SH_CLK_CPG_LEGACY=y
253CONFIG_TICK_ONESHOT=y 288CONFIG_TICK_ONESHOT=y
254# CONFIG_NO_HZ is not set 289# CONFIG_NO_HZ is not set
255CONFIG_HIGH_RES_TIMERS=y 290CONFIG_HIGH_RES_TIMERS=y
@@ -286,25 +321,37 @@ CONFIG_HZ=250
286CONFIG_SCHED_HRTICK=y 321CONFIG_SCHED_HRTICK=y
287CONFIG_KEXEC=y 322CONFIG_KEXEC=y
288# CONFIG_CRASH_DUMP is not set 323# CONFIG_CRASH_DUMP is not set
289# CONFIG_SECCOMP is not set 324CONFIG_SECCOMP=y
290# CONFIG_PREEMPT_NONE is not set 325CONFIG_PREEMPT_NONE=y
291# CONFIG_PREEMPT_VOLUNTARY is not set 326# CONFIG_PREEMPT_VOLUNTARY is not set
292CONFIG_PREEMPT=y 327# CONFIG_PREEMPT is not set
293CONFIG_GUSA=y 328CONFIG_GUSA=y
329CONFIG_SPARSE_IRQ=y
294 330
295# 331#
296# Boot options 332# Boot options
297# 333#
298CONFIG_ZERO_PAGE_OFFSET=0x00001000 334CONFIG_ZERO_PAGE_OFFSET=0x00001000
299CONFIG_BOOT_LINK_OFFSET=0x00800000 335CONFIG_BOOT_LINK_OFFSET=0x00800000
300CONFIG_CMDLINE_BOOL=y 336CONFIG_ENTRY_OFFSET=0x00001000
301CONFIG_CMDLINE="console=ttySC1, 38400 earlyprintk=serial ip=on ignore_loglevel root=/dev/nfs ip=dhcp memchunk.vpu=4m" 337# CONFIG_CMDLINE_BOOL is not set
302 338
303# 339#
304# Bus options 340# Bus options
305# 341#
342CONFIG_PCI=y
343# CONFIG_SH_PCIDMA_NONCOHERENT is not set
344CONFIG_PCIEPORTBUS=y
345CONFIG_PCIEAER=y
346CONFIG_PCIEASPM=y
347CONFIG_PCIEASPM_DEBUG=y
306# CONFIG_ARCH_SUPPORTS_MSI is not set 348# CONFIG_ARCH_SUPPORTS_MSI is not set
349# CONFIG_PCI_LEGACY is not set
350CONFIG_PCI_DEBUG=y
351# CONFIG_PCI_STUB is not set
352# CONFIG_PCI_IOV is not set
307# CONFIG_PCCARD is not set 353# CONFIG_PCCARD is not set
354# CONFIG_HOTPLUG_PCI is not set
308 355
309# 356#
310# Executable file formats 357# Executable file formats
@@ -312,13 +359,16 @@ CONFIG_CMDLINE="console=ttySC1, 38400 earlyprintk=serial ip=on ignore_loglevel r
312CONFIG_BINFMT_ELF=y 359CONFIG_BINFMT_ELF=y
313# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 360# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
314# CONFIG_HAVE_AOUT is not set 361# CONFIG_HAVE_AOUT is not set
315# CONFIG_BINFMT_MISC is not set 362CONFIG_BINFMT_MISC=y
316 363
317# 364#
318# Power management options (EXPERIMENTAL) 365# Power management options (EXPERIMENTAL)
319# 366#
320# CONFIG_PM is not set 367CONFIG_PM=y
321# CONFIG_CPU_IDLE is not set 368# CONFIG_PM_DEBUG is not set
369# CONFIG_HIBERNATION is not set
370CONFIG_CPU_IDLE=y
371CONFIG_CPU_IDLE_GOV_LADDER=y
322CONFIG_NET=y 372CONFIG_NET=y
323 373
324# 374#
@@ -384,6 +434,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
384# CONFIG_ECONET is not set 434# CONFIG_ECONET is not set
385# CONFIG_WAN_ROUTER is not set 435# CONFIG_WAN_ROUTER is not set
386# CONFIG_PHONET is not set 436# CONFIG_PHONET is not set
437# CONFIG_IEEE802154 is not set
387# CONFIG_NET_SCHED is not set 438# CONFIG_NET_SCHED is not set
388# CONFIG_DCB is not set 439# CONFIG_DCB is not set
389 440
@@ -391,6 +442,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
391# Network testing 442# Network testing
392# 443#
393# CONFIG_NET_PKTGEN is not set 444# CONFIG_NET_PKTGEN is not set
445# CONFIG_NET_DROP_MONITOR is not set
394# CONFIG_HAMRADIO is not set 446# CONFIG_HAMRADIO is not set
395# CONFIG_CAN is not set 447# CONFIG_CAN is not set
396# CONFIG_IRDA is not set 448# CONFIG_IRDA is not set
@@ -402,7 +454,11 @@ CONFIG_WIRELESS=y
402CONFIG_WIRELESS_EXT=y 454CONFIG_WIRELESS_EXT=y
403CONFIG_WIRELESS_EXT_SYSFS=y 455CONFIG_WIRELESS_EXT_SYSFS=y
404# CONFIG_LIB80211 is not set 456# CONFIG_LIB80211 is not set
405# CONFIG_MAC80211 is not set 457
458#
459# CFG80211 needs to be enabled for MAC80211
460#
461CONFIG_MAC80211_DEFAULT_PS_VALUE=0
406# CONFIG_WIMAX is not set 462# CONFIG_WIMAX is not set
407# CONFIG_RFKILL is not set 463# CONFIG_RFKILL is not set
408# CONFIG_NET_9P is not set 464# CONFIG_NET_9P is not set
@@ -418,6 +474,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
418CONFIG_STANDALONE=y 474CONFIG_STANDALONE=y
419CONFIG_PREVENT_FIRMWARE_BUILD=y 475CONFIG_PREVENT_FIRMWARE_BUILD=y
420# CONFIG_FW_LOADER is not set 476# CONFIG_FW_LOADER is not set
477# CONFIG_DEBUG_DRIVER is not set
478# CONFIG_DEBUG_DEVRES is not set
421# CONFIG_SYS_HYPERVISOR is not set 479# CONFIG_SYS_HYPERVISOR is not set
422# CONFIG_CONNECTOR is not set 480# CONFIG_CONNECTOR is not set
423CONFIG_MTD=y 481CONFIG_MTD=y
@@ -473,11 +531,13 @@ CONFIG_MTD_CFI_UTIL=y
473# CONFIG_MTD_COMPLEX_MAPPINGS is not set 531# CONFIG_MTD_COMPLEX_MAPPINGS is not set
474CONFIG_MTD_PHYSMAP=y 532CONFIG_MTD_PHYSMAP=y
475# CONFIG_MTD_PHYSMAP_COMPAT is not set 533# CONFIG_MTD_PHYSMAP_COMPAT is not set
534# CONFIG_MTD_INTEL_VR_NOR is not set
476# CONFIG_MTD_PLATRAM is not set 535# CONFIG_MTD_PLATRAM is not set
477 536
478# 537#
479# Self-contained MTD device drivers 538# Self-contained MTD device drivers
480# 539#
540# CONFIG_MTD_PMC551 is not set
481# CONFIG_MTD_SLRAM is not set 541# CONFIG_MTD_SLRAM is not set
482# CONFIG_MTD_PHRAM is not set 542# CONFIG_MTD_PHRAM is not set
483# CONFIG_MTD_MTDRAM is not set 543# CONFIG_MTD_MTDRAM is not set
@@ -503,9 +563,13 @@ CONFIG_MTD_PHYSMAP=y
503# CONFIG_MTD_UBI is not set 563# CONFIG_MTD_UBI is not set
504# CONFIG_PARPORT is not set 564# CONFIG_PARPORT is not set
505CONFIG_BLK_DEV=y 565CONFIG_BLK_DEV=y
566# CONFIG_BLK_CPQ_CISS_DA is not set
567# CONFIG_BLK_DEV_DAC960 is not set
568# CONFIG_BLK_DEV_UMEM is not set
506# CONFIG_BLK_DEV_COW_COMMON is not set 569# CONFIG_BLK_DEV_COW_COMMON is not set
507# CONFIG_BLK_DEV_LOOP is not set 570# CONFIG_BLK_DEV_LOOP is not set
508# CONFIG_BLK_DEV_NBD is not set 571# CONFIG_BLK_DEV_NBD is not set
572# CONFIG_BLK_DEV_SX8 is not set
509# CONFIG_BLK_DEV_UB is not set 573# CONFIG_BLK_DEV_UB is not set
510CONFIG_BLK_DEV_RAM=y 574CONFIG_BLK_DEV_RAM=y
511CONFIG_BLK_DEV_RAM_COUNT=16 575CONFIG_BLK_DEV_RAM_COUNT=16
@@ -537,10 +601,6 @@ CONFIG_BLK_DEV_SD=y
537# CONFIG_BLK_DEV_SR is not set 601# CONFIG_BLK_DEV_SR is not set
538# CONFIG_CHR_DEV_SG is not set 602# CONFIG_CHR_DEV_SG is not set
539# CONFIG_CHR_DEV_SCH is not set 603# CONFIG_CHR_DEV_SCH is not set
540
541#
542# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
543#
544# CONFIG_SCSI_MULTI_LUN is not set 604# CONFIG_SCSI_MULTI_LUN is not set
545# CONFIG_SCSI_CONSTANTS is not set 605# CONFIG_SCSI_CONSTANTS is not set
546# CONFIG_SCSI_LOGGING is not set 606# CONFIG_SCSI_LOGGING is not set
@@ -561,24 +621,90 @@ CONFIG_SCSI_WAIT_SCAN=m
561CONFIG_ATA=y 621CONFIG_ATA=y
562# CONFIG_ATA_NONSTANDARD is not set 622# CONFIG_ATA_NONSTANDARD is not set
563CONFIG_SATA_PMP=y 623CONFIG_SATA_PMP=y
624# CONFIG_SATA_AHCI is not set
625CONFIG_SATA_SIL24=y
564CONFIG_ATA_SFF=y 626CONFIG_ATA_SFF=y
627# CONFIG_SATA_SVW is not set
628# CONFIG_ATA_PIIX is not set
565# CONFIG_SATA_MV is not set 629# CONFIG_SATA_MV is not set
630# CONFIG_SATA_NV is not set
631# CONFIG_PDC_ADMA is not set
632# CONFIG_SATA_QSTOR is not set
633# CONFIG_SATA_PROMISE is not set
634# CONFIG_SATA_SX4 is not set
635# CONFIG_SATA_SIL is not set
636# CONFIG_SATA_SIS is not set
637# CONFIG_SATA_ULI is not set
638# CONFIG_SATA_VIA is not set
639# CONFIG_SATA_VITESSE is not set
640# CONFIG_SATA_INIC162X is not set
641# CONFIG_PATA_ALI is not set
642# CONFIG_PATA_AMD is not set
643# CONFIG_PATA_ARTOP is not set
644# CONFIG_PATA_ATIIXP is not set
645# CONFIG_PATA_CMD640_PCI is not set
646# CONFIG_PATA_CMD64X is not set
647# CONFIG_PATA_CS5520 is not set
648# CONFIG_PATA_CS5530 is not set
649# CONFIG_PATA_CYPRESS is not set
650# CONFIG_PATA_EFAR is not set
651# CONFIG_ATA_GENERIC is not set
652# CONFIG_PATA_HPT366 is not set
653# CONFIG_PATA_HPT37X is not set
654# CONFIG_PATA_HPT3X2N is not set
655# CONFIG_PATA_HPT3X3 is not set
656# CONFIG_PATA_IT821X is not set
657# CONFIG_PATA_IT8213 is not set
658# CONFIG_PATA_JMICRON is not set
659# CONFIG_PATA_TRIFLEX is not set
660# CONFIG_PATA_MARVELL is not set
661# CONFIG_PATA_MPIIX is not set
662# CONFIG_PATA_OLDPIIX is not set
663# CONFIG_PATA_NETCELL is not set
664# CONFIG_PATA_NINJA32 is not set
665# CONFIG_PATA_NS87410 is not set
666# CONFIG_PATA_NS87415 is not set
667# CONFIG_PATA_OPTI is not set
668# CONFIG_PATA_OPTIDMA is not set
669# CONFIG_PATA_PDC_OLD is not set
670# CONFIG_PATA_RADISYS is not set
671# CONFIG_PATA_RZ1000 is not set
672# CONFIG_PATA_SC1200 is not set
673# CONFIG_PATA_SERVERWORKS is not set
674# CONFIG_PATA_PDC2027X is not set
675# CONFIG_PATA_SIL680 is not set
676# CONFIG_PATA_SIS is not set
677# CONFIG_PATA_VIA is not set
678# CONFIG_PATA_WINBOND is not set
566# CONFIG_PATA_PLATFORM is not set 679# CONFIG_PATA_PLATFORM is not set
680# CONFIG_PATA_SCH is not set
567# CONFIG_MD is not set 681# CONFIG_MD is not set
682# CONFIG_FUSION is not set
683
684#
685# IEEE 1394 (FireWire) support
686#
687
688#
689# Enable only one of the two stacks, unless you know what you are doing
690#
691# CONFIG_FIREWIRE is not set
692# CONFIG_IEEE1394 is not set
693# CONFIG_I2O is not set
568CONFIG_NETDEVICES=y 694CONFIG_NETDEVICES=y
569CONFIG_COMPAT_NET_DEV_OPS=y
570# CONFIG_DUMMY is not set 695# CONFIG_DUMMY is not set
571# CONFIG_BONDING is not set 696# CONFIG_BONDING is not set
572# CONFIG_MACVLAN is not set 697# CONFIG_MACVLAN is not set
573# CONFIG_EQUALIZER is not set 698# CONFIG_EQUALIZER is not set
574# CONFIG_TUN is not set 699# CONFIG_TUN is not set
575# CONFIG_VETH is not set 700# CONFIG_VETH is not set
701# CONFIG_ARCNET is not set
576CONFIG_PHYLIB=y 702CONFIG_PHYLIB=y
577 703
578# 704#
579# MII PHY device drivers 705# MII PHY device drivers
580# 706#
581# CONFIG_MARVELL_PHY is not set 707CONFIG_MARVELL_PHY=y
582# CONFIG_DAVICOM_PHY is not set 708# CONFIG_DAVICOM_PHY is not set
583# CONFIG_QSEMI_PHY is not set 709# CONFIG_QSEMI_PHY is not set
584# CONFIG_LXT_PHY is not set 710# CONFIG_LXT_PHY is not set
@@ -597,11 +723,17 @@ CONFIG_NET_ETHERNET=y
597CONFIG_MII=y 723CONFIG_MII=y
598# CONFIG_AX88796 is not set 724# CONFIG_AX88796 is not set
599# CONFIG_STNIC is not set 725# CONFIG_STNIC is not set
726# CONFIG_HAPPYMEAL is not set
727# CONFIG_SUNGEM is not set
728# CONFIG_CASSINI is not set
729# CONFIG_NET_VENDOR_3COM is not set
600CONFIG_SMC91X=y 730CONFIG_SMC91X=y
601# CONFIG_ETHOC is not set 731# CONFIG_ETHOC is not set
602# CONFIG_SMC911X is not set 732# CONFIG_SMC911X is not set
603# CONFIG_SMSC911X is not set 733# CONFIG_SMSC911X is not set
604# CONFIG_DNET is not set 734# CONFIG_DNET is not set
735# CONFIG_NET_TULIP is not set
736# CONFIG_HP100 is not set
605# CONFIG_IBM_NEW_EMAC_ZMII is not set 737# CONFIG_IBM_NEW_EMAC_ZMII is not set
606# CONFIG_IBM_NEW_EMAC_RGMII is not set 738# CONFIG_IBM_NEW_EMAC_RGMII is not set
607# CONFIG_IBM_NEW_EMAC_TAH is not set 739# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -609,9 +741,54 @@ CONFIG_SMC91X=y
609# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set 741# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
610# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 742# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
611# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 743# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
744CONFIG_NET_PCI=y
745# CONFIG_PCNET32 is not set
746# CONFIG_AMD8111_ETH is not set
747# CONFIG_ADAPTEC_STARFIRE is not set
612# CONFIG_B44 is not set 748# CONFIG_B44 is not set
613# CONFIG_NETDEV_1000 is not set 749# CONFIG_FORCEDETH is not set
750# CONFIG_E100 is not set
751# CONFIG_FEALNX is not set
752# CONFIG_NATSEMI is not set
753# CONFIG_NE2K_PCI is not set
754CONFIG_8139CP=y
755# CONFIG_8139TOO is not set
756# CONFIG_R6040 is not set
757# CONFIG_SIS900 is not set
758# CONFIG_EPIC100 is not set
759# CONFIG_SMSC9420 is not set
760# CONFIG_SUNDANCE is not set
761# CONFIG_TLAN is not set
762# CONFIG_KS8842 is not set
763# CONFIG_VIA_RHINE is not set
764# CONFIG_SC92031 is not set
765# CONFIG_ATL2 is not set
766CONFIG_NETDEV_1000=y
767# CONFIG_ACENIC is not set
768# CONFIG_DL2K is not set
769# CONFIG_E1000 is not set
770# CONFIG_E1000E is not set
771# CONFIG_IP1000 is not set
772# CONFIG_IGB is not set
773# CONFIG_IGBVF is not set
774# CONFIG_NS83820 is not set
775# CONFIG_HAMACHI is not set
776# CONFIG_YELLOWFIN is not set
777# CONFIG_R8169 is not set
778# CONFIG_SIS190 is not set
779# CONFIG_SKGE is not set
780CONFIG_SKY2=y
781CONFIG_SKY2_DEBUG=y
782# CONFIG_VIA_VELOCITY is not set
783# CONFIG_TIGON3 is not set
784# CONFIG_BNX2 is not set
785# CONFIG_QLA3XXX is not set
786# CONFIG_ATL1 is not set
787# CONFIG_ATL1E is not set
788# CONFIG_ATL1C is not set
789# CONFIG_JME is not set
614# CONFIG_NETDEV_10000 is not set 790# CONFIG_NETDEV_10000 is not set
791# CONFIG_TR is not set
615 792
616# 793#
617# Wireless LAN 794# Wireless LAN
@@ -632,8 +809,11 @@ CONFIG_SMC91X=y
632# CONFIG_USB_RTL8150 is not set 809# CONFIG_USB_RTL8150 is not set
633# CONFIG_USB_USBNET is not set 810# CONFIG_USB_USBNET is not set
634# CONFIG_WAN is not set 811# CONFIG_WAN is not set
812# CONFIG_FDDI is not set
813# CONFIG_HIPPI is not set
635# CONFIG_PPP is not set 814# CONFIG_PPP is not set
636# CONFIG_SLIP is not set 815# CONFIG_SLIP is not set
816# CONFIG_NET_FC is not set
637# CONFIG_NETCONSOLE is not set 817# CONFIG_NETCONSOLE is not set
638# CONFIG_NETPOLL is not set 818# CONFIG_NETPOLL is not set
639# CONFIG_NET_POLL_CONTROLLER is not set 819# CONFIG_NET_POLL_CONTROLLER is not set
@@ -692,6 +872,7 @@ CONFIG_HW_CONSOLE=y
692CONFIG_VT_HW_CONSOLE_BINDING=y 872CONFIG_VT_HW_CONSOLE_BINDING=y
693CONFIG_DEVKMEM=y 873CONFIG_DEVKMEM=y
694# CONFIG_SERIAL_NONSTANDARD is not set 874# CONFIG_SERIAL_NONSTANDARD is not set
875# CONFIG_NOZOMI is not set
695 876
696# 877#
697# Serial drivers 878# Serial drivers
@@ -706,6 +887,7 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6
706CONFIG_SERIAL_SH_SCI_CONSOLE=y 887CONFIG_SERIAL_SH_SCI_CONSOLE=y
707CONFIG_SERIAL_CORE=y 888CONFIG_SERIAL_CORE=y
708CONFIG_SERIAL_CORE_CONSOLE=y 889CONFIG_SERIAL_CORE_CONSOLE=y
890# CONFIG_SERIAL_JSM is not set
709CONFIG_UNIX98_PTYS=y 891CONFIG_UNIX98_PTYS=y
710# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 892# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
711CONFIG_LEGACY_PTYS=y 893CONFIG_LEGACY_PTYS=y
@@ -714,8 +896,10 @@ CONFIG_LEGACY_PTY_COUNT=256
714CONFIG_HW_RANDOM=y 896CONFIG_HW_RANDOM=y
715# CONFIG_HW_RANDOM_TIMERIOMEM is not set 897# CONFIG_HW_RANDOM_TIMERIOMEM is not set
716# CONFIG_R3964 is not set 898# CONFIG_R3964 is not set
899# CONFIG_APPLICOM is not set
717# CONFIG_RAW_DRIVER is not set 900# CONFIG_RAW_DRIVER is not set
718# CONFIG_TCG_TPM is not set 901# CONFIG_TCG_TPM is not set
902CONFIG_DEVPORT=y
719CONFIG_I2C=y 903CONFIG_I2C=y
720CONFIG_I2C_BOARDINFO=y 904CONFIG_I2C_BOARDINFO=y
721# CONFIG_I2C_CHARDEV is not set 905# CONFIG_I2C_CHARDEV is not set
@@ -727,6 +911,24 @@ CONFIG_I2C_ALGOPCA=y
727# 911#
728 912
729# 913#
914# PC SMBus host controller drivers
915#
916# CONFIG_I2C_ALI1535 is not set
917# CONFIG_I2C_ALI1563 is not set
918# CONFIG_I2C_ALI15X3 is not set
919# CONFIG_I2C_AMD756 is not set
920# CONFIG_I2C_AMD8111 is not set
921# CONFIG_I2C_I801 is not set
922# CONFIG_I2C_ISCH is not set
923# CONFIG_I2C_PIIX4 is not set
924# CONFIG_I2C_NFORCE2 is not set
925# CONFIG_I2C_SIS5595 is not set
926# CONFIG_I2C_SIS630 is not set
927# CONFIG_I2C_SIS96X is not set
928# CONFIG_I2C_VIA is not set
929# CONFIG_I2C_VIAPRO is not set
930
931#
730# I2C system bus drivers (mostly embedded / system-on-chip) 932# I2C system bus drivers (mostly embedded / system-on-chip)
731# 933#
732# CONFIG_I2C_GPIO is not set 934# CONFIG_I2C_GPIO is not set
@@ -742,6 +944,11 @@ CONFIG_I2C_ALGOPCA=y
742# CONFIG_I2C_TINY_USB is not set 944# CONFIG_I2C_TINY_USB is not set
743 945
744# 946#
947# Graphics adapter I2C/DDC channel drivers
948#
949# CONFIG_I2C_VOODOO3 is not set
950
951#
745# Other I2C/SMBus bus drivers 952# Other I2C/SMBus bus drivers
746# 953#
747CONFIG_I2C_PCA_PLATFORM=y 954CONFIG_I2C_PCA_PLATFORM=y
@@ -754,7 +961,6 @@ CONFIG_I2C_PCA_PLATFORM=y
754# CONFIG_SENSORS_PCF8574 is not set 961# CONFIG_SENSORS_PCF8574 is not set
755# CONFIG_PCF8575 is not set 962# CONFIG_PCF8575 is not set
756# CONFIG_SENSORS_PCA9539 is not set 963# CONFIG_SENSORS_PCA9539 is not set
757# CONFIG_SENSORS_MAX6875 is not set
758# CONFIG_SENSORS_TSL2550 is not set 964# CONFIG_SENSORS_TSL2550 is not set
759# CONFIG_I2C_DEBUG_CORE is not set 965# CONFIG_I2C_DEBUG_CORE is not set
760# CONFIG_I2C_DEBUG_ALGO is not set 966# CONFIG_I2C_DEBUG_ALGO is not set
@@ -763,6 +969,7 @@ CONFIG_I2C_PCA_PLATFORM=y
763# CONFIG_SPI is not set 969# CONFIG_SPI is not set
764CONFIG_ARCH_REQUIRE_GPIOLIB=y 970CONFIG_ARCH_REQUIRE_GPIOLIB=y
765CONFIG_GPIOLIB=y 971CONFIG_GPIOLIB=y
972# CONFIG_DEBUG_GPIO is not set
766# CONFIG_GPIO_SYSFS is not set 973# CONFIG_GPIO_SYSFS is not set
767 974
768# 975#
@@ -779,15 +986,79 @@ CONFIG_GPIOLIB=y
779# 986#
780# PCI GPIO expanders: 987# PCI GPIO expanders:
781# 988#
989# CONFIG_GPIO_BT8XX is not set
782 990
783# 991#
784# SPI GPIO expanders: 992# SPI GPIO expanders:
785# 993#
786# CONFIG_W1 is not set 994# CONFIG_W1 is not set
787# CONFIG_POWER_SUPPLY is not set 995# CONFIG_POWER_SUPPLY is not set
788# CONFIG_HWMON is not set 996CONFIG_HWMON=y
997# CONFIG_HWMON_VID is not set
998# CONFIG_SENSORS_AD7414 is not set
999# CONFIG_SENSORS_AD7418 is not set
1000# CONFIG_SENSORS_ADM1021 is not set
1001# CONFIG_SENSORS_ADM1025 is not set
1002# CONFIG_SENSORS_ADM1026 is not set
1003# CONFIG_SENSORS_ADM1029 is not set
1004# CONFIG_SENSORS_ADM1031 is not set
1005# CONFIG_SENSORS_ADM9240 is not set
1006# CONFIG_SENSORS_ADT7462 is not set
1007# CONFIG_SENSORS_ADT7470 is not set
1008# CONFIG_SENSORS_ADT7473 is not set
1009# CONFIG_SENSORS_ADT7475 is not set
1010# CONFIG_SENSORS_ATXP1 is not set
1011# CONFIG_SENSORS_DS1621 is not set
1012# CONFIG_SENSORS_I5K_AMB is not set
1013# CONFIG_SENSORS_F71805F is not set
1014# CONFIG_SENSORS_F71882FG is not set
1015# CONFIG_SENSORS_F75375S is not set
1016# CONFIG_SENSORS_G760A is not set
1017# CONFIG_SENSORS_GL518SM is not set
1018# CONFIG_SENSORS_GL520SM is not set
1019# CONFIG_SENSORS_IT87 is not set
1020# CONFIG_SENSORS_LM63 is not set
1021# CONFIG_SENSORS_LM75 is not set
1022# CONFIG_SENSORS_LM77 is not set
1023# CONFIG_SENSORS_LM78 is not set
1024# CONFIG_SENSORS_LM80 is not set
1025# CONFIG_SENSORS_LM83 is not set
1026# CONFIG_SENSORS_LM85 is not set
1027# CONFIG_SENSORS_LM87 is not set
1028# CONFIG_SENSORS_LM90 is not set
1029# CONFIG_SENSORS_LM92 is not set
1030# CONFIG_SENSORS_LM93 is not set
1031# CONFIG_SENSORS_LTC4215 is not set
1032# CONFIG_SENSORS_LTC4245 is not set
1033# CONFIG_SENSORS_LM95241 is not set
1034# CONFIG_SENSORS_MAX1619 is not set
1035# CONFIG_SENSORS_MAX6650 is not set
1036# CONFIG_SENSORS_PC87360 is not set
1037# CONFIG_SENSORS_PC87427 is not set
1038# CONFIG_SENSORS_PCF8591 is not set
1039# CONFIG_SENSORS_SHT15 is not set
1040# CONFIG_SENSORS_SIS5595 is not set
1041# CONFIG_SENSORS_DME1737 is not set
1042# CONFIG_SENSORS_SMSC47M1 is not set
1043# CONFIG_SENSORS_SMSC47M192 is not set
1044# CONFIG_SENSORS_SMSC47B397 is not set
1045# CONFIG_SENSORS_ADS7828 is not set
1046# CONFIG_SENSORS_THMC50 is not set
1047# CONFIG_SENSORS_TMP401 is not set
1048# CONFIG_SENSORS_VIA686A is not set
1049# CONFIG_SENSORS_VT1211 is not set
1050# CONFIG_SENSORS_VT8231 is not set
1051# CONFIG_SENSORS_W83781D is not set
1052# CONFIG_SENSORS_W83791D is not set
1053# CONFIG_SENSORS_W83792D is not set
1054# CONFIG_SENSORS_W83793 is not set
1055# CONFIG_SENSORS_W83L785TS is not set
1056# CONFIG_SENSORS_W83L786NG is not set
1057# CONFIG_SENSORS_W83627HF is not set
1058# CONFIG_SENSORS_W83627EHF is not set
1059# CONFIG_HWMON_DEBUG_CHIP is not set
789# CONFIG_THERMAL is not set 1060# CONFIG_THERMAL is not set
790# CONFIG_THERMAL_HWMON is not set 1061CONFIG_THERMAL_HWMON=y
791# CONFIG_WATCHDOG is not set 1062# CONFIG_WATCHDOG is not set
792CONFIG_SSB_POSSIBLE=y 1063CONFIG_SSB_POSSIBLE=y
793 1064
@@ -811,10 +1082,7 @@ CONFIG_MFD_SM501=y
811# CONFIG_MFD_WM8350_I2C is not set 1082# CONFIG_MFD_WM8350_I2C is not set
812# CONFIG_MFD_PCF50633 is not set 1083# CONFIG_MFD_PCF50633 is not set
813# CONFIG_REGULATOR is not set 1084# CONFIG_REGULATOR is not set
814 1085CONFIG_MEDIA_SUPPORT=y
815#
816# Multimedia devices
817#
818 1086
819# 1087#
820# Multimedia core support 1088# Multimedia core support
@@ -831,6 +1099,7 @@ CONFIG_MFD_SM501=y
831# 1099#
832# Graphics support 1100# Graphics support
833# 1101#
1102# CONFIG_DRM is not set
834# CONFIG_VGASTATE is not set 1103# CONFIG_VGASTATE is not set
835# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1104# CONFIG_VIDEO_OUTPUT_CONTROL is not set
836CONFIG_FB=y 1105CONFIG_FB=y
@@ -856,7 +1125,31 @@ CONFIG_FB_DEFERRED_IO=y
856# 1125#
857# Frame buffer hardware drivers 1126# Frame buffer hardware drivers
858# 1127#
1128# CONFIG_FB_CIRRUS is not set
1129# CONFIG_FB_PM2 is not set
1130# CONFIG_FB_CYBER2000 is not set
1131# CONFIG_FB_ASILIANT is not set
1132# CONFIG_FB_IMSTT is not set
859# CONFIG_FB_S1D13XXX is not set 1133# CONFIG_FB_S1D13XXX is not set
1134# CONFIG_FB_NVIDIA is not set
1135# CONFIG_FB_RIVA is not set
1136# CONFIG_FB_MATROX is not set
1137# CONFIG_FB_RADEON is not set
1138# CONFIG_FB_ATY128 is not set
1139# CONFIG_FB_ATY is not set
1140# CONFIG_FB_S3 is not set
1141# CONFIG_FB_SAVAGE is not set
1142# CONFIG_FB_SIS is not set
1143# CONFIG_FB_VIA is not set
1144# CONFIG_FB_NEOMAGIC is not set
1145# CONFIG_FB_KYRO is not set
1146# CONFIG_FB_3DFX is not set
1147# CONFIG_FB_VOODOO1 is not set
1148# CONFIG_FB_VT8623 is not set
1149# CONFIG_FB_TRIDENT is not set
1150# CONFIG_FB_ARK is not set
1151# CONFIG_FB_PM3 is not set
1152# CONFIG_FB_CARMINE is not set
860CONFIG_FB_SH_MOBILE_LCDC=m 1153CONFIG_FB_SH_MOBILE_LCDC=m
861CONFIG_FB_SM501=y 1154CONFIG_FB_SM501=y
862# CONFIG_FB_VIRTUAL is not set 1155# CONFIG_FB_VIRTUAL is not set
@@ -909,7 +1202,7 @@ CONFIG_HID_BELKIN=y
909CONFIG_HID_CHERRY=y 1202CONFIG_HID_CHERRY=y
910CONFIG_HID_CHICONY=y 1203CONFIG_HID_CHICONY=y
911CONFIG_HID_CYPRESS=y 1204CONFIG_HID_CYPRESS=y
912# CONFIG_DRAGONRISE_FF is not set 1205# CONFIG_HID_DRAGONRISE is not set
913CONFIG_HID_EZKEY=y 1206CONFIG_HID_EZKEY=y
914# CONFIG_HID_KYE is not set 1207# CONFIG_HID_KYE is not set
915CONFIG_HID_GYRATION=y 1208CONFIG_HID_GYRATION=y
@@ -926,14 +1219,15 @@ CONFIG_HID_PETALYNX=y
926CONFIG_HID_SAMSUNG=y 1219CONFIG_HID_SAMSUNG=y
927CONFIG_HID_SONY=y 1220CONFIG_HID_SONY=y
928CONFIG_HID_SUNPLUS=y 1221CONFIG_HID_SUNPLUS=y
929# CONFIG_GREENASIA_FF is not set 1222# CONFIG_HID_GREENASIA is not set
1223# CONFIG_HID_SMARTJOYPLUS is not set
930# CONFIG_HID_TOPSEED is not set 1224# CONFIG_HID_TOPSEED is not set
931CONFIG_THRUSTMASTER_FF=m 1225# CONFIG_HID_THRUSTMASTER is not set
932CONFIG_ZEROPLUS_FF=m 1226# CONFIG_HID_ZEROPLUS is not set
933CONFIG_USB_SUPPORT=y 1227CONFIG_USB_SUPPORT=y
934CONFIG_USB_ARCH_HAS_HCD=y 1228CONFIG_USB_ARCH_HAS_HCD=y
935CONFIG_USB_ARCH_HAS_OHCI=y 1229CONFIG_USB_ARCH_HAS_OHCI=y
936# CONFIG_USB_ARCH_HAS_EHCI is not set 1230CONFIG_USB_ARCH_HAS_EHCI=y
937CONFIG_USB=y 1231CONFIG_USB=y
938# CONFIG_USB_DEBUG is not set 1232# CONFIG_USB_DEBUG is not set
939CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 1233CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
@@ -944,6 +1238,7 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
944CONFIG_USB_DEVICEFS=y 1238CONFIG_USB_DEVICEFS=y
945CONFIG_USB_DEVICE_CLASS=y 1239CONFIG_USB_DEVICE_CLASS=y
946# CONFIG_USB_DYNAMIC_MINORS is not set 1240# CONFIG_USB_DYNAMIC_MINORS is not set
1241# CONFIG_USB_SUSPEND is not set
947# CONFIG_USB_OTG is not set 1242# CONFIG_USB_OTG is not set
948# CONFIG_USB_OTG_WHITELIST is not set 1243# CONFIG_USB_OTG_WHITELIST is not set
949# CONFIG_USB_OTG_BLACKLIST_HUB is not set 1244# CONFIG_USB_OTG_BLACKLIST_HUB is not set
@@ -955,12 +1250,19 @@ CONFIG_USB_MON=y
955# USB Host Controller Drivers 1250# USB Host Controller Drivers
956# 1251#
957# CONFIG_USB_C67X00_HCD is not set 1252# CONFIG_USB_C67X00_HCD is not set
1253# CONFIG_USB_XHCI_HCD is not set
1254# CONFIG_USB_EHCI_HCD is not set
958# CONFIG_USB_OXU210HP_HCD is not set 1255# CONFIG_USB_OXU210HP_HCD is not set
959# CONFIG_USB_ISP116X_HCD is not set 1256# CONFIG_USB_ISP116X_HCD is not set
960# CONFIG_USB_ISP1760_HCD is not set 1257# CONFIG_USB_ISP1760_HCD is not set
961# CONFIG_USB_OHCI_HCD is not set 1258CONFIG_USB_OHCI_HCD=y
1259# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1260# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1261CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1262# CONFIG_USB_UHCI_HCD is not set
962# CONFIG_USB_SL811_HCD is not set 1263# CONFIG_USB_SL811_HCD is not set
963# CONFIG_USB_R8A66597_HCD is not set 1264# CONFIG_USB_R8A66597_HCD is not set
1265# CONFIG_USB_WHCI_HCD is not set
964# CONFIG_USB_HWA_HCD is not set 1266# CONFIG_USB_HWA_HCD is not set
965 1267
966# 1268#
@@ -1034,14 +1336,74 @@ CONFIG_USB_STORAGE=y
1034# 1336#
1035# CONFIG_USB_GPIO_VBUS is not set 1337# CONFIG_USB_GPIO_VBUS is not set
1036# CONFIG_NOP_USB_XCEIV is not set 1338# CONFIG_NOP_USB_XCEIV is not set
1339# CONFIG_UWB is not set
1037# CONFIG_MMC is not set 1340# CONFIG_MMC is not set
1038# CONFIG_MEMSTICK is not set 1341# CONFIG_MEMSTICK is not set
1039# CONFIG_NEW_LEDS is not set 1342# CONFIG_NEW_LEDS is not set
1040# CONFIG_ACCESSIBILITY is not set 1343# CONFIG_ACCESSIBILITY is not set
1041# CONFIG_RTC_CLASS is not set 1344# CONFIG_INFINIBAND is not set
1345CONFIG_RTC_LIB=y
1346CONFIG_RTC_CLASS=y
1347CONFIG_RTC_HCTOSYS=y
1348CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1349# CONFIG_RTC_DEBUG is not set
1350
1351#
1352# RTC interfaces
1353#
1354CONFIG_RTC_INTF_SYSFS=y
1355CONFIG_RTC_INTF_PROC=y
1356CONFIG_RTC_INTF_DEV=y
1357# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1358# CONFIG_RTC_DRV_TEST is not set
1359
1360#
1361# I2C RTC drivers
1362#
1363# CONFIG_RTC_DRV_DS1307 is not set
1364# CONFIG_RTC_DRV_DS1374 is not set
1365# CONFIG_RTC_DRV_DS1672 is not set
1366# CONFIG_RTC_DRV_MAX6900 is not set
1367# CONFIG_RTC_DRV_RS5C372 is not set
1368# CONFIG_RTC_DRV_ISL1208 is not set
1369# CONFIG_RTC_DRV_X1205 is not set
1370# CONFIG_RTC_DRV_PCF8563 is not set
1371# CONFIG_RTC_DRV_PCF8583 is not set
1372# CONFIG_RTC_DRV_M41T80 is not set
1373# CONFIG_RTC_DRV_S35390A is not set
1374# CONFIG_RTC_DRV_FM3130 is not set
1375# CONFIG_RTC_DRV_RX8581 is not set
1376
1377#
1378# SPI RTC drivers
1379#
1380
1381#
1382# Platform RTC drivers
1383#
1384# CONFIG_RTC_DRV_DS1286 is not set
1385# CONFIG_RTC_DRV_DS1511 is not set
1386# CONFIG_RTC_DRV_DS1553 is not set
1387# CONFIG_RTC_DRV_DS1742 is not set
1388# CONFIG_RTC_DRV_STK17TA8 is not set
1389# CONFIG_RTC_DRV_M48T86 is not set
1390# CONFIG_RTC_DRV_M48T35 is not set
1391# CONFIG_RTC_DRV_M48T59 is not set
1392# CONFIG_RTC_DRV_BQ4802 is not set
1393# CONFIG_RTC_DRV_V3020 is not set
1394
1395#
1396# on-CPU RTC drivers
1397#
1398CONFIG_RTC_DRV_SH=y
1399CONFIG_RTC_DRV_GENERIC=y
1042# CONFIG_DMADEVICES is not set 1400# CONFIG_DMADEVICES is not set
1043# CONFIG_AUXDISPLAY is not set 1401# CONFIG_AUXDISPLAY is not set
1044# CONFIG_UIO is not set 1402# CONFIG_UIO is not set
1403
1404#
1405# TI VLYNQ
1406#
1045# CONFIG_STAGING is not set 1407# CONFIG_STAGING is not set
1046 1408
1047# 1409#
@@ -1055,16 +1417,25 @@ CONFIG_EXT3_FS=y
1055CONFIG_EXT3_FS_XATTR=y 1417CONFIG_EXT3_FS_XATTR=y
1056# CONFIG_EXT3_FS_POSIX_ACL is not set 1418# CONFIG_EXT3_FS_POSIX_ACL is not set
1057# CONFIG_EXT3_FS_SECURITY is not set 1419# CONFIG_EXT3_FS_SECURITY is not set
1058# CONFIG_EXT4_FS is not set 1420CONFIG_EXT4_FS=y
1421# CONFIG_EXT4DEV_COMPAT is not set
1422CONFIG_EXT4_FS_XATTR=y
1423# CONFIG_EXT4_FS_POSIX_ACL is not set
1424# CONFIG_EXT4_FS_SECURITY is not set
1059CONFIG_JBD=y 1425CONFIG_JBD=y
1426# CONFIG_JBD_DEBUG is not set
1427CONFIG_JBD2=y
1428# CONFIG_JBD2_DEBUG is not set
1060CONFIG_FS_MBCACHE=y 1429CONFIG_FS_MBCACHE=y
1061# CONFIG_REISERFS_FS is not set 1430# CONFIG_REISERFS_FS is not set
1062# CONFIG_JFS_FS is not set 1431# CONFIG_JFS_FS is not set
1063CONFIG_FS_POSIX_ACL=y 1432# CONFIG_FS_POSIX_ACL is not set
1064CONFIG_FILE_LOCKING=y
1065# CONFIG_XFS_FS is not set 1433# CONFIG_XFS_FS is not set
1066# CONFIG_OCFS2_FS is not set 1434# CONFIG_OCFS2_FS is not set
1067# CONFIG_BTRFS_FS is not set 1435CONFIG_BTRFS_FS=y
1436# CONFIG_BTRFS_FS_POSIX_ACL is not set
1437CONFIG_FILE_LOCKING=y
1438CONFIG_FSNOTIFY=y
1068CONFIG_DNOTIFY=y 1439CONFIG_DNOTIFY=y
1069CONFIG_INOTIFY=y 1440CONFIG_INOTIFY=y
1070CONFIG_INOTIFY_USER=y 1441CONFIG_INOTIFY_USER=y
@@ -1106,9 +1477,9 @@ CONFIG_PROC_PAGE_MONITOR=y
1106CONFIG_SYSFS=y 1477CONFIG_SYSFS=y
1107CONFIG_TMPFS=y 1478CONFIG_TMPFS=y
1108# CONFIG_TMPFS_POSIX_ACL is not set 1479# CONFIG_TMPFS_POSIX_ACL is not set
1109# CONFIG_HUGETLBFS is not set 1480CONFIG_HUGETLBFS=y
1110# CONFIG_HUGETLB_PAGE is not set 1481CONFIG_HUGETLB_PAGE=y
1111# CONFIG_CONFIGFS_FS is not set 1482CONFIG_CONFIGFS_FS=y
1112CONFIG_MISC_FILESYSTEMS=y 1483CONFIG_MISC_FILESYSTEMS=y
1113# CONFIG_ADFS_FS is not set 1484# CONFIG_ADFS_FS is not set
1114# CONFIG_AFFS_FS is not set 1485# CONFIG_AFFS_FS is not set
@@ -1121,7 +1492,7 @@ CONFIG_MISC_FILESYSTEMS=y
1121# CONFIG_CRAMFS is not set 1492# CONFIG_CRAMFS is not set
1122# CONFIG_SQUASHFS is not set 1493# CONFIG_SQUASHFS is not set
1123# CONFIG_VXFS_FS is not set 1494# CONFIG_VXFS_FS is not set
1124CONFIG_MINIX_FS=y 1495# CONFIG_MINIX_FS is not set
1125# CONFIG_OMFS_FS is not set 1496# CONFIG_OMFS_FS is not set
1126# CONFIG_HPFS_FS is not set 1497# CONFIG_HPFS_FS is not set
1127# CONFIG_QNX4FS_FS is not set 1498# CONFIG_QNX4FS_FS is not set
@@ -1135,13 +1506,9 @@ CONFIG_NFS_V3=y
1135# CONFIG_NFS_V3_ACL is not set 1506# CONFIG_NFS_V3_ACL is not set
1136CONFIG_NFS_V4=y 1507CONFIG_NFS_V4=y
1137CONFIG_ROOT_NFS=y 1508CONFIG_ROOT_NFS=y
1138CONFIG_NFSD=y 1509# CONFIG_NFSD is not set
1139CONFIG_NFSD_V3=y
1140# CONFIG_NFSD_V3_ACL is not set
1141CONFIG_NFSD_V4=y
1142CONFIG_LOCKD=y 1510CONFIG_LOCKD=y
1143CONFIG_LOCKD_V4=y 1511CONFIG_LOCKD_V4=y
1144CONFIG_EXPORTFS=y
1145CONFIG_NFS_COMMON=y 1512CONFIG_NFS_COMMON=y
1146CONFIG_SUNRPC=y 1513CONFIG_SUNRPC=y
1147CONFIG_SUNRPC_GSS=y 1514CONFIG_SUNRPC_GSS=y
@@ -1204,46 +1571,74 @@ CONFIG_NLS_ISO8859_1=y
1204# Kernel hacking 1571# Kernel hacking
1205# 1572#
1206CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1573CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1207# CONFIG_PRINTK_TIME is not set 1574CONFIG_PRINTK_TIME=y
1208# CONFIG_ENABLE_WARN_DEPRECATED is not set 1575# CONFIG_ENABLE_WARN_DEPRECATED is not set
1209# CONFIG_ENABLE_MUST_CHECK is not set 1576# CONFIG_ENABLE_MUST_CHECK is not set
1210CONFIG_FRAME_WARN=1024 1577CONFIG_FRAME_WARN=1024
1211# CONFIG_MAGIC_SYSRQ is not set 1578# CONFIG_MAGIC_SYSRQ is not set
1212# CONFIG_UNUSED_SYMBOLS is not set 1579# CONFIG_UNUSED_SYMBOLS is not set
1213# CONFIG_DEBUG_FS is not set 1580CONFIG_DEBUG_FS=y
1214# CONFIG_HEADERS_CHECK is not set 1581# CONFIG_HEADERS_CHECK is not set
1215# CONFIG_DEBUG_KERNEL is not set 1582CONFIG_DEBUG_KERNEL=y
1216# CONFIG_DEBUG_BUGVERBOSE is not set 1583# CONFIG_DEBUG_SHIRQ is not set
1584CONFIG_DETECT_SOFTLOCKUP=y
1585# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1586CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1587CONFIG_DETECT_HUNG_TASK=y
1588# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1589CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1590CONFIG_SCHED_DEBUG=y
1591# CONFIG_SCHEDSTATS is not set
1592# CONFIG_TIMER_STATS is not set
1593# CONFIG_DEBUG_OBJECTS is not set
1594# CONFIG_DEBUG_SLAB is not set
1595# CONFIG_DEBUG_RT_MUTEXES is not set
1596# CONFIG_RT_MUTEX_TESTER is not set
1597# CONFIG_DEBUG_SPINLOCK is not set
1598# CONFIG_DEBUG_MUTEXES is not set
1599# CONFIG_DEBUG_LOCK_ALLOC is not set
1600# CONFIG_PROVE_LOCKING is not set
1601# CONFIG_LOCK_STAT is not set
1602# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1603# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1604# CONFIG_DEBUG_KOBJECT is not set
1605CONFIG_DEBUG_BUGVERBOSE=y
1606CONFIG_DEBUG_INFO=y
1607# CONFIG_DEBUG_VM is not set
1608# CONFIG_DEBUG_WRITECOUNT is not set
1217# CONFIG_DEBUG_MEMORY_INIT is not set 1609# CONFIG_DEBUG_MEMORY_INIT is not set
1610# CONFIG_DEBUG_LIST is not set
1611# CONFIG_DEBUG_SG is not set
1612# CONFIG_DEBUG_NOTIFIERS is not set
1613CONFIG_FRAME_POINTER=y
1614# CONFIG_RCU_TORTURE_TEST is not set
1218# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1615# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1616# CONFIG_BACKTRACE_SELF_TEST is not set
1617# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1618# CONFIG_FAULT_INJECTION is not set
1219# CONFIG_LATENCYTOP is not set 1619# CONFIG_LATENCYTOP is not set
1220CONFIG_SYSCTL_SYSCALL_CHECK=y 1620CONFIG_SYSCTL_SYSCALL_CHECK=y
1621# CONFIG_PAGE_POISONING is not set
1221CONFIG_HAVE_FUNCTION_TRACER=y 1622CONFIG_HAVE_FUNCTION_TRACER=y
1222CONFIG_HAVE_DYNAMIC_FTRACE=y 1623CONFIG_HAVE_DYNAMIC_FTRACE=y
1223CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1624CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1224CONFIG_TRACING_SUPPORT=y 1625CONFIG_TRACING_SUPPORT=y
1225 1626# CONFIG_FTRACE is not set
1226# 1627# CONFIG_DYNAMIC_DEBUG is not set
1227# Tracers
1228#
1229# CONFIG_FUNCTION_TRACER is not set
1230# CONFIG_IRQSOFF_TRACER is not set
1231# CONFIG_PREEMPT_TRACER is not set
1232# CONFIG_SCHED_TRACER is not set
1233# CONFIG_CONTEXT_SWITCH_TRACER is not set
1234# CONFIG_EVENT_TRACER is not set
1235# CONFIG_BOOT_TRACER is not set
1236# CONFIG_TRACE_BRANCH_PROFILING is not set
1237# CONFIG_STACK_TRACER is not set
1238# CONFIG_KMEMTRACE is not set
1239# CONFIG_WORKQUEUE_TRACER is not set
1240# CONFIG_BLK_DEV_IO_TRACE is not set
1241# CONFIG_DMA_API_DEBUG is not set 1628# CONFIG_DMA_API_DEBUG is not set
1242# CONFIG_SAMPLES is not set 1629# CONFIG_SAMPLES is not set
1243CONFIG_HAVE_ARCH_KGDB=y 1630CONFIG_HAVE_ARCH_KGDB=y
1631# CONFIG_KGDB is not set
1244# CONFIG_SH_STANDARD_BIOS is not set 1632# CONFIG_SH_STANDARD_BIOS is not set
1245# CONFIG_EARLY_SCIF_CONSOLE is not set 1633CONFIG_EARLY_SCIF_CONSOLE=y
1246# CONFIG_MORE_COMPILE_OPTIONS is not set 1634CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffeb0000
1635CONFIG_EARLY_PRINTK=y
1636# CONFIG_DEBUG_BOOTMEM is not set
1637# CONFIG_DEBUG_STACKOVERFLOW is not set
1638# CONFIG_DEBUG_STACK_USAGE is not set
1639# CONFIG_4KSTACKS is not set
1640# CONFIG_DUMP_CODE is not set
1641# CONFIG_SH_NO_BSS_INIT is not set
1247 1642
1248# 1643#
1249# Security options 1644# Security options
@@ -1303,7 +1698,7 @@ CONFIG_CRYPTO_HMAC=y
1303# 1698#
1304# Digest 1699# Digest
1305# 1700#
1306# CONFIG_CRYPTO_CRC32C is not set 1701CONFIG_CRYPTO_CRC32C=y
1307# CONFIG_CRYPTO_MD4 is not set 1702# CONFIG_CRYPTO_MD4 is not set
1308CONFIG_CRYPTO_MD5=y 1703CONFIG_CRYPTO_MD5=y
1309# CONFIG_CRYPTO_MICHAEL_MIC is not set 1704# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1356,13 +1751,18 @@ CONFIG_CRYPTO_DES=y
1356CONFIG_BITREVERSE=y 1751CONFIG_BITREVERSE=y
1357CONFIG_GENERIC_FIND_LAST_BIT=y 1752CONFIG_GENERIC_FIND_LAST_BIT=y
1358# CONFIG_CRC_CCITT is not set 1753# CONFIG_CRC_CCITT is not set
1359# CONFIG_CRC16 is not set 1754CONFIG_CRC16=y
1360# CONFIG_CRC_T10DIF is not set 1755# CONFIG_CRC_T10DIF is not set
1361# CONFIG_CRC_ITU_T is not set 1756# CONFIG_CRC_ITU_T is not set
1362CONFIG_CRC32=y 1757CONFIG_CRC32=y
1363# CONFIG_CRC7 is not set 1758# CONFIG_CRC7 is not set
1364# CONFIG_LIBCRC32C is not set 1759CONFIG_LIBCRC32C=y
1760CONFIG_AUDIT_GENERIC=y
1761CONFIG_ZLIB_INFLATE=y
1762CONFIG_ZLIB_DEFLATE=y
1763CONFIG_DECOMPRESS_GZIP=y
1365CONFIG_HAS_IOMEM=y 1764CONFIG_HAS_IOMEM=y
1366CONFIG_HAS_IOPORT=y 1765CONFIG_HAS_IOPORT=y
1367CONFIG_HAS_DMA=y 1766CONFIG_HAS_DMA=y
1368CONFIG_NLATTR=y 1767CONFIG_NLATTR=y
1768CONFIG_GENERIC_ATOMIC64=y
diff --git a/arch/sh/drivers/pci/Makefile b/arch/sh/drivers/pci/Makefile
index d2ffc477549a..08af1f459756 100644
--- a/arch/sh/drivers/pci/Makefile
+++ b/arch/sh/drivers/pci/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += pci-sh7751.o ops-sh4.o
8obj-$(CONFIG_CPU_SUBTYPE_SH7763) += pci-sh7780.o ops-sh4.o 8obj-$(CONFIG_CPU_SUBTYPE_SH7763) += pci-sh7780.o ops-sh4.o
9obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o 9obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7785) += pci-sh7780.o ops-sh4.o 10obj-$(CONFIG_CPU_SUBTYPE_SH7785) += pci-sh7780.o ops-sh4.o
11obj-$(CONFIG_CPU_SUBTYPE_SH7786) += ops-sh7786.o
11obj-$(CONFIG_CPU_SH5) += pci-sh5.o ops-sh5.o 12obj-$(CONFIG_CPU_SH5) += pci-sh5.o ops-sh5.o
12 13
13obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o \ 14obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o \
@@ -24,3 +25,4 @@ obj-$(CONFIG_SH_TITAN) += fixups-titan.o
24obj-$(CONFIG_SH_LANDISK) += fixups-landisk.o 25obj-$(CONFIG_SH_LANDISK) += fixups-landisk.o
25obj-$(CONFIG_SH_LBOX_RE2) += fixups-rts7751r2d.o 26obj-$(CONFIG_SH_LBOX_RE2) += fixups-rts7751r2d.o
26obj-$(CONFIG_SH_CAYMAN) += fixups-cayman.o 27obj-$(CONFIG_SH_CAYMAN) += fixups-cayman.o
28obj-$(CONFIG_SH_URQUELL) += pcie-sh7786.o
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c
index e83d0d3aabe2..16e0a1baad88 100644
--- a/arch/sh/drivers/pci/ops-dreamcast.c
+++ b/arch/sh/drivers/pci/ops-dreamcast.c
@@ -18,7 +18,6 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irq.h>
22#include <mach/pci.h> 21#include <mach/pci.h>
23 22
24/* 23/*
diff --git a/arch/sh/drivers/pci/ops-sh7786.c b/arch/sh/drivers/pci/ops-sh7786.c
new file mode 100644
index 000000000000..48f594b9582b
--- /dev/null
+++ b/arch/sh/drivers/pci/ops-sh7786.c
@@ -0,0 +1,134 @@
1/*
2 * Generic SH7786 PCI-Express operations.
3 *
4 * Copyright (C) 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License v2. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/pci.h>
13#include <linux/io.h>
14#include <linux/spinlock.h>
15#include "pcie-sh7786.h"
16
17enum {
18 PCI_ACCESS_READ,
19 PCI_ACCESS_WRITE,
20};
21
22static DEFINE_SPINLOCK(sh7786_pcie_lock);
23
24static int sh7786_pcie_config_access(unsigned char access_type,
25 struct pci_bus *bus, unsigned int devfn, int where, u32 *data)
26{
27 struct pci_channel *chan = bus->sysdata;
28 int dev, func;
29
30 dev = PCI_SLOT(devfn);
31 func = PCI_FUNC(devfn);
32
33 if (bus->number > 255 || dev > 31 || func > 7)
34 return PCIBIOS_FUNC_NOT_SUPPORTED;
35 if (devfn)
36 return PCIBIOS_DEVICE_NOT_FOUND;
37
38 /* Set the PIO address */
39 pci_write_reg(chan, (bus->number << 24) | (dev << 19) |
40 (func << 16) | (where & ~3), SH4A_PCIEPAR);
41
42 /* Enable the configuration access */
43 pci_write_reg(chan, (1 << 31), SH4A_PCIEPCTLR);
44
45 if (access_type == PCI_ACCESS_READ)
46 *data = pci_read_reg(chan, SH4A_PCIEPDR);
47 else
48 pci_write_reg(chan, *data, SH4A_PCIEPDR);
49
50 /* Check for master and target aborts */
51 if (pci_read_reg(chan, SH4A_PCIEPCICONF1) & ((1 << 29) | (1 << 28)))
52 return PCIBIOS_DEVICE_NOT_FOUND;
53
54 return PCIBIOS_SUCCESSFUL;
55}
56
57static int sh7786_pcie_read(struct pci_bus *bus, unsigned int devfn,
58 int where, int size, u32 *val)
59{
60 unsigned long flags;
61 int ret;
62 u32 data;
63
64 if ((size == 2) && (where & 1))
65 return PCIBIOS_BAD_REGISTER_NUMBER;
66 else if ((size == 4) && (where & 3))
67 return PCIBIOS_BAD_REGISTER_NUMBER;
68
69 spin_lock_irqsave(&sh7786_pcie_lock, flags);
70 ret = sh7786_pcie_config_access(PCI_ACCESS_READ, bus,
71 devfn, where, &data);
72 if (ret != PCIBIOS_SUCCESSFUL)
73 goto out;
74
75 if (size == 1)
76 *val = (data >> ((where & 3) << 3)) & 0xff;
77 else if (size == 2)
78 *val = (data >> ((where & 2) << 3)) & 0xffff;
79 else
80 *val = data;
81
82 dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x "
83 "where=0x%04x size=%d val=0x%08lx\n", bus->number,
84 devfn, where, size, (unsigned long)*val);
85
86out:
87 spin_unlock_irqrestore(&sh7786_pcie_lock, flags);
88 return ret;
89}
90
91static int sh7786_pcie_write(struct pci_bus *bus, unsigned int devfn,
92 int where, int size, u32 val)
93{
94 unsigned long flags;
95 int shift, ret;
96 u32 data;
97
98 if ((size == 2) && (where & 1))
99 return PCIBIOS_BAD_REGISTER_NUMBER;
100 else if ((size == 4) && (where & 3))
101 return PCIBIOS_BAD_REGISTER_NUMBER;
102
103 spin_lock_irqsave(&sh7786_pcie_lock, flags);
104 ret = sh7786_pcie_config_access(PCI_ACCESS_READ, bus,
105 devfn, where, &data);
106 if (ret != PCIBIOS_SUCCESSFUL)
107 goto out;
108
109 dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x "
110 "where=0x%04x size=%d val=%08lx\n", bus->number,
111 devfn, where, size, (unsigned long)val);
112
113 if (size == 1) {
114 shift = (where & 3) << 3;
115 data &= ~(0xff << shift);
116 data |= ((val & 0xff) << shift);
117 } else if (size == 2) {
118 shift = (where & 2) << 3;
119 data &= ~(0xffff << shift);
120 data |= ((val & 0xffff) << shift);
121 } else
122 data = val;
123
124 ret = sh7786_pcie_config_access(PCI_ACCESS_WRITE, bus,
125 devfn, where, &data);
126out:
127 spin_unlock_irqrestore(&sh7786_pcie_lock, flags);
128 return ret;
129}
130
131struct pci_ops sh7786_pci_ops = {
132 .read = sh7786_pcie_read,
133 .write = sh7786_pcie_write,
134};
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 54d77cbb8b39..9a1c423ad167 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -53,12 +53,8 @@ static DEFINE_MUTEX(pci_scan_mutex);
53 53
54void __devinit register_pci_controller(struct pci_channel *hose) 54void __devinit register_pci_controller(struct pci_channel *hose)
55{ 55{
56 if (request_resource(&iomem_resource, hose->mem_resource) < 0) 56 request_resource(&iomem_resource, hose->mem_resource);
57 goto out; 57 request_resource(&ioport_resource, hose->io_resource);
58 if (request_resource(&ioport_resource, hose->io_resource) < 0) {
59 release_resource(hose->mem_resource);
60 goto out;
61 }
62 58
63 *hose_tail = hose; 59 *hose_tail = hose;
64 hose_tail = &hose->next; 60 hose_tail = &hose->next;
@@ -80,12 +76,6 @@ void __devinit register_pci_controller(struct pci_channel *hose)
80 pcibios_scanbus(hose); 76 pcibios_scanbus(hose);
81 mutex_unlock(&pci_scan_mutex); 77 mutex_unlock(&pci_scan_mutex);
82 } 78 }
83
84 return;
85
86out:
87 printk(KERN_WARNING
88 "Skipping PCI bus scan due to resource conflict\n");
89} 79}
90 80
91static int __init pcibios_init(void) 81static int __init pcibios_init(void)
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c
new file mode 100644
index 000000000000..ac37ee879bab
--- /dev/null
+++ b/arch/sh/drivers/pci/pcie-sh7786.c
@@ -0,0 +1,355 @@
1/*
2 * Low-Level PCI Express Support for the SH7786
3 *
4 * Copyright (C) 2009 Paul Mundt
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#include <linux/pci.h>
11#include <linux/init.h>
12#include <linux/kernel.h>
13#include <linux/io.h>
14#include <linux/delay.h>
15#include "pcie-sh7786.h"
16#include <asm/sizes.h>
17
18struct sh7786_pcie_port {
19 struct pci_channel *hose;
20 unsigned int index;
21 int endpoint;
22 int link;
23};
24
25static struct sh7786_pcie_port *sh7786_pcie_ports;
26static unsigned int nr_ports;
27
28static struct sh7786_pcie_hwops {
29 int (*core_init)(void);
30 int (*port_init_hw)(struct sh7786_pcie_port *port);
31} *sh7786_pcie_hwops;
32
33static struct resource sh7786_pci_32bit_mem_resources[] = {
34 {
35 .name = "pci0_mem",
36 .start = SH4A_PCIMEM_BASEA,
37 .end = SH4A_PCIMEM_BASEA + SZ_64M - 1,
38 .flags = IORESOURCE_MEM,
39 }, {
40 .name = "pci1_mem",
41 .start = SH4A_PCIMEM_BASEA1,
42 .end = SH4A_PCIMEM_BASEA1 + SZ_64M - 1,
43 .flags = IORESOURCE_MEM,
44 }, {
45 .name = "pci2_mem",
46 .start = SH4A_PCIMEM_BASEA2,
47 .end = SH4A_PCIMEM_BASEA2 + SZ_64M - 1,
48 .flags = IORESOURCE_MEM,
49 },
50};
51
52static struct resource sh7786_pci_29bit_mem_resource = {
53 .start = SH4A_PCIMEM_BASE,
54 .end = SH4A_PCIMEM_BASE + SZ_64M - 1,
55 .flags = IORESOURCE_MEM,
56};
57
58static struct resource sh7786_pci_io_resources[] = {
59 {
60 .name = "pci0_io",
61 .start = SH4A_PCIIO_BASE,
62 .end = SH4A_PCIIO_BASE + SZ_8M - 1,
63 .flags = IORESOURCE_IO,
64 }, {
65 .name = "pci1_io",
66 .start = SH4A_PCIIO_BASE1,
67 .end = SH4A_PCIIO_BASE1 + SZ_8M - 1,
68 .flags = IORESOURCE_IO,
69 }, {
70 .name = "pci2_io",
71 .start = SH4A_PCIIO_BASE2,
72 .end = SH4A_PCIIO_BASE2 + SZ_4M - 1,
73 .flags = IORESOURCE_IO,
74 },
75};
76
77extern struct pci_ops sh7786_pci_ops;
78
79#define DEFINE_CONTROLLER(start, idx) \
80{ \
81 .pci_ops = &sh7786_pci_ops, \
82 .reg_base = start, \
83 /* mem_resource filled in at probe time */ \
84 .mem_offset = 0, \
85 .io_resource = &sh7786_pci_io_resources[idx], \
86 .io_offset = 0, \
87}
88
89static struct pci_channel sh7786_pci_channels[] = {
90 DEFINE_CONTROLLER(0xfe000000, 0),
91 DEFINE_CONTROLLER(0xfe200000, 1),
92 DEFINE_CONTROLLER(0xfcc00000, 2),
93};
94
95static int phy_wait_for_ack(struct pci_channel *chan)
96{
97 unsigned int timeout = 100;
98
99 while (timeout--) {
100 if (pci_read_reg(chan, SH4A_PCIEPHYADRR) & (1 << BITS_ACK))
101 return 0;
102
103 udelay(100);
104 }
105
106 return -ETIMEDOUT;
107}
108
109static int pci_wait_for_irq(struct pci_channel *chan, unsigned int mask)
110{
111 unsigned int timeout = 100;
112
113 while (timeout--) {
114 if ((pci_read_reg(chan, SH4A_PCIEINTR) & mask) == mask)
115 return 0;
116
117 udelay(100);
118 }
119
120 return -ETIMEDOUT;
121}
122
123static void phy_write_reg(struct pci_channel *chan, unsigned int addr,
124 unsigned int lane, unsigned int data)
125{
126 unsigned long phyaddr, ctrl;
127
128 phyaddr = (1 << BITS_CMD) + ((lane & 0xf) << BITS_LANE) +
129 ((addr & 0xff) << BITS_ADR);
130
131 /* Enable clock */
132 ctrl = pci_read_reg(chan, SH4A_PCIEPHYCTLR);
133 ctrl |= (1 << BITS_CKE);
134 pci_write_reg(chan, ctrl, SH4A_PCIEPHYCTLR);
135
136 /* Set write data */
137 pci_write_reg(chan, data, SH4A_PCIEPHYDOUTR);
138 pci_write_reg(chan, phyaddr, SH4A_PCIEPHYADRR);
139
140 phy_wait_for_ack(chan);
141
142 /* Clear command */
143 pci_write_reg(chan, 0, SH4A_PCIEPHYADRR);
144
145 phy_wait_for_ack(chan);
146
147 /* Disable clock */
148 ctrl = pci_read_reg(chan, SH4A_PCIEPHYCTLR);
149 ctrl &= ~(1 << BITS_CKE);
150 pci_write_reg(chan, ctrl, SH4A_PCIEPHYCTLR);
151}
152
153static int phy_init(struct pci_channel *chan)
154{
155 unsigned int timeout = 100;
156
157 /* Initialize the phy */
158 phy_write_reg(chan, 0x60, 0xf, 0x004b008b);
159 phy_write_reg(chan, 0x61, 0xf, 0x00007b41);
160 phy_write_reg(chan, 0x64, 0xf, 0x00ff4f00);
161 phy_write_reg(chan, 0x65, 0xf, 0x09070907);
162 phy_write_reg(chan, 0x66, 0xf, 0x00000010);
163 phy_write_reg(chan, 0x74, 0xf, 0x0007001c);
164 phy_write_reg(chan, 0x79, 0xf, 0x01fc000d);
165
166 /* Deassert Standby */
167 phy_write_reg(chan, 0x67, 0xf, 0x00000400);
168
169 while (timeout--) {
170 if (pci_read_reg(chan, SH4A_PCIEPHYSR))
171 return 0;
172
173 udelay(100);
174 }
175
176 return -ETIMEDOUT;
177}
178
179static int pcie_init(struct sh7786_pcie_port *port)
180{
181 struct pci_channel *chan = port->hose;
182 unsigned int data;
183 int ret;
184
185 /* Begin initialization */
186 pci_write_reg(chan, 0, SH4A_PCIETCTLR);
187
188 /* Initialize as type1. */
189 data = pci_read_reg(chan, SH4A_PCIEPCICONF3);
190 data &= ~(0x7f << 16);
191 data |= PCI_HEADER_TYPE_BRIDGE << 16;
192 pci_write_reg(chan, data, SH4A_PCIEPCICONF3);
193
194 /* Initialize default capabilities. */
195 data = pci_read_reg(chan, SH4A_PCIEEXPCAP0);
196 data &= ~(PCI_EXP_FLAGS_TYPE << 16);
197
198 if (port->endpoint)
199 data |= PCI_EXP_TYPE_ENDPOINT << 20;
200 else
201 data |= PCI_EXP_TYPE_ROOT_PORT << 20;
202
203 data |= PCI_CAP_ID_EXP;
204 pci_write_reg(chan, data, SH4A_PCIEEXPCAP0);
205
206 /* Enable x4 link width and extended sync. */
207 data = pci_read_reg(chan, SH4A_PCIEEXPCAP4);
208 data &= ~(PCI_EXP_LNKSTA_NLW << 16);
209 data |= (1 << 22) | PCI_EXP_LNKCTL_ES;
210 pci_write_reg(chan, data, SH4A_PCIEEXPCAP4);
211
212 /* Set the completion timer timeout to the maximum 32ms. */
213 data = pci_read_reg(chan, SH4A_PCIETLCTLR);
214 data &= ~0xffff;
215 data |= 0x32 << 8;
216 pci_write_reg(chan, data, SH4A_PCIETLCTLR);
217
218 /*
219 * Set fast training sequences to the maximum 255,
220 * and enable MAC data scrambling.
221 */
222 data = pci_read_reg(chan, SH4A_PCIEMACCTLR);
223 data &= ~PCIEMACCTLR_SCR_DIS;
224 data |= (0xff << 16);
225 pci_write_reg(chan, data, SH4A_PCIEMACCTLR);
226
227 /* Finish initialization */
228 data = pci_read_reg(chan, SH4A_PCIETCTLR);
229 data |= 0x1;
230 pci_write_reg(chan, data, SH4A_PCIETCTLR);
231
232 /* Enable DL_Active Interrupt generation */
233 data = pci_read_reg(chan, SH4A_PCIEDLINTENR);
234 data |= PCIEDLINTENR_DLL_ACT_ENABLE;
235 pci_write_reg(chan, data, SH4A_PCIEDLINTENR);
236
237 /* Disable MAC data scrambling. */
238 data = pci_read_reg(chan, SH4A_PCIEMACCTLR);
239 data |= PCIEMACCTLR_SCR_DIS | (0xff << 16);
240 pci_write_reg(chan, data, SH4A_PCIEMACCTLR);
241
242 ret = pci_wait_for_irq(chan, MASK_INT_TX_CTRL);
243 if (unlikely(ret != 0))
244 return -ENODEV;
245
246 pci_write_reg(chan, 0x00100007, SH4A_PCIEPCICONF1);
247 pci_write_reg(chan, 0x80888000, SH4A_PCIETXVC0DCTLR);
248 pci_write_reg(chan, 0x00222000, SH4A_PCIERXVC0DCTLR);
249 pci_write_reg(chan, 0x000050A0, SH4A_PCIEEXPCAP2);
250
251 wmb();
252
253 data = pci_read_reg(chan, SH4A_PCIEMACSR);
254 printk(KERN_NOTICE "PCI: PCIe#%d link width %d\n",
255 port->index, (data >> 20) & 0x3f);
256
257 pci_write_reg(chan, 0x007c0000, SH4A_PCIEPAMR0);
258 pci_write_reg(chan, 0x00000000, SH4A_PCIEPARH0);
259 pci_write_reg(chan, 0x00000000, SH4A_PCIEPARL0);
260 pci_write_reg(chan, 0x80000100, SH4A_PCIEPTCTLR0);
261
262 pci_write_reg(chan, 0x03fc0000, SH4A_PCIEPAMR2);
263 pci_write_reg(chan, 0x00000000, SH4A_PCIEPARH2);
264 pci_write_reg(chan, 0x00000000, SH4A_PCIEPARL2);
265 pci_write_reg(chan, 0x80000000, SH4A_PCIEPTCTLR2);
266
267 return 0;
268}
269
270int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
271{
272 return 71;
273}
274
275static int sh7786_pcie_core_init(void)
276{
277 /* Return the number of ports */
278 return test_mode_pin(MODE_PIN12) ? 3 : 2;
279}
280
281static int __devinit sh7786_pcie_init_hw(struct sh7786_pcie_port *port)
282{
283 int ret;
284
285 ret = phy_init(port->hose);
286 if (unlikely(ret < 0))
287 return ret;
288
289 /*
290 * Check if we are configured in endpoint or root complex mode,
291 * this is a fixed pin setting that applies to all PCIe ports.
292 */
293 port->endpoint = test_mode_pin(MODE_PIN11);
294
295 ret = pcie_init(port);
296 if (unlikely(ret < 0))
297 return ret;
298
299 register_pci_controller(port->hose);
300
301 return 0;
302}
303
304static struct sh7786_pcie_hwops sh7786_65nm_pcie_hwops __initdata = {
305 .core_init = sh7786_pcie_core_init,
306 .port_init_hw = sh7786_pcie_init_hw,
307};
308
309static int __init sh7786_pcie_init(void)
310{
311 int ret = 0, i;
312
313 printk(KERN_NOTICE "PCI: Starting intialization.\n");
314
315 sh7786_pcie_hwops = &sh7786_65nm_pcie_hwops;
316
317 nr_ports = sh7786_pcie_hwops->core_init();
318 BUG_ON(nr_ports > ARRAY_SIZE(sh7786_pci_channels));
319
320 if (unlikely(nr_ports == 0))
321 return -ENODEV;
322
323 sh7786_pcie_ports = kzalloc(nr_ports * sizeof(struct sh7786_pcie_port),
324 GFP_KERNEL);
325 if (unlikely(!sh7786_pcie_ports))
326 return -ENOMEM;
327
328 printk(KERN_NOTICE "PCI: probing %d ports.\n", nr_ports);
329
330 for (i = 0; i < nr_ports; i++) {
331 struct sh7786_pcie_port *port = sh7786_pcie_ports + i;
332
333 port->index = i;
334 port->hose = sh7786_pci_channels + i;
335 port->hose->io_map_base = port->hose->io_resource->start;
336
337 /*
338 * Check if we are booting in 29 or 32-bit mode
339 *
340 * 32-bit mode provides each controller with its own
341 * memory window, while 29-bit mode uses a shared one.
342 */
343 port->hose->mem_resource = test_mode_pin(MODE_PIN10) ?
344 &sh7786_pci_32bit_mem_resources[i] :
345 &sh7786_pci_29bit_mem_resource;
346
347 ret |= sh7786_pcie_hwops->port_init_hw(port);
348 }
349
350 if (unlikely(ret))
351 return ret;
352
353 return 0;
354}
355arch_initcall(sh7786_pcie_init);
diff --git a/arch/sh/drivers/pci/pcie-sh7786.h b/arch/sh/drivers/pci/pcie-sh7786.h
new file mode 100644
index 000000000000..c655290a7750
--- /dev/null
+++ b/arch/sh/drivers/pci/pcie-sh7786.h
@@ -0,0 +1,589 @@
1/*
2 * SH7786 PCI-Express controller definitions.
3 *
4 * Copyright (C) 2008, 2009 Renesas Technology Corp.
5 * All rights reserved.
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11#ifndef __PCI_SH7786_H
12#define __PCI_SH7786_H
13
14/* PCIe bus-0(x4) on SH7786 */ // Rev1.171
15#define SH4A_PCIE_SPW_BASE 0xFE000000 /* spw config address for controller 0 */
16#define SH4A_PCIE_SPW_BASE1 0xFE200000 /* spw config address for controller 1 (Rev1.14)*/
17#define SH4A_PCIE_SPW_BASE2 0xFCC00000 /* spw config address for controller 2 (Rev1.171)*/
18#define SH4A_PCIE_SPW_BASE_LEN 0x00080000
19
20#define SH4A_PCI_CNFG_BASE 0xFE040000 /* pci config address for controller 0 */
21#define SH4A_PCI_CNFG_BASE1 0xFE240000 /* pci config address for controller 1 (Rev1.14)*/
22#define SH4A_PCI_CNFG_BASE2 0xFCC40000 /* pci config address for controller 2 (Rev1.171)*/
23#define SH4A_PCI_CNFG_BASE_LEN 0x00040000
24
25#define SH4A_PCIPIO_ADDR_OFFSET 0x000001c0 /* offset to pci config_address */
26#define SH4A_PCIPIO_DATA_OFFSET 0x00000220 /* offset to pci config_data */
27
28/*
29 * for PEX8111(Max Payload Size=128B,PCIIO_SIZE=64K),
30 * for other(Max Payload Size=4096B,PCIIO_SIZE=8M)
31 */
32
33/* PCI0-0: PCI I/O space */
34#define SH4A_PCIIO_BASE 0xFD000000 /* PCI I/O for controller 0 */
35#define SH4A_PCIIO_BASE1 0xFD800000 /* PCI I/O for controller 1 (Rev1.14)*/
36#define SH4A_PCIIO_BASE2 0xFC800000 /* PCI I/O for controller 2 (Rev1.171)*/
37
38#define SH4A_PCIIO_SIZE64 0x00010000 /* PLX allows only 64K */
39#define SH4A_PCIIO_SIZE 0x00800000 /* 8M */
40#define SH4A_PCIIO_SIZE2 0x00400000 /* 4M (Rev1.171)*/
41
42/* PCI0-1: PCI memory space 29-bit address */
43#define SH4A_PCIMEM_BASE 0x10000000
44#define SH4A_PCIMEM_SIZE 0x04000000 /* 64M */
45
46/* PCI0-2: PCI memory space 32-bit address */
47#define SH4A_PCIMEM_BASEA 0xC0000000 /* for controller 0 */
48#define SH4A_PCIMEM_BASEA1 0xA0000000 /* for controller 1 (Rev1.14)*/
49#define SH4A_PCIMEM_BASEA2 0x80000000 /* for controller 2 (Rev1.171)*/
50#define SH4A_PCIMEM_SIZEA 0x20000000 /* 512M */
51
52/* PCI0: PCI memory target transfer 32-bit address translation value(Rev1.11T)*/
53#define SH4A_PCIBMSTR_TRANSLATION 0x20000000
54
55#define SH4A_PCI_DEVICE_ID 0x0002
56#define SH4A_PCI_VENDOR_ID 0x1912
57
58// PCI compatible 000-03f
59#define PCI_CMD 0x004
60#define PCI_RID 0x008
61#define PCI_IBAR 0x010
62#define PCI_MBAR0 0x014
63#define PCI_MBAR1 0x018
64
65/* PCI power management/MSI/capablity 040-0ff */
66/* PCIE extended 100-fff */
67
68/* SH7786 device identification */ // Rev1.171
69#define SH4A_PVR (0xFF000030)
70#define SH4A_PVR_SHX3 (0x10400000)
71#define SH4A_PRR (0xFF000044)
72#define SH4A_PRR_SH7786 (0x00000400) // Rev1.171
73
74/* SPVCR0 */
75#define SH4A_PCIEVCR0 (0x000000) /* R - 0x0000 0000 32 */
76#define BITS_TOP_MB (24)
77#define MASK_TOP_MB (0xff<<BITS_TOP_MB)
78#define BITS_BOT_MB (16)
79#define MASK_BOT_MB (0xff<<BITS_BOT_MB)
80#define BITS_VC_ID (0)
81#define MASK_VC_ID (0xffff<<BITS_VC_ID)
82
83/* SPVCR1 */
84#define SH4A_PCIEVCR1 (0x000004) /* R - 0x0000 0000 32*/
85#define BITS_BADOPC (5) /* 5 BADOPC 0 R/W */
86#define MASK_BADOPC (1<<BITS_BADOPC)
87#define BITS_BADDEST (4) /*4 BADDEST 0 R/W */
88#define MASK_BADDEST (1<<BITS_BADDEST)
89#define BITS_UNSOLRESP (3) /* 3 UNSOLRESP 0 R/W */
90#define MASK_UNSOLRESP (1<<BITS_UNSOLRESP)
91#define BITS_ERRSNT (1) /* 1 ERRSNT 0 */
92#define MASK_ERRSNT (1<<BITS_ERRSNT)
93#define BITS_ERRRCV (0) /* 0 ERRRCV 0 */
94#define MASK_ERRRCV (1<<BITS_ERRRCV)
95
96/* PCIEECR */
97#define SH4A_PCIEECR (0x000008) /* R/W - 0x0000 0000 32 */
98#define BITS_ENBL (0) /* 0 ENBL 0 R/W */
99#define MASK_ENBL (1<<BITS_ENBL)
100
101/* PCIEPAR */
102#define SH4A_PCIEPAR (0x000010) /* R/W - 0x0000 0000 32 */
103#define BITS_BN (24)
104#define MASK_BN (0xff<<BITS_BN)
105#define BITS_DN (19)
106#define MASK_DN (0x1f<<BITS_DN)
107#define BITS_FN (16)
108#define MASK_FN (0x7<<BITS_FN)
109#define BITS_EREGNO (8)
110#define MASK_EREGNO (0xff<<BITS_EREGNO)
111#define BITS_REGNO (2)
112#define MASK_REGNO (0x3f<<BITS_REGNO)
113
114/* PCIEPCTLR */
115#define SH4A_PCIEPCTLR (0x000018) /* R/W - 0x0000 0000 32 */
116#define BITS_CCIE (31) /* 31 CCIE */
117#define MASK_CCIE (1<<BITS_CCIE)
118#define BITS_TYPE (8)
119#define MASK_TYPE (1<<BITS_TYPE)
120#define BITS_C_VC (0)
121#define MASK_C_VC (1<<BITS_C_VC)
122
123/* PCIEPDR */
124#define SH4A_PCIEPDR (0x000020) /* R/W - 0x0000 0000 32 */
125#define BITS_PDR (0)
126#define MASK_PDR (0xffffffff<<BITS_PDR)
127
128/* PCIEMSGALR */
129#define SH4A_PCIEMSGALR (0x000030) /* R/W - 0x0000 0000 32 */
130#define BITS_MSGADRL (0)
131#define MASK_MSGADRL (0xffffffff<<BITS_MSGADRL)
132
133/* PCIEMSGAHR */
134#define SH4A_PCIEMSGAHR (0x000034) /* R/W - 0x0000 0000 32 */
135#define BITS_MSGADRH (0)
136#define MASK_MSGADRH (0xffffffff<<BITS_MSGADRH)
137
138/* PCIEMSGCTLR */
139#define SH4A_PCIEMSGCTLR (0x000038) /* R/W - 0x0000 0000 32 */
140#define BITS_MSGIE (31)
141#define MASK_MSGIE (1<<BITS_MSGIE)
142#define BITS_MROUTE (16)
143#define MASK_MROUTE (0x7<<BITS_MROUTE)
144#define BITS_MCODE (8)
145#define MASK_MCODE (0xff<<BITS_MCODE)
146#define BITS_M_VC (0)
147#define MASK_M_VC (1<<BITS_M_VC)
148
149/* PCIEMSG */
150#define SH4A_PCIEMSG (0x000040) /* W - - 32 */
151#define BITS_MDATA (0)
152#define MASK_MDATA (0xffffffff<<BITS_MDATA)
153
154/* PCIEPHYCTLR */
155#define SH4A_PCIEPHYCTLR (0x010000) /* R/W - 0x0000 0000 32 */
156#define BITS_CKE (0)
157#define MASK_CKE (1<<BITS_CKE)
158
159/* PCIERMSGIER */
160#define SH4A_PCIERMSGIER (0x004040) /* R/W - 0x0000 0000 32 */
161
162/* PCIEPHYADRR */
163#define SH4A_PCIEPHYADRR (0x010004) /* R/W - 0x0000 0000 32 */
164#define BITS_ACK (24) // Rev1.171
165#define MASK_ACK (1<<BITS_ACK) // Rev1.171
166#define BITS_CMD (16) // Rev1.171
167#define MASK_CMD (0x03<<BITS_CMD) // Rev1.171
168#define BITS_LANE (8)
169#define MASK_LANE (0x0f<<BITS_LANE)
170#define BITS_ADR (0)
171#define MASK_ADR (0xff<<BITS_ADR)
172
173/* PCIEPHYDINR */ // Rev1.171 start.
174#define SH4A_PCIEPHYDINR (0x010008) /* R/W - 0x0000 0000 32 */
175
176/* PCIEPHYDOUTR */
177#define SH4A_PCIEPHYDOUTR (0x01000C) /* R/W - 0x0000 0000 32 */
178
179/* PCIEPHYSR */
180#define SH4A_PCIEPHYSR (0x010010) /* R/W - 0x0000 0000 32 */ // Rev1.171 end.
181
182/* PCIEPHYDATAR */
183#define SH4A_PCIEPHYDATAR (0x00008) /* R/W - 0xxxxx xxxx 32 */
184#define BITS_DATA (0)
185#define MASK_DATA (0xffffffff<<BITS_DATA)
186
187/* PCIETCTLR */
188#define SH4A_PCIETCTLR (0x020000) /* R/W R/W 0x0000 0000 32 */
189#define BITS_CFINT (0)
190#define MASK_CFINT (1<<BITS_CFINT)
191
192/* PCIETSTR */
193#define SH4A_PCIETSTR (0x020004) /* R/W R/W 0x0000 0000 32 */
194
195/* PCIEINTR */
196#define SH4A_PCIEINTR (0x020008) /* R/W R/W 0x0000 0000 32 */
197#define BITS_INT_RX_ERP (31)
198#define MASK_INT_RX_ERP (1<<BITS_INT_RX_ERP)
199#define BITS_INT_RX_VCX_Posted (30)
200#define MASK_INT_RX_VCX_Posted (1<<BITS_INT_RX_VCX_Posted)
201#define BITS_INT_RX_VCX_NonPosted (29)
202#define MASK_INT_RX_VCX_NonPosted (1<<BITS_INT_RX_VCX_NonPosted)
203#define BITS_INT_RX_VCX_CPL (28)
204#define MASK_INT_RX_VCX_CPL (1<<BITS_INT_RX_VCX_CPL)
205#define BITS_INT_TX_VCX_Posted (26)
206#define MASK_INT_TX_VCX_Posted (1<<BITS_INT_TX_VCX_Posted)
207#define BITS_INT_TX_VCX_NonPosted (25)
208#define MASK_INT_TX_VCX_NonPosted (1<<BITS_INT_TX_VCX_NonPosted)
209#define BITS_INT_TX_VCX_CPL (24)
210#define MASK_INT_TX_VCX_CPL (1<<BITS_INT_TX_VCX_CPL)
211#define BITS_INT_RX_VC0_Posted (22)
212#define MASK_INT_RX_VC0_Posted (1<<BITS_INT_RX_VC0_Posted)
213#define BITS_INT_RX_VC0_NonPosted (21)
214#define MASK_INT_RX_VC0_NonPosted (1<<BITS_INT_RX_VC0_NonPosted)
215#define BITS_INT_RX_VC0_CPL (20)
216#define MASK_INT_RX_VC0_CPL (1<<BITS_INT_RX_VC0_CPL)
217#define BITS_INT_TX_VC0_Posted (18)
218#define MASK_INT_TX_VC0_Posted (1<<BITS_INT_TX_VC0_Posted)
219#define BITS_INT_TX_VC0_NonPosted (17)
220#define MASK_INT_TX_VC0_NonPosted (1<<BITS_INT_TX_VC0_NonPosted)
221#define BITS_INT_TX_VC0_CPL (16)
222#define MASK_INT_TX_VC0_CPL (1<<BITS_INT_TX_VC0_CPL)
223#define BITS_INT_RX_CTRL (15)
224#define MASK_INT_RX_CTRL (1<<BITS_INT_RX_CTRL)
225#define BITS_INT_TX_CTRL (14)
226#define MASK_INT_TX_CTRL (1<<BITS_INT_TX_CTRL)
227#define BITS_INTTL (11)
228#define MASK_INTTL (1<<BITS_INTTL)
229#define BITS_INTDL (10)
230#define MASK_INTDL (1<<BITS_INTDL)
231#define BITS_INTMAC (9)
232#define MASK_INTMAC (1<<BITS_INTMAC)
233#define BITS_INTPM (8)
234#define MASK_INTPM (1<<BITS_INTPM)
235
236/* PCIEINTER */
237#define SH4A_PCIEINTER (0x02000C) /* R/W R/W 0x0000 0000 32 */
238#define BITS_INT_RX_ERP (31)
239#define MASK_INT_RX_ERP (1<<BITS_INT_RX_ERP)
240#define BITS_INT_RX_VCX_Posted (30)
241#define MASK_INT_RX_VCX_Posted (1<<BITS_INT_RX_VCX_Posted)
242#define BITS_INT_RX_VCX_NonPosted (29)
243#define MASK_INT_RX_VCX_NonPosted (1<<BITS_INT_RX_VCX_NonPosted)
244#define BITS_INT_RX_VCX_CPL (28)
245#define MASK_INT_RX_VCX_CPL (1<<BITS_INT_RX_VCX_CPL)
246#define BITS_INT_TX_VCX_Posted (26)
247#define MASK_INT_TX_VCX_Posted (1<<BITS_INT_TX_VCX_Posted)
248#define BITS_INT_TX_VCX_NonPosted (25)
249#define MASK_INT_TX_VCX_NonPosted (1<<BITS_INT_TX_VCX_NonPosted)
250#define BITS_INT_TX_VCX_CPL (24)
251#define MASK_INT_TX_VCX_CPL (1<<BITS_INT_TX_VCX_CPL)
252#define BITS_INT_RX_VC0_Posted (22)
253#define MASK_INT_RX_VC0_Posted (1<<BITS_INT_RX_VC0_Posted)
254#define BITS_INT_RX_VC0_NonPosted (21)
255#define MASK_INT_RX_VC0_NonPosted (1<<BITS_INT_RX_VC0_NonPosted)
256#define BITS_INT_RX_VC0_CPL (20)
257#define MASK_INT_RX_VC0_CPL (1<<BITS_INT_RX_VC0_CPL)
258#define BITS_INT_TX_VC0_Posted (18)
259#define MASK_INT_TX_VC0_Posted (1<<BITS_INT_TX_VC0_Posted)
260#define BITS_INT_TX_VC0_NonPosted (17)
261#define MASK_INT_TX_VC0_NonPosted (1<<BITS_INT_TX_VC0_NonPosted)
262#define BITS_INT_TX_VC0_CPL (16)
263#define MASK_INT_TX_VC0_CPL (1<<BITS_INT_TX_VC0_CPL)
264#define BITS_INT_RX_CTRL (15)
265#define MASK_INT_RX_CTRL (1<<BITS_INT_RX_CTRL)
266#define BITS_INT_TX_CTRL (14)
267#define MASK_INT_TX_CTRL (1<<BITS_INT_TX_CTRL)
268#define BITS_INTTL (11)
269#define MASK_INTTL (1<<BITS_INTTL)
270#define BITS_INTDL (10)
271#define MASK_INTDL (1<<BITS_INTDL)
272#define BITS_INTMAC (9)
273#define MASK_INTMAC (1<<BITS_INTMAC)
274#define BITS_INTPM (8)
275#define MASK_INTPM (1<<BITS_INTPM)
276
277/* PCIEAIR */
278#define SH4A_PCIEAIR (SH4A_PCIE_BASE + 0x020010) /* R/W R/W 0xxxxx xxxx 32 */
279
280/* PCIECIR */
281#define SH4A_PCIECIR (SH4A_PCIE_BASE) /* R/W R/W 0xxxxx xxxx 32 */
282
283/* PCIEERRFR */ // Rev1.18
284#define SH4A_PCIEERRFR (0x020020) /* R/W R/W 0xxxxx xxxx 32 */ // Rev1.18
285 // Rev1.18
286/* PCIELAR0 */
287#define SH4A_PCIELAR0 (0x020200) /* R/W R/W 0x0000 0000 32 */
288#define BITS_LARn (20)
289#define MASK_LARn (0xfff<<BITS_LARn)
290
291#define SH4A_PCIE_020204 (0x020204) /* R/W R/W 0x0000 0000 32 */
292
293/* PCIELAMR0 */
294#define SH4A_PCIELAMR0 (0x020208) /* R/W R/W 0x0000 0000 32 */
295#define BITS_LAMRn (20)
296#define MASK_LAMRn (0x1ff<<BITS_LAMRn)
297#define BITS_LAREn (0)
298#define MASK_LAREn (0x1<<BITS_LAREn)
299
300/* PCIECSCR0 */
301#define SH4A_PCIECSCR0 (0x020210) /* R/W R/W 0x0000 0000 32 */
302#define BITS_RANGE (2)
303#define MASK_RANGE (0x7<<BITS_RANGE)
304#define BITS_SNPMD (0)
305#define MASK_SNPMD (0x3<<BITS_SNPMD)
306
307/* PCIECSAR0 */
308#define SH4A_PCIECSAR0 (0x020214) /* R/W R/W 0x0000 0000 32 */
309#define BITS_CSADR (0)
310#define MASK_CSADR (0xffffffff<<BITS_CSADR)
311
312/* PCIESTCTLR0 */
313#define SH4A_PCIESTCTLR0 (0x020218) /* R/W R/W 0x0000 0000 32 */
314#define BITS_SHPRI (8)
315#define MASK_SHPRI (0x0f<<BITS_SHPRI)
316
317#define SH4A_PCIE_020224 (0x020224) /* R/W R/W 0x0000 0000 32 */
318
319#define SH4A_PCIELAR1 (0x020220) /* R/W R/W 0x0000 0000 32 */
320#define SH4A_PCIELAMR1 (0x020228) /* R/W R/W 0x0000 0000 32 */
321#define SH4A_PCIECSCR1 (0x020230) /* R/W R/W 0x0000 0000 32 */
322#define SH4A_PCIECSAR1 (0x020234) /* R/W R/W 0x0000 0000 32 */
323#define SH4A_PCIESTCTLR1 (0x020238) /* R/W R/W 0x0000 0000 32 */
324
325#define SH4A_PCIELAR2 (0x020240) /* R/W R/W 0x0000 0000 32 */
326#define SH4A_PCIE_020244 (0x020244) /* R/W R/W 0x0000 0000 32 */
327#define SH4A_PCIELAMR2 (0x020248) /* R/W R/W 0x0000 0000 32 */
328#define SH4A_PCIECSCR2 (0x020250) /* R/W R/W 0x0000 0000 32 */
329#define SH4A_PCIECSAR2 (0x020254) /* R/W R/W 0x0000 0000 32 */
330#define SH4A_PCIESTCTLR2 (0x020258) /* R/W R/W 0x0000 0000 32 */
331
332#define SH4A_PCIELAR3 (0x020260) /* R/W R/W 0x0000 0000 32 */
333#define SH4A_PCIE_020264 (0x020264) /* R/W R/W 0x0000 0000 32 */
334#define SH4A_PCIELAMR3 (0x020268) /* R/W R/W 0x0000 0000 32 */
335#define SH4A_PCIECSCR3 (0x020270) /* R/W R/W 0x0000 0000 32 */
336#define SH4A_PCIECSAR3 (0x020274) /* R/W R/W 0x0000 0000 32 */
337#define SH4A_PCIESTCTLR3 (0x020278) /* R/W R/W 0x0000 0000 32 */
338
339#define SH4A_PCIELAR4 (0x020280) /* R/W R/W 0x0000 0000 32 */
340#define SH4A_PCIE_020284 (0x020284) /* R/W R/W 0x0000 0000 32 */
341#define SH4A_PCIELAMR4 (0x020288) /* R/W R/W 0x0000 0000 32 */
342#define SH4A_PCIECSCR4 (0x020290) /* R/W R/W 0x0000 0000 32 */
343#define SH4A_PCIECSAR4 (0x020294) /* R/W R/W 0x0000 0000 32 */
344#define SH4A_PCIESTCTLR4 (0x020298) /* R/W R/W 0x0000 0000 32 */
345
346#define SH4A_PCIELAR5 (0x0202A0) /* R/W R/W 0x0000 0000 32 */
347#define SH4A_PCIE_0202A4 (0x0202A4) /* R/W R/W 0x0000 0000 32 */
348#define SH4A_PCIELAMR5 (0x0202A8) /* R/W R/W 0x0000 0000 32 */
349#define SH4A_PCIECSCR5 (0x0202B0) /* R/W R/W 0x0000 0000 32 */
350#define SH4A_PCIECSAR5 (0x0202B4) /* R/W R/W 0x0000 0000 32 */
351#define SH4A_PCIESTCTLR5 (0x0202B8) /* R/W R/W 0x0000 0000 32 */
352
353/* PCIEPARL0 */
354#define SH4A_PCIEPARL0 (0x020400) /* R/W R/W 0x0000 0000 32 */
355#define BITS_PAL (18)
356#define MASK_PAL (0x3fff<<BITS_PAL)
357
358/* PCIEPARH0 */
359#define SH4A_PCIEPARH0 (0x020404) /* R/W R/W 0x0000 0000 32 */
360#define BITS_PAH (0)
361#define MASK_PAH (0xffffffff<<BITS_PAH)
362
363/* PCIEPAMR0 */
364#define SH4A_PCIEPAMR0 (0x020408) /* R/W R/W 0x0000 0000 32 */
365#define BITS_PAM (18)
366#define MASK_PAM (0x3fff<<BITS_PAM)
367
368/* PCIEPTCTLR0 */
369#define SH4A_PCIEPTCTLR0 (0x02040C) /* R/W R/W 0x0000 0000 32 */
370#define BITS_PARE (31)
371#define MASK_PARE (0x1<<BITS_PARE)
372#define BITS_TC (20)
373#define MASK_TC (0x7<<BITS_TC)
374#define BITS_T_VC (16)
375#define MASK_T_VC (0x1<<BITS_T_VC)
376#define BITS_LOCK (12)
377#define MASK_LOCK (0x1<<BITS_LOCK)
378#define BITS_SPC (8)
379#define MASK_SPC (0x1<<BITS_SPC)
380
381#define SH4A_PCIEPARL1 (0x020420) /* R/W R/W 0x0000 0000 32 */
382#define SH4A_PCIEPARH1 (0x020424) /* R/W R/W 0x0000 0000 32 */
383#define SH4A_PCIEPAMR1 (0x020428) /* R/W R/W 0x0000 0000 32 */
384#define SH4A_PCIEPTCTLR1 (0x02042C) /* R/W R/W 0x0000 0000 32 */
385#define SH4A_PCIEPARL2 (0x020440) /* R/W R/W 0x0000 0000 32 */
386#define SH4A_PCIEPARH2 (0x020444) /* R/W R/W 0x0000 0000 32 */
387#define SH4A_PCIEPAMR2 (0x020448) /* R/W R/W 0x0000 0000 32 */
388#define SH4A_PCIEPTCTLR2 (0x02044C) /* R/W R/W 0x0000 0000 32 */
389#define SH4A_PCIEPARL3 (0x020460) /* R/W R/W 0x0000 0000 32 */
390#define SH4A_PCIEPARH3 (0x020464) /* R/W R/W 0x0000 0000 32 */
391#define SH4A_PCIEPAMR3 (0x020468) /* R/W R/W 0x0000 0000 32 */
392#define SH4A_PCIEPTCTLR3 (0x02046C) /* R/W R/W 0x0000 0000 32 */
393#define SH4A_PCIEPARL4 (0x020480) /* R/W R/W 0x0000 0000 32 */
394#define SH4A_PCIEPARH4 (0x020484) /* R/W R/W 0x0000 0000 32 */
395#define SH4A_PCIEPAMR4 (0x020488) /* R/W R/W 0x0000 0000 32 */
396#define SH4A_PCIEPTCTLR4 (0x02048C) /* R/W R/W 0x0000 0000 32 */
397#define SH4A_PCIEPARL5 (0x0204A0) /* R/W R/W 0x0000 0000 32 */
398#define SH4A_PCIEPARH5 (0x0204A4) /* R/W R/W 0x0000 0000 32 */
399#define SH4A_PCIEPAMR5 (0x0204A8) /* R/W R/W 0x0000 0000 32 */
400#define SH4A_PCIEPTCTLR5 (0x0204AC) /* R/W R/W 0x0000 0000 32 */
401#define SH4A_PCIEDMAOR (0x021000) /* R/W R/W 0x0000 0000 32 */
402#define SH4A_PCIEDMSAR0 (0x021100) /* R/W R/W 0x0000 0000 32 */
403#define SH4A_PCIEDMSAHR0 (0x021104) /* R/W R/W 0x0000 0000 32 */
404#define SH4A_PCIEDMDAR0 (0x021108) /* R/W R/W 0x0000 0000 32 */
405#define SH4A_PCIEDMDAHR0 (0x02110C) /* R/W R/W 0x0000 0000 32 */
406#define SH4A_PCIEDMBCNTR0 (0x021110) /* R/W R/W 0x0000 0000 32 */
407#define SH4A_PCIEDMSBCNTR0 (0x021114) /* R/W R/W 0x0000 0000 32 */
408#define SH4A_PCIEDMSTRR0 (0x021118) /* R/W R/W 0x0000 0000 32 */
409#define SH4A_PCIEDMCCAR0 (0x02111C) /* R/W R/W 0x0000 0000 32 */
410#define SH4A_PCIEDMCCR0 (0x021120) /* R/W R/W 0x0000 0000 32 */
411#define SH4A_PCIEDMCC2R0 (0x021124) /* R/W R/W 0x0000 0000 - */
412#define SH4A_PCIEDMCCCR0 (0x021128) /* R/W R/W 0x0000 0000 32 */
413#define SH4A_PCIEDMSAR1 (0x021140) /* R/W R/W 0x0000 0000 32 */
414#define SH4A_PCIEDMSAHR1 (0x021144) /* R/W R/W 0x0000 0000 32 */
415#define SH4A_PCIEDMDAR1 (0x021148) /* R/W R/W 0x0000 0000 32 */
416#define SH4A_PCIEDMDAHR1 (0x02114C) /* R/W R/W 0x0000 0000 32 */
417#define SH4A_PCIEDMBCNTR1 (0x021150) /* R/W R/W 0x0000 0000 32 */
418#define SH4A_PCIEDMSBCNTR1 (0x021154) /* R/W R/W 0x0000 0000 32 */
419#define SH4A_PCIEDMSTRR1 (0x021158) /* R/W R/W 0x0000 0000 32 */
420#define SH4A_PCIEDMCCAR1 (0x02115C) /* R/W R/W 0x0000 0000 32 */
421#define SH4A_PCIEDMCCR1 (0x021160) /* R/W R/W 0x0000 0000 32 */
422#define SH4A_PCIEDMCC2R1 (0x021164) /* R/W R/W 0x0000 0000 - */
423#define SH4A_PCIEDMCCCR1 (0x021168) /* R/W R/W 0x0000 0000 32 */
424#define SH4A_PCIEDMSAR2 (0x021180) /* R/W R/W 0x0000 0000 32 */
425#define SH4A_PCIEDMSAHR2 (0x021184) /* R/W R/W 0x0000 0000 32 */
426#define SH4A_PCIEDMDAR2 (0x021188) /* R/W R/W 0x0000 0000 32 */
427#define SH4A_PCIEDMDAHR2 (0x02118C) /* R/W R/W 0x0000 0000 32 */
428#define SH4A_PCIEDMBCNTR2 (0x021190) /* R/W R/W 0x0000 0000 32 */
429#define SH4A_PCIEDMSBCNTR2 (0x021194) /* R/W R/W 0x0000 0000 32 */
430#define SH4A_PCIEDMSTRR2 (0x021198) /* R/W R/W 0x0000 0000 32 */
431#define SH4A_PCIEDMCCAR2 (0x02119C) /* R/W R/W 0x0000 0000 32 */
432#define SH4A_PCIEDMCCR2 (0x0211A0) /* R/W R/W 0x0000 0000 32 */
433#define SH4A_PCIEDMCC2R2 (0x0211A4) /* R/W R/W 0x0000 0000 - */
434#define SH4A_PCIEDMCCCR2 (0x0211A8) /* R/W R/W 0x0000 0000 32 */
435#define SH4A_PCIEDMSAR3 (0x0211C0) /* R/W R/W 0x0000 0000 32 */
436#define SH4A_PCIEDMSAHR3 (0x0211C4) /* R/W R/W 0x0000 0000 32 */
437#define SH4A_PCIEDMDAR3 (0x0211C8) /* R/W R/W 0x0000 0000 32 */
438#define SH4A_PCIEDMDAHR3 (0x0211CC) /* R/W R/W 0x0000 0000 32 */
439#define SH4A_PCIEDMBCNTR3 (0x0211D0) /* R/W R/W 0x0000 0000 32 */
440#define SH4A_PCIEDMSBCNTR3 (0x0211D4) /* R/W R/W 0x0000 0000 32 */
441#define SH4A_PCIEDMSTRR3 (0x0211D8) /* R/W R/W 0x0000 0000 32 */
442#define SH4A_PCIEDMCCAR3 (0x0211DC) /* R/W R/W 0x0000 0000 32 */
443#define SH4A_PCIEDMCCR3 (0x0211E0) /* R/W R/W 0x0000 0000 32 */
444#define SH4A_PCIEDMCC2R3 (0x0211E4) /* R/W R/W 0x0000 0000 - */
445#define SH4A_PCIEDMCCCR3 (0x0211E8) /* R/W R/W 0x0000 0000 32 */
446#define SH4A_PCIEPCICONF0 (0x040000) /* R R - 8/16/32 */
447#define SH4A_PCIEPCICONF1 (0x040004) /* R/W R/W 0x0008 0000 8/16/32 */
448#define SH4A_PCIEPCICONF2 (0x040008) /* R/W R/W 0xFF00 0000 8/16/32 */
449#define SH4A_PCIEPCICONF3 (0x04000C) /* R/W R/W 0x0000 0000 8/16/32 */
450#define SH4A_PCIEPCICONF4 (0x040010) /* - R/W - 8/16/32 */
451#define SH4A_PCIEPCICONF5 (0x040014) /* - R/W - 8/16/32 */
452#define SH4A_PCIEPCICONF6 (0x040018) /* - R/W - 8/16/32 */
453#define SH4A_PCIEPCICONF7 (0x04001C) /* - R/W - 8/16/32 */
454#define SH4A_PCIEPCICONF8 (0x040020) /* - R/W - 8/16/32 */
455#define SH4A_PCIEPCICONF9 (0x040024) /* - R/W - 8/16/32 */
456#define SH4A_PCIEPCICONF10 (0x040028) /* R/W R/W 0x0000 0000 8/16/32 */
457#define SH4A_PCIEPCICONF11 (0x04002C) /* R/W R/W 0x0000 0000 8/16/32 */
458#define SH4A_PCIEPCICONF12 (0x040030) /* R/W R/W 0x0000 0000 8/16/32 */
459#define SH4A_PCIEPCICONF13 (0x040034) /* R/W R/W 0x0000 0040 8/16/32 */
460#define SH4A_PCIEPCICONF14 (0x040038) /* R/W R/W 0x0000 0000 8/16/32 */
461#define SH4A_PCIEPCICONF15 (0x04003C) /* R/W R/W 0x0000 00FF 8/16/32 */
462#define SH4A_PCIEPMCAP0 (0x040040) /* R/W R 0x0003 5001 8/16/32 */
463#define SH4A_PCIEPMCAP1 (0x040044) /* R/W R/W 0x0000 0000 8/16/32 */
464#define SH4A_PCIEMSICAP0 (0x040050) /* R/W R/W 0x0180 7005 8/16/32 */
465#define SH4A_PCIEMSICAP1 (0x040054) /* R/W R/W 0x0000 0000 8/16/32 */
466#define SH4A_PCIEMSICAP2 (0x040058) /* R/W R/W 0x0000 0000 8/16/32 */
467#define SH4A_PCIEMSICAP3 (0x04005C) /* R/W R/W 0x0000 0000 8/16/32 */
468#define SH4A_PCIEMSICAP4 (0x040060) /* R/W R/W 0x0000 0000 8/16/32 */
469#define SH4A_PCIEMSICAP5 (0x040064) /* R/W R/W 0x0000 0000 8/16/32 */
470#define SH4A_PCIEEXPCAP0 (0x040070) /* R/W R/W 0x0001 0010 8/16/32 */
471#define SH4A_PCIEEXPCAP1 (0x040074) /* R/W R 0x0000 0005 8/16/32 */
472#define SH4A_PCIEEXPCAP2 (0x040078) /* R/W R/W 0x0000 0801 8/16/32 */
473#define SH4A_PCIEEXPCAP3 (0x04007C) /* R/W R 0x0003 F421 8/16/32 */
474#define SH4A_PCIEEXPCAP4 (0x040080) /* R/W R/W 0x0041 0000 8/16/32 */
475#define SH4A_PCIEEXPCAP5 (0x040084) /* R/W R/W 0x0000 0000 8/16/32 */
476#define SH4A_PCIEEXPCAP6 (0x040088) /* R/W R/W 0x0000 03C0 8/16/32 */
477#define SH4A_PCIEEXPCAP7 (0x04008C) /* R/W R/W 0x0000 0000 8/16/32 */
478#define SH4A_PCIEEXPCAP8 (0x040090) /* R/W R/W 0x0000 0000 8/16/32 */
479#define SH4A_PCIEVCCAP0 (0x040100) /* R/W R 0x1B01 0002 8/16/32 */
480#define SH4A_PCIEVCCAP1 (0x040104) /* R R 0x0000 0001 8/16/32 */
481#define SH4A_PCIEVCCAP2 (0x040108) /* R R 0x0000 0000 8/16/32 */
482#define SH4A_PCIEVCCAP3 (0x04010C) /* R R/W 0x0000 0000 8/16/32 */
483#define SH4A_PCIEVCCAP4 (0x040110) /* R/W R/W 0x0000 0000 8/16/32 */
484#define SH4A_PCIEVCCAP5 (0x040114) /* R/W R/W 0x8000 00FF 8/16/32 */
485#define SH4A_PCIEVCCAP6 (0x040118) /* R/W R 0x0002 0000 8/16/32 */
486#define SH4A_PCIEVCCAP7 (0x04011C) /* R/W R/W 0x0000 0000 8/16/32 */
487#define SH4A_PCIEVCCAP8 (0x040120) /* R/W R/W 0x0000 0000 8/16/32 */
488#define SH4A_PCIEVCCAP9 (0x040124) /* R/W R 0x0002 0000 8/16/32 */
489#define SH4A_PCIENUMCAP0 (0x0001B0) /* RW R 0x0001 0003 8/16/32 */
490#define SH4A_PCIENUMCAP1 (0x0001B4) /* R R 0x0000 0000 8/16/32 */
491#define SH4A_PCIENUMCAP2 (0x0001B8) /* R R 0x0000 0000 8/16/32 */
492#define SH4A_PCIEIDSETR0 (0x041000) /* R/W R 0x0000 FFFF 16/32 */
493#define SH4A_PCIEIDSETR1 (0x041004) /* R/W R 0xFF00 0000 16/32 */
494#define SH4A_PCIEBAR0SETR (0x041008) /* R/W R 0x0000 0000 16/32 */
495#define SH4A_PCIEBAR1SETR (0x04100C) /* R/W R 0x0000 0000 16/32 */
496#define SH4A_PCIEBAR2SETR (0x041010) /* R/W R 0x0000 0000 16/32 */
497#define SH4A_PCIEBAR3SETR (0x041014) /* R/W R 0x0000 0000 16/32 */
498#define SH4A_PCIEBAR4SETR (0x041018) /* R/W R 0x0000 0000 16/32 */
499#define SH4A_PCIEBAR5SETR (0x04101C) /* R/W R 0x0000 0000 16/32 */
500#define SH4A_PCIECISSETR (0x041020) /* R/W R 0x0000 0000 16/32 */
501#define SH4A_PCIEIDSETR2 (0x041024) /* R/W R 0x0000 0000 16/32 */
502#define SH4A_PCIEEROMSETR (0x041028) /* R/W R 0x0000 0000 16/32 */
503#define SH4A_PCIEDSERSETR0 (0x04102C) /* R/W R 0x0000 0000 16/32 */
504#define SH4A_PCIEDSERSETR1 (0x041030) /* R/W R 0x0000 0000 16/32 */
505#define SH4A_PCIECTLR (0x041040) /* R/W R 0x0000 0000 16/32 */
506#define SH4A_PCIETLSR (0x041044) /* R/W1C R 0x0000 0000 16/32 */
507#define SH4A_PCIETLCTLR (0x041048) /* R/W R 0x0000 0000 16/32 */
508#define SH4A_PCIEDLSR (0x04104C) /* R/W1C R 0x4003 0000 16/32 */
509#define SH4A_PCIEDLCTLR (0x041050) /* R R 0x0000 0000 16/32 */
510#define SH4A_PCIEMACSR (0x041054) /* R/W1C R 0x0041 0000 16/32 */
511#define SH4A_PCIEMACCTLR (0x041058) /* R/W R 0x0000 0000 16/32 */
512#define PCIEMACCTLR_SCR_DIS (1 << 27) /* scramble disable */
513#define SH4A_PCIEPMSTR (0x04105C) /* R/W1C R 0x0000 0000 16/32 */
514#define SH4A_PCIEPMCTLR (0x041060) /* R/W R 0x0000 0000 16/32 */
515#define SH4A_PCIETLINTENR (0x041064) /* R/W R 0x0000 0000 16/32 */
516#define SH4A_PCIEDLINTENR (0x041068) /* R/W R 0x0000 0000 16/32 */
517#define PCIEDLINTENR_DLL_ACT_ENABLE (1 << 31) /* DL active irq */
518#define SH4A_PCIEMACINTENR (0x04106C) /* R/W R 0x0000 0000 16/32 */
519#define SH4A_PCIEPMINTENR (0x041070) /* R/W R 0x0000 0000 16/32 */
520#define SH4A_PCIETXDCTLR (0x044000) /* R/W - H'00000000_00000000 32/64 */
521#define SH4A_PCIETXCTLR (0x044020) /* R/W - H'00000000_00000000 32/64 */
522#define SH4A_PCIETXSR (0x044028) /* R - H'00000000_00000000 32/64 */
523#define SH4A_PCIETXVC0DCTLR (0x044100) /* R/W - H'00000000_00000000 32/64 */
524#define SH4A_PCIETXVC0SR (0x044108) /* R/W - H'00888000_00000000 32/64 */
525#define SH4A_PCIEVC0PDTXR (0x044110) /* W - H'00000000_00000000 32/64 */
526#define SH4A_PCIEVC0PHTXR (0x044118) /* W - H'00000000_00000000 32/64 */
527#define SH4A_PCIEVC0NPDTXR (0x044120) /* W - H'00000000_00000000 32/64 */
528#define SH4A_PCIEVC0NPHTXR (0x044128) /* W - H'00000000_00000000 32/64 */
529#define SH4A_PCIEVC0CDTXR (0x044130) /* W - H'00000000_00000000 32/64 */
530#define SH4A_PCIEVC0CHTXR (0x044138) /* W - H'00000000_00000000 32/64 */
531#define SH4A_PCIETXVCXDCTLR (0x044200) /* R/W - H'00000000_00000000 32/64 */
532#define SH4A_PCIETXVCXSR (0x044208) /* R/W - H'00000000_00000000 32/64 */
533#define SH4A_PCIEVCXPDTXR (0x044210) /* W - H'00000000_00000000 32/64 */
534#define SH4A_PCIEVCXPHTXR (0x044218) /* W - H'00000000_00000000 32/64 */
535#define SH4A_PCIEVCXNPDTXR (0x044220) /* W - H'00000000_00000000 32/64 */
536#define SH4A_PCIEVCXNPHTXR (0x044228) /* W - H'00000000_00000000 32/64 */
537#define SH4A_PCIEVCXCDTXR (0x044230) /* W - H'00000000_00000000 32/64 */
538#define SH4A_PCIEVCXCHTXR (0x044238) /* W - H'00000000_00000000 32/64 */
539#define SH4A_PCIERDCTLR (0x046000) /* RW - H'00000000_00000000 32/64 */
540#define SH4A_PCIEERPCTLR (0x046008) /* RW - H'00000000_00000000 32/64 */
541#define SH4A_PCIEERPHR (0x046010) /* R - H'00000000_00000000 32/64 */
542#define SH4A_PCIEERPERR (0x046018) /* R - H'00000000_00000000 32/64 */
543#define SH4A_PCIERXVC0DCTLR (0x046100) /* RW - H'00000000_00000000 32/64 */
544#define SH4A_PCIERXVC0SR (0x046108) /* RW - H'00000000_00000000 32/64 */
545#define SH4A_PCIEVC0PDRXR (0x046140) /* R - H'00000000_00000000 32/64 */
546#define SH4A_PCIEVC0PHRXR (0x046148) /* R - H'00000000_00000000 32/64 */
547#define SH4A_PCIEVC0PERR (0x046150) /* R - H'00000000_00000000 32/64 */
548#define SH4A_PCIEVC0NPDRXR (0x046158) /* R - H'00000000_00000000 32/64 */
549#define SH4A_PCIEVC0NPHRXR (0x046160) /* R - H'00000000_00000000 32/64 */
550#define SH4A_PCIEVC0NPERR (0x046168) /* R - H'00000000_00000000 32/64 */
551#define SH4A_PCIEVC0CDRXR (0x046170) /* R - H'00000000_00000000 32/64 */
552#define SH4A_PCIEVC0CHRXR (0x046178) /* R - H'00000000_00000000 32/64 */
553#define SH4A_PCIEVC0CERR (0x046180) /* R - H'00000000_00000000 32/64 */
554#define SH4A_PCIERXVCXDCTLR (0x046200) /* RW - H'00000000_00000000 32/64 */
555#define SH4A_PCIERXVCXSR (0x046208) /* RW - H'00000000_00000000 32/64 */
556#define SH4A_PCIEVCXPDRXR (0x046240) /* R - H'00000000_00000000 32/64 */
557#define SH4A_PCIEVCXPHRXR (0x046248) /* R H'00000000_00000000 32/64 */
558#define SH4A_PCIEVCXPERR (0x046250) /* R H'00000000_00000000 32/64 */
559#define SH4A_PCIEVCXNPDRXR (0x046258) /* R H'00000000_00000000 32/64 */
560#define SH4A_PCIEVCXNPHRXR (0x046260) /* R H'00000000_00000000 32/64 */
561#define SH4A_PCIEVCXNPERR (0x046268) /* R H'00000000_00000000 32/64 */
562#define SH4A_PCIEVCXCDRXR (0x046270) /* R H'00000000_00000000 32/64 */
563#define SH4A_PCIEVCXCHRXR (0x046278) /* R H'00000000_00000000 32/64 */
564#define SH4A_PCIEVCXCERR (0x046280) /* R H'00000000_00000000 32/64 */
565
566/* SSI Register Definition for MSI WORK AROUND --hamada */
567#define SH4A_PCI_SSI_BASE 0xFFE00000 /* spw config address */
568#define SH4A_PCI_SSI_BASE_LEN 0x00100000 /* 1MB */
569
570#define SH4A_SSICR0 (0x000000)
571#define SH4A_SSICR1 (0x010000)
572#define SH4A_SSICR2 (0x020000)
573#define SH4A_SSICR3 (0x030000)
574
575#define PCI_REG(x) ((x) + 0x40000)
576
577static inline void
578pci_write_reg(struct pci_channel *chan, unsigned long val, unsigned long reg)
579{
580 __raw_writel(val, chan->reg_base + reg);
581}
582
583static inline unsigned long
584pci_read_reg(struct pci_channel *chan, unsigned long reg)
585{
586 return __raw_readl(chan->reg_base + reg);
587}
588
589#endif /* __PCI_SH7786_H */
diff --git a/arch/sh/include/asm/atomic-irq.h b/arch/sh/include/asm/atomic-irq.h
index a0b348068cae..467d9415a32e 100644
--- a/arch/sh/include/asm/atomic-irq.h
+++ b/arch/sh/include/asm/atomic-irq.h
@@ -10,29 +10,29 @@ static inline void atomic_add(int i, atomic_t *v)
10{ 10{
11 unsigned long flags; 11 unsigned long flags;
12 12
13 local_irq_save(flags); 13 raw_local_irq_save(flags);
14 v->counter += i; 14 v->counter += i;
15 local_irq_restore(flags); 15 raw_local_irq_restore(flags);
16} 16}
17 17
18static inline void atomic_sub(int i, atomic_t *v) 18static inline void atomic_sub(int i, atomic_t *v)
19{ 19{
20 unsigned long flags; 20 unsigned long flags;
21 21
22 local_irq_save(flags); 22 raw_local_irq_save(flags);
23 v->counter -= i; 23 v->counter -= i;
24 local_irq_restore(flags); 24 raw_local_irq_restore(flags);
25} 25}
26 26
27static inline int atomic_add_return(int i, atomic_t *v) 27static inline int atomic_add_return(int i, atomic_t *v)
28{ 28{
29 unsigned long temp, flags; 29 unsigned long temp, flags;
30 30
31 local_irq_save(flags); 31 raw_local_irq_save(flags);
32 temp = v->counter; 32 temp = v->counter;
33 temp += i; 33 temp += i;
34 v->counter = temp; 34 v->counter = temp;
35 local_irq_restore(flags); 35 raw_local_irq_restore(flags);
36 36
37 return temp; 37 return temp;
38} 38}
@@ -41,11 +41,11 @@ static inline int atomic_sub_return(int i, atomic_t *v)
41{ 41{
42 unsigned long temp, flags; 42 unsigned long temp, flags;
43 43
44 local_irq_save(flags); 44 raw_local_irq_save(flags);
45 temp = v->counter; 45 temp = v->counter;
46 temp -= i; 46 temp -= i;
47 v->counter = temp; 47 v->counter = temp;
48 local_irq_restore(flags); 48 raw_local_irq_restore(flags);
49 49
50 return temp; 50 return temp;
51} 51}
@@ -54,18 +54,18 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
54{ 54{
55 unsigned long flags; 55 unsigned long flags;
56 56
57 local_irq_save(flags); 57 raw_local_irq_save(flags);
58 v->counter &= ~mask; 58 v->counter &= ~mask;
59 local_irq_restore(flags); 59 raw_local_irq_restore(flags);
60} 60}
61 61
62static inline void atomic_set_mask(unsigned int mask, atomic_t *v) 62static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
63{ 63{
64 unsigned long flags; 64 unsigned long flags;
65 65
66 local_irq_save(flags); 66 raw_local_irq_save(flags);
67 v->counter |= mask; 67 v->counter |= mask;
68 local_irq_restore(flags); 68 raw_local_irq_restore(flags);
69} 69}
70 70
71#endif /* __ASM_SH_ATOMIC_IRQ_H */ 71#endif /* __ASM_SH_ATOMIC_IRQ_H */
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h
index 157c320272cb..e8e78137c6f5 100644
--- a/arch/sh/include/asm/atomic.h
+++ b/arch/sh/include/asm/atomic.h
@@ -85,4 +85,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
85#define smp_mb__after_atomic_inc() barrier() 85#define smp_mb__after_atomic_inc() barrier()
86 86
87#include <asm-generic/atomic-long.h> 87#include <asm-generic/atomic-long.h>
88#include <asm-generic/atomic64.h>
89
88#endif /* __ASM_SH_ATOMIC_H */ 90#endif /* __ASM_SH_ATOMIC_H */
diff --git a/arch/sh/include/asm/checksum.h b/arch/sh/include/asm/checksum.h
index 67496ab0ef04..fc26d1f4b590 100644
--- a/arch/sh/include/asm/checksum.h
+++ b/arch/sh/include/asm/checksum.h
@@ -1,5 +1,5 @@
1#ifdef CONFIG_SUPERH32 1#ifdef CONFIG_SUPERH32
2# include "checksum_32.h" 2# include "checksum_32.h"
3#else 3#else
4# include "checksum_64.h" 4# include <asm-generic/checksum.h>
5#endif 5#endif
diff --git a/arch/sh/include/asm/checksum_64.h b/arch/sh/include/asm/checksum_64.h
deleted file mode 100644
index 9c62a031a8f5..000000000000
--- a/arch/sh/include/asm/checksum_64.h
+++ /dev/null
@@ -1,78 +0,0 @@
1#ifndef __ASM_SH_CHECKSUM_64_H
2#define __ASM_SH_CHECKSUM_64_H
3
4/*
5 * include/asm-sh/checksum_64.h
6 *
7 * Copyright (C) 2000, 2001 Paolo Alberelli
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
12 */
13
14/*
15 * computes the checksum of a memory block at buff, length len,
16 * and adds in "sum" (32-bit)
17 *
18 * returns a 32-bit number suitable for feeding into itself
19 * or csum_tcpudp_magic
20 *
21 * this function must be called with even lengths, except
22 * for the last fragment, which may be odd
23 *
24 * it's best to have buff aligned on a 32-bit boundary
25 */
26asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
27
28/*
29 * Note: when you get a NULL pointer exception here this means someone
30 * passed in an incorrect kernel address to one of these functions.
31 *
32 * If you use these functions directly please don't forget the
33 * access_ok().
34 */
35
36
37__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len,
38 __wsum sum);
39
40__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
41 int len, __wsum sum, int *err_ptr);
42
43static inline __sum16 csum_fold(__wsum csum)
44{
45 u32 sum = (__force u32)csum;
46 sum = (sum & 0xffff) + (sum >> 16);
47 sum = (sum & 0xffff) + (sum >> 16);
48 return (__force __sum16)~sum;
49}
50
51__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
52
53__wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
54 unsigned short len, unsigned short proto,
55 __wsum sum);
56
57/*
58 * computes the checksum of the TCP/UDP pseudo-header
59 * returns a 16-bit checksum, already complemented
60 */
61static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
62 unsigned short len,
63 unsigned short proto,
64 __wsum sum)
65{
66 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
67}
68
69/*
70 * this routine is used for miscellaneous IP-like checksums, mainly
71 * in icmp.c
72 */
73static inline __sum16 ip_compute_csum(const void *buff, int len)
74{
75 return csum_fold(csum_partial(buff, len, 0));
76}
77
78#endif /* __ASM_SH_CHECKSUM_64_H */
diff --git a/arch/sh/include/asm/current.h b/arch/sh/include/asm/current.h
index 62b63880b333..4c51401b5537 100644
--- a/arch/sh/include/asm/current.h
+++ b/arch/sh/include/asm/current.h
@@ -1,20 +1 @@
1#ifndef __ASM_SH_CURRENT_H #include <asm-generic/current.h>
2#define __ASM_SH_CURRENT_H
3
4/*
5 * Copyright (C) 1999 Niibe Yutaka
6 *
7 */
8
9#include <linux/thread_info.h>
10
11struct task_struct;
12
13static __inline__ struct task_struct * get_current(void)
14{
15 return current_thread_info()->task;
16}
17
18#define current get_current()
19
20#endif /* __ASM_SH_CURRENT_H */
diff --git a/arch/sh/include/asm/dma.h b/arch/sh/include/asm/dma.h
index 6bd178473878..04ad0e1e637e 100644
--- a/arch/sh/include/asm/dma.h
+++ b/arch/sh/include/asm/dma.h
@@ -16,13 +16,7 @@
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18#include <cpu/dma.h> 18#include <cpu/dma.h>
19 19#include <asm-generic/dma.h>
20/* The maximum address that we can perform a DMA transfer to on this platform */
21/* Don't define MAX_DMA_ADDRESS; it's useless on the SuperH and any
22 occurrence should be flagged as an error. */
23/* But... */
24/* XXX: This is not applicable to SuperH, just needed for alloc_bootmem */
25#define MAX_DMA_ADDRESS (PAGE_OFFSET+0x10000000)
26 20
27#ifdef CONFIG_NR_DMA_CHANNELS 21#ifdef CONFIG_NR_DMA_CHANNELS
28# define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) 22# define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS)
@@ -137,8 +131,6 @@ extern int dma_xfer(unsigned int chan, unsigned long from,
137 131
138extern int request_dma_bycap(const char **dmac, const char **caps, 132extern int request_dma_bycap(const char **dmac, const char **caps,
139 const char *dev_id); 133 const char *dev_id);
140extern int request_dma(unsigned int chan, const char *dev_id);
141extern void free_dma(unsigned int chan);
142extern int get_dma_residue(unsigned int chan); 134extern int get_dma_residue(unsigned int chan);
143extern struct dma_info *get_dma_info(unsigned int chan); 135extern struct dma_info *get_dma_info(unsigned int chan);
144extern struct dma_channel *get_dma_channel(unsigned int chan); 136extern struct dma_channel *get_dma_channel(unsigned int chan);
diff --git a/arch/sh/include/asm/ipcbuf.h b/arch/sh/include/asm/ipcbuf.h
index 5ffc9972a7ea..84c7e51cb6d0 100644
--- a/arch/sh/include/asm/ipcbuf.h
+++ b/arch/sh/include/asm/ipcbuf.h
@@ -1,29 +1 @@
1#ifndef __ASM_SH_IPCBUF_H__ #include <asm-generic/ipcbuf.h>
2#define __ASM_SH_IPCBUF_H__
3
4/*
5 * The ipc64_perm 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 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 /* __ASM_SH_IPCBUF_H__ */
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
index a2b8c99cc06f..df8e1500527c 100644
--- a/arch/sh/include/asm/irq.h
+++ b/arch/sh/include/asm/irq.h
@@ -39,7 +39,6 @@ static inline int generic_irq_demux(int irq)
39 return irq; 39 return irq;
40} 40}
41 41
42#define irq_canonicalize(irq) (irq)
43#define irq_demux(irq) sh_mv.mv_irq_demux(irq) 42#define irq_demux(irq) sh_mv.mv_irq_demux(irq)
44 43
45void init_IRQ(void); 44void init_IRQ(void);
@@ -54,6 +53,7 @@ extern void irq_ctx_exit(int cpu);
54# define irq_ctx_exit(cpu) do { } while (0) 53# define irq_ctx_exit(cpu) do { } while (0)
55#endif 54#endif
56 55
56#include <asm-generic/irq.h>
57#ifdef CONFIG_CPU_SH5 57#ifdef CONFIG_CPU_SH5
58#include <cpu/irq.h> 58#include <cpu/irq.h>
59#endif 59#endif
diff --git a/arch/sh/include/asm/mman.h b/arch/sh/include/asm/mman.h
index 7d8b72c91a5f..8eebf89f5ab1 100644
--- a/arch/sh/include/asm/mman.h
+++ b/arch/sh/include/asm/mman.h
@@ -1,17 +1 @@
1#ifndef __ASM_SH_MMAN_H #include <asm-generic/mman.h>
2#define __ASM_SH_MMAN_H
3
4#include <asm-generic/mman-common.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) page tables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __ASM_SH_MMAN_H */
diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h
index 2a9c55f1a83f..67d8946db193 100644
--- a/arch/sh/include/asm/mmu_context.h
+++ b/arch/sh/include/asm/mmu_context.h
@@ -122,30 +122,30 @@ static inline void switch_mm(struct mm_struct *prev,
122 unsigned int cpu = smp_processor_id(); 122 unsigned int cpu = smp_processor_id();
123 123
124 if (likely(prev != next)) { 124 if (likely(prev != next)) {
125 cpu_set(cpu, next->cpu_vm_mask); 125 cpumask_set_cpu(cpu, mm_cpumask(next));
126 set_TTB(next->pgd); 126 set_TTB(next->pgd);
127 activate_context(next, cpu); 127 activate_context(next, cpu);
128 } else 128 } else
129 if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) 129 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
130 activate_context(next, cpu); 130 activate_context(next, cpu);
131} 131}
132
133#define activate_mm(prev, next) switch_mm((prev),(next),NULL)
134#define deactivate_mm(tsk,mm) do { } while (0)
135#define enter_lazy_tlb(mm,tsk) do { } while (0)
136
132#else 137#else
133#define get_mmu_context(mm) do { } while (0) 138
134#define init_new_context(tsk,mm) (0)
135#define destroy_context(mm) do { } while (0)
136#define set_asid(asid) do { } while (0) 139#define set_asid(asid) do { } while (0)
137#define get_asid() (0) 140#define get_asid() (0)
138#define cpu_asid(cpu, mm) ({ (void)cpu; NO_CONTEXT; }) 141#define cpu_asid(cpu, mm) ({ (void)cpu; NO_CONTEXT; })
139#define switch_and_save_asid(asid) (0) 142#define switch_and_save_asid(asid) (0)
140#define set_TTB(pgd) do { } while (0) 143#define set_TTB(pgd) do { } while (0)
141#define get_TTB() (0) 144#define get_TTB() (0)
142#define activate_context(mm,cpu) do { } while (0)
143#define switch_mm(prev,next,tsk) do { } while (0)
144#endif /* CONFIG_MMU */
145 145
146#define activate_mm(prev, next) switch_mm((prev),(next),NULL) 146#include <asm-generic/mmu_context.h>
147#define deactivate_mm(tsk,mm) do { } while (0) 147
148#define enter_lazy_tlb(mm,tsk) do { } while (0) 148#endif /* CONFIG_MMU */
149 149
150#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4) 150#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4)
151/* 151/*
diff --git a/arch/sh/include/asm/module.h b/arch/sh/include/asm/module.h
index 46eccd331660..068bf1659750 100644
--- a/arch/sh/include/asm/module.h
+++ b/arch/sh/include/asm/module.h
@@ -1,17 +1,7 @@
1#ifndef _ASM_SH_MODULE_H 1#ifndef _ASM_SH_MODULE_H
2#define _ASM_SH_MODULE_H 2#define _ASM_SH_MODULE_H
3 3
4/* 4#include <asm-generic/module.h>
5 * This file contains the SH architecture specific module code.
6 */
7
8struct mod_arch_specific {
9 /* Nothing to see here .. */
10};
11
12#define Elf_Shdr Elf32_Shdr
13#define Elf_Sym Elf32_Sym
14#define Elf_Ehdr Elf32_Ehdr
15 5
16#ifdef CONFIG_CPU_LITTLE_ENDIAN 6#ifdef CONFIG_CPU_LITTLE_ENDIAN
17# ifdef CONFIG_CPU_SH2 7# ifdef CONFIG_CPU_SH2
diff --git a/arch/sh/include/asm/msgbuf.h b/arch/sh/include/asm/msgbuf.h
index 517432343fb5..809134c644a6 100644
--- a/arch/sh/include/asm/msgbuf.h
+++ b/arch/sh/include/asm/msgbuf.h
@@ -1,31 +1 @@
1#ifndef __ASM_SH_MSGBUF_H #include <asm-generic/msgbuf.h>
2#define __ASM_SH_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 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 __kernel_time_t msg_stime; /* last msgsnd time */
17 unsigned long __unused1;
18 __kernel_time_t msg_rtime; /* last msgrcv time */
19 unsigned long __unused2;
20 __kernel_time_t msg_ctime; /* last change time */
21 unsigned long __unused3;
22 unsigned long msg_cbytes; /* current number of bytes on queue */
23 unsigned long msg_qnum; /* number of messages in queue */
24 unsigned long msg_qbytes; /* max number of bytes on queue */
25 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
26 __kernel_pid_t msg_lrpid; /* last receive pid */
27 unsigned long __unused4;
28 unsigned long __unused5;
29};
30
31#endif /* __ASM_SH_MSGBUF_H */
diff --git a/arch/sh/include/asm/param.h b/arch/sh/include/asm/param.h
index ae245afdfd6a..965d45427975 100644
--- a/arch/sh/include/asm/param.h
+++ b/arch/sh/include/asm/param.h
@@ -1,22 +1 @@
1#ifndef __ASM_SH_PARAM_H #include <asm-generic/param.h>
2#define __ASM_SH_PARAM_H
3
4#ifdef __KERNEL__
5# define HZ CONFIG_HZ
6# define USER_HZ 100 /* User interfaces are in "ticks" */
7# define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
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_SH_PARAM_H */
diff --git a/arch/sh/include/asm/parport.h b/arch/sh/include/asm/parport.h
index f67ba60a2acd..cf252af64590 100644
--- a/arch/sh/include/asm/parport.h
+++ b/arch/sh/include/asm/parport.h
@@ -1,16 +1 @@
1/* #include <asm-generic/parport.h>
2 * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
3 *
4 * This file should only be included by drivers/parport/parport_pc.c.
5 */
6#ifndef __ASM_SH_PARPORT_H
7#define __ASM_SH_PARPORT_H
8
9static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma);
10
11static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma)
12{
13 return parport_pc_find_isa_ports(autoirq, autodma);
14}
15
16#endif /* __ASM_SH_PARPORT_H */
diff --git a/arch/sh/include/asm/perf_counter.h b/arch/sh/include/asm/perf_counter.h
new file mode 100644
index 000000000000..a8153c2aa6fa
--- /dev/null
+++ b/arch/sh/include/asm/perf_counter.h
@@ -0,0 +1,7 @@
1#ifndef __ASM_SH_PERF_COUNTER_H
2#define __ASM_SH_PERF_COUNTER_H
3
4/* SH only supports software counters through this interface. */
5#define set_perf_counter_pending() do { } while (0)
6
7#endif /* __ASM_SH_PERF_COUNTER_H */
diff --git a/arch/sh/include/asm/posix_types_32.h b/arch/sh/include/asm/posix_types_32.h
index 2172732c55c8..6a9ceaaf1aea 100644
--- a/arch/sh/include/asm/posix_types_32.h
+++ b/arch/sh/include/asm/posix_types_32.h
@@ -1,118 +1,29 @@
1#ifndef __ASM_SH_POSIX_TYPES_H 1#ifndef __ASM_SH_POSIX_TYPES_32_H
2#define __ASM_SH_POSIX_TYPES_H 2#define __ASM_SH_POSIX_TYPES_32_H
3 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; 4typedef unsigned short __kernel_mode_t;
5#define __kernel_mode_t __kernel_mode_t
12typedef unsigned short __kernel_nlink_t; 6typedef unsigned short __kernel_nlink_t;
13typedef long __kernel_off_t; 7#define __kernel_nlink_t __kernel_nlink_t
14typedef int __kernel_pid_t;
15typedef unsigned short __kernel_ipc_pid_t; 8typedef unsigned short __kernel_ipc_pid_t;
9#define __kernel_ipc_pid_t __kernel_ipc_pid_t
16typedef unsigned short __kernel_uid_t; 10typedef unsigned short __kernel_uid_t;
11#define __kernel_uid_t __kernel_uid_t
17typedef unsigned short __kernel_gid_t; 12typedef unsigned short __kernel_gid_t;
18typedef unsigned int __kernel_size_t; 13#define __kernel_gid_t __kernel_gid_t
19typedef int __kernel_ssize_t; 14
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; 15typedef unsigned int __kernel_uid32_t;
16#define __kernel_uid32_t __kernel_uid32_t
31typedef unsigned int __kernel_gid32_t; 17typedef unsigned int __kernel_gid32_t;
18#define __kernel_gid32_t __kernel_gid32_t
32 19
33typedef unsigned short __kernel_old_uid_t; 20typedef unsigned short __kernel_old_uid_t;
21#define __kernel_old_uid_t __kernel_old_uid_t
34typedef unsigned short __kernel_old_gid_t; 22typedef unsigned short __kernel_old_gid_t;
23#define __kernel_old_gid_t __kernel_old_gid_t
35typedef unsigned short __kernel_old_dev_t; 24typedef unsigned short __kernel_old_dev_t;
25#define __kernel_old_dev_t __kernel_old_dev_t
36 26
37#ifdef __GNUC__ 27#include <asm-generic/posix_types.h>
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
48static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
49{
50 unsigned long __tmp = __fd / __NFDBITS;
51 unsigned long __rem = __fd % __NFDBITS;
52 __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
53}
54
55#undef __FD_CLR
56static __inline__ void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
57{
58 unsigned long __tmp = __fd / __NFDBITS;
59 unsigned long __rem = __fd % __NFDBITS;
60 __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
61}
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 case (8 ints,
74 * for a 256-bit fd_set)
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 16:
85 __tmp[ 0] = 0; __tmp[ 1] = 0;
86 __tmp[ 2] = 0; __tmp[ 3] = 0;
87 __tmp[ 4] = 0; __tmp[ 5] = 0;
88 __tmp[ 6] = 0; __tmp[ 7] = 0;
89 __tmp[ 8] = 0; __tmp[ 9] = 0;
90 __tmp[10] = 0; __tmp[11] = 0;
91 __tmp[12] = 0; __tmp[13] = 0;
92 __tmp[14] = 0; __tmp[15] = 0;
93 return;
94
95 case 8:
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 return;
101
102 case 4:
103 __tmp[ 0] = 0; __tmp[ 1] = 0;
104 __tmp[ 2] = 0; __tmp[ 3] = 0;
105 return;
106 }
107 }
108 __i = __FDSET_LONGS;
109 while (__i) {
110 __i--;
111 *__tmp = 0;
112 __tmp++;
113 }
114}
115
116#endif /* defined(__KERNEL__) */
117 28
118#endif /* __ASM_SH_POSIX_TYPES_H */ 29#endif /* __ASM_SH_POSIX_TYPES_32_H */
diff --git a/arch/sh/include/asm/posix_types_64.h b/arch/sh/include/asm/posix_types_64.h
index f83e9bd463d8..8cd11485c06b 100644
--- a/arch/sh/include/asm/posix_types_64.h
+++ b/arch/sh/include/asm/posix_types_64.h
@@ -1,127 +1,34 @@
1#ifndef __ASM_SH64_POSIX_TYPES_H 1#ifndef __ASM_SH_POSIX_TYPES_64_H
2#define __ASM_SH64_POSIX_TYPES_H 2#define __ASM_SH_POSIX_TYPES_64_H
3 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 * include/asm-sh64/posix_types.h
10 *
11 * Copyright (C) 2000, 2001 Paolo Alberelli
12 * Copyright (C) 2003 Paul Mundt
13 *
14 * This file is generally used by user-level software, so you need to
15 * be a little careful about namespace pollution etc. Also, we cannot
16 * assume GCC is being used.
17 */
18
19typedef unsigned long __kernel_ino_t;
20typedef unsigned short __kernel_mode_t; 4typedef unsigned short __kernel_mode_t;
5#define __kernel_mode_t __kernel_mode_t
21typedef unsigned short __kernel_nlink_t; 6typedef unsigned short __kernel_nlink_t;
22typedef long __kernel_off_t; 7#define __kernel_nlink_t __kernel_nlink_t
23typedef int __kernel_pid_t;
24typedef unsigned short __kernel_ipc_pid_t; 8typedef unsigned short __kernel_ipc_pid_t;
9#define __kernel_ipc_pid_t __kernel_ipc_pid_t
25typedef unsigned short __kernel_uid_t; 10typedef unsigned short __kernel_uid_t;
11#define __kernel_uid_t __kernel_uid_t
26typedef unsigned short __kernel_gid_t; 12typedef unsigned short __kernel_gid_t;
13#define __kernel_gid_t __kernel_gid_t
27typedef long unsigned int __kernel_size_t; 14typedef long unsigned int __kernel_size_t;
15#define __kernel_size_t __kernel_size_t
28typedef int __kernel_ssize_t; 16typedef int __kernel_ssize_t;
17#define __kernel_ssize_t __kernel_ssize_t
29typedef int __kernel_ptrdiff_t; 18typedef int __kernel_ptrdiff_t;
30typedef long __kernel_time_t; 19#define __kernel_ptrdiff_t __kernel_ptrdiff_t
31typedef long __kernel_suseconds_t;
32typedef long __kernel_clock_t;
33typedef int __kernel_timer_t;
34typedef int __kernel_clockid_t;
35typedef int __kernel_daddr_t;
36typedef char * __kernel_caddr_t;
37typedef unsigned short __kernel_uid16_t;
38typedef unsigned short __kernel_gid16_t;
39typedef unsigned int __kernel_uid32_t; 20typedef unsigned int __kernel_uid32_t;
21#define __kernel_uid32_t __kernel_uid32_t
40typedef unsigned int __kernel_gid32_t; 22typedef unsigned int __kernel_gid32_t;
23#define __kernel_gid32_t __kernel_gid32_t
41 24
42typedef unsigned short __kernel_old_uid_t; 25typedef unsigned short __kernel_old_uid_t;
26#define __kernel_old_uid_t __kernel_old_uid_t
43typedef unsigned short __kernel_old_gid_t; 27typedef unsigned short __kernel_old_gid_t;
28#define __kernel_old_gid_t __kernel_old_gid_t
44typedef unsigned short __kernel_old_dev_t; 29typedef unsigned short __kernel_old_dev_t;
30#define __kernel_old_dev_t __kernel_old_dev_t
45 31
46#ifdef __GNUC__ 32#include <asm-generic/posix_types.h>
47typedef long long __kernel_loff_t;
48#endif
49
50typedef struct {
51 int val[2];
52} __kernel_fsid_t;
53
54#if defined(__KERNEL__)
55
56#undef __FD_SET
57static __inline__ void __FD_SET(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_CLR
65static __inline__ void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
66{
67 unsigned long __tmp = __fd / __NFDBITS;
68 unsigned long __rem = __fd % __NFDBITS;
69 __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
70}
71
72
73#undef __FD_ISSET
74static __inline__ int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
75{
76 unsigned long __tmp = __fd / __NFDBITS;
77 unsigned long __rem = __fd % __NFDBITS;
78 return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
79}
80
81/*
82 * This will unroll the loop for the normal constant case (8 ints,
83 * for a 256-bit fd_set)
84 */
85#undef __FD_ZERO
86static __inline__ void __FD_ZERO(__kernel_fd_set *__p)
87{
88 unsigned long *__tmp = __p->fds_bits;
89 int __i;
90
91 if (__builtin_constant_p(__FDSET_LONGS)) {
92 switch (__FDSET_LONGS) {
93 case 16:
94 __tmp[ 0] = 0; __tmp[ 1] = 0;
95 __tmp[ 2] = 0; __tmp[ 3] = 0;
96 __tmp[ 4] = 0; __tmp[ 5] = 0;
97 __tmp[ 6] = 0; __tmp[ 7] = 0;
98 __tmp[ 8] = 0; __tmp[ 9] = 0;
99 __tmp[10] = 0; __tmp[11] = 0;
100 __tmp[12] = 0; __tmp[13] = 0;
101 __tmp[14] = 0; __tmp[15] = 0;
102 return;
103
104 case 8:
105 __tmp[ 0] = 0; __tmp[ 1] = 0;
106 __tmp[ 2] = 0; __tmp[ 3] = 0;
107 __tmp[ 4] = 0; __tmp[ 5] = 0;
108 __tmp[ 6] = 0; __tmp[ 7] = 0;
109 return;
110
111 case 4:
112 __tmp[ 0] = 0; __tmp[ 1] = 0;
113 __tmp[ 2] = 0; __tmp[ 3] = 0;
114 return;
115 }
116 }
117 __i = __FDSET_LONGS;
118 while (__i) {
119 __i--;
120 *__tmp = 0;
121 __tmp++;
122 }
123}
124
125#endif /* defined(__KERNEL__) */
126 33
127#endif /* __ASM_SH64_POSIX_TYPES_H */ 34#endif /* __ASM_SH_POSIX_TYPES_64_H */
diff --git a/arch/sh/include/asm/scatterlist.h b/arch/sh/include/asm/scatterlist.h
index c693d268a413..327cc2e4c97b 100644
--- a/arch/sh/include/asm/scatterlist.h
+++ b/arch/sh/include/asm/scatterlist.h
@@ -1,28 +1,8 @@
1#ifndef __ASM_SH_SCATTERLIST_H 1#ifndef __ASM_SH_SCATTERLIST_H
2#define __ASM_SH_SCATTERLIST_H 2#define __ASM_SH_SCATTERLIST_H
3 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; /* for highmem, page offset */
12 unsigned int length;
13 dma_addr_t dma_address;
14 unsigned int dma_length;
15};
16
17#define ISA_DMA_THRESHOLD PHYS_ADDR_MASK 4#define ISA_DMA_THRESHOLD PHYS_ADDR_MASK
18 5
19/* These macros should be used after a pci_map_sg call has been done 6#include <asm-generic/scatterlist.h>
20 * to get bus addresses of each of the SG entries and their lengths.
21 * You should only work with the number of sg entries pci_map_sg
22 * returns, or alternatively stop on the first sg_dma_len(sg) which
23 * is 0.
24 */
25#define sg_dma_address(sg) ((sg)->dma_address)
26#define sg_dma_len(sg) ((sg)->length)
27 7
28#endif /* !(__ASM_SH_SCATTERLIST_H) */ 8#endif /* __ASM_SH_SCATTERLIST_H */
diff --git a/arch/sh/include/asm/sembuf.h b/arch/sh/include/asm/sembuf.h
index d79f3bd570b2..7673b83cfef7 100644
--- a/arch/sh/include/asm/sembuf.h
+++ b/arch/sh/include/asm/sembuf.h
@@ -1,25 +1 @@
1#ifndef __ASM_SH_SEMBUF_H #include <asm-generic/sembuf.h>
2#define __ASM_SH_SEMBUF_H
3
4/*
5 * The semid64_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 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 /* __ASM_SH_SEMBUF_H */
diff --git a/arch/sh/include/asm/serial.h b/arch/sh/include/asm/serial.h
index 11f854dd1363..a0cb0caff152 100644
--- a/arch/sh/include/asm/serial.h
+++ b/arch/sh/include/asm/serial.h
@@ -1,19 +1 @@
1/* #include <asm-generic/serial.h>
2 * include/asm-sh/serial.h
3 *
4 * Configuration details for 8250, 16450, 16550, etc. serial ports
5 */
6
7#ifndef _ASM_SERIAL_H
8#define _ASM_SERIAL_H
9
10/*
11 * This assumes you have a 1.8432 MHz clock for your UART.
12 *
13 * It'd be nice if someone built a serial card with a 24.576 MHz
14 * clock, since the 16550A is capable of handling a top speed of 1.5
15 * megabits/second; but this requires the faster clock.
16 */
17#define BASE_BAUD ( 1843200 / 16 )
18
19#endif /* _ASM_SERIAL_H */
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h
index d450bcf59ee2..ce3743599b27 100644
--- a/arch/sh/include/asm/setup.h
+++ b/arch/sh/include/asm/setup.h
@@ -1,7 +1,7 @@
1#ifndef _SH_SETUP_H 1#ifndef _SH_SETUP_H
2#define _SH_SETUP_H 2#define _SH_SETUP_H
3 3
4#define COMMAND_LINE_SIZE 256 4#include <asm-generic/setup.h>
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7/* 7/*
diff --git a/arch/sh/include/asm/shmbuf.h b/arch/sh/include/asm/shmbuf.h
index b2101f490521..83c05fc2de38 100644
--- a/arch/sh/include/asm/shmbuf.h
+++ b/arch/sh/include/asm/shmbuf.h
@@ -1,42 +1 @@
1#ifndef __ASM_SH_SHMBUF_H #include <asm-generic/shmbuf.h>
2#define __ASM_SH_SHMBUF_H
3
4/*
5 * The shmid64_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 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 /* __ASM_SH_SHMBUF_H */
diff --git a/arch/sh/include/asm/signal.h b/arch/sh/include/asm/signal.h
index 9cc5f0144689..9ac530a90bce 100644
--- a/arch/sh/include/asm/signal.h
+++ b/arch/sh/include/asm/signal.h
@@ -1,114 +1,10 @@
1#ifndef __ASM_SH_SIGNAL_H 1#ifndef __ASM_SH_SIGNAL_H
2#define __ASM_SH_SIGNAL_H 2#define __ASM_SH_SIGNAL_H
3 3
4#include <linux/types.h>
5
6/* Avoid too many header ordering problems. */
7struct pt_regs;
8struct siginfo;
9
10#ifdef __KERNEL__
11/* Most things should be clean enough to redefine this at will, if care
12 is taken to make libc match. */
13
14#define _NSIG 64
15#define _NSIG_BPW 32
16#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
17
18typedef unsigned long old_sigset_t; /* at least 32 bits */
19
20typedef struct {
21 unsigned long sig[_NSIG_WORDS];
22} sigset_t;
23
24#else
25/* Here we must cater to libcs that poke about in kernel headers. */
26
27#define NSIG 32
28typedef unsigned long sigset_t;
29
30#endif /* __KERNEL__ */
31
32#define SIGHUP 1
33#define SIGINT 2
34#define SIGQUIT 3
35#define SIGILL 4
36#define SIGTRAP 5
37#define SIGABRT 6
38#define SIGIOT 6
39#define SIGBUS 7
40#define SIGFPE 8
41#define SIGKILL 9
42#define SIGUSR1 10
43#define SIGSEGV 11
44#define SIGUSR2 12
45#define SIGPIPE 13
46#define SIGALRM 14
47#define SIGTERM 15
48#define SIGSTKFLT 16
49#define SIGCHLD 17
50#define SIGCONT 18
51#define SIGSTOP 19
52#define SIGTSTP 20
53#define SIGTTIN 21
54#define SIGTTOU 22
55#define SIGURG 23
56#define SIGXCPU 24
57#define SIGXFSZ 25
58#define SIGVTALRM 26
59#define SIGPROF 27
60#define SIGWINCH 28
61#define SIGIO 29
62#define SIGPOLL SIGIO
63/*
64#define SIGLOST 29
65*/
66#define SIGPWR 30
67#define SIGSYS 31
68#define SIGUNUSED 31
69
70/* These should not be considered constants from userland. */
71#define SIGRTMIN 32
72#define SIGRTMAX _NSIG
73
74/*
75 * SA_FLAGS values:
76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered.
81 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
82 * SA_NODEFER prevents the current signal from being masked in the handler.
83 *
84 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
85 * Unix names RESETHAND and NODEFER respectively.
86 */
87#define SA_NOCLDSTOP 0x00000001
88#define SA_NOCLDWAIT 0x00000002
89#define SA_SIGINFO 0x00000004
90#define SA_ONSTACK 0x08000000
91#define SA_RESTART 0x10000000
92#define SA_NODEFER 0x40000000
93#define SA_RESETHAND 0x80000000
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98#define SA_RESTORER 0x04000000 4#define SA_RESTORER 0x04000000
99 5
100/* 6#include <asm-generic/signal.h>
101 * sigaltstack controls
102 */
103#define SS_ONSTACK 1
104#define SS_DISABLE 2
105
106#define MINSIGSTKSZ 2048
107#define SIGSTKSZ 8192
108 7
109#include <asm-generic/signal-defs.h>
110
111#ifdef __KERNEL__
112struct old_sigaction { 8struct old_sigaction {
113 __sighandler_t sa_handler; 9 __sighandler_t sa_handler;
114 old_sigset_t sa_mask; 10 old_sigset_t sa_mask;
@@ -116,45 +12,4 @@ struct old_sigaction {
116 void (*sa_restorer)(void); 12 void (*sa_restorer)(void);
117}; 13};
118 14
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#define ptrace_signal_deliver(regs, cookie) do { } while (0)
157
158#endif /* __KERNEL__ */
159
160#endif /* __ASM_SH_SIGNAL_H */ 15#endif /* __ASM_SH_SIGNAL_H */
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h
index c24e9c6a1736..ca64f43abe67 100644
--- a/arch/sh/include/asm/smp.h
+++ b/arch/sh/include/asm/smp.h
@@ -43,7 +43,8 @@ void plat_start_cpu(unsigned int cpu, unsigned long entry_point);
43void plat_send_ipi(unsigned int cpu, unsigned int message); 43void plat_send_ipi(unsigned int cpu, unsigned int message);
44 44
45void arch_send_call_function_single_ipi(int cpu); 45void arch_send_call_function_single_ipi(int cpu);
46void arch_send_call_function_ipi(cpumask_t mask); 46extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
47#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
47 48
48#else 49#else
49 50
diff --git a/arch/sh/include/asm/socket.h b/arch/sh/include/asm/socket.h
index 345653b96826..6b71384b9d8b 100644
--- a/arch/sh/include/asm/socket.h
+++ b/arch/sh/include/asm/socket.h
@@ -1,60 +1 @@
1#ifndef __ASM_SH_SOCKET_H #include <asm-generic/socket.h>
2#define __ASM_SH_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_RCVBUFFORCE 32
18#define SO_SNDBUFFORCE 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#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
60#endif /* __ASM_SH_SOCKET_H */
diff --git a/arch/sh/include/asm/swab.h b/arch/sh/include/asm/swab.h
index 0e08fe54ad71..1cd09767a7a3 100644
--- a/arch/sh/include/asm/swab.h
+++ b/arch/sh/include/asm/swab.h
@@ -7,8 +7,7 @@
7 */ 7 */
8#include <linux/compiler.h> 8#include <linux/compiler.h>
9#include <linux/types.h> 9#include <linux/types.h>
10 10#include <asm-generic/swab.h>
11#define __SWAB_64_THRU_32__
12 11
13static inline __attribute_const__ __u32 __arch_swab32(__u32 x) 12static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
14{ 13{
diff --git a/arch/sh/include/asm/termbits.h b/arch/sh/include/asm/termbits.h
index 77db116948cf..3935b106de79 100644
--- a/arch/sh/include/asm/termbits.h
+++ b/arch/sh/include/asm/termbits.h
@@ -1,198 +1 @@
1#ifndef __ASM_SH_TERMBITS_H #include <asm-generic/termbits.h>
2#define __ASM_SH_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
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_SH_TERMBITS_H */
diff --git a/arch/sh/include/asm/termios.h b/arch/sh/include/asm/termios.h
index 0a8c793c76f2..280d78a9d966 100644
--- a/arch/sh/include/asm/termios.h
+++ b/arch/sh/include/asm/termios.h
@@ -1,90 +1 @@
1#ifndef __ASM_SH_TERMIOS_H #include <asm-generic/termios.h>
2#define __ASM_SH_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 /* __ASM_SH_TERMIOS_H */
diff --git a/arch/sh/include/asm/timex.h b/arch/sh/include/asm/timex.h
index a873e24113cf..b556d49e5f2b 100644
--- a/arch/sh/include/asm/timex.h
+++ b/arch/sh/include/asm/timex.h
@@ -8,11 +8,6 @@
8 8
9#define CLOCK_TICK_RATE (CONFIG_SH_PCLK_FREQ / 4) /* Underlying HZ */ 9#define CLOCK_TICK_RATE (CONFIG_SH_PCLK_FREQ / 4) /* Underlying HZ */
10 10
11typedef unsigned long long cycles_t; 11#include <asm-generic/timex.h>
12
13static __inline__ cycles_t get_cycles (void)
14{
15 return 0;
16}
17 12
18#endif /* __ASM_SH_TIMEX_H */ 13#endif /* __ASM_SH_TIMEX_H */
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index 8489a0905a87..b69ee850906d 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -35,9 +35,6 @@
35#define cpumask_of_node(node) ((void)node, cpu_online_mask) 35#define cpumask_of_node(node) ((void)node, cpu_online_mask)
36 36
37#define pcibus_to_node(bus) ((void)(bus), -1) 37#define pcibus_to_node(bus) ((void)(bus), -1)
38#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
39 CPU_MASK_ALL : \
40 node_to_cpumask(pcibus_to_node(bus)))
41#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ 38#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
42 CPU_MASK_ALL_PTR : \ 39 CPU_MASK_ALL_PTR : \
43 cpumask_of_node(pcibus_to_node(bus))) 40 cpumask_of_node(pcibus_to_node(bus)))
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h
index b13caca62a76..c7f3c94837dd 100644
--- a/arch/sh/include/asm/types.h
+++ b/arch/sh/include/asm/types.h
@@ -1,27 +1,14 @@
1#ifndef __ASM_SH_TYPES_H 1#ifndef __ASM_SH_TYPES_H
2#define __ASM_SH_TYPES_H 2#define __ASM_SH_TYPES_H
3 3
4#include <asm-generic/int-ll64.h> 4#include <asm-generic/types.h>
5
6#ifndef __ASSEMBLY__
7
8typedef unsigned short umode_t;
9
10#endif /* __ASSEMBLY__ */
11 5
12/* 6/*
13 * These aren't exported outside the kernel to avoid name space clashes 7 * These aren't exported outside the kernel to avoid name space clashes
14 */ 8 */
15#ifdef __KERNEL__ 9#ifdef __KERNEL__
16
17#define BITS_PER_LONG 32
18
19#ifndef __ASSEMBLY__ 10#ifndef __ASSEMBLY__
20 11
21/* Dma addresses are 32-bits wide. */
22
23typedef u32 dma_addr_t;
24
25#ifdef CONFIG_SUPERH32 12#ifdef CONFIG_SUPERH32
26typedef u16 insn_size_t; 13typedef u16 insn_size_t;
27#else 14#else
@@ -29,7 +16,6 @@ typedef u32 insn_size_t;
29#endif 16#endif
30 17
31#endif /* __ASSEMBLY__ */ 18#endif /* __ASSEMBLY__ */
32
33#endif /* __KERNEL__ */ 19#endif /* __KERNEL__ */
34 20
35#endif /* __ASM_SH_TYPES_H */ 21#endif /* __ASM_SH_TYPES_H */
diff --git a/arch/sh/include/asm/ucontext.h b/arch/sh/include/asm/ucontext.h
index 202ef1d5a3c4..9bc07b9f30fb 100644
--- a/arch/sh/include/asm/ucontext.h
+++ b/arch/sh/include/asm/ucontext.h
@@ -1,12 +1 @@
1#ifndef __ASM_SH_UCONTEXT_H #include <asm-generic/ucontext.h>
2#define __ASM_SH_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_SH_UCONTEXT_H */
diff --git a/arch/sh/include/asm/unaligned.h b/arch/sh/include/asm/unaligned.h
index 8c0ad5e4487a..7d14e0669961 100644
--- a/arch/sh/include/asm/unaligned.h
+++ b/arch/sh/include/asm/unaligned.h
@@ -6,19 +6,7 @@
6#include <asm/unaligned-sh4a.h> 6#include <asm/unaligned-sh4a.h>
7#else 7#else
8/* Otherwise, SH can't handle unaligned accesses. */ 8/* Otherwise, SH can't handle unaligned accesses. */
9#ifdef __LITTLE_ENDIAN__ 9#include <asm-generic/unaligned.h>
10# include <linux/unaligned/le_struct.h>
11# include <linux/unaligned/be_byteshift.h>
12# include <linux/unaligned/generic.h>
13# define get_unaligned __get_unaligned_le
14# define put_unaligned __put_unaligned_le
15#else
16# include <linux/unaligned/be_struct.h>
17# include <linux/unaligned/le_byteshift.h>
18# include <linux/unaligned/generic.h>
19# define get_unaligned __get_unaligned_be
20# define put_unaligned __put_unaligned_be
21#endif
22#endif 10#endif
23 11
24#endif /* _ASM_SH_UNALIGNED_H */ 12#endif /* _ASM_SH_UNALIGNED_H */
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h
index 65197086a1c5..61d6ad93d786 100644
--- a/arch/sh/include/asm/unistd_32.h
+++ b/arch/sh/include/asm/unistd_32.h
@@ -344,8 +344,9 @@
344#define __NR_preadv 333 344#define __NR_preadv 333
345#define __NR_pwritev 334 345#define __NR_pwritev 334
346#define __NR_rt_tgsigqueueinfo 335 346#define __NR_rt_tgsigqueueinfo 335
347#define __NR_perf_counter_open 336
347 348
348#define NR_syscalls 336 349#define NR_syscalls 337
349 350
350#ifdef __KERNEL__ 351#ifdef __KERNEL__
351 352
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h
index 8014aea88ec3..a751699afda3 100644
--- a/arch/sh/include/asm/unistd_64.h
+++ b/arch/sh/include/asm/unistd_64.h
@@ -384,10 +384,11 @@
384#define __NR_preadv 361 384#define __NR_preadv 361
385#define __NR_pwritev 362 385#define __NR_pwritev 362
386#define __NR_rt_tgsigqueueinfo 363 386#define __NR_rt_tgsigqueueinfo 363
387#define __NR_perf_counter_open 364
387 388
388#ifdef __KERNEL__ 389#ifdef __KERNEL__
389 390
390#define NR_syscalls 364 391#define NR_syscalls 365
391 392
392#define __ARCH_WANT_IPC_PARSE_VERSION 393#define __ARCH_WANT_IPC_PARSE_VERSION
393#define __ARCH_WANT_OLD_READDIR 394#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/sh/include/mach-common/mach/highlander.h b/arch/sh/include/mach-common/mach/highlander.h
index bd26a848cb0b..5d9d4d5154be 100644
--- a/arch/sh/include/mach-common/mach/highlander.h
+++ b/arch/sh/include/mach-common/mach/highlander.h
@@ -2,6 +2,9 @@
2#define __ASM_SH_RENESAS_R7780RP_H 2#define __ASM_SH_RENESAS_R7780RP_H
3 3
4/* Box specific addresses. */ 4/* Box specific addresses. */
5#define PA_NORFLASH_ADDR 0x00000000
6#define PA_NORFLASH_SIZE 0x04000000
7
5#if defined(CONFIG_SH_R7780MP) 8#if defined(CONFIG_SH_R7780MP)
6#define PA_BCR 0xa4000000 /* FPGA */ 9#define PA_BCR 0xa4000000 /* FPGA */
7#define PA_SDPOW (-1) 10#define PA_SDPOW (-1)
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 275942e58e4f..6dfe2cced3fc 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -1,6 +1,6 @@
1#include <linux/clk.h> 1#include <linux/clk.h>
2#include <linux/compiler.h> 2#include <linux/compiler.h>
3#include <linux/bootmem.h> 3#include <linux/slab.h>
4#include <linux/io.h> 4#include <linux/io.h>
5#include <asm/clock.h> 5#include <asm/clock.h>
6 6
@@ -127,10 +127,11 @@ int __init sh_clk_div6_register(struct clk *clks, int nr)
127 int k; 127 int k;
128 128
129 freq_table_size *= (nr_divs + 1); 129 freq_table_size *= (nr_divs + 1);
130 130 freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL);
131 freq_table = alloc_bootmem(freq_table_size * nr); 131 if (!freq_table) {
132 if (!freq_table) 132 pr_err("sh_clk_div6_register: unable to alloc memory\n");
133 return -ENOMEM; 133 return -ENOMEM;
134 }
134 135
135 for (k = 0; !ret && (k < nr); k++) { 136 for (k = 0; !ret && (k < nr); k++) {
136 clkp = clks + k; 137 clkp = clks + k;
@@ -175,10 +176,11 @@ int __init sh_clk_div4_register(struct clk *clks, int nr,
175 int k; 176 int k;
176 177
177 freq_table_size *= (nr_divs + 1); 178 freq_table_size *= (nr_divs + 1);
178 179 freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL);
179 freq_table = alloc_bootmem(freq_table_size * nr); 180 if (!freq_table) {
180 if (!freq_table) 181 pr_err("sh_clk_div4_register: unable to alloc memory\n");
181 return -ENOMEM; 182 return -ENOMEM;
183 }
182 184
183 for (k = 0; !ret && (k < nr); k++) { 185 for (k = 0; !ret && (k < nr); k++) {
184 clkp = clks + k; 186 clkp = clks + k;
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index 318516f6bfad..c18f7d09281b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -15,6 +15,7 @@
15#include <linux/serial_sci.h> 15#include <linux/serial_sci.h>
16#include <linux/uio_driver.h> 16#include <linux/uio_driver.h>
17#include <linux/sh_timer.h> 17#include <linux/sh_timer.h>
18#include <linux/usb/r8a66597.h>
18#include <asm/clock.h> 19#include <asm/clock.h>
19 20
20static struct resource iic_resources[] = { 21static struct resource iic_resources[] = {
@@ -38,18 +39,20 @@ static struct platform_device iic_device = {
38 .resource = iic_resources, 39 .resource = iic_resources,
39}; 40};
40 41
42static struct r8a66597_platdata r8a66597_data = {
43 /* This set zero to all members */
44};
45
41static struct resource usb_host_resources[] = { 46static struct resource usb_host_resources[] = {
42 [0] = { 47 [0] = {
43 .name = "r8a66597_hcd",
44 .start = 0xa4d80000, 48 .start = 0xa4d80000,
45 .end = 0xa4d800ff, 49 .end = 0xa4d800ff,
46 .flags = IORESOURCE_MEM, 50 .flags = IORESOURCE_MEM,
47 }, 51 },
48 [1] = { 52 [1] = {
49 .name = "r8a66597_hcd",
50 .start = 65, 53 .start = 65,
51 .end = 65, 54 .end = 65,
52 .flags = IORESOURCE_IRQ, 55 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
53 }, 56 },
54}; 57};
55 58
@@ -59,6 +62,7 @@ static struct platform_device usb_host_device = {
59 .dev = { 62 .dev = {
60 .dma_mask = NULL, 63 .dma_mask = NULL,
61 .coherent_dma_mask = 0xffffffff, 64 .coherent_dma_mask = 0xffffffff,
65 .platform_data = &r8a66597_data,
62 }, 66 },
63 .num_resources = ARRAY_SIZE(usb_host_resources), 67 .num_resources = ARRAY_SIZE(usb_host_resources),
64 .resource = usb_host_resources, 68 .resource = usb_host_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index d8f4a13aeff9..e1bb80b2a27b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -13,6 +13,7 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/uio_driver.h> 15#include <linux/uio_driver.h>
16#include <linux/usb/r8a66597.h>
16#include <linux/sh_timer.h> 17#include <linux/sh_timer.h>
17#include <linux/io.h> 18#include <linux/io.h>
18#include <asm/clock.h> 19#include <asm/clock.h>
@@ -396,9 +397,12 @@ static struct platform_device rtc_device = {
396 .resource = rtc_resources, 397 .resource = rtc_resources,
397}; 398};
398 399
400static struct r8a66597_platdata r8a66597_data = {
401 /* This set zero to all members */
402};
403
399static struct resource sh7723_usb_host_resources[] = { 404static struct resource sh7723_usb_host_resources[] = {
400 [0] = { 405 [0] = {
401 .name = "r8a66597_hcd",
402 .start = 0xa4d80000, 406 .start = 0xa4d80000,
403 .end = 0xa4d800ff, 407 .end = 0xa4d800ff,
404 .flags = IORESOURCE_MEM, 408 .flags = IORESOURCE_MEM,
@@ -406,7 +410,7 @@ static struct resource sh7723_usb_host_resources[] = {
406 [1] = { 410 [1] = {
407 .start = 65, 411 .start = 65,
408 .end = 65, 412 .end = 65,
409 .flags = IORESOURCE_IRQ, 413 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
410 }, 414 },
411}; 415};
412 416
@@ -416,6 +420,7 @@ static struct platform_device sh7723_usb_host_device = {
416 .dev = { 420 .dev = {
417 .dma_mask = NULL, /* not use dma */ 421 .dma_mask = NULL, /* not use dma */
418 .coherent_dma_mask = 0xffffffff, 422 .coherent_dma_mask = 0xffffffff,
423 .platform_data = &r8a66597_data,
419 }, 424 },
420 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources), 425 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources),
421 .resource = sh7723_usb_host_resources, 426 .resource = sh7723_usb_host_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index b8869aa20dec..2b6b0d50c576 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -35,8 +35,7 @@ void __init plat_smp_setup(void)
35 unsigned int cpu = 0; 35 unsigned int cpu = 0;
36 int i, num; 36 int i, num;
37 37
38 cpus_clear(cpu_possible_map); 38 init_cpu_possible(cpumask_of(cpu));
39 cpu_set(cpu, cpu_possible_map);
40 39
41 __cpu_number_map[0] = 0; 40 __cpu_number_map[0] = 0;
42 __cpu_logical_map[0] = 0; 41 __cpu_logical_map[0] = 0;
@@ -46,7 +45,7 @@ void __init plat_smp_setup(void)
46 * for the total number of cores. 45 * for the total number of cores.
47 */ 46 */
48 for (i = 1, num = 0; i < NR_CPUS; i++) { 47 for (i = 1, num = 0; i < NR_CPUS; i++) {
49 cpu_set(i, cpu_possible_map); 48 set_cpu_possible(i, true);
50 __cpu_number_map[i] = ++num; 49 __cpu_number_map[i] = ++num;
51 __cpu_logical_map[num] = i; 50 __cpu_logical_map[num] = i;
52 } 51 }
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 4c3247477aa3..066f37dc32a9 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2008 Matt Fleming <mjf@gentoo.org> 2 * Copyright (C) 2008 Matt Fleming <matt@console-pimps.org>
3 * Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org> 3 * Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org>
4 * 4 *
5 * Code for replacing ftrace calls with jumps. 5 * Code for replacing ftrace calls with jumps.
@@ -19,30 +19,37 @@
19#include <asm/ftrace.h> 19#include <asm/ftrace.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21 21
22static unsigned char ftrace_nop[] = {
23 0x09, 0x00, /* nop */
24 0x09, 0x00, /* nop */
25};
26
27static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE]; 22static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE];
28 23
29unsigned char *ftrace_nop_replace(void) 24static unsigned char ftrace_nop[4];
25/*
26 * If we're trying to nop out a call to a function, we instead
27 * place a call to the address after the memory table.
28 *
29 * 8c011060 <a>:
30 * 8c011060: 02 d1 mov.l 8c01106c <a+0xc>,r1
31 * 8c011062: 22 4f sts.l pr,@-r15
32 * 8c011064: 02 c7 mova 8c011070 <a+0x10>,r0
33 * 8c011066: 2b 41 jmp @r1
34 * 8c011068: 2a 40 lds r0,pr
35 * 8c01106a: 09 00 nop
36 * 8c01106c: 68 24 .word 0x2468 <--- ip
37 * 8c01106e: 1d 8c .word 0x8c1d
38 * 8c011070: 26 4f lds.l @r15+,pr <--- ip + MCOUNT_INSN_SIZE
39 *
40 * We write 0x8c011070 to 0x8c01106c so that on entry to a() we branch
41 * past the _mcount call and continue executing code like normal.
42 */
43static unsigned char *ftrace_nop_replace(unsigned long ip)
30{ 44{
45 __raw_writel(ip + MCOUNT_INSN_SIZE, ftrace_nop);
31 return ftrace_nop; 46 return ftrace_nop;
32} 47}
33 48
34static int is_sh_nop(unsigned char *ip) 49static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
35{
36 return strncmp(ip, ftrace_nop, sizeof(ftrace_nop));
37}
38
39unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
40{ 50{
41 /* Place the address in the memory table. */ 51 /* Place the address in the memory table. */
42 if (addr == CALLER_ADDR) 52 __raw_writel(addr, ftrace_replaced_code);
43 __raw_writel(addr + MCOUNT_INSN_OFFSET, ftrace_replaced_code);
44 else
45 __raw_writel(addr, ftrace_replaced_code);
46 53
47 /* 54 /*
48 * No locking needed, this must be called via kstop_machine 55 * No locking needed, this must be called via kstop_machine
@@ -51,7 +58,7 @@ unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
51 return ftrace_replaced_code; 58 return ftrace_replaced_code;
52} 59}
53 60
54int ftrace_modify_code(unsigned long ip, unsigned char *old_code, 61static int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
55 unsigned char *new_code) 62 unsigned char *new_code)
56{ 63{
57 unsigned char replaced[MCOUNT_INSN_SIZE]; 64 unsigned char replaced[MCOUNT_INSN_SIZE];
@@ -66,13 +73,6 @@ int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
66 * kstop_machine, or before SMP starts. 73 * kstop_machine, or before SMP starts.
67 */ 74 */
68 75
69 /*
70 * If we're trying to nop out a call to a function, we instead
71 * place a call to the address after the memory table.
72 */
73 if (is_sh_nop(new_code) == 0)
74 __raw_writel(ip + MCOUNT_INSN_SIZE, (unsigned long)new_code);
75
76 /* read the text we want to modify */ 76 /* read the text we want to modify */
77 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE)) 77 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE))
78 return -EFAULT; 78 return -EFAULT;
@@ -92,13 +92,13 @@ int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
92 92
93int ftrace_update_ftrace_func(ftrace_func_t func) 93int ftrace_update_ftrace_func(ftrace_func_t func)
94{ 94{
95 unsigned long ip = (unsigned long)(&ftrace_call); 95 unsigned long ip = (unsigned long)(&ftrace_call) + MCOUNT_INSN_OFFSET;
96 unsigned char old[MCOUNT_INSN_SIZE], *new; 96 unsigned char old[MCOUNT_INSN_SIZE], *new;
97 97
98 memcpy(old, (unsigned char *)(ip + MCOUNT_INSN_OFFSET), MCOUNT_INSN_SIZE); 98 memcpy(old, (unsigned char *)ip, MCOUNT_INSN_SIZE);
99 new = ftrace_call_replace(ip, (unsigned long)func); 99 new = ftrace_call_replace(ip, (unsigned long)func);
100 100
101 return ftrace_modify_code(ip + MCOUNT_INSN_OFFSET, old, new); 101 return ftrace_modify_code(ip, old, new);
102} 102}
103 103
104int ftrace_make_nop(struct module *mod, 104int ftrace_make_nop(struct module *mod,
@@ -108,7 +108,7 @@ int ftrace_make_nop(struct module *mod,
108 unsigned long ip = rec->ip; 108 unsigned long ip = rec->ip;
109 109
110 old = ftrace_call_replace(ip, addr); 110 old = ftrace_call_replace(ip, addr);
111 new = ftrace_nop_replace(); 111 new = ftrace_nop_replace(ip);
112 112
113 return ftrace_modify_code(rec->ip, old, new); 113 return ftrace_modify_code(rec->ip, old, new);
114} 114}
@@ -118,7 +118,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
118 unsigned char *new, *old; 118 unsigned char *new, *old;
119 unsigned long ip = rec->ip; 119 unsigned long ip = rec->ip;
120 120
121 old = ftrace_nop_replace(); 121 old = ftrace_nop_replace(ip);
122 new = ftrace_call_replace(ip, addr); 122 new = ftrace_call_replace(ip, addr);
123 123
124 return ftrace_modify_code(rec->ip, old, new); 124 return ftrace_modify_code(rec->ip, old, new);
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 9289ede29c7b..92d7740faab1 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -119,8 +119,6 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
119 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 119 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
120 &regs, 0, NULL, NULL); 120 &regs, 0, NULL, NULL);
121 121
122 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
123
124 return pid; 122 return pid;
125} 123}
126 124
@@ -367,11 +365,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
367 goto out; 365 goto out;
368 366
369 error = do_execve(filename, uargv, uenvp, regs); 367 error = do_execve(filename, uargv, uenvp, regs);
370 if (error == 0) {
371 task_lock(current);
372 current->ptrace &= ~PT_DTRACE;
373 task_unlock(current);
374 }
375 putname(filename); 368 putname(filename);
376out: 369out:
377 return error; 370 return error;
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index 96be839040f8..24de74214940 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -323,7 +323,6 @@ ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *))
323int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 323int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
324{ 324{
325 struct pt_regs regs; 325 struct pt_regs regs;
326 int pid;
327 326
328 memset(&regs, 0, sizeof(regs)); 327 memset(&regs, 0, sizeof(regs));
329 regs.regs[2] = (unsigned long)arg; 328 regs.regs[2] = (unsigned long)arg;
@@ -333,12 +332,8 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
333 regs.sr = (1 << 30); 332 regs.sr = (1 << 30);
334 333
335 /* Ok, create the new process.. */ 334 /* Ok, create the new process.. */
336 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 335 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
337 &regs, 0, NULL, NULL); 336 &regs, 0, NULL, NULL);
338
339 trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
340
341 return pid;
342} 337}
343 338
344/* 339/*
@@ -529,11 +524,6 @@ asmlinkage int sys_execve(char *ufilename, char **uargv,
529 (char __user * __user *)uargv, 524 (char __user * __user *)uargv,
530 (char __user * __user *)uenvp, 525 (char __user * __user *)uenvp,
531 pregs); 526 pregs);
532 if (error == 0) {
533 task_lock(current);
534 current->ptrace &= ~PT_DTRACE;
535 task_unlock(current);
536 }
537 putname(filename); 527 putname(filename);
538out: 528out:
539 return error; 529 return error;
diff --git a/arch/sh/kernel/sh_ksyms_64.c b/arch/sh/kernel/sh_ksyms_64.c
index 8f54ef0cfbca..f5bd156ea504 100644
--- a/arch/sh/kernel/sh_ksyms_64.c
+++ b/arch/sh/kernel/sh_ksyms_64.c
@@ -38,13 +38,6 @@ EXPORT_SYMBOL(clear_user_page);
38EXPORT_SYMBOL(flush_dcache_page); 38EXPORT_SYMBOL(flush_dcache_page);
39#endif 39#endif
40 40
41/* Networking helper routines. */
42EXPORT_SYMBOL(csum_partial);
43EXPORT_SYMBOL(csum_partial_copy_nocheck);
44#ifdef CONFIG_IPV6
45EXPORT_SYMBOL(csum_ipv6_magic);
46#endif
47
48#ifdef CONFIG_VT 41#ifdef CONFIG_VT
49EXPORT_SYMBOL(screen_info); 42EXPORT_SYMBOL(screen_info);
50#endif 43#endif
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 17784e19ae34..b5afbec1db59 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -332,8 +332,8 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
332 332
333/* These symbols are defined with the addresses in the vsyscall page. 333/* These symbols are defined with the addresses in the vsyscall page.
334 See vsyscall-trapa.S. */ 334 See vsyscall-trapa.S. */
335extern void __user __kernel_sigreturn; 335extern void __kernel_sigreturn(void);
336extern void __user __kernel_rt_sigreturn; 336extern void __kernel_rt_sigreturn(void);
337 337
338static int setup_frame(int sig, struct k_sigaction *ka, 338static int setup_frame(int sig, struct k_sigaction *ka,
339 sigset_t *set, struct pt_regs *regs) 339 sigset_t *set, struct pt_regs *regs)
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 8f4027412614..442d8d47a41e 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -47,7 +47,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
47 plat_prepare_cpus(max_cpus); 47 plat_prepare_cpus(max_cpus);
48 48
49#ifndef CONFIG_HOTPLUG_CPU 49#ifndef CONFIG_HOTPLUG_CPU
50 cpu_present_map = cpu_possible_map; 50 init_cpu_present(&cpu_possible_map);
51#endif 51#endif
52} 52}
53 53
@@ -58,8 +58,8 @@ void __devinit smp_prepare_boot_cpu(void)
58 __cpu_number_map[0] = cpu; 58 __cpu_number_map[0] = cpu;
59 __cpu_logical_map[0] = cpu; 59 __cpu_logical_map[0] = cpu;
60 60
61 cpu_set(cpu, cpu_online_map); 61 set_cpu_online(cpu, true);
62 cpu_set(cpu, cpu_possible_map); 62 set_cpu_possible(cpu, true);
63} 63}
64 64
65asmlinkage void __cpuinit start_secondary(void) 65asmlinkage void __cpuinit start_secondary(void)
@@ -171,11 +171,11 @@ void smp_send_stop(void)
171 smp_call_function(stop_this_cpu, 0, 0); 171 smp_call_function(stop_this_cpu, 0, 0);
172} 172}
173 173
174void arch_send_call_function_ipi(cpumask_t mask) 174void arch_send_call_function_ipi_mask(const struct cpumask *mask)
175{ 175{
176 int cpu; 176 int cpu;
177 177
178 for_each_cpu_mask(cpu, mask) 178 for_each_cpu(cpu, mask)
179 plat_send_ipi(cpu, SMP_MSG_FUNCTION); 179 plat_send_ipi(cpu, SMP_MSG_FUNCTION);
180} 180}
181 181
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index e3a7e36639ef..90d00e47264d 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -88,8 +88,6 @@ asmlinkage int sys_ipc(uint call, int first, int second,
88 version = call >> 16; /* hack for backward compatibility */ 88 version = call >> 16; /* hack for backward compatibility */
89 call &= 0xffff; 89 call &= 0xffff;
90 90
91 trace_mark(kernel_arch_ipc_call, "call %u first %d", call, first);
92
93 if (call <= SEMTIMEDOP) 91 if (call <= SEMTIMEDOP)
94 switch (call) { 92 switch (call) {
95 case SEMOP: 93 case SEMOP:
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index a9fff9f731ec..f9e21fa2f592 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -352,3 +352,4 @@ ENTRY(sys_call_table)
352 .long sys_preadv 352 .long sys_preadv
353 .long sys_pwritev 353 .long sys_pwritev
354 .long sys_rt_tgsigqueueinfo /* 335 */ 354 .long sys_rt_tgsigqueueinfo /* 335 */
355 .long sys_perf_counter_open
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index 75c1889af1ed..bf420b616ae0 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -390,3 +390,4 @@ sys_call_table:
390 .long sys_preadv 390 .long sys_preadv
391 .long sys_pwritev 391 .long sys_pwritev
392 .long sys_rt_tgsigqueueinfo 392 .long sys_rt_tgsigqueueinfo
393 .long sys_perf_counter_open
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 2edde32c764b..9b352a1e3fb4 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -91,21 +91,6 @@ module_init(rtc_generic_init);
91 91
92void (*board_time_init)(void); 92void (*board_time_init)(void);
93 93
94unsigned long long sched_clock(void)
95{
96 return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ);
97}
98
99static void __init sh_late_time_init(void)
100{
101 /*
102 * Make sure all compiled-in early timers register themselves.
103 * Run probe() for one "earlytimer" device.
104 */
105 early_platform_driver_register_all("earlytimer");
106 early_platform_driver_probe("earlytimer", 1, 0);
107}
108
109void __init time_init(void) 94void __init time_init(void)
110{ 95{
111 if (board_time_init) 96 if (board_time_init)
@@ -121,5 +106,15 @@ void __init time_init(void)
121 local_timer_setup(smp_processor_id()); 106 local_timer_setup(smp_processor_id());
122#endif 107#endif
123 108
124 late_time_init = sh_late_time_init; 109 /*
110 * Make sure all compiled-in early timers register themselves.
111 *
112 * Run probe() for two "earlytimer" devices, these will be the
113 * clockevents and clocksource devices respectively. In the event
114 * that only a clockevents device is available, we -ENODEV on the
115 * clocksource and the jiffies clocksource is used transparently
116 * instead. No error handling is necessary here.
117 */
118 early_platform_driver_register_all("earlytimer");
119 early_platform_driver_probe("earlytimer", 2, 0);
125} 120}
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 46348ed07cc3..b3e0067db358 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -69,6 +69,7 @@ BUILD_TRAP_HANDLER(bug)
69 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs); 69 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs);
70 if (insn == TRAPA_BUG_OPCODE) 70 if (insn == TRAPA_BUG_OPCODE)
71 handle_BUG(regs); 71 handle_BUG(regs);
72 return;
72 } 73 }
73#endif 74#endif
74 75
diff --git a/arch/sh/lib64/Makefile b/arch/sh/lib64/Makefile
index 4bacb9e83478..334bb2da36ea 100644
--- a/arch/sh/lib64/Makefile
+++ b/arch/sh/lib64/Makefile
@@ -10,7 +10,7 @@
10# 10#
11 11
12# Panic should really be compiled as PIC 12# Panic should really be compiled as PIC
13lib-y := udelay.o c-checksum.o dbg.o panic.o memcpy.o memset.o \ 13lib-y := udelay.o dbg.o panic.o memcpy.o memset.o \
14 copy_user_memcpy.o copy_page.o clear_page.o strcpy.o strlen.o 14 copy_user_memcpy.o copy_page.o clear_page.o strcpy.o strlen.o
15 15
16# Extracted from libgcc 16# Extracted from libgcc
diff --git a/arch/sh/lib64/c-checksum.c b/arch/sh/lib64/c-checksum.c
deleted file mode 100644
index 73c0877e3a29..000000000000
--- a/arch/sh/lib64/c-checksum.c
+++ /dev/null
@@ -1,214 +0,0 @@
1/*
2 * arch/sh/lib64/c-checksum.c
3 *
4 * This file contains network checksum routines that are better done
5 * in an architecture-specific manner due to speed..
6 */
7#include <linux/string.h>
8#include <linux/errno.h>
9#include <linux/kernel.h>
10#include <linux/module.h>
11#include <asm/byteorder.h>
12#include <asm/uaccess.h>
13
14static inline unsigned short from64to16(unsigned long long x)
15{
16 /* add up 32-bit words for 33 bits */
17 x = (x & 0xffffffff) + (x >> 32);
18 /* add up 16-bit and 17-bit words for 17+c bits */
19 x = (x & 0xffff) + (x >> 16);
20 /* add up 16-bit and 2-bit for 16+c bit */
21 x = (x & 0xffff) + (x >> 16);
22 /* add up carry.. */
23 x = (x & 0xffff) + (x >> 16);
24 return x;
25}
26
27static inline unsigned short foldto16(unsigned long x)
28{
29 /* add up 16-bit for 17 bits */
30 x = (x & 0xffff) + (x >> 16);
31 /* add up carry.. */
32 x = (x & 0xffff) + (x >> 16);
33 return x;
34}
35
36static inline unsigned short myfoldto16(unsigned long long x)
37{
38 /* Fold down to 32-bits so we don't lose in the typedef-less
39 network stack. */
40 /* 64 to 33 */
41 x = (x & 0xffffffff) + (x >> 32);
42 /* 33 to 32 */
43 x = (x & 0xffffffff) + (x >> 32);
44
45 /* add up 16-bit for 17 bits */
46 x = (x & 0xffff) + (x >> 16);
47 /* add up carry.. */
48 x = (x & 0xffff) + (x >> 16);
49 return x;
50}
51
52#define odd(x) ((x)&1)
53#define U16(x) ntohs(x)
54
55static unsigned long do_csum(const unsigned char *buff, int len)
56{
57 int odd, count;
58 unsigned long result = 0;
59
60 pr_debug("do_csum buff %p, len %d (0x%x)\n", buff, len, len);
61#ifdef DEBUG
62 for (i = 0; i < len; i++) {
63 if ((i % 26) == 0)
64 printk("\n");
65 printk("%02X ", buff[i]);
66 }
67#endif
68
69 if (len <= 0)
70 goto out;
71
72 odd = 1 & (unsigned long) buff;
73 if (odd) {
74 result = *buff << 8;
75 len--;
76 buff++;
77 }
78 count = len >> 1; /* nr of 16-bit words.. */
79 if (count) {
80 if (2 & (unsigned long) buff) {
81 result += *(unsigned short *) buff;
82 count--;
83 len -= 2;
84 buff += 2;
85 }
86 count >>= 1; /* nr of 32-bit words.. */
87 if (count) {
88 unsigned long carry = 0;
89 do {
90 unsigned long w = *(unsigned long *) buff;
91 buff += 4;
92 count--;
93 result += carry;
94 result += w;
95 carry = (w > result);
96 } while (count);
97 result += carry;
98 result = (result & 0xffff) + (result >> 16);
99 }
100 if (len & 2) {
101 result += *(unsigned short *) buff;
102 buff += 2;
103 }
104 }
105 if (len & 1)
106 result += *buff;
107 result = foldto16(result);
108 if (odd)
109 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
110
111 pr_debug("\nCHECKSUM is 0x%lx\n", result);
112
113 out:
114 return result;
115}
116
117/* computes the checksum of a memory block at buff, length len,
118 and adds in "sum" (32-bit) */
119__wsum csum_partial(const void *buff, int len, __wsum sum)
120{
121 unsigned long long result = do_csum(buff, len);
122
123 /* add in old sum, and carry.. */
124 result += (__force u32)sum;
125 /* 32+c bits -> 32 bits */
126 result = (result & 0xffffffff) + (result >> 32);
127
128 pr_debug("csum_partial, buff %p len %d sum 0x%x result=0x%016Lx\n",
129 buff, len, sum, result);
130
131 return (__force __wsum)result;
132}
133
134/* Copy while checksumming, otherwise like csum_partial. */
135__wsum
136csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
137{
138 sum = csum_partial(src, len, sum);
139 memcpy(dst, src, len);
140
141 return sum;
142}
143
144/* Copy from userspace and compute checksum. If we catch an exception
145 then zero the rest of the buffer. */
146__wsum
147csum_partial_copy_from_user(const void __user *src, void *dst, int len,
148 __wsum sum, int *err_ptr)
149{
150 int missing;
151
152 pr_debug
153 ("csum_partial_copy_from_user src %p, dest %p, len %d, sum %08x, err_ptr %p\n",
154 src, dst, len, sum, err_ptr);
155 missing = copy_from_user(dst, src, len);
156 pr_debug(" access_ok %d\n", __access_ok((unsigned long) src, len));
157 pr_debug(" missing %d\n", missing);
158 if (missing) {
159 memset(dst + len - missing, 0, missing);
160 *err_ptr = -EFAULT;
161 }
162
163 return csum_partial(dst, len, sum);
164}
165
166/* Copy to userspace and compute checksum. */
167__wsum
168csum_partial_copy_to_user(const unsigned char *src, unsigned char *dst, int len,
169 __wsum sum, int *err_ptr)
170{
171 sum = csum_partial(src, len, sum);
172
173 if (copy_to_user(dst, src, len))
174 *err_ptr = -EFAULT;
175
176 return sum;
177}
178
179/*
180 * This is a version of ip_compute_csum() optimized for IP headers,
181 * which always checksum on 4 octet boundaries.
182 */
183__sum16 ip_fast_csum(const void *iph, unsigned int ihl)
184{
185 pr_debug("ip_fast_csum %p,%d\n", iph, ihl);
186
187 return (__force __sum16)~do_csum(iph, ihl * 4);
188}
189
190__wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
191 unsigned short len,
192 unsigned short proto, __wsum sum)
193{
194 unsigned long long result;
195
196 pr_debug("ntohs(0x%x)=0x%x\n", 0xdead, ntohs(0xdead));
197 pr_debug("htons(0x%x)=0x%x\n", 0xdead, htons(0xdead));
198
199 result = (__force u64) saddr + (__force u64) daddr +
200 (__force u64) sum + ((len + proto) << 8);
201
202 /* Fold down to 32-bits so we don't lose in the typedef-less
203 network stack. */
204 /* 64 to 33 */
205 result = (result & 0xffffffff) + (result >> 32);
206 /* 33 to 32 */
207 result = (result & 0xffffffff) + (result >> 32);
208
209 pr_debug("%s saddr %x daddr %x len %x proto %x sum %x result %08Lx\n",
210 __func__, saddr, daddr, len, proto, sum, result);
211
212 return (__wsum)result;
213}
214EXPORT_SYMBOL(csum_tcpudp_nofold);
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 31a33ebdef6f..2c50f80fc332 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -249,9 +249,6 @@ static inline int notify_page_fault(struct pt_regs *regs, int trap)
249{ 249{
250 int ret = 0; 250 int ret = 0;
251 251
252 trace_mark(kernel_arch_trap_entry, "trap_id %d ip #p%ld",
253 trap >> 5, instruction_pointer(regs));
254
255#ifdef CONFIG_KPROBES 252#ifdef CONFIG_KPROBES
256 if (!user_mode(regs)) { 253 if (!user_mode(regs)) {
257 preempt_disable(); 254 preempt_disable();
@@ -327,6 +324,5 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
327 324
328 ret = 0; 325 ret = 0;
329out: 326out:
330 trace_mark(kernel_arch_trap_exit, MARK_NOARGS);
331 return ret; 327 return ret;
332} 328}
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index ca92e2f54e4d..ed6be6ba2f4e 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1796,10 +1796,16 @@ void __init paging_init(void)
1796 1796
1797 prom_build_devicetree(); 1797 prom_build_devicetree();
1798 of_populate_present_mask(); 1798 of_populate_present_mask();
1799#ifndef CONFIG_SMP
1800 of_fill_in_cpu_data();
1801#endif
1799 1802
1800 if (tlb_type == hypervisor) { 1803 if (tlb_type == hypervisor) {
1801 sun4v_mdesc_init(); 1804 sun4v_mdesc_init();
1802 mdesc_populate_present_mask(cpu_all_mask); 1805 mdesc_populate_present_mask(cpu_all_mask);
1806#ifndef CONFIG_SMP
1807 mdesc_fill_in_cpu_data(cpu_all_mask);
1808#endif
1803 } 1809 }
1804 1810
1805 /* Once the OF device tree and MDESC have been setup, we know 1811 /* Once the OF device tree and MDESC have been setup, we know
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index cf42fc305419..73c0bda73fcd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -28,6 +28,7 @@ config X86
28 select HAVE_KPROBES 28 select HAVE_KPROBES
29 select ARCH_WANT_OPTIONAL_GPIOLIB 29 select ARCH_WANT_OPTIONAL_GPIOLIB
30 select ARCH_WANT_FRAME_POINTERS 30 select ARCH_WANT_FRAME_POINTERS
31 select HAVE_DMA_ATTRS
31 select HAVE_KRETPROBES 32 select HAVE_KRETPROBES
32 select HAVE_FTRACE_MCOUNT_RECORD 33 select HAVE_FTRACE_MCOUNT_RECORD
33 select HAVE_DYNAMIC_FTRACE 34 select HAVE_DYNAMIC_FTRACE
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 8d16ada25048..ec749c2bfdd7 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -70,6 +70,7 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
70 $(call cc-option, -mpreferred-stack-boundary=2) 70 $(call cc-option, -mpreferred-stack-boundary=2)
71KBUILD_CFLAGS += $(call cc-option, -m32) 71KBUILD_CFLAGS += $(call cc-option, -m32)
72KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 72KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
73GCOV_PROFILE := n
73 74
74$(obj)/bzImage: asflags-y := $(SVGA_MODE) 75$(obj)/bzImage: asflags-y := $(SVGA_MODE)
75 76
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 49c8a4c37d7c..e2ff504b4ddc 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -15,6 +15,7 @@ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
15KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) 15KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
16 16
17KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 17KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
18GCOV_PROFILE := n
18 19
19LDFLAGS := -m elf_$(UTS_MACHINE) 20LDFLAGS := -m elf_$(UTS_MACHINE)
20LDFLAGS_vmlinux := -T 21LDFLAGS_vmlinux := -T
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index b93405b228b4..1c3f9435f1c9 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -33,6 +33,8 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
33#endif 33#endif
34} 34}
35 35
36#include <asm-generic/dma-mapping-common.h>
37
36/* Make sure we keep the same behaviour */ 38/* Make sure we keep the same behaviour */
37static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 39static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
38{ 40{
@@ -53,177 +55,6 @@ extern int dma_set_mask(struct device *dev, u64 mask);
53extern void *dma_generic_alloc_coherent(struct device *dev, size_t size, 55extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
54 dma_addr_t *dma_addr, gfp_t flag); 56 dma_addr_t *dma_addr, gfp_t flag);
55 57
56static inline dma_addr_t
57dma_map_single(struct device *hwdev, void *ptr, size_t size,
58 enum dma_data_direction dir)
59{
60 struct dma_map_ops *ops = get_dma_ops(hwdev);
61 dma_addr_t addr;
62
63 BUG_ON(!valid_dma_direction(dir));
64 kmemcheck_mark_initialized(ptr, size);
65 addr = ops->map_page(hwdev, virt_to_page(ptr),
66 (unsigned long)ptr & ~PAGE_MASK, size,
67 dir, NULL);
68 debug_dma_map_page(hwdev, virt_to_page(ptr),
69 (unsigned long)ptr & ~PAGE_MASK, size,
70 dir, addr, true);
71 return addr;
72}
73
74static inline void
75dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size,
76 enum dma_data_direction dir)
77{
78 struct dma_map_ops *ops = get_dma_ops(dev);
79
80 BUG_ON(!valid_dma_direction(dir));
81 if (ops->unmap_page)
82 ops->unmap_page(dev, addr, size, dir, NULL);
83 debug_dma_unmap_page(dev, addr, size, dir, true);
84}
85
86static inline int
87dma_map_sg(struct device *hwdev, struct scatterlist *sg,
88 int nents, enum dma_data_direction dir)
89{
90 struct dma_map_ops *ops = get_dma_ops(hwdev);
91 int ents;
92 struct scatterlist *s;
93 int i;
94
95 BUG_ON(!valid_dma_direction(dir));
96 for_each_sg(sg, s, nents, i)
97 kmemcheck_mark_initialized(sg_virt(s), s->length);
98 ents = ops->map_sg(hwdev, sg, nents, dir, NULL);
99 debug_dma_map_sg(hwdev, sg, nents, ents, dir);
100
101 return ents;
102}
103
104static inline void
105dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
106 enum dma_data_direction dir)
107{
108 struct dma_map_ops *ops = get_dma_ops(hwdev);
109
110 BUG_ON(!valid_dma_direction(dir));
111 debug_dma_unmap_sg(hwdev, sg, nents, dir);
112 if (ops->unmap_sg)
113 ops->unmap_sg(hwdev, sg, nents, dir, NULL);
114}
115
116static inline void
117dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
118 size_t size, enum dma_data_direction dir)
119{
120 struct dma_map_ops *ops = get_dma_ops(hwdev);
121
122 BUG_ON(!valid_dma_direction(dir));
123 if (ops->sync_single_for_cpu)
124 ops->sync_single_for_cpu(hwdev, dma_handle, size, dir);
125 debug_dma_sync_single_for_cpu(hwdev, dma_handle, size, dir);
126 flush_write_buffers();
127}
128
129static inline void
130dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle,
131 size_t size, enum dma_data_direction dir)
132{
133 struct dma_map_ops *ops = get_dma_ops(hwdev);
134
135 BUG_ON(!valid_dma_direction(dir));
136 if (ops->sync_single_for_device)
137 ops->sync_single_for_device(hwdev, dma_handle, size, dir);
138 debug_dma_sync_single_for_device(hwdev, dma_handle, size, dir);
139 flush_write_buffers();
140}
141
142static inline void
143dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
144 unsigned long offset, size_t size,
145 enum dma_data_direction dir)
146{
147 struct dma_map_ops *ops = get_dma_ops(hwdev);
148
149 BUG_ON(!valid_dma_direction(dir));
150 if (ops->sync_single_range_for_cpu)
151 ops->sync_single_range_for_cpu(hwdev, dma_handle, offset,
152 size, dir);
153 debug_dma_sync_single_range_for_cpu(hwdev, dma_handle,
154 offset, size, dir);
155 flush_write_buffers();
156}
157
158static inline void
159dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
160 unsigned long offset, size_t size,
161 enum dma_data_direction dir)
162{
163 struct dma_map_ops *ops = get_dma_ops(hwdev);
164
165 BUG_ON(!valid_dma_direction(dir));
166 if (ops->sync_single_range_for_device)
167 ops->sync_single_range_for_device(hwdev, dma_handle,
168 offset, size, dir);
169 debug_dma_sync_single_range_for_device(hwdev, dma_handle,
170 offset, size, dir);
171 flush_write_buffers();
172}
173
174static inline void
175dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
176 int nelems, enum dma_data_direction dir)
177{
178 struct dma_map_ops *ops = get_dma_ops(hwdev);
179
180 BUG_ON(!valid_dma_direction(dir));
181 if (ops->sync_sg_for_cpu)
182 ops->sync_sg_for_cpu(hwdev, sg, nelems, dir);
183 debug_dma_sync_sg_for_cpu(hwdev, sg, nelems, dir);
184 flush_write_buffers();
185}
186
187static inline void
188dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
189 int nelems, enum dma_data_direction dir)
190{
191 struct dma_map_ops *ops = get_dma_ops(hwdev);
192
193 BUG_ON(!valid_dma_direction(dir));
194 if (ops->sync_sg_for_device)
195 ops->sync_sg_for_device(hwdev, sg, nelems, dir);
196 debug_dma_sync_sg_for_device(hwdev, sg, nelems, dir);
197
198 flush_write_buffers();
199}
200
201static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
202 size_t offset, size_t size,
203 enum dma_data_direction dir)
204{
205 struct dma_map_ops *ops = get_dma_ops(dev);
206 dma_addr_t addr;
207
208 BUG_ON(!valid_dma_direction(dir));
209 kmemcheck_mark_initialized(page_address(page) + offset, size);
210 addr = ops->map_page(dev, page, offset, size, dir, NULL);
211 debug_dma_map_page(dev, page, offset, size, dir, addr, false);
212
213 return addr;
214}
215
216static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
217 size_t size, enum dma_data_direction dir)
218{
219 struct dma_map_ops *ops = get_dma_ops(dev);
220
221 BUG_ON(!valid_dma_direction(dir));
222 if (ops->unmap_page)
223 ops->unmap_page(dev, addr, size, dir, NULL);
224 debug_dma_unmap_page(dev, addr, size, dir, false);
225}
226
227static inline void 58static inline void
228dma_cache_sync(struct device *dev, void *vaddr, size_t size, 59dma_cache_sync(struct device *dev, void *vaddr, size_t size,
229 enum dma_data_direction dir) 60 enum dma_data_direction dir)
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index f3477bb84566..6c327b852e23 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -24,6 +24,8 @@ CFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp)
24CFLAGS_hpet.o := $(nostackp) 24CFLAGS_hpet.o := $(nostackp)
25CFLAGS_tsc.o := $(nostackp) 25CFLAGS_tsc.o := $(nostackp)
26CFLAGS_paravirt.o := $(nostackp) 26CFLAGS_paravirt.o := $(nostackp)
27GCOV_PROFILE_vsyscall_64.o := n
28GCOV_PROFILE_hpet.o := n
27 29
28obj-y := process_$(BITS).o signal.o entry_$(BITS).o 30obj-y := process_$(BITS).o signal.o entry_$(BITS).o
29obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o 31obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
diff --git a/arch/x86/kernel/acpi/realmode/Makefile b/arch/x86/kernel/acpi/realmode/Makefile
index 167bc16ce0e5..6a564ac67ef5 100644
--- a/arch/x86/kernel/acpi/realmode/Makefile
+++ b/arch/x86/kernel/acpi/realmode/Makefile
@@ -42,6 +42,7 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D_WAKEUP -D__KERNEL__ \
42 $(call cc-option, -mpreferred-stack-boundary=2) 42 $(call cc-option, -mpreferred-stack-boundary=2)
43KBUILD_CFLAGS += $(call cc-option, -m32) 43KBUILD_CFLAGS += $(call cc-option, -m32)
44KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 44KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
45GCOV_PROFILE := n
45 46
46WAKEUP_OBJS = $(addprefix $(obj)/,$(wakeup-y)) 47WAKEUP_OBJS = $(addprefix $(obj)/,$(wakeup-y))
47 48
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 16a9020c8f11..88112b49f02c 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -123,6 +123,7 @@ quiet_cmd_vdso = VDSO $@
123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) 123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
124 124
125VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv) 125VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv)
126GCOV_PROFILE := n
126 127
127# 128#
128# Install the unstripped copy of vdso*.so listed in $(vdso-install-y). 129# Install the unstripped copy of vdso*.so listed in $(vdso-install-y).
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index 031f36685710..e1a04a346e75 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -331,11 +331,6 @@ long xtensa_execve(char __user *name, char __user * __user *argv,
331 if (IS_ERR(filename)) 331 if (IS_ERR(filename))
332 goto out; 332 goto out;
333 error = do_execve(filename, argv, envp, regs); 333 error = do_execve(filename, argv, envp, regs);
334 if (error == 0) {
335 task_lock(current);
336 current->ptrace &= ~PT_DTRACE;
337 task_unlock(current);
338 }
339 putname(filename); 334 putname(filename);
340out: 335out:
341 return error; 336 return error;
diff --git a/drivers/Kconfig b/drivers/Kconfig
index a442c8f29fc1..48bbdbe43e69 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -52,6 +52,8 @@ source "drivers/i2c/Kconfig"
52 52
53source "drivers/spi/Kconfig" 53source "drivers/spi/Kconfig"
54 54
55source "drivers/pps/Kconfig"
56
55source "drivers/gpio/Kconfig" 57source "drivers/gpio/Kconfig"
56 58
57source "drivers/w1/Kconfig" 59source "drivers/w1/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index 00b44f4ccf03..bc4205d2fc3c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -72,6 +72,7 @@ obj-$(CONFIG_INPUT) += input/
72obj-$(CONFIG_I2O) += message/ 72obj-$(CONFIG_I2O) += message/
73obj-$(CONFIG_RTC_LIB) += rtc/ 73obj-$(CONFIG_RTC_LIB) += rtc/
74obj-y += i2c/ media/ 74obj-y += i2c/ media/
75obj-$(CONFIG_PPS) += pps/
75obj-$(CONFIG_W1) += w1/ 76obj-$(CONFIG_W1) += w1/
76obj-$(CONFIG_POWER_SUPPLY) += power/ 77obj-$(CONFIG_POWER_SUPPLY) += power/
77obj-$(CONFIG_HWMON) += hwmon/ 78obj-$(CONFIG_HWMON) += hwmon/
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 68d27bc70d06..2bc2dbe30e8f 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -694,7 +694,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
694 struct bcom_task *dmatsk = NULL; 694 struct bcom_task *dmatsk = NULL;
695 695
696 /* Get ipb frequency */ 696 /* Get ipb frequency */
697 ipb_freq = mpc52xx_find_ipb_freq(op->node); 697 ipb_freq = mpc5xxx_get_bus_frequency(op->node);
698 if (!ipb_freq) { 698 if (!ipb_freq) {
699 dev_err(&op->dev, "could not determine IPB bus frequency\n"); 699 dev_err(&op->dev, "could not determine IPB bus frequency\n");
700 return -ENODEV; 700 return -ENODEV;
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 30bae6de6a0d..0bd01f49cfd8 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -807,7 +807,7 @@ if RTC_LIB=n
807config RTC 807config RTC
808 tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)" 808 tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
809 depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ 809 depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \
810 && !ARM && !SUPERH && !S390 && !AVR32 810 && !ARM && !SUPERH && !S390 && !AVR32 && !BLACKFIN
811 ---help--- 811 ---help---
812 If you say Y here and create a character special file /dev/rtc with 812 If you say Y here and create a character special file /dev/rtc with
813 major number 10 and minor number 135 using mknod ("man mknod"), you 813 major number 10 and minor number 135 using mknod ("man mknod"), you
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 6b900b297cc6..52e06589821d 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -571,7 +571,7 @@ static char dtlk_read_tts(void)
571 portval = inb_p(dtlk_port_tts); 571 portval = inb_p(dtlk_port_tts);
572 } while ((portval & TTS_READABLE) == 0 && 572 } while ((portval & TTS_READABLE) == 0 &&
573 retries++ < DTLK_MAX_RETRIES); 573 retries++ < DTLK_MAX_RETRIES);
574 if (retries == DTLK_MAX_RETRIES) 574 if (retries > DTLK_MAX_RETRIES)
575 printk(KERN_ERR "dtlk_read_tts() timeout\n"); 575 printk(KERN_ERR "dtlk_read_tts() timeout\n");
576 576
577 ch = inb_p(dtlk_port_tts); /* input from TTS port */ 577 ch = inb_p(dtlk_port_tts); /* input from TTS port */
@@ -583,7 +583,7 @@ static char dtlk_read_tts(void)
583 portval = inb_p(dtlk_port_tts); 583 portval = inb_p(dtlk_port_tts);
584 } while ((portval & TTS_READABLE) != 0 && 584 } while ((portval & TTS_READABLE) != 0 &&
585 retries++ < DTLK_MAX_RETRIES); 585 retries++ < DTLK_MAX_RETRIES);
586 if (retries == DTLK_MAX_RETRIES) 586 if (retries > DTLK_MAX_RETRIES)
587 printk(KERN_ERR "dtlk_read_tts() timeout\n"); 587 printk(KERN_ERR "dtlk_read_tts() timeout\n");
588 588
589 TRACE_RET; 589 TRACE_RET;
@@ -640,7 +640,7 @@ static char dtlk_write_tts(char ch)
640 while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 && 640 while ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0 &&
641 retries++ < DTLK_MAX_RETRIES) /* DT ready? */ 641 retries++ < DTLK_MAX_RETRIES) /* DT ready? */
642 ; 642 ;
643 if (retries == DTLK_MAX_RETRIES) 643 if (retries > DTLK_MAX_RETRIES)
644 printk(KERN_ERR "dtlk_write_tts() timeout\n"); 644 printk(KERN_ERR "dtlk_write_tts() timeout\n");
645 645
646 outb_p(ch, dtlk_port_tts); /* output to TTS port */ 646 outb_p(ch, dtlk_port_tts); /* output to TTS port */
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c
index 449727b6166d..936d05bf37fa 100644
--- a/drivers/char/hvc_iseries.c
+++ b/drivers/char/hvc_iseries.c
@@ -241,7 +241,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
241static struct vio_driver hvc_vio_driver = { 241static struct vio_driver hvc_vio_driver = {
242 .id_table = hvc_driver_table, 242 .id_table = hvc_driver_table,
243 .probe = hvc_vio_probe, 243 .probe = hvc_vio_probe,
244 .remove = hvc_vio_remove, 244 .remove = __devexit_p(hvc_vio_remove),
245 .driver = { 245 .driver = {
246 .name = hvc_driver_name, 246 .name = hvc_driver_name,
247 .owner = THIS_MODULE, 247 .owner = THIS_MODULE,
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index bd62dc86b47d..c72b994652ac 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -113,7 +113,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev)
113static struct vio_driver hvc_vio_driver = { 113static struct vio_driver hvc_vio_driver = {
114 .id_table = hvc_driver_table, 114 .id_table = hvc_driver_table,
115 .probe = hvc_vio_probe, 115 .probe = hvc_vio_probe,
116 .remove = hvc_vio_remove, 116 .remove = __devexit_p(hvc_vio_remove),
117 .driver = { 117 .driver = {
118 .name = hvc_driver_name, 118 .name = hvc_driver_name,
119 .owner = THIS_MODULE, 119 .owner = THIS_MODULE,
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
index 7d64e4230e66..266b858b8f85 100644
--- a/drivers/char/hvcs.c
+++ b/drivers/char/hvcs.c
@@ -868,7 +868,7 @@ static int __devexit hvcs_remove(struct vio_dev *dev)
868static struct vio_driver hvcs_vio_driver = { 868static struct vio_driver hvcs_vio_driver = {
869 .id_table = hvcs_driver_table, 869 .id_table = hvcs_driver_table,
870 .probe = hvcs_probe, 870 .probe = hvcs_probe,
871 .remove = hvcs_remove, 871 .remove = __devexit_p(hvcs_remove),
872 .driver = { 872 .driver = {
873 .name = hvcs_driver_name, 873 .name = hvcs_driver_name,
874 .owner = THIS_MODULE, 874 .owner = THIS_MODULE,
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 4d745a89504f..4159292e35cf 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1593,7 +1593,7 @@ static unsigned int card_count;
1593static int __devinit isicom_probe(struct pci_dev *pdev, 1593static int __devinit isicom_probe(struct pci_dev *pdev,
1594 const struct pci_device_id *ent) 1594 const struct pci_device_id *ent)
1595{ 1595{
1596 unsigned int signature, index; 1596 unsigned int uninitialized_var(signature), index;
1597 int retval = -EPERM; 1597 int retval = -EPERM;
1598 struct isi_board *board = NULL; 1598 struct isi_board *board = NULL;
1599 1599
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index e18800c400b1..0c999f5bb3db 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -3785,7 +3785,7 @@ err:
3785 return retval; 3785 return retval;
3786} 3786}
3787 3787
3788static void stli_pciremove(struct pci_dev *pdev) 3788static void __devexit stli_pciremove(struct pci_dev *pdev)
3789{ 3789{
3790 struct stlibrd *brdp = pci_get_drvdata(pdev); 3790 struct stlibrd *brdp = pci_get_drvdata(pdev);
3791 3791
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index f96d0bef855e..afa8813e737a 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -863,59 +863,58 @@ static const struct file_operations kmsg_fops = {
863 .write = kmsg_write, 863 .write = kmsg_write,
864}; 864};
865 865
866static int memory_open(struct inode * inode, struct file * filp) 866static const struct {
867{ 867 unsigned int minor;
868 int ret = 0; 868 char *name;
869 869 umode_t mode;
870 lock_kernel(); 870 const struct file_operations *fops;
871 switch (iminor(inode)) { 871 struct backing_dev_info *dev_info;
872 case 1: 872} devlist[] = { /* list of minor devices */
873 filp->f_op = &mem_fops; 873 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops,
874 filp->f_mapping->backing_dev_info = 874 &directly_mappable_cdev_bdi},
875 &directly_mappable_cdev_bdi;
876 break;
877#ifdef CONFIG_DEVKMEM 875#ifdef CONFIG_DEVKMEM
878 case 2: 876 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops,
879 filp->f_op = &kmem_fops; 877 &directly_mappable_cdev_bdi},
880 filp->f_mapping->backing_dev_info =
881 &directly_mappable_cdev_bdi;
882 break;
883#endif 878#endif
884 case 3: 879 {3, "null", S_IRUGO | S_IWUGO, &null_fops, NULL},
885 filp->f_op = &null_fops;
886 break;
887#ifdef CONFIG_DEVPORT 880#ifdef CONFIG_DEVPORT
888 case 4: 881 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops, NULL},
889 filp->f_op = &port_fops;
890 break;
891#endif 882#endif
892 case 5: 883 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops, &zero_bdi},
893 filp->f_mapping->backing_dev_info = &zero_bdi; 884 {7, "full", S_IRUGO | S_IWUGO, &full_fops, NULL},
894 filp->f_op = &zero_fops; 885 {8, "random", S_IRUGO | S_IWUSR, &random_fops, NULL},
895 break; 886 {9, "urandom", S_IRUGO | S_IWUSR, &urandom_fops, NULL},
896 case 7: 887 {11,"kmsg", S_IRUGO | S_IWUSR, &kmsg_fops, NULL},
897 filp->f_op = &full_fops;
898 break;
899 case 8:
900 filp->f_op = &random_fops;
901 break;
902 case 9:
903 filp->f_op = &urandom_fops;
904 break;
905 case 11:
906 filp->f_op = &kmsg_fops;
907 break;
908#ifdef CONFIG_CRASH_DUMP 888#ifdef CONFIG_CRASH_DUMP
909 case 12: 889 {12,"oldmem", S_IRUSR | S_IWUSR | S_IRGRP, &oldmem_fops, NULL},
910 filp->f_op = &oldmem_fops;
911 break;
912#endif 890#endif
913 default: 891};
914 unlock_kernel(); 892
915 return -ENXIO; 893static int memory_open(struct inode *inode, struct file *filp)
894{
895 int ret = 0;
896 int i;
897
898 lock_kernel();
899
900 for (i = 0; i < ARRAY_SIZE(devlist); i++) {
901 if (devlist[i].minor == iminor(inode)) {
902 filp->f_op = devlist[i].fops;
903 if (devlist[i].dev_info) {
904 filp->f_mapping->backing_dev_info =
905 devlist[i].dev_info;
906 }
907
908 break;
909 }
916 } 910 }
917 if (filp->f_op && filp->f_op->open) 911
918 ret = filp->f_op->open(inode,filp); 912 if (i == ARRAY_SIZE(devlist))
913 ret = -ENXIO;
914 else
915 if (filp->f_op && filp->f_op->open)
916 ret = filp->f_op->open(inode, filp);
917
919 unlock_kernel(); 918 unlock_kernel();
920 return ret; 919 return ret;
921} 920}
@@ -924,30 +923,6 @@ static const struct file_operations memory_fops = {
924 .open = memory_open, /* just a selector for the real open */ 923 .open = memory_open, /* just a selector for the real open */
925}; 924};
926 925
927static const struct {
928 unsigned int minor;
929 char *name;
930 umode_t mode;
931 const struct file_operations *fops;
932} devlist[] = { /* list of minor devices */
933 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
934#ifdef CONFIG_DEVKMEM
935 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
936#endif
937 {3, "null", S_IRUGO | S_IWUGO, &null_fops},
938#ifdef CONFIG_DEVPORT
939 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
940#endif
941 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
942 {7, "full", S_IRUGO | S_IWUGO, &full_fops},
943 {8, "random", S_IRUGO | S_IWUSR, &random_fops},
944 {9, "urandom", S_IRUGO | S_IWUSR, &urandom_fops},
945 {11,"kmsg", S_IRUGO | S_IWUSR, &kmsg_fops},
946#ifdef CONFIG_CRASH_DUMP
947 {12,"oldmem", S_IRUSR | S_IWUSR | S_IRGRP, &oldmem_fops},
948#endif
949};
950
951static struct class *mem_class; 926static struct class *mem_class;
952 927
953static int __init chr_dev_init(void) 928static int __init chr_dev_init(void)
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 65b6ff2442c6..6799588b0099 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -1189,6 +1189,11 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
1189 return -ENODEV; 1189 return -ENODEV;
1190 } 1190 }
1191 1191
1192 if (port % MAX_PORTS_PER_BOARD >= brd->numPorts) {
1193 retval = -ENODEV;
1194 goto out_unlock;
1195 }
1196
1192 ch = &brd->ports[port % MAX_PORTS_PER_BOARD]; 1197 ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
1193 ch->port.count++; 1198 ch->port.count++;
1194 tty->driver_data = ch; 1199 tty->driver_data = ch;
@@ -1213,8 +1218,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
1213 moxa_close_port(tty); 1218 moxa_close_port(tty);
1214 } else 1219 } else
1215 ch->port.flags |= ASYNC_NORMAL_ACTIVE; 1220 ch->port.flags |= ASYNC_NORMAL_ACTIVE;
1221out_unlock:
1216 mutex_unlock(&moxa_openlock); 1222 mutex_unlock(&moxa_openlock);
1217
1218 return retval; 1223 return retval;
1219} 1224}
1220 1225
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index c84c34fb1231..432655bcb04c 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -114,8 +114,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
114 114
115 if (!(pp->flags & PP_CLAIMED)) { 115 if (!(pp->flags & PP_CLAIMED)) {
116 /* Don't have the port claimed */ 116 /* Don't have the port claimed */
117 printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", 117 pr_debug(CHRDEV "%x: claim the port first\n", minor);
118 minor);
119 return -EINVAL; 118 return -EINVAL;
120 } 119 }
121 120
@@ -198,8 +197,7 @@ static ssize_t pp_write (struct file * file, const char __user * buf,
198 197
199 if (!(pp->flags & PP_CLAIMED)) { 198 if (!(pp->flags & PP_CLAIMED)) {
200 /* Don't have the port claimed */ 199 /* Don't have the port claimed */
201 printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", 200 pr_debug(CHRDEV "%x: claim the port first\n", minor);
202 minor);
203 return -EINVAL; 201 return -EINVAL;
204 } 202 }
205 203
@@ -313,7 +311,7 @@ static int register_device (int minor, struct pp_struct *pp)
313 } 311 }
314 312
315 pp->pdev = pdev; 313 pp->pdev = pdev;
316 printk (KERN_DEBUG "%s: registered pardevice\n", name); 314 pr_debug("%s: registered pardevice\n", name);
317 return 0; 315 return 0;
318} 316}
319 317
@@ -343,8 +341,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
343 int ret; 341 int ret;
344 342
345 if (pp->flags & PP_CLAIMED) { 343 if (pp->flags & PP_CLAIMED) {
346 printk (KERN_DEBUG CHRDEV 344 pr_debug(CHRDEV "%x: you've already got it!\n", minor);
347 "%x: you've already got it!\n", minor);
348 return -EINVAL; 345 return -EINVAL;
349 } 346 }
350 347
@@ -379,7 +376,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
379 } 376 }
380 case PPEXCL: 377 case PPEXCL:
381 if (pp->pdev) { 378 if (pp->pdev) {
382 printk (KERN_DEBUG CHRDEV "%x: too late for PPEXCL; " 379 pr_debug(CHRDEV "%x: too late for PPEXCL; "
383 "already registered\n", minor); 380 "already registered\n", minor);
384 if (pp->flags & PP_EXCL) 381 if (pp->flags & PP_EXCL)
385 /* But it's not really an error. */ 382 /* But it's not really an error. */
@@ -491,8 +488,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
491 /* Everything else requires the port to be claimed, so check 488 /* Everything else requires the port to be claimed, so check
492 * that now. */ 489 * that now. */
493 if ((pp->flags & PP_CLAIMED) == 0) { 490 if ((pp->flags & PP_CLAIMED) == 0) {
494 printk (KERN_DEBUG CHRDEV "%x: claim the port first\n", 491 pr_debug(CHRDEV "%x: claim the port first\n", minor);
495 minor);
496 return -EINVAL; 492 return -EINVAL;
497 } 493 }
498 494
@@ -624,8 +620,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
624 return 0; 620 return 0;
625 621
626 default: 622 default:
627 printk (KERN_DEBUG CHRDEV "%x: What? (cmd=0x%x)\n", minor, 623 pr_debug(CHRDEV "%x: What? (cmd=0x%x)\n", minor, cmd);
628 cmd);
629 return -EINVAL; 624 return -EINVAL;
630 } 625 }
631 626
@@ -698,9 +693,8 @@ static int pp_release (struct inode * inode, struct file * file)
698 } 693 }
699 if (compat_negot) { 694 if (compat_negot) {
700 parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT); 695 parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT);
701 printk (KERN_DEBUG CHRDEV 696 pr_debug(CHRDEV "%x: negotiated back to compatibility "
702 "%x: negotiated back to compatibility mode because " 697 "mode because user-space forgot\n", minor);
703 "user-space forgot\n", minor);
704 } 698 }
705 699
706 if (pp->flags & PP_CLAIMED) { 700 if (pp->flags & PP_CLAIMED) {
@@ -713,7 +707,7 @@ static int pp_release (struct inode * inode, struct file * file)
713 info->phase = pp->saved_state.phase; 707 info->phase = pp->saved_state.phase;
714 parport_release (pp->pdev); 708 parport_release (pp->pdev);
715 if (compat_negot != 1) { 709 if (compat_negot != 1) {
716 printk (KERN_DEBUG CHRDEV "%x: released pardevice " 710 pr_debug(CHRDEV "%x: released pardevice "
717 "because user-space forgot\n", minor); 711 "because user-space forgot\n", minor);
718 } 712 }
719 } 713 }
@@ -723,8 +717,7 @@ static int pp_release (struct inode * inode, struct file * file)
723 parport_unregister_device (pp->pdev); 717 parport_unregister_device (pp->pdev);
724 kfree (name); 718 kfree (name);
725 pp->pdev = NULL; 719 pp->pdev = NULL;
726 printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n", 720 pr_debug(CHRDEV "%x: unregistered pardevice\n", minor);
727 minor);
728 } 721 }
729 722
730 kfree (pp); 723 kfree (pp);
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 39a05b5fa9cb..0db35857e4d8 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -121,20 +121,17 @@ static struct sysrq_key_op sysrq_unraw_op = {
121#define sysrq_unraw_op (*(struct sysrq_key_op *)0) 121#define sysrq_unraw_op (*(struct sysrq_key_op *)0)
122#endif /* CONFIG_VT */ 122#endif /* CONFIG_VT */
123 123
124#ifdef CONFIG_KEXEC 124static void sysrq_handle_crash(int key, struct tty_struct *tty)
125static void sysrq_handle_crashdump(int key, struct tty_struct *tty)
126{ 125{
127 crash_kexec(get_irq_regs()); 126 char *killer = NULL;
127 *killer = 1;
128} 128}
129static struct sysrq_key_op sysrq_crashdump_op = { 129static struct sysrq_key_op sysrq_crashdump_op = {
130 .handler = sysrq_handle_crashdump, 130 .handler = sysrq_handle_crash,
131 .help_msg = "Crashdump", 131 .help_msg = "Crash",
132 .action_msg = "Trigger a crashdump", 132 .action_msg = "Trigger a crash",
133 .enable_mask = SYSRQ_ENABLE_DUMP, 133 .enable_mask = SYSRQ_ENABLE_DUMP,
134}; 134};
135#else
136#define sysrq_crashdump_op (*(struct sysrq_key_op *)0)
137#endif
138 135
139static void sysrq_handle_reboot(int key, struct tty_struct *tty) 136static void sysrq_handle_reboot(int key, struct tty_struct *tty)
140{ 137{
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index cf56a2af5fe1..2964f5f4a7ef 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -184,6 +184,9 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
184 /* disable channel */ 184 /* disable channel */
185 sh_cmt_start_stop_ch(p, 0); 185 sh_cmt_start_stop_ch(p, 0);
186 186
187 /* disable interrupts in CMT block */
188 sh_cmt_write(p, CMCSR, 0);
189
187 /* stop clock */ 190 /* stop clock */
188 clk_disable(p->clk); 191 clk_disable(p->clk);
189} 192}
@@ -599,7 +602,6 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
599 p->irqaction.handler = sh_cmt_interrupt; 602 p->irqaction.handler = sh_cmt_interrupt;
600 p->irqaction.dev_id = p; 603 p->irqaction.dev_id = p;
601 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; 604 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
602 p->irqaction.mask = CPU_MASK_NONE;
603 ret = setup_irq(irq, &p->irqaction); 605 ret = setup_irq(irq, &p->irqaction);
604 if (ret) { 606 if (ret) {
605 pr_err("sh_cmt: failed to request irq %d\n", irq); 607 pr_err("sh_cmt: failed to request irq %d\n", irq);
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index d1ae75454d10..973e714d6051 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -283,7 +283,6 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
283 p->irqaction.dev_id = p; 283 p->irqaction.dev_id = p;
284 p->irqaction.irq = irq; 284 p->irqaction.irq = irq;
285 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; 285 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
286 p->irqaction.mask = CPU_MASK_NONE;
287 286
288 /* get hold of clock */ 287 /* get hold of clock */
289 p->clk = clk_get(&p->pdev->dev, cfg->clk); 288 p->clk = clk_get(&p->pdev->dev, cfg->clk);
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index d6ea4398bf62..9ffb05f4095d 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -138,6 +138,9 @@ static void sh_tmu_disable(struct sh_tmu_priv *p)
138 /* disable channel */ 138 /* disable channel */
139 sh_tmu_start_stop_ch(p, 0); 139 sh_tmu_start_stop_ch(p, 0);
140 140
141 /* disable interrupts in TMU block */
142 sh_tmu_write(p, TCR, 0x0000);
143
141 /* stop clock */ 144 /* stop clock */
142 clk_disable(p->clk); 145 clk_disable(p->clk);
143} 146}
@@ -385,7 +388,6 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
385 p->irqaction.dev_id = p; 388 p->irqaction.dev_id = p;
386 p->irqaction.irq = irq; 389 p->irqaction.irq = irq;
387 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; 390 p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
388 p->irqaction.mask = CPU_MASK_NONE;
389 391
390 /* get hold of clock */ 392 /* get hold of clock */
391 p->clk = clk_get(&p->pdev->dev, cfg->clk); 393 p->clk = clk_get(&p->pdev->dev, cfg->clk);
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index ab4f3592a11c..4339b1a879cd 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -5,7 +5,7 @@
5# 5#
6 6
7menuconfig EDAC 7menuconfig EDAC
8 bool "EDAC - error detection and reporting" 8 bool "EDAC (Error Detection And Correction) reporting"
9 depends on HAS_IOMEM 9 depends on HAS_IOMEM
10 depends on X86 || PPC 10 depends on X86 || PPC
11 help 11 help
@@ -232,4 +232,13 @@ config EDAC_AMD8111
232 Note, add more Kconfig dependency if it's adopted 232 Note, add more Kconfig dependency if it's adopted
233 on some machine other than Maple. 233 on some machine other than Maple.
234 234
235config EDAC_CPC925
236 tristate "IBM CPC925 Memory Controller (PPC970FX)"
237 depends on EDAC_MM_EDAC && PPC64
238 help
239 Support for error detection and correction on the
240 IBM CPC925 Bridge and Memory Controller, which is
241 a companion chip to the PowerPC 970 family of
242 processors.
243
235endif # EDAC 244endif # EDAC
diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile
index 633dc5604ee3..98aa4a7db412 100644
--- a/drivers/edac/Makefile
+++ b/drivers/edac/Makefile
@@ -18,6 +18,7 @@ edac_core-objs += edac_pci.o edac_pci_sysfs.o
18endif 18endif
19 19
20obj-$(CONFIG_EDAC_AMD76X) += amd76x_edac.o 20obj-$(CONFIG_EDAC_AMD76X) += amd76x_edac.o
21obj-$(CONFIG_EDAC_CPC925) += cpc925_edac.o
21obj-$(CONFIG_EDAC_I5000) += i5000_edac.o 22obj-$(CONFIG_EDAC_I5000) += i5000_edac.o
22obj-$(CONFIG_EDAC_I5100) += i5100_edac.o 23obj-$(CONFIG_EDAC_I5100) += i5100_edac.o
23obj-$(CONFIG_EDAC_I5400) += i5400_edac.o 24obj-$(CONFIG_EDAC_I5400) += i5400_edac.o
diff --git a/drivers/edac/amd8111_edac.c b/drivers/edac/amd8111_edac.c
index 2cb58ef743e0..35b78d04bbfa 100644
--- a/drivers/edac/amd8111_edac.c
+++ b/drivers/edac/amd8111_edac.c
@@ -37,7 +37,6 @@
37#define AMD8111_EDAC_MOD_STR "amd8111_edac" 37#define AMD8111_EDAC_MOD_STR "amd8111_edac"
38 38
39#define PCI_DEVICE_ID_AMD_8111_PCI 0x7460 39#define PCI_DEVICE_ID_AMD_8111_PCI 0x7460
40static int edac_dev_idx;
41 40
42enum amd8111_edac_devs { 41enum amd8111_edac_devs {
43 LPC_BRIDGE = 0, 42 LPC_BRIDGE = 0,
@@ -377,7 +376,7 @@ static int amd8111_dev_probe(struct pci_dev *dev,
377 * edac_device_ctl_info, but make use of existing 376 * edac_device_ctl_info, but make use of existing
378 * one instead. 377 * one instead.
379 */ 378 */
380 dev_info->edac_idx = edac_dev_idx++; 379 dev_info->edac_idx = edac_device_alloc_index();
381 dev_info->edac_dev = 380 dev_info->edac_dev =
382 edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1, 381 edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1,
383 NULL, 0, 0, 382 NULL, 0, 0,
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c
index cb0f639f049d..c973004c002c 100644
--- a/drivers/edac/cell_edac.c
+++ b/drivers/edac/cell_edac.c
@@ -227,7 +227,7 @@ static struct platform_driver cell_edac_driver = {
227 .owner = THIS_MODULE, 227 .owner = THIS_MODULE,
228 }, 228 },
229 .probe = cell_edac_probe, 229 .probe = cell_edac_probe,
230 .remove = cell_edac_remove, 230 .remove = __devexit_p(cell_edac_remove),
231}; 231};
232 232
233static int __init cell_edac_init(void) 233static int __init cell_edac_init(void)
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c
new file mode 100644
index 000000000000..8c54196b5aba
--- /dev/null
+++ b/drivers/edac/cpc925_edac.c
@@ -0,0 +1,1017 @@
1/*
2 * cpc925_edac.c, EDAC driver for IBM CPC925 Bridge and Memory Controller.
3 *
4 * Copyright (c) 2008 Wind River Systems, Inc.
5 *
6 * Authors: Cao Qingtao <qingtao.cao@windriver.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 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.
15 * See the 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#include <linux/module.h>
23#include <linux/init.h>
24#include <linux/io.h>
25#include <linux/edac.h>
26#include <linux/of.h>
27#include <linux/platform_device.h>
28
29#include "edac_core.h"
30#include "edac_module.h"
31
32#define CPC925_EDAC_REVISION " Ver: 1.0.0 " __DATE__
33#define CPC925_EDAC_MOD_STR "cpc925_edac"
34
35#define cpc925_printk(level, fmt, arg...) \
36 edac_printk(level, "CPC925", fmt, ##arg)
37
38#define cpc925_mc_printk(mci, level, fmt, arg...) \
39 edac_mc_chipset_printk(mci, level, "CPC925", fmt, ##arg)
40
41/*
42 * CPC925 registers are of 32 bits with bit0 defined at the
43 * most significant bit and bit31 at that of least significant.
44 */
45#define CPC925_BITS_PER_REG 32
46#define CPC925_BIT(nr) (1UL << (CPC925_BITS_PER_REG - 1 - nr))
47
48/*
49 * EDAC device names for the error detections of
50 * CPU Interface and Hypertransport Link.
51 */
52#define CPC925_CPU_ERR_DEV "cpu"
53#define CPC925_HT_LINK_DEV "htlink"
54
55/* Suppose DDR Refresh cycle is 15.6 microsecond */
56#define CPC925_REF_FREQ 0xFA69
57#define CPC925_SCRUB_BLOCK_SIZE 64 /* bytes */
58#define CPC925_NR_CSROWS 8
59
60/*
61 * All registers and bits definitions are taken from
62 * "CPC925 Bridge and Memory Controller User Manual, SA14-2761-02".
63 */
64
65/*
66 * CPU and Memory Controller Registers
67 */
68/************************************************************
69 * Processor Interface Exception Mask Register (APIMASK)
70 ************************************************************/
71#define REG_APIMASK_OFFSET 0x30070
72enum apimask_bits {
73 APIMASK_DART = CPC925_BIT(0), /* DART Exception */
74 APIMASK_ADI0 = CPC925_BIT(1), /* Handshake Error on PI0_ADI */
75 APIMASK_ADI1 = CPC925_BIT(2), /* Handshake Error on PI1_ADI */
76 APIMASK_STAT = CPC925_BIT(3), /* Status Exception */
77 APIMASK_DERR = CPC925_BIT(4), /* Data Error Exception */
78 APIMASK_ADRS0 = CPC925_BIT(5), /* Addressing Exception on PI0 */
79 APIMASK_ADRS1 = CPC925_BIT(6), /* Addressing Exception on PI1 */
80 /* BIT(7) Reserved */
81 APIMASK_ECC_UE_H = CPC925_BIT(8), /* UECC upper */
82 APIMASK_ECC_CE_H = CPC925_BIT(9), /* CECC upper */
83 APIMASK_ECC_UE_L = CPC925_BIT(10), /* UECC lower */
84 APIMASK_ECC_CE_L = CPC925_BIT(11), /* CECC lower */
85
86 CPU_MASK_ENABLE = (APIMASK_DART | APIMASK_ADI0 | APIMASK_ADI1 |
87 APIMASK_STAT | APIMASK_DERR | APIMASK_ADRS0 |
88 APIMASK_ADRS1),
89 ECC_MASK_ENABLE = (APIMASK_ECC_UE_H | APIMASK_ECC_CE_H |
90 APIMASK_ECC_UE_L | APIMASK_ECC_CE_L),
91};
92
93/************************************************************
94 * Processor Interface Exception Register (APIEXCP)
95 ************************************************************/
96#define REG_APIEXCP_OFFSET 0x30060
97enum apiexcp_bits {
98 APIEXCP_DART = CPC925_BIT(0), /* DART Exception */
99 APIEXCP_ADI0 = CPC925_BIT(1), /* Handshake Error on PI0_ADI */
100 APIEXCP_ADI1 = CPC925_BIT(2), /* Handshake Error on PI1_ADI */
101 APIEXCP_STAT = CPC925_BIT(3), /* Status Exception */
102 APIEXCP_DERR = CPC925_BIT(4), /* Data Error Exception */
103 APIEXCP_ADRS0 = CPC925_BIT(5), /* Addressing Exception on PI0 */
104 APIEXCP_ADRS1 = CPC925_BIT(6), /* Addressing Exception on PI1 */
105 /* BIT(7) Reserved */
106 APIEXCP_ECC_UE_H = CPC925_BIT(8), /* UECC upper */
107 APIEXCP_ECC_CE_H = CPC925_BIT(9), /* CECC upper */
108 APIEXCP_ECC_UE_L = CPC925_BIT(10), /* UECC lower */
109 APIEXCP_ECC_CE_L = CPC925_BIT(11), /* CECC lower */
110
111 CPU_EXCP_DETECTED = (APIEXCP_DART | APIEXCP_ADI0 | APIEXCP_ADI1 |
112 APIEXCP_STAT | APIEXCP_DERR | APIEXCP_ADRS0 |
113 APIEXCP_ADRS1),
114 UECC_EXCP_DETECTED = (APIEXCP_ECC_UE_H | APIEXCP_ECC_UE_L),
115 CECC_EXCP_DETECTED = (APIEXCP_ECC_CE_H | APIEXCP_ECC_CE_L),
116 ECC_EXCP_DETECTED = (UECC_EXCP_DETECTED | CECC_EXCP_DETECTED),
117};
118
119/************************************************************
120 * Memory Bus Configuration Register (MBCR)
121************************************************************/
122#define REG_MBCR_OFFSET 0x2190
123#define MBCR_64BITCFG_SHIFT 23
124#define MBCR_64BITCFG_MASK (1UL << MBCR_64BITCFG_SHIFT)
125#define MBCR_64BITBUS_SHIFT 22
126#define MBCR_64BITBUS_MASK (1UL << MBCR_64BITBUS_SHIFT)
127
128/************************************************************
129 * Memory Bank Mode Register (MBMR)
130************************************************************/
131#define REG_MBMR_OFFSET 0x21C0
132#define MBMR_MODE_MAX_VALUE 0xF
133#define MBMR_MODE_SHIFT 25
134#define MBMR_MODE_MASK (MBMR_MODE_MAX_VALUE << MBMR_MODE_SHIFT)
135#define MBMR_BBA_SHIFT 24
136#define MBMR_BBA_MASK (1UL << MBMR_BBA_SHIFT)
137
138/************************************************************
139 * Memory Bank Boundary Address Register (MBBAR)
140 ************************************************************/
141#define REG_MBBAR_OFFSET 0x21D0
142#define MBBAR_BBA_MAX_VALUE 0xFF
143#define MBBAR_BBA_SHIFT 24
144#define MBBAR_BBA_MASK (MBBAR_BBA_MAX_VALUE << MBBAR_BBA_SHIFT)
145
146/************************************************************
147 * Memory Scrub Control Register (MSCR)
148 ************************************************************/
149#define REG_MSCR_OFFSET 0x2400
150#define MSCR_SCRUB_MOD_MASK 0xC0000000 /* scrub_mod - bit0:1*/
151#define MSCR_BACKGR_SCRUB 0x40000000 /* 01 */
152#define MSCR_SI_SHIFT 16 /* si - bit8:15*/
153#define MSCR_SI_MAX_VALUE 0xFF
154#define MSCR_SI_MASK (MSCR_SI_MAX_VALUE << MSCR_SI_SHIFT)
155
156/************************************************************
157 * Memory Scrub Range Start Register (MSRSR)
158 ************************************************************/
159#define REG_MSRSR_OFFSET 0x2410
160
161/************************************************************
162 * Memory Scrub Range End Register (MSRER)
163 ************************************************************/
164#define REG_MSRER_OFFSET 0x2420
165
166/************************************************************
167 * Memory Scrub Pattern Register (MSPR)
168 ************************************************************/
169#define REG_MSPR_OFFSET 0x2430
170
171/************************************************************
172 * Memory Check Control Register (MCCR)
173 ************************************************************/
174#define REG_MCCR_OFFSET 0x2440
175enum mccr_bits {
176 MCCR_ECC_EN = CPC925_BIT(0), /* ECC high and low check */
177};
178
179/************************************************************
180 * Memory Check Range End Register (MCRER)
181 ************************************************************/
182#define REG_MCRER_OFFSET 0x2450
183
184/************************************************************
185 * Memory Error Address Register (MEAR)
186 ************************************************************/
187#define REG_MEAR_OFFSET 0x2460
188#define MEAR_BCNT_MAX_VALUE 0x3
189#define MEAR_BCNT_SHIFT 30
190#define MEAR_BCNT_MASK (MEAR_BCNT_MAX_VALUE << MEAR_BCNT_SHIFT)
191#define MEAR_RANK_MAX_VALUE 0x7
192#define MEAR_RANK_SHIFT 27
193#define MEAR_RANK_MASK (MEAR_RANK_MAX_VALUE << MEAR_RANK_SHIFT)
194#define MEAR_COL_MAX_VALUE 0x7FF
195#define MEAR_COL_SHIFT 16
196#define MEAR_COL_MASK (MEAR_COL_MAX_VALUE << MEAR_COL_SHIFT)
197#define MEAR_BANK_MAX_VALUE 0x3
198#define MEAR_BANK_SHIFT 14
199#define MEAR_BANK_MASK (MEAR_BANK_MAX_VALUE << MEAR_BANK_SHIFT)
200#define MEAR_ROW_MASK 0x00003FFF
201
202/************************************************************
203 * Memory Error Syndrome Register (MESR)
204 ************************************************************/
205#define REG_MESR_OFFSET 0x2470
206#define MESR_ECC_SYN_H_MASK 0xFF00
207#define MESR_ECC_SYN_L_MASK 0x00FF
208
209/************************************************************
210 * Memory Mode Control Register (MMCR)
211 ************************************************************/
212#define REG_MMCR_OFFSET 0x2500
213enum mmcr_bits {
214 MMCR_REG_DIMM_MODE = CPC925_BIT(3),
215};
216
217/*
218 * HyperTransport Link Registers
219 */
220/************************************************************
221 * Error Handling/Enumeration Scratch Pad Register (ERRCTRL)
222 ************************************************************/
223#define REG_ERRCTRL_OFFSET 0x70140
224enum errctrl_bits { /* nonfatal interrupts for */
225 ERRCTRL_SERR_NF = CPC925_BIT(0), /* system error */
226 ERRCTRL_CRC_NF = CPC925_BIT(1), /* CRC error */
227 ERRCTRL_RSP_NF = CPC925_BIT(2), /* Response error */
228 ERRCTRL_EOC_NF = CPC925_BIT(3), /* End-Of-Chain error */
229 ERRCTRL_OVF_NF = CPC925_BIT(4), /* Overflow error */
230 ERRCTRL_PROT_NF = CPC925_BIT(5), /* Protocol error */
231
232 ERRCTRL_RSP_ERR = CPC925_BIT(6), /* Response error received */
233 ERRCTRL_CHN_FAL = CPC925_BIT(7), /* Sync flooding detected */
234
235 HT_ERRCTRL_ENABLE = (ERRCTRL_SERR_NF | ERRCTRL_CRC_NF |
236 ERRCTRL_RSP_NF | ERRCTRL_EOC_NF |
237 ERRCTRL_OVF_NF | ERRCTRL_PROT_NF),
238 HT_ERRCTRL_DETECTED = (ERRCTRL_RSP_ERR | ERRCTRL_CHN_FAL),
239};
240
241/************************************************************
242 * Link Configuration and Link Control Register (LINKCTRL)
243 ************************************************************/
244#define REG_LINKCTRL_OFFSET 0x70110
245enum linkctrl_bits {
246 LINKCTRL_CRC_ERR = (CPC925_BIT(22) | CPC925_BIT(23)),
247 LINKCTRL_LINK_FAIL = CPC925_BIT(27),
248
249 HT_LINKCTRL_DETECTED = (LINKCTRL_CRC_ERR | LINKCTRL_LINK_FAIL),
250};
251
252/************************************************************
253 * Link FreqCap/Error/Freq/Revision ID Register (LINKERR)
254 ************************************************************/
255#define REG_LINKERR_OFFSET 0x70120
256enum linkerr_bits {
257 LINKERR_EOC_ERR = CPC925_BIT(17), /* End-Of-Chain error */
258 LINKERR_OVF_ERR = CPC925_BIT(18), /* Receive Buffer Overflow */
259 LINKERR_PROT_ERR = CPC925_BIT(19), /* Protocol error */
260
261 HT_LINKERR_DETECTED = (LINKERR_EOC_ERR | LINKERR_OVF_ERR |
262 LINKERR_PROT_ERR),
263};
264
265/************************************************************
266 * Bridge Control Register (BRGCTRL)
267 ************************************************************/
268#define REG_BRGCTRL_OFFSET 0x70300
269enum brgctrl_bits {
270 BRGCTRL_DETSERR = CPC925_BIT(0), /* SERR on Secondary Bus */
271 BRGCTRL_SECBUSRESET = CPC925_BIT(9), /* Secondary Bus Reset */
272};
273
274/* Private structure for edac memory controller */
275struct cpc925_mc_pdata {
276 void __iomem *vbase;
277 unsigned long total_mem;
278 const char *name;
279 int edac_idx;
280};
281
282/* Private structure for common edac device */
283struct cpc925_dev_info {
284 void __iomem *vbase;
285 struct platform_device *pdev;
286 char *ctl_name;
287 int edac_idx;
288 struct edac_device_ctl_info *edac_dev;
289 void (*init)(struct cpc925_dev_info *dev_info);
290 void (*exit)(struct cpc925_dev_info *dev_info);
291 void (*check)(struct edac_device_ctl_info *edac_dev);
292};
293
294/* Get total memory size from Open Firmware DTB */
295static void get_total_mem(struct cpc925_mc_pdata *pdata)
296{
297 struct device_node *np = NULL;
298 const unsigned int *reg, *reg_end;
299 int len, sw, aw;
300 unsigned long start, size;
301
302 np = of_find_node_by_type(NULL, "memory");
303 if (!np)
304 return;
305
306 aw = of_n_addr_cells(np);
307 sw = of_n_size_cells(np);
308 reg = (const unsigned int *)of_get_property(np, "reg", &len);
309 reg_end = reg + len/4;
310
311 pdata->total_mem = 0;
312 do {
313 start = of_read_number(reg, aw);
314 reg += aw;
315 size = of_read_number(reg, sw);
316 reg += sw;
317 debugf1("%s: start 0x%lx, size 0x%lx\n", __func__,
318 start, size);
319 pdata->total_mem += size;
320 } while (reg < reg_end);
321
322 of_node_put(np);
323 debugf0("%s: total_mem 0x%lx\n", __func__, pdata->total_mem);
324}
325
326static void cpc925_init_csrows(struct mem_ctl_info *mci)
327{
328 struct cpc925_mc_pdata *pdata = mci->pvt_info;
329 struct csrow_info *csrow;
330 int index;
331 u32 mbmr, mbbar, bba;
332 unsigned long row_size, last_nr_pages = 0;
333
334 get_total_mem(pdata);
335
336 for (index = 0; index < mci->nr_csrows; index++) {
337 mbmr = __raw_readl(pdata->vbase + REG_MBMR_OFFSET +
338 0x20 * index);
339 mbbar = __raw_readl(pdata->vbase + REG_MBBAR_OFFSET +
340 0x20 + index);
341 bba = (((mbmr & MBMR_BBA_MASK) >> MBMR_BBA_SHIFT) << 8) |
342 ((mbbar & MBBAR_BBA_MASK) >> MBBAR_BBA_SHIFT);
343
344 if (bba == 0)
345 continue; /* not populated */
346
347 csrow = &mci->csrows[index];
348
349 row_size = bba * (1UL << 28); /* 256M */
350 csrow->first_page = last_nr_pages;
351 csrow->nr_pages = row_size >> PAGE_SHIFT;
352 csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
353 last_nr_pages = csrow->last_page + 1;
354
355 csrow->mtype = MEM_RDDR;
356 csrow->edac_mode = EDAC_SECDED;
357
358 switch (csrow->nr_channels) {
359 case 1: /* Single channel */
360 csrow->grain = 32; /* four-beat burst of 32 bytes */
361 break;
362 case 2: /* Dual channel */
363 default:
364 csrow->grain = 64; /* four-beat burst of 64 bytes */
365 break;
366 }
367
368 switch ((mbmr & MBMR_MODE_MASK) >> MBMR_MODE_SHIFT) {
369 case 6: /* 0110, no way to differentiate X8 VS X16 */
370 case 5: /* 0101 */
371 case 8: /* 1000 */
372 csrow->dtype = DEV_X16;
373 break;
374 case 7: /* 0111 */
375 case 9: /* 1001 */
376 csrow->dtype = DEV_X8;
377 break;
378 default:
379 csrow->dtype = DEV_UNKNOWN;
380 break;
381 }
382 }
383}
384
385/* Enable memory controller ECC detection */
386static void cpc925_mc_init(struct mem_ctl_info *mci)
387{
388 struct cpc925_mc_pdata *pdata = mci->pvt_info;
389 u32 apimask;
390 u32 mccr;
391
392 /* Enable various ECC error exceptions */
393 apimask = __raw_readl(pdata->vbase + REG_APIMASK_OFFSET);
394 if ((apimask & ECC_MASK_ENABLE) == 0) {
395 apimask |= ECC_MASK_ENABLE;
396 __raw_writel(apimask, pdata->vbase + REG_APIMASK_OFFSET);
397 }
398
399 /* Enable ECC detection */
400 mccr = __raw_readl(pdata->vbase + REG_MCCR_OFFSET);
401 if ((mccr & MCCR_ECC_EN) == 0) {
402 mccr |= MCCR_ECC_EN;
403 __raw_writel(mccr, pdata->vbase + REG_MCCR_OFFSET);
404 }
405}
406
407/* Disable memory controller ECC detection */
408static void cpc925_mc_exit(struct mem_ctl_info *mci)
409{
410 /*
411 * WARNING:
412 * We are supposed to clear the ECC error detection bits,
413 * and it will be no problem to do so. However, once they
414 * are cleared here if we want to re-install CPC925 EDAC
415 * module later, setting them up in cpc925_mc_init() will
416 * trigger machine check exception.
417 * Also, it's ok to leave ECC error detection bits enabled,
418 * since they are reset to 1 by default or by boot loader.
419 */
420
421 return;
422}
423
424/*
425 * Revert DDR column/row/bank addresses into page frame number and
426 * offset in page.
427 *
428 * Suppose memory mode is 0x0111(128-bit mode, identical DIMM pairs),
429 * physical address(PA) bits to column address(CA) bits mappings are:
430 * CA 0 1 2 3 4 5 6 7 8 9 10
431 * PA 59 58 57 56 55 54 53 52 51 50 49
432 *
433 * physical address(PA) bits to bank address(BA) bits mappings are:
434 * BA 0 1
435 * PA 43 44
436 *
437 * physical address(PA) bits to row address(RA) bits mappings are:
438 * RA 0 1 2 3 4 5 6 7 8 9 10 11 12
439 * PA 36 35 34 48 47 46 45 40 41 42 39 38 37
440 */
441static void cpc925_mc_get_pfn(struct mem_ctl_info *mci, u32 mear,
442 unsigned long *pfn, unsigned long *offset, int *csrow)
443{
444 u32 bcnt, rank, col, bank, row;
445 u32 c;
446 unsigned long pa;
447 int i;
448
449 bcnt = (mear & MEAR_BCNT_MASK) >> MEAR_BCNT_SHIFT;
450 rank = (mear & MEAR_RANK_MASK) >> MEAR_RANK_SHIFT;
451 col = (mear & MEAR_COL_MASK) >> MEAR_COL_SHIFT;
452 bank = (mear & MEAR_BANK_MASK) >> MEAR_BANK_SHIFT;
453 row = mear & MEAR_ROW_MASK;
454
455 *csrow = rank;
456
457#ifdef CONFIG_EDAC_DEBUG
458 if (mci->csrows[rank].first_page == 0) {
459 cpc925_mc_printk(mci, KERN_ERR, "ECC occurs in a "
460 "non-populated csrow, broken hardware?\n");
461 return;
462 }
463#endif
464
465 /* Revert csrow number */
466 pa = mci->csrows[rank].first_page << PAGE_SHIFT;
467
468 /* Revert column address */
469 col += bcnt;
470 for (i = 0; i < 11; i++) {
471 c = col & 0x1;
472 col >>= 1;
473 pa |= c << (14 - i);
474 }
475
476 /* Revert bank address */
477 pa |= bank << 19;
478
479 /* Revert row address, in 4 steps */
480 for (i = 0; i < 3; i++) {
481 c = row & 0x1;
482 row >>= 1;
483 pa |= c << (26 - i);
484 }
485
486 for (i = 0; i < 3; i++) {
487 c = row & 0x1;
488 row >>= 1;
489 pa |= c << (21 + i);
490 }
491
492 for (i = 0; i < 4; i++) {
493 c = row & 0x1;
494 row >>= 1;
495 pa |= c << (18 - i);
496 }
497
498 for (i = 0; i < 3; i++) {
499 c = row & 0x1;
500 row >>= 1;
501 pa |= c << (29 - i);
502 }
503
504 *offset = pa & (PAGE_SIZE - 1);
505 *pfn = pa >> PAGE_SHIFT;
506
507 debugf0("%s: ECC physical address 0x%lx\n", __func__, pa);
508}
509
510static int cpc925_mc_find_channel(struct mem_ctl_info *mci, u16 syndrome)
511{
512 if ((syndrome & MESR_ECC_SYN_H_MASK) == 0)
513 return 0;
514
515 if ((syndrome & MESR_ECC_SYN_L_MASK) == 0)
516 return 1;
517
518 cpc925_mc_printk(mci, KERN_INFO, "Unexpected syndrome value: 0x%x\n",
519 syndrome);
520 return 1;
521}
522
523/* Check memory controller registers for ECC errors */
524static void cpc925_mc_check(struct mem_ctl_info *mci)
525{
526 struct cpc925_mc_pdata *pdata = mci->pvt_info;
527 u32 apiexcp;
528 u32 mear;
529 u32 mesr;
530 u16 syndrome;
531 unsigned long pfn = 0, offset = 0;
532 int csrow = 0, channel = 0;
533
534 /* APIEXCP is cleared when read */
535 apiexcp = __raw_readl(pdata->vbase + REG_APIEXCP_OFFSET);
536 if ((apiexcp & ECC_EXCP_DETECTED) == 0)
537 return;
538
539 mesr = __raw_readl(pdata->vbase + REG_MESR_OFFSET);
540 syndrome = mesr | (MESR_ECC_SYN_H_MASK | MESR_ECC_SYN_L_MASK);
541
542 mear = __raw_readl(pdata->vbase + REG_MEAR_OFFSET);
543
544 /* Revert column/row addresses into page frame number, etc */
545 cpc925_mc_get_pfn(mci, mear, &pfn, &offset, &csrow);
546
547 if (apiexcp & CECC_EXCP_DETECTED) {
548 cpc925_mc_printk(mci, KERN_INFO, "DRAM CECC Fault\n");
549 channel = cpc925_mc_find_channel(mci, syndrome);
550 edac_mc_handle_ce(mci, pfn, offset, syndrome,
551 csrow, channel, mci->ctl_name);
552 }
553
554 if (apiexcp & UECC_EXCP_DETECTED) {
555 cpc925_mc_printk(mci, KERN_INFO, "DRAM UECC Fault\n");
556 edac_mc_handle_ue(mci, pfn, offset, csrow, mci->ctl_name);
557 }
558
559 cpc925_mc_printk(mci, KERN_INFO, "Dump registers:\n");
560 cpc925_mc_printk(mci, KERN_INFO, "APIMASK 0x%08x\n",
561 __raw_readl(pdata->vbase + REG_APIMASK_OFFSET));
562 cpc925_mc_printk(mci, KERN_INFO, "APIEXCP 0x%08x\n",
563 apiexcp);
564 cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Ctrl 0x%08x\n",
565 __raw_readl(pdata->vbase + REG_MSCR_OFFSET));
566 cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Rge Start 0x%08x\n",
567 __raw_readl(pdata->vbase + REG_MSRSR_OFFSET));
568 cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Rge End 0x%08x\n",
569 __raw_readl(pdata->vbase + REG_MSRER_OFFSET));
570 cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Pattern 0x%08x\n",
571 __raw_readl(pdata->vbase + REG_MSPR_OFFSET));
572 cpc925_mc_printk(mci, KERN_INFO, "Mem Chk Ctrl 0x%08x\n",
573 __raw_readl(pdata->vbase + REG_MCCR_OFFSET));
574 cpc925_mc_printk(mci, KERN_INFO, "Mem Chk Rge End 0x%08x\n",
575 __raw_readl(pdata->vbase + REG_MCRER_OFFSET));
576 cpc925_mc_printk(mci, KERN_INFO, "Mem Err Address 0x%08x\n",
577 mesr);
578 cpc925_mc_printk(mci, KERN_INFO, "Mem Err Syndrome 0x%08x\n",
579 syndrome);
580}
581
582/******************** CPU err device********************************/
583/* Enable CPU Errors detection */
584static void cpc925_cpu_init(struct cpc925_dev_info *dev_info)
585{
586 u32 apimask;
587
588 apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET);
589 if ((apimask & CPU_MASK_ENABLE) == 0) {
590 apimask |= CPU_MASK_ENABLE;
591 __raw_writel(apimask, dev_info->vbase + REG_APIMASK_OFFSET);
592 }
593}
594
595/* Disable CPU Errors detection */
596static void cpc925_cpu_exit(struct cpc925_dev_info *dev_info)
597{
598 /*
599 * WARNING:
600 * We are supposed to clear the CPU error detection bits,
601 * and it will be no problem to do so. However, once they
602 * are cleared here if we want to re-install CPC925 EDAC
603 * module later, setting them up in cpc925_cpu_init() will
604 * trigger machine check exception.
605 * Also, it's ok to leave CPU error detection bits enabled,
606 * since they are reset to 1 by default.
607 */
608
609 return;
610}
611
612/* Check for CPU Errors */
613static void cpc925_cpu_check(struct edac_device_ctl_info *edac_dev)
614{
615 struct cpc925_dev_info *dev_info = edac_dev->pvt_info;
616 u32 apiexcp;
617 u32 apimask;
618
619 /* APIEXCP is cleared when read */
620 apiexcp = __raw_readl(dev_info->vbase + REG_APIEXCP_OFFSET);
621 if ((apiexcp & CPU_EXCP_DETECTED) == 0)
622 return;
623
624 apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET);
625 cpc925_printk(KERN_INFO, "Processor Interface Fault\n"
626 "Processor Interface register dump:\n");
627 cpc925_printk(KERN_INFO, "APIMASK 0x%08x\n", apimask);
628 cpc925_printk(KERN_INFO, "APIEXCP 0x%08x\n", apiexcp);
629
630 edac_device_handle_ue(edac_dev, 0, 0, edac_dev->ctl_name);
631}
632
633/******************** HT Link err device****************************/
634/* Enable HyperTransport Link Error detection */
635static void cpc925_htlink_init(struct cpc925_dev_info *dev_info)
636{
637 u32 ht_errctrl;
638
639 ht_errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET);
640 if ((ht_errctrl & HT_ERRCTRL_ENABLE) == 0) {
641 ht_errctrl |= HT_ERRCTRL_ENABLE;
642 __raw_writel(ht_errctrl, dev_info->vbase + REG_ERRCTRL_OFFSET);
643 }
644}
645
646/* Disable HyperTransport Link Error detection */
647static void cpc925_htlink_exit(struct cpc925_dev_info *dev_info)
648{
649 u32 ht_errctrl;
650
651 ht_errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET);
652 ht_errctrl &= ~HT_ERRCTRL_ENABLE;
653 __raw_writel(ht_errctrl, dev_info->vbase + REG_ERRCTRL_OFFSET);
654}
655
656/* Check for HyperTransport Link errors */
657static void cpc925_htlink_check(struct edac_device_ctl_info *edac_dev)
658{
659 struct cpc925_dev_info *dev_info = edac_dev->pvt_info;
660 u32 brgctrl = __raw_readl(dev_info->vbase + REG_BRGCTRL_OFFSET);
661 u32 linkctrl = __raw_readl(dev_info->vbase + REG_LINKCTRL_OFFSET);
662 u32 errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET);
663 u32 linkerr = __raw_readl(dev_info->vbase + REG_LINKERR_OFFSET);
664
665 if (!((brgctrl & BRGCTRL_DETSERR) ||
666 (linkctrl & HT_LINKCTRL_DETECTED) ||
667 (errctrl & HT_ERRCTRL_DETECTED) ||
668 (linkerr & HT_LINKERR_DETECTED)))
669 return;
670
671 cpc925_printk(KERN_INFO, "HT Link Fault\n"
672 "HT register dump:\n");
673 cpc925_printk(KERN_INFO, "Bridge Ctrl 0x%08x\n",
674 brgctrl);
675 cpc925_printk(KERN_INFO, "Link Config Ctrl 0x%08x\n",
676 linkctrl);
677 cpc925_printk(KERN_INFO, "Error Enum and Ctrl 0x%08x\n",
678 errctrl);
679 cpc925_printk(KERN_INFO, "Link Error 0x%08x\n",
680 linkerr);
681
682 /* Clear by write 1 */
683 if (brgctrl & BRGCTRL_DETSERR)
684 __raw_writel(BRGCTRL_DETSERR,
685 dev_info->vbase + REG_BRGCTRL_OFFSET);
686
687 if (linkctrl & HT_LINKCTRL_DETECTED)
688 __raw_writel(HT_LINKCTRL_DETECTED,
689 dev_info->vbase + REG_LINKCTRL_OFFSET);
690
691 /* Initiate Secondary Bus Reset to clear the chain failure */
692 if (errctrl & ERRCTRL_CHN_FAL)
693 __raw_writel(BRGCTRL_SECBUSRESET,
694 dev_info->vbase + REG_BRGCTRL_OFFSET);
695
696 if (errctrl & ERRCTRL_RSP_ERR)
697 __raw_writel(ERRCTRL_RSP_ERR,
698 dev_info->vbase + REG_ERRCTRL_OFFSET);
699
700 if (linkerr & HT_LINKERR_DETECTED)
701 __raw_writel(HT_LINKERR_DETECTED,
702 dev_info->vbase + REG_LINKERR_OFFSET);
703
704 edac_device_handle_ce(edac_dev, 0, 0, edac_dev->ctl_name);
705}
706
707static struct cpc925_dev_info cpc925_devs[] = {
708 {
709 .ctl_name = CPC925_CPU_ERR_DEV,
710 .init = cpc925_cpu_init,
711 .exit = cpc925_cpu_exit,
712 .check = cpc925_cpu_check,
713 },
714 {
715 .ctl_name = CPC925_HT_LINK_DEV,
716 .init = cpc925_htlink_init,
717 .exit = cpc925_htlink_exit,
718 .check = cpc925_htlink_check,
719 },
720 {0}, /* Terminated by NULL */
721};
722
723/*
724 * Add CPU Err detection and HyperTransport Link Err detection
725 * as common "edac_device", they have no corresponding device
726 * nodes in the Open Firmware DTB and we have to add platform
727 * devices for them. Also, they will share the MMIO with that
728 * of memory controller.
729 */
730static void cpc925_add_edac_devices(void __iomem *vbase)
731{
732 struct cpc925_dev_info *dev_info;
733
734 if (!vbase) {
735 cpc925_printk(KERN_ERR, "MMIO not established yet\n");
736 return;
737 }
738
739 for (dev_info = &cpc925_devs[0]; dev_info->init; dev_info++) {
740 dev_info->vbase = vbase;
741 dev_info->pdev = platform_device_register_simple(
742 dev_info->ctl_name, 0, NULL, 0);
743 if (IS_ERR(dev_info->pdev)) {
744 cpc925_printk(KERN_ERR,
745 "Can't register platform device for %s\n",
746 dev_info->ctl_name);
747 continue;
748 }
749
750 /*
751 * Don't have to allocate private structure but
752 * make use of cpc925_devs[] instead.
753 */
754 dev_info->edac_idx = edac_device_alloc_index();
755 dev_info->edac_dev =
756 edac_device_alloc_ctl_info(0, dev_info->ctl_name,
757 1, NULL, 0, 0, NULL, 0, dev_info->edac_idx);
758 if (!dev_info->edac_dev) {
759 cpc925_printk(KERN_ERR, "No memory for edac device\n");
760 goto err1;
761 }
762
763 dev_info->edac_dev->pvt_info = dev_info;
764 dev_info->edac_dev->dev = &dev_info->pdev->dev;
765 dev_info->edac_dev->ctl_name = dev_info->ctl_name;
766 dev_info->edac_dev->mod_name = CPC925_EDAC_MOD_STR;
767 dev_info->edac_dev->dev_name = dev_name(&dev_info->pdev->dev);
768
769 if (edac_op_state == EDAC_OPSTATE_POLL)
770 dev_info->edac_dev->edac_check = dev_info->check;
771
772 if (dev_info->init)
773 dev_info->init(dev_info);
774
775 if (edac_device_add_device(dev_info->edac_dev) > 0) {
776 cpc925_printk(KERN_ERR,
777 "Unable to add edac device for %s\n",
778 dev_info->ctl_name);
779 goto err2;
780 }
781
782 debugf0("%s: Successfully added edac device for %s\n",
783 __func__, dev_info->ctl_name);
784
785 continue;
786
787err2:
788 if (dev_info->exit)
789 dev_info->exit(dev_info);
790 edac_device_free_ctl_info(dev_info->edac_dev);
791err1:
792 platform_device_unregister(dev_info->pdev);
793 }
794}
795
796/*
797 * Delete the common "edac_device" for CPU Err Detection
798 * and HyperTransport Link Err Detection
799 */
800static void cpc925_del_edac_devices(void)
801{
802 struct cpc925_dev_info *dev_info;
803
804 for (dev_info = &cpc925_devs[0]; dev_info->init; dev_info++) {
805 if (dev_info->edac_dev) {
806 edac_device_del_device(dev_info->edac_dev->dev);
807 edac_device_free_ctl_info(dev_info->edac_dev);
808 platform_device_unregister(dev_info->pdev);
809 }
810
811 if (dev_info->exit)
812 dev_info->exit(dev_info);
813
814 debugf0("%s: Successfully deleted edac device for %s\n",
815 __func__, dev_info->ctl_name);
816 }
817}
818
819/* Convert current back-ground scrub rate into byte/sec bandwith */
820static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw)
821{
822 struct cpc925_mc_pdata *pdata = mci->pvt_info;
823 u32 mscr;
824 u8 si;
825
826 mscr = __raw_readl(pdata->vbase + REG_MSCR_OFFSET);
827 si = (mscr & MSCR_SI_MASK) >> MSCR_SI_SHIFT;
828
829 debugf0("%s, Mem Scrub Ctrl Register 0x%x\n", __func__, mscr);
830
831 if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) ||
832 (si == 0)) {
833 cpc925_mc_printk(mci, KERN_INFO, "Scrub mode not enabled\n");
834 *bw = 0;
835 } else
836 *bw = CPC925_SCRUB_BLOCK_SIZE * 0xFA67 / si;
837
838 return 0;
839}
840
841/* Return 0 for single channel; 1 for dual channel */
842static int cpc925_mc_get_channels(void __iomem *vbase)
843{
844 int dual = 0;
845 u32 mbcr;
846
847 mbcr = __raw_readl(vbase + REG_MBCR_OFFSET);
848
849 /*
850 * Dual channel only when 128-bit wide physical bus
851 * and 128-bit configuration.
852 */
853 if (((mbcr & MBCR_64BITCFG_MASK) == 0) &&
854 ((mbcr & MBCR_64BITBUS_MASK) == 0))
855 dual = 1;
856
857 debugf0("%s: %s channel\n", __func__,
858 (dual > 0) ? "Dual" : "Single");
859
860 return dual;
861}
862
863static int __devinit cpc925_probe(struct platform_device *pdev)
864{
865 static int edac_mc_idx;
866 struct mem_ctl_info *mci;
867 void __iomem *vbase;
868 struct cpc925_mc_pdata *pdata;
869 struct resource *r;
870 int res = 0, nr_channels;
871
872 debugf0("%s: %s platform device found!\n", __func__, pdev->name);
873
874 if (!devres_open_group(&pdev->dev, cpc925_probe, GFP_KERNEL)) {
875 res = -ENOMEM;
876 goto out;
877 }
878
879 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
880 if (!r) {
881 cpc925_printk(KERN_ERR, "Unable to get resource\n");
882 res = -ENOENT;
883 goto err1;
884 }
885
886 if (!devm_request_mem_region(&pdev->dev,
887 r->start,
888 r->end - r->start + 1,
889 pdev->name)) {
890 cpc925_printk(KERN_ERR, "Unable to request mem region\n");
891 res = -EBUSY;
892 goto err1;
893 }
894
895 vbase = devm_ioremap(&pdev->dev, r->start, r->end - r->start + 1);
896 if (!vbase) {
897 cpc925_printk(KERN_ERR, "Unable to ioremap device\n");
898 res = -ENOMEM;
899 goto err2;
900 }
901
902 nr_channels = cpc925_mc_get_channels(vbase);
903 mci = edac_mc_alloc(sizeof(struct cpc925_mc_pdata),
904 CPC925_NR_CSROWS, nr_channels + 1, edac_mc_idx);
905 if (!mci) {
906 cpc925_printk(KERN_ERR, "No memory for mem_ctl_info\n");
907 res = -ENOMEM;
908 goto err2;
909 }
910
911 pdata = mci->pvt_info;
912 pdata->vbase = vbase;
913 pdata->edac_idx = edac_mc_idx++;
914 pdata->name = pdev->name;
915
916 mci->dev = &pdev->dev;
917 platform_set_drvdata(pdev, mci);
918 mci->dev_name = dev_name(&pdev->dev);
919 mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR;
920 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
921 mci->edac_cap = EDAC_FLAG_SECDED;
922 mci->mod_name = CPC925_EDAC_MOD_STR;
923 mci->mod_ver = CPC925_EDAC_REVISION;
924 mci->ctl_name = pdev->name;
925
926 if (edac_op_state == EDAC_OPSTATE_POLL)
927 mci->edac_check = cpc925_mc_check;
928
929 mci->ctl_page_to_phys = NULL;
930 mci->scrub_mode = SCRUB_SW_SRC;
931 mci->set_sdram_scrub_rate = NULL;
932 mci->get_sdram_scrub_rate = cpc925_get_sdram_scrub_rate;
933
934 cpc925_init_csrows(mci);
935
936 /* Setup memory controller registers */
937 cpc925_mc_init(mci);
938
939 if (edac_mc_add_mc(mci) > 0) {
940 cpc925_mc_printk(mci, KERN_ERR, "Failed edac_mc_add_mc()\n");
941 goto err3;
942 }
943
944 cpc925_add_edac_devices(vbase);
945
946 /* get this far and it's successful */
947 debugf0("%s: success\n", __func__);
948
949 res = 0;
950 goto out;
951
952err3:
953 cpc925_mc_exit(mci);
954 edac_mc_free(mci);
955err2:
956 devm_release_mem_region(&pdev->dev, r->start, r->end-r->start+1);
957err1:
958 devres_release_group(&pdev->dev, cpc925_probe);
959out:
960 return res;
961}
962
963static int cpc925_remove(struct platform_device *pdev)
964{
965 struct mem_ctl_info *mci = platform_get_drvdata(pdev);
966
967 /*
968 * Delete common edac devices before edac mc, because
969 * the former share the MMIO of the latter.
970 */
971 cpc925_del_edac_devices();
972 cpc925_mc_exit(mci);
973
974 edac_mc_del_mc(&pdev->dev);
975 edac_mc_free(mci);
976
977 return 0;
978}
979
980static struct platform_driver cpc925_edac_driver = {
981 .probe = cpc925_probe,
982 .remove = cpc925_remove,
983 .driver = {
984 .name = "cpc925_edac",
985 }
986};
987
988static int __init cpc925_edac_init(void)
989{
990 int ret = 0;
991
992 printk(KERN_INFO "IBM CPC925 EDAC driver " CPC925_EDAC_REVISION "\n");
993 printk(KERN_INFO "\t(c) 2008 Wind River Systems, Inc\n");
994
995 /* Only support POLL mode so far */
996 edac_op_state = EDAC_OPSTATE_POLL;
997
998 ret = platform_driver_register(&cpc925_edac_driver);
999 if (ret) {
1000 printk(KERN_WARNING "Failed to register %s\n",
1001 CPC925_EDAC_MOD_STR);
1002 }
1003
1004 return ret;
1005}
1006
1007static void __exit cpc925_edac_exit(void)
1008{
1009 platform_driver_unregister(&cpc925_edac_driver);
1010}
1011
1012module_init(cpc925_edac_init);
1013module_exit(cpc925_edac_exit);
1014
1015MODULE_LICENSE("GPL");
1016MODULE_AUTHOR("Cao Qingtao <qingtao.cao@windriver.com>");
1017MODULE_DESCRIPTION("IBM CPC925 Bridge and MC EDAC kernel module");
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index 48d3b1409834..3493c6bdb820 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -841,6 +841,7 @@ extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
841 int inst_nr, int block_nr, const char *msg); 841 int inst_nr, int block_nr, const char *msg);
842extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, 842extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
843 int inst_nr, int block_nr, const char *msg); 843 int inst_nr, int block_nr, const char *msg);
844extern int edac_device_alloc_index(void);
844 845
845/* 846/*
846 * edac_pci APIs 847 * edac_pci APIs
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index a7d2c717d033..b02a6a69a8f0 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -490,6 +490,20 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
490 mutex_unlock(&device_ctls_mutex); 490 mutex_unlock(&device_ctls_mutex);
491} 491}
492 492
493/*
494 * edac_device_alloc_index: Allocate a unique device index number
495 *
496 * Return:
497 * allocated index number
498 */
499int edac_device_alloc_index(void)
500{
501 static atomic_t device_indexes = ATOMIC_INIT(0);
502
503 return atomic_inc_return(&device_indexes) - 1;
504}
505EXPORT_SYMBOL_GPL(edac_device_alloc_index);
506
493/** 507/**
494 * edac_device_add_device: Insert the 'edac_dev' structure into the 508 * edac_device_add_device: Insert the 'edac_dev' structure into the
495 * edac_device global list and create sysfs entries associated with 509 * edac_device global list and create sysfs entries associated with
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 11f373971fa5..3582c39f9725 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -67,6 +67,12 @@ config GPIO_SYSFS
67 67
68comment "Memory mapped GPIO expanders:" 68comment "Memory mapped GPIO expanders:"
69 69
70config GPIO_PL061
71 bool "PrimeCell PL061 GPIO support"
72 depends on ARM_AMBA
73 help
74 Say yes here to support the PrimeCell PL061 GPIO device
75
70config GPIO_XILINX 76config GPIO_XILINX
71 bool "Xilinx GPIO support" 77 bool "Xilinx GPIO support"
72 depends on PPC_OF || MICROBLAZE 78 depends on PPC_OF || MICROBLAZE
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 49ac64e515e6..ef90203e8f3c 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_GPIO_MAX732X) += max732x.o
9obj-$(CONFIG_GPIO_MCP23S08) += mcp23s08.o 9obj-$(CONFIG_GPIO_MCP23S08) += mcp23s08.o
10obj-$(CONFIG_GPIO_PCA953X) += pca953x.o 10obj-$(CONFIG_GPIO_PCA953X) += pca953x.o
11obj-$(CONFIG_GPIO_PCF857X) += pcf857x.o 11obj-$(CONFIG_GPIO_PCF857X) += pcf857x.o
12obj-$(CONFIG_GPIO_PL061) += pl061.o
12obj-$(CONFIG_GPIO_TWL4030) += twl4030-gpio.o 13obj-$(CONFIG_GPIO_TWL4030) += twl4030-gpio.o
13obj-$(CONFIG_GPIO_XILINX) += xilinx_gpio.o 14obj-$(CONFIG_GPIO_XILINX) += xilinx_gpio.o
14obj-$(CONFIG_GPIO_BT8XX) += bt8xxgpio.o 15obj-$(CONFIG_GPIO_BT8XX) += bt8xxgpio.o
diff --git a/drivers/gpio/max7301.c b/drivers/gpio/max7301.c
index 3e7f4e06386e..7b82eaae2621 100644
--- a/drivers/gpio/max7301.c
+++ b/drivers/gpio/max7301.c
@@ -287,7 +287,7 @@ exit_destroy:
287 return ret; 287 return ret;
288} 288}
289 289
290static int max7301_remove(struct spi_device *spi) 290static int __devexit max7301_remove(struct spi_device *spi)
291{ 291{
292 struct max7301 *ts; 292 struct max7301 *ts;
293 int ret; 293 int ret;
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 8dc0164bd51e..cdb6574d25a6 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -15,6 +15,10 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/i2c.h> 16#include <linux/i2c.h>
17#include <linux/i2c/pca953x.h> 17#include <linux/i2c/pca953x.h>
18#ifdef CONFIG_OF_GPIO
19#include <linux/of_platform.h>
20#include <linux/of_gpio.h>
21#endif
18 22
19#include <asm/gpio.h> 23#include <asm/gpio.h>
20 24
@@ -32,6 +36,7 @@ static const struct i2c_device_id pca953x_id[] = {
32 { "pca9539", 16, }, 36 { "pca9539", 16, },
33 { "pca9554", 8, }, 37 { "pca9554", 8, },
34 { "pca9555", 16, }, 38 { "pca9555", 16, },
39 { "pca9556", 8, },
35 { "pca9557", 8, }, 40 { "pca9557", 8, },
36 41
37 { "max7310", 8, }, 42 { "max7310", 8, },
@@ -49,7 +54,9 @@ struct pca953x_chip {
49 uint16_t reg_direction; 54 uint16_t reg_direction;
50 55
51 struct i2c_client *client; 56 struct i2c_client *client;
57 struct pca953x_platform_data *dyn_pdata;
52 struct gpio_chip gpio_chip; 58 struct gpio_chip gpio_chip;
59 char **names;
53}; 60};
54 61
55static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) 62static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val)
@@ -192,8 +199,57 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
192 gc->label = chip->client->name; 199 gc->label = chip->client->name;
193 gc->dev = &chip->client->dev; 200 gc->dev = &chip->client->dev;
194 gc->owner = THIS_MODULE; 201 gc->owner = THIS_MODULE;
202 gc->names = chip->names;
195} 203}
196 204
205/*
206 * Handlers for alternative sources of platform_data
207 */
208#ifdef CONFIG_OF_GPIO
209/*
210 * Translate OpenFirmware node properties into platform_data
211 */
212static struct pca953x_platform_data *
213pca953x_get_alt_pdata(struct i2c_client *client)
214{
215 struct pca953x_platform_data *pdata;
216 struct device_node *node;
217 const uint16_t *val;
218
219 node = dev_archdata_get_node(&client->dev.archdata);
220 if (node == NULL)
221 return NULL;
222
223 pdata = kzalloc(sizeof(struct pca953x_platform_data), GFP_KERNEL);
224 if (pdata == NULL) {
225 dev_err(&client->dev, "Unable to allocate platform_data\n");
226 return NULL;
227 }
228
229 pdata->gpio_base = -1;
230 val = of_get_property(node, "linux,gpio-base", NULL);
231 if (val) {
232 if (*val < 0)
233 dev_warn(&client->dev,
234 "invalid gpio-base in device tree\n");
235 else
236 pdata->gpio_base = *val;
237 }
238
239 val = of_get_property(node, "polarity", NULL);
240 if (val)
241 pdata->invert = *val;
242
243 return pdata;
244}
245#else
246static struct pca953x_platform_data *
247pca953x_get_alt_pdata(struct i2c_client *client)
248{
249 return NULL;
250}
251#endif
252
197static int __devinit pca953x_probe(struct i2c_client *client, 253static int __devinit pca953x_probe(struct i2c_client *client,
198 const struct i2c_device_id *id) 254 const struct i2c_device_id *id)
199{ 255{
@@ -201,20 +257,32 @@ static int __devinit pca953x_probe(struct i2c_client *client,
201 struct pca953x_chip *chip; 257 struct pca953x_chip *chip;
202 int ret; 258 int ret;
203 259
260 chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL);
261 if (chip == NULL)
262 return -ENOMEM;
263
204 pdata = client->dev.platform_data; 264 pdata = client->dev.platform_data;
205 if (pdata == NULL) { 265 if (pdata == NULL) {
206 dev_dbg(&client->dev, "no platform data\n"); 266 pdata = pca953x_get_alt_pdata(client);
207 return -EINVAL; 267 /*
268 * Unlike normal platform_data, this is allocated
269 * dynamically and must be freed in the driver
270 */
271 chip->dyn_pdata = pdata;
208 } 272 }
209 273
210 chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL); 274 if (pdata == NULL) {
211 if (chip == NULL) 275 dev_dbg(&client->dev, "no platform data\n");
212 return -ENOMEM; 276 ret = -EINVAL;
277 goto out_failed;
278 }
213 279
214 chip->client = client; 280 chip->client = client;
215 281
216 chip->gpio_start = pdata->gpio_base; 282 chip->gpio_start = pdata->gpio_base;
217 283
284 chip->names = pdata->names;
285
218 /* initialize cached registers from their original values. 286 /* initialize cached registers from their original values.
219 * we can't share this chip with another i2c master. 287 * we can't share this chip with another i2c master.
220 */ 288 */
@@ -249,6 +317,7 @@ static int __devinit pca953x_probe(struct i2c_client *client,
249 return 0; 317 return 0;
250 318
251out_failed: 319out_failed:
320 kfree(chip->dyn_pdata);
252 kfree(chip); 321 kfree(chip);
253 return ret; 322 return ret;
254} 323}
@@ -276,6 +345,7 @@ static int pca953x_remove(struct i2c_client *client)
276 return ret; 345 return ret;
277 } 346 }
278 347
348 kfree(chip->dyn_pdata);
279 kfree(chip); 349 kfree(chip);
280 return 0; 350 return 0;
281} 351}
diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c
new file mode 100644
index 000000000000..aa8e7cb020d9
--- /dev/null
+++ b/drivers/gpio/pl061.c
@@ -0,0 +1,341 @@
1/*
2 * linux/drivers/gpio/pl061.c
3 *
4 * Copyright (C) 2008, 2009 Provigent Ltd.
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 * Driver for the ARM PrimeCell(tm) General Purpose Input/Output (PL061)
11 *
12 * Data sheet: ARM DDI 0190B, September 2000
13 */
14#include <linux/spinlock.h>
15#include <linux/errno.h>
16#include <linux/module.h>
17#include <linux/list.h>
18#include <linux/io.h>
19#include <linux/ioport.h>
20#include <linux/irq.h>
21#include <linux/bitops.h>
22#include <linux/workqueue.h>
23#include <linux/gpio.h>
24#include <linux/device.h>
25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h>
27
28#define GPIODIR 0x400
29#define GPIOIS 0x404
30#define GPIOIBE 0x408
31#define GPIOIEV 0x40C
32#define GPIOIE 0x410
33#define GPIORIS 0x414
34#define GPIOMIS 0x418
35#define GPIOIC 0x41C
36
37#define PL061_GPIO_NR 8
38
39struct pl061_gpio {
40 /* We use a list of pl061_gpio structs for each trigger IRQ in the main
41 * interrupts controller of the system. We need this to support systems
42 * in which more that one PL061s are connected to the same IRQ. The ISR
43 * interates through this list to find the source of the interrupt.
44 */
45 struct list_head list;
46
47 /* Each of the two spinlocks protects a different set of hardware
48 * regiters and data structurs. This decouples the code of the IRQ from
49 * the GPIO code. This also makes the case of a GPIO routine call from
50 * the IRQ code simpler.
51 */
52 spinlock_t lock; /* GPIO registers */
53 spinlock_t irq_lock; /* IRQ registers */
54
55 void __iomem *base;
56 unsigned irq_base;
57 struct gpio_chip gc;
58};
59
60static int pl061_direction_input(struct gpio_chip *gc, unsigned offset)
61{
62 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
63 unsigned long flags;
64 unsigned char gpiodir;
65
66 if (offset >= gc->ngpio)
67 return -EINVAL;
68
69 spin_lock_irqsave(&chip->lock, flags);
70 gpiodir = readb(chip->base + GPIODIR);
71 gpiodir &= ~(1 << offset);
72 writeb(gpiodir, chip->base + GPIODIR);
73 spin_unlock_irqrestore(&chip->lock, flags);
74
75 return 0;
76}
77
78static int pl061_direction_output(struct gpio_chip *gc, unsigned offset,
79 int value)
80{
81 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
82 unsigned long flags;
83 unsigned char gpiodir;
84
85 if (offset >= gc->ngpio)
86 return -EINVAL;
87
88 spin_lock_irqsave(&chip->lock, flags);
89 writeb(!!value << offset, chip->base + (1 << (offset + 2)));
90 gpiodir = readb(chip->base + GPIODIR);
91 gpiodir |= 1 << offset;
92 writeb(gpiodir, chip->base + GPIODIR);
93 spin_unlock_irqrestore(&chip->lock, flags);
94
95 return 0;
96}
97
98static int pl061_get_value(struct gpio_chip *gc, unsigned offset)
99{
100 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
101
102 return !!readb(chip->base + (1 << (offset + 2)));
103}
104
105static void pl061_set_value(struct gpio_chip *gc, unsigned offset, int value)
106{
107 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
108
109 writeb(!!value << offset, chip->base + (1 << (offset + 2)));
110}
111
112/*
113 * PL061 GPIO IRQ
114 */
115static void pl061_irq_disable(unsigned irq)
116{
117 struct pl061_gpio *chip = get_irq_chip_data(irq);
118 int offset = irq - chip->irq_base;
119 unsigned long flags;
120 u8 gpioie;
121
122 spin_lock_irqsave(&chip->irq_lock, flags);
123 gpioie = readb(chip->base + GPIOIE);
124 gpioie &= ~(1 << offset);
125 writeb(gpioie, chip->base + GPIOIE);
126 spin_unlock_irqrestore(&chip->irq_lock, flags);
127}
128
129static void pl061_irq_enable(unsigned irq)
130{
131 struct pl061_gpio *chip = get_irq_chip_data(irq);
132 int offset = irq - chip->irq_base;
133 unsigned long flags;
134 u8 gpioie;
135
136 spin_lock_irqsave(&chip->irq_lock, flags);
137 gpioie = readb(chip->base + GPIOIE);
138 gpioie |= 1 << offset;
139 writeb(gpioie, chip->base + GPIOIE);
140 spin_unlock_irqrestore(&chip->irq_lock, flags);
141}
142
143static int pl061_irq_type(unsigned irq, unsigned trigger)
144{
145 struct pl061_gpio *chip = get_irq_chip_data(irq);
146 int offset = irq - chip->irq_base;
147 unsigned long flags;
148 u8 gpiois, gpioibe, gpioiev;
149
150 if (offset < 0 || offset > PL061_GPIO_NR)
151 return -EINVAL;
152
153 spin_lock_irqsave(&chip->irq_lock, flags);
154
155 gpioiev = readb(chip->base + GPIOIEV);
156
157 gpiois = readb(chip->base + GPIOIS);
158 if (trigger & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
159 gpiois |= 1 << offset;
160 if (trigger & IRQ_TYPE_LEVEL_HIGH)
161 gpioiev |= 1 << offset;
162 else
163 gpioiev &= ~(1 << offset);
164 } else
165 gpiois &= ~(1 << offset);
166 writeb(gpiois, chip->base + GPIOIS);
167
168 gpioibe = readb(chip->base + GPIOIBE);
169 if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH)
170 gpioibe |= 1 << offset;
171 else {
172 gpioibe &= ~(1 << offset);
173 if (trigger & IRQ_TYPE_EDGE_RISING)
174 gpioiev |= 1 << offset;
175 else
176 gpioiev &= ~(1 << offset);
177 }
178 writeb(gpioibe, chip->base + GPIOIBE);
179
180 writeb(gpioiev, chip->base + GPIOIEV);
181
182 spin_unlock_irqrestore(&chip->irq_lock, flags);
183
184 return 0;
185}
186
187static struct irq_chip pl061_irqchip = {
188 .name = "GPIO",
189 .enable = pl061_irq_enable,
190 .disable = pl061_irq_disable,
191 .set_type = pl061_irq_type,
192};
193
194static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
195{
196 struct list_head *chip_list = get_irq_chip_data(irq);
197 struct list_head *ptr;
198 struct pl061_gpio *chip;
199
200 desc->chip->ack(irq);
201 list_for_each(ptr, chip_list) {
202 unsigned long pending;
203 int gpio;
204
205 chip = list_entry(ptr, struct pl061_gpio, list);
206 pending = readb(chip->base + GPIOMIS);
207 writeb(pending, chip->base + GPIOIC);
208
209 if (pending == 0)
210 continue;
211
212 for_each_bit(gpio, &pending, PL061_GPIO_NR)
213 generic_handle_irq(gpio_to_irq(gpio));
214 }
215 desc->chip->unmask(irq);
216}
217
218static int __init pl061_probe(struct amba_device *dev, struct amba_id *id)
219{
220 struct pl061_platform_data *pdata;
221 struct pl061_gpio *chip;
222 struct list_head *chip_list;
223 int ret, irq, i;
224 static unsigned long init_irq[BITS_TO_LONGS(NR_IRQS)];
225
226 pdata = dev->dev.platform_data;
227 if (pdata == NULL)
228 return -ENODEV;
229
230 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
231 if (chip == NULL)
232 return -ENOMEM;
233
234 if (!request_mem_region(dev->res.start,
235 resource_size(&dev->res), "pl061")) {
236 ret = -EBUSY;
237 goto free_mem;
238 }
239
240 chip->base = ioremap(dev->res.start, resource_size(&dev->res));
241 if (chip->base == NULL) {
242 ret = -ENOMEM;
243 goto release_region;
244 }
245
246 spin_lock_init(&chip->lock);
247 spin_lock_init(&chip->irq_lock);
248 INIT_LIST_HEAD(&chip->list);
249
250 chip->gc.direction_input = pl061_direction_input;
251 chip->gc.direction_output = pl061_direction_output;
252 chip->gc.get = pl061_get_value;
253 chip->gc.set = pl061_set_value;
254 chip->gc.base = pdata->gpio_base;
255 chip->gc.ngpio = PL061_GPIO_NR;
256 chip->gc.label = dev_name(&dev->dev);
257 chip->gc.dev = &dev->dev;
258 chip->gc.owner = THIS_MODULE;
259
260 chip->irq_base = pdata->irq_base;
261
262 ret = gpiochip_add(&chip->gc);
263 if (ret)
264 goto iounmap;
265
266 /*
267 * irq_chip support
268 */
269
270 if (chip->irq_base == (unsigned) -1)
271 return 0;
272
273 writeb(0, chip->base + GPIOIE); /* disable irqs */
274 irq = dev->irq[0];
275 if (irq < 0) {
276 ret = -ENODEV;
277 goto iounmap;
278 }
279 set_irq_chained_handler(irq, pl061_irq_handler);
280 if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */
281 chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL);
282 if (chip_list == NULL) {
283 ret = -ENOMEM;
284 goto iounmap;
285 }
286 INIT_LIST_HEAD(chip_list);
287 set_irq_chip_data(irq, chip_list);
288 } else
289 chip_list = get_irq_chip_data(irq);
290 list_add(&chip->list, chip_list);
291
292 for (i = 0; i < PL061_GPIO_NR; i++) {
293 if (pdata->directions & (1 << i))
294 pl061_direction_output(&chip->gc, i,
295 pdata->values & (1 << i));
296 else
297 pl061_direction_input(&chip->gc, i);
298
299 set_irq_chip(i+chip->irq_base, &pl061_irqchip);
300 set_irq_handler(i+chip->irq_base, handle_simple_irq);
301 set_irq_flags(i+chip->irq_base, IRQF_VALID);
302 set_irq_chip_data(i+chip->irq_base, chip);
303 }
304
305 return 0;
306
307iounmap:
308 iounmap(chip->base);
309release_region:
310 release_mem_region(dev->res.start, resource_size(&dev->res));
311free_mem:
312 kfree(chip);
313
314 return ret;
315}
316
317static struct amba_id pl061_ids[] __initdata = {
318 {
319 .id = 0x00041061,
320 .mask = 0x000fffff,
321 },
322 { 0, 0 },
323};
324
325static struct amba_driver pl061_gpio_driver = {
326 .drv = {
327 .name = "pl061_gpio",
328 },
329 .id_table = pl061_ids,
330 .probe = pl061_probe,
331};
332
333static int __init pl061_gpio_init(void)
334{
335 return amba_driver_register(&pl061_gpio_driver);
336}
337subsys_initcall(pl061_gpio_init);
338
339MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
340MODULE_DESCRIPTION("PL061 GPIO driver");
341MODULE_LICENSE("GPL");
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index dd778d7ae047..d325e86e3103 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -197,7 +197,7 @@ int mpc_i2c_get_fdr_52xx(struct device_node *node, u32 clock, int prescaler)
197 return -EINVAL; 197 return -EINVAL;
198 198
199 /* Determine divider value */ 199 /* Determine divider value */
200 divider = mpc52xx_find_ipb_freq(node) / clock; 200 divider = mpc5xxx_get_bus_frequency(node) / clock;
201 201
202 /* 202 /*
203 * We want to choose an FDR/DFSR that generates an I2C bus speed that 203 * We want to choose an FDR/DFSR that generates an I2C bus speed that
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 34d54e7281fd..de4aad076ebc 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -1300,7 +1300,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
1300 netif_stop_queue(ndev); 1300 netif_stop_queue(ndev);
1301 } 1301 }
1302 } 1302 }
1303 return 1; 1303 return NETDEV_TX_BUSY;
1304} 1304}
1305 1305
1306/* 1306/*
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
index 8695809b24b0..87d88dbb667f 100644
--- a/drivers/md/faulty.c
+++ b/drivers/md/faulty.c
@@ -255,14 +255,14 @@ static void status(struct seq_file *seq, mddev_t *mddev)
255} 255}
256 256
257 257
258static int reconfig(mddev_t *mddev, int layout, int chunk_size) 258static int reshape(mddev_t *mddev)
259{ 259{
260 int mode = layout & ModeMask; 260 int mode = mddev->new_layout & ModeMask;
261 int count = layout >> ModeShift; 261 int count = mddev->new_layout >> ModeShift;
262 conf_t *conf = mddev->private; 262 conf_t *conf = mddev->private;
263 263
264 if (chunk_size != -1) 264 if (mddev->new_layout < 0)
265 return -EINVAL; 265 return 0;
266 266
267 /* new layout */ 267 /* new layout */
268 if (mode == ClearFaults) 268 if (mode == ClearFaults)
@@ -279,6 +279,7 @@ static int reconfig(mddev_t *mddev, int layout, int chunk_size)
279 atomic_set(&conf->counters[mode], count); 279 atomic_set(&conf->counters[mode], count);
280 } else 280 } else
281 return -EINVAL; 281 return -EINVAL;
282 mddev->new_layout = -1;
282 mddev->layout = -1; /* makes sure further changes come through */ 283 mddev->layout = -1; /* makes sure further changes come through */
283 return 0; 284 return 0;
284} 285}
@@ -298,8 +299,12 @@ static int run(mddev_t *mddev)
298{ 299{
299 mdk_rdev_t *rdev; 300 mdk_rdev_t *rdev;
300 int i; 301 int i;
302 conf_t *conf;
303
304 if (md_check_no_bitmap(mddev))
305 return -EINVAL;
301 306
302 conf_t *conf = kmalloc(sizeof(*conf), GFP_KERNEL); 307 conf = kmalloc(sizeof(*conf), GFP_KERNEL);
303 if (!conf) 308 if (!conf)
304 return -ENOMEM; 309 return -ENOMEM;
305 310
@@ -315,7 +320,7 @@ static int run(mddev_t *mddev)
315 md_set_array_sectors(mddev, faulty_size(mddev, 0, 0)); 320 md_set_array_sectors(mddev, faulty_size(mddev, 0, 0));
316 mddev->private = conf; 321 mddev->private = conf;
317 322
318 reconfig(mddev, mddev->layout, -1); 323 reshape(mddev);
319 324
320 return 0; 325 return 0;
321} 326}
@@ -338,7 +343,7 @@ static struct mdk_personality faulty_personality =
338 .run = run, 343 .run = run,
339 .stop = stop, 344 .stop = stop,
340 .status = status, 345 .status = status,
341 .reconfig = reconfig, 346 .check_reshape = reshape,
342 .size = faulty_size, 347 .size = faulty_size,
343}; 348};
344 349
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 64f1f3e046e0..15c8b7b25a9b 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -27,19 +27,27 @@
27 */ 27 */
28static inline dev_info_t *which_dev(mddev_t *mddev, sector_t sector) 28static inline dev_info_t *which_dev(mddev_t *mddev, sector_t sector)
29{ 29{
30 dev_info_t *hash; 30 int lo, mid, hi;
31 linear_conf_t *conf = mddev_to_conf(mddev); 31 linear_conf_t *conf;
32 sector_t idx = sector >> conf->sector_shift; 32
33 lo = 0;
34 hi = mddev->raid_disks - 1;
35 conf = rcu_dereference(mddev->private);
33 36
34 /* 37 /*
35 * sector_div(a,b) returns the remainer and sets a to a/b 38 * Binary Search
36 */ 39 */
37 (void)sector_div(idx, conf->spacing);
38 hash = conf->hash_table[idx];
39 40
40 while (sector >= hash->num_sectors + hash->start_sector) 41 while (hi > lo) {
41 hash++; 42
42 return hash; 43 mid = (hi + lo) / 2;
44 if (sector < conf->disks[mid].end_sector)
45 hi = mid;
46 else
47 lo = mid + 1;
48 }
49
50 return conf->disks + lo;
43} 51}
44 52
45/** 53/**
@@ -59,8 +67,10 @@ static int linear_mergeable_bvec(struct request_queue *q,
59 unsigned long maxsectors, bio_sectors = bvm->bi_size >> 9; 67 unsigned long maxsectors, bio_sectors = bvm->bi_size >> 9;
60 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); 68 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev);
61 69
70 rcu_read_lock();
62 dev0 = which_dev(mddev, sector); 71 dev0 = which_dev(mddev, sector);
63 maxsectors = dev0->num_sectors - (sector - dev0->start_sector); 72 maxsectors = dev0->end_sector - sector;
73 rcu_read_unlock();
64 74
65 if (maxsectors < bio_sectors) 75 if (maxsectors < bio_sectors)
66 maxsectors = 0; 76 maxsectors = 0;
@@ -79,46 +89,57 @@ static int linear_mergeable_bvec(struct request_queue *q,
79static void linear_unplug(struct request_queue *q) 89static void linear_unplug(struct request_queue *q)
80{ 90{
81 mddev_t *mddev = q->queuedata; 91 mddev_t *mddev = q->queuedata;
82 linear_conf_t *conf = mddev_to_conf(mddev); 92 linear_conf_t *conf;
83 int i; 93 int i;
84 94
95 rcu_read_lock();
96 conf = rcu_dereference(mddev->private);
97
85 for (i=0; i < mddev->raid_disks; i++) { 98 for (i=0; i < mddev->raid_disks; i++) {
86 struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev); 99 struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev);
87 blk_unplug(r_queue); 100 blk_unplug(r_queue);
88 } 101 }
102 rcu_read_unlock();
89} 103}
90 104
91static int linear_congested(void *data, int bits) 105static int linear_congested(void *data, int bits)
92{ 106{
93 mddev_t *mddev = data; 107 mddev_t *mddev = data;
94 linear_conf_t *conf = mddev_to_conf(mddev); 108 linear_conf_t *conf;
95 int i, ret = 0; 109 int i, ret = 0;
96 110
111 rcu_read_lock();
112 conf = rcu_dereference(mddev->private);
113
97 for (i = 0; i < mddev->raid_disks && !ret ; i++) { 114 for (i = 0; i < mddev->raid_disks && !ret ; i++) {
98 struct request_queue *q = bdev_get_queue(conf->disks[i].rdev->bdev); 115 struct request_queue *q = bdev_get_queue(conf->disks[i].rdev->bdev);
99 ret |= bdi_congested(&q->backing_dev_info, bits); 116 ret |= bdi_congested(&q->backing_dev_info, bits);
100 } 117 }
118
119 rcu_read_unlock();
101 return ret; 120 return ret;
102} 121}
103 122
104static sector_t linear_size(mddev_t *mddev, sector_t sectors, int raid_disks) 123static sector_t linear_size(mddev_t *mddev, sector_t sectors, int raid_disks)
105{ 124{
106 linear_conf_t *conf = mddev_to_conf(mddev); 125 linear_conf_t *conf;
126 sector_t array_sectors;
107 127
128 rcu_read_lock();
129 conf = rcu_dereference(mddev->private);
108 WARN_ONCE(sectors || raid_disks, 130 WARN_ONCE(sectors || raid_disks,
109 "%s does not support generic reshape\n", __func__); 131 "%s does not support generic reshape\n", __func__);
132 array_sectors = conf->array_sectors;
133 rcu_read_unlock();
110 134
111 return conf->array_sectors; 135 return array_sectors;
112} 136}
113 137
114static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) 138static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
115{ 139{
116 linear_conf_t *conf; 140 linear_conf_t *conf;
117 dev_info_t **table;
118 mdk_rdev_t *rdev; 141 mdk_rdev_t *rdev;
119 int i, nb_zone, cnt; 142 int i, cnt;
120 sector_t min_sectors;
121 sector_t curr_sector;
122 143
123 conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(dev_info_t), 144 conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(dev_info_t),
124 GFP_KERNEL); 145 GFP_KERNEL);
@@ -131,6 +152,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
131 list_for_each_entry(rdev, &mddev->disks, same_set) { 152 list_for_each_entry(rdev, &mddev->disks, same_set) {
132 int j = rdev->raid_disk; 153 int j = rdev->raid_disk;
133 dev_info_t *disk = conf->disks + j; 154 dev_info_t *disk = conf->disks + j;
155 sector_t sectors;
134 156
135 if (j < 0 || j >= raid_disks || disk->rdev) { 157 if (j < 0 || j >= raid_disks || disk->rdev) {
136 printk("linear: disk numbering problem. Aborting!\n"); 158 printk("linear: disk numbering problem. Aborting!\n");
@@ -138,6 +160,11 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
138 } 160 }
139 161
140 disk->rdev = rdev; 162 disk->rdev = rdev;
163 if (mddev->chunk_sectors) {
164 sectors = rdev->sectors;
165 sector_div(sectors, mddev->chunk_sectors);
166 rdev->sectors = sectors * mddev->chunk_sectors;
167 }
141 168
142 blk_queue_stack_limits(mddev->queue, 169 blk_queue_stack_limits(mddev->queue,
143 rdev->bdev->bd_disk->queue); 170 rdev->bdev->bd_disk->queue);
@@ -149,102 +176,24 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
149 queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) 176 queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
150 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); 177 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
151 178
152 disk->num_sectors = rdev->sectors;
153 conf->array_sectors += rdev->sectors; 179 conf->array_sectors += rdev->sectors;
154
155 cnt++; 180 cnt++;
181
156 } 182 }
157 if (cnt != raid_disks) { 183 if (cnt != raid_disks) {
158 printk("linear: not enough drives present. Aborting!\n"); 184 printk("linear: not enough drives present. Aborting!\n");
159 goto out; 185 goto out;
160 } 186 }
161 187
162 min_sectors = conf->array_sectors;
163 sector_div(min_sectors, PAGE_SIZE/sizeof(struct dev_info *));
164 if (min_sectors == 0)
165 min_sectors = 1;
166
167 /* min_sectors is the minimum spacing that will fit the hash
168 * table in one PAGE. This may be much smaller than needed.
169 * We find the smallest non-terminal set of consecutive devices
170 * that is larger than min_sectors and use the size of that as
171 * the actual spacing
172 */
173 conf->spacing = conf->array_sectors;
174 for (i=0; i < cnt-1 ; i++) {
175 sector_t tmp = 0;
176 int j;
177 for (j = i; j < cnt - 1 && tmp < min_sectors; j++)
178 tmp += conf->disks[j].num_sectors;
179 if (tmp >= min_sectors && tmp < conf->spacing)
180 conf->spacing = tmp;
181 }
182
183 /* spacing may be too large for sector_div to work with,
184 * so we might need to pre-shift
185 */
186 conf->sector_shift = 0;
187 if (sizeof(sector_t) > sizeof(u32)) {
188 sector_t space = conf->spacing;
189 while (space > (sector_t)(~(u32)0)) {
190 space >>= 1;
191 conf->sector_shift++;
192 }
193 }
194 /* 188 /*
195 * This code was restructured to work around a gcc-2.95.3 internal 189 * Here we calculate the device offsets.
196 * compiler error. Alter it with care.
197 */ 190 */
198 { 191 conf->disks[0].end_sector = conf->disks[0].rdev->sectors;
199 sector_t sz;
200 unsigned round;
201 unsigned long base;
202
203 sz = conf->array_sectors >> conf->sector_shift;
204 sz += 1; /* force round-up */
205 base = conf->spacing >> conf->sector_shift;
206 round = sector_div(sz, base);
207 nb_zone = sz + (round ? 1 : 0);
208 }
209 BUG_ON(nb_zone > PAGE_SIZE / sizeof(struct dev_info *));
210
211 conf->hash_table = kmalloc (sizeof (struct dev_info *) * nb_zone,
212 GFP_KERNEL);
213 if (!conf->hash_table)
214 goto out;
215 192
216 /*
217 * Here we generate the linear hash table
218 * First calculate the device offsets.
219 */
220 conf->disks[0].start_sector = 0;
221 for (i = 1; i < raid_disks; i++) 193 for (i = 1; i < raid_disks; i++)
222 conf->disks[i].start_sector = 194 conf->disks[i].end_sector =
223 conf->disks[i-1].start_sector + 195 conf->disks[i-1].end_sector +
224 conf->disks[i-1].num_sectors; 196 conf->disks[i].rdev->sectors;
225
226 table = conf->hash_table;
227 i = 0;
228 for (curr_sector = 0;
229 curr_sector < conf->array_sectors;
230 curr_sector += conf->spacing) {
231
232 while (i < raid_disks-1 &&
233 curr_sector >= conf->disks[i+1].start_sector)
234 i++;
235
236 *table ++ = conf->disks + i;
237 }
238
239 if (conf->sector_shift) {
240 conf->spacing >>= conf->sector_shift;
241 /* round spacing up so that when we divide by it,
242 * we err on the side of "too-low", which is safest.
243 */
244 conf->spacing++;
245 }
246
247 BUG_ON(table - conf->hash_table > nb_zone);
248 197
249 return conf; 198 return conf;
250 199
@@ -257,6 +206,8 @@ static int linear_run (mddev_t *mddev)
257{ 206{
258 linear_conf_t *conf; 207 linear_conf_t *conf;
259 208
209 if (md_check_no_bitmap(mddev))
210 return -EINVAL;
260 mddev->queue->queue_lock = &mddev->queue->__queue_lock; 211 mddev->queue->queue_lock = &mddev->queue->__queue_lock;
261 conf = linear_conf(mddev, mddev->raid_disks); 212 conf = linear_conf(mddev, mddev->raid_disks);
262 213
@@ -272,6 +223,12 @@ static int linear_run (mddev_t *mddev)
272 return 0; 223 return 0;
273} 224}
274 225
226static void free_conf(struct rcu_head *head)
227{
228 linear_conf_t *conf = container_of(head, linear_conf_t, rcu);
229 kfree(conf);
230}
231
275static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) 232static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
276{ 233{
277 /* Adding a drive to a linear array allows the array to grow. 234 /* Adding a drive to a linear array allows the array to grow.
@@ -282,7 +239,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
282 * The current one is never freed until the array is stopped. 239 * The current one is never freed until the array is stopped.
283 * This avoids races. 240 * This avoids races.
284 */ 241 */
285 linear_conf_t *newconf; 242 linear_conf_t *newconf, *oldconf;
286 243
287 if (rdev->saved_raid_disk != mddev->raid_disks) 244 if (rdev->saved_raid_disk != mddev->raid_disks)
288 return -EINVAL; 245 return -EINVAL;
@@ -294,25 +251,29 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
294 if (!newconf) 251 if (!newconf)
295 return -ENOMEM; 252 return -ENOMEM;
296 253
297 newconf->prev = mddev_to_conf(mddev); 254 oldconf = rcu_dereference(mddev->private);
298 mddev->private = newconf;
299 mddev->raid_disks++; 255 mddev->raid_disks++;
256 rcu_assign_pointer(mddev->private, newconf);
300 md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); 257 md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
301 set_capacity(mddev->gendisk, mddev->array_sectors); 258 set_capacity(mddev->gendisk, mddev->array_sectors);
259 call_rcu(&oldconf->rcu, free_conf);
302 return 0; 260 return 0;
303} 261}
304 262
305static int linear_stop (mddev_t *mddev) 263static int linear_stop (mddev_t *mddev)
306{ 264{
307 linear_conf_t *conf = mddev_to_conf(mddev); 265 linear_conf_t *conf = mddev->private;
308 266
267 /*
268 * We do not require rcu protection here since
269 * we hold reconfig_mutex for both linear_add and
270 * linear_stop, so they cannot race.
271 * We should make sure any old 'conf's are properly
272 * freed though.
273 */
274 rcu_barrier();
309 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 275 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
310 do { 276 kfree(conf);
311 linear_conf_t *t = conf->prev;
312 kfree(conf->hash_table);
313 kfree(conf);
314 conf = t;
315 } while (conf);
316 277
317 return 0; 278 return 0;
318} 279}
@@ -322,6 +283,7 @@ static int linear_make_request (struct request_queue *q, struct bio *bio)
322 const int rw = bio_data_dir(bio); 283 const int rw = bio_data_dir(bio);
323 mddev_t *mddev = q->queuedata; 284 mddev_t *mddev = q->queuedata;
324 dev_info_t *tmp_dev; 285 dev_info_t *tmp_dev;
286 sector_t start_sector;
325 int cpu; 287 int cpu;
326 288
327 if (unlikely(bio_barrier(bio))) { 289 if (unlikely(bio_barrier(bio))) {
@@ -335,33 +297,36 @@ static int linear_make_request (struct request_queue *q, struct bio *bio)
335 bio_sectors(bio)); 297 bio_sectors(bio));
336 part_stat_unlock(); 298 part_stat_unlock();
337 299
300 rcu_read_lock();
338 tmp_dev = which_dev(mddev, bio->bi_sector); 301 tmp_dev = which_dev(mddev, bio->bi_sector);
339 302 start_sector = tmp_dev->end_sector - tmp_dev->rdev->sectors;
340 if (unlikely(bio->bi_sector >= (tmp_dev->num_sectors + 303
341 tmp_dev->start_sector) 304
342 || (bio->bi_sector < 305 if (unlikely(bio->bi_sector >= (tmp_dev->end_sector)
343 tmp_dev->start_sector))) { 306 || (bio->bi_sector < start_sector))) {
344 char b[BDEVNAME_SIZE]; 307 char b[BDEVNAME_SIZE];
345 308
346 printk("linear_make_request: Sector %llu out of bounds on " 309 printk("linear_make_request: Sector %llu out of bounds on "
347 "dev %s: %llu sectors, offset %llu\n", 310 "dev %s: %llu sectors, offset %llu\n",
348 (unsigned long long)bio->bi_sector, 311 (unsigned long long)bio->bi_sector,
349 bdevname(tmp_dev->rdev->bdev, b), 312 bdevname(tmp_dev->rdev->bdev, b),
350 (unsigned long long)tmp_dev->num_sectors, 313 (unsigned long long)tmp_dev->rdev->sectors,
351 (unsigned long long)tmp_dev->start_sector); 314 (unsigned long long)start_sector);
315 rcu_read_unlock();
352 bio_io_error(bio); 316 bio_io_error(bio);
353 return 0; 317 return 0;
354 } 318 }
355 if (unlikely(bio->bi_sector + (bio->bi_size >> 9) > 319 if (unlikely(bio->bi_sector + (bio->bi_size >> 9) >
356 tmp_dev->start_sector + tmp_dev->num_sectors)) { 320 tmp_dev->end_sector)) {
357 /* This bio crosses a device boundary, so we have to 321 /* This bio crosses a device boundary, so we have to
358 * split it. 322 * split it.
359 */ 323 */
360 struct bio_pair *bp; 324 struct bio_pair *bp;
325 sector_t end_sector = tmp_dev->end_sector;
326
327 rcu_read_unlock();
361 328
362 bp = bio_split(bio, 329 bp = bio_split(bio, end_sector - bio->bi_sector);
363 tmp_dev->start_sector + tmp_dev->num_sectors
364 - bio->bi_sector);
365 330
366 if (linear_make_request(q, &bp->bio1)) 331 if (linear_make_request(q, &bp->bio1))
367 generic_make_request(&bp->bio1); 332 generic_make_request(&bp->bio1);
@@ -372,8 +337,9 @@ static int linear_make_request (struct request_queue *q, struct bio *bio)
372 } 337 }
373 338
374 bio->bi_bdev = tmp_dev->rdev->bdev; 339 bio->bi_bdev = tmp_dev->rdev->bdev;
375 bio->bi_sector = bio->bi_sector - tmp_dev->start_sector 340 bio->bi_sector = bio->bi_sector - start_sector
376 + tmp_dev->rdev->data_offset; 341 + tmp_dev->rdev->data_offset;
342 rcu_read_unlock();
377 343
378 return 1; 344 return 1;
379} 345}
@@ -381,7 +347,7 @@ static int linear_make_request (struct request_queue *q, struct bio *bio)
381static void linear_status (struct seq_file *seq, mddev_t *mddev) 347static void linear_status (struct seq_file *seq, mddev_t *mddev)
382{ 348{
383 349
384 seq_printf(seq, " %dk rounding", mddev->chunk_size/1024); 350 seq_printf(seq, " %dk rounding", mddev->chunk_sectors / 2);
385} 351}
386 352
387 353
diff --git a/drivers/md/linear.h b/drivers/md/linear.h
index bf8179587f95..0ce29b61605a 100644
--- a/drivers/md/linear.h
+++ b/drivers/md/linear.h
@@ -3,27 +3,19 @@
3 3
4struct dev_info { 4struct dev_info {
5 mdk_rdev_t *rdev; 5 mdk_rdev_t *rdev;
6 sector_t num_sectors; 6 sector_t end_sector;
7 sector_t start_sector;
8}; 7};
9 8
10typedef struct dev_info dev_info_t; 9typedef struct dev_info dev_info_t;
11 10
12struct linear_private_data 11struct linear_private_data
13{ 12{
14 struct linear_private_data *prev; /* earlier version */
15 dev_info_t **hash_table;
16 sector_t spacing;
17 sector_t array_sectors; 13 sector_t array_sectors;
18 int sector_shift; /* shift before dividing
19 * by spacing
20 */
21 dev_info_t disks[0]; 14 dev_info_t disks[0];
15 struct rcu_head rcu;
22}; 16};
23 17
24 18
25typedef struct linear_private_data linear_conf_t; 19typedef struct linear_private_data linear_conf_t;
26 20
27#define mddev_to_conf(mddev) ((linear_conf_t *) mddev->private)
28
29#endif 21#endif
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 20f6ac338349..09be637d52cb 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -440,15 +440,6 @@ static inline sector_t calc_dev_sboffset(struct block_device *bdev)
440 return MD_NEW_SIZE_SECTORS(num_sectors); 440 return MD_NEW_SIZE_SECTORS(num_sectors);
441} 441}
442 442
443static sector_t calc_num_sectors(mdk_rdev_t *rdev, unsigned chunk_size)
444{
445 sector_t num_sectors = rdev->sb_start;
446
447 if (chunk_size)
448 num_sectors &= ~((sector_t)chunk_size/512 - 1);
449 return num_sectors;
450}
451
452static int alloc_disk_sb(mdk_rdev_t * rdev) 443static int alloc_disk_sb(mdk_rdev_t * rdev)
453{ 444{
454 if (rdev->sb_page) 445 if (rdev->sb_page)
@@ -745,6 +736,24 @@ struct super_type {
745}; 736};
746 737
747/* 738/*
739 * Check that the given mddev has no bitmap.
740 *
741 * This function is called from the run method of all personalities that do not
742 * support bitmaps. It prints an error message and returns non-zero if mddev
743 * has a bitmap. Otherwise, it returns 0.
744 *
745 */
746int md_check_no_bitmap(mddev_t *mddev)
747{
748 if (!mddev->bitmap_file && !mddev->bitmap_offset)
749 return 0;
750 printk(KERN_ERR "%s: bitmaps are not supported for %s\n",
751 mdname(mddev), mddev->pers->name);
752 return 1;
753}
754EXPORT_SYMBOL(md_check_no_bitmap);
755
756/*
748 * load_super for 0.90.0 757 * load_super for 0.90.0
749 */ 758 */
750static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) 759static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
@@ -797,17 +806,6 @@ static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version
797 rdev->data_offset = 0; 806 rdev->data_offset = 0;
798 rdev->sb_size = MD_SB_BYTES; 807 rdev->sb_size = MD_SB_BYTES;
799 808
800 if (sb->state & (1<<MD_SB_BITMAP_PRESENT)) {
801 if (sb->level != 1 && sb->level != 4
802 && sb->level != 5 && sb->level != 6
803 && sb->level != 10) {
804 /* FIXME use a better test */
805 printk(KERN_WARNING
806 "md: bitmaps not supported for this level.\n");
807 goto abort;
808 }
809 }
810
811 if (sb->level == LEVEL_MULTIPATH) 809 if (sb->level == LEVEL_MULTIPATH)
812 rdev->desc_nr = -1; 810 rdev->desc_nr = -1;
813 else 811 else
@@ -836,7 +834,7 @@ static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version
836 else 834 else
837 ret = 0; 835 ret = 0;
838 } 836 }
839 rdev->sectors = calc_num_sectors(rdev, sb->chunk_size); 837 rdev->sectors = rdev->sb_start;
840 838
841 if (rdev->sectors < sb->size * 2 && sb->level > 1) 839 if (rdev->sectors < sb->size * 2 && sb->level > 1)
842 /* "this cannot possibly happen" ... */ 840 /* "this cannot possibly happen" ... */
@@ -866,7 +864,7 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
866 mddev->minor_version = sb->minor_version; 864 mddev->minor_version = sb->minor_version;
867 mddev->patch_version = sb->patch_version; 865 mddev->patch_version = sb->patch_version;
868 mddev->external = 0; 866 mddev->external = 0;
869 mddev->chunk_size = sb->chunk_size; 867 mddev->chunk_sectors = sb->chunk_size >> 9;
870 mddev->ctime = sb->ctime; 868 mddev->ctime = sb->ctime;
871 mddev->utime = sb->utime; 869 mddev->utime = sb->utime;
872 mddev->level = sb->level; 870 mddev->level = sb->level;
@@ -883,13 +881,13 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
883 mddev->delta_disks = sb->delta_disks; 881 mddev->delta_disks = sb->delta_disks;
884 mddev->new_level = sb->new_level; 882 mddev->new_level = sb->new_level;
885 mddev->new_layout = sb->new_layout; 883 mddev->new_layout = sb->new_layout;
886 mddev->new_chunk = sb->new_chunk; 884 mddev->new_chunk_sectors = sb->new_chunk >> 9;
887 } else { 885 } else {
888 mddev->reshape_position = MaxSector; 886 mddev->reshape_position = MaxSector;
889 mddev->delta_disks = 0; 887 mddev->delta_disks = 0;
890 mddev->new_level = mddev->level; 888 mddev->new_level = mddev->level;
891 mddev->new_layout = mddev->layout; 889 mddev->new_layout = mddev->layout;
892 mddev->new_chunk = mddev->chunk_size; 890 mddev->new_chunk_sectors = mddev->chunk_sectors;
893 } 891 }
894 892
895 if (sb->state & (1<<MD_SB_CLEAN)) 893 if (sb->state & (1<<MD_SB_CLEAN))
@@ -1004,7 +1002,7 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1004 sb->new_level = mddev->new_level; 1002 sb->new_level = mddev->new_level;
1005 sb->delta_disks = mddev->delta_disks; 1003 sb->delta_disks = mddev->delta_disks;
1006 sb->new_layout = mddev->new_layout; 1004 sb->new_layout = mddev->new_layout;
1007 sb->new_chunk = mddev->new_chunk; 1005 sb->new_chunk = mddev->new_chunk_sectors << 9;
1008 } 1006 }
1009 mddev->minor_version = sb->minor_version; 1007 mddev->minor_version = sb->minor_version;
1010 if (mddev->in_sync) 1008 if (mddev->in_sync)
@@ -1018,7 +1016,7 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1018 sb->recovery_cp = 0; 1016 sb->recovery_cp = 0;
1019 1017
1020 sb->layout = mddev->layout; 1018 sb->layout = mddev->layout;
1021 sb->chunk_size = mddev->chunk_size; 1019 sb->chunk_size = mddev->chunk_sectors << 9;
1022 1020
1023 if (mddev->bitmap && mddev->bitmap_file == NULL) 1021 if (mddev->bitmap && mddev->bitmap_file == NULL)
1024 sb->state |= (1<<MD_SB_BITMAP_PRESENT); 1022 sb->state |= (1<<MD_SB_BITMAP_PRESENT);
@@ -1185,17 +1183,6 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
1185 bdevname(rdev->bdev,b)); 1183 bdevname(rdev->bdev,b));
1186 return -EINVAL; 1184 return -EINVAL;
1187 } 1185 }
1188 if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET)) {
1189 if (sb->level != cpu_to_le32(1) &&
1190 sb->level != cpu_to_le32(4) &&
1191 sb->level != cpu_to_le32(5) &&
1192 sb->level != cpu_to_le32(6) &&
1193 sb->level != cpu_to_le32(10)) {
1194 printk(KERN_WARNING
1195 "md: bitmaps not supported for this level.\n");
1196 return -EINVAL;
1197 }
1198 }
1199 1186
1200 rdev->preferred_minor = 0xffff; 1187 rdev->preferred_minor = 0xffff;
1201 rdev->data_offset = le64_to_cpu(sb->data_offset); 1188 rdev->data_offset = le64_to_cpu(sb->data_offset);
@@ -1248,9 +1235,6 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
1248 if (rdev->sectors < le64_to_cpu(sb->data_size)) 1235 if (rdev->sectors < le64_to_cpu(sb->data_size))
1249 return -EINVAL; 1236 return -EINVAL;
1250 rdev->sectors = le64_to_cpu(sb->data_size); 1237 rdev->sectors = le64_to_cpu(sb->data_size);
1251 if (le32_to_cpu(sb->chunksize))
1252 rdev->sectors &= ~((sector_t)le32_to_cpu(sb->chunksize) - 1);
1253
1254 if (le64_to_cpu(sb->size) > rdev->sectors) 1238 if (le64_to_cpu(sb->size) > rdev->sectors)
1255 return -EINVAL; 1239 return -EINVAL;
1256 return ret; 1240 return ret;
@@ -1271,7 +1255,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
1271 mddev->major_version = 1; 1255 mddev->major_version = 1;
1272 mddev->patch_version = 0; 1256 mddev->patch_version = 0;
1273 mddev->external = 0; 1257 mddev->external = 0;
1274 mddev->chunk_size = le32_to_cpu(sb->chunksize) << 9; 1258 mddev->chunk_sectors = le32_to_cpu(sb->chunksize);
1275 mddev->ctime = le64_to_cpu(sb->ctime) & ((1ULL << 32)-1); 1259 mddev->ctime = le64_to_cpu(sb->ctime) & ((1ULL << 32)-1);
1276 mddev->utime = le64_to_cpu(sb->utime) & ((1ULL << 32)-1); 1260 mddev->utime = le64_to_cpu(sb->utime) & ((1ULL << 32)-1);
1277 mddev->level = le32_to_cpu(sb->level); 1261 mddev->level = le32_to_cpu(sb->level);
@@ -1297,13 +1281,13 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
1297 mddev->delta_disks = le32_to_cpu(sb->delta_disks); 1281 mddev->delta_disks = le32_to_cpu(sb->delta_disks);
1298 mddev->new_level = le32_to_cpu(sb->new_level); 1282 mddev->new_level = le32_to_cpu(sb->new_level);
1299 mddev->new_layout = le32_to_cpu(sb->new_layout); 1283 mddev->new_layout = le32_to_cpu(sb->new_layout);
1300 mddev->new_chunk = le32_to_cpu(sb->new_chunk)<<9; 1284 mddev->new_chunk_sectors = le32_to_cpu(sb->new_chunk);
1301 } else { 1285 } else {
1302 mddev->reshape_position = MaxSector; 1286 mddev->reshape_position = MaxSector;
1303 mddev->delta_disks = 0; 1287 mddev->delta_disks = 0;
1304 mddev->new_level = mddev->level; 1288 mddev->new_level = mddev->level;
1305 mddev->new_layout = mddev->layout; 1289 mddev->new_layout = mddev->layout;
1306 mddev->new_chunk = mddev->chunk_size; 1290 mddev->new_chunk_sectors = mddev->chunk_sectors;
1307 } 1291 }
1308 1292
1309 } else if (mddev->pers == NULL) { 1293 } else if (mddev->pers == NULL) {
@@ -1375,7 +1359,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1375 1359
1376 sb->raid_disks = cpu_to_le32(mddev->raid_disks); 1360 sb->raid_disks = cpu_to_le32(mddev->raid_disks);
1377 sb->size = cpu_to_le64(mddev->dev_sectors); 1361 sb->size = cpu_to_le64(mddev->dev_sectors);
1378 sb->chunksize = cpu_to_le32(mddev->chunk_size >> 9); 1362 sb->chunksize = cpu_to_le32(mddev->chunk_sectors);
1379 sb->level = cpu_to_le32(mddev->level); 1363 sb->level = cpu_to_le32(mddev->level);
1380 sb->layout = cpu_to_le32(mddev->layout); 1364 sb->layout = cpu_to_le32(mddev->layout);
1381 1365
@@ -1402,7 +1386,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1402 sb->new_layout = cpu_to_le32(mddev->new_layout); 1386 sb->new_layout = cpu_to_le32(mddev->new_layout);
1403 sb->delta_disks = cpu_to_le32(mddev->delta_disks); 1387 sb->delta_disks = cpu_to_le32(mddev->delta_disks);
1404 sb->new_level = cpu_to_le32(mddev->new_level); 1388 sb->new_level = cpu_to_le32(mddev->new_level);
1405 sb->new_chunk = cpu_to_le32(mddev->new_chunk>>9); 1389 sb->new_chunk = cpu_to_le32(mddev->new_chunk_sectors);
1406 } 1390 }
1407 1391
1408 max_dev = 0; 1392 max_dev = 0;
@@ -1897,6 +1881,7 @@ static void md_update_sb(mddev_t * mddev, int force_change)
1897 int sync_req; 1881 int sync_req;
1898 int nospares = 0; 1882 int nospares = 0;
1899 1883
1884 mddev->utime = get_seconds();
1900 if (mddev->external) 1885 if (mddev->external)
1901 return; 1886 return;
1902repeat: 1887repeat:
@@ -1926,7 +1911,6 @@ repeat:
1926 nospares = 0; 1911 nospares = 0;
1927 1912
1928 sync_req = mddev->in_sync; 1913 sync_req = mddev->in_sync;
1929 mddev->utime = get_seconds();
1930 1914
1931 /* If this is just a dirty<->clean transition, and the array is clean 1915 /* If this is just a dirty<->clean transition, and the array is clean
1932 * and 'events' is odd, we can roll back to the previous clean state */ 1916 * and 'events' is odd, we can roll back to the previous clean state */
@@ -2597,15 +2581,6 @@ static void analyze_sbs(mddev_t * mddev)
2597 clear_bit(In_sync, &rdev->flags); 2581 clear_bit(In_sync, &rdev->flags);
2598 } 2582 }
2599 } 2583 }
2600
2601
2602
2603 if (mddev->recovery_cp != MaxSector &&
2604 mddev->level >= 1)
2605 printk(KERN_ERR "md: %s: raid array is not clean"
2606 " -- starting background reconstruction\n",
2607 mdname(mddev));
2608
2609} 2584}
2610 2585
2611static void md_safemode_timeout(unsigned long data); 2586static void md_safemode_timeout(unsigned long data);
@@ -2746,7 +2721,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
2746 if (IS_ERR(priv)) { 2721 if (IS_ERR(priv)) {
2747 mddev->new_level = mddev->level; 2722 mddev->new_level = mddev->level;
2748 mddev->new_layout = mddev->layout; 2723 mddev->new_layout = mddev->layout;
2749 mddev->new_chunk = mddev->chunk_size; 2724 mddev->new_chunk_sectors = mddev->chunk_sectors;
2750 mddev->raid_disks -= mddev->delta_disks; 2725 mddev->raid_disks -= mddev->delta_disks;
2751 mddev->delta_disks = 0; 2726 mddev->delta_disks = 0;
2752 module_put(pers->owner); 2727 module_put(pers->owner);
@@ -2764,7 +2739,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
2764 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); 2739 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel));
2765 mddev->level = mddev->new_level; 2740 mddev->level = mddev->new_level;
2766 mddev->layout = mddev->new_layout; 2741 mddev->layout = mddev->new_layout;
2767 mddev->chunk_size = mddev->new_chunk; 2742 mddev->chunk_sectors = mddev->new_chunk_sectors;
2768 mddev->delta_disks = 0; 2743 mddev->delta_disks = 0;
2769 pers->run(mddev); 2744 pers->run(mddev);
2770 mddev_resume(mddev); 2745 mddev_resume(mddev);
@@ -2800,11 +2775,14 @@ layout_store(mddev_t *mddev, const char *buf, size_t len)
2800 2775
2801 if (mddev->pers) { 2776 if (mddev->pers) {
2802 int err; 2777 int err;
2803 if (mddev->pers->reconfig == NULL) 2778 if (mddev->pers->check_reshape == NULL)
2804 return -EBUSY; 2779 return -EBUSY;
2805 err = mddev->pers->reconfig(mddev, n, -1); 2780 mddev->new_layout = n;
2806 if (err) 2781 err = mddev->pers->check_reshape(mddev);
2782 if (err) {
2783 mddev->new_layout = mddev->layout;
2807 return err; 2784 return err;
2785 }
2808 } else { 2786 } else {
2809 mddev->new_layout = n; 2787 mddev->new_layout = n;
2810 if (mddev->reshape_position == MaxSector) 2788 if (mddev->reshape_position == MaxSector)
@@ -2857,10 +2835,11 @@ static ssize_t
2857chunk_size_show(mddev_t *mddev, char *page) 2835chunk_size_show(mddev_t *mddev, char *page)
2858{ 2836{
2859 if (mddev->reshape_position != MaxSector && 2837 if (mddev->reshape_position != MaxSector &&
2860 mddev->chunk_size != mddev->new_chunk) 2838 mddev->chunk_sectors != mddev->new_chunk_sectors)
2861 return sprintf(page, "%d (%d)\n", mddev->new_chunk, 2839 return sprintf(page, "%d (%d)\n",
2862 mddev->chunk_size); 2840 mddev->new_chunk_sectors << 9,
2863 return sprintf(page, "%d\n", mddev->chunk_size); 2841 mddev->chunk_sectors << 9);
2842 return sprintf(page, "%d\n", mddev->chunk_sectors << 9);
2864} 2843}
2865 2844
2866static ssize_t 2845static ssize_t
@@ -2874,15 +2853,18 @@ chunk_size_store(mddev_t *mddev, const char *buf, size_t len)
2874 2853
2875 if (mddev->pers) { 2854 if (mddev->pers) {
2876 int err; 2855 int err;
2877 if (mddev->pers->reconfig == NULL) 2856 if (mddev->pers->check_reshape == NULL)
2878 return -EBUSY; 2857 return -EBUSY;
2879 err = mddev->pers->reconfig(mddev, -1, n); 2858 mddev->new_chunk_sectors = n >> 9;
2880 if (err) 2859 err = mddev->pers->check_reshape(mddev);
2860 if (err) {
2861 mddev->new_chunk_sectors = mddev->chunk_sectors;
2881 return err; 2862 return err;
2863 }
2882 } else { 2864 } else {
2883 mddev->new_chunk = n; 2865 mddev->new_chunk_sectors = n >> 9;
2884 if (mddev->reshape_position == MaxSector) 2866 if (mddev->reshape_position == MaxSector)
2885 mddev->chunk_size = n; 2867 mddev->chunk_sectors = n >> 9;
2886 } 2868 }
2887 return len; 2869 return len;
2888} 2870}
@@ -3527,8 +3509,9 @@ min_sync_store(mddev_t *mddev, const char *buf, size_t len)
3527 return -EBUSY; 3509 return -EBUSY;
3528 3510
3529 /* Must be a multiple of chunk_size */ 3511 /* Must be a multiple of chunk_size */
3530 if (mddev->chunk_size) { 3512 if (mddev->chunk_sectors) {
3531 if (min & (sector_t)((mddev->chunk_size>>9)-1)) 3513 sector_t temp = min;
3514 if (sector_div(temp, mddev->chunk_sectors))
3532 return -EINVAL; 3515 return -EINVAL;
3533 } 3516 }
3534 mddev->resync_min = min; 3517 mddev->resync_min = min;
@@ -3564,8 +3547,9 @@ max_sync_store(mddev_t *mddev, const char *buf, size_t len)
3564 return -EBUSY; 3547 return -EBUSY;
3565 3548
3566 /* Must be a multiple of chunk_size */ 3549 /* Must be a multiple of chunk_size */
3567 if (mddev->chunk_size) { 3550 if (mddev->chunk_sectors) {
3568 if (max & (sector_t)((mddev->chunk_size>>9)-1)) 3551 sector_t temp = max;
3552 if (sector_div(temp, mddev->chunk_sectors))
3569 return -EINVAL; 3553 return -EINVAL;
3570 } 3554 }
3571 mddev->resync_max = max; 3555 mddev->resync_max = max;
@@ -3656,7 +3640,7 @@ reshape_position_store(mddev_t *mddev, const char *buf, size_t len)
3656 mddev->delta_disks = 0; 3640 mddev->delta_disks = 0;
3657 mddev->new_level = mddev->level; 3641 mddev->new_level = mddev->level;
3658 mddev->new_layout = mddev->layout; 3642 mddev->new_layout = mddev->layout;
3659 mddev->new_chunk = mddev->chunk_size; 3643 mddev->new_chunk_sectors = mddev->chunk_sectors;
3660 return len; 3644 return len;
3661} 3645}
3662 3646
@@ -3976,11 +3960,9 @@ static int start_dirty_degraded;
3976static int do_md_run(mddev_t * mddev) 3960static int do_md_run(mddev_t * mddev)
3977{ 3961{
3978 int err; 3962 int err;
3979 int chunk_size;
3980 mdk_rdev_t *rdev; 3963 mdk_rdev_t *rdev;
3981 struct gendisk *disk; 3964 struct gendisk *disk;
3982 struct mdk_personality *pers; 3965 struct mdk_personality *pers;
3983 char b[BDEVNAME_SIZE];
3984 3966
3985 if (list_empty(&mddev->disks)) 3967 if (list_empty(&mddev->disks))
3986 /* cannot run an array with no devices.. */ 3968 /* cannot run an array with no devices.. */
@@ -3998,38 +3980,6 @@ static int do_md_run(mddev_t * mddev)
3998 analyze_sbs(mddev); 3980 analyze_sbs(mddev);
3999 } 3981 }
4000 3982
4001 chunk_size = mddev->chunk_size;
4002
4003 if (chunk_size) {
4004 if (chunk_size > MAX_CHUNK_SIZE) {
4005 printk(KERN_ERR "too big chunk_size: %d > %d\n",
4006 chunk_size, MAX_CHUNK_SIZE);
4007 return -EINVAL;
4008 }
4009 /*
4010 * chunk-size has to be a power of 2
4011 */
4012 if ( (1 << ffz(~chunk_size)) != chunk_size) {
4013 printk(KERN_ERR "chunk_size of %d not valid\n", chunk_size);
4014 return -EINVAL;
4015 }
4016
4017 /* devices must have minimum size of one chunk */
4018 list_for_each_entry(rdev, &mddev->disks, same_set) {
4019 if (test_bit(Faulty, &rdev->flags))
4020 continue;
4021 if (rdev->sectors < chunk_size / 512) {
4022 printk(KERN_WARNING
4023 "md: Dev %s smaller than chunk_size:"
4024 " %llu < %d\n",
4025 bdevname(rdev->bdev,b),
4026 (unsigned long long)rdev->sectors,
4027 chunk_size / 512);
4028 return -EINVAL;
4029 }
4030 }
4031 }
4032
4033 if (mddev->level != LEVEL_NONE) 3983 if (mddev->level != LEVEL_NONE)
4034 request_module("md-level-%d", mddev->level); 3984 request_module("md-level-%d", mddev->level);
4035 else if (mddev->clevel[0]) 3985 else if (mddev->clevel[0])
@@ -4405,7 +4355,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
4405 mddev->flags = 0; 4355 mddev->flags = 0;
4406 mddev->ro = 0; 4356 mddev->ro = 0;
4407 mddev->metadata_type[0] = 0; 4357 mddev->metadata_type[0] = 0;
4408 mddev->chunk_size = 0; 4358 mddev->chunk_sectors = 0;
4409 mddev->ctime = mddev->utime = 0; 4359 mddev->ctime = mddev->utime = 0;
4410 mddev->layout = 0; 4360 mddev->layout = 0;
4411 mddev->max_disks = 0; 4361 mddev->max_disks = 0;
@@ -4413,7 +4363,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
4413 mddev->delta_disks = 0; 4363 mddev->delta_disks = 0;
4414 mddev->new_level = LEVEL_NONE; 4364 mddev->new_level = LEVEL_NONE;
4415 mddev->new_layout = 0; 4365 mddev->new_layout = 0;
4416 mddev->new_chunk = 0; 4366 mddev->new_chunk_sectors = 0;
4417 mddev->curr_resync = 0; 4367 mddev->curr_resync = 0;
4418 mddev->resync_mismatches = 0; 4368 mddev->resync_mismatches = 0;
4419 mddev->suspend_lo = mddev->suspend_hi = 0; 4369 mddev->suspend_lo = mddev->suspend_hi = 0;
@@ -4618,7 +4568,7 @@ static int get_array_info(mddev_t * mddev, void __user * arg)
4618 info.spare_disks = spare; 4568 info.spare_disks = spare;
4619 4569
4620 info.layout = mddev->layout; 4570 info.layout = mddev->layout;
4621 info.chunk_size = mddev->chunk_size; 4571 info.chunk_size = mddev->chunk_sectors << 9;
4622 4572
4623 if (copy_to_user(arg, &info, sizeof(info))) 4573 if (copy_to_user(arg, &info, sizeof(info)))
4624 return -EFAULT; 4574 return -EFAULT;
@@ -4843,7 +4793,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
4843 rdev->sb_start = rdev->bdev->bd_inode->i_size / 512; 4793 rdev->sb_start = rdev->bdev->bd_inode->i_size / 512;
4844 } else 4794 } else
4845 rdev->sb_start = calc_dev_sboffset(rdev->bdev); 4795 rdev->sb_start = calc_dev_sboffset(rdev->bdev);
4846 rdev->sectors = calc_num_sectors(rdev, mddev->chunk_size); 4796 rdev->sectors = rdev->sb_start;
4847 4797
4848 err = bind_rdev_to_array(rdev, mddev); 4798 err = bind_rdev_to_array(rdev, mddev);
4849 if (err) { 4799 if (err) {
@@ -4913,7 +4863,7 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev)
4913 else 4863 else
4914 rdev->sb_start = rdev->bdev->bd_inode->i_size / 512; 4864 rdev->sb_start = rdev->bdev->bd_inode->i_size / 512;
4915 4865
4916 rdev->sectors = calc_num_sectors(rdev, mddev->chunk_size); 4866 rdev->sectors = rdev->sb_start;
4917 4867
4918 if (test_bit(Faulty, &rdev->flags)) { 4868 if (test_bit(Faulty, &rdev->flags)) {
4919 printk(KERN_WARNING 4869 printk(KERN_WARNING
@@ -5062,7 +5012,7 @@ static int set_array_info(mddev_t * mddev, mdu_array_info_t *info)
5062 mddev->external = 0; 5012 mddev->external = 0;
5063 5013
5064 mddev->layout = info->layout; 5014 mddev->layout = info->layout;
5065 mddev->chunk_size = info->chunk_size; 5015 mddev->chunk_sectors = info->chunk_size >> 9;
5066 5016
5067 mddev->max_disks = MD_SB_DISKS; 5017 mddev->max_disks = MD_SB_DISKS;
5068 5018
@@ -5081,7 +5031,7 @@ static int set_array_info(mddev_t * mddev, mdu_array_info_t *info)
5081 get_random_bytes(mddev->uuid, 16); 5031 get_random_bytes(mddev->uuid, 16);
5082 5032
5083 mddev->new_level = mddev->level; 5033 mddev->new_level = mddev->level;
5084 mddev->new_chunk = mddev->chunk_size; 5034 mddev->new_chunk_sectors = mddev->chunk_sectors;
5085 mddev->new_layout = mddev->layout; 5035 mddev->new_layout = mddev->layout;
5086 mddev->delta_disks = 0; 5036 mddev->delta_disks = 0;
5087 5037
@@ -5191,7 +5141,7 @@ static int update_array_info(mddev_t *mddev, mdu_array_info_t *info)
5191 mddev->level != info->level || 5141 mddev->level != info->level ||
5192/* mddev->layout != info->layout || */ 5142/* mddev->layout != info->layout || */
5193 !mddev->persistent != info->not_persistent|| 5143 !mddev->persistent != info->not_persistent||
5194 mddev->chunk_size != info->chunk_size || 5144 mddev->chunk_sectors != info->chunk_size >> 9 ||
5195 /* ignore bottom 8 bits of state, and allow SB_BITMAP_PRESENT to change */ 5145 /* ignore bottom 8 bits of state, and allow SB_BITMAP_PRESENT to change */
5196 ((state^info->state) & 0xfffffe00) 5146 ((state^info->state) & 0xfffffe00)
5197 ) 5147 )
@@ -5215,10 +5165,15 @@ static int update_array_info(mddev_t *mddev, mdu_array_info_t *info)
5215 * we don't need to do anything at the md level, the 5165 * we don't need to do anything at the md level, the
5216 * personality will take care of it all. 5166 * personality will take care of it all.
5217 */ 5167 */
5218 if (mddev->pers->reconfig == NULL) 5168 if (mddev->pers->check_reshape == NULL)
5219 return -EINVAL; 5169 return -EINVAL;
5220 else 5170 else {
5221 return mddev->pers->reconfig(mddev, info->layout, -1); 5171 mddev->new_layout = info->layout;
5172 rv = mddev->pers->check_reshape(mddev);
5173 if (rv)
5174 mddev->new_layout = mddev->layout;
5175 return rv;
5176 }
5222 } 5177 }
5223 if (info->size >= 0 && mddev->dev_sectors / 2 != info->size) 5178 if (info->size >= 0 && mddev->dev_sectors / 2 != info->size)
5224 rv = update_size(mddev, (sector_t)info->size * 2); 5179 rv = update_size(mddev, (sector_t)info->size * 2);
@@ -6717,7 +6672,8 @@ void md_check_recovery(mddev_t *mddev)
6717 */ 6672 */
6718 6673
6719 if (mddev->reshape_position != MaxSector) { 6674 if (mddev->reshape_position != MaxSector) {
6720 if (mddev->pers->check_reshape(mddev) != 0) 6675 if (mddev->pers->check_reshape == NULL ||
6676 mddev->pers->check_reshape(mddev) != 0)
6721 /* Cannot proceed */ 6677 /* Cannot proceed */
6722 goto unlock; 6678 goto unlock;
6723 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); 6679 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery);
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 8227ab909d44..9430a110db93 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -30,13 +30,6 @@ typedef struct mddev_s mddev_t;
30typedef struct mdk_rdev_s mdk_rdev_t; 30typedef struct mdk_rdev_s mdk_rdev_t;
31 31
32/* 32/*
33 * options passed in raidrun:
34 */
35
36/* Currently this must fit in an 'int' */
37#define MAX_CHUNK_SIZE (1<<30)
38
39/*
40 * MD's 'extended' device 33 * MD's 'extended' device
41 */ 34 */
42struct mdk_rdev_s 35struct mdk_rdev_s
@@ -145,7 +138,7 @@ struct mddev_s
145 int external; /* metadata is 138 int external; /* metadata is
146 * managed externally */ 139 * managed externally */
147 char metadata_type[17]; /* externally set*/ 140 char metadata_type[17]; /* externally set*/
148 int chunk_size; 141 int chunk_sectors;
149 time_t ctime, utime; 142 time_t ctime, utime;
150 int level, layout; 143 int level, layout;
151 char clevel[16]; 144 char clevel[16];
@@ -166,7 +159,8 @@ struct mddev_s
166 * If reshape_position is MaxSector, then no reshape is happening (yet). 159 * If reshape_position is MaxSector, then no reshape is happening (yet).
167 */ 160 */
168 sector_t reshape_position; 161 sector_t reshape_position;
169 int delta_disks, new_level, new_layout, new_chunk; 162 int delta_disks, new_level, new_layout;
163 int new_chunk_sectors;
170 164
171 struct mdk_thread_s *thread; /* management thread */ 165 struct mdk_thread_s *thread; /* management thread */
172 struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ 166 struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */
@@ -325,7 +319,6 @@ struct mdk_personality
325 int (*check_reshape) (mddev_t *mddev); 319 int (*check_reshape) (mddev_t *mddev);
326 int (*start_reshape) (mddev_t *mddev); 320 int (*start_reshape) (mddev_t *mddev);
327 void (*finish_reshape) (mddev_t *mddev); 321 void (*finish_reshape) (mddev_t *mddev);
328 int (*reconfig) (mddev_t *mddev, int layout, int chunk_size);
329 /* quiesce moves between quiescence states 322 /* quiesce moves between quiescence states
330 * 0 - fully active 323 * 0 - fully active
331 * 1 - no new requests allowed 324 * 1 - no new requests allowed
@@ -437,5 +430,6 @@ extern void md_new_event(mddev_t *mddev);
437extern int md_allow_write(mddev_t *mddev); 430extern int md_allow_write(mddev_t *mddev);
438extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev); 431extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
439extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors); 432extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors);
433extern int md_check_no_bitmap(mddev_t *mddev);
440 434
441#endif /* _MD_MD_H */ 435#endif /* _MD_MD_H */
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 4ee31aa13c40..cbe368fa6598 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -58,7 +58,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
58{ 58{
59 unsigned long flags; 59 unsigned long flags;
60 mddev_t *mddev = mp_bh->mddev; 60 mddev_t *mddev = mp_bh->mddev;
61 multipath_conf_t *conf = mddev_to_conf(mddev); 61 multipath_conf_t *conf = mddev->private;
62 62
63 spin_lock_irqsave(&conf->device_lock, flags); 63 spin_lock_irqsave(&conf->device_lock, flags);
64 list_add(&mp_bh->retry_list, &conf->retry_list); 64 list_add(&mp_bh->retry_list, &conf->retry_list);
@@ -75,7 +75,7 @@ static void multipath_reschedule_retry (struct multipath_bh *mp_bh)
75static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err) 75static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err)
76{ 76{
77 struct bio *bio = mp_bh->master_bio; 77 struct bio *bio = mp_bh->master_bio;
78 multipath_conf_t *conf = mddev_to_conf(mp_bh->mddev); 78 multipath_conf_t *conf = mp_bh->mddev->private;
79 79
80 bio_endio(bio, err); 80 bio_endio(bio, err);
81 mempool_free(mp_bh, conf->pool); 81 mempool_free(mp_bh, conf->pool);
@@ -85,7 +85,7 @@ static void multipath_end_request(struct bio *bio, int error)
85{ 85{
86 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 86 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
87 struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private); 87 struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private);
88 multipath_conf_t *conf = mddev_to_conf(mp_bh->mddev); 88 multipath_conf_t *conf = mp_bh->mddev->private;
89 mdk_rdev_t *rdev = conf->multipaths[mp_bh->path].rdev; 89 mdk_rdev_t *rdev = conf->multipaths[mp_bh->path].rdev;
90 90
91 if (uptodate) 91 if (uptodate)
@@ -107,7 +107,7 @@ static void multipath_end_request(struct bio *bio, int error)
107 107
108static void unplug_slaves(mddev_t *mddev) 108static void unplug_slaves(mddev_t *mddev)
109{ 109{
110 multipath_conf_t *conf = mddev_to_conf(mddev); 110 multipath_conf_t *conf = mddev->private;
111 int i; 111 int i;
112 112
113 rcu_read_lock(); 113 rcu_read_lock();
@@ -138,7 +138,7 @@ static void multipath_unplug(struct request_queue *q)
138static int multipath_make_request (struct request_queue *q, struct bio * bio) 138static int multipath_make_request (struct request_queue *q, struct bio * bio)
139{ 139{
140 mddev_t *mddev = q->queuedata; 140 mddev_t *mddev = q->queuedata;
141 multipath_conf_t *conf = mddev_to_conf(mddev); 141 multipath_conf_t *conf = mddev->private;
142 struct multipath_bh * mp_bh; 142 struct multipath_bh * mp_bh;
143 struct multipath_info *multipath; 143 struct multipath_info *multipath;
144 const int rw = bio_data_dir(bio); 144 const int rw = bio_data_dir(bio);
@@ -180,7 +180,7 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio)
180 180
181static void multipath_status (struct seq_file *seq, mddev_t *mddev) 181static void multipath_status (struct seq_file *seq, mddev_t *mddev)
182{ 182{
183 multipath_conf_t *conf = mddev_to_conf(mddev); 183 multipath_conf_t *conf = mddev->private;
184 int i; 184 int i;
185 185
186 seq_printf (seq, " [%d/%d] [", conf->raid_disks, 186 seq_printf (seq, " [%d/%d] [", conf->raid_disks,
@@ -195,7 +195,7 @@ static void multipath_status (struct seq_file *seq, mddev_t *mddev)
195static int multipath_congested(void *data, int bits) 195static int multipath_congested(void *data, int bits)
196{ 196{
197 mddev_t *mddev = data; 197 mddev_t *mddev = data;
198 multipath_conf_t *conf = mddev_to_conf(mddev); 198 multipath_conf_t *conf = mddev->private;
199 int i, ret = 0; 199 int i, ret = 0;
200 200
201 rcu_read_lock(); 201 rcu_read_lock();
@@ -220,7 +220,7 @@ static int multipath_congested(void *data, int bits)
220 */ 220 */
221static void multipath_error (mddev_t *mddev, mdk_rdev_t *rdev) 221static void multipath_error (mddev_t *mddev, mdk_rdev_t *rdev)
222{ 222{
223 multipath_conf_t *conf = mddev_to_conf(mddev); 223 multipath_conf_t *conf = mddev->private;
224 224
225 if (conf->working_disks <= 1) { 225 if (conf->working_disks <= 1) {
226 /* 226 /*
@@ -367,7 +367,7 @@ static void multipathd (mddev_t *mddev)
367 struct multipath_bh *mp_bh; 367 struct multipath_bh *mp_bh;
368 struct bio *bio; 368 struct bio *bio;
369 unsigned long flags; 369 unsigned long flags;
370 multipath_conf_t *conf = mddev_to_conf(mddev); 370 multipath_conf_t *conf = mddev->private;
371 struct list_head *head = &conf->retry_list; 371 struct list_head *head = &conf->retry_list;
372 372
373 md_check_recovery(mddev); 373 md_check_recovery(mddev);
@@ -421,6 +421,9 @@ static int multipath_run (mddev_t *mddev)
421 struct multipath_info *disk; 421 struct multipath_info *disk;
422 mdk_rdev_t *rdev; 422 mdk_rdev_t *rdev;
423 423
424 if (md_check_no_bitmap(mddev))
425 return -EINVAL;
426
424 if (mddev->level != LEVEL_MULTIPATH) { 427 if (mddev->level != LEVEL_MULTIPATH) {
425 printk("multipath: %s: raid level not set to multipath IO (%d)\n", 428 printk("multipath: %s: raid level not set to multipath IO (%d)\n",
426 mdname(mddev), mddev->level); 429 mdname(mddev), mddev->level);
@@ -531,7 +534,7 @@ out:
531 534
532static int multipath_stop (mddev_t *mddev) 535static int multipath_stop (mddev_t *mddev)
533{ 536{
534 multipath_conf_t *conf = mddev_to_conf(mddev); 537 multipath_conf_t *conf = mddev->private;
535 538
536 md_unregister_thread(mddev->thread); 539 md_unregister_thread(mddev->thread);
537 mddev->thread = NULL; 540 mddev->thread = NULL;
diff --git a/drivers/md/multipath.h b/drivers/md/multipath.h
index 6fa70b400cda..d1c2a8d78395 100644
--- a/drivers/md/multipath.h
+++ b/drivers/md/multipath.h
@@ -19,12 +19,6 @@ struct multipath_private_data {
19typedef struct multipath_private_data multipath_conf_t; 19typedef struct multipath_private_data multipath_conf_t;
20 20
21/* 21/*
22 * this is the only point in the RAID code where we violate
23 * C type safety. mddev->private is an 'opaque' pointer.
24 */
25#define mddev_to_conf(mddev) ((multipath_conf_t *) mddev->private)
26
27/*
28 * this is our 'private' 'collective' MULTIPATH buffer head. 22 * this is our 'private' 'collective' MULTIPATH buffer head.
29 * it contains information about what kind of IO operations were started 23 * it contains information about what kind of IO operations were started
30 * for this MULTIPATH operation, and about their status: 24 * for this MULTIPATH operation, and about their status:
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 925507e7d673..ab4a489d8695 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -26,8 +26,8 @@
26static void raid0_unplug(struct request_queue *q) 26static void raid0_unplug(struct request_queue *q)
27{ 27{
28 mddev_t *mddev = q->queuedata; 28 mddev_t *mddev = q->queuedata;
29 raid0_conf_t *conf = mddev_to_conf(mddev); 29 raid0_conf_t *conf = mddev->private;
30 mdk_rdev_t **devlist = conf->strip_zone[0].dev; 30 mdk_rdev_t **devlist = conf->devlist;
31 int i; 31 int i;
32 32
33 for (i=0; i<mddev->raid_disks; i++) { 33 for (i=0; i<mddev->raid_disks; i++) {
@@ -40,8 +40,8 @@ static void raid0_unplug(struct request_queue *q)
40static int raid0_congested(void *data, int bits) 40static int raid0_congested(void *data, int bits)
41{ 41{
42 mddev_t *mddev = data; 42 mddev_t *mddev = data;
43 raid0_conf_t *conf = mddev_to_conf(mddev); 43 raid0_conf_t *conf = mddev->private;
44 mdk_rdev_t **devlist = conf->strip_zone[0].dev; 44 mdk_rdev_t **devlist = conf->devlist;
45 int i, ret = 0; 45 int i, ret = 0;
46 46
47 for (i = 0; i < mddev->raid_disks && !ret ; i++) { 47 for (i = 0; i < mddev->raid_disks && !ret ; i++) {
@@ -52,27 +52,60 @@ static int raid0_congested(void *data, int bits)
52 return ret; 52 return ret;
53} 53}
54 54
55/*
56 * inform the user of the raid configuration
57*/
58static void dump_zones(mddev_t *mddev)
59{
60 int j, k, h;
61 sector_t zone_size = 0;
62 sector_t zone_start = 0;
63 char b[BDEVNAME_SIZE];
64 raid0_conf_t *conf = mddev->private;
65 printk(KERN_INFO "******* %s configuration *********\n",
66 mdname(mddev));
67 h = 0;
68 for (j = 0; j < conf->nr_strip_zones; j++) {
69 printk(KERN_INFO "zone%d=[", j);
70 for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
71 printk("%s/",
72 bdevname(conf->devlist[j*mddev->raid_disks
73 + k]->bdev, b));
74 printk("]\n");
75
76 zone_size = conf->strip_zone[j].zone_end - zone_start;
77 printk(KERN_INFO " zone offset=%llukb "
78 "device offset=%llukb size=%llukb\n",
79 (unsigned long long)zone_start>>1,
80 (unsigned long long)conf->strip_zone[j].dev_start>>1,
81 (unsigned long long)zone_size>>1);
82 zone_start = conf->strip_zone[j].zone_end;
83 }
84 printk(KERN_INFO "**********************************\n\n");
85}
55 86
56static int create_strip_zones (mddev_t *mddev) 87static int create_strip_zones(mddev_t *mddev)
57{ 88{
58 int i, c, j; 89 int i, c, j, err;
59 sector_t current_start, curr_zone_start; 90 sector_t curr_zone_end, sectors;
60 sector_t min_spacing; 91 mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev, **dev;
61 raid0_conf_t *conf = mddev_to_conf(mddev);
62 mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev;
63 struct strip_zone *zone; 92 struct strip_zone *zone;
64 int cnt; 93 int cnt;
65 char b[BDEVNAME_SIZE]; 94 char b[BDEVNAME_SIZE];
66 95 raid0_conf_t *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
67 /* 96
68 * The number of 'same size groups' 97 if (!conf)
69 */ 98 return -ENOMEM;
70 conf->nr_strip_zones = 0;
71
72 list_for_each_entry(rdev1, &mddev->disks, same_set) { 99 list_for_each_entry(rdev1, &mddev->disks, same_set) {
73 printk(KERN_INFO "raid0: looking at %s\n", 100 printk(KERN_INFO "raid0: looking at %s\n",
74 bdevname(rdev1->bdev,b)); 101 bdevname(rdev1->bdev,b));
75 c = 0; 102 c = 0;
103
104 /* round size to chunk_size */
105 sectors = rdev1->sectors;
106 sector_div(sectors, mddev->chunk_sectors);
107 rdev1->sectors = sectors * mddev->chunk_sectors;
108
76 list_for_each_entry(rdev2, &mddev->disks, same_set) { 109 list_for_each_entry(rdev2, &mddev->disks, same_set) {
77 printk(KERN_INFO "raid0: comparing %s(%llu)", 110 printk(KERN_INFO "raid0: comparing %s(%llu)",
78 bdevname(rdev1->bdev,b), 111 bdevname(rdev1->bdev,b),
@@ -103,16 +136,16 @@ static int create_strip_zones (mddev_t *mddev)
103 } 136 }
104 } 137 }
105 printk(KERN_INFO "raid0: FINAL %d zones\n", conf->nr_strip_zones); 138 printk(KERN_INFO "raid0: FINAL %d zones\n", conf->nr_strip_zones);
106 139 err = -ENOMEM;
107 conf->strip_zone = kzalloc(sizeof(struct strip_zone)* 140 conf->strip_zone = kzalloc(sizeof(struct strip_zone)*
108 conf->nr_strip_zones, GFP_KERNEL); 141 conf->nr_strip_zones, GFP_KERNEL);
109 if (!conf->strip_zone) 142 if (!conf->strip_zone)
110 return 1; 143 goto abort;
111 conf->devlist = kzalloc(sizeof(mdk_rdev_t*)* 144 conf->devlist = kzalloc(sizeof(mdk_rdev_t*)*
112 conf->nr_strip_zones*mddev->raid_disks, 145 conf->nr_strip_zones*mddev->raid_disks,
113 GFP_KERNEL); 146 GFP_KERNEL);
114 if (!conf->devlist) 147 if (!conf->devlist)
115 return 1; 148 goto abort;
116 149
117 /* The first zone must contain all devices, so here we check that 150 /* The first zone must contain all devices, so here we check that
118 * there is a proper alignment of slots to devices and find them all 151 * there is a proper alignment of slots to devices and find them all
@@ -120,7 +153,8 @@ static int create_strip_zones (mddev_t *mddev)
120 zone = &conf->strip_zone[0]; 153 zone = &conf->strip_zone[0];
121 cnt = 0; 154 cnt = 0;
122 smallest = NULL; 155 smallest = NULL;
123 zone->dev = conf->devlist; 156 dev = conf->devlist;
157 err = -EINVAL;
124 list_for_each_entry(rdev1, &mddev->disks, same_set) { 158 list_for_each_entry(rdev1, &mddev->disks, same_set) {
125 int j = rdev1->raid_disk; 159 int j = rdev1->raid_disk;
126 160
@@ -129,12 +163,12 @@ static int create_strip_zones (mddev_t *mddev)
129 "aborting!\n", j); 163 "aborting!\n", j);
130 goto abort; 164 goto abort;
131 } 165 }
132 if (zone->dev[j]) { 166 if (dev[j]) {
133 printk(KERN_ERR "raid0: multiple devices for %d - " 167 printk(KERN_ERR "raid0: multiple devices for %d - "
134 "aborting!\n", j); 168 "aborting!\n", j);
135 goto abort; 169 goto abort;
136 } 170 }
137 zone->dev[j] = rdev1; 171 dev[j] = rdev1;
138 172
139 blk_queue_stack_limits(mddev->queue, 173 blk_queue_stack_limits(mddev->queue,
140 rdev1->bdev->bd_disk->queue); 174 rdev1->bdev->bd_disk->queue);
@@ -157,34 +191,32 @@ static int create_strip_zones (mddev_t *mddev)
157 goto abort; 191 goto abort;
158 } 192 }
159 zone->nb_dev = cnt; 193 zone->nb_dev = cnt;
160 zone->sectors = smallest->sectors * cnt; 194 zone->zone_end = smallest->sectors * cnt;
161 zone->zone_start = 0;
162 195
163 current_start = smallest->sectors; 196 curr_zone_end = zone->zone_end;
164 curr_zone_start = zone->sectors;
165 197
166 /* now do the other zones */ 198 /* now do the other zones */
167 for (i = 1; i < conf->nr_strip_zones; i++) 199 for (i = 1; i < conf->nr_strip_zones; i++)
168 { 200 {
169 zone = conf->strip_zone + i; 201 zone = conf->strip_zone + i;
170 zone->dev = conf->strip_zone[i-1].dev + mddev->raid_disks; 202 dev = conf->devlist + i * mddev->raid_disks;
171 203
172 printk(KERN_INFO "raid0: zone %d\n", i); 204 printk(KERN_INFO "raid0: zone %d\n", i);
173 zone->dev_start = current_start; 205 zone->dev_start = smallest->sectors;
174 smallest = NULL; 206 smallest = NULL;
175 c = 0; 207 c = 0;
176 208
177 for (j=0; j<cnt; j++) { 209 for (j=0; j<cnt; j++) {
178 char b[BDEVNAME_SIZE]; 210 char b[BDEVNAME_SIZE];
179 rdev = conf->strip_zone[0].dev[j]; 211 rdev = conf->devlist[j];
180 printk(KERN_INFO "raid0: checking %s ...", 212 printk(KERN_INFO "raid0: checking %s ...",
181 bdevname(rdev->bdev, b)); 213 bdevname(rdev->bdev, b));
182 if (rdev->sectors <= current_start) { 214 if (rdev->sectors <= zone->dev_start) {
183 printk(KERN_INFO " nope.\n"); 215 printk(KERN_INFO " nope.\n");
184 continue; 216 continue;
185 } 217 }
186 printk(KERN_INFO " contained as device %d\n", c); 218 printk(KERN_INFO " contained as device %d\n", c);
187 zone->dev[c] = rdev; 219 dev[c] = rdev;
188 c++; 220 c++;
189 if (!smallest || rdev->sectors < smallest->sectors) { 221 if (!smallest || rdev->sectors < smallest->sectors) {
190 smallest = rdev; 222 smallest = rdev;
@@ -194,47 +226,39 @@ static int create_strip_zones (mddev_t *mddev)
194 } 226 }
195 227
196 zone->nb_dev = c; 228 zone->nb_dev = c;
197 zone->sectors = (smallest->sectors - current_start) * c; 229 sectors = (smallest->sectors - zone->dev_start) * c;
198 printk(KERN_INFO "raid0: zone->nb_dev: %d, sectors: %llu\n", 230 printk(KERN_INFO "raid0: zone->nb_dev: %d, sectors: %llu\n",
199 zone->nb_dev, (unsigned long long)zone->sectors); 231 zone->nb_dev, (unsigned long long)sectors);
200 232
201 zone->zone_start = curr_zone_start; 233 curr_zone_end += sectors;
202 curr_zone_start += zone->sectors; 234 zone->zone_end = curr_zone_end;
203 235
204 current_start = smallest->sectors;
205 printk(KERN_INFO "raid0: current zone start: %llu\n", 236 printk(KERN_INFO "raid0: current zone start: %llu\n",
206 (unsigned long long)current_start); 237 (unsigned long long)smallest->sectors);
207 }
208
209 /* Now find appropriate hash spacing.
210 * We want a number which causes most hash entries to cover
211 * at most two strips, but the hash table must be at most
212 * 1 PAGE. We choose the smallest strip, or contiguous collection
213 * of strips, that has big enough size. We never consider the last
214 * strip though as it's size has no bearing on the efficacy of the hash
215 * table.
216 */
217 conf->spacing = curr_zone_start;
218 min_spacing = curr_zone_start;
219 sector_div(min_spacing, PAGE_SIZE/sizeof(struct strip_zone*));
220 for (i=0; i < conf->nr_strip_zones-1; i++) {
221 sector_t s = 0;
222 for (j = i; j < conf->nr_strip_zones - 1 &&
223 s < min_spacing; j++)
224 s += conf->strip_zone[j].sectors;
225 if (s >= min_spacing && s < conf->spacing)
226 conf->spacing = s;
227 } 238 }
228
229 mddev->queue->unplug_fn = raid0_unplug; 239 mddev->queue->unplug_fn = raid0_unplug;
230
231 mddev->queue->backing_dev_info.congested_fn = raid0_congested; 240 mddev->queue->backing_dev_info.congested_fn = raid0_congested;
232 mddev->queue->backing_dev_info.congested_data = mddev; 241 mddev->queue->backing_dev_info.congested_data = mddev;
233 242
243 /*
244 * now since we have the hard sector sizes, we can make sure
245 * chunk size is a multiple of that sector size
246 */
247 if ((mddev->chunk_sectors << 9) % queue_logical_block_size(mddev->queue)) {
248 printk(KERN_ERR "%s chunk_size of %d not valid\n",
249 mdname(mddev),
250 mddev->chunk_sectors << 9);
251 goto abort;
252 }
234 printk(KERN_INFO "raid0: done.\n"); 253 printk(KERN_INFO "raid0: done.\n");
254 mddev->private = conf;
235 return 0; 255 return 0;
236 abort: 256abort:
237 return 1; 257 kfree(conf->strip_zone);
258 kfree(conf->devlist);
259 kfree(conf);
260 mddev->private = NULL;
261 return err;
238} 262}
239 263
240/** 264/**
@@ -252,10 +276,15 @@ static int raid0_mergeable_bvec(struct request_queue *q,
252 mddev_t *mddev = q->queuedata; 276 mddev_t *mddev = q->queuedata;
253 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); 277 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev);
254 int max; 278 int max;
255 unsigned int chunk_sectors = mddev->chunk_size >> 9; 279 unsigned int chunk_sectors = mddev->chunk_sectors;
256 unsigned int bio_sectors = bvm->bi_size >> 9; 280 unsigned int bio_sectors = bvm->bi_size >> 9;
257 281
258 max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9; 282 if (is_power_of_2(chunk_sectors))
283 max = (chunk_sectors - ((sector & (chunk_sectors-1))
284 + bio_sectors)) << 9;
285 else
286 max = (chunk_sectors - (sector_div(sector, chunk_sectors)
287 + bio_sectors)) << 9;
259 if (max < 0) max = 0; /* bio_add cannot handle a negative return */ 288 if (max < 0) max = 0; /* bio_add cannot handle a negative return */
260 if (max <= biovec->bv_len && bio_sectors == 0) 289 if (max <= biovec->bv_len && bio_sectors == 0)
261 return biovec->bv_len; 290 return biovec->bv_len;
@@ -277,84 +306,28 @@ static sector_t raid0_size(mddev_t *mddev, sector_t sectors, int raid_disks)
277 return array_sectors; 306 return array_sectors;
278} 307}
279 308
280static int raid0_run (mddev_t *mddev) 309static int raid0_run(mddev_t *mddev)
281{ 310{
282 unsigned cur=0, i=0, nb_zone; 311 int ret;
283 s64 sectors;
284 raid0_conf_t *conf;
285 312
286 if (mddev->chunk_size == 0) { 313 if (mddev->chunk_sectors == 0) {
287 printk(KERN_ERR "md/raid0: non-zero chunk size required.\n"); 314 printk(KERN_ERR "md/raid0: chunk size must be set.\n");
288 return -EINVAL; 315 return -EINVAL;
289 } 316 }
290 printk(KERN_INFO "%s: setting max_sectors to %d, segment boundary to %d\n", 317 if (md_check_no_bitmap(mddev))
291 mdname(mddev), 318 return -EINVAL;
292 mddev->chunk_size >> 9, 319 blk_queue_max_sectors(mddev->queue, mddev->chunk_sectors);
293 (mddev->chunk_size>>1)-1);
294 blk_queue_max_sectors(mddev->queue, mddev->chunk_size >> 9);
295 blk_queue_segment_boundary(mddev->queue, (mddev->chunk_size>>1) - 1);
296 mddev->queue->queue_lock = &mddev->queue->__queue_lock; 320 mddev->queue->queue_lock = &mddev->queue->__queue_lock;
297 321
298 conf = kmalloc(sizeof (raid0_conf_t), GFP_KERNEL); 322 ret = create_strip_zones(mddev);
299 if (!conf) 323 if (ret < 0)
300 goto out; 324 return ret;
301 mddev->private = (void *)conf;
302
303 conf->strip_zone = NULL;
304 conf->devlist = NULL;
305 if (create_strip_zones (mddev))
306 goto out_free_conf;
307 325
308 /* calculate array device size */ 326 /* calculate array device size */
309 md_set_array_sectors(mddev, raid0_size(mddev, 0, 0)); 327 md_set_array_sectors(mddev, raid0_size(mddev, 0, 0));
310 328
311 printk(KERN_INFO "raid0 : md_size is %llu sectors.\n", 329 printk(KERN_INFO "raid0 : md_size is %llu sectors.\n",
312 (unsigned long long)mddev->array_sectors); 330 (unsigned long long)mddev->array_sectors);
313 printk(KERN_INFO "raid0 : conf->spacing is %llu sectors.\n",
314 (unsigned long long)conf->spacing);
315 {
316 sector_t s = raid0_size(mddev, 0, 0);
317 sector_t space = conf->spacing;
318 int round;
319 conf->sector_shift = 0;
320 if (sizeof(sector_t) > sizeof(u32)) {
321 /*shift down space and s so that sector_div will work */
322 while (space > (sector_t) (~(u32)0)) {
323 s >>= 1;
324 space >>= 1;
325 s += 1; /* force round-up */
326 conf->sector_shift++;
327 }
328 }
329 round = sector_div(s, (u32)space) ? 1 : 0;
330 nb_zone = s + round;
331 }
332 printk(KERN_INFO "raid0 : nb_zone is %d.\n", nb_zone);
333
334 printk(KERN_INFO "raid0 : Allocating %zu bytes for hash.\n",
335 nb_zone*sizeof(struct strip_zone*));
336 conf->hash_table = kmalloc (sizeof (struct strip_zone *)*nb_zone, GFP_KERNEL);
337 if (!conf->hash_table)
338 goto out_free_conf;
339 sectors = conf->strip_zone[cur].sectors;
340
341 conf->hash_table[0] = conf->strip_zone + cur;
342 for (i=1; i< nb_zone; i++) {
343 while (sectors <= conf->spacing) {
344 cur++;
345 sectors += conf->strip_zone[cur].sectors;
346 }
347 sectors -= conf->spacing;
348 conf->hash_table[i] = conf->strip_zone + cur;
349 }
350 if (conf->sector_shift) {
351 conf->spacing >>= conf->sector_shift;
352 /* round spacing up so when we divide by it, we
353 * err on the side of too-low, which is safest
354 */
355 conf->spacing++;
356 }
357
358 /* calculate the max read-ahead size. 331 /* calculate the max read-ahead size.
359 * For read-ahead of large files to be effective, we need to 332 * For read-ahead of large files to be effective, we need to
360 * readahead at least twice a whole stripe. i.e. number of devices 333 * readahead at least twice a whole stripe. i.e. number of devices
@@ -365,48 +338,107 @@ static int raid0_run (mddev_t *mddev)
365 * chunksize should be used in that case. 338 * chunksize should be used in that case.
366 */ 339 */
367 { 340 {
368 int stripe = mddev->raid_disks * mddev->chunk_size / PAGE_SIZE; 341 int stripe = mddev->raid_disks *
342 (mddev->chunk_sectors << 9) / PAGE_SIZE;
369 if (mddev->queue->backing_dev_info.ra_pages < 2* stripe) 343 if (mddev->queue->backing_dev_info.ra_pages < 2* stripe)
370 mddev->queue->backing_dev_info.ra_pages = 2* stripe; 344 mddev->queue->backing_dev_info.ra_pages = 2* stripe;
371 } 345 }
372 346
373
374 blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec); 347 blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec);
348 dump_zones(mddev);
375 return 0; 349 return 0;
350}
376 351
377out_free_conf: 352static int raid0_stop(mddev_t *mddev)
353{
354 raid0_conf_t *conf = mddev->private;
355
356 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
378 kfree(conf->strip_zone); 357 kfree(conf->strip_zone);
379 kfree(conf->devlist); 358 kfree(conf->devlist);
380 kfree(conf); 359 kfree(conf);
381 mddev->private = NULL; 360 mddev->private = NULL;
382out: 361 return 0;
383 return -ENOMEM;
384} 362}
385 363
386static int raid0_stop (mddev_t *mddev) 364/* Find the zone which holds a particular offset
365 * Update *sectorp to be an offset in that zone
366 */
367static struct strip_zone *find_zone(struct raid0_private_data *conf,
368 sector_t *sectorp)
387{ 369{
388 raid0_conf_t *conf = mddev_to_conf(mddev); 370 int i;
371 struct strip_zone *z = conf->strip_zone;
372 sector_t sector = *sectorp;
373
374 for (i = 0; i < conf->nr_strip_zones; i++)
375 if (sector < z[i].zone_end) {
376 if (i)
377 *sectorp = sector - z[i-1].zone_end;
378 return z + i;
379 }
380 BUG();
381}
389 382
390 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 383/*
391 kfree(conf->hash_table); 384 * remaps the bio to the target device. we separate two flows.
392 conf->hash_table = NULL; 385 * power 2 flow and a general flow for the sake of perfromance
393 kfree(conf->strip_zone); 386*/
394 conf->strip_zone = NULL; 387static mdk_rdev_t *map_sector(mddev_t *mddev, struct strip_zone *zone,
395 kfree(conf); 388 sector_t sector, sector_t *sector_offset)
396 mddev->private = NULL; 389{
390 unsigned int sect_in_chunk;
391 sector_t chunk;
392 raid0_conf_t *conf = mddev->private;
393 unsigned int chunk_sects = mddev->chunk_sectors;
394
395 if (is_power_of_2(chunk_sects)) {
396 int chunksect_bits = ffz(~chunk_sects);
397 /* find the sector offset inside the chunk */
398 sect_in_chunk = sector & (chunk_sects - 1);
399 sector >>= chunksect_bits;
400 /* chunk in zone */
401 chunk = *sector_offset;
402 /* quotient is the chunk in real device*/
403 sector_div(chunk, zone->nb_dev << chunksect_bits);
404 } else{
405 sect_in_chunk = sector_div(sector, chunk_sects);
406 chunk = *sector_offset;
407 sector_div(chunk, chunk_sects * zone->nb_dev);
408 }
409 /*
410 * position the bio over the real device
411 * real sector = chunk in device + starting of zone
412 * + the position in the chunk
413 */
414 *sector_offset = (chunk * chunk_sects) + sect_in_chunk;
415 return conf->devlist[(zone - conf->strip_zone)*mddev->raid_disks
416 + sector_div(sector, zone->nb_dev)];
417}
397 418
398 return 0; 419/*
420 * Is io distribute over 1 or more chunks ?
421*/
422static inline int is_io_in_chunk_boundary(mddev_t *mddev,
423 unsigned int chunk_sects, struct bio *bio)
424{
425 if (likely(is_power_of_2(chunk_sects))) {
426 return chunk_sects >= ((bio->bi_sector & (chunk_sects-1))
427 + (bio->bi_size >> 9));
428 } else{
429 sector_t sector = bio->bi_sector;
430 return chunk_sects >= (sector_div(sector, chunk_sects)
431 + (bio->bi_size >> 9));
432 }
399} 433}
400 434
401static int raid0_make_request (struct request_queue *q, struct bio *bio) 435static int raid0_make_request(struct request_queue *q, struct bio *bio)
402{ 436{
403 mddev_t *mddev = q->queuedata; 437 mddev_t *mddev = q->queuedata;
404 unsigned int sect_in_chunk, chunksect_bits, chunk_sects; 438 unsigned int chunk_sects;
405 raid0_conf_t *conf = mddev_to_conf(mddev); 439 sector_t sector_offset;
406 struct strip_zone *zone; 440 struct strip_zone *zone;
407 mdk_rdev_t *tmp_dev; 441 mdk_rdev_t *tmp_dev;
408 sector_t chunk;
409 sector_t sector, rsect;
410 const int rw = bio_data_dir(bio); 442 const int rw = bio_data_dir(bio);
411 int cpu; 443 int cpu;
412 444
@@ -421,11 +453,9 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
421 bio_sectors(bio)); 453 bio_sectors(bio));
422 part_stat_unlock(); 454 part_stat_unlock();
423 455
424 chunk_sects = mddev->chunk_size >> 9; 456 chunk_sects = mddev->chunk_sectors;
425 chunksect_bits = ffz(~chunk_sects); 457 if (unlikely(!is_io_in_chunk_boundary(mddev, chunk_sects, bio))) {
426 sector = bio->bi_sector; 458 sector_t sector = bio->bi_sector;
427
428 if (unlikely(chunk_sects < (bio->bi_sector & (chunk_sects - 1)) + (bio->bi_size >> 9))) {
429 struct bio_pair *bp; 459 struct bio_pair *bp;
430 /* Sanity check -- queue functions should prevent this happening */ 460 /* Sanity check -- queue functions should prevent this happening */
431 if (bio->bi_vcnt != 1 || 461 if (bio->bi_vcnt != 1 ||
@@ -434,7 +464,12 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
434 /* This is a one page bio that upper layers 464 /* This is a one page bio that upper layers
435 * refuse to split for us, so we need to split it. 465 * refuse to split for us, so we need to split it.
436 */ 466 */
437 bp = bio_split(bio, chunk_sects - (bio->bi_sector & (chunk_sects - 1))); 467 if (likely(is_power_of_2(chunk_sects)))
468 bp = bio_split(bio, chunk_sects - (sector &
469 (chunk_sects-1)));
470 else
471 bp = bio_split(bio, chunk_sects -
472 sector_div(sector, chunk_sects));
438 if (raid0_make_request(q, &bp->bio1)) 473 if (raid0_make_request(q, &bp->bio1))
439 generic_make_request(&bp->bio1); 474 generic_make_request(&bp->bio1);
440 if (raid0_make_request(q, &bp->bio2)) 475 if (raid0_make_request(q, &bp->bio2))
@@ -443,34 +478,14 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
443 bio_pair_release(bp); 478 bio_pair_release(bp);
444 return 0; 479 return 0;
445 } 480 }
446
447
448 {
449 sector_t x = sector >> conf->sector_shift;
450 sector_div(x, (u32)conf->spacing);
451 zone = conf->hash_table[x];
452 }
453 481
454 while (sector >= zone->zone_start + zone->sectors) 482 sector_offset = bio->bi_sector;
455 zone++; 483 zone = find_zone(mddev->private, &sector_offset);
456 484 tmp_dev = map_sector(mddev, zone, bio->bi_sector,
457 sect_in_chunk = bio->bi_sector & (chunk_sects - 1); 485 &sector_offset);
458
459
460 {
461 sector_t x = (sector - zone->zone_start) >> chunksect_bits;
462
463 sector_div(x, zone->nb_dev);
464 chunk = x;
465
466 x = sector >> chunksect_bits;
467 tmp_dev = zone->dev[sector_div(x, zone->nb_dev)];
468 }
469 rsect = (chunk << chunksect_bits) + zone->dev_start + sect_in_chunk;
470
471 bio->bi_bdev = tmp_dev->bdev; 486 bio->bi_bdev = tmp_dev->bdev;
472 bio->bi_sector = rsect + tmp_dev->data_offset; 487 bio->bi_sector = sector_offset + zone->dev_start +
473 488 tmp_dev->data_offset;
474 /* 489 /*
475 * Let the main block layer submit the IO and resolve recursion: 490 * Let the main block layer submit the IO and resolve recursion:
476 */ 491 */
@@ -485,31 +500,35 @@ bad_map:
485 return 0; 500 return 0;
486} 501}
487 502
488static void raid0_status (struct seq_file *seq, mddev_t *mddev) 503static void raid0_status(struct seq_file *seq, mddev_t *mddev)
489{ 504{
490#undef MD_DEBUG 505#undef MD_DEBUG
491#ifdef MD_DEBUG 506#ifdef MD_DEBUG
492 int j, k, h; 507 int j, k, h;
493 char b[BDEVNAME_SIZE]; 508 char b[BDEVNAME_SIZE];
494 raid0_conf_t *conf = mddev_to_conf(mddev); 509 raid0_conf_t *conf = mddev->private;
495 510
511 sector_t zone_size;
512 sector_t zone_start = 0;
496 h = 0; 513 h = 0;
514
497 for (j = 0; j < conf->nr_strip_zones; j++) { 515 for (j = 0; j < conf->nr_strip_zones; j++) {
498 seq_printf(seq, " z%d", j); 516 seq_printf(seq, " z%d", j);
499 if (conf->hash_table[h] == conf->strip_zone+j)
500 seq_printf(seq, "(h%d)", h++);
501 seq_printf(seq, "=["); 517 seq_printf(seq, "=[");
502 for (k = 0; k < conf->strip_zone[j].nb_dev; k++) 518 for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
503 seq_printf(seq, "%s/", bdevname( 519 seq_printf(seq, "%s/", bdevname(
504 conf->strip_zone[j].dev[k]->bdev,b)); 520 conf->devlist[j*mddev->raid_disks + k]
505 521 ->bdev, b));
506 seq_printf(seq, "] zs=%d ds=%d s=%d\n", 522
507 conf->strip_zone[j].zone_start, 523 zone_size = conf->strip_zone[j].zone_end - zone_start;
508 conf->strip_zone[j].dev_start, 524 seq_printf(seq, "] ze=%lld ds=%lld s=%lld\n",
509 conf->strip_zone[j].sectors); 525 (unsigned long long)zone_start>>1,
526 (unsigned long long)conf->strip_zone[j].dev_start>>1,
527 (unsigned long long)zone_size>>1);
528 zone_start = conf->strip_zone[j].zone_end;
510 } 529 }
511#endif 530#endif
512 seq_printf(seq, " %dk chunks", mddev->chunk_size/1024); 531 seq_printf(seq, " %dk chunks", mddev->chunk_sectors / 2);
513 return; 532 return;
514} 533}
515 534
diff --git a/drivers/md/raid0.h b/drivers/md/raid0.h
index 824b12eb1d4f..91f8e876ee64 100644
--- a/drivers/md/raid0.h
+++ b/drivers/md/raid0.h
@@ -3,26 +3,18 @@
3 3
4struct strip_zone 4struct strip_zone
5{ 5{
6 sector_t zone_start; /* Zone offset in md_dev (in sectors) */ 6 sector_t zone_end; /* Start of the next zone (in sectors) */
7 sector_t dev_start; /* Zone offset in real dev (in sectors) */ 7 sector_t dev_start; /* Zone offset in real dev (in sectors) */
8 sector_t sectors; /* Zone size in sectors */
9 int nb_dev; /* # of devices attached to the zone */ 8 int nb_dev; /* # of devices attached to the zone */
10 mdk_rdev_t **dev; /* Devices attached to the zone */
11}; 9};
12 10
13struct raid0_private_data 11struct raid0_private_data
14{ 12{
15 struct strip_zone **hash_table; /* Table of indexes into strip_zone */
16 struct strip_zone *strip_zone; 13 struct strip_zone *strip_zone;
17 mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */ 14 mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */
18 int nr_strip_zones; 15 int nr_strip_zones;
19
20 sector_t spacing;
21 int sector_shift; /* shift this before divide by spacing */
22}; 16};
23 17
24typedef struct raid0_private_data raid0_conf_t; 18typedef struct raid0_private_data raid0_conf_t;
25 19
26#define mddev_to_conf(mddev) ((raid0_conf_t *) mddev->private)
27
28#endif 20#endif
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index e23758b4a34e..89939a7aef57 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -182,7 +182,7 @@ static void put_all_bios(conf_t *conf, r1bio_t *r1_bio)
182 182
183static void free_r1bio(r1bio_t *r1_bio) 183static void free_r1bio(r1bio_t *r1_bio)
184{ 184{
185 conf_t *conf = mddev_to_conf(r1_bio->mddev); 185 conf_t *conf = r1_bio->mddev->private;
186 186
187 /* 187 /*
188 * Wake up any possible resync thread that waits for the device 188 * Wake up any possible resync thread that waits for the device
@@ -196,7 +196,7 @@ static void free_r1bio(r1bio_t *r1_bio)
196 196
197static void put_buf(r1bio_t *r1_bio) 197static void put_buf(r1bio_t *r1_bio)
198{ 198{
199 conf_t *conf = mddev_to_conf(r1_bio->mddev); 199 conf_t *conf = r1_bio->mddev->private;
200 int i; 200 int i;
201 201
202 for (i=0; i<conf->raid_disks; i++) { 202 for (i=0; i<conf->raid_disks; i++) {
@@ -214,7 +214,7 @@ static void reschedule_retry(r1bio_t *r1_bio)
214{ 214{
215 unsigned long flags; 215 unsigned long flags;
216 mddev_t *mddev = r1_bio->mddev; 216 mddev_t *mddev = r1_bio->mddev;
217 conf_t *conf = mddev_to_conf(mddev); 217 conf_t *conf = mddev->private;
218 218
219 spin_lock_irqsave(&conf->device_lock, flags); 219 spin_lock_irqsave(&conf->device_lock, flags);
220 list_add(&r1_bio->retry_list, &conf->retry_list); 220 list_add(&r1_bio->retry_list, &conf->retry_list);
@@ -253,7 +253,7 @@ static void raid_end_bio_io(r1bio_t *r1_bio)
253 */ 253 */
254static inline void update_head_pos(int disk, r1bio_t *r1_bio) 254static inline void update_head_pos(int disk, r1bio_t *r1_bio)
255{ 255{
256 conf_t *conf = mddev_to_conf(r1_bio->mddev); 256 conf_t *conf = r1_bio->mddev->private;
257 257
258 conf->mirrors[disk].head_position = 258 conf->mirrors[disk].head_position =
259 r1_bio->sector + (r1_bio->sectors); 259 r1_bio->sector + (r1_bio->sectors);
@@ -264,7 +264,7 @@ static void raid1_end_read_request(struct bio *bio, int error)
264 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 264 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
265 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); 265 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private);
266 int mirror; 266 int mirror;
267 conf_t *conf = mddev_to_conf(r1_bio->mddev); 267 conf_t *conf = r1_bio->mddev->private;
268 268
269 mirror = r1_bio->read_disk; 269 mirror = r1_bio->read_disk;
270 /* 270 /*
@@ -309,7 +309,7 @@ static void raid1_end_write_request(struct bio *bio, int error)
309 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 309 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
310 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); 310 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private);
311 int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state); 311 int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state);
312 conf_t *conf = mddev_to_conf(r1_bio->mddev); 312 conf_t *conf = r1_bio->mddev->private;
313 struct bio *to_put = NULL; 313 struct bio *to_put = NULL;
314 314
315 315
@@ -541,7 +541,7 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio)
541 541
542static void unplug_slaves(mddev_t *mddev) 542static void unplug_slaves(mddev_t *mddev)
543{ 543{
544 conf_t *conf = mddev_to_conf(mddev); 544 conf_t *conf = mddev->private;
545 int i; 545 int i;
546 546
547 rcu_read_lock(); 547 rcu_read_lock();
@@ -573,7 +573,7 @@ static void raid1_unplug(struct request_queue *q)
573static int raid1_congested(void *data, int bits) 573static int raid1_congested(void *data, int bits)
574{ 574{
575 mddev_t *mddev = data; 575 mddev_t *mddev = data;
576 conf_t *conf = mddev_to_conf(mddev); 576 conf_t *conf = mddev->private;
577 int i, ret = 0; 577 int i, ret = 0;
578 578
579 rcu_read_lock(); 579 rcu_read_lock();
@@ -772,7 +772,7 @@ do_sync_io:
772static int make_request(struct request_queue *q, struct bio * bio) 772static int make_request(struct request_queue *q, struct bio * bio)
773{ 773{
774 mddev_t *mddev = q->queuedata; 774 mddev_t *mddev = q->queuedata;
775 conf_t *conf = mddev_to_conf(mddev); 775 conf_t *conf = mddev->private;
776 mirror_info_t *mirror; 776 mirror_info_t *mirror;
777 r1bio_t *r1_bio; 777 r1bio_t *r1_bio;
778 struct bio *read_bio; 778 struct bio *read_bio;
@@ -991,7 +991,7 @@ static int make_request(struct request_queue *q, struct bio * bio)
991 991
992static void status(struct seq_file *seq, mddev_t *mddev) 992static void status(struct seq_file *seq, mddev_t *mddev)
993{ 993{
994 conf_t *conf = mddev_to_conf(mddev); 994 conf_t *conf = mddev->private;
995 int i; 995 int i;
996 996
997 seq_printf(seq, " [%d/%d] [", conf->raid_disks, 997 seq_printf(seq, " [%d/%d] [", conf->raid_disks,
@@ -1010,7 +1010,7 @@ static void status(struct seq_file *seq, mddev_t *mddev)
1010static void error(mddev_t *mddev, mdk_rdev_t *rdev) 1010static void error(mddev_t *mddev, mdk_rdev_t *rdev)
1011{ 1011{
1012 char b[BDEVNAME_SIZE]; 1012 char b[BDEVNAME_SIZE];
1013 conf_t *conf = mddev_to_conf(mddev); 1013 conf_t *conf = mddev->private;
1014 1014
1015 /* 1015 /*
1016 * If it is not operational, then we have already marked it as dead 1016 * If it is not operational, then we have already marked it as dead
@@ -1214,7 +1214,7 @@ static void end_sync_write(struct bio *bio, int error)
1214 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 1214 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
1215 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); 1215 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private);
1216 mddev_t *mddev = r1_bio->mddev; 1216 mddev_t *mddev = r1_bio->mddev;
1217 conf_t *conf = mddev_to_conf(mddev); 1217 conf_t *conf = mddev->private;
1218 int i; 1218 int i;
1219 int mirror=0; 1219 int mirror=0;
1220 1220
@@ -1248,7 +1248,7 @@ static void end_sync_write(struct bio *bio, int error)
1248 1248
1249static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) 1249static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
1250{ 1250{
1251 conf_t *conf = mddev_to_conf(mddev); 1251 conf_t *conf = mddev->private;
1252 int i; 1252 int i;
1253 int disks = conf->raid_disks; 1253 int disks = conf->raid_disks;
1254 struct bio *bio, *wbio; 1254 struct bio *bio, *wbio;
@@ -1562,7 +1562,7 @@ static void raid1d(mddev_t *mddev)
1562 r1bio_t *r1_bio; 1562 r1bio_t *r1_bio;
1563 struct bio *bio; 1563 struct bio *bio;
1564 unsigned long flags; 1564 unsigned long flags;
1565 conf_t *conf = mddev_to_conf(mddev); 1565 conf_t *conf = mddev->private;
1566 struct list_head *head = &conf->retry_list; 1566 struct list_head *head = &conf->retry_list;
1567 int unplug=0; 1567 int unplug=0;
1568 mdk_rdev_t *rdev; 1568 mdk_rdev_t *rdev;
@@ -1585,7 +1585,7 @@ static void raid1d(mddev_t *mddev)
1585 spin_unlock_irqrestore(&conf->device_lock, flags); 1585 spin_unlock_irqrestore(&conf->device_lock, flags);
1586 1586
1587 mddev = r1_bio->mddev; 1587 mddev = r1_bio->mddev;
1588 conf = mddev_to_conf(mddev); 1588 conf = mddev->private;
1589 if (test_bit(R1BIO_IsSync, &r1_bio->state)) { 1589 if (test_bit(R1BIO_IsSync, &r1_bio->state)) {
1590 sync_request_write(mddev, r1_bio); 1590 sync_request_write(mddev, r1_bio);
1591 unplug = 1; 1591 unplug = 1;
@@ -1706,7 +1706,7 @@ static int init_resync(conf_t *conf)
1706 1706
1707static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) 1707static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster)
1708{ 1708{
1709 conf_t *conf = mddev_to_conf(mddev); 1709 conf_t *conf = mddev->private;
1710 r1bio_t *r1_bio; 1710 r1bio_t *r1_bio;
1711 struct bio *bio; 1711 struct bio *bio;
1712 sector_t max_sector, nr_sectors; 1712 sector_t max_sector, nr_sectors;
@@ -2052,6 +2052,10 @@ static int run(mddev_t *mddev)
2052 goto out_free_conf; 2052 goto out_free_conf;
2053 } 2053 }
2054 2054
2055 if (mddev->recovery_cp != MaxSector)
2056 printk(KERN_NOTICE "raid1: %s is not clean"
2057 " -- starting background reconstruction\n",
2058 mdname(mddev));
2055 printk(KERN_INFO 2059 printk(KERN_INFO
2056 "raid1: raid set %s active with %d out of %d mirrors\n", 2060 "raid1: raid set %s active with %d out of %d mirrors\n",
2057 mdname(mddev), mddev->raid_disks - mddev->degraded, 2061 mdname(mddev), mddev->raid_disks - mddev->degraded,
@@ -2087,7 +2091,7 @@ out:
2087 2091
2088static int stop(mddev_t *mddev) 2092static int stop(mddev_t *mddev)
2089{ 2093{
2090 conf_t *conf = mddev_to_conf(mddev); 2094 conf_t *conf = mddev->private;
2091 struct bitmap *bitmap = mddev->bitmap; 2095 struct bitmap *bitmap = mddev->bitmap;
2092 int behind_wait = 0; 2096 int behind_wait = 0;
2093 2097
@@ -2155,16 +2159,16 @@ static int raid1_reshape(mddev_t *mddev)
2155 mempool_t *newpool, *oldpool; 2159 mempool_t *newpool, *oldpool;
2156 struct pool_info *newpoolinfo; 2160 struct pool_info *newpoolinfo;
2157 mirror_info_t *newmirrors; 2161 mirror_info_t *newmirrors;
2158 conf_t *conf = mddev_to_conf(mddev); 2162 conf_t *conf = mddev->private;
2159 int cnt, raid_disks; 2163 int cnt, raid_disks;
2160 unsigned long flags; 2164 unsigned long flags;
2161 int d, d2, err; 2165 int d, d2, err;
2162 2166
2163 /* Cannot change chunk_size, layout, or level */ 2167 /* Cannot change chunk_size, layout, or level */
2164 if (mddev->chunk_size != mddev->new_chunk || 2168 if (mddev->chunk_sectors != mddev->new_chunk_sectors ||
2165 mddev->layout != mddev->new_layout || 2169 mddev->layout != mddev->new_layout ||
2166 mddev->level != mddev->new_level) { 2170 mddev->level != mddev->new_level) {
2167 mddev->new_chunk = mddev->chunk_size; 2171 mddev->new_chunk_sectors = mddev->chunk_sectors;
2168 mddev->new_layout = mddev->layout; 2172 mddev->new_layout = mddev->layout;
2169 mddev->new_level = mddev->level; 2173 mddev->new_level = mddev->level;
2170 return -EINVAL; 2174 return -EINVAL;
@@ -2252,7 +2256,7 @@ static int raid1_reshape(mddev_t *mddev)
2252 2256
2253static void raid1_quiesce(mddev_t *mddev, int state) 2257static void raid1_quiesce(mddev_t *mddev, int state)
2254{ 2258{
2255 conf_t *conf = mddev_to_conf(mddev); 2259 conf_t *conf = mddev->private;
2256 2260
2257 switch(state) { 2261 switch(state) {
2258 case 1: 2262 case 1:
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h
index 1620eea3d57c..e87b84deff68 100644
--- a/drivers/md/raid1.h
+++ b/drivers/md/raid1.h
@@ -64,12 +64,6 @@ struct r1_private_data_s {
64typedef struct r1_private_data_s conf_t; 64typedef struct r1_private_data_s conf_t;
65 65
66/* 66/*
67 * this is the only point in the RAID code where we violate
68 * C type safety. mddev->private is an 'opaque' pointer.
69 */
70#define mddev_to_conf(mddev) ((conf_t *) mddev->private)
71
72/*
73 * this is our 'private' RAID1 bio. 67 * this is our 'private' RAID1 bio.
74 * 68 *
75 * it contains information about what kind of IO operations were started 69 * it contains information about what kind of IO operations were started
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 750550c1166f..ae12ceafe10c 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -188,7 +188,7 @@ static void put_all_bios(conf_t *conf, r10bio_t *r10_bio)
188 188
189static void free_r10bio(r10bio_t *r10_bio) 189static void free_r10bio(r10bio_t *r10_bio)
190{ 190{
191 conf_t *conf = mddev_to_conf(r10_bio->mddev); 191 conf_t *conf = r10_bio->mddev->private;
192 192
193 /* 193 /*
194 * Wake up any possible resync thread that waits for the device 194 * Wake up any possible resync thread that waits for the device
@@ -202,7 +202,7 @@ static void free_r10bio(r10bio_t *r10_bio)
202 202
203static void put_buf(r10bio_t *r10_bio) 203static void put_buf(r10bio_t *r10_bio)
204{ 204{
205 conf_t *conf = mddev_to_conf(r10_bio->mddev); 205 conf_t *conf = r10_bio->mddev->private;
206 206
207 mempool_free(r10_bio, conf->r10buf_pool); 207 mempool_free(r10_bio, conf->r10buf_pool);
208 208
@@ -213,7 +213,7 @@ static void reschedule_retry(r10bio_t *r10_bio)
213{ 213{
214 unsigned long flags; 214 unsigned long flags;
215 mddev_t *mddev = r10_bio->mddev; 215 mddev_t *mddev = r10_bio->mddev;
216 conf_t *conf = mddev_to_conf(mddev); 216 conf_t *conf = mddev->private;
217 217
218 spin_lock_irqsave(&conf->device_lock, flags); 218 spin_lock_irqsave(&conf->device_lock, flags);
219 list_add(&r10_bio->retry_list, &conf->retry_list); 219 list_add(&r10_bio->retry_list, &conf->retry_list);
@@ -245,7 +245,7 @@ static void raid_end_bio_io(r10bio_t *r10_bio)
245 */ 245 */
246static inline void update_head_pos(int slot, r10bio_t *r10_bio) 246static inline void update_head_pos(int slot, r10bio_t *r10_bio)
247{ 247{
248 conf_t *conf = mddev_to_conf(r10_bio->mddev); 248 conf_t *conf = r10_bio->mddev->private;
249 249
250 conf->mirrors[r10_bio->devs[slot].devnum].head_position = 250 conf->mirrors[r10_bio->devs[slot].devnum].head_position =
251 r10_bio->devs[slot].addr + (r10_bio->sectors); 251 r10_bio->devs[slot].addr + (r10_bio->sectors);
@@ -256,7 +256,7 @@ static void raid10_end_read_request(struct bio *bio, int error)
256 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 256 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
257 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); 257 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private);
258 int slot, dev; 258 int slot, dev;
259 conf_t *conf = mddev_to_conf(r10_bio->mddev); 259 conf_t *conf = r10_bio->mddev->private;
260 260
261 261
262 slot = r10_bio->read_slot; 262 slot = r10_bio->read_slot;
@@ -297,7 +297,7 @@ static void raid10_end_write_request(struct bio *bio, int error)
297 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 297 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
298 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); 298 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private);
299 int slot, dev; 299 int slot, dev;
300 conf_t *conf = mddev_to_conf(r10_bio->mddev); 300 conf_t *conf = r10_bio->mddev->private;
301 301
302 for (slot = 0; slot < conf->copies; slot++) 302 for (slot = 0; slot < conf->copies; slot++)
303 if (r10_bio->devs[slot].bio == bio) 303 if (r10_bio->devs[slot].bio == bio)
@@ -461,7 +461,7 @@ static int raid10_mergeable_bvec(struct request_queue *q,
461 mddev_t *mddev = q->queuedata; 461 mddev_t *mddev = q->queuedata;
462 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); 462 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev);
463 int max; 463 int max;
464 unsigned int chunk_sectors = mddev->chunk_size >> 9; 464 unsigned int chunk_sectors = mddev->chunk_sectors;
465 unsigned int bio_sectors = bvm->bi_size >> 9; 465 unsigned int bio_sectors = bvm->bi_size >> 9;
466 466
467 max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9; 467 max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9;
@@ -596,7 +596,7 @@ rb_out:
596 596
597static void unplug_slaves(mddev_t *mddev) 597static void unplug_slaves(mddev_t *mddev)
598{ 598{
599 conf_t *conf = mddev_to_conf(mddev); 599 conf_t *conf = mddev->private;
600 int i; 600 int i;
601 601
602 rcu_read_lock(); 602 rcu_read_lock();
@@ -628,7 +628,7 @@ static void raid10_unplug(struct request_queue *q)
628static int raid10_congested(void *data, int bits) 628static int raid10_congested(void *data, int bits)
629{ 629{
630 mddev_t *mddev = data; 630 mddev_t *mddev = data;
631 conf_t *conf = mddev_to_conf(mddev); 631 conf_t *conf = mddev->private;
632 int i, ret = 0; 632 int i, ret = 0;
633 633
634 rcu_read_lock(); 634 rcu_read_lock();
@@ -788,7 +788,7 @@ static void unfreeze_array(conf_t *conf)
788static int make_request(struct request_queue *q, struct bio * bio) 788static int make_request(struct request_queue *q, struct bio * bio)
789{ 789{
790 mddev_t *mddev = q->queuedata; 790 mddev_t *mddev = q->queuedata;
791 conf_t *conf = mddev_to_conf(mddev); 791 conf_t *conf = mddev->private;
792 mirror_info_t *mirror; 792 mirror_info_t *mirror;
793 r10bio_t *r10_bio; 793 r10bio_t *r10_bio;
794 struct bio *read_bio; 794 struct bio *read_bio;
@@ -981,11 +981,11 @@ static int make_request(struct request_queue *q, struct bio * bio)
981 981
982static void status(struct seq_file *seq, mddev_t *mddev) 982static void status(struct seq_file *seq, mddev_t *mddev)
983{ 983{
984 conf_t *conf = mddev_to_conf(mddev); 984 conf_t *conf = mddev->private;
985 int i; 985 int i;
986 986
987 if (conf->near_copies < conf->raid_disks) 987 if (conf->near_copies < conf->raid_disks)
988 seq_printf(seq, " %dK chunks", mddev->chunk_size/1024); 988 seq_printf(seq, " %dK chunks", mddev->chunk_sectors / 2);
989 if (conf->near_copies > 1) 989 if (conf->near_copies > 1)
990 seq_printf(seq, " %d near-copies", conf->near_copies); 990 seq_printf(seq, " %d near-copies", conf->near_copies);
991 if (conf->far_copies > 1) { 991 if (conf->far_copies > 1) {
@@ -1006,7 +1006,7 @@ static void status(struct seq_file *seq, mddev_t *mddev)
1006static void error(mddev_t *mddev, mdk_rdev_t *rdev) 1006static void error(mddev_t *mddev, mdk_rdev_t *rdev)
1007{ 1007{
1008 char b[BDEVNAME_SIZE]; 1008 char b[BDEVNAME_SIZE];
1009 conf_t *conf = mddev_to_conf(mddev); 1009 conf_t *conf = mddev->private;
1010 1010
1011 /* 1011 /*
1012 * If it is not operational, then we have already marked it as dead 1012 * If it is not operational, then we have already marked it as dead
@@ -1215,7 +1215,7 @@ abort:
1215static void end_sync_read(struct bio *bio, int error) 1215static void end_sync_read(struct bio *bio, int error)
1216{ 1216{
1217 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); 1217 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private);
1218 conf_t *conf = mddev_to_conf(r10_bio->mddev); 1218 conf_t *conf = r10_bio->mddev->private;
1219 int i,d; 1219 int i,d;
1220 1220
1221 for (i=0; i<conf->copies; i++) 1221 for (i=0; i<conf->copies; i++)
@@ -1253,7 +1253,7 @@ static void end_sync_write(struct bio *bio, int error)
1253 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 1253 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
1254 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); 1254 r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private);
1255 mddev_t *mddev = r10_bio->mddev; 1255 mddev_t *mddev = r10_bio->mddev;
1256 conf_t *conf = mddev_to_conf(mddev); 1256 conf_t *conf = mddev->private;
1257 int i,d; 1257 int i,d;
1258 1258
1259 for (i = 0; i < conf->copies; i++) 1259 for (i = 0; i < conf->copies; i++)
@@ -1300,7 +1300,7 @@ static void end_sync_write(struct bio *bio, int error)
1300 */ 1300 */
1301static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio) 1301static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio)
1302{ 1302{
1303 conf_t *conf = mddev_to_conf(mddev); 1303 conf_t *conf = mddev->private;
1304 int i, first; 1304 int i, first;
1305 struct bio *tbio, *fbio; 1305 struct bio *tbio, *fbio;
1306 1306
@@ -1400,7 +1400,7 @@ done:
1400 1400
1401static void recovery_request_write(mddev_t *mddev, r10bio_t *r10_bio) 1401static void recovery_request_write(mddev_t *mddev, r10bio_t *r10_bio)
1402{ 1402{
1403 conf_t *conf = mddev_to_conf(mddev); 1403 conf_t *conf = mddev->private;
1404 int i, d; 1404 int i, d;
1405 struct bio *bio, *wbio; 1405 struct bio *bio, *wbio;
1406 1406
@@ -1549,7 +1549,7 @@ static void raid10d(mddev_t *mddev)
1549 r10bio_t *r10_bio; 1549 r10bio_t *r10_bio;
1550 struct bio *bio; 1550 struct bio *bio;
1551 unsigned long flags; 1551 unsigned long flags;
1552 conf_t *conf = mddev_to_conf(mddev); 1552 conf_t *conf = mddev->private;
1553 struct list_head *head = &conf->retry_list; 1553 struct list_head *head = &conf->retry_list;
1554 int unplug=0; 1554 int unplug=0;
1555 mdk_rdev_t *rdev; 1555 mdk_rdev_t *rdev;
@@ -1572,7 +1572,7 @@ static void raid10d(mddev_t *mddev)
1572 spin_unlock_irqrestore(&conf->device_lock, flags); 1572 spin_unlock_irqrestore(&conf->device_lock, flags);
1573 1573
1574 mddev = r10_bio->mddev; 1574 mddev = r10_bio->mddev;
1575 conf = mddev_to_conf(mddev); 1575 conf = mddev->private;
1576 if (test_bit(R10BIO_IsSync, &r10_bio->state)) { 1576 if (test_bit(R10BIO_IsSync, &r10_bio->state)) {
1577 sync_request_write(mddev, r10_bio); 1577 sync_request_write(mddev, r10_bio);
1578 unplug = 1; 1578 unplug = 1;
@@ -1680,7 +1680,7 @@ static int init_resync(conf_t *conf)
1680 1680
1681static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) 1681static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster)
1682{ 1682{
1683 conf_t *conf = mddev_to_conf(mddev); 1683 conf_t *conf = mddev->private;
1684 r10bio_t *r10_bio; 1684 r10bio_t *r10_bio;
1685 struct bio *biolist = NULL, *bio; 1685 struct bio *biolist = NULL, *bio;
1686 sector_t max_sector, nr_sectors; 1686 sector_t max_sector, nr_sectors;
@@ -2026,7 +2026,7 @@ static sector_t
2026raid10_size(mddev_t *mddev, sector_t sectors, int raid_disks) 2026raid10_size(mddev_t *mddev, sector_t sectors, int raid_disks)
2027{ 2027{
2028 sector_t size; 2028 sector_t size;
2029 conf_t *conf = mddev_to_conf(mddev); 2029 conf_t *conf = mddev->private;
2030 2030
2031 if (!raid_disks) 2031 if (!raid_disks)
2032 raid_disks = mddev->raid_disks; 2032 raid_disks = mddev->raid_disks;
@@ -2050,9 +2050,10 @@ static int run(mddev_t *mddev)
2050 int nc, fc, fo; 2050 int nc, fc, fo;
2051 sector_t stride, size; 2051 sector_t stride, size;
2052 2052
2053 if (mddev->chunk_size < PAGE_SIZE) { 2053 if (mddev->chunk_sectors < (PAGE_SIZE >> 9) ||
2054 !is_power_of_2(mddev->chunk_sectors)) {
2054 printk(KERN_ERR "md/raid10: chunk size must be " 2055 printk(KERN_ERR "md/raid10: chunk size must be "
2055 "at least PAGE_SIZE(%ld).\n", PAGE_SIZE); 2056 "at least PAGE_SIZE(%ld) and be a power of 2.\n", PAGE_SIZE);
2056 return -EINVAL; 2057 return -EINVAL;
2057 } 2058 }
2058 2059
@@ -2095,8 +2096,8 @@ static int run(mddev_t *mddev)
2095 conf->far_copies = fc; 2096 conf->far_copies = fc;
2096 conf->copies = nc*fc; 2097 conf->copies = nc*fc;
2097 conf->far_offset = fo; 2098 conf->far_offset = fo;
2098 conf->chunk_mask = (sector_t)(mddev->chunk_size>>9)-1; 2099 conf->chunk_mask = mddev->chunk_sectors - 1;
2099 conf->chunk_shift = ffz(~mddev->chunk_size) - 9; 2100 conf->chunk_shift = ffz(~mddev->chunk_sectors);
2100 size = mddev->dev_sectors >> conf->chunk_shift; 2101 size = mddev->dev_sectors >> conf->chunk_shift;
2101 sector_div(size, fc); 2102 sector_div(size, fc);
2102 size = size * conf->raid_disks; 2103 size = size * conf->raid_disks;
@@ -2185,6 +2186,10 @@ static int run(mddev_t *mddev)
2185 goto out_free_conf; 2186 goto out_free_conf;
2186 } 2187 }
2187 2188
2189 if (mddev->recovery_cp != MaxSector)
2190 printk(KERN_NOTICE "raid10: %s is not clean"
2191 " -- starting background reconstruction\n",
2192 mdname(mddev));
2188 printk(KERN_INFO 2193 printk(KERN_INFO
2189 "raid10: raid set %s active with %d out of %d devices\n", 2194 "raid10: raid set %s active with %d out of %d devices\n",
2190 mdname(mddev), mddev->raid_disks - mddev->degraded, 2195 mdname(mddev), mddev->raid_disks - mddev->degraded,
@@ -2204,7 +2209,8 @@ static int run(mddev_t *mddev)
2204 * maybe... 2209 * maybe...
2205 */ 2210 */
2206 { 2211 {
2207 int stripe = conf->raid_disks * (mddev->chunk_size / PAGE_SIZE); 2212 int stripe = conf->raid_disks *
2213 ((mddev->chunk_sectors << 9) / PAGE_SIZE);
2208 stripe /= conf->near_copies; 2214 stripe /= conf->near_copies;
2209 if (mddev->queue->backing_dev_info.ra_pages < 2* stripe) 2215 if (mddev->queue->backing_dev_info.ra_pages < 2* stripe)
2210 mddev->queue->backing_dev_info.ra_pages = 2* stripe; 2216 mddev->queue->backing_dev_info.ra_pages = 2* stripe;
@@ -2227,7 +2233,7 @@ out:
2227 2233
2228static int stop(mddev_t *mddev) 2234static int stop(mddev_t *mddev)
2229{ 2235{
2230 conf_t *conf = mddev_to_conf(mddev); 2236 conf_t *conf = mddev->private;
2231 2237
2232 raise_barrier(conf, 0); 2238 raise_barrier(conf, 0);
2233 lower_barrier(conf); 2239 lower_barrier(conf);
@@ -2245,7 +2251,7 @@ static int stop(mddev_t *mddev)
2245 2251
2246static void raid10_quiesce(mddev_t *mddev, int state) 2252static void raid10_quiesce(mddev_t *mddev, int state)
2247{ 2253{
2248 conf_t *conf = mddev_to_conf(mddev); 2254 conf_t *conf = mddev->private;
2249 2255
2250 switch(state) { 2256 switch(state) {
2251 case 1: 2257 case 1:
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h
index 244dbe507a54..59cd1efb8d30 100644
--- a/drivers/md/raid10.h
+++ b/drivers/md/raid10.h
@@ -62,12 +62,6 @@ struct r10_private_data_s {
62typedef struct r10_private_data_s conf_t; 62typedef struct r10_private_data_s conf_t;
63 63
64/* 64/*
65 * this is the only point in the RAID code where we violate
66 * C type safety. mddev->private is an 'opaque' pointer.
67 */
68#define mddev_to_conf(mddev) ((conf_t *) mddev->private)
69
70/*
71 * this is our 'private' RAID10 bio. 65 * this is our 'private' RAID10 bio.
72 * 66 *
73 * it contains information about what kind of IO operations were started 67 * it contains information about what kind of IO operations were started
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index bef876698232..f9f991e6e138 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1274,8 +1274,8 @@ static sector_t raid5_compute_sector(raid5_conf_t *conf, sector_t r_sector,
1274 sector_t new_sector; 1274 sector_t new_sector;
1275 int algorithm = previous ? conf->prev_algo 1275 int algorithm = previous ? conf->prev_algo
1276 : conf->algorithm; 1276 : conf->algorithm;
1277 int sectors_per_chunk = previous ? (conf->prev_chunk >> 9) 1277 int sectors_per_chunk = previous ? conf->prev_chunk_sectors
1278 : (conf->chunk_size >> 9); 1278 : conf->chunk_sectors;
1279 int raid_disks = previous ? conf->previous_raid_disks 1279 int raid_disks = previous ? conf->previous_raid_disks
1280 : conf->raid_disks; 1280 : conf->raid_disks;
1281 int data_disks = raid_disks - conf->max_degraded; 1281 int data_disks = raid_disks - conf->max_degraded;
@@ -1480,8 +1480,8 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous)
1480 int raid_disks = sh->disks; 1480 int raid_disks = sh->disks;
1481 int data_disks = raid_disks - conf->max_degraded; 1481 int data_disks = raid_disks - conf->max_degraded;
1482 sector_t new_sector = sh->sector, check; 1482 sector_t new_sector = sh->sector, check;
1483 int sectors_per_chunk = previous ? (conf->prev_chunk >> 9) 1483 int sectors_per_chunk = previous ? conf->prev_chunk_sectors
1484 : (conf->chunk_size >> 9); 1484 : conf->chunk_sectors;
1485 int algorithm = previous ? conf->prev_algo 1485 int algorithm = previous ? conf->prev_algo
1486 : conf->algorithm; 1486 : conf->algorithm;
1487 sector_t stripe; 1487 sector_t stripe;
@@ -1997,8 +1997,7 @@ static void stripe_set_idx(sector_t stripe, raid5_conf_t *conf, int previous,
1997 struct stripe_head *sh) 1997 struct stripe_head *sh)
1998{ 1998{
1999 int sectors_per_chunk = 1999 int sectors_per_chunk =
2000 previous ? (conf->prev_chunk >> 9) 2000 previous ? conf->prev_chunk_sectors : conf->chunk_sectors;
2001 : (conf->chunk_size >> 9);
2002 int dd_idx; 2001 int dd_idx;
2003 int chunk_offset = sector_div(stripe, sectors_per_chunk); 2002 int chunk_offset = sector_div(stripe, sectors_per_chunk);
2004 int disks = previous ? conf->previous_raid_disks : conf->raid_disks; 2003 int disks = previous ? conf->previous_raid_disks : conf->raid_disks;
@@ -3284,7 +3283,7 @@ static void activate_bit_delay(raid5_conf_t *conf)
3284 3283
3285static void unplug_slaves(mddev_t *mddev) 3284static void unplug_slaves(mddev_t *mddev)
3286{ 3285{
3287 raid5_conf_t *conf = mddev_to_conf(mddev); 3286 raid5_conf_t *conf = mddev->private;
3288 int i; 3287 int i;
3289 3288
3290 rcu_read_lock(); 3289 rcu_read_lock();
@@ -3308,7 +3307,7 @@ static void unplug_slaves(mddev_t *mddev)
3308static void raid5_unplug_device(struct request_queue *q) 3307static void raid5_unplug_device(struct request_queue *q)
3309{ 3308{
3310 mddev_t *mddev = q->queuedata; 3309 mddev_t *mddev = q->queuedata;
3311 raid5_conf_t *conf = mddev_to_conf(mddev); 3310 raid5_conf_t *conf = mddev->private;
3312 unsigned long flags; 3311 unsigned long flags;
3313 3312
3314 spin_lock_irqsave(&conf->device_lock, flags); 3313 spin_lock_irqsave(&conf->device_lock, flags);
@@ -3327,7 +3326,7 @@ static void raid5_unplug_device(struct request_queue *q)
3327static int raid5_congested(void *data, int bits) 3326static int raid5_congested(void *data, int bits)
3328{ 3327{
3329 mddev_t *mddev = data; 3328 mddev_t *mddev = data;
3330 raid5_conf_t *conf = mddev_to_conf(mddev); 3329 raid5_conf_t *conf = mddev->private;
3331 3330
3332 /* No difference between reads and writes. Just check 3331 /* No difference between reads and writes. Just check
3333 * how busy the stripe_cache is 3332 * how busy the stripe_cache is
@@ -3352,14 +3351,14 @@ static int raid5_mergeable_bvec(struct request_queue *q,
3352 mddev_t *mddev = q->queuedata; 3351 mddev_t *mddev = q->queuedata;
3353 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); 3352 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev);
3354 int max; 3353 int max;
3355 unsigned int chunk_sectors = mddev->chunk_size >> 9; 3354 unsigned int chunk_sectors = mddev->chunk_sectors;
3356 unsigned int bio_sectors = bvm->bi_size >> 9; 3355 unsigned int bio_sectors = bvm->bi_size >> 9;
3357 3356
3358 if ((bvm->bi_rw & 1) == WRITE) 3357 if ((bvm->bi_rw & 1) == WRITE)
3359 return biovec->bv_len; /* always allow writes to be mergeable */ 3358 return biovec->bv_len; /* always allow writes to be mergeable */
3360 3359
3361 if (mddev->new_chunk < mddev->chunk_size) 3360 if (mddev->new_chunk_sectors < mddev->chunk_sectors)
3362 chunk_sectors = mddev->new_chunk >> 9; 3361 chunk_sectors = mddev->new_chunk_sectors;
3363 max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9; 3362 max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9;
3364 if (max < 0) max = 0; 3363 if (max < 0) max = 0;
3365 if (max <= biovec->bv_len && bio_sectors == 0) 3364 if (max <= biovec->bv_len && bio_sectors == 0)
@@ -3372,11 +3371,11 @@ static int raid5_mergeable_bvec(struct request_queue *q,
3372static int in_chunk_boundary(mddev_t *mddev, struct bio *bio) 3371static int in_chunk_boundary(mddev_t *mddev, struct bio *bio)
3373{ 3372{
3374 sector_t sector = bio->bi_sector + get_start_sect(bio->bi_bdev); 3373 sector_t sector = bio->bi_sector + get_start_sect(bio->bi_bdev);
3375 unsigned int chunk_sectors = mddev->chunk_size >> 9; 3374 unsigned int chunk_sectors = mddev->chunk_sectors;
3376 unsigned int bio_sectors = bio->bi_size >> 9; 3375 unsigned int bio_sectors = bio->bi_size >> 9;
3377 3376
3378 if (mddev->new_chunk < mddev->chunk_size) 3377 if (mddev->new_chunk_sectors < mddev->chunk_sectors)
3379 chunk_sectors = mddev->new_chunk >> 9; 3378 chunk_sectors = mddev->new_chunk_sectors;
3380 return chunk_sectors >= 3379 return chunk_sectors >=
3381 ((sector & (chunk_sectors - 1)) + bio_sectors); 3380 ((sector & (chunk_sectors - 1)) + bio_sectors);
3382} 3381}
@@ -3440,7 +3439,7 @@ static void raid5_align_endio(struct bio *bi, int error)
3440 bio_put(bi); 3439 bio_put(bi);
3441 3440
3442 mddev = raid_bi->bi_bdev->bd_disk->queue->queuedata; 3441 mddev = raid_bi->bi_bdev->bd_disk->queue->queuedata;
3443 conf = mddev_to_conf(mddev); 3442 conf = mddev->private;
3444 rdev = (void*)raid_bi->bi_next; 3443 rdev = (void*)raid_bi->bi_next;
3445 raid_bi->bi_next = NULL; 3444 raid_bi->bi_next = NULL;
3446 3445
@@ -3482,7 +3481,7 @@ static int bio_fits_rdev(struct bio *bi)
3482static int chunk_aligned_read(struct request_queue *q, struct bio * raid_bio) 3481static int chunk_aligned_read(struct request_queue *q, struct bio * raid_bio)
3483{ 3482{
3484 mddev_t *mddev = q->queuedata; 3483 mddev_t *mddev = q->queuedata;
3485 raid5_conf_t *conf = mddev_to_conf(mddev); 3484 raid5_conf_t *conf = mddev->private;
3486 unsigned int dd_idx; 3485 unsigned int dd_idx;
3487 struct bio* align_bi; 3486 struct bio* align_bi;
3488 mdk_rdev_t *rdev; 3487 mdk_rdev_t *rdev;
@@ -3599,7 +3598,7 @@ static struct stripe_head *__get_priority_stripe(raid5_conf_t *conf)
3599static int make_request(struct request_queue *q, struct bio * bi) 3598static int make_request(struct request_queue *q, struct bio * bi)
3600{ 3599{
3601 mddev_t *mddev = q->queuedata; 3600 mddev_t *mddev = q->queuedata;
3602 raid5_conf_t *conf = mddev_to_conf(mddev); 3601 raid5_conf_t *conf = mddev->private;
3603 int dd_idx; 3602 int dd_idx;
3604 sector_t new_sector; 3603 sector_t new_sector;
3605 sector_t logical_sector, last_sector; 3604 sector_t logical_sector, last_sector;
@@ -3696,6 +3695,7 @@ static int make_request(struct request_queue *q, struct bio * bi)
3696 spin_unlock_irq(&conf->device_lock); 3695 spin_unlock_irq(&conf->device_lock);
3697 if (must_retry) { 3696 if (must_retry) {
3698 release_stripe(sh); 3697 release_stripe(sh);
3698 schedule();
3699 goto retry; 3699 goto retry;
3700 } 3700 }
3701 } 3701 }
@@ -3791,10 +3791,10 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
3791 * If old and new chunk sizes differ, we need to process the 3791 * If old and new chunk sizes differ, we need to process the
3792 * largest of these 3792 * largest of these
3793 */ 3793 */
3794 if (mddev->new_chunk > mddev->chunk_size) 3794 if (mddev->new_chunk_sectors > mddev->chunk_sectors)
3795 reshape_sectors = mddev->new_chunk / 512; 3795 reshape_sectors = mddev->new_chunk_sectors;
3796 else 3796 else
3797 reshape_sectors = mddev->chunk_size / 512; 3797 reshape_sectors = mddev->chunk_sectors;
3798 3798
3799 /* we update the metadata when there is more than 3Meg 3799 /* we update the metadata when there is more than 3Meg
3800 * in the block range (that is rather arbitrary, should 3800 * in the block range (that is rather arbitrary, should
@@ -3917,7 +3917,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
3917 1, &dd_idx, NULL); 3917 1, &dd_idx, NULL);
3918 last_sector = 3918 last_sector =
3919 raid5_compute_sector(conf, ((stripe_addr+reshape_sectors) 3919 raid5_compute_sector(conf, ((stripe_addr+reshape_sectors)
3920 *(new_data_disks) - 1), 3920 * new_data_disks - 1),
3921 1, &dd_idx, NULL); 3921 1, &dd_idx, NULL);
3922 if (last_sector >= mddev->dev_sectors) 3922 if (last_sector >= mddev->dev_sectors)
3923 last_sector = mddev->dev_sectors - 1; 3923 last_sector = mddev->dev_sectors - 1;
@@ -3946,7 +3946,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
3946 wait_event(conf->wait_for_overlap, 3946 wait_event(conf->wait_for_overlap,
3947 atomic_read(&conf->reshape_stripes) == 0); 3947 atomic_read(&conf->reshape_stripes) == 0);
3948 mddev->reshape_position = conf->reshape_progress; 3948 mddev->reshape_position = conf->reshape_progress;
3949 mddev->curr_resync_completed = mddev->curr_resync; 3949 mddev->curr_resync_completed = mddev->curr_resync + reshape_sectors;
3950 conf->reshape_checkpoint = jiffies; 3950 conf->reshape_checkpoint = jiffies;
3951 set_bit(MD_CHANGE_DEVS, &mddev->flags); 3951 set_bit(MD_CHANGE_DEVS, &mddev->flags);
3952 md_wakeup_thread(mddev->thread); 3952 md_wakeup_thread(mddev->thread);
@@ -4129,7 +4129,7 @@ static int retry_aligned_read(raid5_conf_t *conf, struct bio *raid_bio)
4129static void raid5d(mddev_t *mddev) 4129static void raid5d(mddev_t *mddev)
4130{ 4130{
4131 struct stripe_head *sh; 4131 struct stripe_head *sh;
4132 raid5_conf_t *conf = mddev_to_conf(mddev); 4132 raid5_conf_t *conf = mddev->private;
4133 int handled; 4133 int handled;
4134 4134
4135 pr_debug("+++ raid5d active\n"); 4135 pr_debug("+++ raid5d active\n");
@@ -4185,7 +4185,7 @@ static void raid5d(mddev_t *mddev)
4185static ssize_t 4185static ssize_t
4186raid5_show_stripe_cache_size(mddev_t *mddev, char *page) 4186raid5_show_stripe_cache_size(mddev_t *mddev, char *page)
4187{ 4187{
4188 raid5_conf_t *conf = mddev_to_conf(mddev); 4188 raid5_conf_t *conf = mddev->private;
4189 if (conf) 4189 if (conf)
4190 return sprintf(page, "%d\n", conf->max_nr_stripes); 4190 return sprintf(page, "%d\n", conf->max_nr_stripes);
4191 else 4191 else
@@ -4195,7 +4195,7 @@ raid5_show_stripe_cache_size(mddev_t *mddev, char *page)
4195static ssize_t 4195static ssize_t
4196raid5_store_stripe_cache_size(mddev_t *mddev, const char *page, size_t len) 4196raid5_store_stripe_cache_size(mddev_t *mddev, const char *page, size_t len)
4197{ 4197{
4198 raid5_conf_t *conf = mddev_to_conf(mddev); 4198 raid5_conf_t *conf = mddev->private;
4199 unsigned long new; 4199 unsigned long new;
4200 int err; 4200 int err;
4201 4201
@@ -4233,7 +4233,7 @@ raid5_stripecache_size = __ATTR(stripe_cache_size, S_IRUGO | S_IWUSR,
4233static ssize_t 4233static ssize_t
4234raid5_show_preread_threshold(mddev_t *mddev, char *page) 4234raid5_show_preread_threshold(mddev_t *mddev, char *page)
4235{ 4235{
4236 raid5_conf_t *conf = mddev_to_conf(mddev); 4236 raid5_conf_t *conf = mddev->private;
4237 if (conf) 4237 if (conf)
4238 return sprintf(page, "%d\n", conf->bypass_threshold); 4238 return sprintf(page, "%d\n", conf->bypass_threshold);
4239 else 4239 else
@@ -4243,7 +4243,7 @@ raid5_show_preread_threshold(mddev_t *mddev, char *page)
4243static ssize_t 4243static ssize_t
4244raid5_store_preread_threshold(mddev_t *mddev, const char *page, size_t len) 4244raid5_store_preread_threshold(mddev_t *mddev, const char *page, size_t len)
4245{ 4245{
4246 raid5_conf_t *conf = mddev_to_conf(mddev); 4246 raid5_conf_t *conf = mddev->private;
4247 unsigned long new; 4247 unsigned long new;
4248 if (len >= PAGE_SIZE) 4248 if (len >= PAGE_SIZE)
4249 return -EINVAL; 4249 return -EINVAL;
@@ -4267,7 +4267,7 @@ raid5_preread_bypass_threshold = __ATTR(preread_bypass_threshold,
4267static ssize_t 4267static ssize_t
4268stripe_cache_active_show(mddev_t *mddev, char *page) 4268stripe_cache_active_show(mddev_t *mddev, char *page)
4269{ 4269{
4270 raid5_conf_t *conf = mddev_to_conf(mddev); 4270 raid5_conf_t *conf = mddev->private;
4271 if (conf) 4271 if (conf)
4272 return sprintf(page, "%d\n", atomic_read(&conf->active_stripes)); 4272 return sprintf(page, "%d\n", atomic_read(&conf->active_stripes));
4273 else 4273 else
@@ -4291,7 +4291,7 @@ static struct attribute_group raid5_attrs_group = {
4291static sector_t 4291static sector_t
4292raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks) 4292raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks)
4293{ 4293{
4294 raid5_conf_t *conf = mddev_to_conf(mddev); 4294 raid5_conf_t *conf = mddev->private;
4295 4295
4296 if (!sectors) 4296 if (!sectors)
4297 sectors = mddev->dev_sectors; 4297 sectors = mddev->dev_sectors;
@@ -4303,8 +4303,8 @@ raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks)
4303 raid_disks = conf->previous_raid_disks; 4303 raid_disks = conf->previous_raid_disks;
4304 } 4304 }
4305 4305
4306 sectors &= ~((sector_t)mddev->chunk_size/512 - 1); 4306 sectors &= ~((sector_t)mddev->chunk_sectors - 1);
4307 sectors &= ~((sector_t)mddev->new_chunk/512 - 1); 4307 sectors &= ~((sector_t)mddev->new_chunk_sectors - 1);
4308 return sectors * (raid_disks - conf->max_degraded); 4308 return sectors * (raid_disks - conf->max_degraded);
4309} 4309}
4310 4310
@@ -4336,9 +4336,11 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4336 return ERR_PTR(-EINVAL); 4336 return ERR_PTR(-EINVAL);
4337 } 4337 }
4338 4338
4339 if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE) { 4339 if (!mddev->new_chunk_sectors ||
4340 (mddev->new_chunk_sectors << 9) % PAGE_SIZE ||
4341 !is_power_of_2(mddev->new_chunk_sectors)) {
4340 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n", 4342 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n",
4341 mddev->new_chunk, mdname(mddev)); 4343 mddev->new_chunk_sectors << 9, mdname(mddev));
4342 return ERR_PTR(-EINVAL); 4344 return ERR_PTR(-EINVAL);
4343 } 4345 }
4344 4346
@@ -4401,7 +4403,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4401 conf->fullsync = 1; 4403 conf->fullsync = 1;
4402 } 4404 }
4403 4405
4404 conf->chunk_size = mddev->new_chunk; 4406 conf->chunk_sectors = mddev->new_chunk_sectors;
4405 conf->level = mddev->new_level; 4407 conf->level = mddev->new_level;
4406 if (conf->level == 6) 4408 if (conf->level == 6)
4407 conf->max_degraded = 2; 4409 conf->max_degraded = 2;
@@ -4411,7 +4413,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4411 conf->max_nr_stripes = NR_STRIPES; 4413 conf->max_nr_stripes = NR_STRIPES;
4412 conf->reshape_progress = mddev->reshape_position; 4414 conf->reshape_progress = mddev->reshape_position;
4413 if (conf->reshape_progress != MaxSector) { 4415 if (conf->reshape_progress != MaxSector) {
4414 conf->prev_chunk = mddev->chunk_size; 4416 conf->prev_chunk_sectors = mddev->chunk_sectors;
4415 conf->prev_algo = mddev->layout; 4417 conf->prev_algo = mddev->layout;
4416 } 4418 }
4417 4419
@@ -4453,6 +4455,10 @@ static int run(mddev_t *mddev)
4453 int working_disks = 0; 4455 int working_disks = 0;
4454 mdk_rdev_t *rdev; 4456 mdk_rdev_t *rdev;
4455 4457
4458 if (mddev->recovery_cp != MaxSector)
4459 printk(KERN_NOTICE "raid5: %s is not clean"
4460 " -- starting background reconstruction\n",
4461 mdname(mddev));
4456 if (mddev->reshape_position != MaxSector) { 4462 if (mddev->reshape_position != MaxSector) {
4457 /* Check that we can continue the reshape. 4463 /* Check that we can continue the reshape.
4458 * Currently only disks can change, it must 4464 * Currently only disks can change, it must
@@ -4475,7 +4481,7 @@ static int run(mddev_t *mddev)
4475 * geometry. 4481 * geometry.
4476 */ 4482 */
4477 here_new = mddev->reshape_position; 4483 here_new = mddev->reshape_position;
4478 if (sector_div(here_new, (mddev->new_chunk>>9)* 4484 if (sector_div(here_new, mddev->new_chunk_sectors *
4479 (mddev->raid_disks - max_degraded))) { 4485 (mddev->raid_disks - max_degraded))) {
4480 printk(KERN_ERR "raid5: reshape_position not " 4486 printk(KERN_ERR "raid5: reshape_position not "
4481 "on a stripe boundary\n"); 4487 "on a stripe boundary\n");
@@ -4483,7 +4489,7 @@ static int run(mddev_t *mddev)
4483 } 4489 }
4484 /* here_new is the stripe we will write to */ 4490 /* here_new is the stripe we will write to */
4485 here_old = mddev->reshape_position; 4491 here_old = mddev->reshape_position;
4486 sector_div(here_old, (mddev->chunk_size>>9)* 4492 sector_div(here_old, mddev->chunk_sectors *
4487 (old_disks-max_degraded)); 4493 (old_disks-max_degraded));
4488 /* here_old is the first stripe that we might need to read 4494 /* here_old is the first stripe that we might need to read
4489 * from */ 4495 * from */
@@ -4498,7 +4504,7 @@ static int run(mddev_t *mddev)
4498 } else { 4504 } else {
4499 BUG_ON(mddev->level != mddev->new_level); 4505 BUG_ON(mddev->level != mddev->new_level);
4500 BUG_ON(mddev->layout != mddev->new_layout); 4506 BUG_ON(mddev->layout != mddev->new_layout);
4501 BUG_ON(mddev->chunk_size != mddev->new_chunk); 4507 BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);
4502 BUG_ON(mddev->delta_disks != 0); 4508 BUG_ON(mddev->delta_disks != 0);
4503 } 4509 }
4504 4510
@@ -4532,7 +4538,7 @@ static int run(mddev_t *mddev)
4532 } 4538 }
4533 4539
4534 /* device size must be a multiple of chunk size */ 4540 /* device size must be a multiple of chunk size */
4535 mddev->dev_sectors &= ~(mddev->chunk_size / 512 - 1); 4541 mddev->dev_sectors &= ~(mddev->chunk_sectors - 1);
4536 mddev->resync_max_sectors = mddev->dev_sectors; 4542 mddev->resync_max_sectors = mddev->dev_sectors;
4537 4543
4538 if (mddev->degraded > 0 && 4544 if (mddev->degraded > 0 &&
@@ -4581,7 +4587,7 @@ static int run(mddev_t *mddev)
4581 { 4587 {
4582 int data_disks = conf->previous_raid_disks - conf->max_degraded; 4588 int data_disks = conf->previous_raid_disks - conf->max_degraded;
4583 int stripe = data_disks * 4589 int stripe = data_disks *
4584 (mddev->chunk_size / PAGE_SIZE); 4590 ((mddev->chunk_sectors << 9) / PAGE_SIZE);
4585 if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) 4591 if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe)
4586 mddev->queue->backing_dev_info.ra_pages = 2 * stripe; 4592 mddev->queue->backing_dev_info.ra_pages = 2 * stripe;
4587 } 4593 }
@@ -4678,7 +4684,8 @@ static void status(struct seq_file *seq, mddev_t *mddev)
4678 raid5_conf_t *conf = (raid5_conf_t *) mddev->private; 4684 raid5_conf_t *conf = (raid5_conf_t *) mddev->private;
4679 int i; 4685 int i;
4680 4686
4681 seq_printf (seq, " level %d, %dk chunk, algorithm %d", mddev->level, mddev->chunk_size >> 10, mddev->layout); 4687 seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level,
4688 mddev->chunk_sectors / 2, mddev->layout);
4682 seq_printf (seq, " [%d/%d] [", conf->raid_disks, conf->raid_disks - mddev->degraded); 4689 seq_printf (seq, " [%d/%d] [", conf->raid_disks, conf->raid_disks - mddev->degraded);
4683 for (i = 0; i < conf->raid_disks; i++) 4690 for (i = 0; i < conf->raid_disks; i++)
4684 seq_printf (seq, "%s", 4691 seq_printf (seq, "%s",
@@ -4826,7 +4833,7 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
4826 * any io in the removed space completes, but it hardly seems 4833 * any io in the removed space completes, but it hardly seems
4827 * worth it. 4834 * worth it.
4828 */ 4835 */
4829 sectors &= ~((sector_t)mddev->chunk_size/512 - 1); 4836 sectors &= ~((sector_t)mddev->chunk_sectors - 1);
4830 md_set_array_sectors(mddev, raid5_size(mddev, sectors, 4837 md_set_array_sectors(mddev, raid5_size(mddev, sectors,
4831 mddev->raid_disks)); 4838 mddev->raid_disks));
4832 if (mddev->array_sectors > 4839 if (mddev->array_sectors >
@@ -4843,14 +4850,37 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
4843 return 0; 4850 return 0;
4844} 4851}
4845 4852
4846static int raid5_check_reshape(mddev_t *mddev) 4853static int check_stripe_cache(mddev_t *mddev)
4847{ 4854{
4848 raid5_conf_t *conf = mddev_to_conf(mddev); 4855 /* Can only proceed if there are plenty of stripe_heads.
4856 * We need a minimum of one full stripe,, and for sensible progress
4857 * it is best to have about 4 times that.
4858 * If we require 4 times, then the default 256 4K stripe_heads will
4859 * allow for chunk sizes up to 256K, which is probably OK.
4860 * If the chunk size is greater, user-space should request more
4861 * stripe_heads first.
4862 */
4863 raid5_conf_t *conf = mddev->private;
4864 if (((mddev->chunk_sectors << 9) / STRIPE_SIZE) * 4
4865 > conf->max_nr_stripes ||
4866 ((mddev->new_chunk_sectors << 9) / STRIPE_SIZE) * 4
4867 > conf->max_nr_stripes) {
4868 printk(KERN_WARNING "raid5: reshape: not enough stripes. Needed %lu\n",
4869 ((max(mddev->chunk_sectors, mddev->new_chunk_sectors) << 9)
4870 / STRIPE_SIZE)*4);
4871 return 0;
4872 }
4873 return 1;
4874}
4875
4876static int check_reshape(mddev_t *mddev)
4877{
4878 raid5_conf_t *conf = mddev->private;
4849 4879
4850 if (mddev->delta_disks == 0 && 4880 if (mddev->delta_disks == 0 &&
4851 mddev->new_layout == mddev->layout && 4881 mddev->new_layout == mddev->layout &&
4852 mddev->new_chunk == mddev->chunk_size) 4882 mddev->new_chunk_sectors == mddev->chunk_sectors)
4853 return -EINVAL; /* nothing to do */ 4883 return 0; /* nothing to do */
4854 if (mddev->bitmap) 4884 if (mddev->bitmap)
4855 /* Cannot grow a bitmap yet */ 4885 /* Cannot grow a bitmap yet */
4856 return -EBUSY; 4886 return -EBUSY;
@@ -4869,28 +4899,15 @@ static int raid5_check_reshape(mddev_t *mddev)
4869 return -EINVAL; 4899 return -EINVAL;
4870 } 4900 }
4871 4901
4872 /* Can only proceed if there are plenty of stripe_heads. 4902 if (!check_stripe_cache(mddev))
4873 * We need a minimum of one full stripe,, and for sensible progress
4874 * it is best to have about 4 times that.
4875 * If we require 4 times, then the default 256 4K stripe_heads will
4876 * allow for chunk sizes up to 256K, which is probably OK.
4877 * If the chunk size is greater, user-space should request more
4878 * stripe_heads first.
4879 */
4880 if ((mddev->chunk_size / STRIPE_SIZE) * 4 > conf->max_nr_stripes ||
4881 (mddev->new_chunk / STRIPE_SIZE) * 4 > conf->max_nr_stripes) {
4882 printk(KERN_WARNING "raid5: reshape: not enough stripes. Needed %lu\n",
4883 (max(mddev->chunk_size, mddev->new_chunk)
4884 / STRIPE_SIZE)*4);
4885 return -ENOSPC; 4903 return -ENOSPC;
4886 }
4887 4904
4888 return resize_stripes(conf, conf->raid_disks + mddev->delta_disks); 4905 return resize_stripes(conf, conf->raid_disks + mddev->delta_disks);
4889} 4906}
4890 4907
4891static int raid5_start_reshape(mddev_t *mddev) 4908static int raid5_start_reshape(mddev_t *mddev)
4892{ 4909{
4893 raid5_conf_t *conf = mddev_to_conf(mddev); 4910 raid5_conf_t *conf = mddev->private;
4894 mdk_rdev_t *rdev; 4911 mdk_rdev_t *rdev;
4895 int spares = 0; 4912 int spares = 0;
4896 int added_devices = 0; 4913 int added_devices = 0;
@@ -4899,6 +4916,9 @@ static int raid5_start_reshape(mddev_t *mddev)
4899 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) 4916 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
4900 return -EBUSY; 4917 return -EBUSY;
4901 4918
4919 if (!check_stripe_cache(mddev))
4920 return -ENOSPC;
4921
4902 list_for_each_entry(rdev, &mddev->disks, same_set) 4922 list_for_each_entry(rdev, &mddev->disks, same_set)
4903 if (rdev->raid_disk < 0 && 4923 if (rdev->raid_disk < 0 &&
4904 !test_bit(Faulty, &rdev->flags)) 4924 !test_bit(Faulty, &rdev->flags))
@@ -4925,8 +4945,8 @@ static int raid5_start_reshape(mddev_t *mddev)
4925 spin_lock_irq(&conf->device_lock); 4945 spin_lock_irq(&conf->device_lock);
4926 conf->previous_raid_disks = conf->raid_disks; 4946 conf->previous_raid_disks = conf->raid_disks;
4927 conf->raid_disks += mddev->delta_disks; 4947 conf->raid_disks += mddev->delta_disks;
4928 conf->prev_chunk = conf->chunk_size; 4948 conf->prev_chunk_sectors = conf->chunk_sectors;
4929 conf->chunk_size = mddev->new_chunk; 4949 conf->chunk_sectors = mddev->new_chunk_sectors;
4930 conf->prev_algo = conf->algorithm; 4950 conf->prev_algo = conf->algorithm;
4931 conf->algorithm = mddev->new_layout; 4951 conf->algorithm = mddev->new_layout;
4932 if (mddev->delta_disks < 0) 4952 if (mddev->delta_disks < 0)
@@ -5008,7 +5028,7 @@ static void end_reshape(raid5_conf_t *conf)
5008 */ 5028 */
5009 { 5029 {
5010 int data_disks = conf->raid_disks - conf->max_degraded; 5030 int data_disks = conf->raid_disks - conf->max_degraded;
5011 int stripe = data_disks * (conf->chunk_size 5031 int stripe = data_disks * ((conf->chunk_sectors << 9)
5012 / PAGE_SIZE); 5032 / PAGE_SIZE);
5013 if (conf->mddev->queue->backing_dev_info.ra_pages < 2 * stripe) 5033 if (conf->mddev->queue->backing_dev_info.ra_pages < 2 * stripe)
5014 conf->mddev->queue->backing_dev_info.ra_pages = 2 * stripe; 5034 conf->mddev->queue->backing_dev_info.ra_pages = 2 * stripe;
@@ -5022,7 +5042,7 @@ static void end_reshape(raid5_conf_t *conf)
5022static void raid5_finish_reshape(mddev_t *mddev) 5042static void raid5_finish_reshape(mddev_t *mddev)
5023{ 5043{
5024 struct block_device *bdev; 5044 struct block_device *bdev;
5025 raid5_conf_t *conf = mddev_to_conf(mddev); 5045 raid5_conf_t *conf = mddev->private;
5026 5046
5027 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { 5047 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
5028 5048
@@ -5053,7 +5073,7 @@ static void raid5_finish_reshape(mddev_t *mddev)
5053 raid5_remove_disk(mddev, d); 5073 raid5_remove_disk(mddev, d);
5054 } 5074 }
5055 mddev->layout = conf->algorithm; 5075 mddev->layout = conf->algorithm;
5056 mddev->chunk_size = conf->chunk_size; 5076 mddev->chunk_sectors = conf->chunk_sectors;
5057 mddev->reshape_position = MaxSector; 5077 mddev->reshape_position = MaxSector;
5058 mddev->delta_disks = 0; 5078 mddev->delta_disks = 0;
5059 } 5079 }
@@ -5061,7 +5081,7 @@ static void raid5_finish_reshape(mddev_t *mddev)
5061 5081
5062static void raid5_quiesce(mddev_t *mddev, int state) 5082static void raid5_quiesce(mddev_t *mddev, int state)
5063{ 5083{
5064 raid5_conf_t *conf = mddev_to_conf(mddev); 5084 raid5_conf_t *conf = mddev->private;
5065 5085
5066 switch(state) { 5086 switch(state) {
5067 case 2: /* resume for a suspend */ 5087 case 2: /* resume for a suspend */
@@ -5111,7 +5131,7 @@ static void *raid5_takeover_raid1(mddev_t *mddev)
5111 5131
5112 mddev->new_level = 5; 5132 mddev->new_level = 5;
5113 mddev->new_layout = ALGORITHM_LEFT_SYMMETRIC; 5133 mddev->new_layout = ALGORITHM_LEFT_SYMMETRIC;
5114 mddev->new_chunk = chunksect << 9; 5134 mddev->new_chunk_sectors = chunksect;
5115 5135
5116 return setup_conf(mddev); 5136 return setup_conf(mddev);
5117} 5137}
@@ -5150,24 +5170,24 @@ static void *raid5_takeover_raid6(mddev_t *mddev)
5150} 5170}
5151 5171
5152 5172
5153static int raid5_reconfig(mddev_t *mddev, int new_layout, int new_chunk) 5173static int raid5_check_reshape(mddev_t *mddev)
5154{ 5174{
5155 /* For a 2-drive array, the layout and chunk size can be changed 5175 /* For a 2-drive array, the layout and chunk size can be changed
5156 * immediately as not restriping is needed. 5176 * immediately as not restriping is needed.
5157 * For larger arrays we record the new value - after validation 5177 * For larger arrays we record the new value - after validation
5158 * to be used by a reshape pass. 5178 * to be used by a reshape pass.
5159 */ 5179 */
5160 raid5_conf_t *conf = mddev_to_conf(mddev); 5180 raid5_conf_t *conf = mddev->private;
5181 int new_chunk = mddev->new_chunk_sectors;
5161 5182
5162 if (new_layout >= 0 && !algorithm_valid_raid5(new_layout)) 5183 if (mddev->new_layout >= 0 && !algorithm_valid_raid5(mddev->new_layout))
5163 return -EINVAL; 5184 return -EINVAL;
5164 if (new_chunk > 0) { 5185 if (new_chunk > 0) {
5165 if (new_chunk & (new_chunk-1)) 5186 if (!is_power_of_2(new_chunk))
5166 /* not a power of 2 */
5167 return -EINVAL; 5187 return -EINVAL;
5168 if (new_chunk < PAGE_SIZE) 5188 if (new_chunk < (PAGE_SIZE>>9))
5169 return -EINVAL; 5189 return -EINVAL;
5170 if (mddev->array_sectors & ((new_chunk>>9)-1)) 5190 if (mddev->array_sectors & (new_chunk-1))
5171 /* not factor of array size */ 5191 /* not factor of array size */
5172 return -EINVAL; 5192 return -EINVAL;
5173 } 5193 }
@@ -5175,49 +5195,39 @@ static int raid5_reconfig(mddev_t *mddev, int new_layout, int new_chunk)
5175 /* They look valid */ 5195 /* They look valid */
5176 5196
5177 if (mddev->raid_disks == 2) { 5197 if (mddev->raid_disks == 2) {
5178 5198 /* can make the change immediately */
5179 if (new_layout >= 0) { 5199 if (mddev->new_layout >= 0) {
5180 conf->algorithm = new_layout; 5200 conf->algorithm = mddev->new_layout;
5181 mddev->layout = mddev->new_layout = new_layout; 5201 mddev->layout = mddev->new_layout;
5182 } 5202 }
5183 if (new_chunk > 0) { 5203 if (new_chunk > 0) {
5184 conf->chunk_size = new_chunk; 5204 conf->chunk_sectors = new_chunk ;
5185 mddev->chunk_size = mddev->new_chunk = new_chunk; 5205 mddev->chunk_sectors = new_chunk;
5186 } 5206 }
5187 set_bit(MD_CHANGE_DEVS, &mddev->flags); 5207 set_bit(MD_CHANGE_DEVS, &mddev->flags);
5188 md_wakeup_thread(mddev->thread); 5208 md_wakeup_thread(mddev->thread);
5189 } else {
5190 if (new_layout >= 0)
5191 mddev->new_layout = new_layout;
5192 if (new_chunk > 0)
5193 mddev->new_chunk = new_chunk;
5194 } 5209 }
5195 return 0; 5210 return check_reshape(mddev);
5196} 5211}
5197 5212
5198static int raid6_reconfig(mddev_t *mddev, int new_layout, int new_chunk) 5213static int raid6_check_reshape(mddev_t *mddev)
5199{ 5214{
5200 if (new_layout >= 0 && !algorithm_valid_raid6(new_layout)) 5215 int new_chunk = mddev->new_chunk_sectors;
5216
5217 if (mddev->new_layout >= 0 && !algorithm_valid_raid6(mddev->new_layout))
5201 return -EINVAL; 5218 return -EINVAL;
5202 if (new_chunk > 0) { 5219 if (new_chunk > 0) {
5203 if (new_chunk & (new_chunk-1)) 5220 if (!is_power_of_2(new_chunk))
5204 /* not a power of 2 */
5205 return -EINVAL; 5221 return -EINVAL;
5206 if (new_chunk < PAGE_SIZE) 5222 if (new_chunk < (PAGE_SIZE >> 9))
5207 return -EINVAL; 5223 return -EINVAL;
5208 if (mddev->array_sectors & ((new_chunk>>9)-1)) 5224 if (mddev->array_sectors & (new_chunk-1))
5209 /* not factor of array size */ 5225 /* not factor of array size */
5210 return -EINVAL; 5226 return -EINVAL;
5211 } 5227 }
5212 5228
5213 /* They look valid */ 5229 /* They look valid */
5214 5230 return check_reshape(mddev);
5215 if (new_layout >= 0)
5216 mddev->new_layout = new_layout;
5217 if (new_chunk > 0)
5218 mddev->new_chunk = new_chunk;
5219
5220 return 0;
5221} 5231}
5222 5232
5223static void *raid5_takeover(mddev_t *mddev) 5233static void *raid5_takeover(mddev_t *mddev)
@@ -5227,8 +5237,6 @@ static void *raid5_takeover(mddev_t *mddev)
5227 * raid1 - if there are two drives. We need to know the chunk size 5237 * raid1 - if there are two drives. We need to know the chunk size
5228 * raid4 - trivial - just use a raid4 layout. 5238 * raid4 - trivial - just use a raid4 layout.
5229 * raid6 - Providing it is a *_6 layout 5239 * raid6 - Providing it is a *_6 layout
5230 *
5231 * For now, just do raid1
5232 */ 5240 */
5233 5241
5234 if (mddev->level == 1) 5242 if (mddev->level == 1)
@@ -5310,12 +5318,11 @@ static struct mdk_personality raid6_personality =
5310 .sync_request = sync_request, 5318 .sync_request = sync_request,
5311 .resize = raid5_resize, 5319 .resize = raid5_resize,
5312 .size = raid5_size, 5320 .size = raid5_size,
5313 .check_reshape = raid5_check_reshape, 5321 .check_reshape = raid6_check_reshape,
5314 .start_reshape = raid5_start_reshape, 5322 .start_reshape = raid5_start_reshape,
5315 .finish_reshape = raid5_finish_reshape, 5323 .finish_reshape = raid5_finish_reshape,
5316 .quiesce = raid5_quiesce, 5324 .quiesce = raid5_quiesce,
5317 .takeover = raid6_takeover, 5325 .takeover = raid6_takeover,
5318 .reconfig = raid6_reconfig,
5319}; 5326};
5320static struct mdk_personality raid5_personality = 5327static struct mdk_personality raid5_personality =
5321{ 5328{
@@ -5338,7 +5345,6 @@ static struct mdk_personality raid5_personality =
5338 .finish_reshape = raid5_finish_reshape, 5345 .finish_reshape = raid5_finish_reshape,
5339 .quiesce = raid5_quiesce, 5346 .quiesce = raid5_quiesce,
5340 .takeover = raid5_takeover, 5347 .takeover = raid5_takeover,
5341 .reconfig = raid5_reconfig,
5342}; 5348};
5343 5349
5344static struct mdk_personality raid4_personality = 5350static struct mdk_personality raid4_personality =
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 52ba99954dec..9459689c4ea0 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -334,7 +334,8 @@ struct raid5_private_data {
334 struct hlist_head *stripe_hashtbl; 334 struct hlist_head *stripe_hashtbl;
335 mddev_t *mddev; 335 mddev_t *mddev;
336 struct disk_info *spare; 336 struct disk_info *spare;
337 int chunk_size, level, algorithm; 337 int chunk_sectors;
338 int level, algorithm;
338 int max_degraded; 339 int max_degraded;
339 int raid_disks; 340 int raid_disks;
340 int max_nr_stripes; 341 int max_nr_stripes;
@@ -350,7 +351,8 @@ struct raid5_private_data {
350 */ 351 */
351 sector_t reshape_safe; 352 sector_t reshape_safe;
352 int previous_raid_disks; 353 int previous_raid_disks;
353 int prev_chunk, prev_algo; 354 int prev_chunk_sectors;
355 int prev_algo;
354 short generation; /* increments with every reshape */ 356 short generation; /* increments with every reshape */
355 unsigned long reshape_checkpoint; /* Time we last updated 357 unsigned long reshape_checkpoint; /* Time we last updated
356 * metadata */ 358 * metadata */
@@ -408,8 +410,6 @@ struct raid5_private_data {
408 410
409typedef struct raid5_private_data raid5_conf_t; 411typedef struct raid5_private_data raid5_conf_t;
410 412
411#define mddev_to_conf(mddev) ((raid5_conf_t *) mddev->private)
412
413/* 413/*
414 * Our supported algorithms 414 * Our supported algorithms
415 */ 415 */
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index c0d911252862..0bce255168bd 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -1067,10 +1067,12 @@ static int ov772x_probe(struct i2c_client *client,
1067 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 1067 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
1068 int ret; 1068 int ret;
1069 1069
1070 info = client->dev.platform_data; 1070 if (!client->dev.platform_data)
1071 if (!info)
1072 return -EINVAL; 1071 return -EINVAL;
1073 1072
1073 info = container_of(client->dev.platform_data,
1074 struct ov772x_camera_info, link);
1075
1074 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { 1076 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
1075 dev_err(&adapter->dev, 1077 dev_err(&adapter->dev,
1076 "I2C-Adapter doesn't support " 1078 "I2C-Adapter doesn't support "
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index a39947643992..aa5065ea09ed 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -875,10 +875,12 @@ static int tw9910_probe(struct i2c_client *client,
875 const struct tw9910_scale_ctrl *scale; 875 const struct tw9910_scale_ctrl *scale;
876 int i, ret; 876 int i, ret;
877 877
878 info = client->dev.platform_data; 878 if (!client->dev.platform_data)
879 if (!info)
880 return -EINVAL; 879 return -EINVAL;
881 880
881 info = container_of(client->dev.platform_data,
882 struct tw9910_video_info, link);
883
882 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent), 884 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent),
883 I2C_FUNC_SMBUS_BYTE_DATA)) { 885 I2C_FUNC_SMBUS_BYTE_DATA)) {
884 dev_err(&client->dev, 886 dev_err(&client->dev,
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 0df065275cd3..5d0ba4f5924c 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -4414,11 +4414,11 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
4414 * 1078 errata workaround for the 36GB limitation 4414 * 1078 errata workaround for the 36GB limitation
4415 */ 4415 */
4416 if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078 && 4416 if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078 &&
4417 ioc->dma_mask > DMA_35BIT_MASK) { 4417 ioc->dma_mask > DMA_BIT_MASK(35)) {
4418 if (!pci_set_dma_mask(ioc->pcidev, DMA_BIT_MASK(32)) 4418 if (!pci_set_dma_mask(ioc->pcidev, DMA_BIT_MASK(32))
4419 && !pci_set_consistent_dma_mask(ioc->pcidev, 4419 && !pci_set_consistent_dma_mask(ioc->pcidev,
4420 DMA_BIT_MASK(32))) { 4420 DMA_BIT_MASK(32))) {
4421 dma_mask = DMA_35BIT_MASK; 4421 dma_mask = DMA_BIT_MASK(35);
4422 d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT 4422 d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT
4423 "setting 35 bit addressing for " 4423 "setting 35 bit addressing for "
4424 "Request/Reply/Chain and Sense Buffers\n", 4424 "Request/Reply/Chain and Sense Buffers\n",
@@ -4575,7 +4575,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
4575 alloc_dma += ioc->reply_sz; 4575 alloc_dma += ioc->reply_sz;
4576 } 4576 }
4577 4577
4578 if (dma_mask == DMA_35BIT_MASK && !pci_set_dma_mask(ioc->pcidev, 4578 if (dma_mask == DMA_BIT_MASK(35) && !pci_set_dma_mask(ioc->pcidev,
4579 ioc->dma_mask) && !pci_set_consistent_dma_mask(ioc->pcidev, 4579 ioc->dma_mask) && !pci_set_consistent_dma_mask(ioc->pcidev,
4580 ioc->dma_mask)) 4580 ioc->dma_mask))
4581 d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT 4581 d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -4602,7 +4602,7 @@ out_fail:
4602 ioc->sense_buf_pool = NULL; 4602 ioc->sense_buf_pool = NULL;
4603 } 4603 }
4604 4604
4605 if (dma_mask == DMA_35BIT_MASK && !pci_set_dma_mask(ioc->pcidev, 4605 if (dma_mask == DMA_BIT_MASK(35) && !pci_set_dma_mask(ioc->pcidev,
4606 DMA_BIT_MASK(64)) && !pci_set_consistent_dma_mask(ioc->pcidev, 4606 DMA_BIT_MASK(64)) && !pci_set_consistent_dma_mask(ioc->pcidev,
4607 DMA_BIT_MASK(64))) 4607 DMA_BIT_MASK(64)))
4608 d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT 4608 d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT
diff --git a/drivers/misc/sgi-gru/Makefile b/drivers/misc/sgi-gru/Makefile
index bcd8136d2f98..7c4c306dfa8a 100644
--- a/drivers/misc/sgi-gru/Makefile
+++ b/drivers/misc/sgi-gru/Makefile
@@ -3,5 +3,5 @@ ifdef CONFIG_SGI_GRU_DEBUG
3endif 3endif
4 4
5obj-$(CONFIG_SGI_GRU) := gru.o 5obj-$(CONFIG_SGI_GRU) := gru.o
6gru-y := grufile.o grumain.o grufault.o grutlbpurge.o gruprocfs.o grukservices.o gruhandles.o 6gru-y := grufile.o grumain.o grufault.o grutlbpurge.o gruprocfs.o grukservices.o gruhandles.o grukdump.o
7 7
diff --git a/drivers/misc/sgi-gru/gru_instructions.h b/drivers/misc/sgi-gru/gru_instructions.h
index 3fde33c1e8f3..3c9c06618e6a 100644
--- a/drivers/misc/sgi-gru/gru_instructions.h
+++ b/drivers/misc/sgi-gru/gru_instructions.h
@@ -81,6 +81,8 @@ struct control_block_extended_exc_detail {
81 int exopc; 81 int exopc;
82 long exceptdet0; 82 long exceptdet0;
83 int exceptdet1; 83 int exceptdet1;
84 int cbrstate;
85 int cbrexecstatus;
84}; 86};
85 87
86/* 88/*
@@ -107,7 +109,8 @@ struct gru_instruction_bits {
107 unsigned char reserved2: 2; 109 unsigned char reserved2: 2;
108 unsigned char istatus: 2; 110 unsigned char istatus: 2;
109 unsigned char isubstatus:4; 111 unsigned char isubstatus:4;
110 unsigned char reserved3: 2; 112 unsigned char reserved3: 1;
113 unsigned char tlb_fault_color: 1;
111 /* DW 1 */ 114 /* DW 1 */
112 unsigned long idef4; /* 42 bits: TRi1, BufSize */ 115 unsigned long idef4; /* 42 bits: TRi1, BufSize */
113 /* DW 2-6 */ 116 /* DW 2-6 */
@@ -250,17 +253,37 @@ struct gru_instruction {
250#define CBE_CAUSE_HA_RESPONSE_FATAL (1 << 13) 253#define CBE_CAUSE_HA_RESPONSE_FATAL (1 << 13)
251#define CBE_CAUSE_HA_RESPONSE_NON_FATAL (1 << 14) 254#define CBE_CAUSE_HA_RESPONSE_NON_FATAL (1 << 14)
252#define CBE_CAUSE_ADDRESS_SPACE_DECODE_ERROR (1 << 15) 255#define CBE_CAUSE_ADDRESS_SPACE_DECODE_ERROR (1 << 15)
253#define CBE_CAUSE_RESPONSE_DATA_ERROR (1 << 16) 256#define CBE_CAUSE_PROTOCOL_STATE_DATA_ERROR (1 << 16)
254#define CBE_CAUSE_PROTOCOL_STATE_DATA_ERROR (1 << 17) 257#define CBE_CAUSE_RA_RESPONSE_DATA_ERROR (1 << 17)
258#define CBE_CAUSE_HA_RESPONSE_DATA_ERROR (1 << 18)
259
260/* CBE cbrexecstatus bits */
261#define CBR_EXS_ABORT_OCC_BIT 0
262#define CBR_EXS_INT_OCC_BIT 1
263#define CBR_EXS_PENDING_BIT 2
264#define CBR_EXS_QUEUED_BIT 3
265#define CBR_EXS_TLB_INVAL_BIT 4
266#define CBR_EXS_EXCEPTION_BIT 5
267
268#define CBR_EXS_ABORT_OCC (1 << CBR_EXS_ABORT_OCC_BIT)
269#define CBR_EXS_INT_OCC (1 << CBR_EXS_INT_OCC_BIT)
270#define CBR_EXS_PENDING (1 << CBR_EXS_PENDING_BIT)
271#define CBR_EXS_QUEUED (1 << CBR_EXS_QUEUED_BIT)
272#define CBR_TLB_INVAL (1 << CBR_EXS_TLB_INVAL_BIT)
273#define CBR_EXS_EXCEPTION (1 << CBR_EXS_EXCEPTION_BIT)
255 274
256/* 275/*
257 * Exceptions are retried for the following cases. If any OTHER bits are set 276 * Exceptions are retried for the following cases. If any OTHER bits are set
258 * in ecause, the exception is not retryable. 277 * in ecause, the exception is not retryable.
259 */ 278 */
260#define EXCEPTION_RETRY_BITS (CBE_CAUSE_RESPONSE_DATA_ERROR | \ 279#define EXCEPTION_RETRY_BITS (CBE_CAUSE_EXECUTION_HW_ERROR | \
261 CBE_CAUSE_RA_REQUEST_TIMEOUT | \
262 CBE_CAUSE_TLBHW_ERROR | \ 280 CBE_CAUSE_TLBHW_ERROR | \
263 CBE_CAUSE_HA_REQUEST_TIMEOUT) 281 CBE_CAUSE_RA_REQUEST_TIMEOUT | \
282 CBE_CAUSE_RA_RESPONSE_NON_FATAL | \
283 CBE_CAUSE_HA_RESPONSE_NON_FATAL | \
284 CBE_CAUSE_RA_RESPONSE_DATA_ERROR | \
285 CBE_CAUSE_HA_RESPONSE_DATA_ERROR \
286 )
264 287
265/* Message queue head structure */ 288/* Message queue head structure */
266union gru_mesqhead { 289union gru_mesqhead {
@@ -600,9 +623,11 @@ static inline int gru_get_cb_substatus(void *cb)
600 return cbs->isubstatus; 623 return cbs->isubstatus;
601} 624}
602 625
603/* Check the status of a CB. If the CB is in UPM mode, call the 626/*
604 * OS to handle the UPM status. 627 * User interface to check an instruction status. UPM and exceptions
605 * Returns the CB status field value (0 for normal completion) 628 * are handled automatically. However, this function does NOT wait
629 * for an active instruction to complete.
630 *
606 */ 631 */
607static inline int gru_check_status(void *cb) 632static inline int gru_check_status(void *cb)
608{ 633{
@@ -610,34 +635,31 @@ static inline int gru_check_status(void *cb)
610 int ret; 635 int ret;
611 636
612 ret = cbs->istatus; 637 ret = cbs->istatus;
613 if (ret == CBS_CALL_OS) 638 if (ret != CBS_ACTIVE)
614 ret = gru_check_status_proc(cb); 639 ret = gru_check_status_proc(cb);
615 return ret; 640 return ret;
616} 641}
617 642
618/* Wait for CB to complete. 643/*
619 * Returns the CB status field value (0 for normal completion) 644 * User interface (via inline function) to wait for an instruction
645 * to complete. Completion status (IDLE or EXCEPTION is returned
646 * to the user. Exception due to hardware errors are automatically
647 * retried before returning an exception.
648 *
620 */ 649 */
621static inline int gru_wait(void *cb) 650static inline int gru_wait(void *cb)
622{ 651{
623 struct gru_control_block_status *cbs = (void *)cb; 652 return gru_wait_proc(cb);
624 int ret = cbs->istatus;
625
626 if (ret != CBS_IDLE)
627 ret = gru_wait_proc(cb);
628 return ret;
629} 653}
630 654
631/* Wait for CB to complete. Aborts program if error. (Note: error does NOT 655/*
656 * Wait for CB to complete. Aborts program if error. (Note: error does NOT
632 * mean TLB mis - only fatal errors such as memory parity error or user 657 * mean TLB mis - only fatal errors such as memory parity error or user
633 * bugs will cause termination. 658 * bugs will cause termination.
634 */ 659 */
635static inline void gru_wait_abort(void *cb) 660static inline void gru_wait_abort(void *cb)
636{ 661{
637 struct gru_control_block_status *cbs = (void *)cb; 662 gru_wait_abort_proc(cb);
638
639 if (cbs->istatus != CBS_IDLE)
640 gru_wait_abort_proc(cb);
641} 663}
642 664
643 665
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index ab118558552e..679e01778286 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -166,7 +166,8 @@ static inline struct gru_state *irq_to_gru(int irq)
166 * the GRU, atomic operations must be used to clear bits. 166 * the GRU, atomic operations must be used to clear bits.
167 */ 167 */
168static void get_clear_fault_map(struct gru_state *gru, 168static void get_clear_fault_map(struct gru_state *gru,
169 struct gru_tlb_fault_map *map) 169 struct gru_tlb_fault_map *imap,
170 struct gru_tlb_fault_map *dmap)
170{ 171{
171 unsigned long i, k; 172 unsigned long i, k;
172 struct gru_tlb_fault_map *tfm; 173 struct gru_tlb_fault_map *tfm;
@@ -177,7 +178,11 @@ static void get_clear_fault_map(struct gru_state *gru,
177 k = tfm->fault_bits[i]; 178 k = tfm->fault_bits[i];
178 if (k) 179 if (k)
179 k = xchg(&tfm->fault_bits[i], 0UL); 180 k = xchg(&tfm->fault_bits[i], 0UL);
180 map->fault_bits[i] = k; 181 imap->fault_bits[i] = k;
182 k = tfm->done_bits[i];
183 if (k)
184 k = xchg(&tfm->done_bits[i], 0UL);
185 dmap->fault_bits[i] = k;
181 } 186 }
182 187
183 /* 188 /*
@@ -334,6 +339,12 @@ static int gru_try_dropin(struct gru_thread_state *gts,
334 * Might be a hardware race OR a stupid user. Ignore FMM because FMM 339 * Might be a hardware race OR a stupid user. Ignore FMM because FMM
335 * is a transient state. 340 * is a transient state.
336 */ 341 */
342 if (tfh->status != TFHSTATUS_EXCEPTION) {
343 gru_flush_cache(tfh);
344 if (tfh->status != TFHSTATUS_EXCEPTION)
345 goto failnoexception;
346 STAT(tfh_stale_on_fault);
347 }
337 if (tfh->state == TFHSTATE_IDLE) 348 if (tfh->state == TFHSTATE_IDLE)
338 goto failidle; 349 goto failidle;
339 if (tfh->state == TFHSTATE_MISS_FMM && cb) 350 if (tfh->state == TFHSTATE_MISS_FMM && cb)
@@ -401,8 +412,17 @@ failfmm:
401 gru_dbg(grudev, "FAILED fmm tfh: 0x%p, state %d\n", tfh, tfh->state); 412 gru_dbg(grudev, "FAILED fmm tfh: 0x%p, state %d\n", tfh, tfh->state);
402 return 0; 413 return 0;
403 414
415failnoexception:
416 /* TFH status did not show exception pending */
417 gru_flush_cache(tfh);
418 if (cb)
419 gru_flush_cache(cb);
420 STAT(tlb_dropin_fail_no_exception);
421 gru_dbg(grudev, "FAILED non-exception tfh: 0x%p, status %d, state %d\n", tfh, tfh->status, tfh->state);
422 return 0;
423
404failidle: 424failidle:
405 /* TFH was idle - no miss pending */ 425 /* TFH state was idle - no miss pending */
406 gru_flush_cache(tfh); 426 gru_flush_cache(tfh);
407 if (cb) 427 if (cb)
408 gru_flush_cache(cb); 428 gru_flush_cache(cb);
@@ -438,7 +458,7 @@ failactive:
438irqreturn_t gru_intr(int irq, void *dev_id) 458irqreturn_t gru_intr(int irq, void *dev_id)
439{ 459{
440 struct gru_state *gru; 460 struct gru_state *gru;
441 struct gru_tlb_fault_map map; 461 struct gru_tlb_fault_map imap, dmap;
442 struct gru_thread_state *gts; 462 struct gru_thread_state *gts;
443 struct gru_tlb_fault_handle *tfh = NULL; 463 struct gru_tlb_fault_handle *tfh = NULL;
444 int cbrnum, ctxnum; 464 int cbrnum, ctxnum;
@@ -451,11 +471,15 @@ irqreturn_t gru_intr(int irq, void *dev_id)
451 raw_smp_processor_id(), irq); 471 raw_smp_processor_id(), irq);
452 return IRQ_NONE; 472 return IRQ_NONE;
453 } 473 }
454 get_clear_fault_map(gru, &map); 474 get_clear_fault_map(gru, &imap, &dmap);
455 gru_dbg(grudev, "irq %d, gru %x, map 0x%lx\n", irq, gru->gs_gid, 475
456 map.fault_bits[0]); 476 for_each_cbr_in_tfm(cbrnum, dmap.fault_bits) {
477 complete(gru->gs_blade->bs_async_wq);
478 gru_dbg(grudev, "gid %d, cbr_done %d, done %d\n",
479 gru->gs_gid, cbrnum, gru->gs_blade->bs_async_wq->done);
480 }
457 481
458 for_each_cbr_in_tfm(cbrnum, map.fault_bits) { 482 for_each_cbr_in_tfm(cbrnum, imap.fault_bits) {
459 tfh = get_tfh_by_index(gru, cbrnum); 483 tfh = get_tfh_by_index(gru, cbrnum);
460 prefetchw(tfh); /* Helps on hdw, required for emulator */ 484 prefetchw(tfh); /* Helps on hdw, required for emulator */
461 485
@@ -472,7 +496,9 @@ irqreturn_t gru_intr(int irq, void *dev_id)
472 * This is running in interrupt context. Trylock the mmap_sem. 496 * This is running in interrupt context. Trylock the mmap_sem.
473 * If it fails, retry the fault in user context. 497 * If it fails, retry the fault in user context.
474 */ 498 */
475 if (down_read_trylock(&gts->ts_mm->mmap_sem)) { 499 if (!gts->ts_force_cch_reload &&
500 down_read_trylock(&gts->ts_mm->mmap_sem)) {
501 gts->ustats.fmm_tlbdropin++;
476 gru_try_dropin(gts, tfh, NULL); 502 gru_try_dropin(gts, tfh, NULL);
477 up_read(&gts->ts_mm->mmap_sem); 503 up_read(&gts->ts_mm->mmap_sem);
478 } else { 504 } else {
@@ -491,6 +517,7 @@ static int gru_user_dropin(struct gru_thread_state *gts,
491 struct gru_mm_struct *gms = gts->ts_gms; 517 struct gru_mm_struct *gms = gts->ts_gms;
492 int ret; 518 int ret;
493 519
520 gts->ustats.upm_tlbdropin++;
494 while (1) { 521 while (1) {
495 wait_event(gms->ms_wait_queue, 522 wait_event(gms->ms_wait_queue,
496 atomic_read(&gms->ms_range_active) == 0); 523 atomic_read(&gms->ms_range_active) == 0);
@@ -546,8 +573,8 @@ int gru_handle_user_call_os(unsigned long cb)
546 * CCH may contain stale data if ts_force_cch_reload is set. 573 * CCH may contain stale data if ts_force_cch_reload is set.
547 */ 574 */
548 if (gts->ts_gru && gts->ts_force_cch_reload) { 575 if (gts->ts_gru && gts->ts_force_cch_reload) {
549 gru_update_cch(gts, 0);
550 gts->ts_force_cch_reload = 0; 576 gts->ts_force_cch_reload = 0;
577 gru_update_cch(gts, 0);
551 } 578 }
552 579
553 ret = -EAGAIN; 580 ret = -EAGAIN;
@@ -589,20 +616,26 @@ int gru_get_exception_detail(unsigned long arg)
589 } else if (gts->ts_gru) { 616 } else if (gts->ts_gru) {
590 cbrnum = thread_cbr_number(gts, ucbnum); 617 cbrnum = thread_cbr_number(gts, ucbnum);
591 cbe = get_cbe_by_index(gts->ts_gru, cbrnum); 618 cbe = get_cbe_by_index(gts->ts_gru, cbrnum);
592 prefetchw(cbe);/* Harmless on hardware, required for emulator */ 619 gru_flush_cache(cbe); /* CBE not coherent */
593 excdet.opc = cbe->opccpy; 620 excdet.opc = cbe->opccpy;
594 excdet.exopc = cbe->exopccpy; 621 excdet.exopc = cbe->exopccpy;
595 excdet.ecause = cbe->ecause; 622 excdet.ecause = cbe->ecause;
596 excdet.exceptdet0 = cbe->idef1upd; 623 excdet.exceptdet0 = cbe->idef1upd;
597 excdet.exceptdet1 = cbe->idef3upd; 624 excdet.exceptdet1 = cbe->idef3upd;
625 excdet.cbrstate = cbe->cbrstate;
626 excdet.cbrexecstatus = cbe->cbrexecstatus;
627 gru_flush_cache(cbe);
598 ret = 0; 628 ret = 0;
599 } else { 629 } else {
600 ret = -EAGAIN; 630 ret = -EAGAIN;
601 } 631 }
602 gru_unlock_gts(gts); 632 gru_unlock_gts(gts);
603 633
604 gru_dbg(grudev, "address 0x%lx, ecause 0x%x\n", excdet.cb, 634 gru_dbg(grudev,
605 excdet.ecause); 635 "cb 0x%lx, op %d, exopc %d, cbrstate %d, cbrexecstatus 0x%x, ecause 0x%x, "
636 "exdet0 0x%lx, exdet1 0x%x\n",
637 excdet.cb, excdet.opc, excdet.exopc, excdet.cbrstate, excdet.cbrexecstatus,
638 excdet.ecause, excdet.exceptdet0, excdet.exceptdet1);
606 if (!ret && copy_to_user((void __user *)arg, &excdet, sizeof(excdet))) 639 if (!ret && copy_to_user((void __user *)arg, &excdet, sizeof(excdet)))
607 ret = -EFAULT; 640 ret = -EFAULT;
608 return ret; 641 return ret;
@@ -627,7 +660,7 @@ static int gru_unload_all_contexts(void)
627 if (gts && mutex_trylock(&gts->ts_ctxlock)) { 660 if (gts && mutex_trylock(&gts->ts_ctxlock)) {
628 spin_unlock(&gru->gs_lock); 661 spin_unlock(&gru->gs_lock);
629 gru_unload_context(gts, 1); 662 gru_unload_context(gts, 1);
630 gru_unlock_gts(gts); 663 mutex_unlock(&gts->ts_ctxlock);
631 spin_lock(&gru->gs_lock); 664 spin_lock(&gru->gs_lock);
632 } 665 }
633 } 666 }
@@ -669,6 +702,7 @@ int gru_user_flush_tlb(unsigned long arg)
669{ 702{
670 struct gru_thread_state *gts; 703 struct gru_thread_state *gts;
671 struct gru_flush_tlb_req req; 704 struct gru_flush_tlb_req req;
705 struct gru_mm_struct *gms;
672 706
673 STAT(user_flush_tlb); 707 STAT(user_flush_tlb);
674 if (copy_from_user(&req, (void __user *)arg, sizeof(req))) 708 if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
@@ -681,8 +715,34 @@ int gru_user_flush_tlb(unsigned long arg)
681 if (!gts) 715 if (!gts)
682 return -EINVAL; 716 return -EINVAL;
683 717
684 gru_flush_tlb_range(gts->ts_gms, req.vaddr, req.len); 718 gms = gts->ts_gms;
685 gru_unlock_gts(gts); 719 gru_unlock_gts(gts);
720 gru_flush_tlb_range(gms, req.vaddr, req.len);
721
722 return 0;
723}
724
725/*
726 * Fetch GSEG statisticss
727 */
728long gru_get_gseg_statistics(unsigned long arg)
729{
730 struct gru_thread_state *gts;
731 struct gru_get_gseg_statistics_req req;
732
733 if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
734 return -EFAULT;
735
736 gts = gru_find_lock_gts(req.gseg);
737 if (gts) {
738 memcpy(&req.stats, &gts->ustats, sizeof(gts->ustats));
739 gru_unlock_gts(gts);
740 } else {
741 memset(&req.stats, 0, sizeof(gts->ustats));
742 }
743
744 if (copy_to_user((void __user *)arg, &req, sizeof(req)))
745 return -EFAULT;
686 746
687 return 0; 747 return 0;
688} 748}
@@ -691,18 +751,34 @@ int gru_user_flush_tlb(unsigned long arg)
691 * Register the current task as the user of the GSEG slice. 751 * Register the current task as the user of the GSEG slice.
692 * Needed for TLB fault interrupt targeting. 752 * Needed for TLB fault interrupt targeting.
693 */ 753 */
694int gru_set_task_slice(long address) 754int gru_set_context_option(unsigned long arg)
695{ 755{
696 struct gru_thread_state *gts; 756 struct gru_thread_state *gts;
757 struct gru_set_context_option_req req;
758 int ret = 0;
759
760 STAT(set_context_option);
761 if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
762 return -EFAULT;
763 gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1);
697 764
698 STAT(set_task_slice); 765 gts = gru_alloc_locked_gts(req.gseg);
699 gru_dbg(grudev, "address 0x%lx\n", address);
700 gts = gru_alloc_locked_gts(address);
701 if (!gts) 766 if (!gts)
702 return -EINVAL; 767 return -EINVAL;
703 768
704 gts->ts_tgid_owner = current->tgid; 769 switch (req.op) {
770 case sco_gseg_owner:
771 /* Register the current task as the GSEG owner */
772 gts->ts_tgid_owner = current->tgid;
773 break;
774 case sco_cch_req_slice:
775 /* Set the CCH slice option */
776 gts->ts_cch_req_slice = req.val1 & 3;
777 break;
778 default:
779 ret = -EINVAL;
780 }
705 gru_unlock_gts(gts); 781 gru_unlock_gts(gts);
706 782
707 return 0; 783 return ret;
708} 784}
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index 3ce2920e2bf3..fa2d93a9fb8d 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -46,6 +46,7 @@
46 46
47struct gru_blade_state *gru_base[GRU_MAX_BLADES] __read_mostly; 47struct gru_blade_state *gru_base[GRU_MAX_BLADES] __read_mostly;
48unsigned long gru_start_paddr __read_mostly; 48unsigned long gru_start_paddr __read_mostly;
49void *gru_start_vaddr __read_mostly;
49unsigned long gru_end_paddr __read_mostly; 50unsigned long gru_end_paddr __read_mostly;
50unsigned int gru_max_gids __read_mostly; 51unsigned int gru_max_gids __read_mostly;
51struct gru_stats_s gru_stats; 52struct gru_stats_s gru_stats;
@@ -135,11 +136,9 @@ static int gru_create_new_context(unsigned long arg)
135 if (copy_from_user(&req, (void __user *)arg, sizeof(req))) 136 if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
136 return -EFAULT; 137 return -EFAULT;
137 138
138 if (req.data_segment_bytes == 0 || 139 if (req.data_segment_bytes > max_user_dsr_bytes)
139 req.data_segment_bytes > max_user_dsr_bytes)
140 return -EINVAL; 140 return -EINVAL;
141 if (!req.control_blocks || !req.maximum_thread_count || 141 if (req.control_blocks > max_user_cbrs || !req.maximum_thread_count)
142 req.control_blocks > max_user_cbrs)
143 return -EINVAL; 142 return -EINVAL;
144 143
145 if (!(req.options & GRU_OPT_MISS_MASK)) 144 if (!(req.options & GRU_OPT_MISS_MASK))
@@ -184,41 +183,6 @@ static long gru_get_config_info(unsigned long arg)
184} 183}
185 184
186/* 185/*
187 * Get GRU chiplet status
188 */
189static long gru_get_chiplet_status(unsigned long arg)
190{
191 struct gru_state *gru;
192 struct gru_chiplet_info info;
193
194 if (copy_from_user(&info, (void __user *)arg, sizeof(info)))
195 return -EFAULT;
196
197 if (info.node == -1)
198 info.node = numa_node_id();
199 if (info.node >= num_possible_nodes() ||
200 info.chiplet >= GRU_CHIPLETS_PER_HUB ||
201 info.node < 0 || info.chiplet < 0)
202 return -EINVAL;
203
204 info.blade = uv_node_to_blade_id(info.node);
205 gru = get_gru(info.blade, info.chiplet);
206
207 info.total_dsr_bytes = GRU_NUM_DSR_BYTES;
208 info.total_cbr = GRU_NUM_CB;
209 info.total_user_dsr_bytes = GRU_NUM_DSR_BYTES -
210 gru->gs_reserved_dsr_bytes;
211 info.total_user_cbr = GRU_NUM_CB - gru->gs_reserved_cbrs;
212 info.free_user_dsr_bytes = hweight64(gru->gs_dsr_map) *
213 GRU_DSR_AU_BYTES;
214 info.free_user_cbr = hweight64(gru->gs_cbr_map) * GRU_CBR_AU_SIZE;
215
216 if (copy_to_user((void __user *)arg, &info, sizeof(info)))
217 return -EFAULT;
218 return 0;
219}
220
221/*
222 * gru_file_unlocked_ioctl 186 * gru_file_unlocked_ioctl
223 * 187 *
224 * Called to update file attributes via IOCTL calls. 188 * Called to update file attributes via IOCTL calls.
@@ -234,8 +198,8 @@ static long gru_file_unlocked_ioctl(struct file *file, unsigned int req,
234 case GRU_CREATE_CONTEXT: 198 case GRU_CREATE_CONTEXT:
235 err = gru_create_new_context(arg); 199 err = gru_create_new_context(arg);
236 break; 200 break;
237 case GRU_SET_TASK_SLICE: 201 case GRU_SET_CONTEXT_OPTION:
238 err = gru_set_task_slice(arg); 202 err = gru_set_context_option(arg);
239 break; 203 break;
240 case GRU_USER_GET_EXCEPTION_DETAIL: 204 case GRU_USER_GET_EXCEPTION_DETAIL:
241 err = gru_get_exception_detail(arg); 205 err = gru_get_exception_detail(arg);
@@ -243,18 +207,24 @@ static long gru_file_unlocked_ioctl(struct file *file, unsigned int req,
243 case GRU_USER_UNLOAD_CONTEXT: 207 case GRU_USER_UNLOAD_CONTEXT:
244 err = gru_user_unload_context(arg); 208 err = gru_user_unload_context(arg);
245 break; 209 break;
246 case GRU_GET_CHIPLET_STATUS:
247 err = gru_get_chiplet_status(arg);
248 break;
249 case GRU_USER_FLUSH_TLB: 210 case GRU_USER_FLUSH_TLB:
250 err = gru_user_flush_tlb(arg); 211 err = gru_user_flush_tlb(arg);
251 break; 212 break;
252 case GRU_USER_CALL_OS: 213 case GRU_USER_CALL_OS:
253 err = gru_handle_user_call_os(arg); 214 err = gru_handle_user_call_os(arg);
254 break; 215 break;
216 case GRU_GET_GSEG_STATISTICS:
217 err = gru_get_gseg_statistics(arg);
218 break;
219 case GRU_KTEST:
220 err = gru_ktest(arg);
221 break;
255 case GRU_GET_CONFIG_INFO: 222 case GRU_GET_CONFIG_INFO:
256 err = gru_get_config_info(arg); 223 err = gru_get_config_info(arg);
257 break; 224 break;
225 case GRU_DUMP_CHIPLET_STATE:
226 err = gru_dump_chiplet_request(arg);
227 break;
258 } 228 }
259 return err; 229 return err;
260} 230}
@@ -282,7 +252,6 @@ static void gru_init_chiplet(struct gru_state *gru, unsigned long paddr,
282 gru_dbg(grudev, "bid %d, nid %d, gid %d, vaddr %p (0x%lx)\n", 252 gru_dbg(grudev, "bid %d, nid %d, gid %d, vaddr %p (0x%lx)\n",
283 bid, nid, gru->gs_gid, gru->gs_gru_base_vaddr, 253 bid, nid, gru->gs_gid, gru->gs_gru_base_vaddr,
284 gru->gs_gru_base_paddr); 254 gru->gs_gru_base_paddr);
285 gru_kservices_init(gru);
286} 255}
287 256
288static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr) 257static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr)
@@ -309,6 +278,7 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr)
309 memset(gru_base[bid], 0, sizeof(struct gru_blade_state)); 278 memset(gru_base[bid], 0, sizeof(struct gru_blade_state));
310 gru_base[bid]->bs_lru_gru = &gru_base[bid]->bs_grus[0]; 279 gru_base[bid]->bs_lru_gru = &gru_base[bid]->bs_grus[0];
311 spin_lock_init(&gru_base[bid]->bs_lock); 280 spin_lock_init(&gru_base[bid]->bs_lock);
281 init_rwsem(&gru_base[bid]->bs_kgts_sema);
312 282
313 dsrbytes = 0; 283 dsrbytes = 0;
314 cbrs = 0; 284 cbrs = 0;
@@ -372,7 +342,6 @@ static int __init gru_init(void)
372{ 342{
373 int ret, irq, chip; 343 int ret, irq, chip;
374 char id[10]; 344 char id[10];
375 void *gru_start_vaddr;
376 345
377 if (!is_uv_system()) 346 if (!is_uv_system())
378 return 0; 347 return 0;
@@ -422,6 +391,7 @@ static int __init gru_init(void)
422 printk(KERN_ERR "%s: init tables failed\n", GRU_DRIVER_ID_STR); 391 printk(KERN_ERR "%s: init tables failed\n", GRU_DRIVER_ID_STR);
423 goto exit3; 392 goto exit3;
424 } 393 }
394 gru_kservices_init();
425 395
426 printk(KERN_INFO "%s: v%s\n", GRU_DRIVER_ID_STR, 396 printk(KERN_INFO "%s: v%s\n", GRU_DRIVER_ID_STR,
427 GRU_DRIVER_VERSION_STR); 397 GRU_DRIVER_VERSION_STR);
@@ -440,7 +410,7 @@ exit1:
440 410
441static void __exit gru_exit(void) 411static void __exit gru_exit(void)
442{ 412{
443 int i, bid, gid; 413 int i, bid;
444 int order = get_order(sizeof(struct gru_state) * 414 int order = get_order(sizeof(struct gru_state) *
445 GRU_CHIPLETS_PER_BLADE); 415 GRU_CHIPLETS_PER_BLADE);
446 416
@@ -449,10 +419,7 @@ static void __exit gru_exit(void)
449 419
450 for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++) 420 for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++)
451 free_irq(IRQ_GRU + i, NULL); 421 free_irq(IRQ_GRU + i, NULL);
452 422 gru_kservices_exit();
453 foreach_gid(gid)
454 gru_kservices_exit(GID_TO_GRU(gid));
455
456 for (bid = 0; bid < GRU_MAX_BLADES; bid++) 423 for (bid = 0; bid < GRU_MAX_BLADES; bid++)
457 free_pages((unsigned long)gru_base[bid], order); 424 free_pages((unsigned long)gru_base[bid], order);
458 425
diff --git a/drivers/misc/sgi-gru/gruhandles.c b/drivers/misc/sgi-gru/gruhandles.c
index 9b7ccb328697..37e7cfc53b9c 100644
--- a/drivers/misc/sgi-gru/gruhandles.c
+++ b/drivers/misc/sgi-gru/gruhandles.c
@@ -57,7 +57,7 @@ static void start_instruction(void *h)
57static int wait_instruction_complete(void *h, enum mcs_op opc) 57static int wait_instruction_complete(void *h, enum mcs_op opc)
58{ 58{
59 int status; 59 int status;
60 cycles_t start_time = get_cycles(); 60 unsigned long start_time = get_cycles();
61 61
62 while (1) { 62 while (1) {
63 cpu_relax(); 63 cpu_relax();
@@ -65,25 +65,16 @@ static int wait_instruction_complete(void *h, enum mcs_op opc)
65 if (status != CCHSTATUS_ACTIVE) 65 if (status != CCHSTATUS_ACTIVE)
66 break; 66 break;
67 if (GRU_OPERATION_TIMEOUT < (get_cycles() - start_time)) 67 if (GRU_OPERATION_TIMEOUT < (get_cycles() - start_time))
68 panic("GRU %p is malfunctioning\n", h); 68 panic("GRU %p is malfunctioning: start %ld, end %ld\n",
69 h, start_time, (unsigned long)get_cycles());
69 } 70 }
70 if (gru_options & OPT_STATS) 71 if (gru_options & OPT_STATS)
71 update_mcs_stats(opc, get_cycles() - start_time); 72 update_mcs_stats(opc, get_cycles() - start_time);
72 return status; 73 return status;
73} 74}
74 75
75int cch_allocate(struct gru_context_configuration_handle *cch, 76int cch_allocate(struct gru_context_configuration_handle *cch)
76 int asidval, int sizeavail, unsigned long cbrmap,
77 unsigned long dsrmap)
78{ 77{
79 int i;
80
81 for (i = 0; i < 8; i++) {
82 cch->asid[i] = (asidval++);
83 cch->sizeavail[i] = sizeavail;
84 }
85 cch->dsr_allocation_map = dsrmap;
86 cch->cbr_allocation_map = cbrmap;
87 cch->opc = CCHOP_ALLOCATE; 78 cch->opc = CCHOP_ALLOCATE;
88 start_instruction(cch); 79 start_instruction(cch);
89 return wait_instruction_complete(cch, cchop_allocate); 80 return wait_instruction_complete(cch, cchop_allocate);
diff --git a/drivers/misc/sgi-gru/gruhandles.h b/drivers/misc/sgi-gru/gruhandles.h
index 1ed74d7508c8..f44112242d00 100644
--- a/drivers/misc/sgi-gru/gruhandles.h
+++ b/drivers/misc/sgi-gru/gruhandles.h
@@ -39,7 +39,6 @@
39#define GRU_NUM_CBE 128 39#define GRU_NUM_CBE 128
40#define GRU_NUM_TFH 128 40#define GRU_NUM_TFH 128
41#define GRU_NUM_CCH 16 41#define GRU_NUM_CCH 16
42#define GRU_NUM_GSH 1
43 42
44/* Maximum resource counts that can be reserved by user programs */ 43/* Maximum resource counts that can be reserved by user programs */
45#define GRU_NUM_USER_CBR GRU_NUM_CBE 44#define GRU_NUM_USER_CBR GRU_NUM_CBE
@@ -56,7 +55,6 @@
56#define GRU_CBE_BASE (GRU_MCS_BASE + 0x10000) 55#define GRU_CBE_BASE (GRU_MCS_BASE + 0x10000)
57#define GRU_TFH_BASE (GRU_MCS_BASE + 0x18000) 56#define GRU_TFH_BASE (GRU_MCS_BASE + 0x18000)
58#define GRU_CCH_BASE (GRU_MCS_BASE + 0x20000) 57#define GRU_CCH_BASE (GRU_MCS_BASE + 0x20000)
59#define GRU_GSH_BASE (GRU_MCS_BASE + 0x30000)
60 58
61/* User gseg constants */ 59/* User gseg constants */
62#define GRU_GSEG_STRIDE (4 * 1024 * 1024) 60#define GRU_GSEG_STRIDE (4 * 1024 * 1024)
@@ -251,15 +249,15 @@ struct gru_tlb_fault_handle {
251 unsigned int fill1:9; 249 unsigned int fill1:9;
252 250
253 unsigned int status:2; 251 unsigned int status:2;
254 unsigned int fill2:1; 252 unsigned int fill2:2;
255 unsigned int color:1;
256 unsigned int state:3; 253 unsigned int state:3;
257 unsigned int fill3:1; 254 unsigned int fill3:1;
258 255
259 unsigned int cause:7; /* DW 0 - high 32 */ 256 unsigned int cause:6;
257 unsigned int cb_int:1;
260 unsigned int fill4:1; 258 unsigned int fill4:1;
261 259
262 unsigned int indexway:12; 260 unsigned int indexway:12; /* DW 0 - high 32 */
263 unsigned int fill5:4; 261 unsigned int fill5:4;
264 262
265 unsigned int ctxnum:4; 263 unsigned int ctxnum:4;
@@ -457,21 +455,7 @@ enum gru_cbr_state {
457 CBRSTATE_BUSY_INTERRUPT, 455 CBRSTATE_BUSY_INTERRUPT,
458}; 456};
459 457
460/* CBE cbrexecstatus bits */ 458/* CBE cbrexecstatus bits - defined in gru_instructions.h*/
461#define CBR_EXS_ABORT_OCC_BIT 0
462#define CBR_EXS_INT_OCC_BIT 1
463#define CBR_EXS_PENDING_BIT 2
464#define CBR_EXS_QUEUED_BIT 3
465#define CBR_EXS_TLBHW_BIT 4
466#define CBR_EXS_EXCEPTION_BIT 5
467
468#define CBR_EXS_ABORT_OCC (1 << CBR_EXS_ABORT_OCC_BIT)
469#define CBR_EXS_INT_OCC (1 << CBR_EXS_INT_OCC_BIT)
470#define CBR_EXS_PENDING (1 << CBR_EXS_PENDING_BIT)
471#define CBR_EXS_QUEUED (1 << CBR_EXS_QUEUED_BIT)
472#define CBR_EXS_TLBHW (1 << CBR_EXS_TLBHW_BIT)
473#define CBR_EXS_EXCEPTION (1 << CBR_EXS_EXCEPTION_BIT)
474
475/* CBE ecause bits - defined in gru_instructions.h */ 459/* CBE ecause bits - defined in gru_instructions.h */
476 460
477/* 461/*
@@ -495,9 +479,7 @@ enum gru_cbr_state {
495/* minimum TLB purge count to ensure a full purge */ 479/* minimum TLB purge count to ensure a full purge */
496#define GRUMAXINVAL 1024UL 480#define GRUMAXINVAL 1024UL
497 481
498int cch_allocate(struct gru_context_configuration_handle *cch, 482int cch_allocate(struct gru_context_configuration_handle *cch);
499 int asidval, int sizeavail, unsigned long cbrmap, unsigned long dsrmap);
500
501int cch_start(struct gru_context_configuration_handle *cch); 483int cch_start(struct gru_context_configuration_handle *cch);
502int cch_interrupt(struct gru_context_configuration_handle *cch); 484int cch_interrupt(struct gru_context_configuration_handle *cch);
503int cch_deallocate(struct gru_context_configuration_handle *cch); 485int cch_deallocate(struct gru_context_configuration_handle *cch);
diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c
new file mode 100644
index 000000000000..55eabfa85585
--- /dev/null
+++ b/drivers/misc/sgi-gru/grukdump.c
@@ -0,0 +1,232 @@
1/*
2 * SN Platform GRU Driver
3 *
4 * Dump GRU State
5 *
6 * Copyright (c) 2008 Silicon Graphics, Inc. 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,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/kernel.h>
24#include <linux/mm.h>
25#include <linux/spinlock.h>
26#include <linux/uaccess.h>
27#include <linux/delay.h>
28#include <linux/bitops.h>
29#include <asm/uv/uv_hub.h>
30#include "gru.h"
31#include "grutables.h"
32#include "gruhandles.h"
33#include "grulib.h"
34
35#define CCH_LOCK_ATTEMPTS 10
36
37static int gru_user_copy_handle(void __user **dp, void *s)
38{
39 if (copy_to_user(*dp, s, GRU_HANDLE_BYTES))
40 return -1;
41 *dp += GRU_HANDLE_BYTES;
42 return 0;
43}
44
45static int gru_dump_context_data(void *grubase,
46 struct gru_context_configuration_handle *cch,
47 void __user *ubuf, int ctxnum, int dsrcnt)
48{
49 void *cb, *cbe, *tfh, *gseg;
50 int i, scr;
51
52 gseg = grubase + ctxnum * GRU_GSEG_STRIDE;
53 cb = gseg + GRU_CB_BASE;
54 cbe = grubase + GRU_CBE_BASE;
55 tfh = grubase + GRU_TFH_BASE;
56
57 for_each_cbr_in_allocation_map(i, &cch->cbr_allocation_map, scr) {
58 if (gru_user_copy_handle(&ubuf, cb))
59 goto fail;
60 if (gru_user_copy_handle(&ubuf, tfh + i * GRU_HANDLE_STRIDE))
61 goto fail;
62 if (gru_user_copy_handle(&ubuf, cbe + i * GRU_HANDLE_STRIDE))
63 goto fail;
64 cb += GRU_HANDLE_STRIDE;
65 }
66 if (dsrcnt)
67 memcpy(ubuf, gseg + GRU_DS_BASE, dsrcnt * GRU_HANDLE_STRIDE);
68 return 0;
69
70fail:
71 return -EFAULT;
72}
73
74static int gru_dump_tfm(struct gru_state *gru,
75 void __user *ubuf, void __user *ubufend)
76{
77 struct gru_tlb_fault_map *tfm;
78 int i, ret, bytes;
79
80 bytes = GRU_NUM_TFM * GRU_CACHE_LINE_BYTES;
81 if (bytes > ubufend - ubuf)
82 ret = -EFBIG;
83
84 for (i = 0; i < GRU_NUM_TFM; i++) {
85 tfm = get_tfm(gru->gs_gru_base_vaddr, i);
86 if (gru_user_copy_handle(&ubuf, tfm))
87 goto fail;
88 }
89 return GRU_NUM_TFM * GRU_CACHE_LINE_BYTES;
90
91fail:
92 return -EFAULT;
93}
94
95static int gru_dump_tgh(struct gru_state *gru,
96 void __user *ubuf, void __user *ubufend)
97{
98 struct gru_tlb_global_handle *tgh;
99 int i, ret, bytes;
100
101 bytes = GRU_NUM_TGH * GRU_CACHE_LINE_BYTES;
102 if (bytes > ubufend - ubuf)
103 ret = -EFBIG;
104
105 for (i = 0; i < GRU_NUM_TGH; i++) {
106 tgh = get_tgh(gru->gs_gru_base_vaddr, i);
107 if (gru_user_copy_handle(&ubuf, tgh))
108 goto fail;
109 }
110 return GRU_NUM_TGH * GRU_CACHE_LINE_BYTES;
111
112fail:
113 return -EFAULT;
114}
115
116static int gru_dump_context(struct gru_state *gru, int ctxnum,
117 void __user *ubuf, void __user *ubufend, char data_opt,
118 char lock_cch)
119{
120 struct gru_dump_context_header hdr;
121 struct gru_dump_context_header __user *uhdr = ubuf;
122 struct gru_context_configuration_handle *cch, *ubufcch;
123 struct gru_thread_state *gts;
124 int try, cch_locked, cbrcnt = 0, dsrcnt = 0, bytes = 0, ret = 0;
125 void *grubase;
126
127 memset(&hdr, 0, sizeof(hdr));
128 grubase = gru->gs_gru_base_vaddr;
129 cch = get_cch(grubase, ctxnum);
130 for (try = 0; try < CCH_LOCK_ATTEMPTS; try++) {
131 cch_locked = trylock_cch_handle(cch);
132 if (cch_locked)
133 break;
134 msleep(1);
135 }
136
137 ubuf += sizeof(hdr);
138 ubufcch = ubuf;
139 if (gru_user_copy_handle(&ubuf, cch))
140 goto fail;
141 if (cch_locked)
142 ubufcch->delresp = 0;
143 bytes = sizeof(hdr) + GRU_CACHE_LINE_BYTES;
144
145 if (cch_locked || !lock_cch) {
146 gts = gru->gs_gts[ctxnum];
147 if (gts && gts->ts_vma) {
148 hdr.pid = gts->ts_tgid_owner;
149 hdr.vaddr = gts->ts_vma->vm_start;
150 }
151 if (cch->state != CCHSTATE_INACTIVE) {
152 cbrcnt = hweight64(cch->cbr_allocation_map) *
153 GRU_CBR_AU_SIZE;
154 dsrcnt = data_opt ? hweight32(cch->dsr_allocation_map) *
155 GRU_DSR_AU_CL : 0;
156 }
157 bytes += (3 * cbrcnt + dsrcnt) * GRU_CACHE_LINE_BYTES;
158 if (bytes > ubufend - ubuf)
159 ret = -EFBIG;
160 else
161 ret = gru_dump_context_data(grubase, cch, ubuf, ctxnum,
162 dsrcnt);
163
164 }
165 if (cch_locked)
166 unlock_cch_handle(cch);
167 if (ret)
168 return ret;
169
170 hdr.magic = GRU_DUMP_MAGIC;
171 hdr.gid = gru->gs_gid;
172 hdr.ctxnum = ctxnum;
173 hdr.cbrcnt = cbrcnt;
174 hdr.dsrcnt = dsrcnt;
175 hdr.cch_locked = cch_locked;
176 if (!ret && copy_to_user((void __user *)uhdr, &hdr, sizeof(hdr)))
177 ret = -EFAULT;
178
179 return ret ? ret : bytes;
180
181fail:
182 unlock_cch_handle(cch);
183 return -EFAULT;
184}
185
186int gru_dump_chiplet_request(unsigned long arg)
187{
188 struct gru_state *gru;
189 struct gru_dump_chiplet_state_req req;
190 void __user *ubuf;
191 void __user *ubufend;
192 int ctxnum, ret, cnt = 0;
193
194 if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
195 return -EFAULT;
196
197 /* Currently, only dump by gid is implemented */
198 if (req.gid >= gru_max_gids || req.gid < 0)
199 return -EINVAL;
200
201 gru = GID_TO_GRU(req.gid);
202 ubuf = req.buf;
203 ubufend = req.buf + req.buflen;
204
205 ret = gru_dump_tfm(gru, ubuf, ubufend);
206 if (ret < 0)
207 goto fail;
208 ubuf += ret;
209
210 ret = gru_dump_tgh(gru, ubuf, ubufend);
211 if (ret < 0)
212 goto fail;
213 ubuf += ret;
214
215 for (ctxnum = 0; ctxnum < GRU_NUM_CCH; ctxnum++) {
216 if (req.ctxnum == ctxnum || req.ctxnum < 0) {
217 ret = gru_dump_context(gru, ctxnum, ubuf, ubufend,
218 req.data_opt, req.lock_cch);
219 if (ret < 0)
220 goto fail;
221 ubuf += ret;
222 cnt++;
223 }
224 }
225
226 if (copy_to_user((void __user *)arg, &req, sizeof(req)))
227 return -EFAULT;
228 return cnt;
229
230fail:
231 return ret;
232}
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
index d8bd7d84a7cf..eedbf9c32760 100644
--- a/drivers/misc/sgi-gru/grukservices.c
+++ b/drivers/misc/sgi-gru/grukservices.c
@@ -31,6 +31,7 @@
31#include <linux/proc_fs.h> 31#include <linux/proc_fs.h>
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/uaccess.h> 33#include <linux/uaccess.h>
34#include <linux/delay.h>
34#include "gru.h" 35#include "gru.h"
35#include "grulib.h" 36#include "grulib.h"
36#include "grutables.h" 37#include "grutables.h"
@@ -45,18 +46,66 @@
45 * resources. This will likely be replaced when we better understand the 46 * resources. This will likely be replaced when we better understand the
46 * kernel/user requirements. 47 * kernel/user requirements.
47 * 48 *
48 * At boot time, the kernel permanently reserves a fixed number of 49 * Blade percpu resources reserved for kernel use. These resources are
49 * CBRs/DSRs for each cpu to use. The resources are all taken from 50 * reserved whenever the the kernel context for the blade is loaded. Note
50 * the GRU chiplet 1 on the blade. This leaves the full set of resources 51 * that the kernel context is not guaranteed to be always available. It is
51 * of chiplet 0 available to be allocated to a single user. 52 * loaded on demand & can be stolen by a user if the user demand exceeds the
53 * kernel demand. The kernel can always reload the kernel context but
54 * a SLEEP may be required!!!.
55 *
56 * Async Overview:
57 *
58 * Each blade has one "kernel context" that owns GRU kernel resources
59 * located on the blade. Kernel drivers use GRU resources in this context
60 * for sending messages, zeroing memory, etc.
61 *
62 * The kernel context is dynamically loaded on demand. If it is not in
63 * use by the kernel, the kernel context can be unloaded & given to a user.
64 * The kernel context will be reloaded when needed. This may require that
65 * a context be stolen from a user.
66 * NOTE: frequent unloading/reloading of the kernel context is
67 * expensive. We are depending on batch schedulers, cpusets, sane
68 * drivers or some other mechanism to prevent the need for frequent
69 * stealing/reloading.
70 *
71 * The kernel context consists of two parts:
72 * - 1 CB & a few DSRs that are reserved for each cpu on the blade.
73 * Each cpu has it's own private resources & does not share them
74 * with other cpus. These resources are used serially, ie,
75 * locked, used & unlocked on each call to a function in
76 * grukservices.
77 * (Now that we have dynamic loading of kernel contexts, I
78 * may rethink this & allow sharing between cpus....)
79 *
80 * - Additional resources can be reserved long term & used directly
81 * by UV drivers located in the kernel. Drivers using these GRU
82 * resources can use asynchronous GRU instructions that send
83 * interrupts on completion.
84 * - these resources must be explicitly locked/unlocked
85 * - locked resources prevent (obviously) the kernel
86 * context from being unloaded.
87 * - drivers using these resource directly issue their own
88 * GRU instruction and must wait/check completion.
89 *
90 * When these resources are reserved, the caller can optionally
91 * associate a wait_queue with the resources and use asynchronous
92 * GRU instructions. When an async GRU instruction completes, the
93 * driver will do a wakeup on the event.
94 *
52 */ 95 */
53 96
54/* Blade percpu resources PERMANENTLY reserved for kernel use */ 97
98#define ASYNC_HAN_TO_BID(h) ((h) - 1)
99#define ASYNC_BID_TO_HAN(b) ((b) + 1)
100#define ASYNC_HAN_TO_BS(h) gru_base[ASYNC_HAN_TO_BID(h)]
101#define KCB_TO_GID(cb) ((cb - gru_start_vaddr) / \
102 (GRU_SIZE * GRU_CHIPLETS_PER_BLADE))
103#define KCB_TO_BS(cb) gru_base[KCB_TO_GID(cb)]
104
55#define GRU_NUM_KERNEL_CBR 1 105#define GRU_NUM_KERNEL_CBR 1
56#define GRU_NUM_KERNEL_DSR_BYTES 256 106#define GRU_NUM_KERNEL_DSR_BYTES 256
57#define GRU_NUM_KERNEL_DSR_CL (GRU_NUM_KERNEL_DSR_BYTES / \ 107#define GRU_NUM_KERNEL_DSR_CL (GRU_NUM_KERNEL_DSR_BYTES / \
58 GRU_CACHE_LINE_BYTES) 108 GRU_CACHE_LINE_BYTES)
59#define KERNEL_CTXNUM 15
60 109
61/* GRU instruction attributes for all instructions */ 110/* GRU instruction attributes for all instructions */
62#define IMA IMA_CB_DELAY 111#define IMA IMA_CB_DELAY
@@ -98,6 +147,108 @@ struct message_header {
98 147
99#define HSTATUS(mq, h) ((mq) + offsetof(struct message_queue, hstatus[h])) 148#define HSTATUS(mq, h) ((mq) + offsetof(struct message_queue, hstatus[h]))
100 149
150/*
151 * Reload the blade's kernel context into a GRU chiplet. Called holding
152 * the bs_kgts_sema for READ. Will steal user contexts if necessary.
153 */
154static void gru_load_kernel_context(struct gru_blade_state *bs, int blade_id)
155{
156 struct gru_state *gru;
157 struct gru_thread_state *kgts;
158 void *vaddr;
159 int ctxnum, ncpus;
160
161 up_read(&bs->bs_kgts_sema);
162 down_write(&bs->bs_kgts_sema);
163
164 if (!bs->bs_kgts)
165 bs->bs_kgts = gru_alloc_gts(NULL, 0, 0, 0, 0);
166 kgts = bs->bs_kgts;
167
168 if (!kgts->ts_gru) {
169 STAT(load_kernel_context);
170 ncpus = uv_blade_nr_possible_cpus(blade_id);
171 kgts->ts_cbr_au_count = GRU_CB_COUNT_TO_AU(
172 GRU_NUM_KERNEL_CBR * ncpus + bs->bs_async_cbrs);
173 kgts->ts_dsr_au_count = GRU_DS_BYTES_TO_AU(
174 GRU_NUM_KERNEL_DSR_BYTES * ncpus +
175 bs->bs_async_dsr_bytes);
176 while (!gru_assign_gru_context(kgts, blade_id)) {
177 msleep(1);
178 gru_steal_context(kgts, blade_id);
179 }
180 gru_load_context(kgts);
181 gru = bs->bs_kgts->ts_gru;
182 vaddr = gru->gs_gru_base_vaddr;
183 ctxnum = kgts->ts_ctxnum;
184 bs->kernel_cb = get_gseg_base_address_cb(vaddr, ctxnum, 0);
185 bs->kernel_dsr = get_gseg_base_address_ds(vaddr, ctxnum, 0);
186 }
187 downgrade_write(&bs->bs_kgts_sema);
188}
189
190/*
191 * Free all kernel contexts that are not currently in use.
192 * Returns 0 if all freed, else number of inuse context.
193 */
194static int gru_free_kernel_contexts(void)
195{
196 struct gru_blade_state *bs;
197 struct gru_thread_state *kgts;
198 int bid, ret = 0;
199
200 for (bid = 0; bid < GRU_MAX_BLADES; bid++) {
201 bs = gru_base[bid];
202 if (!bs)
203 continue;
204 if (down_write_trylock(&bs->bs_kgts_sema)) {
205 kgts = bs->bs_kgts;
206 if (kgts && kgts->ts_gru)
207 gru_unload_context(kgts, 0);
208 kfree(kgts);
209 bs->bs_kgts = NULL;
210 up_write(&bs->bs_kgts_sema);
211 } else {
212 ret++;
213 }
214 }
215 return ret;
216}
217
218/*
219 * Lock & load the kernel context for the specified blade.
220 */
221static struct gru_blade_state *gru_lock_kernel_context(int blade_id)
222{
223 struct gru_blade_state *bs;
224
225 STAT(lock_kernel_context);
226 bs = gru_base[blade_id];
227
228 down_read(&bs->bs_kgts_sema);
229 if (!bs->bs_kgts || !bs->bs_kgts->ts_gru)
230 gru_load_kernel_context(bs, blade_id);
231 return bs;
232
233}
234
235/*
236 * Unlock the kernel context for the specified blade. Context is not
237 * unloaded but may be stolen before next use.
238 */
239static void gru_unlock_kernel_context(int blade_id)
240{
241 struct gru_blade_state *bs;
242
243 bs = gru_base[blade_id];
244 up_read(&bs->bs_kgts_sema);
245 STAT(unlock_kernel_context);
246}
247
248/*
249 * Reserve & get pointers to the DSR/CBRs reserved for the current cpu.
250 * - returns with preemption disabled
251 */
101static int gru_get_cpu_resources(int dsr_bytes, void **cb, void **dsr) 252static int gru_get_cpu_resources(int dsr_bytes, void **cb, void **dsr)
102{ 253{
103 struct gru_blade_state *bs; 254 struct gru_blade_state *bs;
@@ -105,30 +256,148 @@ static int gru_get_cpu_resources(int dsr_bytes, void **cb, void **dsr)
105 256
106 BUG_ON(dsr_bytes > GRU_NUM_KERNEL_DSR_BYTES); 257 BUG_ON(dsr_bytes > GRU_NUM_KERNEL_DSR_BYTES);
107 preempt_disable(); 258 preempt_disable();
108 bs = gru_base[uv_numa_blade_id()]; 259 bs = gru_lock_kernel_context(uv_numa_blade_id());
109 lcpu = uv_blade_processor_id(); 260 lcpu = uv_blade_processor_id();
110 *cb = bs->kernel_cb + lcpu * GRU_HANDLE_STRIDE; 261 *cb = bs->kernel_cb + lcpu * GRU_HANDLE_STRIDE;
111 *dsr = bs->kernel_dsr + lcpu * GRU_NUM_KERNEL_DSR_BYTES; 262 *dsr = bs->kernel_dsr + lcpu * GRU_NUM_KERNEL_DSR_BYTES;
112 return 0; 263 return 0;
113} 264}
114 265
266/*
267 * Free the current cpus reserved DSR/CBR resources.
268 */
115static void gru_free_cpu_resources(void *cb, void *dsr) 269static void gru_free_cpu_resources(void *cb, void *dsr)
116{ 270{
271 gru_unlock_kernel_context(uv_numa_blade_id());
117 preempt_enable(); 272 preempt_enable();
118} 273}
119 274
275/*
276 * Reserve GRU resources to be used asynchronously.
277 * Note: currently supports only 1 reservation per blade.
278 *
279 * input:
280 * blade_id - blade on which resources should be reserved
281 * cbrs - number of CBRs
282 * dsr_bytes - number of DSR bytes needed
283 * output:
284 * handle to identify resource
285 * (0 = async resources already reserved)
286 */
287unsigned long gru_reserve_async_resources(int blade_id, int cbrs, int dsr_bytes,
288 struct completion *cmp)
289{
290 struct gru_blade_state *bs;
291 struct gru_thread_state *kgts;
292 int ret = 0;
293
294 bs = gru_base[blade_id];
295
296 down_write(&bs->bs_kgts_sema);
297
298 /* Verify no resources already reserved */
299 if (bs->bs_async_dsr_bytes + bs->bs_async_cbrs)
300 goto done;
301 bs->bs_async_dsr_bytes = dsr_bytes;
302 bs->bs_async_cbrs = cbrs;
303 bs->bs_async_wq = cmp;
304 kgts = bs->bs_kgts;
305
306 /* Resources changed. Unload context if already loaded */
307 if (kgts && kgts->ts_gru)
308 gru_unload_context(kgts, 0);
309 ret = ASYNC_BID_TO_HAN(blade_id);
310
311done:
312 up_write(&bs->bs_kgts_sema);
313 return ret;
314}
315
316/*
317 * Release async resources previously reserved.
318 *
319 * input:
320 * han - handle to identify resources
321 */
322void gru_release_async_resources(unsigned long han)
323{
324 struct gru_blade_state *bs = ASYNC_HAN_TO_BS(han);
325
326 down_write(&bs->bs_kgts_sema);
327 bs->bs_async_dsr_bytes = 0;
328 bs->bs_async_cbrs = 0;
329 bs->bs_async_wq = NULL;
330 up_write(&bs->bs_kgts_sema);
331}
332
333/*
334 * Wait for async GRU instructions to complete.
335 *
336 * input:
337 * han - handle to identify resources
338 */
339void gru_wait_async_cbr(unsigned long han)
340{
341 struct gru_blade_state *bs = ASYNC_HAN_TO_BS(han);
342
343 wait_for_completion(bs->bs_async_wq);
344 mb();
345}
346
347/*
348 * Lock previous reserved async GRU resources
349 *
350 * input:
351 * han - handle to identify resources
352 * output:
353 * cb - pointer to first CBR
354 * dsr - pointer to first DSR
355 */
356void gru_lock_async_resource(unsigned long han, void **cb, void **dsr)
357{
358 struct gru_blade_state *bs = ASYNC_HAN_TO_BS(han);
359 int blade_id = ASYNC_HAN_TO_BID(han);
360 int ncpus;
361
362 gru_lock_kernel_context(blade_id);
363 ncpus = uv_blade_nr_possible_cpus(blade_id);
364 if (cb)
365 *cb = bs->kernel_cb + ncpus * GRU_HANDLE_STRIDE;
366 if (dsr)
367 *dsr = bs->kernel_dsr + ncpus * GRU_NUM_KERNEL_DSR_BYTES;
368}
369
370/*
371 * Unlock previous reserved async GRU resources
372 *
373 * input:
374 * han - handle to identify resources
375 */
376void gru_unlock_async_resource(unsigned long han)
377{
378 int blade_id = ASYNC_HAN_TO_BID(han);
379
380 gru_unlock_kernel_context(blade_id);
381}
382
383/*----------------------------------------------------------------------*/
120int gru_get_cb_exception_detail(void *cb, 384int gru_get_cb_exception_detail(void *cb,
121 struct control_block_extended_exc_detail *excdet) 385 struct control_block_extended_exc_detail *excdet)
122{ 386{
123 struct gru_control_block_extended *cbe; 387 struct gru_control_block_extended *cbe;
388 struct gru_blade_state *bs;
389 int cbrnum;
124 390
125 cbe = get_cbe(GRUBASE(cb), get_cb_number(cb)); 391 bs = KCB_TO_BS(cb);
126 prefetchw(cbe); /* Harmless on hardware, required for emulator */ 392 cbrnum = thread_cbr_number(bs->bs_kgts, get_cb_number(cb));
393 cbe = get_cbe(GRUBASE(cb), cbrnum);
394 gru_flush_cache(cbe); /* CBE not coherent */
127 excdet->opc = cbe->opccpy; 395 excdet->opc = cbe->opccpy;
128 excdet->exopc = cbe->exopccpy; 396 excdet->exopc = cbe->exopccpy;
129 excdet->ecause = cbe->ecause; 397 excdet->ecause = cbe->ecause;
130 excdet->exceptdet0 = cbe->idef1upd; 398 excdet->exceptdet0 = cbe->idef1upd;
131 excdet->exceptdet1 = cbe->idef3upd; 399 excdet->exceptdet1 = cbe->idef3upd;
400 gru_flush_cache(cbe);
132 return 0; 401 return 0;
133} 402}
134 403
@@ -167,13 +436,13 @@ static int gru_retry_exception(void *cb)
167 int retry = EXCEPTION_RETRY_LIMIT; 436 int retry = EXCEPTION_RETRY_LIMIT;
168 437
169 while (1) { 438 while (1) {
170 if (gru_get_cb_message_queue_substatus(cb))
171 break;
172 if (gru_wait_idle_or_exception(gen) == CBS_IDLE) 439 if (gru_wait_idle_or_exception(gen) == CBS_IDLE)
173 return CBS_IDLE; 440 return CBS_IDLE;
174 441 if (gru_get_cb_message_queue_substatus(cb))
442 return CBS_EXCEPTION;
175 gru_get_cb_exception_detail(cb, &excdet); 443 gru_get_cb_exception_detail(cb, &excdet);
176 if (excdet.ecause & ~EXCEPTION_RETRY_BITS) 444 if ((excdet.ecause & ~EXCEPTION_RETRY_BITS) ||
445 (excdet.cbrexecstatus & CBR_EXS_ABORT_OCC))
177 break; 446 break;
178 if (retry-- == 0) 447 if (retry-- == 0)
179 break; 448 break;
@@ -416,6 +685,29 @@ static void send_message_queue_interrupt(struct gru_message_queue_desc *mqd)
416 mqd->interrupt_vector); 685 mqd->interrupt_vector);
417} 686}
418 687
688/*
689 * Handle a PUT failure. Note: if message was a 2-line message, one of the
690 * lines might have successfully have been written. Before sending the
691 * message, "present" must be cleared in BOTH lines to prevent the receiver
692 * from prematurely seeing the full message.
693 */
694static int send_message_put_nacked(void *cb, struct gru_message_queue_desc *mqd,
695 void *mesg, int lines)
696{
697 unsigned long m;
698
699 m = mqd->mq_gpa + (gru_get_amo_value_head(cb) << 6);
700 if (lines == 2) {
701 gru_vset(cb, m, 0, XTYPE_CL, lines, 1, IMA);
702 if (gru_wait(cb) != CBS_IDLE)
703 return MQE_UNEXPECTED_CB_ERR;
704 }
705 gru_vstore(cb, m, gru_get_tri(mesg), XTYPE_CL, lines, 1, IMA);
706 if (gru_wait(cb) != CBS_IDLE)
707 return MQE_UNEXPECTED_CB_ERR;
708 send_message_queue_interrupt(mqd);
709 return MQE_OK;
710}
419 711
420/* 712/*
421 * Handle a gru_mesq failure. Some of these failures are software recoverable 713 * Handle a gru_mesq failure. Some of these failures are software recoverable
@@ -425,7 +717,6 @@ static int send_message_failure(void *cb, struct gru_message_queue_desc *mqd,
425 void *mesg, int lines) 717 void *mesg, int lines)
426{ 718{
427 int substatus, ret = 0; 719 int substatus, ret = 0;
428 unsigned long m;
429 720
430 substatus = gru_get_cb_message_queue_substatus(cb); 721 substatus = gru_get_cb_message_queue_substatus(cb);
431 switch (substatus) { 722 switch (substatus) {
@@ -447,14 +738,7 @@ static int send_message_failure(void *cb, struct gru_message_queue_desc *mqd,
447 break; 738 break;
448 case CBSS_PUT_NACKED: 739 case CBSS_PUT_NACKED:
449 STAT(mesq_send_put_nacked); 740 STAT(mesq_send_put_nacked);
450 m = mqd->mq_gpa + (gru_get_amo_value_head(cb) << 6); 741 ret = send_message_put_nacked(cb, mqd, mesg, lines);
451 gru_vstore(cb, m, gru_get_tri(mesg), XTYPE_CL, lines, 1, IMA);
452 if (gru_wait(cb) == CBS_IDLE) {
453 ret = MQE_OK;
454 send_message_queue_interrupt(mqd);
455 } else {
456 ret = MQE_UNEXPECTED_CB_ERR;
457 }
458 break; 742 break;
459 default: 743 default:
460 BUG(); 744 BUG();
@@ -597,115 +881,177 @@ EXPORT_SYMBOL_GPL(gru_copy_gpa);
597 881
598/* ------------------- KERNEL QUICKTESTS RUN AT STARTUP ----------------*/ 882/* ------------------- KERNEL QUICKTESTS RUN AT STARTUP ----------------*/
599/* Temp - will delete after we gain confidence in the GRU */ 883/* Temp - will delete after we gain confidence in the GRU */
600static __cacheline_aligned unsigned long word0;
601static __cacheline_aligned unsigned long word1;
602 884
603static int quicktest(struct gru_state *gru) 885static int quicktest0(unsigned long arg)
604{ 886{
887 unsigned long word0;
888 unsigned long word1;
605 void *cb; 889 void *cb;
606 void *ds; 890 void *dsr;
607 unsigned long *p; 891 unsigned long *p;
892 int ret = -EIO;
608 893
609 cb = get_gseg_base_address_cb(gru->gs_gru_base_vaddr, KERNEL_CTXNUM, 0); 894 if (gru_get_cpu_resources(GRU_CACHE_LINE_BYTES, &cb, &dsr))
610 ds = get_gseg_base_address_ds(gru->gs_gru_base_vaddr, KERNEL_CTXNUM, 0); 895 return MQE_BUG_NO_RESOURCES;
611 p = ds; 896 p = dsr;
612 word0 = MAGIC; 897 word0 = MAGIC;
898 word1 = 0;
613 899
614 gru_vload(cb, uv_gpa(&word0), 0, XTYPE_DW, 1, 1, IMA); 900 gru_vload(cb, uv_gpa(&word0), gru_get_tri(dsr), XTYPE_DW, 1, 1, IMA);
615 if (gru_wait(cb) != CBS_IDLE) 901 if (gru_wait(cb) != CBS_IDLE) {
616 BUG(); 902 printk(KERN_DEBUG "GRU quicktest0: CBR failure 1\n");
903 goto done;
904 }
617 905
618 if (*(unsigned long *)ds != MAGIC) 906 if (*p != MAGIC) {
619 BUG(); 907 printk(KERN_DEBUG "GRU: quicktest0 bad magic 0x%lx\n", *p);
620 gru_vstore(cb, uv_gpa(&word1), 0, XTYPE_DW, 1, 1, IMA); 908 goto done;
621 if (gru_wait(cb) != CBS_IDLE) 909 }
622 BUG(); 910 gru_vstore(cb, uv_gpa(&word1), gru_get_tri(dsr), XTYPE_DW, 1, 1, IMA);
911 if (gru_wait(cb) != CBS_IDLE) {
912 printk(KERN_DEBUG "GRU quicktest0: CBR failure 2\n");
913 goto done;
914 }
623 915
624 if (word0 != word1 || word0 != MAGIC) { 916 if (word0 != word1 || word1 != MAGIC) {
625 printk 917 printk(KERN_DEBUG
626 ("GRU quicktest err: gid %d, found 0x%lx, expected 0x%lx\n", 918 "GRU quicktest0 err: found 0x%lx, expected 0x%lx\n",
627 gru->gs_gid, word1, MAGIC); 919 word1, MAGIC);
628 BUG(); /* ZZZ should not be fatal */ 920 goto done;
629 } 921 }
922 ret = 0;
630 923
631 return 0; 924done:
925 gru_free_cpu_resources(cb, dsr);
926 return ret;
632} 927}
633 928
929#define ALIGNUP(p, q) ((void *)(((unsigned long)(p) + (q) - 1) & ~(q - 1)))
634 930
635int gru_kservices_init(struct gru_state *gru) 931static int quicktest1(unsigned long arg)
636{ 932{
637 struct gru_blade_state *bs; 933 struct gru_message_queue_desc mqd;
638 struct gru_context_configuration_handle *cch; 934 void *p, *mq;
639 unsigned long cbr_map, dsr_map; 935 unsigned long *dw;
640 int err, num, cpus_possible; 936 int i, ret = -EIO;
641 937 char mes[GRU_CACHE_LINE_BYTES], *m;
642 /* 938
643 * Currently, resources are reserved ONLY on the second chiplet 939 /* Need 1K cacheline aligned that does not cross page boundary */
644 * on each blade. This leaves ALL resources on chiplet 0 available 940 p = kmalloc(4096, 0);
645 * for user code. 941 mq = ALIGNUP(p, 1024);
646 */ 942 memset(mes, 0xee, sizeof(mes));
647 bs = gru->gs_blade; 943 dw = mq;
648 if (gru != &bs->bs_grus[1]) 944
649 return 0; 945 gru_create_message_queue(&mqd, mq, 8 * GRU_CACHE_LINE_BYTES, 0, 0, 0);
650 946 for (i = 0; i < 6; i++) {
651 cpus_possible = uv_blade_nr_possible_cpus(gru->gs_blade_id); 947 mes[8] = i;
652 948 do {
653 num = GRU_NUM_KERNEL_CBR * cpus_possible; 949 ret = gru_send_message_gpa(&mqd, mes, sizeof(mes));
654 cbr_map = gru_reserve_cb_resources(gru, GRU_CB_COUNT_TO_AU(num), NULL); 950 } while (ret == MQE_CONGESTION);
655 gru->gs_reserved_cbrs += num; 951 if (ret)
656 952 break;
657 num = GRU_NUM_KERNEL_DSR_BYTES * cpus_possible;
658 dsr_map = gru_reserve_ds_resources(gru, GRU_DS_BYTES_TO_AU(num), NULL);
659 gru->gs_reserved_dsr_bytes += num;
660
661 gru->gs_active_contexts++;
662 __set_bit(KERNEL_CTXNUM, &gru->gs_context_map);
663 cch = get_cch(gru->gs_gru_base_vaddr, KERNEL_CTXNUM);
664
665 bs->kernel_cb = get_gseg_base_address_cb(gru->gs_gru_base_vaddr,
666 KERNEL_CTXNUM, 0);
667 bs->kernel_dsr = get_gseg_base_address_ds(gru->gs_gru_base_vaddr,
668 KERNEL_CTXNUM, 0);
669
670 lock_cch_handle(cch);
671 cch->tfm_fault_bit_enable = 0;
672 cch->tlb_int_enable = 0;
673 cch->tfm_done_bit_enable = 0;
674 cch->unmap_enable = 1;
675 err = cch_allocate(cch, 0, 0, cbr_map, dsr_map);
676 if (err) {
677 gru_dbg(grudev,
678 "Unable to allocate kernel CCH: gid %d, err %d\n",
679 gru->gs_gid, err);
680 BUG();
681 } 953 }
682 if (cch_start(cch)) { 954 if (ret != MQE_QUEUE_FULL || i != 4)
683 gru_dbg(grudev, "Unable to start kernel CCH: gid %d, err %d\n", 955 goto done;
684 gru->gs_gid, err); 956
685 BUG(); 957 for (i = 0; i < 6; i++) {
958 m = gru_get_next_message(&mqd);
959 if (!m || m[8] != i)
960 break;
961 gru_free_message(&mqd, m);
686 } 962 }
687 unlock_cch_handle(cch); 963 ret = (i == 4) ? 0 : -EIO;
688 964
689 if (gru_options & GRU_QUICKLOOK) 965done:
690 quicktest(gru); 966 kfree(p);
691 return 0; 967 return ret;
692} 968}
693 969
694void gru_kservices_exit(struct gru_state *gru) 970static int quicktest2(unsigned long arg)
695{ 971{
696 struct gru_context_configuration_handle *cch; 972 static DECLARE_COMPLETION(cmp);
697 struct gru_blade_state *bs; 973 unsigned long han;
974 int blade_id = 0;
975 int numcb = 4;
976 int ret = 0;
977 unsigned long *buf;
978 void *cb0, *cb;
979 int i, k, istatus, bytes;
980
981 bytes = numcb * 4 * 8;
982 buf = kmalloc(bytes, GFP_KERNEL);
983 if (!buf)
984 return -ENOMEM;
985
986 ret = -EBUSY;
987 han = gru_reserve_async_resources(blade_id, numcb, 0, &cmp);
988 if (!han)
989 goto done;
990
991 gru_lock_async_resource(han, &cb0, NULL);
992 memset(buf, 0xee, bytes);
993 for (i = 0; i < numcb; i++)
994 gru_vset(cb0 + i * GRU_HANDLE_STRIDE, uv_gpa(&buf[i * 4]), 0,
995 XTYPE_DW, 4, 1, IMA_INTERRUPT);
996
997 ret = 0;
998 for (k = 0; k < numcb; k++) {
999 gru_wait_async_cbr(han);
1000 for (i = 0; i < numcb; i++) {
1001 cb = cb0 + i * GRU_HANDLE_STRIDE;
1002 istatus = gru_check_status(cb);
1003 if (istatus == CBS_ACTIVE)
1004 continue;
1005 if (istatus == CBS_EXCEPTION)
1006 ret = -EFAULT;
1007 else if (buf[i] || buf[i + 1] || buf[i + 2] ||
1008 buf[i + 3])
1009 ret = -EIO;
1010 }
1011 }
1012 BUG_ON(cmp.done);
698 1013
699 bs = gru->gs_blade; 1014 gru_unlock_async_resource(han);
700 if (gru != &bs->bs_grus[1]) 1015 gru_release_async_resources(han);
701 return; 1016done:
1017 kfree(buf);
1018 return ret;
1019}
702 1020
703 cch = get_cch(gru->gs_gru_base_vaddr, KERNEL_CTXNUM); 1021/*
704 lock_cch_handle(cch); 1022 * Debugging only. User hook for various kernel tests
705 if (cch_interrupt_sync(cch)) 1023 * of driver & gru.
706 BUG(); 1024 */
707 if (cch_deallocate(cch)) 1025int gru_ktest(unsigned long arg)
1026{
1027 int ret = -EINVAL;
1028
1029 switch (arg & 0xff) {
1030 case 0:
1031 ret = quicktest0(arg);
1032 break;
1033 case 1:
1034 ret = quicktest1(arg);
1035 break;
1036 case 2:
1037 ret = quicktest2(arg);
1038 break;
1039 case 99:
1040 ret = gru_free_kernel_contexts();
1041 break;
1042 }
1043 return ret;
1044
1045}
1046
1047int gru_kservices_init(void)
1048{
1049 return 0;
1050}
1051
1052void gru_kservices_exit(void)
1053{
1054 if (gru_free_kernel_contexts())
708 BUG(); 1055 BUG();
709 unlock_cch_handle(cch);
710} 1056}
711 1057
diff --git a/drivers/misc/sgi-gru/grukservices.h b/drivers/misc/sgi-gru/grukservices.h
index 747ed315d56f..d60d34bca44d 100644
--- a/drivers/misc/sgi-gru/grukservices.h
+++ b/drivers/misc/sgi-gru/grukservices.h
@@ -146,4 +146,55 @@ extern void *gru_get_next_message(struct gru_message_queue_desc *mqd);
146extern int gru_copy_gpa(unsigned long dest_gpa, unsigned long src_gpa, 146extern int gru_copy_gpa(unsigned long dest_gpa, unsigned long src_gpa,
147 unsigned int bytes); 147 unsigned int bytes);
148 148
149/*
150 * Reserve GRU resources to be used asynchronously.
151 *
152 * input:
153 * blade_id - blade on which resources should be reserved
154 * cbrs - number of CBRs
155 * dsr_bytes - number of DSR bytes needed
156 * cmp - completion structure for waiting for
157 * async completions
158 * output:
159 * handle to identify resource
160 * (0 = no resources)
161 */
162extern unsigned long gru_reserve_async_resources(int blade_id, int cbrs, int dsr_bytes,
163 struct completion *cmp);
164
165/*
166 * Release async resources previously reserved.
167 *
168 * input:
169 * han - handle to identify resources
170 */
171extern void gru_release_async_resources(unsigned long han);
172
173/*
174 * Wait for async GRU instructions to complete.
175 *
176 * input:
177 * han - handle to identify resources
178 */
179extern void gru_wait_async_cbr(unsigned long han);
180
181/*
182 * Lock previous reserved async GRU resources
183 *
184 * input:
185 * han - handle to identify resources
186 * output:
187 * cb - pointer to first CBR
188 * dsr - pointer to first DSR
189 */
190extern void gru_lock_async_resource(unsigned long han, void **cb, void **dsr);
191
192/*
193 * Unlock previous reserved async GRU resources
194 *
195 * input:
196 * han - handle to identify resources
197 */
198extern void gru_unlock_async_resource(unsigned long han);
199
149#endif /* __GRU_KSERVICES_H_ */ 200#endif /* __GRU_KSERVICES_H_ */
diff --git a/drivers/misc/sgi-gru/grulib.h b/drivers/misc/sgi-gru/grulib.h
index e56e196a6998..889bc442a3e8 100644
--- a/drivers/misc/sgi-gru/grulib.h
+++ b/drivers/misc/sgi-gru/grulib.h
@@ -32,8 +32,8 @@
32/* Set Number of Request Blocks */ 32/* Set Number of Request Blocks */
33#define GRU_CREATE_CONTEXT _IOWR(GRU_IOCTL_NUM, 1, void *) 33#define GRU_CREATE_CONTEXT _IOWR(GRU_IOCTL_NUM, 1, void *)
34 34
35/* Register task as using the slice */ 35/* Set Context Options */
36#define GRU_SET_TASK_SLICE _IOWR(GRU_IOCTL_NUM, 5, void *) 36#define GRU_SET_CONTEXT_OPTION _IOWR(GRU_IOCTL_NUM, 4, void *)
37 37
38/* Fetch exception detail */ 38/* Fetch exception detail */
39#define GRU_USER_GET_EXCEPTION_DETAIL _IOWR(GRU_IOCTL_NUM, 6, void *) 39#define GRU_USER_GET_EXCEPTION_DETAIL _IOWR(GRU_IOCTL_NUM, 6, void *)
@@ -44,8 +44,11 @@
44/* For user unload context */ 44/* For user unload context */
45#define GRU_USER_UNLOAD_CONTEXT _IOWR(GRU_IOCTL_NUM, 9, void *) 45#define GRU_USER_UNLOAD_CONTEXT _IOWR(GRU_IOCTL_NUM, 9, void *)
46 46
47/* For fetching GRU chiplet status */ 47/* For dumpping GRU chiplet state */
48#define GRU_GET_CHIPLET_STATUS _IOWR(GRU_IOCTL_NUM, 10, void *) 48#define GRU_DUMP_CHIPLET_STATE _IOWR(GRU_IOCTL_NUM, 11, void *)
49
50/* For getting gseg statistics */
51#define GRU_GET_GSEG_STATISTICS _IOWR(GRU_IOCTL_NUM, 12, void *)
49 52
50/* For user TLB flushing (primarily for tests) */ 53/* For user TLB flushing (primarily for tests) */
51#define GRU_USER_FLUSH_TLB _IOWR(GRU_IOCTL_NUM, 50, void *) 54#define GRU_USER_FLUSH_TLB _IOWR(GRU_IOCTL_NUM, 50, void *)
@@ -53,8 +56,26 @@
53/* Get some config options (primarily for tests & emulator) */ 56/* Get some config options (primarily for tests & emulator) */
54#define GRU_GET_CONFIG_INFO _IOWR(GRU_IOCTL_NUM, 51, void *) 57#define GRU_GET_CONFIG_INFO _IOWR(GRU_IOCTL_NUM, 51, void *)
55 58
59/* Various kernel self-tests */
60#define GRU_KTEST _IOWR(GRU_IOCTL_NUM, 52, void *)
61
56#define CONTEXT_WINDOW_BYTES(th) (GRU_GSEG_PAGESIZE * (th)) 62#define CONTEXT_WINDOW_BYTES(th) (GRU_GSEG_PAGESIZE * (th))
57#define THREAD_POINTER(p, th) (p + GRU_GSEG_PAGESIZE * (th)) 63#define THREAD_POINTER(p, th) (p + GRU_GSEG_PAGESIZE * (th))
64#define GSEG_START(cb) ((void *)((unsigned long)(cb) & ~(GRU_GSEG_PAGESIZE - 1)))
65
66/*
67 * Statictics kept on a per-GTS basis.
68 */
69struct gts_statistics {
70 unsigned long fmm_tlbdropin;
71 unsigned long upm_tlbdropin;
72 unsigned long context_stolen;
73};
74
75struct gru_get_gseg_statistics_req {
76 unsigned long gseg;
77 struct gts_statistics stats;
78};
58 79
59/* 80/*
60 * Structure used to pass TLB flush parameters to the driver 81 * Structure used to pass TLB flush parameters to the driver
@@ -75,6 +96,16 @@ struct gru_unload_context_req {
75}; 96};
76 97
77/* 98/*
99 * Structure used to set context options
100 */
101enum {sco_gseg_owner, sco_cch_req_slice};
102struct gru_set_context_option_req {
103 unsigned long gseg;
104 int op;
105 unsigned long val1;
106};
107
108/*
78 * Structure used to pass TLB flush parameters to the driver 109 * Structure used to pass TLB flush parameters to the driver
79 */ 110 */
80struct gru_flush_tlb_req { 111struct gru_flush_tlb_req {
@@ -84,6 +115,36 @@ struct gru_flush_tlb_req {
84}; 115};
85 116
86/* 117/*
118 * Structure used to pass TLB flush parameters to the driver
119 */
120enum {dcs_pid, dcs_gid};
121struct gru_dump_chiplet_state_req {
122 unsigned int op;
123 unsigned int gid;
124 int ctxnum;
125 char data_opt;
126 char lock_cch;
127 pid_t pid;
128 void *buf;
129 size_t buflen;
130 /* ---- output --- */
131 unsigned int num_contexts;
132};
133
134#define GRU_DUMP_MAGIC 0x3474ab6c
135struct gru_dump_context_header {
136 unsigned int magic;
137 unsigned int gid;
138 unsigned char ctxnum;
139 unsigned char cbrcnt;
140 unsigned char dsrcnt;
141 pid_t pid;
142 unsigned long vaddr;
143 int cch_locked;
144 unsigned long data[0];
145};
146
147/*
87 * GRU configuration info (temp - for testing) 148 * GRU configuration info (temp - for testing)
88 */ 149 */
89struct gru_config_info { 150struct gru_config_info {
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c
index ec3f7a17d221..3bc643dad606 100644
--- a/drivers/misc/sgi-gru/grumain.c
+++ b/drivers/misc/sgi-gru/grumain.c
@@ -3,11 +3,21 @@
3 * 3 *
4 * DRIVER TABLE MANAGER + GRU CONTEXT LOAD/UNLOAD 4 * DRIVER TABLE MANAGER + GRU CONTEXT LOAD/UNLOAD
5 * 5 *
6 * This file is subject to the terms and conditions of the GNU General Public 6 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 * 7 *
10 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. 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,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
11 */ 21 */
12 22
13#include <linux/kernel.h> 23#include <linux/kernel.h>
@@ -96,7 +106,7 @@ static int gru_reset_asid_limit(struct gru_state *gru, int asid)
96 gid = gru->gs_gid; 106 gid = gru->gs_gid;
97again: 107again:
98 for (i = 0; i < GRU_NUM_CCH; i++) { 108 for (i = 0; i < GRU_NUM_CCH; i++) {
99 if (!gru->gs_gts[i]) 109 if (!gru->gs_gts[i] || is_kernel_context(gru->gs_gts[i]))
100 continue; 110 continue;
101 inuse_asid = gru->gs_gts[i]->ts_gms->ms_asids[gid].mt_asid; 111 inuse_asid = gru->gs_gts[i]->ts_gms->ms_asids[gid].mt_asid;
102 gru_dbg(grudev, "gid %d, gts %p, gms %p, inuse 0x%x, cxt %d\n", 112 gru_dbg(grudev, "gid %d, gts %p, gms %p, inuse 0x%x, cxt %d\n",
@@ -150,7 +160,7 @@ static unsigned long reserve_resources(unsigned long *p, int n, int mmax,
150 unsigned long bits = 0; 160 unsigned long bits = 0;
151 int i; 161 int i;
152 162
153 do { 163 while (n--) {
154 i = find_first_bit(p, mmax); 164 i = find_first_bit(p, mmax);
155 if (i == mmax) 165 if (i == mmax)
156 BUG(); 166 BUG();
@@ -158,7 +168,7 @@ static unsigned long reserve_resources(unsigned long *p, int n, int mmax,
158 __set_bit(i, &bits); 168 __set_bit(i, &bits);
159 if (idx) 169 if (idx)
160 *idx++ = i; 170 *idx++ = i;
161 } while (--n); 171 }
162 return bits; 172 return bits;
163} 173}
164 174
@@ -299,38 +309,39 @@ static struct gru_thread_state *gru_find_current_gts_nolock(struct gru_vma_data
299/* 309/*
300 * Allocate a thread state structure. 310 * Allocate a thread state structure.
301 */ 311 */
302static struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, 312struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma,
303 struct gru_vma_data *vdata, 313 int cbr_au_count, int dsr_au_count, int options, int tsid)
304 int tsid)
305{ 314{
306 struct gru_thread_state *gts; 315 struct gru_thread_state *gts;
307 int bytes; 316 int bytes;
308 317
309 bytes = DSR_BYTES(vdata->vd_dsr_au_count) + 318 bytes = DSR_BYTES(dsr_au_count) + CBR_BYTES(cbr_au_count);
310 CBR_BYTES(vdata->vd_cbr_au_count);
311 bytes += sizeof(struct gru_thread_state); 319 bytes += sizeof(struct gru_thread_state);
312 gts = kzalloc(bytes, GFP_KERNEL); 320 gts = kmalloc(bytes, GFP_KERNEL);
313 if (!gts) 321 if (!gts)
314 return NULL; 322 return NULL;
315 323
316 STAT(gts_alloc); 324 STAT(gts_alloc);
325 memset(gts, 0, sizeof(struct gru_thread_state)); /* zero out header */
317 atomic_set(&gts->ts_refcnt, 1); 326 atomic_set(&gts->ts_refcnt, 1);
318 mutex_init(&gts->ts_ctxlock); 327 mutex_init(&gts->ts_ctxlock);
319 gts->ts_cbr_au_count = vdata->vd_cbr_au_count; 328 gts->ts_cbr_au_count = cbr_au_count;
320 gts->ts_dsr_au_count = vdata->vd_dsr_au_count; 329 gts->ts_dsr_au_count = dsr_au_count;
321 gts->ts_user_options = vdata->vd_user_options; 330 gts->ts_user_options = options;
322 gts->ts_tsid = tsid; 331 gts->ts_tsid = tsid;
323 gts->ts_user_options = vdata->vd_user_options;
324 gts->ts_ctxnum = NULLCTX; 332 gts->ts_ctxnum = NULLCTX;
325 gts->ts_mm = current->mm;
326 gts->ts_vma = vma;
327 gts->ts_tlb_int_select = -1; 333 gts->ts_tlb_int_select = -1;
328 gts->ts_gms = gru_register_mmu_notifier(); 334 gts->ts_cch_req_slice = -1;
329 gts->ts_sizeavail = GRU_SIZEAVAIL(PAGE_SHIFT); 335 gts->ts_sizeavail = GRU_SIZEAVAIL(PAGE_SHIFT);
330 if (!gts->ts_gms) 336 if (vma) {
331 goto err; 337 gts->ts_mm = current->mm;
338 gts->ts_vma = vma;
339 gts->ts_gms = gru_register_mmu_notifier();
340 if (!gts->ts_gms)
341 goto err;
342 }
332 343
333 gru_dbg(grudev, "alloc vdata %p, new gts %p\n", vdata, gts); 344 gru_dbg(grudev, "alloc gts %p\n", gts);
334 return gts; 345 return gts;
335 346
336err: 347err:
@@ -381,7 +392,8 @@ struct gru_thread_state *gru_alloc_thread_state(struct vm_area_struct *vma,
381 struct gru_vma_data *vdata = vma->vm_private_data; 392 struct gru_vma_data *vdata = vma->vm_private_data;
382 struct gru_thread_state *gts, *ngts; 393 struct gru_thread_state *gts, *ngts;
383 394
384 gts = gru_alloc_gts(vma, vdata, tsid); 395 gts = gru_alloc_gts(vma, vdata->vd_cbr_au_count, vdata->vd_dsr_au_count,
396 vdata->vd_user_options, tsid);
385 if (!gts) 397 if (!gts)
386 return NULL; 398 return NULL;
387 399
@@ -458,7 +470,8 @@ static void gru_prefetch_context(void *gseg, void *cb, void *cbe,
458} 470}
459 471
460static void gru_load_context_data(void *save, void *grubase, int ctxnum, 472static void gru_load_context_data(void *save, void *grubase, int ctxnum,
461 unsigned long cbrmap, unsigned long dsrmap) 473 unsigned long cbrmap, unsigned long dsrmap,
474 int data_valid)
462{ 475{
463 void *gseg, *cb, *cbe; 476 void *gseg, *cb, *cbe;
464 unsigned long length; 477 unsigned long length;
@@ -471,12 +484,22 @@ static void gru_load_context_data(void *save, void *grubase, int ctxnum,
471 gru_prefetch_context(gseg, cb, cbe, cbrmap, length); 484 gru_prefetch_context(gseg, cb, cbe, cbrmap, length);
472 485
473 for_each_cbr_in_allocation_map(i, &cbrmap, scr) { 486 for_each_cbr_in_allocation_map(i, &cbrmap, scr) {
474 save += gru_copy_handle(cb, save); 487 if (data_valid) {
475 save += gru_copy_handle(cbe + i * GRU_HANDLE_STRIDE, save); 488 save += gru_copy_handle(cb, save);
489 save += gru_copy_handle(cbe + i * GRU_HANDLE_STRIDE,
490 save);
491 } else {
492 memset(cb, 0, GRU_CACHE_LINE_BYTES);
493 memset(cbe + i * GRU_HANDLE_STRIDE, 0,
494 GRU_CACHE_LINE_BYTES);
495 }
476 cb += GRU_HANDLE_STRIDE; 496 cb += GRU_HANDLE_STRIDE;
477 } 497 }
478 498
479 memcpy(gseg + GRU_DS_BASE, save, length); 499 if (data_valid)
500 memcpy(gseg + GRU_DS_BASE, save, length);
501 else
502 memset(gseg + GRU_DS_BASE, 0, length);
480} 503}
481 504
482static void gru_unload_context_data(void *save, void *grubase, int ctxnum, 505static void gru_unload_context_data(void *save, void *grubase, int ctxnum,
@@ -506,7 +529,8 @@ void gru_unload_context(struct gru_thread_state *gts, int savestate)
506 struct gru_context_configuration_handle *cch; 529 struct gru_context_configuration_handle *cch;
507 int ctxnum = gts->ts_ctxnum; 530 int ctxnum = gts->ts_ctxnum;
508 531
509 zap_vma_ptes(gts->ts_vma, UGRUADDR(gts), GRU_GSEG_PAGESIZE); 532 if (!is_kernel_context(gts))
533 zap_vma_ptes(gts->ts_vma, UGRUADDR(gts), GRU_GSEG_PAGESIZE);
510 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); 534 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum);
511 535
512 gru_dbg(grudev, "gts %p\n", gts); 536 gru_dbg(grudev, "gts %p\n", gts);
@@ -514,11 +538,14 @@ void gru_unload_context(struct gru_thread_state *gts, int savestate)
514 if (cch_interrupt_sync(cch)) 538 if (cch_interrupt_sync(cch))
515 BUG(); 539 BUG();
516 540
517 gru_unload_mm_tracker(gru, gts); 541 if (!is_kernel_context(gts))
518 if (savestate) 542 gru_unload_mm_tracker(gru, gts);
543 if (savestate) {
519 gru_unload_context_data(gts->ts_gdata, gru->gs_gru_base_vaddr, 544 gru_unload_context_data(gts->ts_gdata, gru->gs_gru_base_vaddr,
520 ctxnum, gts->ts_cbr_map, 545 ctxnum, gts->ts_cbr_map,
521 gts->ts_dsr_map); 546 gts->ts_dsr_map);
547 gts->ts_data_valid = 1;
548 }
522 549
523 if (cch_deallocate(cch)) 550 if (cch_deallocate(cch))
524 BUG(); 551 BUG();
@@ -526,24 +553,22 @@ void gru_unload_context(struct gru_thread_state *gts, int savestate)
526 unlock_cch_handle(cch); 553 unlock_cch_handle(cch);
527 554
528 gru_free_gru_context(gts); 555 gru_free_gru_context(gts);
529 STAT(unload_context);
530} 556}
531 557
532/* 558/*
533 * Load a GRU context by copying it from the thread data structure in memory 559 * Load a GRU context by copying it from the thread data structure in memory
534 * to the GRU. 560 * to the GRU.
535 */ 561 */
536static void gru_load_context(struct gru_thread_state *gts) 562void gru_load_context(struct gru_thread_state *gts)
537{ 563{
538 struct gru_state *gru = gts->ts_gru; 564 struct gru_state *gru = gts->ts_gru;
539 struct gru_context_configuration_handle *cch; 565 struct gru_context_configuration_handle *cch;
540 int err, asid, ctxnum = gts->ts_ctxnum; 566 int i, err, asid, ctxnum = gts->ts_ctxnum;
541 567
542 gru_dbg(grudev, "gts %p\n", gts); 568 gru_dbg(grudev, "gts %p\n", gts);
543 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); 569 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum);
544 570
545 lock_cch_handle(cch); 571 lock_cch_handle(cch);
546 asid = gru_load_mm_tracker(gru, gts);
547 cch->tfm_fault_bit_enable = 572 cch->tfm_fault_bit_enable =
548 (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL 573 (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL
549 || gts->ts_user_options == GRU_OPT_MISS_FMM_INTR); 574 || gts->ts_user_options == GRU_OPT_MISS_FMM_INTR);
@@ -552,9 +577,32 @@ static void gru_load_context(struct gru_thread_state *gts)
552 gts->ts_tlb_int_select = gru_cpu_fault_map_id(); 577 gts->ts_tlb_int_select = gru_cpu_fault_map_id();
553 cch->tlb_int_select = gts->ts_tlb_int_select; 578 cch->tlb_int_select = gts->ts_tlb_int_select;
554 } 579 }
580 if (gts->ts_cch_req_slice >= 0) {
581 cch->req_slice_set_enable = 1;
582 cch->req_slice = gts->ts_cch_req_slice;
583 } else {
584 cch->req_slice_set_enable =0;
585 }
555 cch->tfm_done_bit_enable = 0; 586 cch->tfm_done_bit_enable = 0;
556 err = cch_allocate(cch, asid, gts->ts_sizeavail, gts->ts_cbr_map, 587 cch->dsr_allocation_map = gts->ts_dsr_map;
557 gts->ts_dsr_map); 588 cch->cbr_allocation_map = gts->ts_cbr_map;
589
590 if (is_kernel_context(gts)) {
591 cch->unmap_enable = 1;
592 cch->tfm_done_bit_enable = 1;
593 cch->cb_int_enable = 1;
594 } else {
595 cch->unmap_enable = 0;
596 cch->tfm_done_bit_enable = 0;
597 cch->cb_int_enable = 0;
598 asid = gru_load_mm_tracker(gru, gts);
599 for (i = 0; i < 8; i++) {
600 cch->asid[i] = asid + i;
601 cch->sizeavail[i] = gts->ts_sizeavail;
602 }
603 }
604
605 err = cch_allocate(cch);
558 if (err) { 606 if (err) {
559 gru_dbg(grudev, 607 gru_dbg(grudev,
560 "err %d: cch %p, gts %p, cbr 0x%lx, dsr 0x%lx\n", 608 "err %d: cch %p, gts %p, cbr 0x%lx, dsr 0x%lx\n",
@@ -563,13 +611,11 @@ static void gru_load_context(struct gru_thread_state *gts)
563 } 611 }
564 612
565 gru_load_context_data(gts->ts_gdata, gru->gs_gru_base_vaddr, ctxnum, 613 gru_load_context_data(gts->ts_gdata, gru->gs_gru_base_vaddr, ctxnum,
566 gts->ts_cbr_map, gts->ts_dsr_map); 614 gts->ts_cbr_map, gts->ts_dsr_map, gts->ts_data_valid);
567 615
568 if (cch_start(cch)) 616 if (cch_start(cch))
569 BUG(); 617 BUG();
570 unlock_cch_handle(cch); 618 unlock_cch_handle(cch);
571
572 STAT(load_context);
573} 619}
574 620
575/* 621/*
@@ -599,6 +645,9 @@ int gru_update_cch(struct gru_thread_state *gts, int force_unload)
599 cch->sizeavail[i] = gts->ts_sizeavail; 645 cch->sizeavail[i] = gts->ts_sizeavail;
600 gts->ts_tlb_int_select = gru_cpu_fault_map_id(); 646 gts->ts_tlb_int_select = gru_cpu_fault_map_id();
601 cch->tlb_int_select = gru_cpu_fault_map_id(); 647 cch->tlb_int_select = gru_cpu_fault_map_id();
648 cch->tfm_fault_bit_enable =
649 (gts->ts_user_options == GRU_OPT_MISS_FMM_POLL
650 || gts->ts_user_options == GRU_OPT_MISS_FMM_INTR);
602 } else { 651 } else {
603 for (i = 0; i < 8; i++) 652 for (i = 0; i < 8; i++)
604 cch->asid[i] = 0; 653 cch->asid[i] = 0;
@@ -642,7 +691,28 @@ static int gru_retarget_intr(struct gru_thread_state *gts)
642#define next_gru(b, g) (((g) < &(b)->bs_grus[GRU_CHIPLETS_PER_BLADE - 1]) ? \ 691#define next_gru(b, g) (((g) < &(b)->bs_grus[GRU_CHIPLETS_PER_BLADE - 1]) ? \
643 ((g)+1) : &(b)->bs_grus[0]) 692 ((g)+1) : &(b)->bs_grus[0])
644 693
645static void gru_steal_context(struct gru_thread_state *gts) 694static int is_gts_stealable(struct gru_thread_state *gts,
695 struct gru_blade_state *bs)
696{
697 if (is_kernel_context(gts))
698 return down_write_trylock(&bs->bs_kgts_sema);
699 else
700 return mutex_trylock(&gts->ts_ctxlock);
701}
702
703static void gts_stolen(struct gru_thread_state *gts,
704 struct gru_blade_state *bs)
705{
706 if (is_kernel_context(gts)) {
707 up_write(&bs->bs_kgts_sema);
708 STAT(steal_kernel_context);
709 } else {
710 mutex_unlock(&gts->ts_ctxlock);
711 STAT(steal_user_context);
712 }
713}
714
715void gru_steal_context(struct gru_thread_state *gts, int blade_id)
646{ 716{
647 struct gru_blade_state *blade; 717 struct gru_blade_state *blade;
648 struct gru_state *gru, *gru0; 718 struct gru_state *gru, *gru0;
@@ -652,8 +722,7 @@ static void gru_steal_context(struct gru_thread_state *gts)
652 cbr = gts->ts_cbr_au_count; 722 cbr = gts->ts_cbr_au_count;
653 dsr = gts->ts_dsr_au_count; 723 dsr = gts->ts_dsr_au_count;
654 724
655 preempt_disable(); 725 blade = gru_base[blade_id];
656 blade = gru_base[uv_numa_blade_id()];
657 spin_lock(&blade->bs_lock); 726 spin_lock(&blade->bs_lock);
658 727
659 ctxnum = next_ctxnum(blade->bs_lru_ctxnum); 728 ctxnum = next_ctxnum(blade->bs_lru_ctxnum);
@@ -676,7 +745,7 @@ static void gru_steal_context(struct gru_thread_state *gts)
676 * success are high. If trylock fails, try to steal a 745 * success are high. If trylock fails, try to steal a
677 * different GSEG. 746 * different GSEG.
678 */ 747 */
679 if (ngts && mutex_trylock(&ngts->ts_ctxlock)) 748 if (ngts && is_gts_stealable(ngts, blade))
680 break; 749 break;
681 ngts = NULL; 750 ngts = NULL;
682 flag = 1; 751 flag = 1;
@@ -690,13 +759,12 @@ static void gru_steal_context(struct gru_thread_state *gts)
690 blade->bs_lru_gru = gru; 759 blade->bs_lru_gru = gru;
691 blade->bs_lru_ctxnum = ctxnum; 760 blade->bs_lru_ctxnum = ctxnum;
692 spin_unlock(&blade->bs_lock); 761 spin_unlock(&blade->bs_lock);
693 preempt_enable();
694 762
695 if (ngts) { 763 if (ngts) {
696 STAT(steal_context); 764 gts->ustats.context_stolen++;
697 ngts->ts_steal_jiffies = jiffies; 765 ngts->ts_steal_jiffies = jiffies;
698 gru_unload_context(ngts, 1); 766 gru_unload_context(ngts, is_kernel_context(ngts) ? 0 : 1);
699 mutex_unlock(&ngts->ts_ctxlock); 767 gts_stolen(ngts, blade);
700 } else { 768 } else {
701 STAT(steal_context_failed); 769 STAT(steal_context_failed);
702 } 770 }
@@ -710,17 +778,17 @@ static void gru_steal_context(struct gru_thread_state *gts)
710/* 778/*
711 * Scan the GRUs on the local blade & assign a GRU context. 779 * Scan the GRUs on the local blade & assign a GRU context.
712 */ 780 */
713static struct gru_state *gru_assign_gru_context(struct gru_thread_state *gts) 781struct gru_state *gru_assign_gru_context(struct gru_thread_state *gts,
782 int blade)
714{ 783{
715 struct gru_state *gru, *grux; 784 struct gru_state *gru, *grux;
716 int i, max_active_contexts; 785 int i, max_active_contexts;
717 786
718 preempt_disable();
719 787
720again: 788again:
721 gru = NULL; 789 gru = NULL;
722 max_active_contexts = GRU_NUM_CCH; 790 max_active_contexts = GRU_NUM_CCH;
723 for_each_gru_on_blade(grux, uv_numa_blade_id(), i) { 791 for_each_gru_on_blade(grux, blade, i) {
724 if (check_gru_resources(grux, gts->ts_cbr_au_count, 792 if (check_gru_resources(grux, gts->ts_cbr_au_count,
725 gts->ts_dsr_au_count, 793 gts->ts_dsr_au_count,
726 max_active_contexts)) { 794 max_active_contexts)) {
@@ -760,7 +828,6 @@ again:
760 STAT(assign_context_failed); 828 STAT(assign_context_failed);
761 } 829 }
762 830
763 preempt_enable();
764 return gru; 831 return gru;
765} 832}
766 833
@@ -775,6 +842,7 @@ int gru_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
775{ 842{
776 struct gru_thread_state *gts; 843 struct gru_thread_state *gts;
777 unsigned long paddr, vaddr; 844 unsigned long paddr, vaddr;
845 int blade_id;
778 846
779 vaddr = (unsigned long)vmf->virtual_address; 847 vaddr = (unsigned long)vmf->virtual_address;
780 gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n", 848 gru_dbg(grudev, "vma %p, vaddr 0x%lx (0x%lx)\n",
@@ -789,8 +857,10 @@ int gru_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
789again: 857again:
790 mutex_lock(&gts->ts_ctxlock); 858 mutex_lock(&gts->ts_ctxlock);
791 preempt_disable(); 859 preempt_disable();
860 blade_id = uv_numa_blade_id();
861
792 if (gts->ts_gru) { 862 if (gts->ts_gru) {
793 if (gts->ts_gru->gs_blade_id != uv_numa_blade_id()) { 863 if (gts->ts_gru->gs_blade_id != blade_id) {
794 STAT(migrated_nopfn_unload); 864 STAT(migrated_nopfn_unload);
795 gru_unload_context(gts, 1); 865 gru_unload_context(gts, 1);
796 } else { 866 } else {
@@ -800,12 +870,15 @@ again:
800 } 870 }
801 871
802 if (!gts->ts_gru) { 872 if (!gts->ts_gru) {
803 if (!gru_assign_gru_context(gts)) { 873 STAT(load_user_context);
804 mutex_unlock(&gts->ts_ctxlock); 874 if (!gru_assign_gru_context(gts, blade_id)) {
805 preempt_enable(); 875 preempt_enable();
876 mutex_unlock(&gts->ts_ctxlock);
877 set_current_state(TASK_INTERRUPTIBLE);
806 schedule_timeout(GRU_ASSIGN_DELAY); /* true hack ZZZ */ 878 schedule_timeout(GRU_ASSIGN_DELAY); /* true hack ZZZ */
879 blade_id = uv_numa_blade_id();
807 if (gts->ts_steal_jiffies + GRU_STEAL_DELAY < jiffies) 880 if (gts->ts_steal_jiffies + GRU_STEAL_DELAY < jiffies)
808 gru_steal_context(gts); 881 gru_steal_context(gts, blade_id);
809 goto again; 882 goto again;
810 } 883 }
811 gru_load_context(gts); 884 gru_load_context(gts);
@@ -815,8 +888,8 @@ again:
815 vma->vm_page_prot); 888 vma->vm_page_prot);
816 } 889 }
817 890
818 mutex_unlock(&gts->ts_ctxlock);
819 preempt_enable(); 891 preempt_enable();
892 mutex_unlock(&gts->ts_ctxlock);
820 893
821 return VM_FAULT_NOPAGE; 894 return VM_FAULT_NOPAGE;
822} 895}
diff --git a/drivers/misc/sgi-gru/gruprocfs.c b/drivers/misc/sgi-gru/gruprocfs.c
index ee74821b171c..9cbf95bedce6 100644
--- a/drivers/misc/sgi-gru/gruprocfs.c
+++ b/drivers/misc/sgi-gru/gruprocfs.c
@@ -51,9 +51,12 @@ static int statistics_show(struct seq_file *s, void *p)
51 printstat(s, assign_context); 51 printstat(s, assign_context);
52 printstat(s, assign_context_failed); 52 printstat(s, assign_context_failed);
53 printstat(s, free_context); 53 printstat(s, free_context);
54 printstat(s, load_context); 54 printstat(s, load_user_context);
55 printstat(s, unload_context); 55 printstat(s, load_kernel_context);
56 printstat(s, steal_context); 56 printstat(s, lock_kernel_context);
57 printstat(s, unlock_kernel_context);
58 printstat(s, steal_user_context);
59 printstat(s, steal_kernel_context);
57 printstat(s, steal_context_failed); 60 printstat(s, steal_context_failed);
58 printstat(s, nopfn); 61 printstat(s, nopfn);
59 printstat(s, break_cow); 62 printstat(s, break_cow);
@@ -70,7 +73,7 @@ static int statistics_show(struct seq_file *s, void *p)
70 printstat(s, user_flush_tlb); 73 printstat(s, user_flush_tlb);
71 printstat(s, user_unload_context); 74 printstat(s, user_unload_context);
72 printstat(s, user_exception); 75 printstat(s, user_exception);
73 printstat(s, set_task_slice); 76 printstat(s, set_context_option);
74 printstat(s, migrate_check); 77 printstat(s, migrate_check);
75 printstat(s, migrated_retarget); 78 printstat(s, migrated_retarget);
76 printstat(s, migrated_unload); 79 printstat(s, migrated_unload);
@@ -84,6 +87,9 @@ static int statistics_show(struct seq_file *s, void *p)
84 printstat(s, tlb_dropin_fail_range_active); 87 printstat(s, tlb_dropin_fail_range_active);
85 printstat(s, tlb_dropin_fail_idle); 88 printstat(s, tlb_dropin_fail_idle);
86 printstat(s, tlb_dropin_fail_fmm); 89 printstat(s, tlb_dropin_fail_fmm);
90 printstat(s, tlb_dropin_fail_no_exception);
91 printstat(s, tlb_dropin_fail_no_exception_war);
92 printstat(s, tfh_stale_on_fault);
87 printstat(s, mmu_invalidate_range); 93 printstat(s, mmu_invalidate_range);
88 printstat(s, mmu_invalidate_page); 94 printstat(s, mmu_invalidate_page);
89 printstat(s, mmu_clear_flush_young); 95 printstat(s, mmu_clear_flush_young);
@@ -158,8 +164,7 @@ static ssize_t options_write(struct file *file, const char __user *userbuf,
158 unsigned long val; 164 unsigned long val;
159 char buf[80]; 165 char buf[80];
160 166
161 if (copy_from_user 167 if (strncpy_from_user(buf, userbuf, sizeof(buf) - 1) < 0)
162 (buf, userbuf, count < sizeof(buf) ? count : sizeof(buf)))
163 return -EFAULT; 168 return -EFAULT;
164 buf[count - 1] = '\0'; 169 buf[count - 1] = '\0';
165 if (!strict_strtoul(buf, 10, &val)) 170 if (!strict_strtoul(buf, 10, &val))
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h
index bf1eeb7553ed..34ab3d453919 100644
--- a/drivers/misc/sgi-gru/grutables.h
+++ b/drivers/misc/sgi-gru/grutables.h
@@ -148,11 +148,13 @@
148#include <linux/wait.h> 148#include <linux/wait.h>
149#include <linux/mmu_notifier.h> 149#include <linux/mmu_notifier.h>
150#include "gru.h" 150#include "gru.h"
151#include "grulib.h"
151#include "gruhandles.h" 152#include "gruhandles.h"
152 153
153extern struct gru_stats_s gru_stats; 154extern struct gru_stats_s gru_stats;
154extern struct gru_blade_state *gru_base[]; 155extern struct gru_blade_state *gru_base[];
155extern unsigned long gru_start_paddr, gru_end_paddr; 156extern unsigned long gru_start_paddr, gru_end_paddr;
157extern void *gru_start_vaddr;
156extern unsigned int gru_max_gids; 158extern unsigned int gru_max_gids;
157 159
158#define GRU_MAX_BLADES MAX_NUMNODES 160#define GRU_MAX_BLADES MAX_NUMNODES
@@ -174,9 +176,12 @@ struct gru_stats_s {
174 atomic_long_t assign_context; 176 atomic_long_t assign_context;
175 atomic_long_t assign_context_failed; 177 atomic_long_t assign_context_failed;
176 atomic_long_t free_context; 178 atomic_long_t free_context;
177 atomic_long_t load_context; 179 atomic_long_t load_user_context;
178 atomic_long_t unload_context; 180 atomic_long_t load_kernel_context;
179 atomic_long_t steal_context; 181 atomic_long_t lock_kernel_context;
182 atomic_long_t unlock_kernel_context;
183 atomic_long_t steal_user_context;
184 atomic_long_t steal_kernel_context;
180 atomic_long_t steal_context_failed; 185 atomic_long_t steal_context_failed;
181 atomic_long_t nopfn; 186 atomic_long_t nopfn;
182 atomic_long_t break_cow; 187 atomic_long_t break_cow;
@@ -193,7 +198,7 @@ struct gru_stats_s {
193 atomic_long_t user_flush_tlb; 198 atomic_long_t user_flush_tlb;
194 atomic_long_t user_unload_context; 199 atomic_long_t user_unload_context;
195 atomic_long_t user_exception; 200 atomic_long_t user_exception;
196 atomic_long_t set_task_slice; 201 atomic_long_t set_context_option;
197 atomic_long_t migrate_check; 202 atomic_long_t migrate_check;
198 atomic_long_t migrated_retarget; 203 atomic_long_t migrated_retarget;
199 atomic_long_t migrated_unload; 204 atomic_long_t migrated_unload;
@@ -207,6 +212,9 @@ struct gru_stats_s {
207 atomic_long_t tlb_dropin_fail_range_active; 212 atomic_long_t tlb_dropin_fail_range_active;
208 atomic_long_t tlb_dropin_fail_idle; 213 atomic_long_t tlb_dropin_fail_idle;
209 atomic_long_t tlb_dropin_fail_fmm; 214 atomic_long_t tlb_dropin_fail_fmm;
215 atomic_long_t tlb_dropin_fail_no_exception;
216 atomic_long_t tlb_dropin_fail_no_exception_war;
217 atomic_long_t tfh_stale_on_fault;
210 atomic_long_t mmu_invalidate_range; 218 atomic_long_t mmu_invalidate_range;
211 atomic_long_t mmu_invalidate_page; 219 atomic_long_t mmu_invalidate_page;
212 atomic_long_t mmu_clear_flush_young; 220 atomic_long_t mmu_clear_flush_young;
@@ -253,7 +261,6 @@ extern struct mcs_op_statistic mcs_op_statistics[mcsop_last];
253 261
254#define OPT_DPRINT 1 262#define OPT_DPRINT 1
255#define OPT_STATS 2 263#define OPT_STATS 2
256#define GRU_QUICKLOOK 4
257 264
258 265
259#define IRQ_GRU 110 /* Starting IRQ number for interrupts */ 266#define IRQ_GRU 110 /* Starting IRQ number for interrupts */
@@ -373,6 +380,7 @@ struct gru_thread_state {
373 required for contest */ 380 required for contest */
374 unsigned char ts_cbr_au_count;/* Number of CBR resources 381 unsigned char ts_cbr_au_count;/* Number of CBR resources
375 required for contest */ 382 required for contest */
383 char ts_cch_req_slice;/* CCH packet slice */
376 char ts_blade; /* If >= 0, migrate context if 384 char ts_blade; /* If >= 0, migrate context if
377 ref from diferent blade */ 385 ref from diferent blade */
378 char ts_force_cch_reload; 386 char ts_force_cch_reload;
@@ -380,6 +388,9 @@ struct gru_thread_state {
380 after migration */ 388 after migration */
381 char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each 389 char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each
382 allocated CB */ 390 allocated CB */
391 int ts_data_valid; /* Indicates if ts_gdata has
392 valid data */
393 struct gts_statistics ustats; /* User statistics */
383 unsigned long ts_gdata[0]; /* save area for GRU data (CB, 394 unsigned long ts_gdata[0]; /* save area for GRU data (CB,
384 DS, CBE) */ 395 DS, CBE) */
385}; 396};
@@ -452,6 +463,14 @@ struct gru_blade_state {
452 reserved cb */ 463 reserved cb */
453 void *kernel_dsr; /* First kernel 464 void *kernel_dsr; /* First kernel
454 reserved DSR */ 465 reserved DSR */
466 struct rw_semaphore bs_kgts_sema; /* lock for kgts */
467 struct gru_thread_state *bs_kgts; /* GTS for kernel use */
468
469 /* ---- the following are used for managing kernel async GRU CBRs --- */
470 int bs_async_dsr_bytes; /* DSRs for async */
471 int bs_async_cbrs; /* CBRs AU for async */
472 struct completion *bs_async_wq;
473
455 /* ---- the following are protected by the bs_lock spinlock ---- */ 474 /* ---- the following are protected by the bs_lock spinlock ---- */
456 spinlock_t bs_lock; /* lock used for 475 spinlock_t bs_lock; /* lock used for
457 stealing contexts */ 476 stealing contexts */
@@ -552,6 +571,12 @@ struct gru_blade_state {
552 571
553/* Lock hierarchy checking enabled only in emulator */ 572/* Lock hierarchy checking enabled only in emulator */
554 573
574/* 0 = lock failed, 1 = locked */
575static inline int __trylock_handle(void *h)
576{
577 return !test_and_set_bit(1, h);
578}
579
555static inline void __lock_handle(void *h) 580static inline void __lock_handle(void *h)
556{ 581{
557 while (test_and_set_bit(1, h)) 582 while (test_and_set_bit(1, h))
@@ -563,6 +588,11 @@ static inline void __unlock_handle(void *h)
563 clear_bit(1, h); 588 clear_bit(1, h);
564} 589}
565 590
591static inline int trylock_cch_handle(struct gru_context_configuration_handle *cch)
592{
593 return __trylock_handle(cch);
594}
595
566static inline void lock_cch_handle(struct gru_context_configuration_handle *cch) 596static inline void lock_cch_handle(struct gru_context_configuration_handle *cch)
567{ 597{
568 __lock_handle(cch); 598 __lock_handle(cch);
@@ -584,6 +614,11 @@ static inline void unlock_tgh_handle(struct gru_tlb_global_handle *tgh)
584 __unlock_handle(tgh); 614 __unlock_handle(tgh);
585} 615}
586 616
617static inline int is_kernel_context(struct gru_thread_state *gts)
618{
619 return !gts->ts_mm;
620}
621
587/*----------------------------------------------------------------------------- 622/*-----------------------------------------------------------------------------
588 * Function prototypes & externs 623 * Function prototypes & externs
589 */ 624 */
@@ -598,24 +633,32 @@ extern struct gru_thread_state *gru_find_thread_state(struct vm_area_struct
598 *vma, int tsid); 633 *vma, int tsid);
599extern struct gru_thread_state *gru_alloc_thread_state(struct vm_area_struct 634extern struct gru_thread_state *gru_alloc_thread_state(struct vm_area_struct
600 *vma, int tsid); 635 *vma, int tsid);
636extern struct gru_state *gru_assign_gru_context(struct gru_thread_state *gts,
637 int blade);
638extern void gru_load_context(struct gru_thread_state *gts);
639extern void gru_steal_context(struct gru_thread_state *gts, int blade_id);
601extern void gru_unload_context(struct gru_thread_state *gts, int savestate); 640extern void gru_unload_context(struct gru_thread_state *gts, int savestate);
602extern int gru_update_cch(struct gru_thread_state *gts, int force_unload); 641extern int gru_update_cch(struct gru_thread_state *gts, int force_unload);
603extern void gts_drop(struct gru_thread_state *gts); 642extern void gts_drop(struct gru_thread_state *gts);
604extern void gru_tgh_flush_init(struct gru_state *gru); 643extern void gru_tgh_flush_init(struct gru_state *gru);
605extern int gru_kservices_init(struct gru_state *gru); 644extern int gru_kservices_init(void);
606extern void gru_kservices_exit(struct gru_state *gru); 645extern void gru_kservices_exit(void);
646extern int gru_dump_chiplet_request(unsigned long arg);
647extern long gru_get_gseg_statistics(unsigned long arg);
607extern irqreturn_t gru_intr(int irq, void *dev_id); 648extern irqreturn_t gru_intr(int irq, void *dev_id);
608extern int gru_handle_user_call_os(unsigned long address); 649extern int gru_handle_user_call_os(unsigned long address);
609extern int gru_user_flush_tlb(unsigned long arg); 650extern int gru_user_flush_tlb(unsigned long arg);
610extern int gru_user_unload_context(unsigned long arg); 651extern int gru_user_unload_context(unsigned long arg);
611extern int gru_get_exception_detail(unsigned long arg); 652extern int gru_get_exception_detail(unsigned long arg);
612extern int gru_set_task_slice(long address); 653extern int gru_set_context_option(unsigned long address);
613extern int gru_cpu_fault_map_id(void); 654extern int gru_cpu_fault_map_id(void);
614extern struct vm_area_struct *gru_find_vma(unsigned long vaddr); 655extern struct vm_area_struct *gru_find_vma(unsigned long vaddr);
615extern void gru_flush_all_tlb(struct gru_state *gru); 656extern void gru_flush_all_tlb(struct gru_state *gru);
616extern int gru_proc_init(void); 657extern int gru_proc_init(void);
617extern void gru_proc_exit(void); 658extern void gru_proc_exit(void);
618 659
660extern struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma,
661 int cbr_au_count, int dsr_au_count, int options, int tsid);
619extern unsigned long gru_reserve_cb_resources(struct gru_state *gru, 662extern unsigned long gru_reserve_cb_resources(struct gru_state *gru,
620 int cbr_au_count, char *cbmap); 663 int cbr_au_count, char *cbmap);
621extern unsigned long gru_reserve_ds_resources(struct gru_state *gru, 664extern unsigned long gru_reserve_ds_resources(struct gru_state *gru,
@@ -624,6 +667,7 @@ extern int gru_fault(struct vm_area_struct *, struct vm_fault *vmf);
624extern struct gru_mm_struct *gru_register_mmu_notifier(void); 667extern struct gru_mm_struct *gru_register_mmu_notifier(void);
625extern void gru_drop_mmu_notifier(struct gru_mm_struct *gms); 668extern void gru_drop_mmu_notifier(struct gru_mm_struct *gms);
626 669
670extern int gru_ktest(unsigned long arg);
627extern void gru_flush_tlb_range(struct gru_mm_struct *gms, unsigned long start, 671extern void gru_flush_tlb_range(struct gru_mm_struct *gms, unsigned long start,
628 unsigned long len); 672 unsigned long len);
629 673
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 7e3738112c4e..38f1c3375d7f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -3552,14 +3552,14 @@ bnx2_set_rx_mode(struct net_device *dev)
3552 sort_mode |= BNX2_RPM_SORT_USER0_MC_HSH_EN; 3552 sort_mode |= BNX2_RPM_SORT_USER0_MC_HSH_EN;
3553 } 3553 }
3554 3554
3555 if (dev->uc_count > BNX2_MAX_UNICAST_ADDRESSES) { 3555 if (dev->uc.count > BNX2_MAX_UNICAST_ADDRESSES) {
3556 rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS; 3556 rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS;
3557 sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN | 3557 sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN |
3558 BNX2_RPM_SORT_USER0_PROM_VLAN; 3558 BNX2_RPM_SORT_USER0_PROM_VLAN;
3559 } else if (!(dev->flags & IFF_PROMISC)) { 3559 } else if (!(dev->flags & IFF_PROMISC)) {
3560 /* Add all entries into to the match filter list */ 3560 /* Add all entries into to the match filter list */
3561 i = 0; 3561 i = 0;
3562 list_for_each_entry(ha, &dev->uc_list, list) { 3562 list_for_each_entry(ha, &dev->uc.list, list) {
3563 bnx2_set_mac_addr(bp, ha->addr, 3563 bnx2_set_mac_addr(bp, ha->addr,
3564 i + BNX2_START_UNICAST_ADDRESS_INDEX); 3564 i + BNX2_START_UNICAST_ADDRESS_INDEX);
3565 sort_mode |= (1 << 3565 sort_mode |= (1 <<
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 0e9b9f9632c1..2df8fb0af701 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -2767,7 +2767,6 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev)
2767 2767
2768 dev_notice(&ndev->dev, "DaVinci EMAC: davinci_emac_remove()\n"); 2768 dev_notice(&ndev->dev, "DaVinci EMAC: davinci_emac_remove()\n");
2769 2769
2770 clk_disable(emac_clk);
2771 platform_set_drvdata(pdev, NULL); 2770 platform_set_drvdata(pdev, NULL);
2772 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2771 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2773 mdiobus_unregister(priv->mii_bus); 2772 mdiobus_unregister(priv->mii_bus);
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index f7929e89eb03..efa680f4b8dd 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2895,12 +2895,13 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
2895 2895
2896static int __e100_power_off(struct pci_dev *pdev, bool wake) 2896static int __e100_power_off(struct pci_dev *pdev, bool wake)
2897{ 2897{
2898 if (wake) { 2898 if (wake)
2899 return pci_prepare_to_sleep(pdev); 2899 return pci_prepare_to_sleep(pdev);
2900 } else { 2900
2901 pci_wake_from_d3(pdev, false); 2901 pci_wake_from_d3(pdev, false);
2902 return pci_set_power_state(pdev, PCI_D3hot); 2902 pci_set_power_state(pdev, PCI_D3hot);
2903 } 2903
2904 return 0;
2904} 2905}
2905 2906
2906#ifdef CONFIG_PM 2907#ifdef CONFIG_PM
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8d36743c8140..5e3356f8eb5a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2370,7 +2370,7 @@ static void e1000_set_rx_mode(struct net_device *netdev)
2370 rctl |= E1000_RCTL_VFE; 2370 rctl |= E1000_RCTL_VFE;
2371 } 2371 }
2372 2372
2373 if (netdev->uc_count > rar_entries - 1) { 2373 if (netdev->uc.count > rar_entries - 1) {
2374 rctl |= E1000_RCTL_UPE; 2374 rctl |= E1000_RCTL_UPE;
2375 } else if (!(netdev->flags & IFF_PROMISC)) { 2375 } else if (!(netdev->flags & IFF_PROMISC)) {
2376 rctl &= ~E1000_RCTL_UPE; 2376 rctl &= ~E1000_RCTL_UPE;
@@ -2394,7 +2394,7 @@ static void e1000_set_rx_mode(struct net_device *netdev)
2394 */ 2394 */
2395 i = 1; 2395 i = 1;
2396 if (use_uc) 2396 if (use_uc)
2397 list_for_each_entry(ha, &netdev->uc_list, list) { 2397 list_for_each_entry(ha, &netdev->uc.list, list) {
2398 if (i == rar_entries) 2398 if (i == rar_entries)
2399 break; 2399 break;
2400 e1000_rar_set(hw, ha->addr, i++); 2400 e1000_rar_set(hw, ha->addr, i++);
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 7d443405bbe2..cc786333d95c 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -948,7 +948,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
948 /* Start with safe defaults for link connection */ 948 /* Start with safe defaults for link connection */
949 priv->speed = 100; 949 priv->speed = 100;
950 priv->duplex = DUPLEX_HALF; 950 priv->duplex = DUPLEX_HALF;
951 priv->mdio_speed = ((mpc52xx_find_ipb_freq(op->node) >> 20) / 5) << 1; 951 priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1;
952 952
953 /* The current speed preconfigures the speed of the MII link */ 953 /* The current speed preconfigures the speed of the MII link */
954 prop = of_get_property(op->node, "current-speed", &prop_size); 954 prop = of_get_property(op->node, "current-speed", &prop_size);
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index fec9f245116b..31e6d62b785d 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -106,7 +106,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
106 106
107 /* set MII speed */ 107 /* set MII speed */
108 out_be32(&priv->regs->mii_speed, 108 out_be32(&priv->regs->mii_speed,
109 ((mpc52xx_find_ipb_freq(of->node) >> 20) / 5) << 1); 109 ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1);
110 110
111 err = of_mdiobus_register(bus, np); 111 err = of_mdiobus_register(bus, np);
112 if (err) 112 if (err)
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index b60a3041b64c..1094d292630f 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -719,7 +719,8 @@ static const struct register_test nv_registers_test[] = {
719struct nv_skb_map { 719struct nv_skb_map {
720 struct sk_buff *skb; 720 struct sk_buff *skb;
721 dma_addr_t dma; 721 dma_addr_t dma;
722 unsigned int dma_len; 722 unsigned int dma_len:31;
723 unsigned int dma_single:1;
723 struct ring_desc_ex *first_tx_desc; 724 struct ring_desc_ex *first_tx_desc;
724 struct nv_skb_map *next_tx_ctx; 725 struct nv_skb_map *next_tx_ctx;
725}; 726};
@@ -1912,6 +1913,7 @@ static void nv_init_tx(struct net_device *dev)
1912 np->tx_skb[i].skb = NULL; 1913 np->tx_skb[i].skb = NULL;
1913 np->tx_skb[i].dma = 0; 1914 np->tx_skb[i].dma = 0;
1914 np->tx_skb[i].dma_len = 0; 1915 np->tx_skb[i].dma_len = 0;
1916 np->tx_skb[i].dma_single = 0;
1915 np->tx_skb[i].first_tx_desc = NULL; 1917 np->tx_skb[i].first_tx_desc = NULL;
1916 np->tx_skb[i].next_tx_ctx = NULL; 1918 np->tx_skb[i].next_tx_ctx = NULL;
1917 } 1919 }
@@ -1930,23 +1932,30 @@ static int nv_init_ring(struct net_device *dev)
1930 return nv_alloc_rx_optimized(dev); 1932 return nv_alloc_rx_optimized(dev);
1931} 1933}
1932 1934
1933static int nv_release_txskb(struct net_device *dev, struct nv_skb_map* tx_skb) 1935static void nv_unmap_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)
1934{ 1936{
1935 struct fe_priv *np = netdev_priv(dev);
1936
1937 if (tx_skb->dma) { 1937 if (tx_skb->dma) {
1938 pci_unmap_page(np->pci_dev, tx_skb->dma, 1938 if (tx_skb->dma_single)
1939 tx_skb->dma_len, 1939 pci_unmap_single(np->pci_dev, tx_skb->dma,
1940 PCI_DMA_TODEVICE); 1940 tx_skb->dma_len,
1941 PCI_DMA_TODEVICE);
1942 else
1943 pci_unmap_page(np->pci_dev, tx_skb->dma,
1944 tx_skb->dma_len,
1945 PCI_DMA_TODEVICE);
1941 tx_skb->dma = 0; 1946 tx_skb->dma = 0;
1942 } 1947 }
1948}
1949
1950static int nv_release_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)
1951{
1952 nv_unmap_txskb(np, tx_skb);
1943 if (tx_skb->skb) { 1953 if (tx_skb->skb) {
1944 dev_kfree_skb_any(tx_skb->skb); 1954 dev_kfree_skb_any(tx_skb->skb);
1945 tx_skb->skb = NULL; 1955 tx_skb->skb = NULL;
1946 return 1; 1956 return 1;
1947 } else {
1948 return 0;
1949 } 1957 }
1958 return 0;
1950} 1959}
1951 1960
1952static void nv_drain_tx(struct net_device *dev) 1961static void nv_drain_tx(struct net_device *dev)
@@ -1964,10 +1973,11 @@ static void nv_drain_tx(struct net_device *dev)
1964 np->tx_ring.ex[i].bufhigh = 0; 1973 np->tx_ring.ex[i].bufhigh = 0;
1965 np->tx_ring.ex[i].buflow = 0; 1974 np->tx_ring.ex[i].buflow = 0;
1966 } 1975 }
1967 if (nv_release_txskb(dev, &np->tx_skb[i])) 1976 if (nv_release_txskb(np, &np->tx_skb[i]))
1968 dev->stats.tx_dropped++; 1977 dev->stats.tx_dropped++;
1969 np->tx_skb[i].dma = 0; 1978 np->tx_skb[i].dma = 0;
1970 np->tx_skb[i].dma_len = 0; 1979 np->tx_skb[i].dma_len = 0;
1980 np->tx_skb[i].dma_single = 0;
1971 np->tx_skb[i].first_tx_desc = NULL; 1981 np->tx_skb[i].first_tx_desc = NULL;
1972 np->tx_skb[i].next_tx_ctx = NULL; 1982 np->tx_skb[i].next_tx_ctx = NULL;
1973 } 1983 }
@@ -2171,6 +2181,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
2171 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, 2181 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt,
2172 PCI_DMA_TODEVICE); 2182 PCI_DMA_TODEVICE);
2173 np->put_tx_ctx->dma_len = bcnt; 2183 np->put_tx_ctx->dma_len = bcnt;
2184 np->put_tx_ctx->dma_single = 1;
2174 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); 2185 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma);
2175 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags); 2186 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags);
2176 2187
@@ -2196,6 +2207,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
2196 np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, 2207 np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt,
2197 PCI_DMA_TODEVICE); 2208 PCI_DMA_TODEVICE);
2198 np->put_tx_ctx->dma_len = bcnt; 2209 np->put_tx_ctx->dma_len = bcnt;
2210 np->put_tx_ctx->dma_single = 0;
2199 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); 2211 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma);
2200 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags); 2212 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags);
2201 2213
@@ -2291,6 +2303,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
2291 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, 2303 np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt,
2292 PCI_DMA_TODEVICE); 2304 PCI_DMA_TODEVICE);
2293 np->put_tx_ctx->dma_len = bcnt; 2305 np->put_tx_ctx->dma_len = bcnt;
2306 np->put_tx_ctx->dma_single = 1;
2294 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); 2307 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma));
2295 put_tx->buflow = cpu_to_le32(dma_low(np->put_tx_ctx->dma)); 2308 put_tx->buflow = cpu_to_le32(dma_low(np->put_tx_ctx->dma));
2296 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags); 2309 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags);
@@ -2317,6 +2330,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
2317 np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, 2330 np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt,
2318 PCI_DMA_TODEVICE); 2331 PCI_DMA_TODEVICE);
2319 np->put_tx_ctx->dma_len = bcnt; 2332 np->put_tx_ctx->dma_len = bcnt;
2333 np->put_tx_ctx->dma_single = 0;
2320 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); 2334 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma));
2321 put_tx->buflow = cpu_to_le32(dma_low(np->put_tx_ctx->dma)); 2335 put_tx->buflow = cpu_to_le32(dma_low(np->put_tx_ctx->dma));
2322 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags); 2336 put_tx->flaglen = cpu_to_le32((bcnt-1) | tx_flags);
@@ -2434,10 +2448,7 @@ static int nv_tx_done(struct net_device *dev, int limit)
2434 dprintk(KERN_DEBUG "%s: nv_tx_done: flags 0x%x.\n", 2448 dprintk(KERN_DEBUG "%s: nv_tx_done: flags 0x%x.\n",
2435 dev->name, flags); 2449 dev->name, flags);
2436 2450
2437 pci_unmap_page(np->pci_dev, np->get_tx_ctx->dma, 2451 nv_unmap_txskb(np, np->get_tx_ctx);
2438 np->get_tx_ctx->dma_len,
2439 PCI_DMA_TODEVICE);
2440 np->get_tx_ctx->dma = 0;
2441 2452
2442 if (np->desc_ver == DESC_VER_1) { 2453 if (np->desc_ver == DESC_VER_1) {
2443 if (flags & NV_TX_LASTPACKET) { 2454 if (flags & NV_TX_LASTPACKET) {
@@ -2502,10 +2513,7 @@ static int nv_tx_done_optimized(struct net_device *dev, int limit)
2502 dprintk(KERN_DEBUG "%s: nv_tx_done_optimized: flags 0x%x.\n", 2513 dprintk(KERN_DEBUG "%s: nv_tx_done_optimized: flags 0x%x.\n",
2503 dev->name, flags); 2514 dev->name, flags);
2504 2515
2505 pci_unmap_page(np->pci_dev, np->get_tx_ctx->dma, 2516 nv_unmap_txskb(np, np->get_tx_ctx);
2506 np->get_tx_ctx->dma_len,
2507 PCI_DMA_TODEVICE);
2508 np->get_tx_ctx->dma = 0;
2509 2517
2510 if (flags & NV_TX2_LASTPACKET) { 2518 if (flags & NV_TX2_LASTPACKET) {
2511 if (!(flags & NV_TX2_ERROR)) 2519 if (!(flags & NV_TX2_ERROR))
@@ -5091,7 +5099,7 @@ static int nv_loopback_test(struct net_device *dev)
5091 dprintk(KERN_DEBUG "%s: loopback - did not receive test packet\n", dev->name); 5099 dprintk(KERN_DEBUG "%s: loopback - did not receive test packet\n", dev->name);
5092 } 5100 }
5093 5101
5094 pci_unmap_page(np->pci_dev, test_dma_addr, 5102 pci_unmap_single(np->pci_dev, test_dma_addr,
5095 (skb_end_pointer(tx_skb) - tx_skb->data), 5103 (skb_end_pointer(tx_skb) - tx_skb->data),
5096 PCI_DMA_TODEVICE); 5104 PCI_DMA_TODEVICE);
5097 dev_kfree_skb_any(tx_skb); 5105 dev_kfree_skb_any(tx_skb);
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 5105548ad50c..abcd19a8bff9 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -260,7 +260,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
260 */ 260 */
261 if (!netif_running(dev)) { 261 if (!netif_running(dev)) {
262 kfree_skb(skb); 262 kfree_skb(skb);
263 return -ENODEV; 263 return NETDEV_TX_OK;
264 } 264 }
265 265
266 skb_pull(skb, 1); 266 skb_pull(skb, 1);
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index 8feda9fe8297..1d3429a415e6 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -1495,13 +1495,8 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
1495 hp100_outw(0x4210, TRACE); 1495 hp100_outw(0x4210, TRACE);
1496 printk("hp100: %s: start_xmit_bm\n", dev->name); 1496 printk("hp100: %s: start_xmit_bm\n", dev->name);
1497#endif 1497#endif
1498
1499 if (skb == NULL) {
1500 return 0;
1501 }
1502
1503 if (skb->len <= 0) 1498 if (skb->len <= 0)
1504 return 0; 1499 goto drop;
1505 1500
1506 if (lp->chip == HP100_CHIPID_SHASTA && skb_padto(skb, ETH_ZLEN)) 1501 if (lp->chip == HP100_CHIPID_SHASTA && skb_padto(skb, ETH_ZLEN))
1507 return 0; 1502 return 0;
@@ -1514,10 +1509,10 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
1514#endif 1509#endif
1515 /* not waited long enough since last tx? */ 1510 /* not waited long enough since last tx? */
1516 if (time_before(jiffies, dev->trans_start + HZ)) 1511 if (time_before(jiffies, dev->trans_start + HZ))
1517 return -EAGAIN; 1512 goto drop;
1518 1513
1519 if (hp100_check_lan(dev)) 1514 if (hp100_check_lan(dev))
1520 return -EIO; 1515 goto drop;
1521 1516
1522 if (lp->lan_type == HP100_LAN_100 && lp->hub_status < 0) { 1517 if (lp->lan_type == HP100_LAN_100 && lp->hub_status < 0) {
1523 /* we have a 100Mb/s adapter but it isn't connected to hub */ 1518 /* we have a 100Mb/s adapter but it isn't connected to hub */
@@ -1551,7 +1546,7 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
1551 } 1546 }
1552 1547
1553 dev->trans_start = jiffies; 1548 dev->trans_start = jiffies;
1554 return -EAGAIN; 1549 goto drop;
1555 } 1550 }
1556 1551
1557 /* 1552 /*
@@ -1591,6 +1586,10 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
1591 dev->trans_start = jiffies; 1586 dev->trans_start = jiffies;
1592 1587
1593 return 0; 1588 return 0;
1589
1590drop:
1591 dev_kfree_skb(skb);
1592 return NETDEV_TX_OK;
1594} 1593}
1595 1594
1596 1595
@@ -1648,16 +1647,11 @@ static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev)
1648 hp100_outw(0x4212, TRACE); 1647 hp100_outw(0x4212, TRACE);
1649 printk("hp100: %s: start_xmit\n", dev->name); 1648 printk("hp100: %s: start_xmit\n", dev->name);
1650#endif 1649#endif
1651
1652 if (skb == NULL) {
1653 return 0;
1654 }
1655
1656 if (skb->len <= 0) 1650 if (skb->len <= 0)
1657 return 0; 1651 goto drop;
1658 1652
1659 if (hp100_check_lan(dev)) 1653 if (hp100_check_lan(dev))
1660 return -EIO; 1654 goto drop;
1661 1655
1662 /* If there is not enough free memory on the card... */ 1656 /* If there is not enough free memory on the card... */
1663 i = hp100_inl(TX_MEM_FREE) & 0x7fffffff; 1657 i = hp100_inl(TX_MEM_FREE) & 0x7fffffff;
@@ -1671,7 +1665,7 @@ static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev)
1671 printk("hp100: %s: trans_start timing problem\n", 1665 printk("hp100: %s: trans_start timing problem\n",
1672 dev->name); 1666 dev->name);
1673#endif 1667#endif
1674 return -EAGAIN; 1668 goto drop;
1675 } 1669 }
1676 if (lp->lan_type == HP100_LAN_100 && lp->hub_status < 0) { 1670 if (lp->lan_type == HP100_LAN_100 && lp->hub_status < 0) {
1677 /* we have a 100Mb/s adapter but it isn't connected to hub */ 1671 /* we have a 100Mb/s adapter but it isn't connected to hub */
@@ -1705,7 +1699,7 @@ static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev)
1705 } 1699 }
1706 } 1700 }
1707 dev->trans_start = jiffies; 1701 dev->trans_start = jiffies;
1708 return -EAGAIN; 1702 goto drop;
1709 } 1703 }
1710 1704
1711 for (i = 0; i < 6000 && (hp100_inb(OPTION_MSW) & HP100_TX_CMD); i++) { 1705 for (i = 0; i < 6000 && (hp100_inb(OPTION_MSW) & HP100_TX_CMD); i++) {
@@ -1759,6 +1753,11 @@ static int hp100_start_xmit(struct sk_buff *skb, struct net_device *dev)
1759#endif 1753#endif
1760 1754
1761 return 0; 1755 return 0;
1756
1757drop:
1758 dev_kfree_skb(skb);
1759 return NETDEV_TX_OK;
1760
1762} 1761}
1763 1762
1764 1763
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 22aadb7884fa..2bc9d63027db 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -1281,7 +1281,7 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter)
1281 /* Setup the HW Tx Head and Tail descriptor pointers */ 1281 /* Setup the HW Tx Head and Tail descriptor pointers */
1282 ew32(TDLEN(0), tx_ring->count * sizeof(union e1000_adv_tx_desc)); 1282 ew32(TDLEN(0), tx_ring->count * sizeof(union e1000_adv_tx_desc));
1283 tdba = tx_ring->dma; 1283 tdba = tx_ring->dma;
1284 ew32(TDBAL(0), (tdba & DMA_32BIT_MASK)); 1284 ew32(TDBAL(0), (tdba & DMA_BIT_MASK(32)));
1285 ew32(TDBAH(0), (tdba >> 32)); 1285 ew32(TDBAH(0), (tdba >> 32));
1286 ew32(TDH(0), 0); 1286 ew32(TDH(0), 0);
1287 ew32(TDT(0), 0); 1287 ew32(TDT(0), 0);
@@ -1367,7 +1367,7 @@ static void igbvf_configure_rx(struct igbvf_adapter *adapter)
1367 * the Base and Length of the Rx Descriptor Ring 1367 * the Base and Length of the Rx Descriptor Ring
1368 */ 1368 */
1369 rdba = rx_ring->dma; 1369 rdba = rx_ring->dma;
1370 ew32(RDBAL(0), (rdba & DMA_32BIT_MASK)); 1370 ew32(RDBAL(0), (rdba & DMA_BIT_MASK(32)));
1371 ew32(RDBAH(0), (rdba >> 32)); 1371 ew32(RDBAH(0), (rdba >> 32));
1372 ew32(RDLEN(0), rx_ring->count * sizeof(union e1000_adv_rx_desc)); 1372 ew32(RDLEN(0), rx_ring->count * sizeof(union e1000_adv_rx_desc));
1373 rx_ring->head = E1000_RDH(0); 1373 rx_ring->head = E1000_RDH(0);
@@ -2628,15 +2628,16 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
2628 return err; 2628 return err;
2629 2629
2630 pci_using_dac = 0; 2630 pci_using_dac = 0;
2631 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 2631 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
2632 if (!err) { 2632 if (!err) {
2633 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 2633 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
2634 if (!err) 2634 if (!err)
2635 pci_using_dac = 1; 2635 pci_using_dac = 1;
2636 } else { 2636 } else {
2637 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2637 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2638 if (err) { 2638 if (err) {
2639 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 2639 err = pci_set_consistent_dma_mask(pdev,
2640 DMA_BIT_MASK(32));
2640 if (err) { 2641 if (err) {
2641 dev_err(&pdev->dev, "No usable DMA " 2642 dev_err(&pdev->dev, "No usable DMA "
2642 "configuration, aborting\n"); 2643 "configuration, aborting\n");
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index 3c3bf1f07b81..fa9f24e23683 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -251,7 +251,7 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
251 /* program DMA context */ 251 /* program DMA context */
252 hw = &adapter->hw; 252 hw = &adapter->hw;
253 spin_lock_bh(&fcoe->lock); 253 spin_lock_bh(&fcoe->lock);
254 IXGBE_WRITE_REG(hw, IXGBE_FCPTRL, ddp->udp & DMA_32BIT_MASK); 254 IXGBE_WRITE_REG(hw, IXGBE_FCPTRL, ddp->udp & DMA_BIT_MASK(32));
255 IXGBE_WRITE_REG(hw, IXGBE_FCPTRH, (u64)ddp->udp >> 32); 255 IXGBE_WRITE_REG(hw, IXGBE_FCPTRH, (u64)ddp->udp >> 32);
256 IXGBE_WRITE_REG(hw, IXGBE_FCBUFF, fcbuff); 256 IXGBE_WRITE_REG(hw, IXGBE_FCBUFF, fcbuff);
257 IXGBE_WRITE_REG(hw, IXGBE_FCDMARW, fcdmarw); 257 IXGBE_WRITE_REG(hw, IXGBE_FCDMARW, fcdmarw);
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a551a96ce676..e756e220db32 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2321,7 +2321,7 @@ static void ixgbe_set_rx_mode(struct net_device *netdev)
2321 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); 2321 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl);
2322 2322
2323 /* reprogram secondary unicast list */ 2323 /* reprogram secondary unicast list */
2324 hw->mac.ops.update_uc_addr_list(hw, &netdev->uc_list); 2324 hw->mac.ops.update_uc_addr_list(hw, &netdev->uc.list);
2325 2325
2326 /* reprogram multicast list */ 2326 /* reprogram multicast list */
2327 addr_count = netdev->mc_count; 2327 addr_count = netdev->mc_count;
@@ -5261,7 +5261,7 @@ static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
5261 5261
5262/** 5262/**
5263 * ixgbe_add_sanmac_netdev - Add the SAN MAC address to the corresponding 5263 * ixgbe_add_sanmac_netdev - Add the SAN MAC address to the corresponding
5264 * netdev->dev_addr_list 5264 * netdev->dev_addrs
5265 * @netdev: network interface device structure 5265 * @netdev: network interface device structure
5266 * 5266 *
5267 * Returns non-zero on failure 5267 * Returns non-zero on failure
@@ -5282,7 +5282,7 @@ static int ixgbe_add_sanmac_netdev(struct net_device *dev)
5282 5282
5283/** 5283/**
5284 * ixgbe_del_sanmac_netdev - Removes the SAN MAC address to the corresponding 5284 * ixgbe_del_sanmac_netdev - Removes the SAN MAC address to the corresponding
5285 * netdev->dev_addr_list 5285 * netdev->dev_addrs
5286 * @netdev: network interface device structure 5286 * @netdev: network interface device structure
5287 * 5287 *
5288 * Returns non-zero on failure 5288 * Returns non-zero on failure
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index b4e18a58cb1b..745ae8b4a2e8 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1729,7 +1729,7 @@ static u32 uc_addr_filter_mask(struct net_device *dev)
1729 return 0; 1729 return 0;
1730 1730
1731 nibbles = 1 << (dev->dev_addr[5] & 0x0f); 1731 nibbles = 1 << (dev->dev_addr[5] & 0x0f);
1732 list_for_each_entry(ha, &dev->uc_list, list) { 1732 list_for_each_entry(ha, &dev->uc.list, list) {
1733 if (memcmp(dev->dev_addr, ha->addr, 5)) 1733 if (memcmp(dev->dev_addr, ha->addr, 5))
1734 return 0; 1734 return 0;
1735 if ((dev->dev_addr[5] ^ ha->addr[5]) & 0xf0) 1735 if ((dev->dev_addr[5] ^ ha->addr[5]) & 0xf0)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index ab11c2b3f0fe..970cedeb5f37 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -169,6 +169,7 @@
169#define MAX_NUM_CARDS 4 169#define MAX_NUM_CARDS 4
170 170
171#define MAX_BUFFERS_PER_CMD 32 171#define MAX_BUFFERS_PER_CMD 32
172#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + 4)
172 173
173/* 174/*
174 * Following are the states of the Phantom. Phantom will set them and 175 * Following are the states of the Phantom. Phantom will set them and
@@ -1436,7 +1437,7 @@ int netxen_nic_set_mac(struct net_device *netdev, void *p);
1436struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev); 1437struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev);
1437 1438
1438void netxen_nic_update_cmd_producer(struct netxen_adapter *adapter, 1439void netxen_nic_update_cmd_producer(struct netxen_adapter *adapter,
1439 struct nx_host_tx_ring *tx_ring, uint32_t crb_producer); 1440 struct nx_host_tx_ring *tx_ring);
1440 1441
1441/* 1442/*
1442 * NetXen Board information 1443 * NetXen Board information
@@ -1538,6 +1539,14 @@ dma_watchdog_wakeup(struct netxen_adapter *adapter)
1538} 1539}
1539 1540
1540 1541
1542static inline u32 netxen_tx_avail(struct nx_host_tx_ring *tx_ring)
1543{
1544 smp_mb();
1545 return find_diff_among(tx_ring->producer,
1546 tx_ring->sw_consumer, tx_ring->num_desc);
1547
1548}
1549
1541int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac); 1550int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac);
1542int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac); 1551int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac);
1543extern void netxen_change_ringparam(struct netxen_adapter *adapter); 1552extern void netxen_change_ringparam(struct netxen_adapter *adapter);
diff --git a/drivers/net/netxen/netxen_nic_hdr.h b/drivers/net/netxen/netxen_nic_hdr.h
index 7f0ddbfa7b28..3cc047844af3 100644
--- a/drivers/net/netxen/netxen_nic_hdr.h
+++ b/drivers/net/netxen/netxen_nic_hdr.h
@@ -355,6 +355,7 @@ enum {
355#define NETXEN_HW_CRB_HUB_AGT_ADR_LPC \ 355#define NETXEN_HW_CRB_HUB_AGT_ADR_LPC \
356 ((NETXEN_HW_H6_CH_HUB_ADR << 7) | NETXEN_HW_LPC_CRB_AGT_ADR) 356 ((NETXEN_HW_H6_CH_HUB_ADR << 7) | NETXEN_HW_LPC_CRB_AGT_ADR)
357 357
358#define NETXEN_SRE_MISC (NETXEN_CRB_SRE + 0x0002c)
358#define NETXEN_SRE_INT_STATUS (NETXEN_CRB_SRE + 0x00034) 359#define NETXEN_SRE_INT_STATUS (NETXEN_CRB_SRE + 0x00034)
359#define NETXEN_SRE_PBI_ACTIVE_STATUS (NETXEN_CRB_SRE + 0x01014) 360#define NETXEN_SRE_PBI_ACTIVE_STATUS (NETXEN_CRB_SRE + 0x01014)
360#define NETXEN_SRE_L1RE_CTL (NETXEN_CRB_SRE + 0x03000) 361#define NETXEN_SRE_L1RE_CTL (NETXEN_CRB_SRE + 0x03000)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 42ffb825ebf1..ce3b89d2cbb6 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -488,7 +488,7 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
488 488
489 tx_ring->producer = producer; 489 tx_ring->producer = producer;
490 490
491 netxen_nic_update_cmd_producer(adapter, tx_ring, producer); 491 netxen_nic_update_cmd_producer(adapter, tx_ring);
492 492
493 netif_tx_unlock_bh(adapter->netdev); 493 netif_tx_unlock_bh(adapter->netdev);
494 494
@@ -2041,8 +2041,8 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter)
2041 fw_major, fw_minor, fw_build); 2041 fw_major, fw_minor, fw_build);
2042 2042
2043 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { 2043 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
2044 i = NXRD32(adapter, NETXEN_MIU_MN_CONTROL); 2044 i = NXRD32(adapter, NETXEN_SRE_MISC);
2045 adapter->ahw.cut_through = (i & 0x4) ? 1 : 0; 2045 adapter->ahw.cut_through = (i & 0x8000) ? 1 : 0;
2046 dev_info(&pdev->dev, "firmware running in %s mode\n", 2046 dev_info(&pdev->dev, "firmware running in %s mode\n",
2047 adapter->ahw.cut_through ? "cut-through" : "legacy"); 2047 adapter->ahw.cut_through ? "cut-through" : "legacy");
2048 } 2048 }
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 6f77ad58e3b3..bdb143d2b5c7 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1292,7 +1292,6 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter)
1292 return 1; 1292 return 1;
1293 1293
1294 sw_consumer = tx_ring->sw_consumer; 1294 sw_consumer = tx_ring->sw_consumer;
1295 barrier(); /* hw_consumer can change underneath */
1296 hw_consumer = le32_to_cpu(*(tx_ring->hw_consumer)); 1295 hw_consumer = le32_to_cpu(*(tx_ring->hw_consumer));
1297 1296
1298 while (sw_consumer != hw_consumer) { 1297 while (sw_consumer != hw_consumer) {
@@ -1319,14 +1318,15 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter)
1319 break; 1318 break;
1320 } 1319 }
1321 1320
1322 tx_ring->sw_consumer = sw_consumer;
1323
1324 if (count && netif_running(netdev)) { 1321 if (count && netif_running(netdev)) {
1322 tx_ring->sw_consumer = sw_consumer;
1323
1325 smp_mb(); 1324 smp_mb();
1325
1326 if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev)) { 1326 if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev)) {
1327 netif_tx_lock(netdev); 1327 netif_tx_lock(netdev);
1328 netif_wake_queue(netdev); 1328 if (netxen_tx_avail(tx_ring) > TX_STOP_THRESH)
1329 smp_mb(); 1329 netif_wake_queue(netdev);
1330 netif_tx_unlock(netdev); 1330 netif_tx_unlock(netdev);
1331 } 1331 }
1332 } 1332 }
@@ -1343,7 +1343,6 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter)
1343 * There is still a possible race condition and the host could miss an 1343 * There is still a possible race condition and the host could miss an
1344 * interrupt. The card has to take care of this. 1344 * interrupt. The card has to take care of this.
1345 */ 1345 */
1346 barrier(); /* hw_consumer can change underneath */
1347 hw_consumer = le32_to_cpu(*(tx_ring->hw_consumer)); 1346 hw_consumer = le32_to_cpu(*(tx_ring->hw_consumer));
1348 done = (sw_consumer == hw_consumer); 1347 done = (sw_consumer == hw_consumer);
1349 spin_unlock(&adapter->tx_clean_lock); 1348 spin_unlock(&adapter->tx_clean_lock);
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 98737ef72936..71daa3d5f114 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -107,9 +107,14 @@ static uint32_t crb_cmd_producer[4] = {
107 107
108void 108void
109netxen_nic_update_cmd_producer(struct netxen_adapter *adapter, 109netxen_nic_update_cmd_producer(struct netxen_adapter *adapter,
110 struct nx_host_tx_ring *tx_ring, u32 producer) 110 struct nx_host_tx_ring *tx_ring)
111{ 111{
112 NXWR32(adapter, tx_ring->crb_cmd_producer, producer); 112 NXWR32(adapter, tx_ring->crb_cmd_producer, tx_ring->producer);
113
114 if (netxen_tx_avail(tx_ring) <= TX_STOP_THRESH) {
115 netif_stop_queue(adapter->netdev);
116 smp_mb();
117 }
113} 118}
114 119
115static uint32_t crb_cmd_consumer[4] = { 120static uint32_t crb_cmd_consumer[4] = {
@@ -119,9 +124,9 @@ static uint32_t crb_cmd_consumer[4] = {
119 124
120static inline void 125static inline void
121netxen_nic_update_cmd_consumer(struct netxen_adapter *adapter, 126netxen_nic_update_cmd_consumer(struct netxen_adapter *adapter,
122 struct nx_host_tx_ring *tx_ring, u32 consumer) 127 struct nx_host_tx_ring *tx_ring)
123{ 128{
124 NXWR32(adapter, tx_ring->crb_cmd_consumer, consumer); 129 NXWR32(adapter, tx_ring->crb_cmd_consumer, tx_ring->sw_consumer);
125} 130}
126 131
127static uint32_t msi_tgt_status[8] = { 132static uint32_t msi_tgt_status[8] = {
@@ -900,8 +905,11 @@ netxen_nic_attach(struct netxen_adapter *adapter)
900 tx_ring->crb_cmd_producer = crb_cmd_producer[adapter->portnum]; 905 tx_ring->crb_cmd_producer = crb_cmd_producer[adapter->portnum];
901 tx_ring->crb_cmd_consumer = crb_cmd_consumer[adapter->portnum]; 906 tx_ring->crb_cmd_consumer = crb_cmd_consumer[adapter->portnum];
902 907
903 netxen_nic_update_cmd_producer(adapter, tx_ring, 0); 908 tx_ring->producer = 0;
904 netxen_nic_update_cmd_consumer(adapter, tx_ring, 0); 909 tx_ring->sw_consumer = 0;
910
911 netxen_nic_update_cmd_producer(adapter, tx_ring);
912 netxen_nic_update_cmd_consumer(adapter, tx_ring);
905 } 913 }
906 914
907 for (ring = 0; ring < adapter->max_rds_rings; ring++) { 915 for (ring = 0; ring < adapter->max_rds_rings; ring++) {
@@ -1362,7 +1370,7 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1362 dma_addr_t temp_dma; 1370 dma_addr_t temp_dma;
1363 int i, k; 1371 int i, k;
1364 1372
1365 u32 producer, consumer; 1373 u32 producer;
1366 int frag_count, no_of_desc; 1374 int frag_count, no_of_desc;
1367 u32 num_txd = tx_ring->num_desc; 1375 u32 num_txd = tx_ring->num_desc;
1368 bool is_tso = false; 1376 bool is_tso = false;
@@ -1372,15 +1380,13 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1372 /* 4 fragments per cmd des */ 1380 /* 4 fragments per cmd des */
1373 no_of_desc = (frag_count + 3) >> 2; 1381 no_of_desc = (frag_count + 3) >> 2;
1374 1382
1375 producer = tx_ring->producer; 1383 if (unlikely(no_of_desc + 2) > netxen_tx_avail(tx_ring)) {
1376 smp_mb();
1377 consumer = tx_ring->sw_consumer;
1378 if ((no_of_desc+2) >= find_diff_among(producer, consumer, num_txd)) {
1379 netif_stop_queue(netdev); 1384 netif_stop_queue(netdev);
1380 smp_mb();
1381 return NETDEV_TX_BUSY; 1385 return NETDEV_TX_BUSY;
1382 } 1386 }
1383 1387
1388 producer = tx_ring->producer;
1389
1384 hwdesc = &tx_ring->desc_head[producer]; 1390 hwdesc = &tx_ring->desc_head[producer];
1385 netxen_clear_cmddesc((u64 *)hwdesc); 1391 netxen_clear_cmddesc((u64 *)hwdesc);
1386 pbuf = &tx_ring->cmd_buf_arr[producer]; 1392 pbuf = &tx_ring->cmd_buf_arr[producer];
@@ -1493,7 +1499,7 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1493 tx_ring->producer = producer; 1499 tx_ring->producer = producer;
1494 adapter->stats.txbytes += skb->len; 1500 adapter->stats.txbytes += skb->len;
1495 1501
1496 netxen_nic_update_cmd_producer(adapter, tx_ring, producer); 1502 netxen_nic_update_cmd_producer(adapter, tx_ring);
1497 1503
1498 adapter->stats.xmitcalled++; 1504 adapter->stats.xmitcalled++;
1499 1505
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index fa61a12c5e15..d2146d4a10f3 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -6376,7 +6376,7 @@ static void niu_set_rx_mode(struct net_device *dev)
6376 if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 0)) 6376 if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 0))
6377 np->flags |= NIU_FLAGS_MCAST; 6377 np->flags |= NIU_FLAGS_MCAST;
6378 6378
6379 alt_cnt = dev->uc_count; 6379 alt_cnt = dev->uc.count;
6380 if (alt_cnt > niu_num_alt_addr(np)) { 6380 if (alt_cnt > niu_num_alt_addr(np)) {
6381 alt_cnt = 0; 6381 alt_cnt = 0;
6382 np->flags |= NIU_FLAGS_PROMISC; 6382 np->flags |= NIU_FLAGS_PROMISC;
@@ -6385,7 +6385,7 @@ static void niu_set_rx_mode(struct net_device *dev)
6385 if (alt_cnt) { 6385 if (alt_cnt) {
6386 int index = 0; 6386 int index = 0;
6387 6387
6388 list_for_each_entry(ha, &dev->uc_list, list) { 6388 list_for_each_entry(ha, &dev->uc.list, list) {
6389 err = niu_set_alt_mac(np, index, ha->addr); 6389 err = niu_set_alt_mac(np, index, ha->addr);
6390 if (err) 6390 if (err)
6391 printk(KERN_WARNING PFX "%s: Error %d " 6391 printk(KERN_WARNING PFX "%s: Error %d "
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index a2ece89622d6..eba937c46376 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(get_phy_device);
244 244
245/** 245/**
246 * phy_device_register - Register the phy device on the MDIO bus 246 * phy_device_register - Register the phy device on the MDIO bus
247 * @phy_device: phy_device structure to be added to the MDIO bus 247 * @phydev: phy_device structure to be added to the MDIO bus
248 */ 248 */
249int phy_device_register(struct phy_device *phydev) 249int phy_device_register(struct phy_device *phydev)
250{ 250{
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 2b38f39924a6..d1a5fb4d6acb 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -214,9 +214,10 @@ static void gelic_card_free_chain(struct gelic_card *card,
214 * 214 *
215 * returns 0 on success, <0 on failure 215 * returns 0 on success, <0 on failure
216 */ 216 */
217static int gelic_card_init_chain(struct gelic_card *card, 217static int __devinit gelic_card_init_chain(struct gelic_card *card,
218 struct gelic_descr_chain *chain, 218 struct gelic_descr_chain *chain,
219 struct gelic_descr *start_descr, int no) 219 struct gelic_descr *start_descr,
220 int no)
220{ 221{
221 int i; 222 int i;
222 struct gelic_descr *descr; 223 struct gelic_descr *descr;
@@ -407,7 +408,7 @@ rewind:
407 * 408 *
408 * returns 0 on success, < 0 on failure 409 * returns 0 on success, < 0 on failure
409 */ 410 */
410static int gelic_card_alloc_rx_skbs(struct gelic_card *card) 411static int __devinit gelic_card_alloc_rx_skbs(struct gelic_card *card)
411{ 412{
412 struct gelic_descr_chain *chain; 413 struct gelic_descr_chain *chain;
413 int ret; 414 int ret;
@@ -1422,8 +1423,8 @@ static const struct net_device_ops gelic_netdevice_ops = {
1422 * 1423 *
1423 * fills out function pointers in the net_device structure 1424 * fills out function pointers in the net_device structure
1424 */ 1425 */
1425static void gelic_ether_setup_netdev_ops(struct net_device *netdev, 1426static void __devinit gelic_ether_setup_netdev_ops(struct net_device *netdev,
1426 struct napi_struct *napi) 1427 struct napi_struct *napi)
1427{ 1428{
1428 netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT; 1429 netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT;
1429 /* NAPI */ 1430 /* NAPI */
@@ -1443,7 +1444,8 @@ static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
1443 * gelic_ether_setup_netdev initializes the net_device structure 1444 * gelic_ether_setup_netdev initializes the net_device structure
1444 * and register it. 1445 * and register it.
1445 **/ 1446 **/
1446int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card) 1447int __devinit gelic_net_setup_netdev(struct net_device *netdev,
1448 struct gelic_card *card)
1447{ 1449{
1448 int status; 1450 int status;
1449 u64 v1, v2; 1451 u64 v1, v2;
@@ -1491,7 +1493,7 @@ int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card)
1491 * the card and net_device structures are linked to each other 1493 * the card and net_device structures are linked to each other
1492 */ 1494 */
1493#define GELIC_ALIGN (32) 1495#define GELIC_ALIGN (32)
1494static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev) 1496static struct gelic_card * __devinit gelic_alloc_card_net(struct net_device **netdev)
1495{ 1497{
1496 struct gelic_card *card; 1498 struct gelic_card *card;
1497 struct gelic_port *port; 1499 struct gelic_port *port;
@@ -1542,7 +1544,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev)
1542 return card; 1544 return card;
1543} 1545}
1544 1546
1545static void gelic_card_get_vlan_info(struct gelic_card *card) 1547static void __devinit gelic_card_get_vlan_info(struct gelic_card *card)
1546{ 1548{
1547 u64 v1, v2; 1549 u64 v1, v2;
1548 int status; 1550 int status;
@@ -1616,7 +1618,7 @@ static void gelic_card_get_vlan_info(struct gelic_card *card)
1616/** 1618/**
1617 * ps3_gelic_driver_probe - add a device to the control of this driver 1619 * ps3_gelic_driver_probe - add a device to the control of this driver
1618 */ 1620 */
1619static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev) 1621static int __devinit ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
1620{ 1622{
1621 struct gelic_card *card; 1623 struct gelic_card *card;
1622 struct net_device *netdev; 1624 struct net_device *netdev;
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
index 4f3ada622f9b..b6b3ca9bdb21 100644
--- a/drivers/net/ps3_gelic_wireless.c
+++ b/drivers/net/ps3_gelic_wireless.c
@@ -2442,7 +2442,7 @@ static const struct iw_handler_def gelic_wl_wext_handler_def = {
2442#endif 2442#endif
2443}; 2443};
2444 2444
2445static struct net_device *gelic_wl_alloc(struct gelic_card *card) 2445static struct net_device * __devinit gelic_wl_alloc(struct gelic_card *card)
2446{ 2446{
2447 struct net_device *netdev; 2447 struct net_device *netdev;
2448 struct gelic_port *port; 2448 struct gelic_port *port;
@@ -2722,7 +2722,7 @@ static struct ethtool_ops gelic_wl_ethtool_ops = {
2722 .set_rx_csum = gelic_net_set_rx_csum, 2722 .set_rx_csum = gelic_net_set_rx_csum,
2723}; 2723};
2724 2724
2725static void gelic_wl_setup_netdev_ops(struct net_device *netdev) 2725static void __devinit gelic_wl_setup_netdev_ops(struct net_device *netdev)
2726{ 2726{
2727 struct gelic_wl_info *wl; 2727 struct gelic_wl_info *wl;
2728 wl = port_wl(netdev_priv(netdev)); 2728 wl = port_wl(netdev_priv(netdev));
@@ -2738,7 +2738,7 @@ static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
2738/* 2738/*
2739 * driver probe/remove 2739 * driver probe/remove
2740 */ 2740 */
2741int gelic_wl_driver_probe(struct gelic_card *card) 2741int __devinit gelic_wl_driver_probe(struct gelic_card *card)
2742{ 2742{
2743 int ret; 2743 int ret;
2744 struct net_device *netdev; 2744 struct net_device *netdev;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 35196faa084e..4e22462684c9 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3811,22 +3811,11 @@ static struct net_device_stats *rtl8169_get_stats(struct net_device *dev)
3811 3811
3812static void rtl8169_net_suspend(struct net_device *dev) 3812static void rtl8169_net_suspend(struct net_device *dev)
3813{ 3813{
3814 struct rtl8169_private *tp = netdev_priv(dev);
3815 void __iomem *ioaddr = tp->mmio_addr;
3816
3817 if (!netif_running(dev)) 3814 if (!netif_running(dev))
3818 return; 3815 return;
3819 3816
3820 netif_device_detach(dev); 3817 netif_device_detach(dev);
3821 netif_stop_queue(dev); 3818 netif_stop_queue(dev);
3822
3823 spin_lock_irq(&tp->lock);
3824
3825 rtl8169_asic_down(ioaddr);
3826
3827 rtl8169_rx_missed(dev, ioaddr);
3828
3829 spin_unlock_irq(&tp->lock);
3830} 3819}
3831 3820
3832#ifdef CONFIG_PM 3821#ifdef CONFIG_PM
@@ -3876,9 +3865,17 @@ static struct dev_pm_ops rtl8169_pm_ops = {
3876static void rtl_shutdown(struct pci_dev *pdev) 3865static void rtl_shutdown(struct pci_dev *pdev)
3877{ 3866{
3878 struct net_device *dev = pci_get_drvdata(pdev); 3867 struct net_device *dev = pci_get_drvdata(pdev);
3868 struct rtl8169_private *tp = netdev_priv(dev);
3869 void __iomem *ioaddr = tp->mmio_addr;
3879 3870
3880 rtl8169_net_suspend(dev); 3871 rtl8169_net_suspend(dev);
3881 3872
3873 spin_lock_irq(&tp->lock);
3874
3875 rtl8169_asic_down(ioaddr);
3876
3877 spin_unlock_irq(&tp->lock);
3878
3882 if (system_state == SYSTEM_POWER_OFF) { 3879 if (system_state == SYSTEM_POWER_OFF) {
3883 pci_wake_from_d3(pdev, true); 3880 pci_wake_from_d3(pdev, true);
3884 pci_set_power_state(pdev, PCI_D3hot); 3881 pci_set_power_state(pdev, PCI_D3hot);
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index e2247669a495..1f040e8a000b 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1281,7 +1281,7 @@ static u16 sis190_default_phy(struct net_device *dev)
1281 else if (phy_lan) 1281 else if (phy_lan)
1282 phy_default = phy_lan; 1282 phy_default = phy_lan;
1283 else 1283 else
1284 phy_default = list_entry(&tp->first_phy, 1284 phy_default = list_first_entry(&tp->first_phy,
1285 struct sis190_phy, list); 1285 struct sis190_phy, list);
1286 } 1286 }
1287 1287
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 6b5946fe8ae2..7681d28c53d7 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -50,7 +50,7 @@
50#include "sky2.h" 50#include "sky2.h"
51 51
52#define DRV_NAME "sky2" 52#define DRV_NAME "sky2"
53#define DRV_VERSION "1.22" 53#define DRV_VERSION "1.23"
54#define PFX DRV_NAME " " 54#define PFX DRV_NAME " "
55 55
56/* 56/*
@@ -65,9 +65,9 @@
65#define RX_DEF_PENDING RX_MAX_PENDING 65#define RX_DEF_PENDING RX_MAX_PENDING
66 66
67#define TX_RING_SIZE 512 67#define TX_RING_SIZE 512
68#define TX_DEF_PENDING (TX_RING_SIZE - 1) 68#define TX_DEF_PENDING 128
69#define TX_MIN_PENDING 64
70#define MAX_SKB_TX_LE (4 + (sizeof(dma_addr_t)/sizeof(u32))*MAX_SKB_FRAGS) 69#define MAX_SKB_TX_LE (4 + (sizeof(dma_addr_t)/sizeof(u32))*MAX_SKB_FRAGS)
70#define TX_MIN_PENDING (MAX_SKB_TX_LE+1)
71 71
72#define STATUS_RING_SIZE 2048 /* 2 ports * (TX + 2*RX) */ 72#define STATUS_RING_SIZE 2048 /* 2 ports * (TX + 2*RX) */
73#define STATUS_LE_BYTES (STATUS_RING_SIZE*sizeof(struct sky2_status_le)) 73#define STATUS_LE_BYTES (STATUS_RING_SIZE*sizeof(struct sky2_status_le))
@@ -1151,7 +1151,14 @@ stopped:
1151 1151
1152 /* reset the Rx prefetch unit */ 1152 /* reset the Rx prefetch unit */
1153 sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET); 1153 sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET);
1154 mmiowb(); 1154
1155 /* Reset the RAM Buffer receive queue */
1156 sky2_write8(hw, RB_ADDR(rxq, RB_CTRL), RB_RST_SET);
1157
1158 /* Reset Rx MAC FIFO */
1159 sky2_write8(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), GMF_RST_SET);
1160
1161 sky2_read8(hw, B0_CTST);
1155} 1162}
1156 1163
1157/* Clean out receive buffer area, assumes receiver hardware stopped */ 1164/* Clean out receive buffer area, assumes receiver hardware stopped */
@@ -1169,6 +1176,7 @@ static void sky2_rx_clean(struct sky2_port *sky2)
1169 re->skb = NULL; 1176 re->skb = NULL;
1170 } 1177 }
1171 } 1178 }
1179 skb_queue_purge(&sky2->rx_recycle);
1172} 1180}
1173 1181
1174/* Basic MII support */ 1182/* Basic MII support */
@@ -1245,6 +1253,12 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp
1245} 1253}
1246#endif 1254#endif
1247 1255
1256/* Amount of required worst case padding in rx buffer */
1257static inline unsigned sky2_rx_pad(const struct sky2_hw *hw)
1258{
1259 return (hw->flags & SKY2_HW_RAM_BUFFER) ? 8 : 2;
1260}
1261
1248/* 1262/*
1249 * Allocate an skb for receiving. If the MTU is large enough 1263 * Allocate an skb for receiving. If the MTU is large enough
1250 * make the skb non-linear with a fragment list of pages. 1264 * make the skb non-linear with a fragment list of pages.
@@ -1254,6 +1268,13 @@ static struct sk_buff *sky2_rx_alloc(struct sky2_port *sky2)
1254 struct sk_buff *skb; 1268 struct sk_buff *skb;
1255 int i; 1269 int i;
1256 1270
1271 skb = __skb_dequeue(&sky2->rx_recycle);
1272 if (!skb)
1273 skb = netdev_alloc_skb(sky2->netdev, sky2->rx_data_size
1274 + sky2_rx_pad(sky2->hw));
1275 if (!skb)
1276 goto nomem;
1277
1257 if (sky2->hw->flags & SKY2_HW_RAM_BUFFER) { 1278 if (sky2->hw->flags & SKY2_HW_RAM_BUFFER) {
1258 unsigned char *start; 1279 unsigned char *start;
1259 /* 1280 /*
@@ -1262,18 +1283,10 @@ static struct sk_buff *sky2_rx_alloc(struct sky2_port *sky2)
1262 * The buffer returned from netdev_alloc_skb is 1283 * The buffer returned from netdev_alloc_skb is
1263 * aligned except if slab debugging is enabled. 1284 * aligned except if slab debugging is enabled.
1264 */ 1285 */
1265 skb = netdev_alloc_skb(sky2->netdev, sky2->rx_data_size + 8);
1266 if (!skb)
1267 goto nomem;
1268 start = PTR_ALIGN(skb->data, 8); 1286 start = PTR_ALIGN(skb->data, 8);
1269 skb_reserve(skb, start - skb->data); 1287 skb_reserve(skb, start - skb->data);
1270 } else { 1288 } else
1271 skb = netdev_alloc_skb(sky2->netdev,
1272 sky2->rx_data_size + NET_IP_ALIGN);
1273 if (!skb)
1274 goto nomem;
1275 skb_reserve(skb, NET_IP_ALIGN); 1289 skb_reserve(skb, NET_IP_ALIGN);
1276 }
1277 1290
1278 for (i = 0; i < sky2->rx_nfrags; i++) { 1291 for (i = 0; i < sky2->rx_nfrags; i++) {
1279 struct page *page = alloc_page(GFP_ATOMIC); 1292 struct page *page = alloc_page(GFP_ATOMIC);
@@ -1350,6 +1363,8 @@ static int sky2_rx_start(struct sky2_port *sky2)
1350 1363
1351 sky2->rx_data_size = size; 1364 sky2->rx_data_size = size;
1352 1365
1366 skb_queue_head_init(&sky2->rx_recycle);
1367
1353 /* Fill Rx ring */ 1368 /* Fill Rx ring */
1354 for (i = 0; i < sky2->rx_pending; i++) { 1369 for (i = 0; i < sky2->rx_pending; i++) {
1355 re = sky2->rx_ring + i; 1370 re = sky2->rx_ring + i;
@@ -1488,6 +1503,7 @@ static int sky2_up(struct net_device *dev)
1488 imask = sky2_read32(hw, B0_IMSK); 1503 imask = sky2_read32(hw, B0_IMSK);
1489 imask |= portirq_msk[port]; 1504 imask |= portirq_msk[port];
1490 sky2_write32(hw, B0_IMSK, imask); 1505 sky2_write32(hw, B0_IMSK, imask);
1506 sky2_read32(hw, B0_IMSK);
1491 1507
1492 sky2_set_multicast(dev); 1508 sky2_set_multicast(dev);
1493 1509
@@ -1756,14 +1772,22 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done)
1756 } 1772 }
1757 1773
1758 if (le->ctrl & EOP) { 1774 if (le->ctrl & EOP) {
1775 struct sk_buff *skb = re->skb;
1776
1759 if (unlikely(netif_msg_tx_done(sky2))) 1777 if (unlikely(netif_msg_tx_done(sky2)))
1760 printk(KERN_DEBUG "%s: tx done %u\n", 1778 printk(KERN_DEBUG "%s: tx done %u\n",
1761 dev->name, idx); 1779 dev->name, idx);
1762 1780
1763 dev->stats.tx_packets++; 1781 dev->stats.tx_packets++;
1764 dev->stats.tx_bytes += re->skb->len; 1782 dev->stats.tx_bytes += skb->len;
1783
1784 if (skb_queue_len(&sky2->rx_recycle) < sky2->rx_pending
1785 && skb_recycle_check(skb, sky2->rx_data_size
1786 + sky2_rx_pad(sky2->hw)))
1787 __skb_queue_head(&sky2->rx_recycle, skb);
1788 else
1789 dev_kfree_skb_any(skb);
1765 1790
1766 dev_kfree_skb_any(re->skb);
1767 sky2->tx_next = RING_NEXT(idx, TX_RING_SIZE); 1791 sky2->tx_next = RING_NEXT(idx, TX_RING_SIZE);
1768 } 1792 }
1769 } 1793 }
@@ -1805,10 +1829,10 @@ static int sky2_down(struct net_device *dev)
1805 imask = sky2_read32(hw, B0_IMSK); 1829 imask = sky2_read32(hw, B0_IMSK);
1806 imask &= ~portirq_msk[port]; 1830 imask &= ~portirq_msk[port];
1807 sky2_write32(hw, B0_IMSK, imask); 1831 sky2_write32(hw, B0_IMSK, imask);
1832 sky2_read32(hw, B0_IMSK);
1808 1833
1809 synchronize_irq(hw->pdev->irq); 1834 /* Force flow control off */
1810 1835 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);
1811 sky2_gmac_reset(hw, port);
1812 1836
1813 /* Stop transmitter */ 1837 /* Stop transmitter */
1814 sky2_write32(hw, Q_ADDR(txqaddr[port], Q_CSR), BMU_STOP); 1838 sky2_write32(hw, Q_ADDR(txqaddr[port], Q_CSR), BMU_STOP);
@@ -1821,9 +1845,6 @@ static int sky2_down(struct net_device *dev)
1821 ctrl &= ~(GM_GPCR_TX_ENA | GM_GPCR_RX_ENA); 1845 ctrl &= ~(GM_GPCR_TX_ENA | GM_GPCR_RX_ENA);
1822 gma_write16(hw, port, GM_GP_CTRL, ctrl); 1846 gma_write16(hw, port, GM_GP_CTRL, ctrl);
1823 1847
1824 /* Make sure no packets are pending */
1825 napi_synchronize(&hw->napi);
1826
1827 sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); 1848 sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET);
1828 1849
1829 /* Workaround shared GMAC reset */ 1850 /* Workaround shared GMAC reset */
@@ -1854,6 +1875,15 @@ static int sky2_down(struct net_device *dev)
1854 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 1875 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
1855 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET); 1876 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);
1856 1877
1878 /* Force any delayed status interrrupt and NAPI */
1879 sky2_write32(hw, STAT_LEV_TIMER_CNT, 0);
1880 sky2_write32(hw, STAT_TX_TIMER_CNT, 0);
1881 sky2_write32(hw, STAT_ISR_TIMER_CNT, 0);
1882 sky2_read8(hw, STAT_ISR_TIMER_CTRL);
1883
1884 synchronize_irq(hw->pdev->irq);
1885 napi_synchronize(&hw->napi);
1886
1857 sky2_phy_power_down(hw, port); 1887 sky2_phy_power_down(hw, port);
1858 1888
1859 /* turn off LED's */ 1889 /* turn off LED's */
@@ -2343,11 +2373,45 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
2343 } 2373 }
2344} 2374}
2345 2375
2376static inline void sky2_skb_rx(const struct sky2_port *sky2,
2377 u32 status, struct sk_buff *skb)
2378{
2379#ifdef SKY2_VLAN_TAG_USED
2380 u16 vlan_tag = be16_to_cpu(sky2->rx_tag);
2381 if (sky2->vlgrp && (status & GMR_FS_VLAN)) {
2382 if (skb->ip_summed == CHECKSUM_NONE)
2383 vlan_hwaccel_receive_skb(skb, sky2->vlgrp, vlan_tag);
2384 else
2385 vlan_gro_receive(&sky2->hw->napi, sky2->vlgrp,
2386 vlan_tag, skb);
2387 return;
2388 }
2389#endif
2390 if (skb->ip_summed == CHECKSUM_NONE)
2391 netif_receive_skb(skb);
2392 else
2393 napi_gro_receive(&sky2->hw->napi, skb);
2394}
2395
2396static inline void sky2_rx_done(struct sky2_hw *hw, unsigned port,
2397 unsigned packets, unsigned bytes)
2398{
2399 if (packets) {
2400 struct net_device *dev = hw->dev[port];
2401
2402 dev->stats.rx_packets += packets;
2403 dev->stats.rx_bytes += bytes;
2404 dev->last_rx = jiffies;
2405 sky2_rx_update(netdev_priv(dev), rxqaddr[port]);
2406 }
2407}
2408
2346/* Process status response ring */ 2409/* Process status response ring */
2347static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) 2410static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
2348{ 2411{
2349 int work_done = 0; 2412 int work_done = 0;
2350 unsigned rx[2] = { 0, 0 }; 2413 unsigned int total_bytes[2] = { 0 };
2414 unsigned int total_packets[2] = { 0 };
2351 2415
2352 rmb(); 2416 rmb();
2353 do { 2417 do {
@@ -2374,7 +2438,8 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
2374 le->opcode = 0; 2438 le->opcode = 0;
2375 switch (opcode & ~HW_OWNER) { 2439 switch (opcode & ~HW_OWNER) {
2376 case OP_RXSTAT: 2440 case OP_RXSTAT:
2377 ++rx[port]; 2441 total_packets[port]++;
2442 total_bytes[port] += length;
2378 skb = sky2_receive(dev, length, status); 2443 skb = sky2_receive(dev, length, status);
2379 if (unlikely(!skb)) { 2444 if (unlikely(!skb)) {
2380 dev->stats.rx_dropped++; 2445 dev->stats.rx_dropped++;
@@ -2392,18 +2457,8 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
2392 } 2457 }
2393 2458
2394 skb->protocol = eth_type_trans(skb, dev); 2459 skb->protocol = eth_type_trans(skb, dev);
2395 dev->stats.rx_packets++;
2396 dev->stats.rx_bytes += skb->len;
2397 dev->last_rx = jiffies;
2398 2460
2399#ifdef SKY2_VLAN_TAG_USED 2461 sky2_skb_rx(sky2, status, skb);
2400 if (sky2->vlgrp && (status & GMR_FS_VLAN)) {
2401 vlan_hwaccel_receive_skb(skb,
2402 sky2->vlgrp,
2403 be16_to_cpu(sky2->rx_tag));
2404 } else
2405#endif
2406 netif_receive_skb(skb);
2407 2462
2408 /* Stop after net poll weight */ 2463 /* Stop after net poll weight */
2409 if (++work_done >= to_do) 2464 if (++work_done >= to_do)
@@ -2473,11 +2528,8 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
2473 sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); 2528 sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
2474 2529
2475exit_loop: 2530exit_loop:
2476 if (rx[0]) 2531 sky2_rx_done(hw, 0, total_packets[0], total_bytes[0]);
2477 sky2_rx_update(netdev_priv(hw->dev[0]), Q_R1); 2532 sky2_rx_done(hw, 1, total_packets[1], total_bytes[1]);
2478
2479 if (rx[1])
2480 sky2_rx_update(netdev_priv(hw->dev[1]), Q_R2);
2481 2533
2482 return work_done; 2534 return work_done;
2483} 2535}
@@ -4364,6 +4416,22 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4364 goto err_out; 4416 goto err_out;
4365 } 4417 }
4366 4418
4419 /* Get configuration information
4420 * Note: only regular PCI config access once to test for HW issues
4421 * other PCI access through shared memory for speed and to
4422 * avoid MMCONFIG problems.
4423 */
4424 err = pci_read_config_dword(pdev, PCI_DEV_REG2, &reg);
4425 if (err) {
4426 dev_err(&pdev->dev, "PCI read config failed\n");
4427 goto err_out;
4428 }
4429
4430 if (~reg == 0) {
4431 dev_err(&pdev->dev, "PCI configuration read error\n");
4432 goto err_out;
4433 }
4434
4367 err = pci_request_regions(pdev, DRV_NAME); 4435 err = pci_request_regions(pdev, DRV_NAME);
4368 if (err) { 4436 if (err) {
4369 dev_err(&pdev->dev, "cannot obtain PCI resources\n"); 4437 dev_err(&pdev->dev, "cannot obtain PCI resources\n");
@@ -4389,21 +4457,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4389 } 4457 }
4390 } 4458 }
4391 4459
4392 /* Get configuration information
4393 * Note: only regular PCI config access once to test for HW issues
4394 * other PCI access through shared memory for speed and to
4395 * avoid MMCONFIG problems.
4396 */
4397 err = pci_read_config_dword(pdev, PCI_DEV_REG2, &reg);
4398 if (err) {
4399 dev_err(&pdev->dev, "PCI read config failed\n");
4400 goto err_out_free_regions;
4401 }
4402
4403 /* size of available VPD, only impact sysfs */
4404 err = pci_vpd_truncate(pdev, 1ul << (((reg & PCI_VPD_ROM_SZ) >> 14) + 8));
4405 if (err)
4406 dev_warn(&pdev->dev, "Can't set VPD size\n");
4407 4460
4408#ifdef __BIG_ENDIAN 4461#ifdef __BIG_ENDIAN
4409 /* The sk98lin vendor driver uses hardware byte swapping but 4462 /* The sk98lin vendor driver uses hardware byte swapping but
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 92fb24b27d45..b5549c9e5107 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -2028,6 +2028,7 @@ struct sky2_port {
2028 u16 rx_pending; 2028 u16 rx_pending;
2029 u16 rx_data_size; 2029 u16 rx_data_size;
2030 u16 rx_nfrags; 2030 u16 rx_nfrags;
2031 struct sk_buff_head rx_recycle;
2031 2032
2032#ifdef SKY2_VLAN_TAG_USED 2033#ifdef SKY2_VLAN_TAG_USED
2033 u16 rx_tag; 2034 u16 rx_tag;
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c
index e4255d829380..753a1fba4609 100644
--- a/drivers/net/sonic.c
+++ b/drivers/net/sonic.c
@@ -223,7 +223,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
223 if (!laddr) { 223 if (!laddr) {
224 printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name); 224 printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name);
225 dev_kfree_skb(skb); 225 dev_kfree_skb(skb);
226 return NETDEV_TX_BUSY 226 return NETDEV_TX_BUSY;
227 } 227 }
228 228
229 sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0); /* clear status */ 229 sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0); /* clear status */
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index e2f2e91cfdd2..40c6eba775ce 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -65,8 +65,6 @@
65 65
66static DEFINE_SPINLOCK(ugeth_lock); 66static DEFINE_SPINLOCK(ugeth_lock);
67 67
68static void uec_configure_serdes(struct net_device *dev);
69
70static struct { 68static struct {
71 u32 msg_enable; 69 u32 msg_enable;
72} debug = { -1 }; 70} debug = { -1 };
@@ -1536,6 +1534,49 @@ static void adjust_link(struct net_device *dev)
1536 spin_unlock_irqrestore(&ugeth->lock, flags); 1534 spin_unlock_irqrestore(&ugeth->lock, flags);
1537} 1535}
1538 1536
1537/* Initialize TBI PHY interface for communicating with the
1538 * SERDES lynx PHY on the chip. We communicate with this PHY
1539 * through the MDIO bus on each controller, treating it as a
1540 * "normal" PHY at the address found in the UTBIPA register. We assume
1541 * that the UTBIPA register is valid. Either the MDIO bus code will set
1542 * it to a value that doesn't conflict with other PHYs on the bus, or the
1543 * value doesn't matter, as there are no other PHYs on the bus.
1544 */
1545static void uec_configure_serdes(struct net_device *dev)
1546{
1547 struct ucc_geth_private *ugeth = netdev_priv(dev);
1548 struct ucc_geth_info *ug_info = ugeth->ug_info;
1549 struct phy_device *tbiphy;
1550
1551 if (!ug_info->tbi_node) {
1552 dev_warn(&dev->dev, "SGMII mode requires that the device "
1553 "tree specify a tbi-handle\n");
1554 return;
1555 }
1556
1557 tbiphy = of_phy_find_device(ug_info->tbi_node);
1558 if (!tbiphy) {
1559 dev_err(&dev->dev, "error: Could not get TBI device\n");
1560 return;
1561 }
1562
1563 /*
1564 * If the link is already up, we must already be ok, and don't need to
1565 * configure and reset the TBI<->SerDes link. Maybe U-Boot configured
1566 * everything for us? Resetting it takes the link down and requires
1567 * several seconds for it to come back.
1568 */
1569 if (phy_read(tbiphy, ENET_TBI_MII_SR) & TBISR_LSTATUS)
1570 return;
1571
1572 /* Single clk mode, mii mode off(for serdes communication) */
1573 phy_write(tbiphy, ENET_TBI_MII_ANA, TBIANA_SETTINGS);
1574
1575 phy_write(tbiphy, ENET_TBI_MII_TBICON, TBICON_CLK_SELECT);
1576
1577 phy_write(tbiphy, ENET_TBI_MII_CR, TBICR_SETTINGS);
1578}
1579
1539/* Configure the PHY for dev. 1580/* Configure the PHY for dev.
1540 * returns 0 if success. -1 if failure 1581 * returns 0 if success. -1 if failure
1541 */ 1582 */
@@ -1577,41 +1618,7 @@ static int init_phy(struct net_device *dev)
1577 return 0; 1618 return 0;
1578} 1619}
1579 1620
1580/* Initialize TBI PHY interface for communicating with the
1581 * SERDES lynx PHY on the chip. We communicate with this PHY
1582 * through the MDIO bus on each controller, treating it as a
1583 * "normal" PHY at the address found in the UTBIPA register. We assume
1584 * that the UTBIPA register is valid. Either the MDIO bus code will set
1585 * it to a value that doesn't conflict with other PHYs on the bus, or the
1586 * value doesn't matter, as there are no other PHYs on the bus.
1587 */
1588static void uec_configure_serdes(struct net_device *dev)
1589{
1590 struct ucc_geth_private *ugeth = netdev_priv(dev);
1591
1592 if (!ugeth->tbiphy) {
1593 printk(KERN_WARNING "SGMII mode requires that the device "
1594 "tree specify a tbi-handle\n");
1595 return;
1596 }
1597 1621
1598 /*
1599 * If the link is already up, we must already be ok, and don't need to
1600 * configure and reset the TBI<->SerDes link. Maybe U-Boot configured
1601 * everything for us? Resetting it takes the link down and requires
1602 * several seconds for it to come back.
1603 */
1604 if (phy_read(ugeth->tbiphy, ENET_TBI_MII_SR) & TBISR_LSTATUS)
1605 return;
1606
1607 /* Single clk mode, mii mode off(for serdes communication) */
1608 phy_write(ugeth->tbiphy, ENET_TBI_MII_ANA, TBIANA_SETTINGS);
1609
1610 phy_write(ugeth->tbiphy, ENET_TBI_MII_TBICON, TBICON_CLK_SELECT);
1611
1612 phy_write(ugeth->tbiphy, ENET_TBI_MII_CR, TBICR_SETTINGS);
1613
1614}
1615 1622
1616static int ugeth_graceful_stop_tx(struct ucc_geth_private *ugeth) 1623static int ugeth_graceful_stop_tx(struct ucc_geth_private *ugeth)
1617{ 1624{
@@ -3711,6 +3718,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3711 } 3718 }
3712 ug_info->phy_node = phy; 3719 ug_info->phy_node = phy;
3713 3720
3721 /* Find the TBI PHY node. If it's not there, we don't support SGMII */
3722 ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
3723
3714 /* get the phy interface type, or default to MII */ 3724 /* get the phy interface type, or default to MII */
3715 prop = of_get_property(np, "phy-connection-type", NULL); 3725 prop = of_get_property(np, "phy-connection-type", NULL);
3716 if (!prop) { 3726 if (!prop) {
@@ -3818,37 +3828,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3818 ugeth->ndev = dev; 3828 ugeth->ndev = dev;
3819 ugeth->node = np; 3829 ugeth->node = np;
3820 3830
3821 /* Find the TBI PHY. If it's not there, we don't support SGMII */
3822 ph = of_get_property(np, "tbi-handle", NULL);
3823 if (ph) {
3824 struct device_node *tbi = of_find_node_by_phandle(*ph);
3825 struct of_device *ofdev;
3826 struct mii_bus *bus;
3827 const unsigned int *id;
3828
3829 if (!tbi)
3830 return 0;
3831
3832 mdio = of_get_parent(tbi);
3833 if (!mdio)
3834 return 0;
3835
3836 ofdev = of_find_device_by_node(mdio);
3837
3838 of_node_put(mdio);
3839
3840 id = of_get_property(tbi, "reg", NULL);
3841 if (!id)
3842 return 0;
3843 of_node_put(tbi);
3844
3845 bus = dev_get_drvdata(&ofdev->dev);
3846 if (!bus)
3847 return 0;
3848
3849 ugeth->tbiphy = bus->phy_map[*id];
3850 }
3851
3852 return 0; 3831 return 0;
3853} 3832}
3854 3833
diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h
index 5beba4c14532..195ab267ead7 100644
--- a/drivers/net/ucc_geth.h
+++ b/drivers/net/ucc_geth.h
@@ -1125,6 +1125,7 @@ struct ucc_geth_info {
1125 u16 pausePeriod; 1125 u16 pausePeriod;
1126 u16 extensionField; 1126 u16 extensionField;
1127 struct device_node *phy_node; 1127 struct device_node *phy_node;
1128 struct device_node *tbi_node;
1128 u8 weightfactor[NUM_TX_QUEUES]; 1129 u8 weightfactor[NUM_TX_QUEUES];
1129 u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES]; 1130 u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES];
1130 u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX]; 1131 u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX];
@@ -1213,7 +1214,6 @@ struct ucc_geth_private {
1213 1214
1214 struct ugeth_mii_info *mii_info; 1215 struct ugeth_mii_info *mii_info;
1215 struct phy_device *phydev; 1216 struct phy_device *phydev;
1216 struct phy_device *tbiphy;
1217 phy_interface_t phy_interface; 1217 phy_interface_t phy_interface;
1218 int max_speed; 1218 int max_speed;
1219 uint32_t msg_enable; 1219 uint32_t msg_enable;
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index e2a7725e567e..b02f7adff5dc 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -989,8 +989,10 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
989 if (ret < 0) 989 if (ret < 0)
990 goto err_iounmap; 990 goto err_iounmap;
991 991
992 if (velocity_get_link(dev)) 992 if (!velocity_get_link(dev)) {
993 netif_carrier_off(dev); 993 netif_carrier_off(dev);
994 vptr->mii_status |= VELOCITY_LINK_FAIL;
995 }
994 996
995 velocity_print_info(vptr); 997 velocity_print_info(vptr);
996 pci_set_drvdata(pdev, dev); 998 pci_set_drvdata(pdev, dev);
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 52198f6797a4..2a6e81d5b579 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -709,7 +709,7 @@ static void virtnet_set_rx_mode(struct net_device *dev)
709 allmulti ? "en" : "dis"); 709 allmulti ? "en" : "dis");
710 710
711 /* MAC filter - use one buffer for both lists */ 711 /* MAC filter - use one buffer for both lists */
712 mac_data = buf = kzalloc(((dev->uc_count + dev->mc_count) * ETH_ALEN) + 712 mac_data = buf = kzalloc(((dev->uc.count + dev->mc_count) * ETH_ALEN) +
713 (2 * sizeof(mac_data->entries)), GFP_ATOMIC); 713 (2 * sizeof(mac_data->entries)), GFP_ATOMIC);
714 if (!buf) { 714 if (!buf) {
715 dev_warn(&dev->dev, "No memory for MAC address buffer\n"); 715 dev_warn(&dev->dev, "No memory for MAC address buffer\n");
@@ -719,16 +719,16 @@ static void virtnet_set_rx_mode(struct net_device *dev)
719 sg_init_table(sg, 2); 719 sg_init_table(sg, 2);
720 720
721 /* Store the unicast list and count in the front of the buffer */ 721 /* Store the unicast list and count in the front of the buffer */
722 mac_data->entries = dev->uc_count; 722 mac_data->entries = dev->uc.count;
723 i = 0; 723 i = 0;
724 list_for_each_entry(ha, &dev->uc_list, list) 724 list_for_each_entry(ha, &dev->uc.list, list)
725 memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN); 725 memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN);
726 726
727 sg_set_buf(&sg[0], mac_data, 727 sg_set_buf(&sg[0], mac_data,
728 sizeof(mac_data->entries) + (dev->uc_count * ETH_ALEN)); 728 sizeof(mac_data->entries) + (dev->uc.count * ETH_ALEN));
729 729
730 /* multicast list and count fill the end */ 730 /* multicast list and count fill the end */
731 mac_data = (void *)&mac_data->macs[dev->uc_count][0]; 731 mac_data = (void *)&mac_data->macs[dev->uc.count][0];
732 732
733 mac_data->entries = dev->mc_count; 733 mac_data->entries = dev->mc_count;
734 addr = dev->mc_list; 734 addr = dev->mc_list;
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index 26cde573af43..58d2551c78ed 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -454,7 +454,7 @@ __vxge_hw_verify_pci_e_info(struct __vxge_hw_device *hldev)
454 return VXGE_HW_OK; 454 return VXGE_HW_OK;
455} 455}
456 456
457static enum vxge_hw_status 457enum vxge_hw_status
458__vxge_hw_device_is_privilaged(struct __vxge_hw_device *hldev) 458__vxge_hw_device_is_privilaged(struct __vxge_hw_device *hldev)
459{ 459{
460 if ((hldev->host_type == VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION || 460 if ((hldev->host_type == VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION ||
@@ -676,10 +676,12 @@ enum vxge_hw_status __vxge_hw_device_initialize(struct __vxge_hw_device *hldev)
676{ 676{
677 enum vxge_hw_status status = VXGE_HW_OK; 677 enum vxge_hw_status status = VXGE_HW_OK;
678 678
679 /* Validate the pci-e link width and speed */ 679 if (VXGE_HW_OK == __vxge_hw_device_is_privilaged(hldev)) {
680 status = __vxge_hw_verify_pci_e_info(hldev); 680 /* Validate the pci-e link width and speed */
681 if (status != VXGE_HW_OK) 681 status = __vxge_hw_verify_pci_e_info(hldev);
682 goto exit; 682 if (status != VXGE_HW_OK)
683 goto exit;
684 }
683 685
684 vxge_hw_wrr_rebalance(hldev); 686 vxge_hw_wrr_rebalance(hldev);
685exit: 687exit:
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 6c838b3e063a..6034497536a4 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -4203,6 +4203,16 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
4203 max_vpath_supported++; 4203 max_vpath_supported++;
4204 } 4204 }
4205 4205
4206 /* Enable SRIOV mode, if firmware has SRIOV support and if it is a PF */
4207 if ((VXGE_HW_FUNCTION_MODE_SRIOV ==
4208 ll_config.device_hw_info.function_mode) &&
4209 (max_config_dev > 1) && (pdev->is_physfn)) {
4210 ret = pci_enable_sriov(pdev, max_config_dev - 1);
4211 if (ret)
4212 vxge_debug_ll_config(VXGE_ERR,
4213 "Failed to enable SRIOV: %d \n", ret);
4214 }
4215
4206 /* 4216 /*
4207 * Configure vpaths and get driver configured number of vpaths 4217 * Configure vpaths and get driver configured number of vpaths
4208 * which is less than or equal to the maximum vpaths per function. 4218 * which is less than or equal to the maximum vpaths per function.
@@ -4366,6 +4376,7 @@ _exit6:
4366 4376
4367 vxge_device_unregister(hldev); 4377 vxge_device_unregister(hldev);
4368_exit5: 4378_exit5:
4379 pci_disable_sriov(pdev);
4369 vxge_hw_device_terminate(hldev); 4380 vxge_hw_device_terminate(hldev);
4370_exit4: 4381_exit4:
4371 iounmap(attr.bar1); 4382 iounmap(attr.bar1);
@@ -4429,6 +4440,8 @@ vxge_remove(struct pci_dev *pdev)
4429 iounmap(vdev->bar0); 4440 iounmap(vdev->bar0);
4430 iounmap(vdev->bar1); 4441 iounmap(vdev->bar1);
4431 4442
4443 pci_disable_sriov(pdev);
4444
4432 /* we are safe to free it now */ 4445 /* we are safe to free it now */
4433 free_netdev(dev); 4446 free_netdev(dev);
4434 4447
diff --git a/drivers/net/vxge/vxge-version.h b/drivers/net/vxge/vxge-version.h
index 7da02c545ed5..82786ffb7dd9 100644
--- a/drivers/net/vxge/vxge-version.h
+++ b/drivers/net/vxge/vxge-version.h
@@ -17,7 +17,7 @@
17 17
18#define VXGE_VERSION_MAJOR "2" 18#define VXGE_VERSION_MAJOR "2"
19#define VXGE_VERSION_MINOR "0" 19#define VXGE_VERSION_MINOR "0"
20#define VXGE_VERSION_FIX "1" 20#define VXGE_VERSION_FIX "4"
21#define VXGE_VERSION_BUILD "17129" 21#define VXGE_VERSION_BUILD "17795"
22#define VXGE_VERSION_FOR "k" 22#define VXGE_VERSION_FOR "k"
23#endif 23#endif
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 2dd78d20eb05..aff4f6bdf3d5 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -149,46 +149,40 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
149 */ 149 */
150static int lapbeth_xmit(struct sk_buff *skb, struct net_device *dev) 150static int lapbeth_xmit(struct sk_buff *skb, struct net_device *dev)
151{ 151{
152 int err = -ENODEV; 152 int err;
153 153
154 /* 154 /*
155 * Just to be *really* sure not to send anything if the interface 155 * Just to be *really* sure not to send anything if the interface
156 * is down, the ethernet device may have gone. 156 * is down, the ethernet device may have gone.
157 */ 157 */
158 if (!netif_running(dev)) { 158 if (!netif_running(dev))
159 goto drop; 159 goto drop;
160 }
161 160
162 switch (skb->data[0]) { 161 switch (skb->data[0]) {
163 case 0x00: 162 case 0x00:
164 err = 0;
165 break; 163 break;
166 case 0x01: 164 case 0x01:
167 if ((err = lapb_connect_request(dev)) != LAPB_OK) 165 if ((err = lapb_connect_request(dev)) != LAPB_OK)
168 printk(KERN_ERR "lapbeth: lapb_connect_request " 166 printk(KERN_ERR "lapbeth: lapb_connect_request "
169 "error: %d\n", err); 167 "error: %d\n", err);
170 goto drop_ok; 168 goto drop;
171 case 0x02: 169 case 0x02:
172 if ((err = lapb_disconnect_request(dev)) != LAPB_OK) 170 if ((err = lapb_disconnect_request(dev)) != LAPB_OK)
173 printk(KERN_ERR "lapbeth: lapb_disconnect_request " 171 printk(KERN_ERR "lapbeth: lapb_disconnect_request "
174 "err: %d\n", err); 172 "err: %d\n", err);
175 /* Fall thru */ 173 /* Fall thru */
176 default: 174 default:
177 goto drop_ok; 175 goto drop;
178 } 176 }
179 177
180 skb_pull(skb, 1); 178 skb_pull(skb, 1);
181 179
182 if ((err = lapb_data_request(dev, skb)) != LAPB_OK) { 180 if ((err = lapb_data_request(dev, skb)) != LAPB_OK) {
183 printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err); 181 printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err);
184 err = -ENOMEM;
185 goto drop; 182 goto drop;
186 } 183 }
187 err = 0;
188out: 184out:
189 return err; 185 return NETDEV_TX_OK;
190drop_ok:
191 err = 0;
192drop: 186drop:
193 kfree_skb(skb); 187 kfree_skb(skb);
194 goto out; 188 goto out;
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index ec35503f6a40..2942f13c9c4a 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -733,8 +733,9 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval)
733 /* 733 /*
734 * Set the beacon register and enable all timers. 734 * Set the beacon register and enable all timers.
735 */ 735 */
736 /* When in AP mode zero timer0 to start TSF */ 736 /* When in AP or Mesh Point mode zero timer0 to start TSF */
737 if (ah->ah_op_mode == NL80211_IFTYPE_AP) 737 if (ah->ah_op_mode == NL80211_IFTYPE_AP ||
738 ah->ah_op_mode == NL80211_IFTYPE_MESH_POINT)
738 ath5k_hw_reg_write(ah, 0, AR5K_TIMER0); 739 ath5k_hw_reg_write(ah, 0, AR5K_TIMER0);
739 740
740 ath5k_hw_reg_write(ah, next_beacon, AR5K_TIMER0); 741 ath5k_hw_reg_write(ah, next_beacon, AR5K_TIMER0);
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
index 0ed1ac312aa6..2d79610bce12 100644
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -1,7 +1,6 @@
1config ATH9K 1config ATH9K
2 tristate "Atheros 802.11n wireless cards support" 2 tristate "Atheros 802.11n wireless cards support"
3 depends on PCI && MAC80211 && WLAN_80211 3 depends on PCI && MAC80211 && WLAN_80211
4 depends on RFKILL || RFKILL=n
5 select ATH_COMMON 4 select ATH_COMMON
6 select MAC80211_LEDS 5 select MAC80211_LEDS
7 select LEDS_CLASS 6 select LEDS_CLASS
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 515880aa2116..5efc9345ca0d 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -21,7 +21,6 @@
21#include <linux/device.h> 21#include <linux/device.h>
22#include <net/mac80211.h> 22#include <net/mac80211.h>
23#include <linux/leds.h> 23#include <linux/leds.h>
24#include <linux/rfkill.h>
25 24
26#include "hw.h" 25#include "hw.h"
27#include "rc.h" 26#include "rc.h"
@@ -460,12 +459,6 @@ struct ath_led {
460 bool registered; 459 bool registered;
461}; 460};
462 461
463struct ath_rfkill {
464 struct rfkill *rfkill;
465 struct rfkill_ops ops;
466 char rfkill_name[32];
467};
468
469/********************/ 462/********************/
470/* Main driver core */ 463/* Main driver core */
471/********************/ 464/********************/
@@ -505,7 +498,6 @@ struct ath_rfkill {
505#define SC_OP_PROTECT_ENABLE BIT(6) 498#define SC_OP_PROTECT_ENABLE BIT(6)
506#define SC_OP_RXFLUSH BIT(7) 499#define SC_OP_RXFLUSH BIT(7)
507#define SC_OP_LED_ASSOCIATED BIT(8) 500#define SC_OP_LED_ASSOCIATED BIT(8)
508#define SC_OP_RFKILL_REGISTERED BIT(9)
509#define SC_OP_WAIT_FOR_BEACON BIT(12) 501#define SC_OP_WAIT_FOR_BEACON BIT(12)
510#define SC_OP_LED_ON BIT(13) 502#define SC_OP_LED_ON BIT(13)
511#define SC_OP_SCANNING BIT(14) 503#define SC_OP_SCANNING BIT(14)
@@ -591,7 +583,6 @@ struct ath_softc {
591 583
592 int beacon_interval; 584 int beacon_interval;
593 585
594 struct ath_rfkill rf_kill;
595 struct ath_ani ani; 586 struct ath_ani ani;
596 struct ath9k_node_stats nodestats; 587 struct ath9k_node_stats nodestats;
597#ifdef CONFIG_ATH9K_DEBUG 588#ifdef CONFIG_ATH9K_DEBUG
@@ -677,6 +668,7 @@ static inline void ath9k_ps_restore(struct ath_softc *sc)
677 if (atomic_dec_and_test(&sc->ps_usecount)) 668 if (atomic_dec_and_test(&sc->ps_usecount))
678 if ((sc->hw->conf.flags & IEEE80211_CONF_PS) && 669 if ((sc->hw->conf.flags & IEEE80211_CONF_PS) &&
679 !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON | 670 !(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
671 SC_OP_WAIT_FOR_CAB |
680 SC_OP_WAIT_FOR_PSPOLL_DATA | 672 SC_OP_WAIT_FOR_PSPOLL_DATA |
681 SC_OP_WAIT_FOR_TX_ACK))) 673 SC_OP_WAIT_FOR_TX_ACK)))
682 ath9k_hw_setpower(sc->sc_ah, 674 ath9k_hw_setpower(sc->sc_ah,
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 1579c9407ed5..34935a8ee59d 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2186,6 +2186,18 @@ static void ath9k_hw_spur_mitigate(struct ath_hw *ah, struct ath9k_channel *chan
2186 REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask); 2186 REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask);
2187} 2187}
2188 2188
2189static void ath9k_enable_rfkill(struct ath_hw *ah)
2190{
2191 REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
2192 AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
2193
2194 REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
2195 AR_GPIO_INPUT_MUX2_RFSILENT);
2196
2197 ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
2198 REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
2199}
2200
2189int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, 2201int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
2190 bool bChannelChange) 2202 bool bChannelChange)
2191{ 2203{
@@ -2313,10 +2325,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
2313 ath9k_hw_init_interrupt_masks(ah, ah->opmode); 2325 ath9k_hw_init_interrupt_masks(ah, ah->opmode);
2314 ath9k_hw_init_qos(ah); 2326 ath9k_hw_init_qos(ah);
2315 2327
2316#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
2317 if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT) 2328 if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
2318 ath9k_enable_rfkill(ah); 2329 ath9k_enable_rfkill(ah);
2319#endif 2330
2320 ath9k_hw_init_user_settings(ah); 2331 ath9k_hw_init_user_settings(ah);
2321 2332
2322 REG_WRITE(ah, AR_STA_ID1, 2333 REG_WRITE(ah, AR_STA_ID1,
@@ -3613,20 +3624,6 @@ void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val)
3613 AR_GPIO_BIT(gpio)); 3624 AR_GPIO_BIT(gpio));
3614} 3625}
3615 3626
3616#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
3617void ath9k_enable_rfkill(struct ath_hw *ah)
3618{
3619 REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
3620 AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
3621
3622 REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
3623 AR_GPIO_INPUT_MUX2_RFSILENT);
3624
3625 ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
3626 REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
3627}
3628#endif
3629
3630u32 ath9k_hw_getdefantenna(struct ath_hw *ah) 3627u32 ath9k_hw_getdefantenna(struct ath_hw *ah)
3631{ 3628{
3632 return REG_READ(ah, AR_DEF_ANTENNA) & 0x7; 3629 return REG_READ(ah, AR_DEF_ANTENNA) & 0x7;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index dd8508ef6e05..9d0b31ad4603 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -565,9 +565,6 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, u32 gpio);
565void ath9k_hw_cfg_output(struct ath_hw *ah, u32 gpio, 565void ath9k_hw_cfg_output(struct ath_hw *ah, u32 gpio,
566 u32 ah_signal_type); 566 u32 ah_signal_type);
567void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val); 567void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val);
568#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
569void ath9k_enable_rfkill(struct ath_hw *ah);
570#endif
571u32 ath9k_hw_getdefantenna(struct ath_hw *ah); 568u32 ath9k_hw_getdefantenna(struct ath_hw *ah);
572void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna); 569void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna);
573bool ath9k_hw_setantennaswitch(struct ath_hw *ah, 570bool ath9k_hw_setantennaswitch(struct ath_hw *ah,
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index f7baa406918b..9f49a3251d4d 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -231,6 +231,19 @@ static void ath_setup_rates(struct ath_softc *sc, enum ieee80211_band band)
231 } 231 }
232} 232}
233 233
234static struct ath9k_channel *ath_get_curchannel(struct ath_softc *sc,
235 struct ieee80211_hw *hw)
236{
237 struct ieee80211_channel *curchan = hw->conf.channel;
238 struct ath9k_channel *channel;
239 u8 chan_idx;
240
241 chan_idx = curchan->hw_value;
242 channel = &sc->sc_ah->channels[chan_idx];
243 ath9k_update_ichannel(sc, hw, channel);
244 return channel;
245}
246
234/* 247/*
235 * Set/change channels. If the channel is really being changed, it's done 248 * Set/change channels. If the channel is really being changed, it's done
236 * by reseting the chip. To accomplish this we must first cleanup any pending 249 * by reseting the chip. To accomplish this we must first cleanup any pending
@@ -283,7 +296,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
283 "reset status %d\n", 296 "reset status %d\n",
284 channel->center_freq, r); 297 channel->center_freq, r);
285 spin_unlock_bh(&sc->sc_resetlock); 298 spin_unlock_bh(&sc->sc_resetlock);
286 return r; 299 goto ps_restore;
287 } 300 }
288 spin_unlock_bh(&sc->sc_resetlock); 301 spin_unlock_bh(&sc->sc_resetlock);
289 302
@@ -292,14 +305,17 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
292 if (ath_startrecv(sc) != 0) { 305 if (ath_startrecv(sc) != 0) {
293 DPRINTF(sc, ATH_DBG_FATAL, 306 DPRINTF(sc, ATH_DBG_FATAL,
294 "Unable to restart recv logic\n"); 307 "Unable to restart recv logic\n");
295 return -EIO; 308 r = -EIO;
309 goto ps_restore;
296 } 310 }
297 311
298 ath_cache_conf_rate(sc, &hw->conf); 312 ath_cache_conf_rate(sc, &hw->conf);
299 ath_update_txpow(sc); 313 ath_update_txpow(sc);
300 ath9k_hw_set_interrupts(ah, sc->imask); 314 ath9k_hw_set_interrupts(ah, sc->imask);
315
316 ps_restore:
301 ath9k_ps_restore(sc); 317 ath9k_ps_restore(sc);
302 return 0; 318 return r;
303} 319}
304 320
305/* 321/*
@@ -1110,6 +1126,9 @@ void ath_radio_enable(struct ath_softc *sc)
1110 ath9k_ps_wakeup(sc); 1126 ath9k_ps_wakeup(sc);
1111 ath9k_hw_configpcipowersave(ah, 0); 1127 ath9k_hw_configpcipowersave(ah, 0);
1112 1128
1129 if (!ah->curchan)
1130 ah->curchan = ath_get_curchannel(sc, sc->hw);
1131
1113 spin_lock_bh(&sc->sc_resetlock); 1132 spin_lock_bh(&sc->sc_resetlock);
1114 r = ath9k_hw_reset(ah, ah->curchan, false); 1133 r = ath9k_hw_reset(ah, ah->curchan, false);
1115 if (r) { 1134 if (r) {
@@ -1162,6 +1181,9 @@ void ath_radio_disable(struct ath_softc *sc)
1162 ath_stoprecv(sc); /* turn off frame recv */ 1181 ath_stoprecv(sc); /* turn off frame recv */
1163 ath_flushrecv(sc); /* flush recv queue */ 1182 ath_flushrecv(sc); /* flush recv queue */
1164 1183
1184 if (!ah->curchan)
1185 ah->curchan = ath_get_curchannel(sc, sc->hw);
1186
1165 spin_lock_bh(&sc->sc_resetlock); 1187 spin_lock_bh(&sc->sc_resetlock);
1166 r = ath9k_hw_reset(ah, ah->curchan, false); 1188 r = ath9k_hw_reset(ah, ah->curchan, false);
1167 if (r) { 1189 if (r) {
@@ -1178,8 +1200,6 @@ void ath_radio_disable(struct ath_softc *sc)
1178 ath9k_ps_restore(sc); 1200 ath9k_ps_restore(sc);
1179} 1201}
1180 1202
1181#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
1182
1183/*******************/ 1203/*******************/
1184/* Rfkill */ 1204/* Rfkill */
1185/*******************/ 1205/*******************/
@@ -1192,81 +1212,27 @@ static bool ath_is_rfkill_set(struct ath_softc *sc)
1192 ah->rfkill_polarity; 1212 ah->rfkill_polarity;
1193} 1213}
1194 1214
1195/* s/w rfkill handlers */ 1215static void ath9k_rfkill_poll_state(struct ieee80211_hw *hw)
1196static int ath_rfkill_set_block(void *data, bool blocked)
1197{ 1216{
1198 struct ath_softc *sc = data; 1217 struct ath_wiphy *aphy = hw->priv;
1199 1218 struct ath_softc *sc = aphy->sc;
1200 if (blocked)
1201 ath_radio_disable(sc);
1202 else
1203 ath_radio_enable(sc);
1204
1205 return 0;
1206}
1207
1208static void ath_rfkill_poll_state(struct rfkill *rfkill, void *data)
1209{
1210 struct ath_softc *sc = data;
1211 bool blocked = !!ath_is_rfkill_set(sc); 1219 bool blocked = !!ath_is_rfkill_set(sc);
1212 1220
1213 if (rfkill_set_hw_state(rfkill, blocked)) 1221 wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
1222
1223 if (blocked)
1214 ath_radio_disable(sc); 1224 ath_radio_disable(sc);
1215 else 1225 else
1216 ath_radio_enable(sc); 1226 ath_radio_enable(sc);
1217} 1227}
1218 1228
1219/* Init s/w rfkill */ 1229static void ath_start_rfkill_poll(struct ath_softc *sc)
1220static int ath_init_sw_rfkill(struct ath_softc *sc)
1221{
1222 sc->rf_kill.ops.set_block = ath_rfkill_set_block;
1223 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
1224 sc->rf_kill.ops.poll = ath_rfkill_poll_state;
1225
1226 snprintf(sc->rf_kill.rfkill_name, sizeof(sc->rf_kill.rfkill_name),
1227 "ath9k-%s::rfkill", wiphy_name(sc->hw->wiphy));
1228
1229 sc->rf_kill.rfkill = rfkill_alloc(sc->rf_kill.rfkill_name,
1230 wiphy_dev(sc->hw->wiphy),
1231 RFKILL_TYPE_WLAN,
1232 &sc->rf_kill.ops, sc);
1233 if (!sc->rf_kill.rfkill) {
1234 DPRINTF(sc, ATH_DBG_FATAL, "Failed to allocate rfkill\n");
1235 return -ENOMEM;
1236 }
1237
1238 return 0;
1239}
1240
1241/* Deinitialize rfkill */
1242static void ath_deinit_rfkill(struct ath_softc *sc)
1243{
1244 if (sc->sc_flags & SC_OP_RFKILL_REGISTERED) {
1245 rfkill_unregister(sc->rf_kill.rfkill);
1246 rfkill_destroy(sc->rf_kill.rfkill);
1247 sc->sc_flags &= ~SC_OP_RFKILL_REGISTERED;
1248 }
1249}
1250
1251static int ath_start_rfkill_poll(struct ath_softc *sc)
1252{ 1230{
1253 if (!(sc->sc_flags & SC_OP_RFKILL_REGISTERED)) { 1231 struct ath_hw *ah = sc->sc_ah;
1254 if (rfkill_register(sc->rf_kill.rfkill)) {
1255 DPRINTF(sc, ATH_DBG_FATAL,
1256 "Unable to register rfkill\n");
1257 rfkill_destroy(sc->rf_kill.rfkill);
1258
1259 /* Deinitialize the device */
1260 ath_cleanup(sc);
1261 return -EIO;
1262 } else {
1263 sc->sc_flags |= SC_OP_RFKILL_REGISTERED;
1264 }
1265 }
1266 1232
1267 return 0; 1233 if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
1234 wiphy_rfkill_start_polling(sc->hw->wiphy);
1268} 1235}
1269#endif /* CONFIG_RFKILL */
1270 1236
1271void ath_cleanup(struct ath_softc *sc) 1237void ath_cleanup(struct ath_softc *sc)
1272{ 1238{
@@ -1286,9 +1252,6 @@ void ath_detach(struct ath_softc *sc)
1286 1252
1287 DPRINTF(sc, ATH_DBG_CONFIG, "Detach ATH hw\n"); 1253 DPRINTF(sc, ATH_DBG_CONFIG, "Detach ATH hw\n");
1288 1254
1289#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
1290 ath_deinit_rfkill(sc);
1291#endif
1292 ath_deinit_leds(sc); 1255 ath_deinit_leds(sc);
1293 cancel_work_sync(&sc->chan_work); 1256 cancel_work_sync(&sc->chan_work);
1294 cancel_delayed_work_sync(&sc->wiphy_work); 1257 cancel_delayed_work_sync(&sc->wiphy_work);
@@ -1626,13 +1589,6 @@ int ath_attach(u16 devid, struct ath_softc *sc)
1626 if (error != 0) 1589 if (error != 0)
1627 goto error_attach; 1590 goto error_attach;
1628 1591
1629#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
1630 /* Initialize s/w rfkill */
1631 error = ath_init_sw_rfkill(sc);
1632 if (error)
1633 goto error_attach;
1634#endif
1635
1636 INIT_WORK(&sc->chan_work, ath9k_wiphy_chan_work); 1592 INIT_WORK(&sc->chan_work, ath9k_wiphy_chan_work);
1637 INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work); 1593 INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
1638 sc->wiphy_scheduler_int = msecs_to_jiffies(500); 1594 sc->wiphy_scheduler_int = msecs_to_jiffies(500);
@@ -1648,6 +1604,7 @@ int ath_attach(u16 devid, struct ath_softc *sc)
1648 /* Initialize LED control */ 1604 /* Initialize LED control */
1649 ath_init_leds(sc); 1605 ath_init_leds(sc);
1650 1606
1607 ath_start_rfkill_poll(sc);
1651 1608
1652 return 0; 1609 return 0;
1653 1610
@@ -1920,7 +1877,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
1920 struct ath_softc *sc = aphy->sc; 1877 struct ath_softc *sc = aphy->sc;
1921 struct ieee80211_channel *curchan = hw->conf.channel; 1878 struct ieee80211_channel *curchan = hw->conf.channel;
1922 struct ath9k_channel *init_channel; 1879 struct ath9k_channel *init_channel;
1923 int r, pos; 1880 int r;
1924 1881
1925 DPRINTF(sc, ATH_DBG_CONFIG, "Starting driver with " 1882 DPRINTF(sc, ATH_DBG_CONFIG, "Starting driver with "
1926 "initial channel: %d MHz\n", curchan->center_freq); 1883 "initial channel: %d MHz\n", curchan->center_freq);
@@ -1950,11 +1907,9 @@ static int ath9k_start(struct ieee80211_hw *hw)
1950 1907
1951 /* setup initial channel */ 1908 /* setup initial channel */
1952 1909
1953 pos = curchan->hw_value; 1910 sc->chan_idx = curchan->hw_value;
1954 1911
1955 sc->chan_idx = pos; 1912 init_channel = ath_get_curchannel(sc, hw);
1956 init_channel = &sc->sc_ah->channels[pos];
1957 ath9k_update_ichannel(sc, hw, init_channel);
1958 1913
1959 /* Reset SERDES registers */ 1914 /* Reset SERDES registers */
1960 ath9k_hw_configpcipowersave(sc->sc_ah, 0); 1915 ath9k_hw_configpcipowersave(sc->sc_ah, 0);
@@ -2018,10 +1973,6 @@ static int ath9k_start(struct ieee80211_hw *hw)
2018 1973
2019 ieee80211_wake_queues(hw); 1974 ieee80211_wake_queues(hw);
2020 1975
2021#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
2022 r = ath_start_rfkill_poll(sc);
2023#endif
2024
2025mutex_unlock: 1976mutex_unlock:
2026 mutex_unlock(&sc->mutex); 1977 mutex_unlock(&sc->mutex);
2027 1978
@@ -2159,7 +2110,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
2159 } else 2110 } else
2160 sc->rx.rxlink = NULL; 2111 sc->rx.rxlink = NULL;
2161 2112
2162 rfkill_pause_polling(sc->rf_kill.rfkill); 2113 wiphy_rfkill_stop_polling(sc->hw->wiphy);
2163 2114
2164 /* disable HAL and put h/w to sleep */ 2115 /* disable HAL and put h/w to sleep */
2165 ath9k_hw_disable(sc->sc_ah); 2116 ath9k_hw_disable(sc->sc_ah);
@@ -2765,6 +2716,7 @@ struct ieee80211_ops ath9k_ops = {
2765 .ampdu_action = ath9k_ampdu_action, 2716 .ampdu_action = ath9k_ampdu_action,
2766 .sw_scan_start = ath9k_sw_scan_start, 2717 .sw_scan_start = ath9k_sw_scan_start,
2767 .sw_scan_complete = ath9k_sw_scan_complete, 2718 .sw_scan_complete = ath9k_sw_scan_complete,
2719 .rfkill_poll = ath9k_rfkill_poll_state,
2768}; 2720};
2769 2721
2770static struct { 2722static struct {
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 5014a19b0f75..f99f3a76df3f 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -817,6 +817,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
817 } 817 }
818 818
819 if (unlikely(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON | 819 if (unlikely(sc->sc_flags & (SC_OP_WAIT_FOR_BEACON |
820 SC_OP_WAIT_FOR_CAB |
820 SC_OP_WAIT_FOR_PSPOLL_DATA))) 821 SC_OP_WAIT_FOR_PSPOLL_DATA)))
821 ath_rx_ps(sc, skb); 822 ath_rx_ps(sc, skb);
822 823
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index a5637c4aa85d..6d1519e1f011 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2152,7 +2152,6 @@ static int iwl_mac_start(struct ieee80211_hw *hw)
2152 /* we should be verifying the device is ready to be opened */ 2152 /* we should be verifying the device is ready to be opened */
2153 mutex_lock(&priv->mutex); 2153 mutex_lock(&priv->mutex);
2154 2154
2155 memset(&priv->staging_rxon, 0, sizeof(struct iwl_rxon_cmd));
2156 /* fetch ucode file from disk, alloc and copy to bus-master buffers ... 2155 /* fetch ucode file from disk, alloc and copy to bus-master buffers ...
2157 * ucode filename and max sizes are card-specific. */ 2156 * ucode filename and max sizes are card-specific. */
2158 2157
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index f9d16ca5b3d9..6ab07165ea28 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -629,13 +629,9 @@ u8 iwl_is_fat_tx_allowed(struct iwl_priv *priv,
629 if (!sta_ht_inf->ht_supported) 629 if (!sta_ht_inf->ht_supported)
630 return 0; 630 return 0;
631 } 631 }
632 632 return iwl_is_channel_extension(priv, priv->band,
633 if (iwl_ht_conf->ht_protection & IEEE80211_HT_OP_MODE_PROTECTION_20MHZ) 633 le16_to_cpu(priv->staging_rxon.channel),
634 return 1; 634 iwl_ht_conf->extension_chan_offset);
635 else
636 return iwl_is_channel_extension(priv, priv->band,
637 le16_to_cpu(priv->staging_rxon.channel),
638 iwl_ht_conf->extension_chan_offset);
639} 635}
640EXPORT_SYMBOL(iwl_is_fat_tx_allowed); 636EXPORT_SYMBOL(iwl_is_fat_tx_allowed);
641 637
@@ -826,9 +822,18 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
826 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK); 822 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK);
827 if (iwl_is_fat_tx_allowed(priv, NULL)) { 823 if (iwl_is_fat_tx_allowed(priv, NULL)) {
828 /* pure 40 fat */ 824 /* pure 40 fat */
829 if (rxon->flags & RXON_FLG_FAT_PROT_MSK) 825 if (ht_info->ht_protection == IEEE80211_HT_OP_MODE_PROTECTION_20MHZ) {
830 rxon->flags |= RXON_FLG_CHANNEL_MODE_PURE_40; 826 rxon->flags |= RXON_FLG_CHANNEL_MODE_PURE_40;
831 else { 827 /* Note: control channel is opposite of extension channel */
828 switch (ht_info->extension_chan_offset) {
829 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
830 rxon->flags &= ~RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK;
831 break;
832 case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
833 rxon->flags |= RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK;
834 break;
835 }
836 } else {
832 /* Note: control channel is opposite of extension channel */ 837 /* Note: control channel is opposite of extension channel */
833 switch (ht_info->extension_chan_offset) { 838 switch (ht_info->extension_chan_offset) {
834 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: 839 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
@@ -2390,39 +2395,46 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2390 priv->ibss_beacon = ieee80211_beacon_get(hw, vif); 2395 priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
2391 } 2396 }
2392 2397
2393 if ((changes & BSS_CHANGED_BSSID) && !iwl_is_rfkill(priv)) { 2398 if (changes & BSS_CHANGED_BEACON_INT) {
2394 /* If there is currently a HW scan going on in the background 2399 priv->beacon_int = bss_conf->beacon_int;
2395 * then we need to cancel it else the RXON below will fail. */ 2400 /* TODO: in AP mode, do something to make this take effect */
2401 }
2402
2403 if (changes & BSS_CHANGED_BSSID) {
2404 IWL_DEBUG_MAC80211(priv, "BSSID %pM\n", bss_conf->bssid);
2405
2406 /*
2407 * If there is currently a HW scan going on in the
2408 * background then we need to cancel it else the RXON
2409 * below/in post_associate will fail.
2410 */
2396 if (iwl_scan_cancel_timeout(priv, 100)) { 2411 if (iwl_scan_cancel_timeout(priv, 100)) {
2397 IWL_WARN(priv, "Aborted scan still in progress " 2412 IWL_WARN(priv, "Aborted scan still in progress after 100ms\n");
2398 "after 100ms\n");
2399 IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n"); 2413 IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n");
2400 mutex_unlock(&priv->mutex); 2414 mutex_unlock(&priv->mutex);
2401 return; 2415 return;
2402 } 2416 }
2403 memcpy(priv->staging_rxon.bssid_addr, 2417
2404 bss_conf->bssid, ETH_ALEN); 2418 /* mac80211 only sets assoc when in STATION mode */
2405 2419 if (priv->iw_mode == NL80211_IFTYPE_ADHOC ||
2406 /* TODO: Audit driver for usage of these members and see 2420 bss_conf->assoc) {
2407 * if mac80211 deprecates them (priv->bssid looks like it 2421 memcpy(priv->staging_rxon.bssid_addr,
2408 * shouldn't be there, but I haven't scanned the IBSS code 2422 bss_conf->bssid, ETH_ALEN);
2409 * to verify) - jpk */ 2423
2410 memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN); 2424 /* currently needed in a few places */
2411 2425 memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN);
2412 if (priv->iw_mode == NL80211_IFTYPE_AP) 2426 } else {
2413 iwlcore_config_ap(priv); 2427 priv->staging_rxon.filter_flags &=
2414 else { 2428 ~RXON_FILTER_ASSOC_MSK;
2415 int rc = iwlcore_commit_rxon(priv);
2416 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
2417 iwl_rxon_add_station(
2418 priv, priv->active_rxon.bssid_addr, 1);
2419 } 2429 }
2420 } else if (!iwl_is_rfkill(priv)) { 2430
2421 iwl_scan_cancel_timeout(priv, 100);
2422 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
2423 iwlcore_commit_rxon(priv);
2424 } 2431 }
2425 2432
2433 /*
2434 * This needs to be after setting the BSSID in case
2435 * mac80211 decides to do both changes at once because
2436 * it will invoke post_associate.
2437 */
2426 if (priv->iw_mode == NL80211_IFTYPE_ADHOC && 2438 if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
2427 changes & BSS_CHANGED_BEACON) { 2439 changes & BSS_CHANGED_BEACON) {
2428 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); 2440 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
@@ -2431,8 +2443,6 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2431 iwl_mac_beacon_update(hw, beacon); 2443 iwl_mac_beacon_update(hw, beacon);
2432 } 2444 }
2433 2445
2434 mutex_unlock(&priv->mutex);
2435
2436 if (changes & BSS_CHANGED_ERP_PREAMBLE) { 2446 if (changes & BSS_CHANGED_ERP_PREAMBLE) {
2437 IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n", 2447 IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n",
2438 bss_conf->use_short_preamble); 2448 bss_conf->use_short_preamble);
@@ -2450,6 +2460,23 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2450 priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK; 2460 priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
2451 } 2461 }
2452 2462
2463 if (changes & BSS_CHANGED_BASIC_RATES) {
2464 /* XXX use this information
2465 *
2466 * To do that, remove code from iwl_set_rate() and put something
2467 * like this here:
2468 *
2469 if (A-band)
2470 priv->staging_rxon.ofdm_basic_rates =
2471 bss_conf->basic_rates;
2472 else
2473 priv->staging_rxon.ofdm_basic_rates =
2474 bss_conf->basic_rates >> 4;
2475 priv->staging_rxon.cck_basic_rates =
2476 bss_conf->basic_rates & 0xF;
2477 */
2478 }
2479
2453 if (changes & BSS_CHANGED_HT) { 2480 if (changes & BSS_CHANGED_HT) {
2454 iwl_ht_conf(priv, bss_conf); 2481 iwl_ht_conf(priv, bss_conf);
2455 2482
@@ -2459,10 +2486,6 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2459 2486
2460 if (changes & BSS_CHANGED_ASSOC) { 2487 if (changes & BSS_CHANGED_ASSOC) {
2461 IWL_DEBUG_MAC80211(priv, "ASSOC %d\n", bss_conf->assoc); 2488 IWL_DEBUG_MAC80211(priv, "ASSOC %d\n", bss_conf->assoc);
2462 /* This should never happen as this function should
2463 * never be called from interrupt context. */
2464 if (WARN_ON_ONCE(in_interrupt()))
2465 return;
2466 if (bss_conf->assoc) { 2489 if (bss_conf->assoc) {
2467 priv->assoc_id = bss_conf->aid; 2490 priv->assoc_id = bss_conf->aid;
2468 priv->beacon_int = bss_conf->beacon_int; 2491 priv->beacon_int = bss_conf->beacon_int;
@@ -2470,27 +2493,35 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
2470 priv->timestamp = bss_conf->timestamp; 2493 priv->timestamp = bss_conf->timestamp;
2471 priv->assoc_capability = bss_conf->assoc_capability; 2494 priv->assoc_capability = bss_conf->assoc_capability;
2472 2495
2473 /* we have just associated, don't start scan too early 2496 /*
2474 * leave time for EAPOL exchange to complete 2497 * We have just associated, don't start scan too early
2498 * leave time for EAPOL exchange to complete.
2499 *
2500 * XXX: do this in mac80211
2475 */ 2501 */
2476 priv->next_scan_jiffies = jiffies + 2502 priv->next_scan_jiffies = jiffies +
2477 IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; 2503 IWL_DELAY_NEXT_SCAN_AFTER_ASSOC;
2478 mutex_lock(&priv->mutex); 2504 if (!iwl_is_rfkill(priv))
2479 priv->cfg->ops->lib->post_associate(priv); 2505 priv->cfg->ops->lib->post_associate(priv);
2480 mutex_unlock(&priv->mutex); 2506 } else
2481 } else {
2482 priv->assoc_id = 0; 2507 priv->assoc_id = 0;
2483 IWL_DEBUG_MAC80211(priv, "DISASSOC %d\n", bss_conf->assoc); 2508
2509 }
2510
2511 if (changes && iwl_is_associated(priv) && priv->assoc_id) {
2512 IWL_DEBUG_MAC80211(priv, "Changes (%#x) while associated\n",
2513 changes);
2514 ret = iwl_send_rxon_assoc(priv);
2515 if (!ret) {
2516 /* Sync active_rxon with latest change. */
2517 memcpy((void *)&priv->active_rxon,
2518 &priv->staging_rxon,
2519 sizeof(struct iwl_rxon_cmd));
2484 } 2520 }
2485 } else if (changes && iwl_is_associated(priv) && priv->assoc_id) {
2486 IWL_DEBUG_MAC80211(priv, "Associated Changes %d\n", changes);
2487 ret = iwl_send_rxon_assoc(priv);
2488 if (!ret)
2489 /* Sync active_rxon with latest change. */
2490 memcpy((void *)&priv->active_rxon,
2491 &priv->staging_rxon,
2492 sizeof(struct iwl_rxon_cmd));
2493 } 2521 }
2522
2523 mutex_unlock(&priv->mutex);
2524
2494 IWL_DEBUG_MAC80211(priv, "leave\n"); 2525 IWL_DEBUG_MAC80211(priv, "leave\n");
2495} 2526}
2496EXPORT_SYMBOL(iwl_bss_info_changed); 2527EXPORT_SYMBOL(iwl_bss_info_changed);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 83d31606dd00..cb9bd4c8f25e 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2498,8 +2498,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2498 struct iwl3945_rxon_cmd *active_rxon = 2498 struct iwl3945_rxon_cmd *active_rxon =
2499 (struct iwl3945_rxon_cmd *)(&priv->active_rxon); 2499 (struct iwl3945_rxon_cmd *)(&priv->active_rxon);
2500 2500
2501 memcpy(&priv->staging_rxon, &priv->active_rxon, 2501 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
2502 sizeof(priv->staging_rxon));
2503 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; 2502 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
2504 } else { 2503 } else {
2505 /* Initialize our rx_config data */ 2504 /* Initialize our rx_config data */
@@ -3147,7 +3146,6 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
3147 /* we should be verifying the device is ready to be opened */ 3146 /* we should be verifying the device is ready to be opened */
3148 mutex_lock(&priv->mutex); 3147 mutex_lock(&priv->mutex);
3149 3148
3150 memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon));
3151 /* fetch ucode file from disk, alloc and copy to bus-master buffers ... 3149 /* fetch ucode file from disk, alloc and copy to bus-master buffers ...
3152 * ucode filename and max sizes are card-specific. */ 3150 * ucode filename and max sizes are card-specific. */
3153 3151
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 06a46d7b3d6c..6564282ce476 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -812,7 +812,6 @@ out:
812static void if_spi_e2h(struct if_spi_card *card) 812static void if_spi_e2h(struct if_spi_card *card)
813{ 813{
814 int err = 0; 814 int err = 0;
815 unsigned long flags;
816 u32 cause; 815 u32 cause;
817 struct lbs_private *priv = card->priv; 816 struct lbs_private *priv = card->priv;
818 817
@@ -827,10 +826,7 @@ static void if_spi_e2h(struct if_spi_card *card)
827 /* generate a card interrupt */ 826 /* generate a card interrupt */
828 spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG, IF_SPI_CIC_HOST_EVENT); 827 spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG, IF_SPI_CIC_HOST_EVENT);
829 828
830 spin_lock_irqsave(&priv->driver_lock, flags);
831 lbs_queue_event(priv, cause & 0xff); 829 lbs_queue_event(priv, cause & 0xff);
832 spin_unlock_irqrestore(&priv->driver_lock, flags);
833
834out: 830out:
835 if (err) 831 if (err)
836 lbs_pr_err("%s: error %d\n", __func__, err); 832 lbs_pr_err("%s: error %d\n", __func__, err);
@@ -875,7 +871,12 @@ static int lbs_spi_thread(void *data)
875 err = if_spi_c2h_data(card); 871 err = if_spi_c2h_data(card);
876 if (err) 872 if (err)
877 goto err; 873 goto err;
878 if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY) { 874
875 /* workaround: in PS mode, the card does not set the Command
876 * Download Ready bit, but it sets TX Download Ready. */
877 if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY ||
878 (card->priv->psstate != PS_STATE_FULL_POWER &&
879 (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) {
879 /* This means two things. First of all, 880 /* This means two things. First of all,
880 * if there was a previous command sent, the card has 881 * if there was a previous command sent, the card has
881 * successfully received it. 882 * successfully received it.
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 2faf0e14f05a..74909c4aaeea 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -177,7 +177,7 @@ dell_send_request(struct calling_interface_buffer *buffer, int class,
177static int dell_rfkill_set(void *data, bool blocked) 177static int dell_rfkill_set(void *data, bool blocked)
178{ 178{
179 struct calling_interface_buffer buffer; 179 struct calling_interface_buffer buffer;
180 int disable = blocked ? 0 : 1; 180 int disable = blocked ? 1 : 0;
181 unsigned long radio = (unsigned long)data; 181 unsigned long radio = (unsigned long)data;
182 182
183 memset(&buffer, 0, sizeof(struct calling_interface_buffer)); 183 memset(&buffer, 0, sizeof(struct calling_interface_buffer));
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index e48d9a4506ff..dafaa4a92df5 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1133,8 +1133,9 @@ static void sony_nc_rfkill_update()
1133 continue; 1133 continue;
1134 1134
1135 if (hwblock) { 1135 if (hwblock) {
1136 if (rfkill_set_hw_state(sony_rfkill_devices[i], true)) 1136 if (rfkill_set_hw_state(sony_rfkill_devices[i], true)) {
1137 sony_nc_rfkill_set((void *)i, true); 1137 /* we already know we're blocked */
1138 }
1138 continue; 1139 continue;
1139 } 1140 }
1140 1141
diff --git a/drivers/pps/Kconfig b/drivers/pps/Kconfig
new file mode 100644
index 000000000000..cc2eb8edb514
--- /dev/null
+++ b/drivers/pps/Kconfig
@@ -0,0 +1,33 @@
1#
2# PPS support configuration
3#
4
5menu "PPS support"
6
7config PPS
8 tristate "PPS support"
9 depends on EXPERIMENTAL
10 ---help---
11 PPS (Pulse Per Second) is a special pulse provided by some GPS
12 antennae. Userland can use it to get a high-precision time
13 reference.
14
15 Some antennae's PPS signals are connected with the CD (Carrier
16 Detect) pin of the serial line they use to communicate with the
17 host. In this case use the SERIAL_LINE client support.
18
19 Some antennae's PPS signals are connected with some special host
20 inputs so you have to enable the corresponding client support.
21
22 To compile this driver as a module, choose M here: the module
23 will be called pps_core.ko.
24
25config PPS_DEBUG
26 bool "PPS debugging messages"
27 depends on PPS
28 help
29 Say Y here if you want the PPS support to produce a bunch of debug
30 messages to the system log. Select this if you are having a
31 problem with PPS support and want to see more of what is going on.
32
33endmenu
diff --git a/drivers/pps/Makefile b/drivers/pps/Makefile
new file mode 100644
index 000000000000..19ea582f431d
--- /dev/null
+++ b/drivers/pps/Makefile
@@ -0,0 +1,8 @@
1#
2# Makefile for the PPS core.
3#
4
5pps_core-y := pps.o kapi.o sysfs.o
6obj-$(CONFIG_PPS) := pps_core.o
7
8ccflags-$(CONFIG_PPS_DEBUG) := -DDEBUG
diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c
new file mode 100644
index 000000000000..35a0b192d768
--- /dev/null
+++ b/drivers/pps/kapi.c
@@ -0,0 +1,329 @@
1/*
2 * kernel API
3 *
4 *
5 * Copyright (C) 2005-2009 Rodolfo Giometti <giometti@linux.it>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/init.h>
26#include <linux/sched.h>
27#include <linux/time.h>
28#include <linux/spinlock.h>
29#include <linux/idr.h>
30#include <linux/fs.h>
31#include <linux/pps_kernel.h>
32
33/*
34 * Global variables
35 */
36
37DEFINE_SPINLOCK(pps_idr_lock);
38DEFINE_IDR(pps_idr);
39
40/*
41 * Local functions
42 */
43
44static void pps_add_offset(struct pps_ktime *ts, struct pps_ktime *offset)
45{
46 ts->nsec += offset->nsec;
47 while (ts->nsec >= NSEC_PER_SEC) {
48 ts->nsec -= NSEC_PER_SEC;
49 ts->sec++;
50 }
51 while (ts->nsec < 0) {
52 ts->nsec += NSEC_PER_SEC;
53 ts->sec--;
54 }
55 ts->sec += offset->sec;
56}
57
58/*
59 * Exported functions
60 */
61
62/* pps_get_source - find a PPS source
63 * @source: the PPS source ID.
64 *
65 * This function is used to find an already registered PPS source into the
66 * system.
67 *
68 * The function returns NULL if found nothing, otherwise it returns a pointer
69 * to the PPS source data struct (the refcounter is incremented by 1).
70 */
71
72struct pps_device *pps_get_source(int source)
73{
74 struct pps_device *pps;
75 unsigned long flags;
76
77 spin_lock_irqsave(&pps_idr_lock, flags);
78
79 pps = idr_find(&pps_idr, source);
80 if (pps != NULL)
81 atomic_inc(&pps->usage);
82
83 spin_unlock_irqrestore(&pps_idr_lock, flags);
84
85 return pps;
86}
87
88/* pps_put_source - free the PPS source data
89 * @pps: a pointer to the PPS source.
90 *
91 * This function is used to free a PPS data struct if its refcount is 0.
92 */
93
94void pps_put_source(struct pps_device *pps)
95{
96 unsigned long flags;
97
98 spin_lock_irqsave(&pps_idr_lock, flags);
99 BUG_ON(atomic_read(&pps->usage) == 0);
100
101 if (!atomic_dec_and_test(&pps->usage)) {
102 pps = NULL;
103 goto exit;
104 }
105
106 /* No more reference to the PPS source. We can safely remove the
107 * PPS data struct.
108 */
109 idr_remove(&pps_idr, pps->id);
110
111exit:
112 spin_unlock_irqrestore(&pps_idr_lock, flags);
113 kfree(pps);
114}
115
116/* pps_register_source - add a PPS source in the system
117 * @info: the PPS info struct
118 * @default_params: the default PPS parameters of the new source
119 *
120 * This function is used to add a new PPS source in the system. The new
121 * source is described by info's fields and it will have, as default PPS
122 * parameters, the ones specified into default_params.
123 *
124 * The function returns, in case of success, the PPS source ID.
125 */
126
127int pps_register_source(struct pps_source_info *info, int default_params)
128{
129 struct pps_device *pps;
130 int id;
131 int err;
132
133 /* Sanity checks */
134 if ((info->mode & default_params) != default_params) {
135 printk(KERN_ERR "pps: %s: unsupported default parameters\n",
136 info->name);
137 err = -EINVAL;
138 goto pps_register_source_exit;
139 }
140 if ((info->mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR)) != 0 &&
141 info->echo == NULL) {
142 printk(KERN_ERR "pps: %s: echo function is not defined\n",
143 info->name);
144 err = -EINVAL;
145 goto pps_register_source_exit;
146 }
147 if ((info->mode & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) == 0) {
148 printk(KERN_ERR "pps: %s: unspecified time format\n",
149 info->name);
150 err = -EINVAL;
151 goto pps_register_source_exit;
152 }
153
154 /* Allocate memory for the new PPS source struct */
155 pps = kzalloc(sizeof(struct pps_device), GFP_KERNEL);
156 if (pps == NULL) {
157 err = -ENOMEM;
158 goto pps_register_source_exit;
159 }
160
161 /* These initializations must be done before calling idr_get_new()
162 * in order to avoid reces into pps_event().
163 */
164 pps->params.api_version = PPS_API_VERS;
165 pps->params.mode = default_params;
166 pps->info = *info;
167
168 init_waitqueue_head(&pps->queue);
169 spin_lock_init(&pps->lock);
170 atomic_set(&pps->usage, 1);
171
172 /* Get new ID for the new PPS source */
173 if (idr_pre_get(&pps_idr, GFP_KERNEL) == 0) {
174 err = -ENOMEM;
175 goto kfree_pps;
176 }
177
178 spin_lock_irq(&pps_idr_lock);
179
180 /* Now really allocate the PPS source.
181 * After idr_get_new() calling the new source will be freely available
182 * into the kernel.
183 */
184 err = idr_get_new(&pps_idr, pps, &id);
185 if (err < 0) {
186 spin_unlock_irq(&pps_idr_lock);
187 goto kfree_pps;
188 }
189
190 id = id & MAX_ID_MASK;
191 if (id >= PPS_MAX_SOURCES) {
192 spin_unlock_irq(&pps_idr_lock);
193
194 printk(KERN_ERR "pps: %s: too many PPS sources in the system\n",
195 info->name);
196 err = -EBUSY;
197 goto free_idr;
198 }
199 pps->id = id;
200
201 spin_unlock_irq(&pps_idr_lock);
202
203 /* Create the char device */
204 err = pps_register_cdev(pps);
205 if (err < 0) {
206 printk(KERN_ERR "pps: %s: unable to create char device\n",
207 info->name);
208 goto free_idr;
209 }
210
211 pr_info("new PPS source %s at ID %d\n", info->name, id);
212
213 return id;
214
215free_idr:
216 spin_lock_irq(&pps_idr_lock);
217 idr_remove(&pps_idr, id);
218 spin_unlock_irq(&pps_idr_lock);
219
220kfree_pps:
221 kfree(pps);
222
223pps_register_source_exit:
224 printk(KERN_ERR "pps: %s: unable to register source\n", info->name);
225
226 return err;
227}
228EXPORT_SYMBOL(pps_register_source);
229
230/* pps_unregister_source - remove a PPS source from the system
231 * @source: the PPS source ID
232 *
233 * This function is used to remove a previously registered PPS source from
234 * the system.
235 */
236
237void pps_unregister_source(int source)
238{
239 struct pps_device *pps;
240
241 spin_lock_irq(&pps_idr_lock);
242 pps = idr_find(&pps_idr, source);
243
244 if (!pps) {
245 BUG();
246 spin_unlock_irq(&pps_idr_lock);
247 return;
248 }
249 spin_unlock_irq(&pps_idr_lock);
250
251 pps_unregister_cdev(pps);
252 pps_put_source(pps);
253}
254EXPORT_SYMBOL(pps_unregister_source);
255
256/* pps_event - register a PPS event into the system
257 * @source: the PPS source ID
258 * @ts: the event timestamp
259 * @event: the event type
260 * @data: userdef pointer
261 *
262 * This function is used by each PPS client in order to register a new
263 * PPS event into the system (it's usually called inside an IRQ handler).
264 *
265 * If an echo function is associated with the PPS source it will be called
266 * as:
267 * pps->info.echo(source, event, data);
268 */
269
270void pps_event(int source, struct pps_ktime *ts, int event, void *data)
271{
272 struct pps_device *pps;
273 unsigned long flags;
274
275 if ((event & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR)) == 0) {
276 printk(KERN_ERR "pps: unknown event (%x) for source %d\n",
277 event, source);
278 return;
279 }
280
281 pps = pps_get_source(source);
282 if (!pps)
283 return;
284
285 pr_debug("PPS event on source %d at %llu.%06u\n",
286 pps->id, (unsigned long long) ts->sec, ts->nsec);
287
288 spin_lock_irqsave(&pps->lock, flags);
289
290 /* Must call the echo function? */
291 if ((pps->params.mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR)))
292 pps->info.echo(source, event, data);
293
294 /* Check the event */
295 pps->current_mode = pps->params.mode;
296 if (event & PPS_CAPTUREASSERT) {
297 /* We have to add an offset? */
298 if (pps->params.mode & PPS_OFFSETASSERT)
299 pps_add_offset(ts, &pps->params.assert_off_tu);
300
301 /* Save the time stamp */
302 pps->assert_tu = *ts;
303 pps->assert_sequence++;
304 pr_debug("capture assert seq #%u for source %d\n",
305 pps->assert_sequence, source);
306 }
307 if (event & PPS_CAPTURECLEAR) {
308 /* We have to add an offset? */
309 if (pps->params.mode & PPS_OFFSETCLEAR)
310 pps_add_offset(ts, &pps->params.clear_off_tu);
311
312 /* Save the time stamp */
313 pps->clear_tu = *ts;
314 pps->clear_sequence++;
315 pr_debug("capture clear seq #%u for source %d\n",
316 pps->clear_sequence, source);
317 }
318
319 pps->go = ~0;
320 wake_up_interruptible(&pps->queue);
321
322 kill_fasync(&pps->async_queue, SIGIO, POLL_IN);
323
324 spin_unlock_irqrestore(&pps->lock, flags);
325
326 /* Now we can release the PPS source for (possible) deregistration */
327 pps_put_source(pps);
328}
329EXPORT_SYMBOL(pps_event);
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
new file mode 100644
index 000000000000..ac8cc8cea1e3
--- /dev/null
+++ b/drivers/pps/pps.c
@@ -0,0 +1,312 @@
1/*
2 * PPS core file
3 *
4 *
5 * Copyright (C) 2005-2009 Rodolfo Giometti <giometti@linux.it>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/init.h>
26#include <linux/sched.h>
27#include <linux/uaccess.h>
28#include <linux/idr.h>
29#include <linux/cdev.h>
30#include <linux/poll.h>
31#include <linux/pps_kernel.h>
32
33/*
34 * Local variables
35 */
36
37static dev_t pps_devt;
38static struct class *pps_class;
39
40/*
41 * Char device methods
42 */
43
44static unsigned int pps_cdev_poll(struct file *file, poll_table *wait)
45{
46 struct pps_device *pps = file->private_data;
47
48 poll_wait(file, &pps->queue, wait);
49
50 return POLLIN | POLLRDNORM;
51}
52
53static int pps_cdev_fasync(int fd, struct file *file, int on)
54{
55 struct pps_device *pps = file->private_data;
56 return fasync_helper(fd, file, on, &pps->async_queue);
57}
58
59static long pps_cdev_ioctl(struct file *file,
60 unsigned int cmd, unsigned long arg)
61{
62 struct pps_device *pps = file->private_data;
63 struct pps_kparams params;
64 struct pps_fdata fdata;
65 unsigned long ticks;
66 void __user *uarg = (void __user *) arg;
67 int __user *iuarg = (int __user *) arg;
68 int err;
69
70 switch (cmd) {
71 case PPS_GETPARAMS:
72 pr_debug("PPS_GETPARAMS: source %d\n", pps->id);
73
74 /* Return current parameters */
75 err = copy_to_user(uarg, &pps->params,
76 sizeof(struct pps_kparams));
77 if (err)
78 return -EFAULT;
79
80 break;
81
82 case PPS_SETPARAMS:
83 pr_debug("PPS_SETPARAMS: source %d\n", pps->id);
84
85 /* Check the capabilities */
86 if (!capable(CAP_SYS_TIME))
87 return -EPERM;
88
89 err = copy_from_user(&params, uarg, sizeof(struct pps_kparams));
90 if (err)
91 return -EFAULT;
92 if (!(params.mode & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR))) {
93 pr_debug("capture mode unspecified (%x)\n",
94 params.mode);
95 return -EINVAL;
96 }
97
98 /* Check for supported capabilities */
99 if ((params.mode & ~pps->info.mode) != 0) {
100 pr_debug("unsupported capabilities (%x)\n",
101 params.mode);
102 return -EINVAL;
103 }
104
105 spin_lock_irq(&pps->lock);
106
107 /* Save the new parameters */
108 pps->params = params;
109
110 /* Restore the read only parameters */
111 if ((params.mode & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) == 0) {
112 /* section 3.3 of RFC 2783 interpreted */
113 pr_debug("time format unspecified (%x)\n",
114 params.mode);
115 pps->params.mode |= PPS_TSFMT_TSPEC;
116 }
117 if (pps->info.mode & PPS_CANWAIT)
118 pps->params.mode |= PPS_CANWAIT;
119 pps->params.api_version = PPS_API_VERS;
120
121 spin_unlock_irq(&pps->lock);
122
123 break;
124
125 case PPS_GETCAP:
126 pr_debug("PPS_GETCAP: source %d\n", pps->id);
127
128 err = put_user(pps->info.mode, iuarg);
129 if (err)
130 return -EFAULT;
131
132 break;
133
134 case PPS_FETCH:
135 pr_debug("PPS_FETCH: source %d\n", pps->id);
136
137 err = copy_from_user(&fdata, uarg, sizeof(struct pps_fdata));
138 if (err)
139 return -EFAULT;
140
141 pps->go = 0;
142
143 /* Manage the timeout */
144 if (fdata.timeout.flags & PPS_TIME_INVALID)
145 err = wait_event_interruptible(pps->queue, pps->go);
146 else {
147 pr_debug("timeout %lld.%09d\n",
148 (long long) fdata.timeout.sec,
149 fdata.timeout.nsec);
150 ticks = fdata.timeout.sec * HZ;
151 ticks += fdata.timeout.nsec / (NSEC_PER_SEC / HZ);
152
153 if (ticks != 0) {
154 err = wait_event_interruptible_timeout(
155 pps->queue, pps->go, ticks);
156 if (err == 0)
157 return -ETIMEDOUT;
158 }
159 }
160
161 /* Check for pending signals */
162 if (err == -ERESTARTSYS) {
163 pr_debug("pending signal caught\n");
164 return -EINTR;
165 }
166
167 /* Return the fetched timestamp */
168 spin_lock_irq(&pps->lock);
169
170 fdata.info.assert_sequence = pps->assert_sequence;
171 fdata.info.clear_sequence = pps->clear_sequence;
172 fdata.info.assert_tu = pps->assert_tu;
173 fdata.info.clear_tu = pps->clear_tu;
174 fdata.info.current_mode = pps->current_mode;
175
176 spin_unlock_irq(&pps->lock);
177
178 err = copy_to_user(uarg, &fdata, sizeof(struct pps_fdata));
179 if (err)
180 return -EFAULT;
181
182 break;
183
184 default:
185 return -ENOTTY;
186 break;
187 }
188
189 return 0;
190}
191
192static int pps_cdev_open(struct inode *inode, struct file *file)
193{
194 struct pps_device *pps = container_of(inode->i_cdev,
195 struct pps_device, cdev);
196 int found;
197
198 found = pps_get_source(pps->id) != 0;
199 if (!found)
200 return -ENODEV;
201
202 file->private_data = pps;
203
204 return 0;
205}
206
207static int pps_cdev_release(struct inode *inode, struct file *file)
208{
209 struct pps_device *pps = file->private_data;
210
211 /* Free the PPS source and wake up (possible) deregistration */
212 pps_put_source(pps);
213
214 return 0;
215}
216
217/*
218 * Char device stuff
219 */
220
221static const struct file_operations pps_cdev_fops = {
222 .owner = THIS_MODULE,
223 .llseek = no_llseek,
224 .poll = pps_cdev_poll,
225 .fasync = pps_cdev_fasync,
226 .unlocked_ioctl = pps_cdev_ioctl,
227 .open = pps_cdev_open,
228 .release = pps_cdev_release,
229};
230
231int pps_register_cdev(struct pps_device *pps)
232{
233 int err;
234
235 pps->devno = MKDEV(MAJOR(pps_devt), pps->id);
236 cdev_init(&pps->cdev, &pps_cdev_fops);
237 pps->cdev.owner = pps->info.owner;
238
239 err = cdev_add(&pps->cdev, pps->devno, 1);
240 if (err) {
241 printk(KERN_ERR "pps: %s: failed to add char device %d:%d\n",
242 pps->info.name, MAJOR(pps_devt), pps->id);
243 return err;
244 }
245 pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL,
246 "pps%d", pps->id);
247 if (err)
248 goto del_cdev;
249 dev_set_drvdata(pps->dev, pps);
250
251 pr_debug("source %s got cdev (%d:%d)\n", pps->info.name,
252 MAJOR(pps_devt), pps->id);
253
254 return 0;
255
256del_cdev:
257 cdev_del(&pps->cdev);
258
259 return err;
260}
261
262void pps_unregister_cdev(struct pps_device *pps)
263{
264 device_destroy(pps_class, pps->devno);
265 cdev_del(&pps->cdev);
266}
267
268/*
269 * Module stuff
270 */
271
272static void __exit pps_exit(void)
273{
274 class_destroy(pps_class);
275 unregister_chrdev_region(pps_devt, PPS_MAX_SOURCES);
276}
277
278static int __init pps_init(void)
279{
280 int err;
281
282 pps_class = class_create(THIS_MODULE, "pps");
283 if (!pps_class) {
284 printk(KERN_ERR "pps: failed to allocate class\n");
285 return -ENOMEM;
286 }
287 pps_class->dev_attrs = pps_attrs;
288
289 err = alloc_chrdev_region(&pps_devt, 0, PPS_MAX_SOURCES, "pps");
290 if (err < 0) {
291 printk(KERN_ERR "pps: failed to allocate char device region\n");
292 goto remove_class;
293 }
294
295 pr_info("LinuxPPS API ver. %d registered\n", PPS_API_VERS);
296 pr_info("Software ver. %s - Copyright 2005-2007 Rodolfo Giometti "
297 "<giometti@linux.it>\n", PPS_VERSION);
298
299 return 0;
300
301remove_class:
302 class_destroy(pps_class);
303
304 return err;
305}
306
307subsys_initcall(pps_init);
308module_exit(pps_exit);
309
310MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
311MODULE_DESCRIPTION("LinuxPPS support (RFC 2783) - ver. " PPS_VERSION);
312MODULE_LICENSE("GPL");
diff --git a/drivers/pps/sysfs.c b/drivers/pps/sysfs.c
new file mode 100644
index 000000000000..ef0978c71eee
--- /dev/null
+++ b/drivers/pps/sysfs.c
@@ -0,0 +1,98 @@
1/*
2 * PPS sysfs support
3 *
4 *
5 * Copyright (C) 2007-2009 Rodolfo Giometti <giometti@linux.it>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22
23#include <linux/device.h>
24#include <linux/module.h>
25#include <linux/string.h>
26#include <linux/pps_kernel.h>
27
28/*
29 * Attribute functions
30 */
31
32static ssize_t pps_show_assert(struct device *dev,
33 struct device_attribute *attr, char *buf)
34{
35 struct pps_device *pps = dev_get_drvdata(dev);
36
37 if (!(pps->info.mode & PPS_CAPTUREASSERT))
38 return 0;
39
40 return sprintf(buf, "%lld.%09d#%d\n",
41 (long long) pps->assert_tu.sec, pps->assert_tu.nsec,
42 pps->assert_sequence);
43}
44
45static ssize_t pps_show_clear(struct device *dev,
46 struct device_attribute *attr, char *buf)
47{
48 struct pps_device *pps = dev_get_drvdata(dev);
49
50 if (!(pps->info.mode & PPS_CAPTURECLEAR))
51 return 0;
52
53 return sprintf(buf, "%lld.%09d#%d\n",
54 (long long) pps->clear_tu.sec, pps->clear_tu.nsec,
55 pps->clear_sequence);
56}
57
58static ssize_t pps_show_mode(struct device *dev,
59 struct device_attribute *attr, char *buf)
60{
61 struct pps_device *pps = dev_get_drvdata(dev);
62
63 return sprintf(buf, "%4x\n", pps->info.mode);
64}
65
66static ssize_t pps_show_echo(struct device *dev,
67 struct device_attribute *attr, char *buf)
68{
69 struct pps_device *pps = dev_get_drvdata(dev);
70
71 return sprintf(buf, "%d\n", !!pps->info.echo);
72}
73
74static ssize_t pps_show_name(struct device *dev,
75 struct device_attribute *attr, char *buf)
76{
77 struct pps_device *pps = dev_get_drvdata(dev);
78
79 return sprintf(buf, "%s\n", pps->info.name);
80}
81
82static ssize_t pps_show_path(struct device *dev,
83 struct device_attribute *attr, char *buf)
84{
85 struct pps_device *pps = dev_get_drvdata(dev);
86
87 return sprintf(buf, "%s\n", pps->info.path);
88}
89
90struct device_attribute pps_attrs[] = {
91 __ATTR(assert, S_IRUGO, pps_show_assert, NULL),
92 __ATTR(clear, S_IRUGO, pps_show_clear, NULL),
93 __ATTR(mode, S_IRUGO, pps_show_mode, NULL),
94 __ATTR(echo, S_IRUGO, pps_show_echo, NULL),
95 __ATTR(name, S_IRUGO, pps_show_name, NULL),
96 __ATTR(path, S_IRUGO, pps_show_path, NULL),
97 __ATTR_NULL,
98};
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 3b78540288c7..45415096c294 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -263,15 +263,21 @@ static void rio_route_set_ops(struct rio_dev *rdev)
263 * device to the RIO device list. Creates the generic sysfs nodes 263 * device to the RIO device list. Creates the generic sysfs nodes
264 * for an RIO device. 264 * for an RIO device.
265 */ 265 */
266static void __devinit rio_add_device(struct rio_dev *rdev) 266static int __devinit rio_add_device(struct rio_dev *rdev)
267{ 267{
268 device_add(&rdev->dev); 268 int err;
269
270 err = device_add(&rdev->dev);
271 if (err)
272 return err;
269 273
270 spin_lock(&rio_global_list_lock); 274 spin_lock(&rio_global_list_lock);
271 list_add_tail(&rdev->global_list, &rio_devices); 275 list_add_tail(&rdev->global_list, &rio_devices);
272 spin_unlock(&rio_global_list_lock); 276 spin_unlock(&rio_global_list_lock);
273 277
274 rio_create_sysfs_dev_files(rdev); 278 rio_create_sysfs_dev_files(rdev);
279
280 return 0;
275} 281}
276 282
277/** 283/**
@@ -294,13 +300,14 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net,
294 struct rio_mport *port, u16 destid, 300 struct rio_mport *port, u16 destid,
295 u8 hopcount, int do_enum) 301 u8 hopcount, int do_enum)
296{ 302{
303 int ret = 0;
297 struct rio_dev *rdev; 304 struct rio_dev *rdev;
298 struct rio_switch *rswitch; 305 struct rio_switch *rswitch = NULL;
299 int result, rdid; 306 int result, rdid;
300 307
301 rdev = kzalloc(sizeof(struct rio_dev), GFP_KERNEL); 308 rdev = kzalloc(sizeof(struct rio_dev), GFP_KERNEL);
302 if (!rdev) 309 if (!rdev)
303 goto out; 310 return NULL;
304 311
305 rdev->net = net; 312 rdev->net = net;
306 rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR, 313 rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR,
@@ -343,23 +350,16 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net,
343 rio_mport_read_config_32(port, destid, hopcount, 350 rio_mport_read_config_32(port, destid, hopcount,
344 RIO_SWP_INFO_CAR, &rdev->swpinfo); 351 RIO_SWP_INFO_CAR, &rdev->swpinfo);
345 rswitch = kmalloc(sizeof(struct rio_switch), GFP_KERNEL); 352 rswitch = kmalloc(sizeof(struct rio_switch), GFP_KERNEL);
346 if (!rswitch) { 353 if (!rswitch)
347 kfree(rdev); 354 goto cleanup;
348 rdev = NULL;
349 goto out;
350 }
351 rswitch->switchid = next_switchid; 355 rswitch->switchid = next_switchid;
352 rswitch->hopcount = hopcount; 356 rswitch->hopcount = hopcount;
353 rswitch->destid = destid; 357 rswitch->destid = destid;
354 rswitch->route_table = kzalloc(sizeof(u8)* 358 rswitch->route_table = kzalloc(sizeof(u8)*
355 RIO_MAX_ROUTE_ENTRIES(port->sys_size), 359 RIO_MAX_ROUTE_ENTRIES(port->sys_size),
356 GFP_KERNEL); 360 GFP_KERNEL);
357 if (!rswitch->route_table) { 361 if (!rswitch->route_table)
358 kfree(rdev); 362 goto cleanup;
359 rdev = NULL;
360 kfree(rswitch);
361 goto out;
362 }
363 /* Initialize switch route table */ 363 /* Initialize switch route table */
364 for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES(port->sys_size); 364 for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES(port->sys_size);
365 rdid++) 365 rdid++)
@@ -390,10 +390,19 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net,
390 rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE], 390 rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE],
391 0, 0xffff); 391 0, 0xffff);
392 392
393 rio_add_device(rdev); 393 ret = rio_add_device(rdev);
394 if (ret)
395 goto cleanup;
394 396
395 out:
396 return rdev; 397 return rdev;
398
399cleanup:
400 if (rswitch) {
401 kfree(rswitch->route_table);
402 kfree(rswitch);
403 }
404 kfree(rdev);
405 return NULL;
397} 406}
398 407
399/** 408/**
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c
index 97a147f050d6..ba742e82c57d 100644
--- a/drivers/rapidio/rio-sysfs.c
+++ b/drivers/rapidio/rio-sysfs.c
@@ -214,9 +214,11 @@ static struct bin_attribute rio_config_attr = {
214 */ 214 */
215int rio_create_sysfs_dev_files(struct rio_dev *rdev) 215int rio_create_sysfs_dev_files(struct rio_dev *rdev)
216{ 216{
217 sysfs_create_bin_file(&rdev->dev.kobj, &rio_config_attr); 217 int err = 0;
218 218
219 return 0; 219 err = sysfs_create_bin_file(&rdev->dev.kobj, &rio_config_attr);
220
221 return err;
220} 222}
221 223
222/** 224/**
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 277d35d232fa..81adbdbd5042 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -296,6 +296,15 @@ config RTC_DRV_RX8581
296 This driver can also be built as a module. If so the module 296 This driver can also be built as a module. If so the module
297 will be called rtc-rx8581. 297 will be called rtc-rx8581.
298 298
299config RTC_DRV_RX8025
300 tristate "Epson RX-8025SA/NB"
301 help
302 If you say yes here you get support for the Epson
303 RX-8025SA/NB RTC chips.
304
305 This driver can also be built as a module. If so, the module
306 will be called rtc-rx8025.
307
299endif # I2C 308endif # I2C
300 309
301comment "SPI RTC drivers" 310comment "SPI RTC drivers"
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 6c0639a14f09..3c0f2b2ac927 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -62,6 +62,7 @@ obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o
62obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o 62obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o
63obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o 63obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o
64obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o 64obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o
65obj-$(CONFIG_RTC_DRV_RX8025) += rtc-rx8025.o
65obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx8581.o 66obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx8581.o
66obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o 67obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
67obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o 68obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 4348c4b0d453..4cdb31a362ca 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -371,19 +371,21 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable);
371 * @rtc: the rtc device 371 * @rtc: the rtc device
372 * @num: how many irqs are being reported (usually one) 372 * @num: how many irqs are being reported (usually one)
373 * @events: mask of RTC_IRQF with one or more of RTC_PF, RTC_AF, RTC_UF 373 * @events: mask of RTC_IRQF with one or more of RTC_PF, RTC_AF, RTC_UF
374 * Context: in_interrupt(), irqs blocked 374 * Context: any
375 */ 375 */
376void rtc_update_irq(struct rtc_device *rtc, 376void rtc_update_irq(struct rtc_device *rtc,
377 unsigned long num, unsigned long events) 377 unsigned long num, unsigned long events)
378{ 378{
379 spin_lock(&rtc->irq_lock); 379 unsigned long flags;
380
381 spin_lock_irqsave(&rtc->irq_lock, flags);
380 rtc->irq_data = (rtc->irq_data + (num << 8)) | events; 382 rtc->irq_data = (rtc->irq_data + (num << 8)) | events;
381 spin_unlock(&rtc->irq_lock); 383 spin_unlock_irqrestore(&rtc->irq_lock, flags);
382 384
383 spin_lock(&rtc->irq_task_lock); 385 spin_lock_irqsave(&rtc->irq_task_lock, flags);
384 if (rtc->irq_task) 386 if (rtc->irq_task)
385 rtc->irq_task->func(rtc->irq_task->private_data); 387 rtc->irq_task->func(rtc->irq_task->private_data);
386 spin_unlock(&rtc->irq_task_lock); 388 spin_unlock_irqrestore(&rtc->irq_task_lock, flags);
387 389
388 wake_up_interruptible(&rtc->irq_queue); 390 wake_up_interruptible(&rtc->irq_queue);
389 kill_fasync(&rtc->async_queue, SIGIO, POLL_IN); 391 kill_fasync(&rtc->async_queue, SIGIO, POLL_IN);
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 45152f4952d6..8a11de9552cd 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -60,8 +60,7 @@ static void rtc_uie_task(struct work_struct *work)
60 60
61 err = rtc_read_time(rtc, &tm); 61 err = rtc_read_time(rtc, &tm);
62 62
63 local_irq_disable(); 63 spin_lock_irq(&rtc->irq_lock);
64 spin_lock(&rtc->irq_lock);
65 if (rtc->stop_uie_polling || err) { 64 if (rtc->stop_uie_polling || err) {
66 rtc->uie_task_active = 0; 65 rtc->uie_task_active = 0;
67 } else if (rtc->oldsecs != tm.tm_sec) { 66 } else if (rtc->oldsecs != tm.tm_sec) {
@@ -74,10 +73,9 @@ static void rtc_uie_task(struct work_struct *work)
74 } else if (schedule_work(&rtc->uie_task) == 0) { 73 } else if (schedule_work(&rtc->uie_task) == 0) {
75 rtc->uie_task_active = 0; 74 rtc->uie_task_active = 0;
76 } 75 }
77 spin_unlock(&rtc->irq_lock); 76 spin_unlock_irq(&rtc->irq_lock);
78 if (num) 77 if (num)
79 rtc_update_irq(rtc, num, RTC_UF | RTC_IRQF); 78 rtc_update_irq(rtc, num, RTC_UF | RTC_IRQF);
80 local_irq_enable();
81} 79}
82static void rtc_uie_timer(unsigned long data) 80static void rtc_uie_timer(unsigned long data)
83{ 81{
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index fc372df6534b..8f410e59d9f5 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -499,10 +499,7 @@ static void ds1305_work(struct work_struct *work)
499 if (!test_bit(FLAG_EXITING, &ds1305->flags)) 499 if (!test_bit(FLAG_EXITING, &ds1305->flags))
500 enable_irq(spi->irq); 500 enable_irq(spi->irq);
501 501
502 /* rtc_update_irq() requires an IRQ-disabled context */
503 local_irq_disable();
504 rtc_update_irq(ds1305->rtc, 1, RTC_AF | RTC_IRQF); 502 rtc_update_irq(ds1305->rtc, 1, RTC_AF | RTC_IRQF);
505 local_irq_enable();
506} 503}
507 504
508/* 505/*
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 2c4a65302a9d..47a93c022d91 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -31,6 +31,8 @@ enum ds_type {
31 ds_1338, 31 ds_1338,
32 ds_1339, 32 ds_1339,
33 ds_1340, 33 ds_1340,
34 ds_1388,
35 ds_3231,
34 m41t00, 36 m41t00,
35 rx_8025, 37 rx_8025,
36 // rs5c372 too? different address... 38 // rs5c372 too? different address...
@@ -66,6 +68,7 @@ enum ds_type {
66#define DS1337_REG_CONTROL 0x0e 68#define DS1337_REG_CONTROL 0x0e
67# define DS1337_BIT_nEOSC 0x80 69# define DS1337_BIT_nEOSC 0x80
68# define DS1339_BIT_BBSQI 0x20 70# define DS1339_BIT_BBSQI 0x20
71# define DS3231_BIT_BBSQW 0x40 /* same as BBSQI */
69# define DS1337_BIT_RS2 0x10 72# define DS1337_BIT_RS2 0x10
70# define DS1337_BIT_RS1 0x08 73# define DS1337_BIT_RS1 0x08
71# define DS1337_BIT_INTCN 0x04 74# define DS1337_BIT_INTCN 0x04
@@ -94,6 +97,7 @@ enum ds_type {
94 97
95 98
96struct ds1307 { 99struct ds1307 {
100 u8 offset; /* register's offset */
97 u8 regs[11]; 101 u8 regs[11];
98 enum ds_type type; 102 enum ds_type type;
99 unsigned long flags; 103 unsigned long flags;
@@ -128,6 +132,9 @@ static const struct chip_desc chips[] = {
128}, 132},
129[ds_1340] = { 133[ds_1340] = {
130}, 134},
135[ds_3231] = {
136 .alarm = 1,
137},
131[m41t00] = { 138[m41t00] = {
132}, 139},
133[rx_8025] = { 140[rx_8025] = {
@@ -138,7 +145,9 @@ static const struct i2c_device_id ds1307_id[] = {
138 { "ds1337", ds_1337 }, 145 { "ds1337", ds_1337 },
139 { "ds1338", ds_1338 }, 146 { "ds1338", ds_1338 },
140 { "ds1339", ds_1339 }, 147 { "ds1339", ds_1339 },
148 { "ds1388", ds_1388 },
141 { "ds1340", ds_1340 }, 149 { "ds1340", ds_1340 },
150 { "ds3231", ds_3231 },
142 { "m41t00", m41t00 }, 151 { "m41t00", m41t00 },
143 { "rx8025", rx_8025 }, 152 { "rx8025", rx_8025 },
144 { } 153 { }
@@ -258,12 +267,7 @@ static void ds1307_work(struct work_struct *work)
258 control &= ~DS1337_BIT_A1IE; 267 control &= ~DS1337_BIT_A1IE;
259 i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL, control); 268 i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL, control);
260 269
261 /* rtc_update_irq() assumes that it is called
262 * from IRQ-disabled context.
263 */
264 local_irq_disable();
265 rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); 270 rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF);
266 local_irq_enable();
267 } 271 }
268 272
269out: 273out:
@@ -291,7 +295,7 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)
291 295
292 /* read the RTC date and time registers all at once */ 296 /* read the RTC date and time registers all at once */
293 tmp = ds1307->read_block_data(ds1307->client, 297 tmp = ds1307->read_block_data(ds1307->client,
294 DS1307_REG_SECS, 7, ds1307->regs); 298 ds1307->offset, 7, ds1307->regs);
295 if (tmp != 7) { 299 if (tmp != 7) {
296 dev_err(dev, "%s error %d\n", "read", tmp); 300 dev_err(dev, "%s error %d\n", "read", tmp);
297 return -EIO; 301 return -EIO;
@@ -353,6 +357,7 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)
353 switch (ds1307->type) { 357 switch (ds1307->type) {
354 case ds_1337: 358 case ds_1337:
355 case ds_1339: 359 case ds_1339:
360 case ds_3231:
356 buf[DS1307_REG_MONTH] |= DS1337_BIT_CENTURY; 361 buf[DS1307_REG_MONTH] |= DS1337_BIT_CENTURY;
357 break; 362 break;
358 case ds_1340: 363 case ds_1340:
@@ -367,7 +372,8 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)
367 "write", buf[0], buf[1], buf[2], buf[3], 372 "write", buf[0], buf[1], buf[2], buf[3],
368 buf[4], buf[5], buf[6]); 373 buf[4], buf[5], buf[6]);
369 374
370 result = ds1307->write_block_data(ds1307->client, 0, 7, buf); 375 result = ds1307->write_block_data(ds1307->client,
376 ds1307->offset, 7, buf);
371 if (result < 0) { 377 if (result < 0) {
372 dev_err(dev, "%s error %d\n", "write", result); 378 dev_err(dev, "%s error %d\n", "write", result);
373 return result; 379 return result;
@@ -624,6 +630,11 @@ static int __devinit ds1307_probe(struct i2c_client *client,
624 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 630 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
625 int want_irq = false; 631 int want_irq = false;
626 unsigned char *buf; 632 unsigned char *buf;
633 static const int bbsqi_bitpos[] = {
634 [ds_1337] = 0,
635 [ds_1339] = DS1339_BIT_BBSQI,
636 [ds_3231] = DS3231_BIT_BBSQW,
637 };
627 638
628 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA) 639 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)
629 && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) 640 && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK))
@@ -632,9 +643,12 @@ static int __devinit ds1307_probe(struct i2c_client *client,
632 if (!(ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL))) 643 if (!(ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL)))
633 return -ENOMEM; 644 return -ENOMEM;
634 645
635 ds1307->client = client;
636 i2c_set_clientdata(client, ds1307); 646 i2c_set_clientdata(client, ds1307);
637 ds1307->type = id->driver_data; 647
648 ds1307->client = client;
649 ds1307->type = id->driver_data;
650 ds1307->offset = 0;
651
638 buf = ds1307->regs; 652 buf = ds1307->regs;
639 if (i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) { 653 if (i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) {
640 ds1307->read_block_data = i2c_smbus_read_i2c_block_data; 654 ds1307->read_block_data = i2c_smbus_read_i2c_block_data;
@@ -647,6 +661,7 @@ static int __devinit ds1307_probe(struct i2c_client *client,
647 switch (ds1307->type) { 661 switch (ds1307->type) {
648 case ds_1337: 662 case ds_1337:
649 case ds_1339: 663 case ds_1339:
664 case ds_3231:
650 /* has IRQ? */ 665 /* has IRQ? */
651 if (ds1307->client->irq > 0 && chip->alarm) { 666 if (ds1307->client->irq > 0 && chip->alarm) {
652 INIT_WORK(&ds1307->work, ds1307_work); 667 INIT_WORK(&ds1307->work, ds1307_work);
@@ -666,12 +681,12 @@ static int __devinit ds1307_probe(struct i2c_client *client,
666 ds1307->regs[0] &= ~DS1337_BIT_nEOSC; 681 ds1307->regs[0] &= ~DS1337_BIT_nEOSC;
667 682
668 /* Using IRQ? Disable the square wave and both alarms. 683 /* Using IRQ? Disable the square wave and both alarms.
669 * For ds1339, be sure alarms can trigger when we're 684 * For some variants, be sure alarms can trigger when we're
670 * running on Vbackup (BBSQI); we assume ds1337 will 685 * running on Vbackup (BBSQI/BBSQW)
671 * ignore that bit
672 */ 686 */
673 if (want_irq) { 687 if (want_irq) {
674 ds1307->regs[0] |= DS1337_BIT_INTCN | DS1339_BIT_BBSQI; 688 ds1307->regs[0] |= DS1337_BIT_INTCN
689 | bbsqi_bitpos[ds1307->type];
675 ds1307->regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE); 690 ds1307->regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
676 } 691 }
677 692
@@ -751,6 +766,9 @@ static int __devinit ds1307_probe(struct i2c_client *client,
751 hour); 766 hour);
752 } 767 }
753 break; 768 break;
769 case ds_1388:
770 ds1307->offset = 1; /* Seconds starts at 1 */
771 break;
754 default: 772 default:
755 break; 773 break;
756 } 774 }
@@ -814,6 +832,8 @@ read_rtc:
814 case rx_8025: 832 case rx_8025:
815 case ds_1337: 833 case ds_1337:
816 case ds_1339: 834 case ds_1339:
835 case ds_1388:
836 case ds_3231:
817 break; 837 break;
818 } 838 }
819 839
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 4d32e328f6cd..32b27739ec2a 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -296,12 +296,7 @@ static void ds1374_work(struct work_struct *work)
296 control &= ~(DS1374_REG_CR_WACE | DS1374_REG_CR_AIE); 296 control &= ~(DS1374_REG_CR_WACE | DS1374_REG_CR_AIE);
297 i2c_smbus_write_byte_data(client, DS1374_REG_CR, control); 297 i2c_smbus_write_byte_data(client, DS1374_REG_CR, control);
298 298
299 /* rtc_update_irq() assumes that it is called
300 * from IRQ-disabled context.
301 */
302 local_irq_disable();
303 rtc_update_irq(ds1374->rtc, 1, RTC_AF | RTC_IRQF); 299 rtc_update_irq(ds1374->rtc, 1, RTC_AF | RTC_IRQF);
304 local_irq_enable();
305 } 300 }
306 301
307out: 302out:
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 38d472b63406..717288527c6b 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -329,8 +329,7 @@ static int __devinit ds1553_rtc_probe(struct platform_device *pdev)
329 if (pdata->irq > 0) { 329 if (pdata->irq > 0) {
330 writeb(0, ioaddr + RTC_INTERRUPTS); 330 writeb(0, ioaddr + RTC_INTERRUPTS);
331 if (request_irq(pdata->irq, ds1553_rtc_interrupt, 331 if (request_irq(pdata->irq, ds1553_rtc_interrupt,
332 IRQF_DISABLED | IRQF_SHARED, 332 IRQF_DISABLED, pdev->name, pdev) < 0) {
333 pdev->name, pdev) < 0) {
334 dev_warn(&pdev->dev, "interrupt not available.\n"); 333 dev_warn(&pdev->dev, "interrupt not available.\n");
335 pdata->irq = 0; 334 pdata->irq = 0;
336 } 335 }
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 8bc8501bffc8..09249459e9a4 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -57,6 +57,7 @@ struct rtc_plat_data {
57 size_t size; 57 size_t size;
58 resource_size_t baseaddr; 58 resource_size_t baseaddr;
59 unsigned long last_jiffies; 59 unsigned long last_jiffies;
60 struct bin_attribute nvram_attr;
60}; 61};
61 62
62static int ds1742_rtc_set_time(struct device *dev, struct rtc_time *tm) 63static int ds1742_rtc_set_time(struct device *dev, struct rtc_time *tm)
@@ -157,18 +158,6 @@ static ssize_t ds1742_nvram_write(struct kobject *kobj,
157 return count; 158 return count;
158} 159}
159 160
160static struct bin_attribute ds1742_nvram_attr = {
161 .attr = {
162 .name = "nvram",
163 .mode = S_IRUGO | S_IWUSR,
164 },
165 .read = ds1742_nvram_read,
166 .write = ds1742_nvram_write,
167 /* REVISIT: size in sysfs won't match actual size... if it's
168 * not a constant, each RTC should have its own attribute.
169 */
170};
171
172static int __devinit ds1742_rtc_probe(struct platform_device *pdev) 161static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
173{ 162{
174 struct rtc_device *rtc; 163 struct rtc_device *rtc;
@@ -199,6 +188,12 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
199 pdata->size_nvram = pdata->size - RTC_SIZE; 188 pdata->size_nvram = pdata->size - RTC_SIZE;
200 pdata->ioaddr_rtc = ioaddr + pdata->size_nvram; 189 pdata->ioaddr_rtc = ioaddr + pdata->size_nvram;
201 190
191 pdata->nvram_attr.attr.name = "nvram";
192 pdata->nvram_attr.attr.mode = S_IRUGO | S_IWUSR;
193 pdata->nvram_attr.read = ds1742_nvram_read;
194 pdata->nvram_attr.write = ds1742_nvram_write;
195 pdata->nvram_attr.size = pdata->size_nvram;
196
202 /* turn RTC on if it was not on */ 197 /* turn RTC on if it was not on */
203 ioaddr = pdata->ioaddr_rtc; 198 ioaddr = pdata->ioaddr_rtc;
204 sec = readb(ioaddr + RTC_SECONDS); 199 sec = readb(ioaddr + RTC_SECONDS);
@@ -221,11 +216,13 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
221 pdata->rtc = rtc; 216 pdata->rtc = rtc;
222 pdata->last_jiffies = jiffies; 217 pdata->last_jiffies = jiffies;
223 platform_set_drvdata(pdev, pdata); 218 platform_set_drvdata(pdev, pdata);
224 ds1742_nvram_attr.size = max(ds1742_nvram_attr.size, 219
225 pdata->size_nvram); 220 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pdata->nvram_attr);
226 ret = sysfs_create_bin_file(&pdev->dev.kobj, &ds1742_nvram_attr); 221 if (ret) {
227 if (ret) 222 dev_err(&pdev->dev, "creating nvram file in sysfs failed\n");
228 goto out; 223 goto out;
224 }
225
229 return 0; 226 return 0;
230 out: 227 out:
231 if (pdata->rtc) 228 if (pdata->rtc)
@@ -242,7 +239,7 @@ static int __devexit ds1742_rtc_remove(struct platform_device *pdev)
242{ 239{
243 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 240 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
244 241
245 sysfs_remove_bin_file(&pdev->dev.kobj, &ds1742_nvram_attr); 242 sysfs_remove_bin_file(&pdev->dev.kobj, &pdata->nvram_attr);
246 rtc_device_unregister(pdata->rtc); 243 rtc_device_unregister(pdata->rtc);
247 iounmap(pdata->ioaddr_nvram); 244 iounmap(pdata->ioaddr_nvram);
248 release_mem_region(pdata->baseaddr, pdata->size); 245 release_mem_region(pdata->baseaddr, pdata->size);
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
new file mode 100644
index 000000000000..b1a29bcfdf13
--- /dev/null
+++ b/drivers/rtc/rtc-rx8025.c
@@ -0,0 +1,688 @@
1/*
2 * Driver for Epson's RTC module RX-8025 SA/NB
3 *
4 * Copyright (C) 2009 Wolfgang Grandegger <wg@grandegger.com>
5 *
6 * Copyright (C) 2005 by Digi International Inc.
7 * All rights reserved.
8 *
9 * Modified by fengjh at rising.com.cn
10 * <http://lists.lm-sensors.org/mailman/listinfo/lm-sensors>
11 * 2006.11
12 *
13 * Code cleanup by Sergei Poselenov, <sposelenov@emcraft.com>
14 * Converted to new style by Wolfgang Grandegger <wg@grandegger.com>
15 * Alarm and periodic interrupt added by Dmitry Rakhchev <rda@emcraft.com>
16 *
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * version 2 as published by the Free Software Foundation.
20 */
21#include <linux/kernel.h>
22#include <linux/module.h>
23#include <linux/init.h>
24#include <linux/bcd.h>
25#include <linux/i2c.h>
26#include <linux/list.h>
27#include <linux/rtc.h>
28
29/* Register definitions */
30#define RX8025_REG_SEC 0x00
31#define RX8025_REG_MIN 0x01
32#define RX8025_REG_HOUR 0x02
33#define RX8025_REG_WDAY 0x03
34#define RX8025_REG_MDAY 0x04
35#define RX8025_REG_MONTH 0x05
36#define RX8025_REG_YEAR 0x06
37#define RX8025_REG_DIGOFF 0x07
38#define RX8025_REG_ALWMIN 0x08
39#define RX8025_REG_ALWHOUR 0x09
40#define RX8025_REG_ALWWDAY 0x0a
41#define RX8025_REG_ALDMIN 0x0b
42#define RX8025_REG_ALDHOUR 0x0c
43/* 0x0d is reserved */
44#define RX8025_REG_CTRL1 0x0e
45#define RX8025_REG_CTRL2 0x0f
46
47#define RX8025_BIT_CTRL1_CT (7 << 0)
48/* 1 Hz periodic level irq */
49#define RX8025_BIT_CTRL1_CT_1HZ 4
50#define RX8025_BIT_CTRL1_TEST (1 << 3)
51#define RX8025_BIT_CTRL1_1224 (1 << 5)
52#define RX8025_BIT_CTRL1_DALE (1 << 6)
53#define RX8025_BIT_CTRL1_WALE (1 << 7)
54
55#define RX8025_BIT_CTRL2_DAFG (1 << 0)
56#define RX8025_BIT_CTRL2_WAFG (1 << 1)
57#define RX8025_BIT_CTRL2_CTFG (1 << 2)
58#define RX8025_BIT_CTRL2_PON (1 << 4)
59#define RX8025_BIT_CTRL2_XST (1 << 5)
60#define RX8025_BIT_CTRL2_VDET (1 << 6)
61
62/* Clock precision adjustment */
63#define RX8025_ADJ_RESOLUTION 3050 /* in ppb */
64#define RX8025_ADJ_DATA_MAX 62
65#define RX8025_ADJ_DATA_MIN -62
66
67static const struct i2c_device_id rx8025_id[] = {
68 { "rx8025", 0 },
69 { }
70};
71MODULE_DEVICE_TABLE(i2c, rx8025_id);
72
73struct rx8025_data {
74 struct i2c_client *client;
75 struct rtc_device *rtc;
76 struct work_struct work;
77 u8 ctrl1;
78 unsigned exiting:1;
79};
80
81static int rx8025_read_reg(struct i2c_client *client, int number, u8 *value)
82{
83 int ret = i2c_smbus_read_byte_data(client, (number << 4) | 0x08);
84
85 if (ret < 0) {
86 dev_err(&client->dev, "Unable to read register #%d\n", number);
87 return ret;
88 }
89
90 *value = ret;
91 return 0;
92}
93
94static int rx8025_read_regs(struct i2c_client *client,
95 int number, u8 length, u8 *values)
96{
97 int ret = i2c_smbus_read_i2c_block_data(client, (number << 4) | 0x08,
98 length, values);
99
100 if (ret != length) {
101 dev_err(&client->dev, "Unable to read registers #%d..#%d\n",
102 number, number + length - 1);
103 return ret < 0 ? ret : -EIO;
104 }
105
106 return 0;
107}
108
109static int rx8025_write_reg(struct i2c_client *client, int number, u8 value)
110{
111 int ret = i2c_smbus_write_byte_data(client, number << 4, value);
112
113 if (ret)
114 dev_err(&client->dev, "Unable to write register #%d\n",
115 number);
116
117 return ret;
118}
119
120static int rx8025_write_regs(struct i2c_client *client,
121 int number, u8 length, u8 *values)
122{
123 int ret = i2c_smbus_write_i2c_block_data(client, (number << 4) | 0x08,
124 length, values);
125
126 if (ret)
127 dev_err(&client->dev, "Unable to write registers #%d..#%d\n",
128 number, number + length - 1);
129
130 return ret;
131}
132
133static irqreturn_t rx8025_irq(int irq, void *dev_id)
134{
135 struct i2c_client *client = dev_id;
136 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
137
138 disable_irq_nosync(irq);
139 schedule_work(&rx8025->work);
140 return IRQ_HANDLED;
141}
142
143static void rx8025_work(struct work_struct *work)
144{
145 struct rx8025_data *rx8025 = container_of(work, struct rx8025_data,
146 work);
147 struct i2c_client *client = rx8025->client;
148 struct mutex *lock = &rx8025->rtc->ops_lock;
149 u8 status;
150
151 mutex_lock(lock);
152
153 if (rx8025_read_reg(client, RX8025_REG_CTRL2, &status))
154 goto out;
155
156 if (!(status & RX8025_BIT_CTRL2_XST))
157 dev_warn(&client->dev, "Oscillation stop was detected,"
158 "you may have to readjust the clock\n");
159
160 if (status & RX8025_BIT_CTRL2_CTFG) {
161 /* periodic */
162 status &= ~RX8025_BIT_CTRL2_CTFG;
163 local_irq_disable();
164 rtc_update_irq(rx8025->rtc, 1, RTC_PF | RTC_IRQF);
165 local_irq_enable();
166 }
167
168 if (status & RX8025_BIT_CTRL2_DAFG) {
169 /* alarm */
170 status &= RX8025_BIT_CTRL2_DAFG;
171 if (rx8025_write_reg(client, RX8025_REG_CTRL1,
172 rx8025->ctrl1 & ~RX8025_BIT_CTRL1_DALE))
173 goto out;
174 local_irq_disable();
175 rtc_update_irq(rx8025->rtc, 1, RTC_AF | RTC_IRQF);
176 local_irq_enable();
177 }
178
179 /* acknowledge IRQ */
180 rx8025_write_reg(client, RX8025_REG_CTRL2,
181 status | RX8025_BIT_CTRL2_XST);
182
183out:
184 if (!rx8025->exiting)
185 enable_irq(client->irq);
186
187 mutex_unlock(lock);
188}
189
190static int rx8025_get_time(struct device *dev, struct rtc_time *dt)
191{
192 struct rx8025_data *rx8025 = dev_get_drvdata(dev);
193 u8 date[7];
194 int err;
195
196 err = rx8025_read_regs(rx8025->client, RX8025_REG_SEC, 7, date);
197 if (err)
198 return err;
199
200 dev_dbg(dev, "%s: read 0x%02x 0x%02x "
201 "0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", __func__,
202 date[0], date[1], date[2], date[3], date[4],
203 date[5], date[6]);
204
205 dt->tm_sec = bcd2bin(date[RX8025_REG_SEC] & 0x7f);
206 dt->tm_min = bcd2bin(date[RX8025_REG_MIN] & 0x7f);
207 if (rx8025->ctrl1 & RX8025_BIT_CTRL1_1224)
208 dt->tm_hour = bcd2bin(date[RX8025_REG_HOUR] & 0x3f);
209 else
210 dt->tm_hour = bcd2bin(date[RX8025_REG_HOUR] & 0x1f) % 12
211 + (date[RX8025_REG_HOUR] & 0x20 ? 12 : 0);
212
213 dt->tm_mday = bcd2bin(date[RX8025_REG_MDAY] & 0x3f);
214 dt->tm_mon = bcd2bin(date[RX8025_REG_MONTH] & 0x1f) - 1;
215 dt->tm_year = bcd2bin(date[RX8025_REG_YEAR]);
216
217 if (dt->tm_year < 70)
218 dt->tm_year += 100;
219
220 dev_dbg(dev, "%s: date %ds %dm %dh %dmd %dm %dy\n", __func__,
221 dt->tm_sec, dt->tm_min, dt->tm_hour,
222 dt->tm_mday, dt->tm_mon, dt->tm_year);
223
224 return rtc_valid_tm(dt);
225}
226
227static int rx8025_set_time(struct device *dev, struct rtc_time *dt)
228{
229 struct rx8025_data *rx8025 = dev_get_drvdata(dev);
230 u8 date[7];
231
232 /*
233 * BUG: The HW assumes every year that is a multiple of 4 to be a leap
234 * year. Next time this is wrong is 2100, which will not be a leap
235 * year.
236 */
237
238 /*
239 * Here the read-only bits are written as "0". I'm not sure if that
240 * is sound.
241 */
242 date[RX8025_REG_SEC] = bin2bcd(dt->tm_sec);
243 date[RX8025_REG_MIN] = bin2bcd(dt->tm_min);
244 if (rx8025->ctrl1 & RX8025_BIT_CTRL1_1224)
245 date[RX8025_REG_HOUR] = bin2bcd(dt->tm_hour);
246 else
247 date[RX8025_REG_HOUR] = (dt->tm_hour >= 12 ? 0x20 : 0)
248 | bin2bcd((dt->tm_hour + 11) % 12 + 1);
249
250 date[RX8025_REG_WDAY] = bin2bcd(dt->tm_wday);
251 date[RX8025_REG_MDAY] = bin2bcd(dt->tm_mday);
252 date[RX8025_REG_MONTH] = bin2bcd(dt->tm_mon + 1);
253 date[RX8025_REG_YEAR] = bin2bcd(dt->tm_year % 100);
254
255 dev_dbg(dev,
256 "%s: write 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
257 __func__,
258 date[0], date[1], date[2], date[3], date[4], date[5], date[6]);
259
260 return rx8025_write_regs(rx8025->client, RX8025_REG_SEC, 7, date);
261}
262
263static int rx8025_init_client(struct i2c_client *client, int *need_reset)
264{
265 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
266 u8 ctrl[2], ctrl2;
267 int need_clear = 0;
268 int err;
269
270 err = rx8025_read_regs(rx8025->client, RX8025_REG_CTRL1, 2, ctrl);
271 if (err)
272 goto out;
273
274 /* Keep test bit zero ! */
275 rx8025->ctrl1 = ctrl[0] & ~RX8025_BIT_CTRL1_TEST;
276
277 if (ctrl[1] & RX8025_BIT_CTRL2_PON) {
278 dev_warn(&client->dev, "power-on reset was detected, "
279 "you may have to readjust the clock\n");
280 *need_reset = 1;
281 }
282
283 if (ctrl[1] & RX8025_BIT_CTRL2_VDET) {
284 dev_warn(&client->dev, "a power voltage drop was detected, "
285 "you may have to readjust the clock\n");
286 *need_reset = 1;
287 }
288
289 if (!(ctrl[1] & RX8025_BIT_CTRL2_XST)) {
290 dev_warn(&client->dev, "Oscillation stop was detected,"
291 "you may have to readjust the clock\n");
292 *need_reset = 1;
293 }
294
295 if (ctrl[1] & (RX8025_BIT_CTRL2_DAFG | RX8025_BIT_CTRL2_WAFG)) {
296 dev_warn(&client->dev, "Alarm was detected\n");
297 need_clear = 1;
298 }
299
300 if (!(ctrl[1] & RX8025_BIT_CTRL2_CTFG))
301 need_clear = 1;
302
303 if (*need_reset || need_clear) {
304 ctrl2 = ctrl[0];
305 ctrl2 &= ~(RX8025_BIT_CTRL2_PON | RX8025_BIT_CTRL2_VDET |
306 RX8025_BIT_CTRL2_CTFG | RX8025_BIT_CTRL2_WAFG |
307 RX8025_BIT_CTRL2_DAFG);
308 ctrl2 |= RX8025_BIT_CTRL2_XST;
309
310 err = rx8025_write_reg(client, RX8025_REG_CTRL2, ctrl2);
311 }
312out:
313 return err;
314}
315
316/* Alarm support */
317static int rx8025_read_alarm(struct device *dev, struct rtc_wkalrm *t)
318{
319 struct rx8025_data *rx8025 = dev_get_drvdata(dev);
320 struct i2c_client *client = rx8025->client;
321 u8 ctrl2, ald[2];
322 int err;
323
324 if (client->irq <= 0)
325 return -EINVAL;
326
327 err = rx8025_read_regs(client, RX8025_REG_ALDMIN, 2, ald);
328 if (err)
329 return err;
330
331 err = rx8025_read_reg(client, RX8025_REG_CTRL2, &ctrl2);
332 if (err)
333 return err;
334
335 dev_dbg(dev, "%s: read alarm 0x%02x 0x%02x ctrl2 %02x\n",
336 __func__, ald[0], ald[1], ctrl2);
337
338 /* Hardware alarms precision is 1 minute! */
339 t->time.tm_sec = 0;
340 t->time.tm_min = bcd2bin(ald[0] & 0x7f);
341 if (rx8025->ctrl1 & RX8025_BIT_CTRL1_1224)
342 t->time.tm_hour = bcd2bin(ald[1] & 0x3f);
343 else
344 t->time.tm_hour = bcd2bin(ald[1] & 0x1f) % 12
345 + (ald[1] & 0x20 ? 12 : 0);
346
347 t->time.tm_wday = -1;
348 t->time.tm_mday = -1;
349 t->time.tm_mon = -1;
350 t->time.tm_year = -1;
351
352 dev_dbg(dev, "%s: date: %ds %dm %dh %dmd %dm %dy\n",
353 __func__,
354 t->time.tm_sec, t->time.tm_min, t->time.tm_hour,
355 t->time.tm_mday, t->time.tm_mon, t->time.tm_year);
356 t->enabled = !!(rx8025->ctrl1 & RX8025_BIT_CTRL1_DALE);
357 t->pending = (ctrl2 & RX8025_BIT_CTRL2_DAFG) && t->enabled;
358
359 return err;
360}
361
362static int rx8025_set_alarm(struct device *dev, struct rtc_wkalrm *t)
363{
364 struct i2c_client *client = to_i2c_client(dev);
365 struct rx8025_data *rx8025 = dev_get_drvdata(dev);
366 u8 ald[2];
367 int err;
368
369 if (client->irq <= 0)
370 return -EINVAL;
371
372 /* Hardware alarm precision is 1 minute! */
373 ald[0] = bin2bcd(t->time.tm_min);
374 if (rx8025->ctrl1 & RX8025_BIT_CTRL1_1224)
375 ald[1] = bin2bcd(t->time.tm_hour);
376 else
377 ald[1] = (t->time.tm_hour >= 12 ? 0x20 : 0)
378 | bin2bcd((t->time.tm_hour + 11) % 12 + 1);
379
380 dev_dbg(dev, "%s: write 0x%02x 0x%02x\n", __func__, ald[0], ald[1]);
381
382 if (rx8025->ctrl1 & RX8025_BIT_CTRL1_DALE) {
383 rx8025->ctrl1 &= ~RX8025_BIT_CTRL1_DALE;
384 err = rx8025_write_reg(rx8025->client, RX8025_REG_CTRL1,
385 rx8025->ctrl1);
386 if (err)
387 return err;
388 }
389 err = rx8025_write_regs(rx8025->client, RX8025_REG_ALDMIN, 2, ald);
390 if (err)
391 return err;
392
393 if (t->enabled) {
394 rx8025->ctrl1 |= RX8025_BIT_CTRL1_DALE;
395 err = rx8025_write_reg(rx8025->client, RX8025_REG_CTRL1,
396 rx8025->ctrl1);
397 if (err)
398 return err;
399 }
400
401 return 0;
402}
403
404static int rx8025_alarm_irq_enable(struct device *dev, unsigned int enabled)
405{
406 struct rx8025_data *rx8025 = dev_get_drvdata(dev);
407 u8 ctrl1;
408 int err;
409
410 ctrl1 = rx8025->ctrl1;
411 if (enabled)
412 ctrl1 |= RX8025_BIT_CTRL1_DALE;
413 else
414 ctrl1 &= ~RX8025_BIT_CTRL1_DALE;
415
416 if (ctrl1 != rx8025->ctrl1) {
417 rx8025->ctrl1 = ctrl1;
418 err = rx8025_write_reg(rx8025->client, RX8025_REG_CTRL1,
419 rx8025->ctrl1);
420 if (err)
421 return err;
422 }
423 return 0;
424}
425
426static int rx8025_irq_set_state(struct device *dev, int enabled)
427{
428 struct i2c_client *client = to_i2c_client(dev);
429 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
430 int ctrl1;
431 int err;
432
433 if (client->irq <= 0)
434 return -ENXIO;
435
436 ctrl1 = rx8025->ctrl1 & ~RX8025_BIT_CTRL1_CT;
437 if (enabled)
438 ctrl1 |= RX8025_BIT_CTRL1_CT_1HZ;
439 if (ctrl1 != rx8025->ctrl1) {
440 rx8025->ctrl1 = ctrl1;
441 err = rx8025_write_reg(rx8025->client, RX8025_REG_CTRL1,
442 rx8025->ctrl1);
443 if (err)
444 return err;
445 }
446
447 return 0;
448}
449
450static struct rtc_class_ops rx8025_rtc_ops = {
451 .read_time = rx8025_get_time,
452 .set_time = rx8025_set_time,
453 .read_alarm = rx8025_read_alarm,
454 .set_alarm = rx8025_set_alarm,
455 .alarm_irq_enable = rx8025_alarm_irq_enable,
456 .irq_set_state = rx8025_irq_set_state,
457};
458
459/*
460 * Clock precision adjustment support
461 *
462 * According to the RX8025 SA/NB application manual the frequency and
463 * temperature charateristics can be approximated using the following
464 * equation:
465 *
466 * df = a * (ut - t)**2
467 *
468 * df: Frequency deviation in any temperature
469 * a : Coefficient = (-35 +-5) * 10**-9
470 * ut: Ultimate temperature in degree = +25 +-5 degree
471 * t : Any temperature in degree
472 *
473 * Note that the clock adjustment in ppb must be entered (which is
474 * the negative value of the deviation).
475 */
476static int rx8025_get_clock_adjust(struct device *dev, int *adj)
477{
478 struct i2c_client *client = to_i2c_client(dev);
479 u8 digoff;
480 int err;
481
482 err = rx8025_read_reg(client, RX8025_REG_DIGOFF, &digoff);
483 if (err)
484 return err;
485
486 *adj = digoff >= 64 ? digoff - 128 : digoff;
487 if (*adj > 0)
488 (*adj)--;
489 *adj *= -RX8025_ADJ_RESOLUTION;
490
491 return 0;
492}
493
494static int rx8025_set_clock_adjust(struct device *dev, int adj)
495{
496 struct i2c_client *client = to_i2c_client(dev);
497 u8 digoff;
498 int err;
499
500 adj /= -RX8025_ADJ_RESOLUTION;
501 if (adj > RX8025_ADJ_DATA_MAX)
502 adj = RX8025_ADJ_DATA_MAX;
503 else if (adj < RX8025_ADJ_DATA_MIN)
504 adj = RX8025_ADJ_DATA_MIN;
505 else if (adj > 0)
506 adj++;
507 else if (adj < 0)
508 adj += 128;
509 digoff = adj;
510
511 err = rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
512 if (err)
513 return err;
514
515 dev_dbg(dev, "%s: write 0x%02x\n", __func__, digoff);
516
517 return 0;
518}
519
520static ssize_t rx8025_sysfs_show_clock_adjust(struct device *dev,
521 struct device_attribute *attr,
522 char *buf)
523{
524 int err, adj;
525
526 err = rx8025_get_clock_adjust(dev, &adj);
527 if (err)
528 return err;
529
530 return sprintf(buf, "%d\n", adj);
531}
532
533static ssize_t rx8025_sysfs_store_clock_adjust(struct device *dev,
534 struct device_attribute *attr,
535 const char *buf, size_t count)
536{
537 int adj, err;
538
539 if (sscanf(buf, "%i", &adj) != 1)
540 return -EINVAL;
541
542 err = rx8025_set_clock_adjust(dev, adj);
543
544 return err ? err : count;
545}
546
547static DEVICE_ATTR(clock_adjust_ppb, S_IRUGO | S_IWUSR,
548 rx8025_sysfs_show_clock_adjust,
549 rx8025_sysfs_store_clock_adjust);
550
551static int rx8025_sysfs_register(struct device *dev)
552{
553 return device_create_file(dev, &dev_attr_clock_adjust_ppb);
554}
555
556static void rx8025_sysfs_unregister(struct device *dev)
557{
558 device_remove_file(dev, &dev_attr_clock_adjust_ppb);
559}
560
561static int __devinit rx8025_probe(struct i2c_client *client,
562 const struct i2c_device_id *id)
563{
564 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
565 struct rx8025_data *rx8025;
566 int err, need_reset = 0;
567
568 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA
569 | I2C_FUNC_SMBUS_I2C_BLOCK)) {
570 dev_err(&adapter->dev,
571 "doesn't support required functionality\n");
572 err = -EIO;
573 goto errout;
574 }
575
576 rx8025 = kzalloc(sizeof(*rx8025), GFP_KERNEL);
577 if (!rx8025) {
578 dev_err(&adapter->dev, "failed to alloc memory\n");
579 err = -ENOMEM;
580 goto errout;
581 }
582
583 rx8025->client = client;
584 i2c_set_clientdata(client, rx8025);
585 INIT_WORK(&rx8025->work, rx8025_work);
586
587 err = rx8025_init_client(client, &need_reset);
588 if (err)
589 goto errout_free;
590
591 if (need_reset) {
592 struct rtc_time tm;
593 dev_info(&client->dev,
594 "bad conditions detected, resetting date\n");
595 rtc_time_to_tm(0, &tm); /* 1970/1/1 */
596 rx8025_set_time(&client->dev, &tm);
597 }
598
599 rx8025->rtc = rtc_device_register(client->name, &client->dev,
600 &rx8025_rtc_ops, THIS_MODULE);
601 if (IS_ERR(rx8025->rtc)) {
602 err = PTR_ERR(rx8025->rtc);
603 dev_err(&client->dev, "unable to register the class device\n");
604 goto errout_free;
605 }
606
607 if (client->irq > 0) {
608 dev_info(&client->dev, "IRQ %d supplied\n", client->irq);
609 err = request_irq(client->irq, rx8025_irq,
610 0, "rx8025", client);
611 if (err) {
612 dev_err(&client->dev, "unable to request IRQ\n");
613 goto errout_reg;
614 }
615 }
616
617 rx8025->rtc->irq_freq = 1;
618 rx8025->rtc->max_user_freq = 1;
619
620 err = rx8025_sysfs_register(&client->dev);
621 if (err)
622 goto errout_irq;
623
624 return 0;
625
626errout_irq:
627 if (client->irq > 0)
628 free_irq(client->irq, client);
629
630errout_reg:
631 rtc_device_unregister(rx8025->rtc);
632
633errout_free:
634 i2c_set_clientdata(client, NULL);
635 kfree(rx8025);
636
637errout:
638 dev_err(&adapter->dev, "probing for rx8025 failed\n");
639 return err;
640}
641
642static int __devexit rx8025_remove(struct i2c_client *client)
643{
644 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
645 struct mutex *lock = &rx8025->rtc->ops_lock;
646
647 if (client->irq > 0) {
648 mutex_lock(lock);
649 rx8025->exiting = 1;
650 mutex_unlock(lock);
651
652 free_irq(client->irq, client);
653 flush_scheduled_work();
654 }
655
656 rx8025_sysfs_unregister(&client->dev);
657 rtc_device_unregister(rx8025->rtc);
658 i2c_set_clientdata(client, NULL);
659 kfree(rx8025);
660 return 0;
661}
662
663static struct i2c_driver rx8025_driver = {
664 .driver = {
665 .name = "rtc-rx8025",
666 .owner = THIS_MODULE,
667 },
668 .probe = rx8025_probe,
669 .remove = __devexit_p(rx8025_remove),
670 .id_table = rx8025_id,
671};
672
673static int __init rx8025_init(void)
674{
675 return i2c_add_driver(&rx8025_driver);
676}
677
678static void __exit rx8025_exit(void)
679{
680 i2c_del_driver(&rx8025_driver);
681}
682
683MODULE_AUTHOR("Wolfgang Grandegger <wg@grandegger.com>");
684MODULE_DESCRIPTION("RX-8025 SA/NB RTC driver");
685MODULE_LICENSE("GPL");
686
687module_init(rx8025_init);
688module_exit(rx8025_exit);
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index e478280ff628..51725f7755b0 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -93,7 +93,6 @@ static ssize_t test_irq_store(struct device *dev,
93 struct rtc_device *rtc = platform_get_drvdata(plat_dev); 93 struct rtc_device *rtc = platform_get_drvdata(plat_dev);
94 94
95 retval = count; 95 retval = count;
96 local_irq_disable();
97 if (strncmp(buf, "tick", 4) == 0) 96 if (strncmp(buf, "tick", 4) == 0)
98 rtc_update_irq(rtc, 1, RTC_PF | RTC_IRQF); 97 rtc_update_irq(rtc, 1, RTC_PF | RTC_IRQF);
99 else if (strncmp(buf, "alarm", 5) == 0) 98 else if (strncmp(buf, "alarm", 5) == 0)
@@ -102,7 +101,6 @@ static ssize_t test_irq_store(struct device *dev,
102 rtc_update_irq(rtc, 1, RTC_UF | RTC_IRQF); 101 rtc_update_irq(rtc, 1, RTC_UF | RTC_IRQF);
103 else 102 else
104 retval = -EINVAL; 103 retval = -EINVAL;
105 local_irq_enable();
106 104
107 return retval; 105 return retval;
108} 106}
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c
index 4ee4857ff207..4a6ed1104fbb 100644
--- a/drivers/rtc/rtc-tx4939.c
+++ b/drivers/rtc/rtc-tx4939.c
@@ -261,10 +261,8 @@ static int __init tx4939_rtc_probe(struct platform_device *pdev)
261 261
262 tx4939_rtc_cmd(pdata->rtcreg, TX4939_RTCCTL_COMMAND_NOP); 262 tx4939_rtc_cmd(pdata->rtcreg, TX4939_RTCCTL_COMMAND_NOP);
263 if (devm_request_irq(&pdev->dev, irq, tx4939_rtc_interrupt, 263 if (devm_request_irq(&pdev->dev, irq, tx4939_rtc_interrupt,
264 IRQF_DISABLED | IRQF_SHARED, 264 IRQF_DISABLED, pdev->name, &pdev->dev) < 0)
265 pdev->name, &pdev->dev) < 0) {
266 return -EBUSY; 265 return -EBUSY;
267 }
268 rtc = rtc_device_register(pdev->name, &pdev->dev, 266 rtc = rtc_device_register(pdev->name, &pdev->dev,
269 &tx4939_rtc_ops, THIS_MODULE); 267 &tx4939_rtc_ops, THIS_MODULE);
270 if (IS_ERR(rtc)) 268 if (IS_ERR(rtc))
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 81d7f268418a..691cecd03b83 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -655,7 +655,7 @@ static void qeth_l2_set_multicast_list(struct net_device *dev)
655 for (dm = dev->mc_list; dm; dm = dm->next) 655 for (dm = dev->mc_list; dm; dm = dm->next)
656 qeth_l2_add_mc(card, dm->da_addr, 0); 656 qeth_l2_add_mc(card, dm->da_addr, 0);
657 657
658 list_for_each_entry(ha, &dev->uc_list, list) 658 list_for_each_entry(ha, &dev->uc.list, list)
659 qeth_l2_add_mc(card, ha->addr, 1); 659 qeth_l2_add_mc(card, ha->addr, 1);
660 660
661 spin_unlock_bh(&card->mclock); 661 spin_unlock_bh(&card->mclock);
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c
index ca0dd33497ec..db90caf43f42 100644
--- a/drivers/scsi/ps3rom.c
+++ b/drivers/scsi/ps3rom.c
@@ -299,7 +299,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data)
299 return IRQ_HANDLED; 299 return IRQ_HANDLED;
300 } 300 }
301 301
302 host = dev->sbd.core.driver_data; 302 host = ps3_system_bus_get_drvdata(&dev->sbd);
303 priv = shost_priv(host); 303 priv = shost_priv(host);
304 cmd = priv->curr_cmd; 304 cmd = priv->curr_cmd;
305 305
@@ -387,7 +387,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev)
387 } 387 }
388 388
389 priv = shost_priv(host); 389 priv = shost_priv(host);
390 dev->sbd.core.driver_data = host; 390 ps3_system_bus_set_drvdata(&dev->sbd, host);
391 priv->dev = dev; 391 priv->dev = dev;
392 392
393 /* One device/LUN per SCSI bus */ 393 /* One device/LUN per SCSI bus */
@@ -407,7 +407,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev)
407 407
408fail_host_put: 408fail_host_put:
409 scsi_host_put(host); 409 scsi_host_put(host);
410 dev->sbd.core.driver_data = NULL; 410 ps3_system_bus_set_drvdata(&dev->sbd, NULL);
411fail_teardown: 411fail_teardown:
412 ps3stor_teardown(dev); 412 ps3stor_teardown(dev);
413fail_free_bounce: 413fail_free_bounce:
@@ -418,12 +418,12 @@ fail_free_bounce:
418static int ps3rom_remove(struct ps3_system_bus_device *_dev) 418static int ps3rom_remove(struct ps3_system_bus_device *_dev)
419{ 419{
420 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); 420 struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
421 struct Scsi_Host *host = dev->sbd.core.driver_data; 421 struct Scsi_Host *host = ps3_system_bus_get_drvdata(&dev->sbd);
422 422
423 scsi_remove_host(host); 423 scsi_remove_host(host);
424 ps3stor_teardown(dev); 424 ps3stor_teardown(dev);
425 scsi_host_put(host); 425 scsi_host_put(host);
426 dev->sbd.core.driver_data = NULL; 426 ps3_system_bus_set_drvdata(&dev->sbd, NULL);
427 kfree(dev->bounce_buf); 427 kfree(dev->bounce_buf);
428 return 0; 428 return 0;
429} 429}
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index b3feb6198d57..abbd146c50d9 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -76,7 +76,6 @@
76#include <linux/of_platform.h> 76#include <linux/of_platform.h>
77 77
78#include <asm/mpc52xx.h> 78#include <asm/mpc52xx.h>
79#include <asm/mpc512x.h>
80#include <asm/mpc52xx_psc.h> 79#include <asm/mpc52xx_psc.h>
81 80
82#if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 81#if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
@@ -254,7 +253,7 @@ static unsigned long mpc52xx_getuartclk(void *p)
254 * but the generic serial code assumes 16 253 * but the generic serial code assumes 16
255 * so return ipb freq / 2 254 * so return ipb freq / 2
256 */ 255 */
257 return mpc52xx_find_ipb_freq(p) / 2; 256 return mpc5xxx_get_bus_frequency(p) / 2;
258} 257}
259 258
260static struct psc_ops mpc52xx_psc_ops = { 259static struct psc_ops mpc52xx_psc_ops = {
@@ -391,7 +390,7 @@ static void mpc512x_psc_cw_restore_ints(struct uart_port *port)
391 390
392static unsigned long mpc512x_getuartclk(void *p) 391static unsigned long mpc512x_getuartclk(void *p)
393{ 392{
394 return mpc512x_find_ips_freq(p); 393 return mpc5xxx_get_bus_frequency(p);
395} 394}
396 395
397static struct psc_ops mpc512x_psc_ops = { 396static struct psc_ops mpc512x_psc_ops = {
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 54483cd3529e..02406ba6da1c 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -67,7 +67,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
67 port->type = type; 67 port->type = type;
68 port->uartclk = *clk; 68 port->uartclk = *clk;
69 port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP 69 port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
70 | UPF_FIXED_PORT; 70 | UPF_FIXED_PORT | UPF_FIXED_TYPE;
71 port->dev = &ofdev->dev; 71 port->dev = &ofdev->dev;
72 /* If current-speed was set, then try not to change it. */ 72 /* If current-speed was set, then try not to change it. */
73 if (spd) 73 if (spd)
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index a4cf1079b312..66f52674ca0c 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1332,44 +1332,46 @@ err_unreg:
1332 return ret; 1332 return ret;
1333} 1333}
1334 1334
1335static int sci_suspend(struct platform_device *dev, pm_message_t state) 1335static int sci_suspend(struct device *dev)
1336{ 1336{
1337 struct sh_sci_priv *priv = platform_get_drvdata(dev); 1337 struct sh_sci_priv *priv = dev_get_drvdata(dev);
1338 struct sci_port *p; 1338 struct sci_port *p;
1339 unsigned long flags; 1339 unsigned long flags;
1340 1340
1341 spin_lock_irqsave(&priv->lock, flags); 1341 spin_lock_irqsave(&priv->lock, flags);
1342 list_for_each_entry(p, &priv->ports, node) 1342 list_for_each_entry(p, &priv->ports, node)
1343 uart_suspend_port(&sci_uart_driver, &p->port); 1343 uart_suspend_port(&sci_uart_driver, &p->port);
1344
1345 spin_unlock_irqrestore(&priv->lock, flags); 1344 spin_unlock_irqrestore(&priv->lock, flags);
1346 1345
1347 return 0; 1346 return 0;
1348} 1347}
1349 1348
1350static int sci_resume(struct platform_device *dev) 1349static int sci_resume(struct device *dev)
1351{ 1350{
1352 struct sh_sci_priv *priv = platform_get_drvdata(dev); 1351 struct sh_sci_priv *priv = dev_get_drvdata(dev);
1353 struct sci_port *p; 1352 struct sci_port *p;
1354 unsigned long flags; 1353 unsigned long flags;
1355 1354
1356 spin_lock_irqsave(&priv->lock, flags); 1355 spin_lock_irqsave(&priv->lock, flags);
1357 list_for_each_entry(p, &priv->ports, node) 1356 list_for_each_entry(p, &priv->ports, node)
1358 uart_resume_port(&sci_uart_driver, &p->port); 1357 uart_resume_port(&sci_uart_driver, &p->port);
1359
1360 spin_unlock_irqrestore(&priv->lock, flags); 1358 spin_unlock_irqrestore(&priv->lock, flags);
1361 1359
1362 return 0; 1360 return 0;
1363} 1361}
1364 1362
1363static struct dev_pm_ops sci_dev_pm_ops = {
1364 .suspend = sci_suspend,
1365 .resume = sci_resume,
1366};
1367
1365static struct platform_driver sci_driver = { 1368static struct platform_driver sci_driver = {
1366 .probe = sci_probe, 1369 .probe = sci_probe,
1367 .remove = __devexit_p(sci_remove), 1370 .remove = __devexit_p(sci_remove),
1368 .suspend = sci_suspend,
1369 .resume = sci_resume,
1370 .driver = { 1371 .driver = {
1371 .name = "sh-sci", 1372 .name = "sh-sci",
1372 .owner = THIS_MODULE, 1373 .owner = THIS_MODULE,
1374 .pm = &sci_dev_pm_ops,
1373 }, 1375 },
1374}; 1376};
1375 1377
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index 7de66c06b05d..e945e780b5c9 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -681,22 +681,27 @@ static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
681 out_be16(&uccup->rccm, 0xc0ff); 681 out_be16(&uccup->rccm, 0xc0ff);
682 682
683 /* Configure the GUMR registers for UART */ 683 /* Configure the GUMR registers for UART */
684 if (soft_uart) 684 if (soft_uart) {
685 /* Soft-UART requires a 1X multiplier for TX */ 685 /* Soft-UART requires a 1X multiplier for TX */
686 clrsetbits_be32(&uccp->gumr_l, 686 clrsetbits_be32(&uccp->gumr_l,
687 UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | 687 UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
688 UCC_SLOW_GUMR_L_RDCR_MASK, 688 UCC_SLOW_GUMR_L_RDCR_MASK,
689 UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 | 689 UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 |
690 UCC_SLOW_GUMR_L_RDCR_16); 690 UCC_SLOW_GUMR_L_RDCR_16);
691 else 691
692 clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW,
693 UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX);
694 } else {
692 clrsetbits_be32(&uccp->gumr_l, 695 clrsetbits_be32(&uccp->gumr_l,
693 UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | 696 UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK |
694 UCC_SLOW_GUMR_L_RDCR_MASK, 697 UCC_SLOW_GUMR_L_RDCR_MASK,
695 UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 | 698 UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 |
696 UCC_SLOW_GUMR_L_RDCR_16); 699 UCC_SLOW_GUMR_L_RDCR_16);
697 700
698 clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW, 701 clrsetbits_be32(&uccp->gumr_h,
699 UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX); 702 UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX,
703 UCC_SLOW_GUMR_H_RFW);
704 }
700 705
701#ifdef LOOPBACK 706#ifdef LOOPBACK
702 clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK, 707 clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK,
@@ -706,7 +711,7 @@ static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
706 UCC_SLOW_GUMR_H_CDS); 711 UCC_SLOW_GUMR_H_CDS);
707#endif 712#endif
708 713
709 /* Enable rx interrupts and clear all pending events. */ 714 /* Disable rx interrupts and clear all pending events. */
710 out_be16(&uccp->uccm, 0); 715 out_be16(&uccp->uccm, 0);
711 out_be16(&uccp->ucce, 0xffff); 716 out_be16(&uccp->ucce, 0xffff);
712 out_be16(&uccp->udsr, 0x7e7e); 717 out_be16(&uccp->udsr, 0x7e7e);
@@ -765,6 +770,10 @@ static void qe_uart_init_ucc(struct uart_qe_port *qe_port)
765 cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num); 770 cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num);
766 qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock, 771 qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock,
767 QE_CR_PROTOCOL_UNSPECIFIED, 0); 772 QE_CR_PROTOCOL_UNSPECIFIED, 0);
773 } else {
774 cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num);
775 qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock,
776 QE_CR_PROTOCOL_UART, 0);
768 } 777 }
769} 778}
770 779
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c
index d687a9b93d03..3dd231a643b5 100644
--- a/drivers/sh/intc.c
+++ b/drivers/sh/intc.c
@@ -20,7 +20,6 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/bootmem.h>
24#include <linux/sh_intc.h> 23#include <linux/sh_intc.h>
25#include <linux/sysdev.h> 24#include <linux/sysdev.h>
26#include <linux/list.h> 25#include <linux/list.h>
@@ -675,7 +674,7 @@ void __init register_intc_controller(struct intc_desc *desc)
675 unsigned int i, k, smp; 674 unsigned int i, k, smp;
676 struct intc_desc_int *d; 675 struct intc_desc_int *d;
677 676
678 d = alloc_bootmem(sizeof(*d)); 677 d = kzalloc(sizeof(*d), GFP_NOWAIT);
679 678
680 INIT_LIST_HEAD(&d->list); 679 INIT_LIST_HEAD(&d->list);
681 list_add(&d->list, &intc_list); 680 list_add(&d->list, &intc_list);
@@ -687,9 +686,9 @@ void __init register_intc_controller(struct intc_desc *desc)
687#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) 686#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
688 d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0; 687 d->nr_reg += desc->ack_regs ? desc->nr_ack_regs : 0;
689#endif 688#endif
690 d->reg = alloc_bootmem(d->nr_reg * sizeof(*d->reg)); 689 d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT);
691#ifdef CONFIG_SMP 690#ifdef CONFIG_SMP
692 d->smp = alloc_bootmem(d->nr_reg * sizeof(*d->smp)); 691 d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT);
693#endif 692#endif
694 k = 0; 693 k = 0;
695 694
@@ -702,7 +701,7 @@ void __init register_intc_controller(struct intc_desc *desc)
702 } 701 }
703 702
704 if (desc->prio_regs) { 703 if (desc->prio_regs) {
705 d->prio = alloc_bootmem(desc->nr_vectors * sizeof(*d->prio)); 704 d->prio = kzalloc(desc->nr_vectors * sizeof(*d->prio), GFP_NOWAIT);
706 705
707 for (i = 0; i < desc->nr_prio_regs; i++) { 706 for (i = 0; i < desc->nr_prio_regs; i++) {
708 smp = IS_SMP(desc->prio_regs[i]); 707 smp = IS_SMP(desc->prio_regs[i]);
@@ -712,7 +711,7 @@ void __init register_intc_controller(struct intc_desc *desc)
712 } 711 }
713 712
714 if (desc->sense_regs) { 713 if (desc->sense_regs) {
715 d->sense = alloc_bootmem(desc->nr_vectors * sizeof(*d->sense)); 714 d->sense = kzalloc(desc->nr_vectors * sizeof(*d->sense), GFP_NOWAIT);
716 715
717 for (i = 0; i < desc->nr_sense_regs; i++) { 716 for (i = 0; i < desc->nr_sense_regs; i++) {
718 k += save_reg(d, k, desc->sense_regs[i].reg, 0); 717 k += save_reg(d, k, desc->sense_regs[i].reg, 0);
@@ -757,7 +756,7 @@ void __init register_intc_controller(struct intc_desc *desc)
757 vect2->enum_id = 0; 756 vect2->enum_id = 0;
758 757
759 if (!intc_evt2irq_table) 758 if (!intc_evt2irq_table)
760 intc_evt2irq_table = alloc_bootmem(NR_IRQS); 759 intc_evt2irq_table = kzalloc(NR_IRQS, GFP_NOWAIT);
761 760
762 if (!intc_evt2irq_table) { 761 if (!intc_evt2irq_table) {
763 pr_warning("intc: cannot allocate evt2irq!\n"); 762 pr_warning("intc: cannot allocate evt2irq!\n");
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index e8aae227b5e0..2c733c27db2f 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -139,17 +139,15 @@ config SPI_MPC52xx_PSC
139 This enables using the Freescale MPC52xx Programmable Serial 139 This enables using the Freescale MPC52xx Programmable Serial
140 Controller in master SPI mode. 140 Controller in master SPI mode.
141 141
142config SPI_MPC83xx 142config SPI_MPC8xxx
143 tristate "Freescale MPC83xx/QUICC Engine SPI controller" 143 tristate "Freescale MPC8xxx SPI controller"
144 depends on (PPC_83xx || QUICC_ENGINE) && EXPERIMENTAL 144 depends on FSL_SOC
145 help 145 help
146 This enables using the Freescale MPC83xx and QUICC Engine SPI 146 This enables using the Freescale MPC8xxx SPI controllers in master
147 controllers in master mode. 147 mode.
148 148
149 Note, this driver uniquely supports the SPI controller on the MPC83xx 149 This driver uses a simple set of shift registers for data (opposed
150 family of PowerPC processors, plus processors with QUICC Engine 150 to the CPM based descriptor model).
151 technology. This driver uses a simple set of shift registers for data
152 (opposed to the CPM based descriptor model).
153 151
154config SPI_OMAP_UWIRE 152config SPI_OMAP_UWIRE
155 tristate "OMAP1 MicroWire" 153 tristate "OMAP1 MicroWire"
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index ecfadb180482..3de408d294ba 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_SPI_OMAP24XX) += omap2_mcspi.o
25obj-$(CONFIG_SPI_ORION) += orion_spi.o 25obj-$(CONFIG_SPI_ORION) += orion_spi.o
26obj-$(CONFIG_SPI_PL022) += amba-pl022.o 26obj-$(CONFIG_SPI_PL022) += amba-pl022.o
27obj-$(CONFIG_SPI_MPC52xx_PSC) += mpc52xx_psc_spi.o 27obj-$(CONFIG_SPI_MPC52xx_PSC) += mpc52xx_psc_spi.o
28obj-$(CONFIG_SPI_MPC83xx) += spi_mpc83xx.o 28obj-$(CONFIG_SPI_MPC8xxx) += spi_mpc8xxx.o
29obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o 29obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o
30obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o 30obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
31obj-$(CONFIG_SPI_TXX9) += spi_txx9.o 31obj-$(CONFIG_SPI_TXX9) += spi_txx9.o
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 12e443cc4ac9..f5b3fdbb1e27 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -530,9 +530,6 @@ atmel_spi_interrupt(int irq, void *dev_id)
530 return ret; 530 return ret;
531} 531}
532 532
533/* the spi->mode bits understood by this driver: */
534#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
535
536static int atmel_spi_setup(struct spi_device *spi) 533static int atmel_spi_setup(struct spi_device *spi)
537{ 534{
538 struct atmel_spi *as; 535 struct atmel_spi *as;
@@ -555,8 +552,6 @@ static int atmel_spi_setup(struct spi_device *spi)
555 return -EINVAL; 552 return -EINVAL;
556 } 553 }
557 554
558 if (bits == 0)
559 bits = 8;
560 if (bits < 8 || bits > 16) { 555 if (bits < 8 || bits > 16) {
561 dev_dbg(&spi->dev, 556 dev_dbg(&spi->dev,
562 "setup: invalid bits_per_word %u (8 to 16)\n", 557 "setup: invalid bits_per_word %u (8 to 16)\n",
@@ -564,12 +559,6 @@ static int atmel_spi_setup(struct spi_device *spi)
564 return -EINVAL; 559 return -EINVAL;
565 } 560 }
566 561
567 if (spi->mode & ~MODEBITS) {
568 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
569 spi->mode & ~MODEBITS);
570 return -EINVAL;
571 }
572
573 /* see notes above re chipselect */ 562 /* see notes above re chipselect */
574 if (!atmel_spi_is_v2() 563 if (!atmel_spi_is_v2()
575 && spi->chip_select == 0 564 && spi->chip_select == 0
@@ -775,6 +764,9 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
775 if (!master) 764 if (!master)
776 goto out_free; 765 goto out_free;
777 766
767 /* the spi->mode bits understood by this driver: */
768 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
769
778 master->bus_num = pdev->id; 770 master->bus_num = pdev->id;
779 master->num_chipselect = 4; 771 master->num_chipselect = 4;
780 master->setup = atmel_spi_setup; 772 master->setup = atmel_spi_setup;
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c
index b02f25c702fd..76cbc1a66598 100644
--- a/drivers/spi/au1550_spi.c
+++ b/drivers/spi/au1550_spi.c
@@ -284,27 +284,16 @@ static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t)
284 return 0; 284 return 0;
285} 285}
286 286
287/* the spi->mode bits understood by this driver: */
288#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST)
289
290static int au1550_spi_setup(struct spi_device *spi) 287static int au1550_spi_setup(struct spi_device *spi)
291{ 288{
292 struct au1550_spi *hw = spi_master_get_devdata(spi->master); 289 struct au1550_spi *hw = spi_master_get_devdata(spi->master);
293 290
294 if (spi->bits_per_word == 0)
295 spi->bits_per_word = 8;
296 if (spi->bits_per_word < 4 || spi->bits_per_word > 24) { 291 if (spi->bits_per_word < 4 || spi->bits_per_word > 24) {
297 dev_err(&spi->dev, "setup: invalid bits_per_word=%d\n", 292 dev_err(&spi->dev, "setup: invalid bits_per_word=%d\n",
298 spi->bits_per_word); 293 spi->bits_per_word);
299 return -EINVAL; 294 return -EINVAL;
300 } 295 }
301 296
302 if (spi->mode & ~MODEBITS) {
303 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
304 spi->mode & ~MODEBITS);
305 return -EINVAL;
306 }
307
308 if (spi->max_speed_hz == 0) 297 if (spi->max_speed_hz == 0)
309 spi->max_speed_hz = hw->freq_max; 298 spi->max_speed_hz = hw->freq_max;
310 if (spi->max_speed_hz > hw->freq_max 299 if (spi->max_speed_hz > hw->freq_max
@@ -781,6 +770,9 @@ static int __init au1550_spi_probe(struct platform_device *pdev)
781 goto err_nomem; 770 goto err_nomem;
782 } 771 }
783 772
773 /* the spi->mode bits understood by this driver: */
774 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
775
784 hw = spi_master_get_devdata(master); 776 hw = spi_master_get_devdata(master);
785 777
786 hw->master = spi_master_get(master); 778 hw->master = spi_master_get(master);
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index 68c77a911595..1b74d5ca03f3 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/types.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/of_platform.h> 19#include <linux/of_platform.h>
@@ -30,8 +31,7 @@
30 31
31struct mpc52xx_psc_spi { 32struct mpc52xx_psc_spi {
32 /* fsl_spi_platform data */ 33 /* fsl_spi_platform data */
33 void (*activate_cs)(u8, u8); 34 void (*cs_control)(struct spi_device *spi, bool on);
34 void (*deactivate_cs)(u8, u8);
35 u32 sysclk; 35 u32 sysclk;
36 36
37 /* driver internal data */ 37 /* driver internal data */
@@ -111,18 +111,16 @@ static void mpc52xx_psc_spi_activate_cs(struct spi_device *spi)
111 out_be16((u16 __iomem *)&psc->ccr, ccr); 111 out_be16((u16 __iomem *)&psc->ccr, ccr);
112 mps->bits_per_word = cs->bits_per_word; 112 mps->bits_per_word = cs->bits_per_word;
113 113
114 if (mps->activate_cs) 114 if (mps->cs_control)
115 mps->activate_cs(spi->chip_select, 115 mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 1 : 0);
116 (spi->mode & SPI_CS_HIGH) ? 1 : 0);
117} 116}
118 117
119static void mpc52xx_psc_spi_deactivate_cs(struct spi_device *spi) 118static void mpc52xx_psc_spi_deactivate_cs(struct spi_device *spi)
120{ 119{
121 struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master); 120 struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
122 121
123 if (mps->deactivate_cs) 122 if (mps->cs_control)
124 mps->deactivate_cs(spi->chip_select, 123 mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 0 : 1);
125 (spi->mode & SPI_CS_HIGH) ? 1 : 0);
126} 124}
127 125
128#define MPC52xx_PSC_BUFSIZE (MPC52xx_PSC_RFNUM_MASK + 1) 126#define MPC52xx_PSC_BUFSIZE (MPC52xx_PSC_RFNUM_MASK + 1)
@@ -261,9 +259,6 @@ static void mpc52xx_psc_spi_work(struct work_struct *work)
261 spin_unlock_irq(&mps->lock); 259 spin_unlock_irq(&mps->lock);
262} 260}
263 261
264/* the spi->mode bits understood by this driver: */
265#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST)
266
267static int mpc52xx_psc_spi_setup(struct spi_device *spi) 262static int mpc52xx_psc_spi_setup(struct spi_device *spi)
268{ 263{
269 struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master); 264 struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
@@ -273,12 +268,6 @@ static int mpc52xx_psc_spi_setup(struct spi_device *spi)
273 if (spi->bits_per_word%8) 268 if (spi->bits_per_word%8)
274 return -EINVAL; 269 return -EINVAL;
275 270
276 if (spi->mode & ~MODEBITS) {
277 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
278 spi->mode & ~MODEBITS);
279 return -EINVAL;
280 }
281
282 if (!cs) { 271 if (!cs) {
283 cs = kzalloc(sizeof *cs, GFP_KERNEL); 272 cs = kzalloc(sizeof *cs, GFP_KERNEL);
284 if (!cs) 273 if (!cs)
@@ -385,18 +374,19 @@ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
385 dev_set_drvdata(dev, master); 374 dev_set_drvdata(dev, master);
386 mps = spi_master_get_devdata(master); 375 mps = spi_master_get_devdata(master);
387 376
377 /* the spi->mode bits understood by this driver: */
378 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
379
388 mps->irq = irq; 380 mps->irq = irq;
389 if (pdata == NULL) { 381 if (pdata == NULL) {
390 dev_warn(dev, "probe called without platform data, no " 382 dev_warn(dev, "probe called without platform data, no "
391 "(de)activate_cs function will be called\n"); 383 "cs_control function will be called\n");
392 mps->activate_cs = NULL; 384 mps->cs_control = NULL;
393 mps->deactivate_cs = NULL;
394 mps->sysclk = 0; 385 mps->sysclk = 0;
395 master->bus_num = bus_num; 386 master->bus_num = bus_num;
396 master->num_chipselect = 255; 387 master->num_chipselect = 255;
397 } else { 388 } else {
398 mps->activate_cs = pdata->activate_cs; 389 mps->cs_control = pdata->cs_control;
399 mps->deactivate_cs = pdata->deactivate_cs;
400 mps->sysclk = pdata->sysclk; 390 mps->sysclk = pdata->sysclk;
401 master->bus_num = pdata->bus_num; 391 master->bus_num = pdata->bus_num;
402 master->num_chipselect = pdata->max_chipselect; 392 master->num_chipselect = pdata->max_chipselect;
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index d6d0c5d241ce..eee4b6e0af2c 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -603,9 +603,6 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
603 return 0; 603 return 0;
604} 604}
605 605
606/* the spi->mode bits understood by this driver: */
607#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
608
609static int omap2_mcspi_setup(struct spi_device *spi) 606static int omap2_mcspi_setup(struct spi_device *spi)
610{ 607{
611 int ret; 608 int ret;
@@ -613,15 +610,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
613 struct omap2_mcspi_dma *mcspi_dma; 610 struct omap2_mcspi_dma *mcspi_dma;
614 struct omap2_mcspi_cs *cs = spi->controller_state; 611 struct omap2_mcspi_cs *cs = spi->controller_state;
615 612
616 if (spi->mode & ~MODEBITS) { 613 if (spi->bits_per_word < 4 || spi->bits_per_word > 32) {
617 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
618 spi->mode & ~MODEBITS);
619 return -EINVAL;
620 }
621
622 if (spi->bits_per_word == 0)
623 spi->bits_per_word = 8;
624 else if (spi->bits_per_word < 4 || spi->bits_per_word > 32) {
625 dev_dbg(&spi->dev, "setup: unsupported %d bit words\n", 614 dev_dbg(&spi->dev, "setup: unsupported %d bit words\n",
626 spi->bits_per_word); 615 spi->bits_per_word);
627 return -EINVAL; 616 return -EINVAL;
@@ -984,6 +973,9 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
984 return -ENOMEM; 973 return -ENOMEM;
985 } 974 }
986 975
976 /* the spi->mode bits understood by this driver: */
977 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
978
987 if (pdev->id != -1) 979 if (pdev->id != -1)
988 master->bus_num = pdev->id; 980 master->bus_num = pdev->id;
989 981
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c
index fe8b9ac0ccef..aa90ddb37066 100644
--- a/drivers/spi/omap_uwire.c
+++ b/drivers/spi/omap_uwire.c
@@ -339,8 +339,6 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
339 bits = spi->bits_per_word; 339 bits = spi->bits_per_word;
340 if (t != NULL && t->bits_per_word) 340 if (t != NULL && t->bits_per_word)
341 bits = t->bits_per_word; 341 bits = t->bits_per_word;
342 if (!bits)
343 bits = 8;
344 342
345 if (bits > 16) { 343 if (bits > 16) {
346 pr_debug("%s: wordsize %d?\n", dev_name(&spi->dev), bits); 344 pr_debug("%s: wordsize %d?\n", dev_name(&spi->dev), bits);
@@ -449,19 +447,10 @@ done:
449 return status; 447 return status;
450} 448}
451 449
452/* the spi->mode bits understood by this driver: */
453#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
454
455static int uwire_setup(struct spi_device *spi) 450static int uwire_setup(struct spi_device *spi)
456{ 451{
457 struct uwire_state *ust = spi->controller_state; 452 struct uwire_state *ust = spi->controller_state;
458 453
459 if (spi->mode & ~MODEBITS) {
460 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
461 spi->mode & ~MODEBITS);
462 return -EINVAL;
463 }
464
465 if (ust == NULL) { 454 if (ust == NULL) {
466 ust = kzalloc(sizeof(*ust), GFP_KERNEL); 455 ust = kzalloc(sizeof(*ust), GFP_KERNEL);
467 if (ust == NULL) 456 if (ust == NULL)
@@ -522,6 +511,9 @@ static int __init uwire_probe(struct platform_device *pdev)
522 511
523 uwire_write_reg(UWIRE_SR3, 1); 512 uwire_write_reg(UWIRE_SR3, 1);
524 513
514 /* the spi->mode bits understood by this driver: */
515 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
516
525 master->bus_num = 2; /* "official" */ 517 master->bus_num = 2; /* "official" */
526 master->num_chipselect = 4; 518 master->num_chipselect = 4;
527 master->setup = uwire_setup; 519 master->setup = uwire_setup;
diff --git a/drivers/spi/orion_spi.c b/drivers/spi/orion_spi.c
index c8b0babdc2a6..3aea50da7b29 100644
--- a/drivers/spi/orion_spi.c
+++ b/drivers/spi/orion_spi.c
@@ -358,20 +358,11 @@ static int orion_spi_setup(struct spi_device *spi)
358 358
359 orion_spi = spi_master_get_devdata(spi->master); 359 orion_spi = spi_master_get_devdata(spi->master);
360 360
361 if (spi->mode) {
362 dev_err(&spi->dev, "setup: unsupported mode bits %x\n",
363 spi->mode);
364 return -EINVAL;
365 }
366
367 /* Fix ac timing if required. */ 361 /* Fix ac timing if required. */
368 if (orion_spi->spi_info->enable_clock_fix) 362 if (orion_spi->spi_info->enable_clock_fix)
369 orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG, 363 orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG,
370 (1 << 14)); 364 (1 << 14));
371 365
372 if (spi->bits_per_word == 0)
373 spi->bits_per_word = 8;
374
375 if ((spi->max_speed_hz == 0) 366 if ((spi->max_speed_hz == 0)
376 || (spi->max_speed_hz > orion_spi->max_speed)) 367 || (spi->max_speed_hz > orion_spi->max_speed))
377 spi->max_speed_hz = orion_spi->max_speed; 368 spi->max_speed_hz = orion_spi->max_speed;
@@ -476,6 +467,9 @@ static int __init orion_spi_probe(struct platform_device *pdev)
476 if (pdev->id != -1) 467 if (pdev->id != -1)
477 master->bus_num = pdev->id; 468 master->bus_num = pdev->id;
478 469
470 /* we support only mode 0, and no options */
471 master->mode_bits = 0;
472
479 master->setup = orion_spi_setup; 473 master->setup = orion_spi_setup;
480 master->transfer = orion_spi_transfer; 474 master->transfer = orion_spi_transfer;
481 master->num_chipselect = ORION_NUM_CHIPSELECTS; 475 master->num_chipselect = ORION_NUM_CHIPSELECTS;
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index 3f3c08c6ba4e..d949dbf1141f 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1185,9 +1185,6 @@ static int transfer(struct spi_device *spi, struct spi_message *msg)
1185 return 0; 1185 return 0;
1186} 1186}
1187 1187
1188/* the spi->mode bits understood by this driver: */
1189#define MODEBITS (SPI_CPOL | SPI_CPHA)
1190
1191static int setup_cs(struct spi_device *spi, struct chip_data *chip, 1188static int setup_cs(struct spi_device *spi, struct chip_data *chip,
1192 struct pxa2xx_spi_chip *chip_info) 1189 struct pxa2xx_spi_chip *chip_info)
1193{ 1190{
@@ -1236,9 +1233,6 @@ static int setup(struct spi_device *spi)
1236 uint tx_thres = TX_THRESH_DFLT; 1233 uint tx_thres = TX_THRESH_DFLT;
1237 uint rx_thres = RX_THRESH_DFLT; 1234 uint rx_thres = RX_THRESH_DFLT;
1238 1235
1239 if (!spi->bits_per_word)
1240 spi->bits_per_word = 8;
1241
1242 if (drv_data->ssp_type != PXA25x_SSP 1236 if (drv_data->ssp_type != PXA25x_SSP
1243 && (spi->bits_per_word < 4 || spi->bits_per_word > 32)) { 1237 && (spi->bits_per_word < 4 || spi->bits_per_word > 32)) {
1244 dev_err(&spi->dev, "failed setup: ssp_type=%d, bits/wrd=%d " 1238 dev_err(&spi->dev, "failed setup: ssp_type=%d, bits/wrd=%d "
@@ -1255,12 +1249,6 @@ static int setup(struct spi_device *spi)
1255 return -EINVAL; 1249 return -EINVAL;
1256 } 1250 }
1257 1251
1258 if (spi->mode & ~MODEBITS) {
1259 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
1260 spi->mode & ~MODEBITS);
1261 return -EINVAL;
1262 }
1263
1264 /* Only alloc on first setup */ 1252 /* Only alloc on first setup */
1265 chip = spi_get_ctldata(spi); 1253 chip = spi_get_ctldata(spi);
1266 if (!chip) { 1254 if (!chip) {
@@ -1328,18 +1316,14 @@ static int setup(struct spi_device *spi)
1328 1316
1329 /* NOTE: PXA25x_SSP _could_ use external clocking ... */ 1317 /* NOTE: PXA25x_SSP _could_ use external clocking ... */
1330 if (drv_data->ssp_type != PXA25x_SSP) 1318 if (drv_data->ssp_type != PXA25x_SSP)
1331 dev_dbg(&spi->dev, "%d bits/word, %ld Hz, mode %d, %s\n", 1319 dev_dbg(&spi->dev, "%ld Hz actual, %s\n",
1332 spi->bits_per_word,
1333 clk_get_rate(ssp->clk) 1320 clk_get_rate(ssp->clk)
1334 / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)), 1321 / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)),
1335 spi->mode & 0x3,
1336 chip->enable_dma ? "DMA" : "PIO"); 1322 chip->enable_dma ? "DMA" : "PIO");
1337 else 1323 else
1338 dev_dbg(&spi->dev, "%d bits/word, %ld Hz, mode %d, %s\n", 1324 dev_dbg(&spi->dev, "%ld Hz actual, %s\n",
1339 spi->bits_per_word,
1340 clk_get_rate(ssp->clk) / 2 1325 clk_get_rate(ssp->clk) / 2
1341 / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)), 1326 / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)),
1342 spi->mode & 0x3,
1343 chip->enable_dma ? "DMA" : "PIO"); 1327 chip->enable_dma ? "DMA" : "PIO");
1344 1328
1345 if (spi->bits_per_word <= 8) { 1329 if (spi->bits_per_word <= 8) {
@@ -1500,6 +1484,9 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
1500 drv_data->pdev = pdev; 1484 drv_data->pdev = pdev;
1501 drv_data->ssp = ssp; 1485 drv_data->ssp = ssp;
1502 1486
1487 /* the spi->mode bits understood by this driver: */
1488 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
1489
1503 master->bus_num = pdev->id; 1490 master->bus_num = pdev->id;
1504 master->num_chipselect = platform_info->num_chipselect; 1491 master->num_chipselect = platform_info->num_chipselect;
1505 master->dma_alignment = DMA_ALIGNMENT; 1492 master->dma_alignment = DMA_ALIGNMENT;
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 8eba98c8ed1e..70845ccd85c3 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -265,7 +265,7 @@ int spi_add_device(struct spi_device *spi)
265 * normally rely on the device being setup. Devices 265 * normally rely on the device being setup. Devices
266 * using SPI_CS_HIGH can't coexist well otherwise... 266 * using SPI_CS_HIGH can't coexist well otherwise...
267 */ 267 */
268 status = spi->master->setup(spi); 268 status = spi_setup(spi);
269 if (status < 0) { 269 if (status < 0) {
270 dev_err(dev, "can't %s %s, status %d\n", 270 dev_err(dev, "can't %s %s, status %d\n",
271 "setup", dev_name(&spi->dev), status); 271 "setup", dev_name(&spi->dev), status);
@@ -583,6 +583,70 @@ EXPORT_SYMBOL_GPL(spi_busnum_to_master);
583 583
584/*-------------------------------------------------------------------------*/ 584/*-------------------------------------------------------------------------*/
585 585
586/* Core methods for SPI master protocol drivers. Some of the
587 * other core methods are currently defined as inline functions.
588 */
589
590/**
591 * spi_setup - setup SPI mode and clock rate
592 * @spi: the device whose settings are being modified
593 * Context: can sleep, and no requests are queued to the device
594 *
595 * SPI protocol drivers may need to update the transfer mode if the
596 * device doesn't work with its default. They may likewise need
597 * to update clock rates or word sizes from initial values. This function
598 * changes those settings, and must be called from a context that can sleep.
599 * Except for SPI_CS_HIGH, which takes effect immediately, the changes take
600 * effect the next time the device is selected and data is transferred to
601 * or from it. When this function returns, the spi device is deselected.
602 *
603 * Note that this call will fail if the protocol driver specifies an option
604 * that the underlying controller or its driver does not support. For
605 * example, not all hardware supports wire transfers using nine bit words,
606 * LSB-first wire encoding, or active-high chipselects.
607 */
608int spi_setup(struct spi_device *spi)
609{
610 unsigned bad_bits;
611 int status;
612
613 /* help drivers fail *cleanly* when they need options
614 * that aren't supported with their current master
615 */
616 bad_bits = spi->mode & ~spi->master->mode_bits;
617 if (bad_bits) {
618 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
619 bad_bits);
620 return -EINVAL;
621 }
622
623 if (!spi->bits_per_word)
624 spi->bits_per_word = 8;
625
626 status = spi->master->setup(spi);
627
628 dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s"
629 "%u bits/w, %u Hz max --> %d\n",
630 (int) (spi->mode & (SPI_CPOL | SPI_CPHA)),
631 (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "",
632 (spi->mode & SPI_LSB_FIRST) ? "lsb, " : "",
633 (spi->mode & SPI_3WIRE) ? "3wire, " : "",
634 (spi->mode & SPI_LOOP) ? "loopback, " : "",
635 spi->bits_per_word, spi->max_speed_hz,
636 status);
637
638 return status;
639}
640EXPORT_SYMBOL_GPL(spi_setup);
641
642
643/*-------------------------------------------------------------------------*/
644
645/* Utility methods for SPI master protocol drivers, layered on
646 * top of the core. Some other utility methods are defined as
647 * inline functions.
648 */
649
586static void spi_complete(void *arg) 650static void spi_complete(void *arg)
587{ 651{
588 complete(arg); 652 complete(arg);
@@ -636,8 +700,8 @@ static u8 *buf;
636 * @spi: device with which data will be exchanged 700 * @spi: device with which data will be exchanged
637 * @txbuf: data to be written (need not be dma-safe) 701 * @txbuf: data to be written (need not be dma-safe)
638 * @n_tx: size of txbuf, in bytes 702 * @n_tx: size of txbuf, in bytes
639 * @rxbuf: buffer into which data will be read 703 * @rxbuf: buffer into which data will be read (need not be dma-safe)
640 * @n_rx: size of rxbuf, in bytes (need not be dma-safe) 704 * @n_rx: size of rxbuf, in bytes
641 * Context: can sleep 705 * Context: can sleep
642 * 706 *
643 * This performs a half duplex MicroWire style transaction with the 707 * This performs a half duplex MicroWire style transaction with the
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 011c5bddba6a..73e24ef5a2f9 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -169,7 +169,7 @@ static int bfin_spi_flush(struct driver_data *drv_data)
169 unsigned long limit = loops_per_jiffy << 1; 169 unsigned long limit = loops_per_jiffy << 1;
170 170
171 /* wait for stop and clear stat */ 171 /* wait for stop and clear stat */
172 while (!(read_STAT(drv_data) & BIT_STAT_SPIF) && limit--) 172 while (!(read_STAT(drv_data) & BIT_STAT_SPIF) && --limit)
173 cpu_relax(); 173 cpu_relax();
174 174
175 write_STAT(drv_data, BIT_STAT_CLR); 175 write_STAT(drv_data, BIT_STAT_CLR);
@@ -1010,16 +1010,6 @@ static int bfin_spi_setup(struct spi_device *spi)
1010 struct driver_data *drv_data = spi_master_get_devdata(spi->master); 1010 struct driver_data *drv_data = spi_master_get_devdata(spi->master);
1011 int ret; 1011 int ret;
1012 1012
1013 /* Abort device setup if requested features are not supported */
1014 if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) {
1015 dev_err(&spi->dev, "requested mode not fully supported\n");
1016 return -EINVAL;
1017 }
1018
1019 /* Zero (the default) here means 8 bits */
1020 if (!spi->bits_per_word)
1021 spi->bits_per_word = 8;
1022
1023 if (spi->bits_per_word != 8 && spi->bits_per_word != 16) 1013 if (spi->bits_per_word != 8 && spi->bits_per_word != 16)
1024 return -EINVAL; 1014 return -EINVAL;
1025 1015
@@ -1287,6 +1277,9 @@ static int __init bfin_spi_probe(struct platform_device *pdev)
1287 drv_data->pdev = pdev; 1277 drv_data->pdev = pdev;
1288 drv_data->pin_req = platform_info->pin_req; 1278 drv_data->pin_req = platform_info->pin_req;
1289 1279
1280 /* the spi->mode bits supported by this driver: */
1281 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
1282
1290 master->bus_num = pdev->id; 1283 master->bus_num = pdev->id;
1291 master->num_chipselect = platform_info->num_chipselect; 1284 master->num_chipselect = platform_info->num_chipselect;
1292 master->cleanup = bfin_spi_cleanup; 1285 master->cleanup = bfin_spi_cleanup;
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 85e61f451218..2a5abc08e857 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -188,12 +188,6 @@ int spi_bitbang_setup(struct spi_device *spi)
188 188
189 bitbang = spi_master_get_devdata(spi->master); 189 bitbang = spi_master_get_devdata(spi->master);
190 190
191 /* Bitbangers can support SPI_CS_HIGH, SPI_3WIRE, and so on;
192 * add those to master->flags, and provide the other support.
193 */
194 if ((spi->mode & ~(SPI_CPOL|SPI_CPHA|bitbang->flags)) != 0)
195 return -EINVAL;
196
197 if (!cs) { 191 if (!cs) {
198 cs = kzalloc(sizeof *cs, GFP_KERNEL); 192 cs = kzalloc(sizeof *cs, GFP_KERNEL);
199 if (!cs) 193 if (!cs)
@@ -201,9 +195,6 @@ int spi_bitbang_setup(struct spi_device *spi)
201 spi->controller_state = cs; 195 spi->controller_state = cs;
202 } 196 }
203 197
204 if (!spi->bits_per_word)
205 spi->bits_per_word = 8;
206
207 /* per-word shift register access, in hardware or bitbanging */ 198 /* per-word shift register access, in hardware or bitbanging */
208 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)]; 199 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)];
209 if (!cs->txrx_word) 200 if (!cs->txrx_word)
@@ -213,9 +204,7 @@ int spi_bitbang_setup(struct spi_device *spi)
213 if (retval < 0) 204 if (retval < 0)
214 return retval; 205 return retval;
215 206
216 dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n", 207 dev_dbg(&spi->dev, "%s, %u nsec/bit\n", __func__, 2 * cs->nsecs);
217 __func__, spi->mode & (SPI_CPOL | SPI_CPHA),
218 spi->bits_per_word, 2 * cs->nsecs);
219 208
220 /* NOTE we _need_ to call chipselect() early, ideally with adapter 209 /* NOTE we _need_ to call chipselect() early, ideally with adapter
221 * setup, unless the hardware defaults cooperate to avoid confusion 210 * setup, unless the hardware defaults cooperate to avoid confusion
@@ -457,6 +446,9 @@ int spi_bitbang_start(struct spi_bitbang *bitbang)
457 spin_lock_init(&bitbang->lock); 446 spin_lock_init(&bitbang->lock);
458 INIT_LIST_HEAD(&bitbang->queue); 447 INIT_LIST_HEAD(&bitbang->queue);
459 448
449 if (!bitbang->master->mode_bits)
450 bitbang->master->mode_bits = SPI_CPOL | SPI_CPHA | bitbang->flags;
451
460 if (!bitbang->master->transfer) 452 if (!bitbang->master->transfer)
461 bitbang->master->transfer = spi_bitbang_transfer; 453 bitbang->master->transfer = spi_bitbang_transfer;
462 if (!bitbang->txrx_bufs) { 454 if (!bitbang->txrx_bufs) {
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 0671aeef5792..c195e45f7f35 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -1171,9 +1171,6 @@ msg_rejected:
1171 return -EINVAL; 1171 return -EINVAL;
1172} 1172}
1173 1173
1174/* the spi->mode bits understood by this driver: */
1175#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
1176
1177/* On first setup bad values must free chip_data memory since will cause 1174/* On first setup bad values must free chip_data memory since will cause
1178 spi_new_device to fail. Bad value setup from protocol driver are simply not 1175 spi_new_device to fail. Bad value setup from protocol driver are simply not
1179 applied and notified to the calling driver. */ 1176 applied and notified to the calling driver. */
@@ -1186,12 +1183,6 @@ static int setup(struct spi_device *spi)
1186 u32 tmp; 1183 u32 tmp;
1187 int status = 0; 1184 int status = 0;
1188 1185
1189 if (spi->mode & ~MODEBITS) {
1190 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
1191 spi->mode & ~MODEBITS);
1192 return -EINVAL;
1193 }
1194
1195 /* Get controller data */ 1186 /* Get controller data */
1196 chip_info = spi->controller_data; 1187 chip_info = spi->controller_data;
1197 1188
@@ -1286,10 +1277,7 @@ static int setup(struct spi_device *spi)
1286 1277
1287 /* SPI word width */ 1278 /* SPI word width */
1288 tmp = spi->bits_per_word; 1279 tmp = spi->bits_per_word;
1289 if (tmp == 0) { 1280 if (tmp > 16) {
1290 tmp = 8;
1291 spi->bits_per_word = 8;
1292 } else if (tmp > 16) {
1293 status = -EINVAL; 1281 status = -EINVAL;
1294 dev_err(&spi->dev, 1282 dev_err(&spi->dev,
1295 "setup - " 1283 "setup - "
@@ -1481,6 +1469,9 @@ static int __init spi_imx_probe(struct platform_device *pdev)
1481 drv_data->master_info = platform_info; 1469 drv_data->master_info = platform_info;
1482 drv_data->pdev = pdev; 1470 drv_data->pdev = pdev;
1483 1471
1472 /* the spi->mode bits understood by this driver: */
1473 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
1474
1484 master->bus_num = pdev->id; 1475 master->bus_num = pdev->id;
1485 master->num_chipselect = platform_info->num_chipselect; 1476 master->num_chipselect = platform_info->num_chipselect;
1486 master->dma_alignment = DMA_ALIGNMENT; 1477 master->dma_alignment = DMA_ALIGNMENT;
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc8xxx.c
index a32ccb44065e..0fd0ec4d3a7d 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * MPC83xx SPI controller driver. 2 * MPC8xxx SPI controller driver.
3 * 3 *
4 * Maintainer: Kumar Gala 4 * Maintainer: Kumar Gala
5 * 5 *
@@ -14,8 +14,10 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/bug.h>
17#include <linux/errno.h> 18#include <linux/errno.h>
18#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/io.h>
19#include <linux/completion.h> 21#include <linux/completion.h>
20#include <linux/interrupt.h> 22#include <linux/interrupt.h>
21#include <linux/delay.h> 23#include <linux/delay.h>
@@ -33,10 +35,9 @@
33 35
34#include <sysdev/fsl_soc.h> 36#include <sysdev/fsl_soc.h>
35#include <asm/irq.h> 37#include <asm/irq.h>
36#include <asm/io.h>
37 38
38/* SPI Controller registers */ 39/* SPI Controller registers */
39struct mpc83xx_spi_reg { 40struct mpc8xxx_spi_reg {
40 u8 res1[0x20]; 41 u8 res1[0x20];
41 __be32 mode; 42 __be32 mode;
42 __be32 event; 43 __be32 event;
@@ -75,16 +76,16 @@ struct mpc83xx_spi_reg {
75#define SPIM_NF 0x00000100 /* Not full */ 76#define SPIM_NF 0x00000100 /* Not full */
76 77
77/* SPI Controller driver's private data. */ 78/* SPI Controller driver's private data. */
78struct mpc83xx_spi { 79struct mpc8xxx_spi {
79 struct mpc83xx_spi_reg __iomem *base; 80 struct mpc8xxx_spi_reg __iomem *base;
80 81
81 /* rx & tx bufs from the spi_transfer */ 82 /* rx & tx bufs from the spi_transfer */
82 const void *tx; 83 const void *tx;
83 void *rx; 84 void *rx;
84 85
85 /* functions to deal with different sized buffers */ 86 /* functions to deal with different sized buffers */
86 void (*get_rx) (u32 rx_data, struct mpc83xx_spi *); 87 void (*get_rx) (u32 rx_data, struct mpc8xxx_spi *);
87 u32(*get_tx) (struct mpc83xx_spi *); 88 u32(*get_tx) (struct mpc8xxx_spi *);
88 89
89 unsigned int count; 90 unsigned int count;
90 unsigned int irq; 91 unsigned int irq;
@@ -97,8 +98,6 @@ struct mpc83xx_spi {
97 98
98 bool qe_mode; 99 bool qe_mode;
99 100
100 u8 busy;
101
102 struct workqueue_struct *workqueue; 101 struct workqueue_struct *workqueue;
103 struct work_struct work; 102 struct work_struct work;
104 103
@@ -108,44 +107,44 @@ struct mpc83xx_spi {
108 struct completion done; 107 struct completion done;
109}; 108};
110 109
111struct spi_mpc83xx_cs { 110struct spi_mpc8xxx_cs {
112 /* functions to deal with different sized buffers */ 111 /* functions to deal with different sized buffers */
113 void (*get_rx) (u32 rx_data, struct mpc83xx_spi *); 112 void (*get_rx) (u32 rx_data, struct mpc8xxx_spi *);
114 u32 (*get_tx) (struct mpc83xx_spi *); 113 u32 (*get_tx) (struct mpc8xxx_spi *);
115 u32 rx_shift; /* RX data reg shift when in qe mode */ 114 u32 rx_shift; /* RX data reg shift when in qe mode */
116 u32 tx_shift; /* TX data reg shift when in qe mode */ 115 u32 tx_shift; /* TX data reg shift when in qe mode */
117 u32 hw_mode; /* Holds HW mode register settings */ 116 u32 hw_mode; /* Holds HW mode register settings */
118}; 117};
119 118
120static inline void mpc83xx_spi_write_reg(__be32 __iomem * reg, u32 val) 119static inline void mpc8xxx_spi_write_reg(__be32 __iomem *reg, u32 val)
121{ 120{
122 out_be32(reg, val); 121 out_be32(reg, val);
123} 122}
124 123
125static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg) 124static inline u32 mpc8xxx_spi_read_reg(__be32 __iomem *reg)
126{ 125{
127 return in_be32(reg); 126 return in_be32(reg);
128} 127}
129 128
130#define MPC83XX_SPI_RX_BUF(type) \ 129#define MPC83XX_SPI_RX_BUF(type) \
131static \ 130static \
132void mpc83xx_spi_rx_buf_##type(u32 data, struct mpc83xx_spi *mpc83xx_spi) \ 131void mpc8xxx_spi_rx_buf_##type(u32 data, struct mpc8xxx_spi *mpc8xxx_spi) \
133{ \ 132{ \
134 type * rx = mpc83xx_spi->rx; \ 133 type *rx = mpc8xxx_spi->rx; \
135 *rx++ = (type)(data >> mpc83xx_spi->rx_shift); \ 134 *rx++ = (type)(data >> mpc8xxx_spi->rx_shift); \
136 mpc83xx_spi->rx = rx; \ 135 mpc8xxx_spi->rx = rx; \
137} 136}
138 137
139#define MPC83XX_SPI_TX_BUF(type) \ 138#define MPC83XX_SPI_TX_BUF(type) \
140static \ 139static \
141u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \ 140u32 mpc8xxx_spi_tx_buf_##type(struct mpc8xxx_spi *mpc8xxx_spi) \
142{ \ 141{ \
143 u32 data; \ 142 u32 data; \
144 const type * tx = mpc83xx_spi->tx; \ 143 const type *tx = mpc8xxx_spi->tx; \
145 if (!tx) \ 144 if (!tx) \
146 return 0; \ 145 return 0; \
147 data = *tx++ << mpc83xx_spi->tx_shift; \ 146 data = *tx++ << mpc8xxx_spi->tx_shift; \
148 mpc83xx_spi->tx = tx; \ 147 mpc8xxx_spi->tx = tx; \
149 return data; \ 148 return data; \
150} 149}
151 150
@@ -156,12 +155,12 @@ MPC83XX_SPI_TX_BUF(u8)
156MPC83XX_SPI_TX_BUF(u16) 155MPC83XX_SPI_TX_BUF(u16)
157MPC83XX_SPI_TX_BUF(u32) 156MPC83XX_SPI_TX_BUF(u32)
158 157
159static void mpc83xx_spi_chipselect(struct spi_device *spi, int value) 158static void mpc8xxx_spi_chipselect(struct spi_device *spi, int value)
160{ 159{
161 struct mpc83xx_spi *mpc83xx_spi = spi_master_get_devdata(spi->master); 160 struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
162 struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data; 161 struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data;
163 bool pol = spi->mode & SPI_CS_HIGH; 162 bool pol = spi->mode & SPI_CS_HIGH;
164 struct spi_mpc83xx_cs *cs = spi->controller_state; 163 struct spi_mpc8xxx_cs *cs = spi->controller_state;
165 164
166 if (value == BITBANG_CS_INACTIVE) { 165 if (value == BITBANG_CS_INACTIVE) {
167 if (pdata->cs_control) 166 if (pdata->cs_control)
@@ -169,16 +168,16 @@ static void mpc83xx_spi_chipselect(struct spi_device *spi, int value)
169 } 168 }
170 169
171 if (value == BITBANG_CS_ACTIVE) { 170 if (value == BITBANG_CS_ACTIVE) {
172 u32 regval = mpc83xx_spi_read_reg(&mpc83xx_spi->base->mode); 171 u32 regval = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->mode);
173 172
174 mpc83xx_spi->rx_shift = cs->rx_shift; 173 mpc8xxx_spi->rx_shift = cs->rx_shift;
175 mpc83xx_spi->tx_shift = cs->tx_shift; 174 mpc8xxx_spi->tx_shift = cs->tx_shift;
176 mpc83xx_spi->get_rx = cs->get_rx; 175 mpc8xxx_spi->get_rx = cs->get_rx;
177 mpc83xx_spi->get_tx = cs->get_tx; 176 mpc8xxx_spi->get_tx = cs->get_tx;
178 177
179 if (cs->hw_mode != regval) { 178 if (cs->hw_mode != regval) {
180 unsigned long flags; 179 unsigned long flags;
181 __be32 __iomem *mode = &mpc83xx_spi->base->mode; 180 __be32 __iomem *mode = &mpc8xxx_spi->base->mode;
182 181
183 regval = cs->hw_mode; 182 regval = cs->hw_mode;
184 /* Turn off IRQs locally to minimize time that 183 /* Turn off IRQs locally to minimize time that
@@ -186,8 +185,8 @@ static void mpc83xx_spi_chipselect(struct spi_device *spi, int value)
186 */ 185 */
187 local_irq_save(flags); 186 local_irq_save(flags);
188 /* Turn off SPI unit prior changing mode */ 187 /* Turn off SPI unit prior changing mode */
189 mpc83xx_spi_write_reg(mode, regval & ~SPMODE_ENABLE); 188 mpc8xxx_spi_write_reg(mode, regval & ~SPMODE_ENABLE);
190 mpc83xx_spi_write_reg(mode, regval); 189 mpc8xxx_spi_write_reg(mode, regval);
191 local_irq_restore(flags); 190 local_irq_restore(flags);
192 } 191 }
193 if (pdata->cs_control) 192 if (pdata->cs_control)
@@ -196,15 +195,15 @@ static void mpc83xx_spi_chipselect(struct spi_device *spi, int value)
196} 195}
197 196
198static 197static
199int mpc83xx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t) 198int mpc8xxx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
200{ 199{
201 struct mpc83xx_spi *mpc83xx_spi; 200 struct mpc8xxx_spi *mpc8xxx_spi;
202 u32 regval; 201 u32 regval;
203 u8 bits_per_word, pm; 202 u8 bits_per_word, pm;
204 u32 hz; 203 u32 hz;
205 struct spi_mpc83xx_cs *cs = spi->controller_state; 204 struct spi_mpc8xxx_cs *cs = spi->controller_state;
206 205
207 mpc83xx_spi = spi_master_get_devdata(spi->master); 206 mpc8xxx_spi = spi_master_get_devdata(spi->master);
208 207
209 if (t) { 208 if (t) {
210 bits_per_word = t->bits_per_word; 209 bits_per_word = t->bits_per_word;
@@ -229,26 +228,26 @@ int mpc83xx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
229 cs->rx_shift = 0; 228 cs->rx_shift = 0;
230 cs->tx_shift = 0; 229 cs->tx_shift = 0;
231 if (bits_per_word <= 8) { 230 if (bits_per_word <= 8) {
232 cs->get_rx = mpc83xx_spi_rx_buf_u8; 231 cs->get_rx = mpc8xxx_spi_rx_buf_u8;
233 cs->get_tx = mpc83xx_spi_tx_buf_u8; 232 cs->get_tx = mpc8xxx_spi_tx_buf_u8;
234 if (mpc83xx_spi->qe_mode) { 233 if (mpc8xxx_spi->qe_mode) {
235 cs->rx_shift = 16; 234 cs->rx_shift = 16;
236 cs->tx_shift = 24; 235 cs->tx_shift = 24;
237 } 236 }
238 } else if (bits_per_word <= 16) { 237 } else if (bits_per_word <= 16) {
239 cs->get_rx = mpc83xx_spi_rx_buf_u16; 238 cs->get_rx = mpc8xxx_spi_rx_buf_u16;
240 cs->get_tx = mpc83xx_spi_tx_buf_u16; 239 cs->get_tx = mpc8xxx_spi_tx_buf_u16;
241 if (mpc83xx_spi->qe_mode) { 240 if (mpc8xxx_spi->qe_mode) {
242 cs->rx_shift = 16; 241 cs->rx_shift = 16;
243 cs->tx_shift = 16; 242 cs->tx_shift = 16;
244 } 243 }
245 } else if (bits_per_word <= 32) { 244 } else if (bits_per_word <= 32) {
246 cs->get_rx = mpc83xx_spi_rx_buf_u32; 245 cs->get_rx = mpc8xxx_spi_rx_buf_u32;
247 cs->get_tx = mpc83xx_spi_tx_buf_u32; 246 cs->get_tx = mpc8xxx_spi_tx_buf_u32;
248 } else 247 } else
249 return -EINVAL; 248 return -EINVAL;
250 249
251 if (mpc83xx_spi->qe_mode && spi->mode & SPI_LSB_FIRST) { 250 if (mpc8xxx_spi->qe_mode && spi->mode & SPI_LSB_FIRST) {
252 cs->tx_shift = 0; 251 cs->tx_shift = 0;
253 if (bits_per_word <= 8) 252 if (bits_per_word <= 8)
254 cs->rx_shift = 8; 253 cs->rx_shift = 8;
@@ -256,10 +255,10 @@ int mpc83xx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
256 cs->rx_shift = 0; 255 cs->rx_shift = 0;
257 } 256 }
258 257
259 mpc83xx_spi->rx_shift = cs->rx_shift; 258 mpc8xxx_spi->rx_shift = cs->rx_shift;
260 mpc83xx_spi->tx_shift = cs->tx_shift; 259 mpc8xxx_spi->tx_shift = cs->tx_shift;
261 mpc83xx_spi->get_rx = cs->get_rx; 260 mpc8xxx_spi->get_rx = cs->get_rx;
262 mpc83xx_spi->get_tx = cs->get_tx; 261 mpc8xxx_spi->get_tx = cs->get_tx;
263 262
264 if (bits_per_word == 32) 263 if (bits_per_word == 32)
265 bits_per_word = 0; 264 bits_per_word = 0;
@@ -272,25 +271,25 @@ int mpc83xx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
272 271
273 cs->hw_mode |= SPMODE_LEN(bits_per_word); 272 cs->hw_mode |= SPMODE_LEN(bits_per_word);
274 273
275 if ((mpc83xx_spi->spibrg / hz) > 64) { 274 if ((mpc8xxx_spi->spibrg / hz) > 64) {
276 cs->hw_mode |= SPMODE_DIV16; 275 cs->hw_mode |= SPMODE_DIV16;
277 pm = mpc83xx_spi->spibrg / (hz * 64); 276 pm = mpc8xxx_spi->spibrg / (hz * 64);
278 if (pm > 16) { 277
279 dev_err(&spi->dev, "Requested speed is too " 278 WARN_ONCE(pm > 16, "%s: Requested speed is too low: %d Hz. "
280 "low: %d Hz. Will use %d Hz instead.\n", 279 "Will use %d Hz instead.\n", dev_name(&spi->dev),
281 hz, mpc83xx_spi->spibrg / 1024); 280 hz, mpc8xxx_spi->spibrg / 1024);
281 if (pm > 16)
282 pm = 16; 282 pm = 16;
283 }
284 } else 283 } else
285 pm = mpc83xx_spi->spibrg / (hz * 4); 284 pm = mpc8xxx_spi->spibrg / (hz * 4);
286 if (pm) 285 if (pm)
287 pm--; 286 pm--;
288 287
289 cs->hw_mode |= SPMODE_PM(pm); 288 cs->hw_mode |= SPMODE_PM(pm);
290 regval = mpc83xx_spi_read_reg(&mpc83xx_spi->base->mode); 289 regval = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->mode);
291 if (cs->hw_mode != regval) { 290 if (cs->hw_mode != regval) {
292 unsigned long flags; 291 unsigned long flags;
293 __be32 __iomem *mode = &mpc83xx_spi->base->mode; 292 __be32 __iomem *mode = &mpc8xxx_spi->base->mode;
294 293
295 regval = cs->hw_mode; 294 regval = cs->hw_mode;
296 /* Turn off IRQs locally to minimize time 295 /* Turn off IRQs locally to minimize time
@@ -298,22 +297,22 @@ int mpc83xx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
298 */ 297 */
299 local_irq_save(flags); 298 local_irq_save(flags);
300 /* Turn off SPI unit prior changing mode */ 299 /* Turn off SPI unit prior changing mode */
301 mpc83xx_spi_write_reg(mode, regval & ~SPMODE_ENABLE); 300 mpc8xxx_spi_write_reg(mode, regval & ~SPMODE_ENABLE);
302 mpc83xx_spi_write_reg(mode, regval); 301 mpc8xxx_spi_write_reg(mode, regval);
303 local_irq_restore(flags); 302 local_irq_restore(flags);
304 } 303 }
305 return 0; 304 return 0;
306} 305}
307 306
308static int mpc83xx_spi_bufs(struct spi_device *spi, struct spi_transfer *t) 307static int mpc8xxx_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
309{ 308{
310 struct mpc83xx_spi *mpc83xx_spi; 309 struct mpc8xxx_spi *mpc8xxx_spi;
311 u32 word, len, bits_per_word; 310 u32 word, len, bits_per_word;
312 311
313 mpc83xx_spi = spi_master_get_devdata(spi->master); 312 mpc8xxx_spi = spi_master_get_devdata(spi->master);
314 313
315 mpc83xx_spi->tx = t->tx_buf; 314 mpc8xxx_spi->tx = t->tx_buf;
316 mpc83xx_spi->rx = t->rx_buf; 315 mpc8xxx_spi->rx = t->rx_buf;
317 bits_per_word = spi->bits_per_word; 316 bits_per_word = spi->bits_per_word;
318 if (t->bits_per_word) 317 if (t->bits_per_word)
319 bits_per_word = t->bits_per_word; 318 bits_per_word = t->bits_per_word;
@@ -330,111 +329,106 @@ static int mpc83xx_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
330 return -EINVAL; 329 return -EINVAL;
331 len /= 2; 330 len /= 2;
332 } 331 }
333 mpc83xx_spi->count = len; 332 mpc8xxx_spi->count = len;
334 333
335 INIT_COMPLETION(mpc83xx_spi->done); 334 INIT_COMPLETION(mpc8xxx_spi->done);
336 335
337 /* enable rx ints */ 336 /* enable rx ints */
338 mpc83xx_spi_write_reg(&mpc83xx_spi->base->mask, SPIM_NE); 337 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->mask, SPIM_NE);
339 338
340 /* transmit word */ 339 /* transmit word */
341 word = mpc83xx_spi->get_tx(mpc83xx_spi); 340 word = mpc8xxx_spi->get_tx(mpc8xxx_spi);
342 mpc83xx_spi_write_reg(&mpc83xx_spi->base->transmit, word); 341 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->transmit, word);
343 342
344 wait_for_completion(&mpc83xx_spi->done); 343 wait_for_completion(&mpc8xxx_spi->done);
345 344
346 /* disable rx ints */ 345 /* disable rx ints */
347 mpc83xx_spi_write_reg(&mpc83xx_spi->base->mask, 0); 346 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->mask, 0);
348 347
349 return mpc83xx_spi->count; 348 return mpc8xxx_spi->count;
350} 349}
351 350
352static void mpc83xx_spi_work(struct work_struct *work) 351static void mpc8xxx_spi_do_one_msg(struct spi_message *m)
353{ 352{
354 struct mpc83xx_spi *mpc83xx_spi = 353 struct spi_device *spi = m->spi;
355 container_of(work, struct mpc83xx_spi, work); 354 struct spi_transfer *t;
356 355 unsigned int cs_change;
357 spin_lock_irq(&mpc83xx_spi->lock); 356 const int nsecs = 50;
358 mpc83xx_spi->busy = 1; 357 int status;
359 while (!list_empty(&mpc83xx_spi->queue)) { 358
360 struct spi_message *m; 359 cs_change = 1;
361 struct spi_device *spi; 360 status = 0;
362 struct spi_transfer *t = NULL; 361 list_for_each_entry(t, &m->transfers, transfer_list) {
363 unsigned cs_change; 362 if (t->bits_per_word || t->speed_hz) {
364 int status, nsecs = 50; 363 /* Don't allow changes if CS is active */
365 364 status = -EINVAL;
366 m = container_of(mpc83xx_spi->queue.next,
367 struct spi_message, queue);
368 list_del_init(&m->queue);
369 spin_unlock_irq(&mpc83xx_spi->lock);
370
371 spi = m->spi;
372 cs_change = 1;
373 status = 0;
374 list_for_each_entry(t, &m->transfers, transfer_list) {
375 if (t->bits_per_word || t->speed_hz) {
376 /* Don't allow changes if CS is active */
377 status = -EINVAL;
378
379 if (cs_change)
380 status = mpc83xx_spi_setup_transfer(spi, t);
381 if (status < 0)
382 break;
383 }
384 365
385 if (cs_change) 366 if (cs_change)
386 mpc83xx_spi_chipselect(spi, BITBANG_CS_ACTIVE); 367 status = mpc8xxx_spi_setup_transfer(spi, t);
387 cs_change = t->cs_change; 368 if (status < 0)
388 if (t->len)
389 status = mpc83xx_spi_bufs(spi, t);
390 if (status) {
391 status = -EMSGSIZE;
392 break; 369 break;
393 } 370 }
394 m->actual_length += t->len;
395
396 if (t->delay_usecs)
397 udelay(t->delay_usecs);
398 371
399 if (cs_change) { 372 if (cs_change) {
400 ndelay(nsecs); 373 mpc8xxx_spi_chipselect(spi, BITBANG_CS_ACTIVE);
401 mpc83xx_spi_chipselect(spi, BITBANG_CS_INACTIVE); 374 ndelay(nsecs);
402 ndelay(nsecs); 375 }
403 } 376 cs_change = t->cs_change;
377 if (t->len)
378 status = mpc8xxx_spi_bufs(spi, t);
379 if (status) {
380 status = -EMSGSIZE;
381 break;
404 } 382 }
383 m->actual_length += t->len;
405 384
406 m->status = status; 385 if (t->delay_usecs)
407 m->complete(m->context); 386 udelay(t->delay_usecs);
408 387
409 if (status || !cs_change) { 388 if (cs_change) {
389 ndelay(nsecs);
390 mpc8xxx_spi_chipselect(spi, BITBANG_CS_INACTIVE);
410 ndelay(nsecs); 391 ndelay(nsecs);
411 mpc83xx_spi_chipselect(spi, BITBANG_CS_INACTIVE);
412 } 392 }
393 }
413 394
414 mpc83xx_spi_setup_transfer(spi, NULL); 395 m->status = status;
396 m->complete(m->context);
415 397
416 spin_lock_irq(&mpc83xx_spi->lock); 398 if (status || !cs_change) {
399 ndelay(nsecs);
400 mpc8xxx_spi_chipselect(spi, BITBANG_CS_INACTIVE);
417 } 401 }
418 mpc83xx_spi->busy = 0; 402
419 spin_unlock_irq(&mpc83xx_spi->lock); 403 mpc8xxx_spi_setup_transfer(spi, NULL);
420} 404}
421 405
422/* the spi->mode bits understood by this driver: */ 406static void mpc8xxx_spi_work(struct work_struct *work)
423#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH \ 407{
424 | SPI_LSB_FIRST | SPI_LOOP) 408 struct mpc8xxx_spi *mpc8xxx_spi = container_of(work, struct mpc8xxx_spi,
409 work);
410
411 spin_lock_irq(&mpc8xxx_spi->lock);
412 while (!list_empty(&mpc8xxx_spi->queue)) {
413 struct spi_message *m = container_of(mpc8xxx_spi->queue.next,
414 struct spi_message, queue);
415
416 list_del_init(&m->queue);
417 spin_unlock_irq(&mpc8xxx_spi->lock);
418
419 mpc8xxx_spi_do_one_msg(m);
420
421 spin_lock_irq(&mpc8xxx_spi->lock);
422 }
423 spin_unlock_irq(&mpc8xxx_spi->lock);
424}
425 425
426static int mpc83xx_spi_setup(struct spi_device *spi) 426static int mpc8xxx_spi_setup(struct spi_device *spi)
427{ 427{
428 struct mpc83xx_spi *mpc83xx_spi; 428 struct mpc8xxx_spi *mpc8xxx_spi;
429 int retval; 429 int retval;
430 u32 hw_mode; 430 u32 hw_mode;
431 struct spi_mpc83xx_cs *cs = spi->controller_state; 431 struct spi_mpc8xxx_cs *cs = spi->controller_state;
432
433 if (spi->mode & ~MODEBITS) {
434 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
435 spi->mode & ~MODEBITS);
436 return -EINVAL;
437 }
438 432
439 if (!spi->max_speed_hz) 433 if (!spi->max_speed_hz)
440 return -EINVAL; 434 return -EINVAL;
@@ -445,13 +439,10 @@ static int mpc83xx_spi_setup(struct spi_device *spi)
445 return -ENOMEM; 439 return -ENOMEM;
446 spi->controller_state = cs; 440 spi->controller_state = cs;
447 } 441 }
448 mpc83xx_spi = spi_master_get_devdata(spi->master); 442 mpc8xxx_spi = spi_master_get_devdata(spi->master);
449
450 if (!spi->bits_per_word)
451 spi->bits_per_word = 8;
452 443
453 hw_mode = cs->hw_mode; /* Save orginal settings */ 444 hw_mode = cs->hw_mode; /* Save orginal settings */
454 cs->hw_mode = mpc83xx_spi_read_reg(&mpc83xx_spi->base->mode); 445 cs->hw_mode = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->mode);
455 /* mask out bits we are going to set */ 446 /* mask out bits we are going to set */
456 cs->hw_mode &= ~(SPMODE_CP_BEGIN_EDGECLK | SPMODE_CI_INACTIVEHIGH 447 cs->hw_mode &= ~(SPMODE_CP_BEGIN_EDGECLK | SPMODE_CI_INACTIVEHIGH
457 | SPMODE_REV | SPMODE_LOOP); 448 | SPMODE_REV | SPMODE_LOOP);
@@ -465,45 +456,29 @@ static int mpc83xx_spi_setup(struct spi_device *spi)
465 if (spi->mode & SPI_LOOP) 456 if (spi->mode & SPI_LOOP)
466 cs->hw_mode |= SPMODE_LOOP; 457 cs->hw_mode |= SPMODE_LOOP;
467 458
468 retval = mpc83xx_spi_setup_transfer(spi, NULL); 459 retval = mpc8xxx_spi_setup_transfer(spi, NULL);
469 if (retval < 0) { 460 if (retval < 0) {
470 cs->hw_mode = hw_mode; /* Restore settings */ 461 cs->hw_mode = hw_mode; /* Restore settings */
471 return retval; 462 return retval;
472 } 463 }
473
474 dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u Hz\n",
475 __func__, spi->mode & (SPI_CPOL | SPI_CPHA),
476 spi->bits_per_word, spi->max_speed_hz);
477#if 0 /* Don't think this is needed */
478 /* NOTE we _need_ to call chipselect() early, ideally with adapter
479 * setup, unless the hardware defaults cooperate to avoid confusion
480 * between normal (active low) and inverted chipselects.
481 */
482
483 /* deselect chip (low or high) */
484 spin_lock(&mpc83xx_spi->lock);
485 if (!mpc83xx_spi->busy)
486 mpc83xx_spi_chipselect(spi, BITBANG_CS_INACTIVE);
487 spin_unlock(&mpc83xx_spi->lock);
488#endif
489 return 0; 464 return 0;
490} 465}
491 466
492static irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data) 467static irqreturn_t mpc8xxx_spi_irq(s32 irq, void *context_data)
493{ 468{
494 struct mpc83xx_spi *mpc83xx_spi = context_data; 469 struct mpc8xxx_spi *mpc8xxx_spi = context_data;
495 u32 event; 470 u32 event;
496 irqreturn_t ret = IRQ_NONE; 471 irqreturn_t ret = IRQ_NONE;
497 472
498 /* Get interrupt events(tx/rx) */ 473 /* Get interrupt events(tx/rx) */
499 event = mpc83xx_spi_read_reg(&mpc83xx_spi->base->event); 474 event = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->event);
500 475
501 /* We need handle RX first */ 476 /* We need handle RX first */
502 if (event & SPIE_NE) { 477 if (event & SPIE_NE) {
503 u32 rx_data = mpc83xx_spi_read_reg(&mpc83xx_spi->base->receive); 478 u32 rx_data = mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->receive);
504 479
505 if (mpc83xx_spi->rx) 480 if (mpc8xxx_spi->rx)
506 mpc83xx_spi->get_rx(rx_data, mpc83xx_spi); 481 mpc8xxx_spi->get_rx(rx_data, mpc8xxx_spi);
507 482
508 ret = IRQ_HANDLED; 483 ret = IRQ_HANDLED;
509 } 484 }
@@ -511,56 +486,56 @@ static irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data)
511 if ((event & SPIE_NF) == 0) 486 if ((event & SPIE_NF) == 0)
512 /* spin until TX is done */ 487 /* spin until TX is done */
513 while (((event = 488 while (((event =
514 mpc83xx_spi_read_reg(&mpc83xx_spi->base->event)) & 489 mpc8xxx_spi_read_reg(&mpc8xxx_spi->base->event)) &
515 SPIE_NF) == 0) 490 SPIE_NF) == 0)
516 cpu_relax(); 491 cpu_relax();
517 492
518 mpc83xx_spi->count -= 1; 493 mpc8xxx_spi->count -= 1;
519 if (mpc83xx_spi->count) { 494 if (mpc8xxx_spi->count) {
520 u32 word = mpc83xx_spi->get_tx(mpc83xx_spi); 495 u32 word = mpc8xxx_spi->get_tx(mpc8xxx_spi);
521 mpc83xx_spi_write_reg(&mpc83xx_spi->base->transmit, word); 496 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->transmit, word);
522 } else { 497 } else {
523 complete(&mpc83xx_spi->done); 498 complete(&mpc8xxx_spi->done);
524 } 499 }
525 500
526 /* Clear the events */ 501 /* Clear the events */
527 mpc83xx_spi_write_reg(&mpc83xx_spi->base->event, event); 502 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->event, event);
528 503
529 return ret; 504 return ret;
530} 505}
531static int mpc83xx_spi_transfer(struct spi_device *spi, 506static int mpc8xxx_spi_transfer(struct spi_device *spi,
532 struct spi_message *m) 507 struct spi_message *m)
533{ 508{
534 struct mpc83xx_spi *mpc83xx_spi = spi_master_get_devdata(spi->master); 509 struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
535 unsigned long flags; 510 unsigned long flags;
536 511
537 m->actual_length = 0; 512 m->actual_length = 0;
538 m->status = -EINPROGRESS; 513 m->status = -EINPROGRESS;
539 514
540 spin_lock_irqsave(&mpc83xx_spi->lock, flags); 515 spin_lock_irqsave(&mpc8xxx_spi->lock, flags);
541 list_add_tail(&m->queue, &mpc83xx_spi->queue); 516 list_add_tail(&m->queue, &mpc8xxx_spi->queue);
542 queue_work(mpc83xx_spi->workqueue, &mpc83xx_spi->work); 517 queue_work(mpc8xxx_spi->workqueue, &mpc8xxx_spi->work);
543 spin_unlock_irqrestore(&mpc83xx_spi->lock, flags); 518 spin_unlock_irqrestore(&mpc8xxx_spi->lock, flags);
544 519
545 return 0; 520 return 0;
546} 521}
547 522
548 523
549static void mpc83xx_spi_cleanup(struct spi_device *spi) 524static void mpc8xxx_spi_cleanup(struct spi_device *spi)
550{ 525{
551 kfree(spi->controller_state); 526 kfree(spi->controller_state);
552} 527}
553 528
554static struct spi_master * __devinit 529static struct spi_master * __devinit
555mpc83xx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq) 530mpc8xxx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq)
556{ 531{
557 struct fsl_spi_platform_data *pdata = dev->platform_data; 532 struct fsl_spi_platform_data *pdata = dev->platform_data;
558 struct spi_master *master; 533 struct spi_master *master;
559 struct mpc83xx_spi *mpc83xx_spi; 534 struct mpc8xxx_spi *mpc8xxx_spi;
560 u32 regval; 535 u32 regval;
561 int ret = 0; 536 int ret = 0;
562 537
563 master = spi_alloc_master(dev, sizeof(struct mpc83xx_spi)); 538 master = spi_alloc_master(dev, sizeof(struct mpc8xxx_spi));
564 if (master == NULL) { 539 if (master == NULL) {
565 ret = -ENOMEM; 540 ret = -ENOMEM;
566 goto err; 541 goto err;
@@ -568,36 +543,40 @@ mpc83xx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq)
568 543
569 dev_set_drvdata(dev, master); 544 dev_set_drvdata(dev, master);
570 545
571 master->setup = mpc83xx_spi_setup; 546 /* the spi->mode bits understood by this driver: */
572 master->transfer = mpc83xx_spi_transfer; 547 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH
573 master->cleanup = mpc83xx_spi_cleanup; 548 | SPI_LSB_FIRST | SPI_LOOP;
574 549
575 mpc83xx_spi = spi_master_get_devdata(master); 550 master->setup = mpc8xxx_spi_setup;
576 mpc83xx_spi->qe_mode = pdata->qe_mode; 551 master->transfer = mpc8xxx_spi_transfer;
577 mpc83xx_spi->get_rx = mpc83xx_spi_rx_buf_u8; 552 master->cleanup = mpc8xxx_spi_cleanup;
578 mpc83xx_spi->get_tx = mpc83xx_spi_tx_buf_u8; 553
579 mpc83xx_spi->spibrg = pdata->sysclk; 554 mpc8xxx_spi = spi_master_get_devdata(master);
580 555 mpc8xxx_spi->qe_mode = pdata->qe_mode;
581 mpc83xx_spi->rx_shift = 0; 556 mpc8xxx_spi->get_rx = mpc8xxx_spi_rx_buf_u8;
582 mpc83xx_spi->tx_shift = 0; 557 mpc8xxx_spi->get_tx = mpc8xxx_spi_tx_buf_u8;
583 if (mpc83xx_spi->qe_mode) { 558 mpc8xxx_spi->spibrg = pdata->sysclk;
584 mpc83xx_spi->rx_shift = 16; 559
585 mpc83xx_spi->tx_shift = 24; 560 mpc8xxx_spi->rx_shift = 0;
561 mpc8xxx_spi->tx_shift = 0;
562 if (mpc8xxx_spi->qe_mode) {
563 mpc8xxx_spi->rx_shift = 16;
564 mpc8xxx_spi->tx_shift = 24;
586 } 565 }
587 566
588 init_completion(&mpc83xx_spi->done); 567 init_completion(&mpc8xxx_spi->done);
589 568
590 mpc83xx_spi->base = ioremap(mem->start, mem->end - mem->start + 1); 569 mpc8xxx_spi->base = ioremap(mem->start, mem->end - mem->start + 1);
591 if (mpc83xx_spi->base == NULL) { 570 if (mpc8xxx_spi->base == NULL) {
592 ret = -ENOMEM; 571 ret = -ENOMEM;
593 goto put_master; 572 goto put_master;
594 } 573 }
595 574
596 mpc83xx_spi->irq = irq; 575 mpc8xxx_spi->irq = irq;
597 576
598 /* Register for SPI Interrupt */ 577 /* Register for SPI Interrupt */
599 ret = request_irq(mpc83xx_spi->irq, mpc83xx_spi_irq, 578 ret = request_irq(mpc8xxx_spi->irq, mpc8xxx_spi_irq,
600 0, "mpc83xx_spi", mpc83xx_spi); 579 0, "mpc8xxx_spi", mpc8xxx_spi);
601 580
602 if (ret != 0) 581 if (ret != 0)
603 goto unmap_io; 582 goto unmap_io;
@@ -606,25 +585,25 @@ mpc83xx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq)
606 master->num_chipselect = pdata->max_chipselect; 585 master->num_chipselect = pdata->max_chipselect;
607 586
608 /* SPI controller initializations */ 587 /* SPI controller initializations */
609 mpc83xx_spi_write_reg(&mpc83xx_spi->base->mode, 0); 588 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->mode, 0);
610 mpc83xx_spi_write_reg(&mpc83xx_spi->base->mask, 0); 589 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->mask, 0);
611 mpc83xx_spi_write_reg(&mpc83xx_spi->base->command, 0); 590 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->command, 0);
612 mpc83xx_spi_write_reg(&mpc83xx_spi->base->event, 0xffffffff); 591 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->event, 0xffffffff);
613 592
614 /* Enable SPI interface */ 593 /* Enable SPI interface */
615 regval = pdata->initial_spmode | SPMODE_INIT_VAL | SPMODE_ENABLE; 594 regval = pdata->initial_spmode | SPMODE_INIT_VAL | SPMODE_ENABLE;
616 if (pdata->qe_mode) 595 if (pdata->qe_mode)
617 regval |= SPMODE_OP; 596 regval |= SPMODE_OP;
618 597
619 mpc83xx_spi_write_reg(&mpc83xx_spi->base->mode, regval); 598 mpc8xxx_spi_write_reg(&mpc8xxx_spi->base->mode, regval);
620 spin_lock_init(&mpc83xx_spi->lock); 599 spin_lock_init(&mpc8xxx_spi->lock);
621 init_completion(&mpc83xx_spi->done); 600 init_completion(&mpc8xxx_spi->done);
622 INIT_WORK(&mpc83xx_spi->work, mpc83xx_spi_work); 601 INIT_WORK(&mpc8xxx_spi->work, mpc8xxx_spi_work);
623 INIT_LIST_HEAD(&mpc83xx_spi->queue); 602 INIT_LIST_HEAD(&mpc8xxx_spi->queue);
624 603
625 mpc83xx_spi->workqueue = create_singlethread_workqueue( 604 mpc8xxx_spi->workqueue = create_singlethread_workqueue(
626 dev_name(master->dev.parent)); 605 dev_name(master->dev.parent));
627 if (mpc83xx_spi->workqueue == NULL) { 606 if (mpc8xxx_spi->workqueue == NULL) {
628 ret = -EBUSY; 607 ret = -EBUSY;
629 goto free_irq; 608 goto free_irq;
630 } 609 }
@@ -634,57 +613,57 @@ mpc83xx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq)
634 goto unreg_master; 613 goto unreg_master;
635 614
636 printk(KERN_INFO 615 printk(KERN_INFO
637 "%s: MPC83xx SPI Controller driver at 0x%p (irq = %d)\n", 616 "%s: MPC8xxx SPI Controller driver at 0x%p (irq = %d)\n",
638 dev_name(dev), mpc83xx_spi->base, mpc83xx_spi->irq); 617 dev_name(dev), mpc8xxx_spi->base, mpc8xxx_spi->irq);
639 618
640 return master; 619 return master;
641 620
642unreg_master: 621unreg_master:
643 destroy_workqueue(mpc83xx_spi->workqueue); 622 destroy_workqueue(mpc8xxx_spi->workqueue);
644free_irq: 623free_irq:
645 free_irq(mpc83xx_spi->irq, mpc83xx_spi); 624 free_irq(mpc8xxx_spi->irq, mpc8xxx_spi);
646unmap_io: 625unmap_io:
647 iounmap(mpc83xx_spi->base); 626 iounmap(mpc8xxx_spi->base);
648put_master: 627put_master:
649 spi_master_put(master); 628 spi_master_put(master);
650err: 629err:
651 return ERR_PTR(ret); 630 return ERR_PTR(ret);
652} 631}
653 632
654static int __devexit mpc83xx_spi_remove(struct device *dev) 633static int __devexit mpc8xxx_spi_remove(struct device *dev)
655{ 634{
656 struct mpc83xx_spi *mpc83xx_spi; 635 struct mpc8xxx_spi *mpc8xxx_spi;
657 struct spi_master *master; 636 struct spi_master *master;
658 637
659 master = dev_get_drvdata(dev); 638 master = dev_get_drvdata(dev);
660 mpc83xx_spi = spi_master_get_devdata(master); 639 mpc8xxx_spi = spi_master_get_devdata(master);
661 640
662 flush_workqueue(mpc83xx_spi->workqueue); 641 flush_workqueue(mpc8xxx_spi->workqueue);
663 destroy_workqueue(mpc83xx_spi->workqueue); 642 destroy_workqueue(mpc8xxx_spi->workqueue);
664 spi_unregister_master(master); 643 spi_unregister_master(master);
665 644
666 free_irq(mpc83xx_spi->irq, mpc83xx_spi); 645 free_irq(mpc8xxx_spi->irq, mpc8xxx_spi);
667 iounmap(mpc83xx_spi->base); 646 iounmap(mpc8xxx_spi->base);
668 647
669 return 0; 648 return 0;
670} 649}
671 650
672struct mpc83xx_spi_probe_info { 651struct mpc8xxx_spi_probe_info {
673 struct fsl_spi_platform_data pdata; 652 struct fsl_spi_platform_data pdata;
674 int *gpios; 653 int *gpios;
675 bool *alow_flags; 654 bool *alow_flags;
676}; 655};
677 656
678static struct mpc83xx_spi_probe_info * 657static struct mpc8xxx_spi_probe_info *
679to_of_pinfo(struct fsl_spi_platform_data *pdata) 658to_of_pinfo(struct fsl_spi_platform_data *pdata)
680{ 659{
681 return container_of(pdata, struct mpc83xx_spi_probe_info, pdata); 660 return container_of(pdata, struct mpc8xxx_spi_probe_info, pdata);
682} 661}
683 662
684static void mpc83xx_spi_cs_control(struct spi_device *spi, bool on) 663static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on)
685{ 664{
686 struct device *dev = spi->dev.parent; 665 struct device *dev = spi->dev.parent;
687 struct mpc83xx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data); 666 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data);
688 u16 cs = spi->chip_select; 667 u16 cs = spi->chip_select;
689 int gpio = pinfo->gpios[cs]; 668 int gpio = pinfo->gpios[cs];
690 bool alow = pinfo->alow_flags[cs]; 669 bool alow = pinfo->alow_flags[cs];
@@ -692,11 +671,11 @@ static void mpc83xx_spi_cs_control(struct spi_device *spi, bool on)
692 gpio_set_value(gpio, on ^ alow); 671 gpio_set_value(gpio, on ^ alow);
693} 672}
694 673
695static int of_mpc83xx_spi_get_chipselects(struct device *dev) 674static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
696{ 675{
697 struct device_node *np = dev_archdata_get_node(&dev->archdata); 676 struct device_node *np = dev_archdata_get_node(&dev->archdata);
698 struct fsl_spi_platform_data *pdata = dev->platform_data; 677 struct fsl_spi_platform_data *pdata = dev->platform_data;
699 struct mpc83xx_spi_probe_info *pinfo = to_of_pinfo(pdata); 678 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
700 unsigned int ngpios; 679 unsigned int ngpios;
701 int i = 0; 680 int i = 0;
702 int ret; 681 int ret;
@@ -752,7 +731,7 @@ static int of_mpc83xx_spi_get_chipselects(struct device *dev)
752 } 731 }
753 732
754 pdata->max_chipselect = ngpios; 733 pdata->max_chipselect = ngpios;
755 pdata->cs_control = mpc83xx_spi_cs_control; 734 pdata->cs_control = mpc8xxx_spi_cs_control;
756 735
757 return 0; 736 return 0;
758 737
@@ -771,10 +750,10 @@ err_alloc_flags:
771 return ret; 750 return ret;
772} 751}
773 752
774static int of_mpc83xx_spi_free_chipselects(struct device *dev) 753static int of_mpc8xxx_spi_free_chipselects(struct device *dev)
775{ 754{
776 struct fsl_spi_platform_data *pdata = dev->platform_data; 755 struct fsl_spi_platform_data *pdata = dev->platform_data;
777 struct mpc83xx_spi_probe_info *pinfo = to_of_pinfo(pdata); 756 struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
778 int i; 757 int i;
779 758
780 if (!pinfo->gpios) 759 if (!pinfo->gpios)
@@ -790,12 +769,12 @@ static int of_mpc83xx_spi_free_chipselects(struct device *dev)
790 return 0; 769 return 0;
791} 770}
792 771
793static int __devinit of_mpc83xx_spi_probe(struct of_device *ofdev, 772static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev,
794 const struct of_device_id *ofid) 773 const struct of_device_id *ofid)
795{ 774{
796 struct device *dev = &ofdev->dev; 775 struct device *dev = &ofdev->dev;
797 struct device_node *np = ofdev->node; 776 struct device_node *np = ofdev->node;
798 struct mpc83xx_spi_probe_info *pinfo; 777 struct mpc8xxx_spi_probe_info *pinfo;
799 struct fsl_spi_platform_data *pdata; 778 struct fsl_spi_platform_data *pdata;
800 struct spi_master *master; 779 struct spi_master *master;
801 struct resource mem; 780 struct resource mem;
@@ -827,7 +806,7 @@ static int __devinit of_mpc83xx_spi_probe(struct of_device *ofdev,
827 if (prop && !strcmp(prop, "cpu-qe")) 806 if (prop && !strcmp(prop, "cpu-qe"))
828 pdata->qe_mode = 1; 807 pdata->qe_mode = 1;
829 808
830 ret = of_mpc83xx_spi_get_chipselects(dev); 809 ret = of_mpc8xxx_spi_get_chipselects(dev);
831 if (ret) 810 if (ret)
832 goto err; 811 goto err;
833 812
@@ -841,7 +820,7 @@ static int __devinit of_mpc83xx_spi_probe(struct of_device *ofdev,
841 goto err; 820 goto err;
842 } 821 }
843 822
844 master = mpc83xx_spi_probe(dev, &mem, irq.start); 823 master = mpc8xxx_spi_probe(dev, &mem, irq.start);
845 if (IS_ERR(master)) { 824 if (IS_ERR(master)) {
846 ret = PTR_ERR(master); 825 ret = PTR_ERR(master);
847 goto err; 826 goto err;
@@ -852,34 +831,34 @@ static int __devinit of_mpc83xx_spi_probe(struct of_device *ofdev,
852 return 0; 831 return 0;
853 832
854err: 833err:
855 of_mpc83xx_spi_free_chipselects(dev); 834 of_mpc8xxx_spi_free_chipselects(dev);
856err_clk: 835err_clk:
857 kfree(pinfo); 836 kfree(pinfo);
858 return ret; 837 return ret;
859} 838}
860 839
861static int __devexit of_mpc83xx_spi_remove(struct of_device *ofdev) 840static int __devexit of_mpc8xxx_spi_remove(struct of_device *ofdev)
862{ 841{
863 int ret; 842 int ret;
864 843
865 ret = mpc83xx_spi_remove(&ofdev->dev); 844 ret = mpc8xxx_spi_remove(&ofdev->dev);
866 if (ret) 845 if (ret)
867 return ret; 846 return ret;
868 of_mpc83xx_spi_free_chipselects(&ofdev->dev); 847 of_mpc8xxx_spi_free_chipselects(&ofdev->dev);
869 return 0; 848 return 0;
870} 849}
871 850
872static const struct of_device_id of_mpc83xx_spi_match[] = { 851static const struct of_device_id of_mpc8xxx_spi_match[] = {
873 { .compatible = "fsl,spi" }, 852 { .compatible = "fsl,spi" },
874 {}, 853 {},
875}; 854};
876MODULE_DEVICE_TABLE(of, of_mpc83xx_spi_match); 855MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match);
877 856
878static struct of_platform_driver of_mpc83xx_spi_driver = { 857static struct of_platform_driver of_mpc8xxx_spi_driver = {
879 .name = "mpc83xx_spi", 858 .name = "mpc8xxx_spi",
880 .match_table = of_mpc83xx_spi_match, 859 .match_table = of_mpc8xxx_spi_match,
881 .probe = of_mpc83xx_spi_probe, 860 .probe = of_mpc8xxx_spi_probe,
882 .remove = __devexit_p(of_mpc83xx_spi_remove), 861 .remove = __devexit_p(of_mpc8xxx_spi_remove),
883}; 862};
884 863
885#ifdef CONFIG_MPC832x_RDB 864#ifdef CONFIG_MPC832x_RDB
@@ -890,7 +869,7 @@ static struct of_platform_driver of_mpc83xx_spi_driver = {
890 * tree can work with OpenFirmware driver. But for now we support old trees 869 * tree can work with OpenFirmware driver. But for now we support old trees
891 * as well. 870 * as well.
892 */ 871 */
893static int __devinit plat_mpc83xx_spi_probe(struct platform_device *pdev) 872static int __devinit plat_mpc8xxx_spi_probe(struct platform_device *pdev)
894{ 873{
895 struct resource *mem; 874 struct resource *mem;
896 unsigned int irq; 875 unsigned int irq;
@@ -907,23 +886,23 @@ static int __devinit plat_mpc83xx_spi_probe(struct platform_device *pdev)
907 if (!irq) 886 if (!irq)
908 return -EINVAL; 887 return -EINVAL;
909 888
910 master = mpc83xx_spi_probe(&pdev->dev, mem, irq); 889 master = mpc8xxx_spi_probe(&pdev->dev, mem, irq);
911 if (IS_ERR(master)) 890 if (IS_ERR(master))
912 return PTR_ERR(master); 891 return PTR_ERR(master);
913 return 0; 892 return 0;
914} 893}
915 894
916static int __devexit plat_mpc83xx_spi_remove(struct platform_device *pdev) 895static int __devexit plat_mpc8xxx_spi_remove(struct platform_device *pdev)
917{ 896{
918 return mpc83xx_spi_remove(&pdev->dev); 897 return mpc8xxx_spi_remove(&pdev->dev);
919} 898}
920 899
921MODULE_ALIAS("platform:mpc83xx_spi"); 900MODULE_ALIAS("platform:mpc8xxx_spi");
922static struct platform_driver mpc83xx_spi_driver = { 901static struct platform_driver mpc8xxx_spi_driver = {
923 .probe = plat_mpc83xx_spi_probe, 902 .probe = plat_mpc8xxx_spi_probe,
924 .remove = __exit_p(plat_mpc83xx_spi_remove), 903 .remove = __exit_p(plat_mpc8xxx_spi_remove),
925 .driver = { 904 .driver = {
926 .name = "mpc83xx_spi", 905 .name = "mpc8xxx_spi",
927 .owner = THIS_MODULE, 906 .owner = THIS_MODULE,
928 }, 907 },
929}; 908};
@@ -932,35 +911,35 @@ static bool legacy_driver_failed;
932 911
933static void __init legacy_driver_register(void) 912static void __init legacy_driver_register(void)
934{ 913{
935 legacy_driver_failed = platform_driver_register(&mpc83xx_spi_driver); 914 legacy_driver_failed = platform_driver_register(&mpc8xxx_spi_driver);
936} 915}
937 916
938static void __exit legacy_driver_unregister(void) 917static void __exit legacy_driver_unregister(void)
939{ 918{
940 if (legacy_driver_failed) 919 if (legacy_driver_failed)
941 return; 920 return;
942 platform_driver_unregister(&mpc83xx_spi_driver); 921 platform_driver_unregister(&mpc8xxx_spi_driver);
943} 922}
944#else 923#else
945static void __init legacy_driver_register(void) {} 924static void __init legacy_driver_register(void) {}
946static void __exit legacy_driver_unregister(void) {} 925static void __exit legacy_driver_unregister(void) {}
947#endif /* CONFIG_MPC832x_RDB */ 926#endif /* CONFIG_MPC832x_RDB */
948 927
949static int __init mpc83xx_spi_init(void) 928static int __init mpc8xxx_spi_init(void)
950{ 929{
951 legacy_driver_register(); 930 legacy_driver_register();
952 return of_register_platform_driver(&of_mpc83xx_spi_driver); 931 return of_register_platform_driver(&of_mpc8xxx_spi_driver);
953} 932}
954 933
955static void __exit mpc83xx_spi_exit(void) 934static void __exit mpc8xxx_spi_exit(void)
956{ 935{
957 of_unregister_platform_driver(&of_mpc83xx_spi_driver); 936 of_unregister_platform_driver(&of_mpc8xxx_spi_driver);
958 legacy_driver_unregister(); 937 legacy_driver_unregister();
959} 938}
960 939
961module_init(mpc83xx_spi_init); 940module_init(mpc8xxx_spi_init);
962module_exit(mpc83xx_spi_exit); 941module_exit(mpc8xxx_spi_exit);
963 942
964MODULE_AUTHOR("Kumar Gala"); 943MODULE_AUTHOR("Kumar Gala");
965MODULE_DESCRIPTION("Simple MPC83xx SPI Driver"); 944MODULE_DESCRIPTION("Simple MPC8xxx SPI Driver");
966MODULE_LICENSE("GPL"); 945MODULE_LICENSE("GPL");
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index b3ebc1d0f85f..e0d44af4745a 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -146,32 +146,16 @@ static int s3c24xx_spi_setupxfer(struct spi_device *spi,
146 return 0; 146 return 0;
147} 147}
148 148
149/* the spi->mode bits understood by this driver: */
150#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
151
152static int s3c24xx_spi_setup(struct spi_device *spi) 149static int s3c24xx_spi_setup(struct spi_device *spi)
153{ 150{
154 int ret; 151 int ret;
155 152
156 if (!spi->bits_per_word)
157 spi->bits_per_word = 8;
158
159 if (spi->mode & ~MODEBITS) {
160 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
161 spi->mode & ~MODEBITS);
162 return -EINVAL;
163 }
164
165 ret = s3c24xx_spi_setupxfer(spi, NULL); 153 ret = s3c24xx_spi_setupxfer(spi, NULL);
166 if (ret < 0) { 154 if (ret < 0) {
167 dev_err(&spi->dev, "setupxfer returned %d\n", ret); 155 dev_err(&spi->dev, "setupxfer returned %d\n", ret);
168 return ret; 156 return ret;
169 } 157 }
170 158
171 dev_dbg(&spi->dev, "%s: mode %d, %u bpw, %d hz\n",
172 __func__, spi->mode, spi->bits_per_word,
173 spi->max_speed_hz);
174
175 return 0; 159 return 0;
176} 160}
177 161
@@ -290,6 +274,9 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
290 274
291 /* setup the master state. */ 275 /* setup the master state. */
292 276
277 /* the spi->mode bits understood by this driver: */
278 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
279
293 master->num_chipselect = hw->pdata->num_cs; 280 master->num_chipselect = hw->pdata->num_cs;
294 master->bus_num = pdata->bus_num; 281 master->bus_num = pdata->bus_num;
295 282
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 29cbb065618a..96057de133ad 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -110,23 +110,17 @@ static void txx9spi_cs_func(struct spi_device *spi, struct txx9spi *c,
110 ndelay(cs_delay); /* CS Setup Time / CS Recovery Time */ 110 ndelay(cs_delay); /* CS Setup Time / CS Recovery Time */
111} 111}
112 112
113/* the spi->mode bits understood by this driver: */
114#define MODEBITS (SPI_CS_HIGH|SPI_CPOL|SPI_CPHA)
115
116static int txx9spi_setup(struct spi_device *spi) 113static int txx9spi_setup(struct spi_device *spi)
117{ 114{
118 struct txx9spi *c = spi_master_get_devdata(spi->master); 115 struct txx9spi *c = spi_master_get_devdata(spi->master);
119 u8 bits_per_word; 116 u8 bits_per_word;
120 117
121 if (spi->mode & ~MODEBITS)
122 return -EINVAL;
123
124 if (!spi->max_speed_hz 118 if (!spi->max_speed_hz
125 || spi->max_speed_hz > c->max_speed_hz 119 || spi->max_speed_hz > c->max_speed_hz
126 || spi->max_speed_hz < c->min_speed_hz) 120 || spi->max_speed_hz < c->min_speed_hz)
127 return -EINVAL; 121 return -EINVAL;
128 122
129 bits_per_word = spi->bits_per_word ? : 8; 123 bits_per_word = spi->bits_per_word;
130 if (bits_per_word != 8 && bits_per_word != 16) 124 if (bits_per_word != 8 && bits_per_word != 16)
131 return -EINVAL; 125 return -EINVAL;
132 126
@@ -414,6 +408,9 @@ static int __init txx9spi_probe(struct platform_device *dev)
414 (unsigned long long)res->start, irq, 408 (unsigned long long)res->start, irq,
415 (c->baseclk + 500000) / 1000000); 409 (c->baseclk + 500000) / 1000000);
416 410
411 /* the spi->mode bits understood by this driver: */
412 master->mode_bits = SPI_CS_HIGH | SPI_CPOL | SPI_CPHA;
413
417 master->bus_num = dev->id; 414 master->bus_num = dev->id;
418 master->setup = txx9spi_setup; 415 master->setup = txx9spi_setup;
419 master->transfer = txx9spi_transfer; 416 master->transfer = txx9spi_transfer;
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 494d3f756e29..46b8c5c2f45e 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -158,9 +158,6 @@ static int xilinx_spi_setup_transfer(struct spi_device *spi,
158 return 0; 158 return 0;
159} 159}
160 160
161/* the spi->mode bits understood by this driver: */
162#define MODEBITS (SPI_CPOL | SPI_CPHA)
163
164static int xilinx_spi_setup(struct spi_device *spi) 161static int xilinx_spi_setup(struct spi_device *spi)
165{ 162{
166 struct spi_bitbang *bitbang; 163 struct spi_bitbang *bitbang;
@@ -170,22 +167,10 @@ static int xilinx_spi_setup(struct spi_device *spi)
170 xspi = spi_master_get_devdata(spi->master); 167 xspi = spi_master_get_devdata(spi->master);
171 bitbang = &xspi->bitbang; 168 bitbang = &xspi->bitbang;
172 169
173 if (!spi->bits_per_word)
174 spi->bits_per_word = 8;
175
176 if (spi->mode & ~MODEBITS) {
177 dev_err(&spi->dev, "%s, unsupported mode bits %x\n",
178 __func__, spi->mode & ~MODEBITS);
179 return -EINVAL;
180 }
181
182 retval = xilinx_spi_setup_transfer(spi, NULL); 170 retval = xilinx_spi_setup_transfer(spi, NULL);
183 if (retval < 0) 171 if (retval < 0)
184 return retval; 172 return retval;
185 173
186 dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n",
187 __func__, spi->mode & MODEBITS, spi->bits_per_word, 0);
188
189 return 0; 174 return 0;
190} 175}
191 176
@@ -333,6 +318,9 @@ static int __init xilinx_spi_of_probe(struct of_device *ofdev,
333 goto put_master; 318 goto put_master;
334 } 319 }
335 320
321 /* the spi->mode bits understood by this driver: */
322 master->mode_bits = SPI_CPOL | SPI_CPHA;
323
336 xspi = spi_master_get_devdata(master); 324 xspi = spi_master_get_devdata(master);
337 xspi->bitbang.master = spi_master_get(master); 325 xspi->bitbang.master = spi_master_get(master);
338 xspi->bitbang.chipselect = xilinx_spi_chipselect; 326 xspi->bitbang.chipselect = xilinx_spi_chipselect;
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index eecd2a0680a2..93f7035d00a1 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -77,7 +77,7 @@ static const struct hc_driver ps3_ehci_hc_driver = {
77 .port_handed_over = ehci_port_handed_over, 77 .port_handed_over = ehci_port_handed_over,
78}; 78};
79 79
80static int ps3_ehci_probe(struct ps3_system_bus_device *dev) 80static int __devinit ps3_ehci_probe(struct ps3_system_bus_device *dev)
81{ 81{
82 int result; 82 int result;
83 struct usb_hcd *hcd; 83 struct usb_hcd *hcd;
@@ -225,7 +225,7 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev)
225 return 0; 225 return 0;
226} 226}
227 227
228static int ps3_ehci_driver_register(struct ps3_system_bus_driver *drv) 228static int __init ps3_ehci_driver_register(struct ps3_system_bus_driver *drv)
229{ 229{
230 return firmware_has_feature(FW_FEATURE_PS3_LV1) 230 return firmware_has_feature(FW_FEATURE_PS3_LV1)
231 ? ps3_system_bus_driver_register(drv) 231 ? ps3_system_bus_driver_register(drv)
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index 1d56259c5db1..700950455f4d 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -75,7 +75,7 @@ static const struct hc_driver ps3_ohci_hc_driver = {
75#endif 75#endif
76}; 76};
77 77
78static int ps3_ohci_probe(struct ps3_system_bus_device *dev) 78static int __devinit ps3_ohci_probe(struct ps3_system_bus_device *dev)
79{ 79{
80 int result; 80 int result;
81 struct usb_hcd *hcd; 81 struct usb_hcd *hcd;
@@ -224,7 +224,7 @@ static int ps3_ohci_remove(struct ps3_system_bus_device *dev)
224 return 0; 224 return 0;
225} 225}
226 226
227static int ps3_ohci_driver_register(struct ps3_system_bus_driver *drv) 227static int __init ps3_ohci_driver_register(struct ps3_system_bus_driver *drv)
228{ 228{
229 return firmware_has_feature(FW_FEATURE_PS3_LV1) 229 return firmware_has_feature(FW_FEATURE_PS3_LV1)
230 ? ps3_system_bus_driver_register(drv) 230 ? ps3_system_bus_driver_register(drv)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 932ffdbf86d9..d6d65ef85f54 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1122,12 +1122,14 @@ config FB_INTEL
1122 select FB_CFB_FILLRECT 1122 select FB_CFB_FILLRECT
1123 select FB_CFB_COPYAREA 1123 select FB_CFB_COPYAREA
1124 select FB_CFB_IMAGEBLIT 1124 select FB_CFB_IMAGEBLIT
1125 select FB_BOOT_VESA_SUPPORT 1125 select FB_BOOT_VESA_SUPPORT if FB_INTEL = y
1126 help 1126 help
1127 This driver supports the on-board graphics built in to the Intel 1127 This driver supports the on-board graphics built in to the Intel
1128 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets. 1128 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets.
1129 Say Y if you have and plan to use such a board. 1129 Say Y if you have and plan to use such a board.
1130 1130
1131 To make FB_INTELFB=Y work you need to say AGP_INTEL=y too.
1132
1131 To compile this driver as a module, choose M here: the 1133 To compile this driver as a module, choose M here: the
1132 module will be called intelfb. 1134 module will be called intelfb.
1133 1135
@@ -1460,7 +1462,7 @@ config FB_SIS
1460 select FB_CFB_FILLRECT 1462 select FB_CFB_FILLRECT
1461 select FB_CFB_COPYAREA 1463 select FB_CFB_COPYAREA
1462 select FB_CFB_IMAGEBLIT 1464 select FB_CFB_IMAGEBLIT
1463 select FB_BOOT_VESA_SUPPORT 1465 select FB_BOOT_VESA_SUPPORT if FB_SIS = y
1464 help 1466 help
1465 This is the frame buffer device driver for the SiS 300, 315, 330 1467 This is the frame buffer device driver for the SiS 300, 315, 330
1466 and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. 1468 and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets.
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 7a868bd16e0e..ed7c8d0ddccb 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -124,7 +124,6 @@ struct xilinxfb_drvdata {
124 registers */ 124 registers */
125 125
126 dcr_host_t dcr_host; 126 dcr_host_t dcr_host;
127 unsigned int dcr_start;
128 unsigned int dcr_len; 127 unsigned int dcr_len;
129 128
130 void *fb_virt; /* virt. address of the frame buffer */ 129 void *fb_virt; /* virt. address of the frame buffer */
@@ -325,8 +324,8 @@ static int xilinxfb_assign(struct device *dev,
325 drvdata->regs); 324 drvdata->regs);
326 } 325 }
327 /* Put a banner in the log (for DEBUG) */ 326 /* Put a banner in the log (for DEBUG) */
328 dev_dbg(dev, "fb: phys=%p, virt=%p, size=%x\n", 327 dev_dbg(dev, "fb: phys=%llx, virt=%p, size=%x\n",
329 (void *)drvdata->fb_phys, drvdata->fb_virt, fbsize); 328 (unsigned long long)drvdata->fb_phys, drvdata->fb_virt, fbsize);
330 329
331 return 0; /* success */ 330 return 0; /* success */
332 331
@@ -404,9 +403,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
404 u32 tft_access; 403 u32 tft_access;
405 struct xilinxfb_platform_data pdata; 404 struct xilinxfb_platform_data pdata;
406 struct resource res; 405 struct resource res;
407 int size, rc; 406 int size, rc, start;
408 int start = 0, len = 0;
409 dcr_host_t dcr_host;
410 struct xilinxfb_drvdata *drvdata; 407 struct xilinxfb_drvdata *drvdata;
411 408
412 /* Copy with the default pdata (not a ptr reference!) */ 409 /* Copy with the default pdata (not a ptr reference!) */
@@ -414,35 +411,39 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
414 411
415 dev_dbg(&op->dev, "xilinxfb_of_probe(%p, %p)\n", op, match); 412 dev_dbg(&op->dev, "xilinxfb_of_probe(%p, %p)\n", op, match);
416 413
414 /* Allocate the driver data region */
415 drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
416 if (!drvdata) {
417 dev_err(&op->dev, "Couldn't allocate device private record\n");
418 return -ENOMEM;
419 }
420
417 /* 421 /*
418 * To check whether the core is connected directly to DCR or PLB 422 * To check whether the core is connected directly to DCR or PLB
419 * interface and initialize the tft_access accordingly. 423 * interface and initialize the tft_access accordingly.
420 */ 424 */
421 p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL); 425 p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL);
422 426 tft_access = p ? *p : 0;
423 if (p)
424 tft_access = *p;
425 else
426 tft_access = 0; /* For backward compatibility */
427 427
428 /* 428 /*
429 * Fill the resource structure if its direct PLB interface 429 * Fill the resource structure if its direct PLB interface
430 * otherwise fill the dcr_host structure. 430 * otherwise fill the dcr_host structure.
431 */ 431 */
432 if (tft_access) { 432 if (tft_access) {
433 drvdata->flags |= PLB_ACCESS_FLAG;
433 rc = of_address_to_resource(op->node, 0, &res); 434 rc = of_address_to_resource(op->node, 0, &res);
434 if (rc) { 435 if (rc) {
435 dev_err(&op->dev, "invalid address\n"); 436 dev_err(&op->dev, "invalid address\n");
436 return -ENODEV; 437 goto err;
437 } 438 }
438
439 } else { 439 } else {
440 res.start = 0;
440 start = dcr_resource_start(op->node, 0); 441 start = dcr_resource_start(op->node, 0);
441 len = dcr_resource_len(op->node, 0); 442 drvdata->dcr_len = dcr_resource_len(op->node, 0);
442 dcr_host = dcr_map(op->node, start, len); 443 drvdata->dcr_host = dcr_map(op->node, start, drvdata->dcr_len);
443 if (!DCR_MAP_OK(dcr_host)) { 444 if (!DCR_MAP_OK(drvdata->dcr_host)) {
444 dev_err(&op->dev, "invalid address\n"); 445 dev_err(&op->dev, "invalid DCR address\n");
445 return -ENODEV; 446 goto err;
446 } 447 }
447 } 448 }
448 449
@@ -467,26 +468,12 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
467 if (of_find_property(op->node, "rotate-display", NULL)) 468 if (of_find_property(op->node, "rotate-display", NULL))
468 pdata.rotate_screen = 1; 469 pdata.rotate_screen = 1;
469 470
470 /* Allocate the driver data region */
471 drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
472 if (!drvdata) {
473 dev_err(&op->dev, "Couldn't allocate device private record\n");
474 return -ENOMEM;
475 }
476 dev_set_drvdata(&op->dev, drvdata); 471 dev_set_drvdata(&op->dev, drvdata);
472 return xilinxfb_assign(&op->dev, drvdata, res.start, &pdata);
477 473
478 if (tft_access) 474 err:
479 drvdata->flags |= PLB_ACCESS_FLAG; 475 kfree(drvdata);
480 476 return -ENODEV;
481 /* Arguments are passed based on the interface */
482 if (drvdata->flags & PLB_ACCESS_FLAG) {
483 return xilinxfb_assign(&op->dev, drvdata, res.start, &pdata);
484 } else {
485 drvdata->dcr_start = start;
486 drvdata->dcr_len = len;
487 drvdata->dcr_host = dcr_host;
488 return xilinxfb_assign(&op->dev, drvdata, 0, &pdata);
489 }
490} 477}
491 478
492static int __devexit xilinxfb_of_remove(struct of_device *op) 479static int __devexit xilinxfb_of_remove(struct of_device *op)
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index a411702413d6..6f8866d6a905 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -74,6 +74,9 @@ static int __init w1_gpio_probe(struct platform_device *pdev)
74 if (err) 74 if (err)
75 goto free_gpio; 75 goto free_gpio;
76 76
77 if (pdata->enable_external_pullup)
78 pdata->enable_external_pullup(1);
79
77 platform_set_drvdata(pdev, master); 80 platform_set_drvdata(pdev, master);
78 81
79 return 0; 82 return 0;
@@ -91,6 +94,9 @@ static int __exit w1_gpio_remove(struct platform_device *pdev)
91 struct w1_bus_master *master = platform_get_drvdata(pdev); 94 struct w1_bus_master *master = platform_get_drvdata(pdev);
92 struct w1_gpio_platform_data *pdata = pdev->dev.platform_data; 95 struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
93 96
97 if (pdata->enable_external_pullup)
98 pdata->enable_external_pullup(0);
99
94 w1_remove_master_device(master); 100 w1_remove_master_device(master);
95 gpio_free(pdata->pin); 101 gpio_free(pdata->pin);
96 kfree(master); 102 kfree(master);
@@ -98,12 +104,41 @@ static int __exit w1_gpio_remove(struct platform_device *pdev)
98 return 0; 104 return 0;
99} 105}
100 106
107#ifdef CONFIG_PM
108
109static int w1_gpio_suspend(struct platform_device *pdev, pm_message_t state)
110{
111 struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
112
113 if (pdata->enable_external_pullup)
114 pdata->enable_external_pullup(0);
115
116 return 0;
117}
118
119static int w1_gpio_resume(struct platform_device *pdev)
120{
121 struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
122
123 if (pdata->enable_external_pullup)
124 pdata->enable_external_pullup(1);
125
126 return 0;
127}
128
129#else
130#define w1_gpio_suspend NULL
131#define w1_gpio_resume NULL
132#endif
133
101static struct platform_driver w1_gpio_driver = { 134static struct platform_driver w1_gpio_driver = {
102 .driver = { 135 .driver = {
103 .name = "w1-gpio", 136 .name = "w1-gpio",
104 .owner = THIS_MODULE, 137 .owner = THIS_MODULE,
105 }, 138 },
106 .remove = __exit_p(w1_gpio_remove), 139 .remove = __exit_p(w1_gpio_remove),
140 .suspend = w1_gpio_suspend,
141 .resume = w1_gpio_resume,
107}; 142};
108 143
109static int __init w1_gpio_init(void) 144static int __init w1_gpio_init(void)
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 90f98df5f106..f90afdb1b255 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -322,7 +322,8 @@ static int wdt_notify_sys(struct notifier_block *this,
322 * watchdog on reboot with no heartbeat 322 * watchdog on reboot with no heartbeat
323 */ 323 */
324 wdt_change(WDT_ENABLE); 324 wdt_change(WDT_ENABLE);
325 printk(KERN_INFO PFX "Watchdog timer is now enabled with no heartbeat - should reboot in ~1 second.\n"); 325 printk(KERN_INFO PFX "Watchdog timer is now enabled "
326 "with no heartbeat - should reboot in ~1 second.\n");
326 } 327 }
327 return NOTIFY_DONE; 328 return NOTIFY_DONE;
328} 329}
@@ -374,12 +375,17 @@ static int __init alim7101_wdt_init(void)
374 pci_dev_put(ali1543_south); 375 pci_dev_put(ali1543_south);
375 if ((tmp & 0x1e) == 0x00) { 376 if ((tmp & 0x1e) == 0x00) {
376 if (!use_gpio) { 377 if (!use_gpio) {
377 printk(KERN_INFO PFX "Detected old alim7101 revision 'a1d'. If this is a cobalt board, set the 'use_gpio' module parameter.\n"); 378 printk(KERN_INFO PFX
379 "Detected old alim7101 revision 'a1d'. "
380 "If this is a cobalt board, set the 'use_gpio' "
381 "module parameter.\n");
378 goto err_out; 382 goto err_out;
379 } 383 }
380 nowayout = 1; 384 nowayout = 1;
381 } else if ((tmp & 0x1e) != 0x12 && (tmp & 0x1e) != 0x00) { 385 } else if ((tmp & 0x1e) != 0x12 && (tmp & 0x1e) != 0x00) {
382 printk(KERN_INFO PFX "ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set\n"); 386 printk(KERN_INFO PFX
387 "ALi 1543 South-Bridge does not have the correct "
388 "revision number (???1001?) - WDT not set\n");
383 goto err_out; 389 goto err_out;
384 } 390 }
385 391
@@ -409,7 +415,8 @@ static int __init alim7101_wdt_init(void)
409 if (nowayout) 415 if (nowayout)
410 __module_get(THIS_MODULE); 416 __module_get(THIS_MODULE);
411 417
412 printk(KERN_INFO PFX "WDT driver for ALi M7101 initialised. timeout=%d sec (nowayout=%d)\n", 418 printk(KERN_INFO PFX "WDT driver for ALi M7101 initialised. "
419 "timeout=%d sec (nowayout=%d)\n",
413 timeout, nowayout); 420 timeout, nowayout);
414 return 0; 421 return 0;
415 422
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c
index 55dcbfe2bb72..3fe9742c23ca 100644
--- a/drivers/watchdog/ar7_wdt.c
+++ b/drivers/watchdog/ar7_wdt.c
@@ -246,7 +246,8 @@ static long ar7_wdt_ioctl(struct file *file,
246 static struct watchdog_info ident = { 246 static struct watchdog_info ident = {
247 .identity = LONGNAME, 247 .identity = LONGNAME,
248 .firmware_version = 1, 248 .firmware_version = 1,
249 .options = (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING), 249 .options = (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
250 WDIOF_MAGICCLOSE),
250 }; 251 };
251 int new_margin; 252 int new_margin;
252 253
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index 29e52c237a3b..b185dafe1494 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -268,7 +268,8 @@ static int __init at91_wdt_init(void)
268 if not reset to the default */ 268 if not reset to the default */
269 if (at91_wdt_settimeout(wdt_time)) { 269 if (at91_wdt_settimeout(wdt_time)) {
270 at91_wdt_settimeout(WDT_DEFAULT_TIME); 270 at91_wdt_settimeout(WDT_DEFAULT_TIME);
271 pr_info("at91_wdt: wdt_time value must be 1 <= wdt_time <= 256, using %d\n", wdt_time); 271 pr_info("at91_wdt: wdt_time value must be 1 <= wdt_time <= 256"
272 ", using %d\n", wdt_time);
272 } 273 }
273 274
274 return platform_driver_register(&at91wdt_driver); 275 return platform_driver_register(&at91wdt_driver);
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 435b0573fb0a..eac26021e8da 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -156,7 +156,8 @@ static int at91_wdt_settimeout(unsigned int timeout)
156 156
157static const struct watchdog_info at91_wdt_info = { 157static const struct watchdog_info at91_wdt_info = {
158 .identity = DRV_NAME, 158 .identity = DRV_NAME,
159 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, 159 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
160 WDIOF_MAGICCLOSE,
160}; 161};
161 162
162/* 163/*
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c
index 067a57cb3f82..c7b3f9df2317 100644
--- a/drivers/watchdog/bfin_wdt.c
+++ b/drivers/watchdog/bfin_wdt.c
@@ -27,10 +27,15 @@
27#include <linux/uaccess.h> 27#include <linux/uaccess.h>
28#include <asm/blackfin.h> 28#include <asm/blackfin.h>
29 29
30#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) 30#define stamp(fmt, args...) \
31 pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)
31#define stampit() stamp("here i am") 32#define stampit() stamp("here i am")
32#define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) 33#define pr_devinit(fmt, args...) \
33#define pr_init(fmt, args...) ({ static const __initconst char __fmt[] = fmt; printk(__fmt, ## args); }) 34 ({ static const __devinitconst char __fmt[] = fmt; \
35 printk(__fmt, ## args); })
36#define pr_init(fmt, args...) \
37 ({ static const __initconst char __fmt[] = fmt; \
38 printk(__fmt, ## args); })
34 39
35#define WATCHDOG_NAME "bfin-wdt" 40#define WATCHDOG_NAME "bfin-wdt"
36#define PFX WATCHDOG_NAME ": " 41#define PFX WATCHDOG_NAME ": "
@@ -476,7 +481,8 @@ static int __init bfin_wdt_init(void)
476 return ret; 481 return ret;
477 } 482 }
478 483
479 bfin_wdt_device = platform_device_register_simple(WATCHDOG_NAME, -1, NULL, 0); 484 bfin_wdt_device = platform_device_register_simple(WATCHDOG_NAME,
485 -1, NULL, 0);
480 if (IS_ERR(bfin_wdt_device)) { 486 if (IS_ERR(bfin_wdt_device)) {
481 pr_init(KERN_ERR PFX "unable to register device\n"); 487 pr_init(KERN_ERR PFX "unable to register device\n");
482 platform_driver_unregister(&bfin_wdt_driver); 488 platform_driver_unregister(&bfin_wdt_driver);
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 41070e4771a0..081f2955419e 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -154,9 +154,9 @@ static struct cpwd *cpwd_device;
154 154
155static struct timer_list cpwd_timer; 155static struct timer_list cpwd_timer;
156 156
157static int wd0_timeout = 0; 157static int wd0_timeout;
158static int wd1_timeout = 0; 158static int wd1_timeout;
159static int wd2_timeout = 0; 159static int wd2_timeout;
160 160
161module_param(wd0_timeout, int, 0); 161module_param(wd0_timeout, int, 0);
162MODULE_PARM_DESC(wd0_timeout, "Default watchdog0 timeout in 1/10secs"); 162MODULE_PARM_DESC(wd0_timeout, "Default watchdog0 timeout in 1/10secs");
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index c51d0b0ea0c4..83e22e7ea4a2 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -193,7 +193,7 @@ static struct miscdevice davinci_wdt_miscdev = {
193 .fops = &davinci_wdt_fops, 193 .fops = &davinci_wdt_fops,
194}; 194};
195 195
196static int davinci_wdt_probe(struct platform_device *pdev) 196static int __devinit davinci_wdt_probe(struct platform_device *pdev)
197{ 197{
198 int ret = 0, size; 198 int ret = 0, size;
199 struct resource *res; 199 struct resource *res;
@@ -237,7 +237,7 @@ static int davinci_wdt_probe(struct platform_device *pdev)
237 return ret; 237 return ret;
238} 238}
239 239
240static int davinci_wdt_remove(struct platform_device *pdev) 240static int __devexit davinci_wdt_remove(struct platform_device *pdev)
241{ 241{
242 misc_deregister(&davinci_wdt_miscdev); 242 misc_deregister(&davinci_wdt_miscdev);
243 if (wdt_mem) { 243 if (wdt_mem) {
@@ -254,7 +254,7 @@ static struct platform_driver platform_wdt_driver = {
254 .owner = THIS_MODULE, 254 .owner = THIS_MODULE,
255 }, 255 },
256 .probe = davinci_wdt_probe, 256 .probe = davinci_wdt_probe,
257 .remove = davinci_wdt_remove, 257 .remove = __devexit_p(davinci_wdt_remove),
258}; 258};
259 259
260static int __init davinci_wdt_init(void) 260static int __init davinci_wdt_init(void)
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 3137361ccbfe..c0b9169ba5d5 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -19,6 +19,7 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/nmi.h>
22#include <linux/kernel.h> 23#include <linux/kernel.h>
23#include <linux/miscdevice.h> 24#include <linux/miscdevice.h>
24#include <linux/mm.h> 25#include <linux/mm.h>
@@ -47,7 +48,7 @@
47#define PCI_BIOS32_PARAGRAPH_LEN 16 48#define PCI_BIOS32_PARAGRAPH_LEN 16
48#define PCI_ROM_BASE1 0x000F0000 49#define PCI_ROM_BASE1 0x000F0000
49#define ROM_SIZE 0x10000 50#define ROM_SIZE 0x10000
50#define HPWDT_VERSION "1.01" 51#define HPWDT_VERSION "1.1.1"
51 52
52struct bios32_service_dir { 53struct bios32_service_dir {
53 u32 signature; 54 u32 signature;
@@ -119,6 +120,7 @@ static int nowayout = WATCHDOG_NOWAYOUT;
119static char expect_release; 120static char expect_release;
120static unsigned long hpwdt_is_open; 121static unsigned long hpwdt_is_open;
121static unsigned int allow_kdump; 122static unsigned int allow_kdump;
123static int hpwdt_nmi_sourcing;
122 124
123static void __iomem *pci_mem_addr; /* the PCI-memory address */ 125static void __iomem *pci_mem_addr; /* the PCI-memory address */
124static unsigned long __iomem *hpwdt_timer_reg; 126static unsigned long __iomem *hpwdt_timer_reg;
@@ -468,21 +470,22 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
468 if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) 470 if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI)
469 return NOTIFY_OK; 471 return NOTIFY_OK;
470 472
471 spin_lock_irqsave(&rom_lock, rom_pl); 473 if (hpwdt_nmi_sourcing) {
472 if (!die_nmi_called) 474 spin_lock_irqsave(&rom_lock, rom_pl);
473 asminline_call(&cmn_regs, cru_rom_addr); 475 if (!die_nmi_called)
474 die_nmi_called = 1; 476 asminline_call(&cmn_regs, cru_rom_addr);
475 spin_unlock_irqrestore(&rom_lock, rom_pl); 477 die_nmi_called = 1;
476 if (cmn_regs.u1.ral == 0) { 478 spin_unlock_irqrestore(&rom_lock, rom_pl);
477 printk(KERN_WARNING "hpwdt: An NMI occurred, " 479 if (cmn_regs.u1.ral == 0) {
478 "but unable to determine source.\n"); 480 printk(KERN_WARNING "hpwdt: An NMI occurred, "
479 } else { 481 "but unable to determine source.\n");
480 if (allow_kdump) 482 } else {
481 hpwdt_stop(); 483 if (allow_kdump)
482 panic("An NMI occurred, please see the Integrated " 484 hpwdt_stop();
483 "Management Log for details.\n"); 485 panic("An NMI occurred, please see the Integrated "
486 "Management Log for details.\n");
487 }
484 } 488 }
485
486 return NOTIFY_OK; 489 return NOTIFY_OK;
487} 490}
488 491
@@ -627,12 +630,38 @@ static struct notifier_block die_notifier = {
627 * Init & Exit 630 * Init & Exit
628 */ 631 */
629 632
633#ifdef ARCH_HAS_NMI_WATCHDOG
634static void __devinit hpwdt_check_nmi_sourcing(struct pci_dev *dev)
635{
636 /*
637 * If nmi_watchdog is turned off then we can turn on
638 * our nmi sourcing capability.
639 */
640 if (!nmi_watchdog_active())
641 hpwdt_nmi_sourcing = 1;
642 else
643 dev_warn(&dev->dev, "NMI sourcing is disabled. To enable this "
644 "functionality you must reboot with nmi_watchdog=0.\n");
645}
646#else
647static void __devinit hpwdt_check_nmi_sourcing(struct pci_dev *dev)
648{
649 dev_warn(&dev->dev, "NMI sourcing is disabled. "
650 "Your kernel does not support a NMI Watchdog.\n");
651}
652#endif
653
630static int __devinit hpwdt_init_one(struct pci_dev *dev, 654static int __devinit hpwdt_init_one(struct pci_dev *dev,
631 const struct pci_device_id *ent) 655 const struct pci_device_id *ent)
632{ 656{
633 int retval; 657 int retval;
634 658
635 /* 659 /*
660 * Check if we can do NMI sourcing or not
661 */
662 hpwdt_check_nmi_sourcing(dev);
663
664 /*
636 * First let's find out if we are on an iLO2 server. We will 665 * First let's find out if we are on an iLO2 server. We will
637 * not run on a legacy ASM box. 666 * not run on a legacy ASM box.
638 * So we only support the G5 ProLiant servers and higher. 667 * So we only support the G5 ProLiant servers and higher.
diff --git a/drivers/watchdog/iTCO_vendor_support.c b/drivers/watchdog/iTCO_vendor_support.c
index d3c0f6de5523..5133bca5ccbe 100644
--- a/drivers/watchdog/iTCO_vendor_support.c
+++ b/drivers/watchdog/iTCO_vendor_support.c
@@ -19,7 +19,7 @@
19 19
20/* Module and version information */ 20/* Module and version information */
21#define DRV_NAME "iTCO_vendor_support" 21#define DRV_NAME "iTCO_vendor_support"
22#define DRV_VERSION "1.03" 22#define DRV_VERSION "1.04"
23#define PFX DRV_NAME ": " 23#define PFX DRV_NAME ": "
24 24
25/* Includes */ 25/* Includes */
@@ -35,20 +35,23 @@
35#include "iTCO_vendor.h" 35#include "iTCO_vendor.h"
36 36
37/* iTCO defines */ 37/* iTCO defines */
38#define SMI_EN acpibase + 0x30 /* SMI Control and Enable Register */ 38#define SMI_EN (acpibase + 0x30) /* SMI Control and Enable Register */
39#define TCOBASE acpibase + 0x60 /* TCO base address */ 39#define TCOBASE (acpibase + 0x60) /* TCO base address */
40#define TCO1_STS TCOBASE + 0x04 /* TCO1 Status Register */ 40#define TCO1_STS (TCOBASE + 0x04) /* TCO1 Status Register */
41 41
42/* List of vendor support modes */ 42/* List of vendor support modes */
43/* SuperMicro Pentium 3 Era 370SSE+-OEM1/P3TSSE */ 43/* SuperMicro Pentium 3 Era 370SSE+-OEM1/P3TSSE */
44#define SUPERMICRO_OLD_BOARD 1 44#define SUPERMICRO_OLD_BOARD 1
45/* SuperMicro Pentium 4 / Xeon 4 / EMT64T Era Systems */ 45/* SuperMicro Pentium 4 / Xeon 4 / EMT64T Era Systems */
46#define SUPERMICRO_NEW_BOARD 2 46#define SUPERMICRO_NEW_BOARD 2
47/* Broken BIOS */
48#define BROKEN_BIOS 911
47 49
48static int vendorsupport; 50static int vendorsupport;
49module_param(vendorsupport, int, 0); 51module_param(vendorsupport, int, 0);
50MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=" 52MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
51 "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+"); 53 "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+, "
54 "911=Broken SMI BIOS");
52 55
53/* 56/*
54 * Vendor Specific Support 57 * Vendor Specific Support
@@ -243,25 +246,92 @@ static void supermicro_new_pre_set_heartbeat(unsigned int heartbeat)
243} 246}
244 247
245/* 248/*
249 * Vendor Support: 911
250 * Board: Some Intel ICHx based motherboards
251 * iTCO chipset: ICH7+
252 *
253 * Some Intel motherboards have a broken BIOS implementation: i.e.
254 * the SMI handler clear's the TIMEOUT bit in the TC01_STS register
255 * and does not reload the time. Thus the TCO watchdog does not reboot
256 * the system.
257 *
258 * These are the conclusions of Andriy Gapon <avg@icyb.net.ua> after
259 * debugging: the SMI handler is quite simple - it tests value in
260 * TCO1_CNT against 0x800, i.e. checks TCO_TMR_HLT. If the bit is set
261 * the handler goes into an infinite loop, apparently to allow the
262 * second timeout and reboot. Otherwise it simply clears TIMEOUT bit
263 * in TCO1_STS and that's it.
264 * So the logic seems to be reversed, because it is hard to see how
265 * TIMEOUT can get set to 1 and SMI generated when TCO_TMR_HLT is set
266 * (other than a transitional effect).
267 *
268 * The only fix found to get the motherboard(s) to reboot is to put
269 * the glb_smi_en bit to 0. This is a dirty hack that bypasses the
270 * broken code by disabling Global SMI.
271 *
272 * WARNING: globally disabling SMI could possibly lead to dramatic
273 * problems, especially on laptops! I.e. various ACPI things where
274 * SMI is used for communication between OS and firmware.
275 *
276 * Don't use this fix if you don't need to!!!
277 */
278
279static void broken_bios_start(unsigned long acpibase)
280{
281 unsigned long val32;
282
283 val32 = inl(SMI_EN);
284 /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI#
285 Bit 0: GBL_SMI_EN -> 0 = No SMI# will be generated by ICH. */
286 val32 &= 0xffffdffe;
287 outl(val32, SMI_EN);
288}
289
290static void broken_bios_stop(unsigned long acpibase)
291{
292 unsigned long val32;
293
294 val32 = inl(SMI_EN);
295 /* Bit 13: TCO_EN -> 1 = Enables TCO logic generating an SMI#
296 Bit 0: GBL_SMI_EN -> 1 = Turn global SMI on again. */
297 val32 |= 0x00002001;
298 outl(val32, SMI_EN);
299}
300
301/*
246 * Generic Support Functions 302 * Generic Support Functions
247 */ 303 */
248 304
249void iTCO_vendor_pre_start(unsigned long acpibase, 305void iTCO_vendor_pre_start(unsigned long acpibase,
250 unsigned int heartbeat) 306 unsigned int heartbeat)
251{ 307{
252 if (vendorsupport == SUPERMICRO_OLD_BOARD) 308 switch (vendorsupport) {
309 case SUPERMICRO_OLD_BOARD:
253 supermicro_old_pre_start(acpibase); 310 supermicro_old_pre_start(acpibase);
254 else if (vendorsupport == SUPERMICRO_NEW_BOARD) 311 break;
312 case SUPERMICRO_NEW_BOARD:
255 supermicro_new_pre_start(heartbeat); 313 supermicro_new_pre_start(heartbeat);
314 break;
315 case BROKEN_BIOS:
316 broken_bios_start(acpibase);
317 break;
318 }
256} 319}
257EXPORT_SYMBOL(iTCO_vendor_pre_start); 320EXPORT_SYMBOL(iTCO_vendor_pre_start);
258 321
259void iTCO_vendor_pre_stop(unsigned long acpibase) 322void iTCO_vendor_pre_stop(unsigned long acpibase)
260{ 323{
261 if (vendorsupport == SUPERMICRO_OLD_BOARD) 324 switch (vendorsupport) {
325 case SUPERMICRO_OLD_BOARD:
262 supermicro_old_pre_stop(acpibase); 326 supermicro_old_pre_stop(acpibase);
263 else if (vendorsupport == SUPERMICRO_NEW_BOARD) 327 break;
328 case SUPERMICRO_NEW_BOARD:
264 supermicro_new_pre_stop(); 329 supermicro_new_pre_stop();
330 break;
331 case BROKEN_BIOS:
332 broken_bios_stop(acpibase);
333 break;
334 }
265} 335}
266EXPORT_SYMBOL(iTCO_vendor_pre_stop); 336EXPORT_SYMBOL(iTCO_vendor_pre_stop);
267 337
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 648250b998c4..6a51edde6ea7 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -236,19 +236,19 @@ MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
236 236
237/* Address definitions for the TCO */ 237/* Address definitions for the TCO */
238/* TCO base address */ 238/* TCO base address */
239#define TCOBASE iTCO_wdt_private.ACPIBASE + 0x60 239#define TCOBASE (iTCO_wdt_private.ACPIBASE + 0x60)
240/* SMI Control and Enable Register */ 240/* SMI Control and Enable Register */
241#define SMI_EN iTCO_wdt_private.ACPIBASE + 0x30 241#define SMI_EN (iTCO_wdt_private.ACPIBASE + 0x30)
242 242
243#define TCO_RLD TCOBASE + 0x00 /* TCO Timer Reload and Curr. Value */ 243#define TCO_RLD (TCOBASE + 0x00) /* TCO Timer Reload and Curr. Value */
244#define TCOv1_TMR TCOBASE + 0x01 /* TCOv1 Timer Initial Value */ 244#define TCOv1_TMR (TCOBASE + 0x01) /* TCOv1 Timer Initial Value */
245#define TCO_DAT_IN TCOBASE + 0x02 /* TCO Data In Register */ 245#define TCO_DAT_IN (TCOBASE + 0x02) /* TCO Data In Register */
246#define TCO_DAT_OUT TCOBASE + 0x03 /* TCO Data Out Register */ 246#define TCO_DAT_OUT (TCOBASE + 0x03) /* TCO Data Out Register */
247#define TCO1_STS TCOBASE + 0x04 /* TCO1 Status Register */ 247#define TCO1_STS (TCOBASE + 0x04) /* TCO1 Status Register */
248#define TCO2_STS TCOBASE + 0x06 /* TCO2 Status Register */ 248#define TCO2_STS (TCOBASE + 0x06) /* TCO2 Status Register */
249#define TCO1_CNT TCOBASE + 0x08 /* TCO1 Control Register */ 249#define TCO1_CNT (TCOBASE + 0x08) /* TCO1 Control Register */
250#define TCO2_CNT TCOBASE + 0x0a /* TCO2 Control Register */ 250#define TCO2_CNT (TCOBASE + 0x0a) /* TCO2 Control Register */
251#define TCOv2_TMR TCOBASE + 0x12 /* TCOv2 Timer Initial Value */ 251#define TCOv2_TMR (TCOBASE + 0x12) /* TCOv2 Timer Initial Value */
252 252
253/* internal variables */ 253/* internal variables */
254static unsigned long is_active; 254static unsigned long is_active;
@@ -666,6 +666,11 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
666 GCS = RCBA + ICH6_GCS(0x3410). */ 666 GCS = RCBA + ICH6_GCS(0x3410). */
667 if (iTCO_wdt_private.iTCO_version == 2) { 667 if (iTCO_wdt_private.iTCO_version == 2) {
668 pci_read_config_dword(pdev, 0xf0, &base_address); 668 pci_read_config_dword(pdev, 0xf0, &base_address);
669 if ((base_address & 1) == 0) {
670 printk(KERN_ERR PFX "RCBA is disabled by harddware\n");
671 ret = -ENODEV;
672 goto out;
673 }
669 RCBA = base_address & 0xffffc000; 674 RCBA = base_address & 0xffffc000;
670 iTCO_wdt_private.gcs = ioremap((RCBA + 0x3410), 4); 675 iTCO_wdt_private.gcs = ioremap((RCBA + 0x3410), 4);
671 } 676 }
@@ -675,7 +680,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
675 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " 680 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, "
676 "reboot disabled by hardware\n"); 681 "reboot disabled by hardware\n");
677 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ 682 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */
678 goto out; 683 goto out_unmap;
679 } 684 }
680 685
681 /* Set the NO_REBOOT bit to prevent later reboots, just for sure */ 686 /* Set the NO_REBOOT bit to prevent later reboots, just for sure */
@@ -686,7 +691,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
686 printk(KERN_ERR PFX 691 printk(KERN_ERR PFX
687 "I/O address 0x%04lx already in use\n", SMI_EN); 692 "I/O address 0x%04lx already in use\n", SMI_EN);
688 ret = -EIO; 693 ret = -EIO;
689 goto out; 694 goto out_unmap;
690 } 695 }
691 /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */ 696 /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */
692 val32 = inl(SMI_EN); 697 val32 = inl(SMI_EN);
@@ -742,9 +747,10 @@ unreg_region:
742 release_region(TCOBASE, 0x20); 747 release_region(TCOBASE, 0x20);
743unreg_smi_en: 748unreg_smi_en:
744 release_region(SMI_EN, 4); 749 release_region(SMI_EN, 4);
745out: 750out_unmap:
746 if (iTCO_wdt_private.iTCO_version == 2) 751 if (iTCO_wdt_private.iTCO_version == 2)
747 iounmap(iTCO_wdt_private.gcs); 752 iounmap(iTCO_wdt_private.gcs);
753out:
748 pci_dev_put(iTCO_wdt_private.pdev); 754 pci_dev_put(iTCO_wdt_private.pdev);
749 iTCO_wdt_private.ACPIBASE = 0; 755 iTCO_wdt_private.ACPIBASE = 0;
750 return ret; 756 return ret;
diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c
index 0f761db9a27c..bea8a124a559 100644
--- a/drivers/watchdog/indydog.c
+++ b/drivers/watchdog/indydog.c
@@ -83,7 +83,6 @@ static int indydog_open(struct inode *inode, struct file *file)
83 indydog_start(); 83 indydog_start();
84 indydog_ping(); 84 indydog_ping();
85 85
86 indydog_alive = 1;
87 printk(KERN_INFO "Started watchdog timer.\n"); 86 printk(KERN_INFO "Started watchdog timer.\n");
88 87
89 return nonseekable_open(inode, file); 88 return nonseekable_open(inode, file);
@@ -113,8 +112,7 @@ static long indydog_ioctl(struct file *file, unsigned int cmd,
113{ 112{
114 int options, retval = -EINVAL; 113 int options, retval = -EINVAL;
115 static struct watchdog_info ident = { 114 static struct watchdog_info ident = {
116 .options = WDIOF_KEEPALIVEPING | 115 .options = WDIOF_KEEPALIVEPING,
117 WDIOF_MAGICCLOSE,
118 .firmware_version = 0, 116 .firmware_version = 0,
119 .identity = "Hardware Watchdog for SGI IP22", 117 .identity = "Hardware Watchdog for SGI IP22",
120 }; 118 };
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
index 2270ee07c01b..daed48ded7fe 100644
--- a/drivers/watchdog/it8712f_wdt.c
+++ b/drivers/watchdog/it8712f_wdt.c
@@ -239,7 +239,8 @@ static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd,
239 static struct watchdog_info ident = { 239 static struct watchdog_info ident = {
240 .identity = "IT8712F Watchdog", 240 .identity = "IT8712F Watchdog",
241 .firmware_version = 1, 241 .firmware_version = 1,
242 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, 242 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
243 WDIOF_MAGICCLOSE,
243 }; 244 };
244 int value; 245 int value;
245 246
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index ae3832110acb..00b03eb43bf0 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -293,8 +293,8 @@ static int __init ks8695_wdt_init(void)
293 if not reset to the default */ 293 if not reset to the default */
294 if (ks8695_wdt_settimeout(wdt_time)) { 294 if (ks8695_wdt_settimeout(wdt_time)) {
295 ks8695_wdt_settimeout(WDT_DEFAULT_TIME); 295 ks8695_wdt_settimeout(WDT_DEFAULT_TIME);
296 pr_info("ks8695_wdt: wdt_time value must be 1 <= wdt_time <= %i, using %d\n", 296 pr_info("ks8695_wdt: wdt_time value must be 1 <= wdt_time <= %i"
297 wdt_time, WDT_MAX_TIME); 297 ", using %d\n", wdt_time, WDT_MAX_TIME);
298 } 298 }
299 return platform_driver_register(&ks8695wdt_driver); 299 return platform_driver_register(&ks8695wdt_driver);
300} 300}
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 2dfc27559bf7..b6b3f59ab446 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -118,7 +118,8 @@ static struct watchdog_info zf_info = {
118 */ 118 */
119static int action; 119static int action;
120module_param(action, int, 0); 120module_param(action, int, 0);
121MODULE_PARM_DESC(action, "after watchdog resets, generate: 0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI"); 121MODULE_PARM_DESC(action, "after watchdog resets, generate: "
122 "0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI");
122 123
123static void zf_ping(unsigned long data); 124static void zf_ping(unsigned long data);
124 125
@@ -142,7 +143,8 @@ static unsigned long next_heartbeat;
142#ifndef ZF_DEBUG 143#ifndef ZF_DEBUG
143# define dprintk(format, args...) 144# define dprintk(format, args...)
144#else 145#else
145# define dprintk(format, args...) printk(KERN_DEBUG PFX ":%s:%d: " format, __func__, __LINE__ , ## args) 146# define dprintk(format, args...) printk(KERN_DEBUG PFX
147 ":%s:%d: " format, __func__, __LINE__ , ## args)
146#endif 148#endif
147 149
148 150
@@ -340,7 +342,8 @@ static int zf_close(struct inode *inode, struct file *file)
340 zf_timer_off(); 342 zf_timer_off();
341 else { 343 else {
342 del_timer(&zf_timer); 344 del_timer(&zf_timer);
343 printk(KERN_ERR PFX ": device file closed unexpectedly. Will not stop the WDT!\n"); 345 printk(KERN_ERR PFX ": device file closed unexpectedly. "
346 "Will not stop the WDT!\n");
344 } 347 }
345 clear_bit(0, &zf_is_open); 348 clear_bit(0, &zf_is_open);
346 zf_expect_close = 0; 349 zf_expect_close = 0;
diff --git a/drivers/watchdog/mpc5200_wdt.c b/drivers/watchdog/mpc5200_wdt.c
index 465fe36adad4..fa9c47ce0ae7 100644
--- a/drivers/watchdog/mpc5200_wdt.c
+++ b/drivers/watchdog/mpc5200_wdt.c
@@ -188,7 +188,7 @@ static int mpc5200_wdt_probe(struct of_device *op,
188 if (!wdt) 188 if (!wdt)
189 return -ENOMEM; 189 return -ENOMEM;
190 190
191 wdt->ipb_freq = mpc52xx_find_ipb_freq(op->node); 191 wdt->ipb_freq = mpc5xxx_get_bus_frequency(op->node);
192 192
193 err = of_address_to_resource(op->node, 0, &wdt->mem); 193 err = of_address_to_resource(op->node, 0, &wdt->mem);
194 if (err) 194 if (err)
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 1512ab8b175b..83fa34b214b4 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -61,7 +61,9 @@ MODULE_PARM_DESC(nowayout,
61#define ONLY_TESTING 0 61#define ONLY_TESTING 0
62static int mpcore_noboot = ONLY_TESTING; 62static int mpcore_noboot = ONLY_TESTING;
63module_param(mpcore_noboot, int, 0); 63module_param(mpcore_noboot, int, 0);
64MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, set to 1 to ignore reboots, 0 to reboot (default=" __MODULE_STRING(ONLY_TESTING) ")"); 64MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, "
65 "set to 1 to ignore reboots, 0 to reboot (default="
66 __MODULE_STRING(ONLY_TESTING) ")");
65 67
66/* 68/*
67 * This is the interrupt handler. Note that we only use this 69 * This is the interrupt handler. Note that we only use this
@@ -416,7 +418,8 @@ static struct platform_driver mpcore_wdt_driver = {
416 }, 418 },
417}; 419};
418 420
419static char banner[] __initdata = KERN_INFO "MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n"; 421static char banner[] __initdata = KERN_INFO "MPcore Watchdog Timer: 0.1. "
422 "mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n";
420 423
421static int __init mpcore_wdt_init(void) 424static int __init mpcore_wdt_init(void)
422{ 425{
diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c
index 539b6f6ba7f1..08e8a6ab74e1 100644
--- a/drivers/watchdog/mtx-1_wdt.c
+++ b/drivers/watchdog/mtx-1_wdt.c
@@ -206,7 +206,7 @@ static struct miscdevice mtx1_wdt_misc = {
206}; 206};
207 207
208 208
209static int mtx1_wdt_probe(struct platform_device *pdev) 209static int __devinit mtx1_wdt_probe(struct platform_device *pdev)
210{ 210{
211 int ret; 211 int ret;
212 212
@@ -229,7 +229,7 @@ static int mtx1_wdt_probe(struct platform_device *pdev)
229 return 0; 229 return 0;
230} 230}
231 231
232static int mtx1_wdt_remove(struct platform_device *pdev) 232static int __devexit mtx1_wdt_remove(struct platform_device *pdev)
233{ 233{
234 /* FIXME: do we need to lock this test ? */ 234 /* FIXME: do we need to lock this test ? */
235 if (mtx1_wdt_device.queue) { 235 if (mtx1_wdt_device.queue) {
@@ -242,7 +242,7 @@ static int mtx1_wdt_remove(struct platform_device *pdev)
242 242
243static struct platform_driver mtx1_wdt = { 243static struct platform_driver mtx1_wdt = {
244 .probe = mtx1_wdt_probe, 244 .probe = mtx1_wdt_probe,
245 .remove = mtx1_wdt_remove, 245 .remove = __devexit_p(mtx1_wdt_remove),
246 .driver.name = "mtx1-wdt", 246 .driver.name = "mtx1-wdt",
247 .driver.owner = THIS_MODULE, 247 .driver.owner = THIS_MODULE,
248}; 248};
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 64135195f827..f24d04132eda 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -246,7 +246,7 @@ static struct miscdevice pnx4008_wdt_miscdev = {
246 .fops = &pnx4008_wdt_fops, 246 .fops = &pnx4008_wdt_fops,
247}; 247};
248 248
249static int pnx4008_wdt_probe(struct platform_device *pdev) 249static int __devinit pnx4008_wdt_probe(struct platform_device *pdev)
250{ 250{
251 int ret = 0, size; 251 int ret = 0, size;
252 struct resource *res; 252 struct resource *res;
@@ -299,7 +299,7 @@ out:
299 return ret; 299 return ret;
300} 300}
301 301
302static int pnx4008_wdt_remove(struct platform_device *pdev) 302static int __devexit pnx4008_wdt_remove(struct platform_device *pdev)
303{ 303{
304 misc_deregister(&pnx4008_wdt_miscdev); 304 misc_deregister(&pnx4008_wdt_miscdev);
305 if (wdt_clk) { 305 if (wdt_clk) {
@@ -321,7 +321,7 @@ static struct platform_driver platform_wdt_driver = {
321 .owner = THIS_MODULE, 321 .owner = THIS_MODULE,
322 }, 322 },
323 .probe = pnx4008_wdt_probe, 323 .probe = pnx4008_wdt_probe,
324 .remove = pnx4008_wdt_remove, 324 .remove = __devexit_p(pnx4008_wdt_remove),
325}; 325};
326 326
327static int __init pnx4008_wdt_init(void) 327static int __init pnx4008_wdt_init(void)
diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c
index 36e221beedcd..4976bfd1fce6 100644
--- a/drivers/watchdog/rdc321x_wdt.c
+++ b/drivers/watchdog/rdc321x_wdt.c
@@ -245,7 +245,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
245 return 0; 245 return 0;
246} 246}
247 247
248static int rdc321x_wdt_remove(struct platform_device *pdev) 248static int __devexit rdc321x_wdt_remove(struct platform_device *pdev)
249{ 249{
250 if (rdc321x_wdt_device.queue) { 250 if (rdc321x_wdt_device.queue) {
251 rdc321x_wdt_device.queue = 0; 251 rdc321x_wdt_device.queue = 0;
@@ -259,7 +259,7 @@ static int rdc321x_wdt_remove(struct platform_device *pdev)
259 259
260static struct platform_driver rdc321x_wdt_driver = { 260static struct platform_driver rdc321x_wdt_driver = {
261 .probe = rdc321x_wdt_probe, 261 .probe = rdc321x_wdt_probe,
262 .remove = rdc321x_wdt_remove, 262 .remove = __devexit_p(rdc321x_wdt_remove),
263 .driver = { 263 .driver = {
264 .owner = THIS_MODULE, 264 .owner = THIS_MODULE,
265 .name = "rdc321x-wdt", 265 .name = "rdc321x-wdt",
diff --git a/drivers/watchdog/rm9k_wdt.c b/drivers/watchdog/rm9k_wdt.c
index cce1982a1b58..2e4442642262 100644
--- a/drivers/watchdog/rm9k_wdt.c
+++ b/drivers/watchdog/rm9k_wdt.c
@@ -345,8 +345,8 @@ static const struct resource *wdt_gpi_get_resource(struct platform_device *pdv,
345 return platform_get_resource_byname(pdv, type, buf); 345 return platform_get_resource_byname(pdv, type, buf);
346} 346}
347 347
348/* No hotplugging on the platform bus - use __init */ 348/* No hotplugging on the platform bus - use __devinit */
349static int __init wdt_gpi_probe(struct platform_device *pdv) 349static int __devinit wdt_gpi_probe(struct platform_device *pdv)
350{ 350{
351 int res; 351 int res;
352 const struct resource 352 const struct resource
@@ -373,7 +373,7 @@ static int __init wdt_gpi_probe(struct platform_device *pdv)
373 return res; 373 return res;
374} 374}
375 375
376static int __exit wdt_gpi_remove(struct platform_device *dev) 376static int __devexit wdt_gpi_remove(struct platform_device *dev)
377{ 377{
378 int res; 378 int res;
379 379
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index e31925ee8346..b57ac6b49147 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -68,15 +68,10 @@ MODULE_PARM_DESC(tmr_atboot,
68 __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT)); 68 __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT));
69MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 69MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
70 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 70 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
71MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)"); 71MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, "
72 "0 to reboot (default depends on ONLY_TESTING)");
72MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)"); 73MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)");
73 74
74
75typedef enum close_state {
76 CLOSE_STATE_NOT,
77 CLOSE_STATE_ALLOW = 0x4021
78} close_state_t;
79
80static unsigned long open_lock; 75static unsigned long open_lock;
81static struct device *wdt_dev; /* platform device attached to */ 76static struct device *wdt_dev; /* platform device attached to */
82static struct resource *wdt_mem; 77static struct resource *wdt_mem;
@@ -84,7 +79,7 @@ static struct resource *wdt_irq;
84static struct clk *wdt_clock; 79static struct clk *wdt_clock;
85static void __iomem *wdt_base; 80static void __iomem *wdt_base;
86static unsigned int wdt_count; 81static unsigned int wdt_count;
87static close_state_t allow_close; 82static char expect_close;
88static DEFINE_SPINLOCK(wdt_lock); 83static DEFINE_SPINLOCK(wdt_lock);
89 84
90/* watchdog control routines */ 85/* watchdog control routines */
@@ -211,7 +206,7 @@ static int s3c2410wdt_open(struct inode *inode, struct file *file)
211 if (nowayout) 206 if (nowayout)
212 __module_get(THIS_MODULE); 207 __module_get(THIS_MODULE);
213 208
214 allow_close = CLOSE_STATE_NOT; 209 expect_close = 0;
215 210
216 /* start the timer */ 211 /* start the timer */
217 s3c2410wdt_start(); 212 s3c2410wdt_start();
@@ -225,13 +220,13 @@ static int s3c2410wdt_release(struct inode *inode, struct file *file)
225 * Lock it in if it's a module and we set nowayout 220 * Lock it in if it's a module and we set nowayout
226 */ 221 */
227 222
228 if (allow_close == CLOSE_STATE_ALLOW) 223 if (expect_close == 42)
229 s3c2410wdt_stop(); 224 s3c2410wdt_stop();
230 else { 225 else {
231 dev_err(wdt_dev, "Unexpected close, not stopping watchdog\n"); 226 dev_err(wdt_dev, "Unexpected close, not stopping watchdog\n");
232 s3c2410wdt_keepalive(); 227 s3c2410wdt_keepalive();
233 } 228 }
234 allow_close = CLOSE_STATE_NOT; 229 expect_close = 0;
235 clear_bit(0, &open_lock); 230 clear_bit(0, &open_lock);
236 return 0; 231 return 0;
237} 232}
@@ -247,7 +242,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data,
247 size_t i; 242 size_t i;
248 243
249 /* In case it was set long ago */ 244 /* In case it was set long ago */
250 allow_close = CLOSE_STATE_NOT; 245 expect_close = 0;
251 246
252 for (i = 0; i != len; i++) { 247 for (i = 0; i != len; i++) {
253 char c; 248 char c;
@@ -255,7 +250,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data,
255 if (get_user(c, data + i)) 250 if (get_user(c, data + i))
256 return -EFAULT; 251 return -EFAULT;
257 if (c == 'V') 252 if (c == 'V')
258 allow_close = CLOSE_STATE_ALLOW; 253 expect_close = 42;
259 } 254 }
260 } 255 }
261 s3c2410wdt_keepalive(); 256 s3c2410wdt_keepalive();
@@ -263,7 +258,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data,
263 return len; 258 return len;
264} 259}
265 260
266#define OPTIONS WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE 261#define OPTIONS (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE)
267 262
268static const struct watchdog_info s3c2410_wdt_ident = { 263static const struct watchdog_info s3c2410_wdt_ident = {
269 .options = OPTIONS, 264 .options = OPTIONS,
@@ -331,7 +326,7 @@ static irqreturn_t s3c2410wdt_irq(int irqno, void *param)
331} 326}
332/* device interface */ 327/* device interface */
333 328
334static int s3c2410wdt_probe(struct platform_device *pdev) 329static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
335{ 330{
336 struct resource *res; 331 struct resource *res;
337 struct device *dev; 332 struct device *dev;
@@ -404,7 +399,8 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
404 "tmr_margin value out of range, default %d used\n", 399 "tmr_margin value out of range, default %d used\n",
405 CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); 400 CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME);
406 else 401 else
407 dev_info(dev, "default timer value is out of range, cannot start\n"); 402 dev_info(dev, "default timer value is out of range, "
403 "cannot start\n");
408 } 404 }
409 405
410 ret = misc_register(&s3c2410wdt_miscdev); 406 ret = misc_register(&s3c2410wdt_miscdev);
@@ -453,7 +449,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
453 return ret; 449 return ret;
454} 450}
455 451
456static int s3c2410wdt_remove(struct platform_device *dev) 452static int __devexit s3c2410wdt_remove(struct platform_device *dev)
457{ 453{
458 release_resource(wdt_mem); 454 release_resource(wdt_mem);
459 kfree(wdt_mem); 455 kfree(wdt_mem);
@@ -515,7 +511,7 @@ static int s3c2410wdt_resume(struct platform_device *dev)
515 511
516static struct platform_driver s3c2410wdt_driver = { 512static struct platform_driver s3c2410wdt_driver = {
517 .probe = s3c2410wdt_probe, 513 .probe = s3c2410wdt_probe,
518 .remove = s3c2410wdt_remove, 514 .remove = __devexit_p(s3c2410wdt_remove),
519 .shutdown = s3c2410wdt_shutdown, 515 .shutdown = s3c2410wdt_shutdown,
520 .suspend = s3c2410wdt_suspend, 516 .suspend = s3c2410wdt_suspend,
521 .resume = s3c2410wdt_resume, 517 .resume = s3c2410wdt_resume,
diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index 38f5831c9291..9748eed73196 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -93,7 +93,7 @@ static int expect_close;
93 93
94static const struct watchdog_info ident = { 94static const struct watchdog_info ident = {
95 .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT | 95 .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT |
96 WDIOF_KEEPALIVEPING, 96 WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
97 .identity = "SiByte Watchdog", 97 .identity = "SiByte Watchdog",
98}; 98};
99 99
@@ -269,9 +269,10 @@ irqreturn_t sbwdog_interrupt(int irq, void *addr)
269 * if it's the second watchdog timer, it's for those users 269 * if it's the second watchdog timer, it's for those users
270 */ 270 */
271 if (wd_cfg_reg == user_dog) 271 if (wd_cfg_reg == user_dog)
272 printk(KERN_CRIT 272 printk(KERN_CRIT "%s in danger of initiating system reset "
273 "%s in danger of initiating system reset in %ld.%01ld seconds\n", 273 "in %ld.%01ld seconds\n",
274 ident.identity, wd_init / 1000000, (wd_init / 100000) % 10); 274 ident.identity,
275 wd_init / 1000000, (wd_init / 100000) % 10);
275 else 276 else
276 cfg |= 1; 277 cfg |= 1;
277 278
diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c
index d1c390c7155c..626d0e8e56c3 100644
--- a/drivers/watchdog/sbc60xxwdt.c
+++ b/drivers/watchdog/sbc60xxwdt.c
@@ -372,8 +372,9 @@ static int __init sbc60xxwdt_init(void)
372 wdt_miscdev.minor, rc); 372 wdt_miscdev.minor, rc);
373 goto err_out_reboot; 373 goto err_out_reboot;
374 } 374 }
375 printk(KERN_INFO PFX "WDT driver for 60XX single board computer initialised. timeout=%d sec (nowayout=%d)\n", 375 printk(KERN_INFO PFX
376 timeout, nowayout); 376 "WDT driver for 60XX single board computer initialised. "
377 "timeout=%d sec (nowayout=%d)\n", timeout, nowayout);
377 378
378 return 0; 379 return 0;
379 380
diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c
index b6e6799ec45d..68e2e2d6f73d 100644
--- a/drivers/watchdog/sbc8360.c
+++ b/drivers/watchdog/sbc8360.c
@@ -280,8 +280,8 @@ static int sbc8360_close(struct inode *inode, struct file *file)
280 if (expect_close == 42) 280 if (expect_close == 42)
281 sbc8360_stop(); 281 sbc8360_stop();
282 else 282 else
283 printk(KERN_CRIT PFX 283 printk(KERN_CRIT PFX "SBC8360 device closed unexpectedly. "
284 "SBC8360 device closed unexpectedly. SBC8360 will not stop!\n"); 284 "SBC8360 will not stop!\n");
285 285
286 clear_bit(0, &sbc8360_is_open); 286 clear_bit(0, &sbc8360_is_open);
287 expect_close = 0; 287 expect_close = 0;
diff --git a/drivers/watchdog/sbc_epx_c3.c b/drivers/watchdog/sbc_epx_c3.c
index e467ddcf796a..28f1214457bd 100644
--- a/drivers/watchdog/sbc_epx_c3.c
+++ b/drivers/watchdog/sbc_epx_c3.c
@@ -107,8 +107,7 @@ static long epx_c3_ioctl(struct file *file, unsigned int cmd,
107 int options, retval = -EINVAL; 107 int options, retval = -EINVAL;
108 int __user *argp = (void __user *)arg; 108 int __user *argp = (void __user *)arg;
109 static const struct watchdog_info ident = { 109 static const struct watchdog_info ident = {
110 .options = WDIOF_KEEPALIVEPING | 110 .options = WDIOF_KEEPALIVEPING,
111 WDIOF_MAGICCLOSE,
112 .firmware_version = 0, 111 .firmware_version = 0,
113 .identity = "Winsystems EPX-C3 H/W Watchdog", 112 .identity = "Winsystems EPX-C3 H/W Watchdog",
114 }; 113 };
@@ -174,8 +173,8 @@ static struct notifier_block epx_c3_notifier = {
174 .notifier_call = epx_c3_notify_sys, 173 .notifier_call = epx_c3_notify_sys,
175}; 174};
176 175
177static const char banner[] __initdata = 176static const char banner[] __initdata = KERN_INFO PFX
178 KERN_INFO PFX "Hardware Watchdog Timer for Winsystems EPX-C3 SBC: 0.1\n"; 177 "Hardware Watchdog Timer for Winsystems EPX-C3 SBC: 0.1\n";
179 178
180static int __init watchdog_init(void) 179static int __init watchdog_init(void)
181{ 180{
@@ -219,6 +218,9 @@ module_init(watchdog_init);
219module_exit(watchdog_exit); 218module_exit(watchdog_exit);
220 219
221MODULE_AUTHOR("Calin A. Culianu <calin@ajvar.org>"); 220MODULE_AUTHOR("Calin A. Culianu <calin@ajvar.org>");
222MODULE_DESCRIPTION("Hardware Watchdog Device for Winsystems EPX-C3 SBC. Note that there is no way to probe for this device -- so only use it if you are *sure* you are runnning on this specific SBC system from Winsystems! It writes to IO ports 0x1ee and 0x1ef!"); 221MODULE_DESCRIPTION("Hardware Watchdog Device for Winsystems EPX-C3 SBC. "
222 "Note that there is no way to probe for this device -- "
223 "so only use it if you are *sure* you are runnning on this specific "
224 "SBC system from Winsystems! It writes to IO ports 0x1ee and 0x1ef!");
223MODULE_LICENSE("GPL"); 225MODULE_LICENSE("GPL");
224MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 226MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
diff --git a/drivers/watchdog/scx200_wdt.c b/drivers/watchdog/scx200_wdt.c
index 9e19a10a5bb9..e67b76c0526c 100644
--- a/drivers/watchdog/scx200_wdt.c
+++ b/drivers/watchdog/scx200_wdt.c
@@ -108,7 +108,9 @@ static int scx200_wdt_open(struct inode *inode, struct file *file)
108static int scx200_wdt_release(struct inode *inode, struct file *file) 108static int scx200_wdt_release(struct inode *inode, struct file *file)
109{ 109{
110 if (expect_close != 42) 110 if (expect_close != 42)
111 printk(KERN_WARNING NAME ": watchdog device closed unexpectedly, will not disable the watchdog timer\n"); 111 printk(KERN_WARNING NAME
112 ": watchdog device closed unexpectedly, "
113 "will not disable the watchdog timer\n");
112 else if (!nowayout) 114 else if (!nowayout)
113 scx200_wdt_disable(); 115 scx200_wdt_disable();
114 expect_close = 0; 116 expect_close = 0;
@@ -163,7 +165,8 @@ static long scx200_wdt_ioctl(struct file *file, unsigned int cmd,
163 static const struct watchdog_info ident = { 165 static const struct watchdog_info ident = {
164 .identity = "NatSemi SCx200 Watchdog", 166 .identity = "NatSemi SCx200 Watchdog",
165 .firmware_version = 1, 167 .firmware_version = 1,
166 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, 168 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
169 WDIOF_MAGICCLOSE,
167 }; 170 };
168 int new_margin; 171 int new_margin;
169 172
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index cdc7138be301..a03f84e5ee1f 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -494,7 +494,9 @@ MODULE_LICENSE("GPL");
494MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 494MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
495 495
496module_param(clock_division_ratio, int, 0); 496module_param(clock_division_ratio, int, 0);
497MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")"); 497MODULE_PARM_DESC(clock_division_ratio,
498 "Clock division ratio. Valid ranges are from 0x5 (1.31ms) "
499 "to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")");
498 500
499module_param(heartbeat, int, 0); 501module_param(heartbeat, int, 0);
500MODULE_PARM_DESC(heartbeat, 502MODULE_PARM_DESC(heartbeat,
diff --git a/drivers/watchdog/softdog.c b/drivers/watchdog/softdog.c
index ebcc9cea5e99..833f49f43d43 100644
--- a/drivers/watchdog/softdog.c
+++ b/drivers/watchdog/softdog.c
@@ -71,7 +71,9 @@ static int soft_noboot = 0;
71#endif /* ONLY_TESTING */ 71#endif /* ONLY_TESTING */
72 72
73module_param(soft_noboot, int, 0); 73module_param(soft_noboot, int, 0);
74MODULE_PARM_DESC(soft_noboot, "Softdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)"); 74MODULE_PARM_DESC(soft_noboot,
75 "Softdog action, set to 1 to ignore reboots, 0 to reboot "
76 "(default depends on ONLY_TESTING)");
75 77
76/* 78/*
77 * Our timer 79 * Our timer
@@ -264,7 +266,8 @@ static struct notifier_block softdog_notifier = {
264 .notifier_call = softdog_notify_sys, 266 .notifier_call = softdog_notify_sys,
265}; 267};
266 268
267static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.07 initialized. soft_noboot=%d soft_margin=%d sec (nowayout= %d)\n"; 269static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.07 "
270 "initialized. soft_noboot=%d soft_margin=%d sec (nowayout= %d)\n";
268 271
269static int __init watchdog_init(void) 272static int __init watchdog_init(void)
270{ 273{
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c
index a9c7f352fcbf..af08972de506 100644
--- a/drivers/watchdog/w83697hf_wdt.c
+++ b/drivers/watchdog/w83697hf_wdt.c
@@ -413,7 +413,8 @@ static int __init wdt_init(void)
413 w83697hf_init(); 413 w83697hf_init();
414 if (early_disable) { 414 if (early_disable) {
415 if (wdt_running()) 415 if (wdt_running())
416 printk(KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n"); 416 printk(KERN_WARNING PFX "Stopping previously enabled "
417 "watchdog until userland kicks in\n");
417 wdt_disable(); 418 wdt_disable();
418 } 419 }
419 420
diff --git a/drivers/watchdog/wdrtas.c b/drivers/watchdog/wdrtas.c
index a38fa4907c92..a4fe7a38d9b0 100644
--- a/drivers/watchdog/wdrtas.c
+++ b/drivers/watchdog/wdrtas.c
@@ -49,12 +49,7 @@ MODULE_LICENSE("GPL");
49MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 49MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
50MODULE_ALIAS_MISCDEV(TEMP_MINOR); 50MODULE_ALIAS_MISCDEV(TEMP_MINOR);
51 51
52#ifdef CONFIG_WATCHDOG_NOWAYOUT 52static int wdrtas_nowayout = WATCHDOG_NOWAYOUT;
53static int wdrtas_nowayout = 1;
54#else
55static int wdrtas_nowayout = 0;
56#endif
57
58static atomic_t wdrtas_miscdev_open = ATOMIC_INIT(0); 53static atomic_t wdrtas_miscdev_open = ATOMIC_INIT(0);
59static char wdrtas_expect_close; 54static char wdrtas_expect_close;
60 55
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 40381df34869..9fa212b014a5 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1340,8 +1340,10 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
1340 prstatus->pr_info.si_signo = prstatus->pr_cursig = signr; 1340 prstatus->pr_info.si_signo = prstatus->pr_cursig = signr;
1341 prstatus->pr_sigpend = p->pending.signal.sig[0]; 1341 prstatus->pr_sigpend = p->pending.signal.sig[0];
1342 prstatus->pr_sighold = p->blocked.sig[0]; 1342 prstatus->pr_sighold = p->blocked.sig[0];
1343 rcu_read_lock();
1344 prstatus->pr_ppid = task_pid_vnr(rcu_dereference(p->real_parent));
1345 rcu_read_unlock();
1343 prstatus->pr_pid = task_pid_vnr(p); 1346 prstatus->pr_pid = task_pid_vnr(p);
1344 prstatus->pr_ppid = task_pid_vnr(p->real_parent);
1345 prstatus->pr_pgrp = task_pgrp_vnr(p); 1347 prstatus->pr_pgrp = task_pgrp_vnr(p);
1346 prstatus->pr_sid = task_session_vnr(p); 1348 prstatus->pr_sid = task_session_vnr(p);
1347 if (thread_group_leader(p)) { 1349 if (thread_group_leader(p)) {
@@ -1382,8 +1384,10 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
1382 psinfo->pr_psargs[i] = ' '; 1384 psinfo->pr_psargs[i] = ' ';
1383 psinfo->pr_psargs[len] = 0; 1385 psinfo->pr_psargs[len] = 0;
1384 1386
1387 rcu_read_lock();
1388 psinfo->pr_ppid = task_pid_vnr(rcu_dereference(p->real_parent));
1389 rcu_read_unlock();
1385 psinfo->pr_pid = task_pid_vnr(p); 1390 psinfo->pr_pid = task_pid_vnr(p);
1386 psinfo->pr_ppid = task_pid_vnr(p->real_parent);
1387 psinfo->pr_pgrp = task_pgrp_vnr(p); 1391 psinfo->pr_pgrp = task_pgrp_vnr(p);
1388 psinfo->pr_sid = task_session_vnr(p); 1392 psinfo->pr_sid = task_session_vnr(p);
1389 1393
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index fdb66faa24f1..20fbeced472b 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1387,8 +1387,10 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
1387 prstatus->pr_info.si_signo = prstatus->pr_cursig = signr; 1387 prstatus->pr_info.si_signo = prstatus->pr_cursig = signr;
1388 prstatus->pr_sigpend = p->pending.signal.sig[0]; 1388 prstatus->pr_sigpend = p->pending.signal.sig[0];
1389 prstatus->pr_sighold = p->blocked.sig[0]; 1389 prstatus->pr_sighold = p->blocked.sig[0];
1390 rcu_read_lock();
1391 prstatus->pr_ppid = task_pid_vnr(rcu_dereference(p->real_parent));
1392 rcu_read_unlock();
1390 prstatus->pr_pid = task_pid_vnr(p); 1393 prstatus->pr_pid = task_pid_vnr(p);
1391 prstatus->pr_ppid = task_pid_vnr(p->real_parent);
1392 prstatus->pr_pgrp = task_pgrp_vnr(p); 1394 prstatus->pr_pgrp = task_pgrp_vnr(p);
1393 prstatus->pr_sid = task_session_vnr(p); 1395 prstatus->pr_sid = task_session_vnr(p);
1394 if (thread_group_leader(p)) { 1396 if (thread_group_leader(p)) {
@@ -1432,8 +1434,10 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
1432 psinfo->pr_psargs[i] = ' '; 1434 psinfo->pr_psargs[i] = ' ';
1433 psinfo->pr_psargs[len] = 0; 1435 psinfo->pr_psargs[len] = 0;
1434 1436
1437 rcu_read_lock();
1438 psinfo->pr_ppid = task_pid_vnr(rcu_dereference(p->real_parent));
1439 rcu_read_unlock();
1435 psinfo->pr_pid = task_pid_vnr(p); 1440 psinfo->pr_pid = task_pid_vnr(p);
1436 psinfo->pr_ppid = task_pid_vnr(p->real_parent);
1437 psinfo->pr_pgrp = task_pgrp_vnr(p); 1441 psinfo->pr_pgrp = task_pgrp_vnr(p);
1438 psinfo->pr_sid = task_session_vnr(p); 1442 psinfo->pr_sid = task_session_vnr(p);
1439 1443
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 5458e80fc558..085c5c063420 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -98,7 +98,7 @@ struct epoll_filefd {
98struct nested_call_node { 98struct nested_call_node {
99 struct list_head llink; 99 struct list_head llink;
100 void *cookie; 100 void *cookie;
101 int cpu; 101 void *ctx;
102}; 102};
103 103
104/* 104/*
@@ -317,17 +317,17 @@ static void ep_nested_calls_init(struct nested_calls *ncalls)
317 * @nproc: Nested call core function pointer. 317 * @nproc: Nested call core function pointer.
318 * @priv: Opaque data to be passed to the @nproc callback. 318 * @priv: Opaque data to be passed to the @nproc callback.
319 * @cookie: Cookie to be used to identify this nested call. 319 * @cookie: Cookie to be used to identify this nested call.
320 * @ctx: This instance context.
320 * 321 *
321 * Returns: Returns the code returned by the @nproc callback, or -1 if 322 * Returns: Returns the code returned by the @nproc callback, or -1 if
322 * the maximum recursion limit has been exceeded. 323 * the maximum recursion limit has been exceeded.
323 */ 324 */
324static int ep_call_nested(struct nested_calls *ncalls, int max_nests, 325static int ep_call_nested(struct nested_calls *ncalls, int max_nests,
325 int (*nproc)(void *, void *, int), void *priv, 326 int (*nproc)(void *, void *, int), void *priv,
326 void *cookie) 327 void *cookie, void *ctx)
327{ 328{
328 int error, call_nests = 0; 329 int error, call_nests = 0;
329 unsigned long flags; 330 unsigned long flags;
330 int this_cpu = get_cpu();
331 struct list_head *lsthead = &ncalls->tasks_call_list; 331 struct list_head *lsthead = &ncalls->tasks_call_list;
332 struct nested_call_node *tncur; 332 struct nested_call_node *tncur;
333 struct nested_call_node tnode; 333 struct nested_call_node tnode;
@@ -340,7 +340,7 @@ static int ep_call_nested(struct nested_calls *ncalls, int max_nests,
340 * very much limited. 340 * very much limited.
341 */ 341 */
342 list_for_each_entry(tncur, lsthead, llink) { 342 list_for_each_entry(tncur, lsthead, llink) {
343 if (tncur->cpu == this_cpu && 343 if (tncur->ctx == ctx &&
344 (tncur->cookie == cookie || ++call_nests > max_nests)) { 344 (tncur->cookie == cookie || ++call_nests > max_nests)) {
345 /* 345 /*
346 * Ops ... loop detected or maximum nest level reached. 346 * Ops ... loop detected or maximum nest level reached.
@@ -352,7 +352,7 @@ static int ep_call_nested(struct nested_calls *ncalls, int max_nests,
352 } 352 }
353 353
354 /* Add the current task and cookie to the list */ 354 /* Add the current task and cookie to the list */
355 tnode.cpu = this_cpu; 355 tnode.ctx = ctx;
356 tnode.cookie = cookie; 356 tnode.cookie = cookie;
357 list_add(&tnode.llink, lsthead); 357 list_add(&tnode.llink, lsthead);
358 358
@@ -364,10 +364,9 @@ static int ep_call_nested(struct nested_calls *ncalls, int max_nests,
364 /* Remove the current task from the list */ 364 /* Remove the current task from the list */
365 spin_lock_irqsave(&ncalls->lock, flags); 365 spin_lock_irqsave(&ncalls->lock, flags);
366 list_del(&tnode.llink); 366 list_del(&tnode.llink);
367 out_unlock: 367out_unlock:
368 spin_unlock_irqrestore(&ncalls->lock, flags); 368 spin_unlock_irqrestore(&ncalls->lock, flags);
369 369
370 put_cpu();
371 return error; 370 return error;
372} 371}
373 372
@@ -408,8 +407,12 @@ static int ep_poll_wakeup_proc(void *priv, void *cookie, int call_nests)
408 */ 407 */
409static void ep_poll_safewake(wait_queue_head_t *wq) 408static void ep_poll_safewake(wait_queue_head_t *wq)
410{ 409{
410 int this_cpu = get_cpu();
411
411 ep_call_nested(&poll_safewake_ncalls, EP_MAX_NESTS, 412 ep_call_nested(&poll_safewake_ncalls, EP_MAX_NESTS,
412 ep_poll_wakeup_proc, NULL, wq); 413 ep_poll_wakeup_proc, NULL, wq, (void *) (long) this_cpu);
414
415 put_cpu();
413} 416}
414 417
415/* 418/*
@@ -663,7 +666,7 @@ static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait)
663 * could re-enter here. 666 * could re-enter here.
664 */ 667 */
665 pollflags = ep_call_nested(&poll_readywalk_ncalls, EP_MAX_NESTS, 668 pollflags = ep_call_nested(&poll_readywalk_ncalls, EP_MAX_NESTS,
666 ep_poll_readyevents_proc, ep, ep); 669 ep_poll_readyevents_proc, ep, ep, current);
667 670
668 return pollflags != -1 ? pollflags : 0; 671 return pollflags != -1 ? pollflags : 0;
669} 672}
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index 003500498c22..6cde970b0a1a 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -450,7 +450,7 @@ ino_t ext2_inode_by_name(struct inode *dir, struct qstr *child)
450 450
451/* Releases the page */ 451/* Releases the page */
452void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, 452void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
453 struct page *page, struct inode *inode) 453 struct page *page, struct inode *inode, int update_times)
454{ 454{
455 loff_t pos = page_offset(page) + 455 loff_t pos = page_offset(page) +
456 (char *) de - (char *) page_address(page); 456 (char *) de - (char *) page_address(page);
@@ -465,7 +465,8 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
465 ext2_set_de_type(de, inode); 465 ext2_set_de_type(de, inode);
466 err = ext2_commit_chunk(page, pos, len); 466 err = ext2_commit_chunk(page, pos, len);
467 ext2_put_page(page); 467 ext2_put_page(page);
468 dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; 468 if (update_times)
469 dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
469 EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL; 470 EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
470 mark_inode_dirty(dir); 471 mark_inode_dirty(dir);
471} 472}
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index f2e5811936d0..d988a718aedb 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -111,7 +111,7 @@ extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct qstr *,
111extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *); 111extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
112extern int ext2_empty_dir (struct inode *); 112extern int ext2_empty_dir (struct inode *);
113extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **); 113extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
114extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *); 114extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *, int);
115 115
116/* ialloc.c */ 116/* ialloc.c */
117extern struct inode * ext2_new_inode (struct inode *, int); 117extern struct inode * ext2_new_inode (struct inode *, int);
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index 90ea17998a73..6524ecaebb7a 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -320,7 +320,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
320 if (!new_de) 320 if (!new_de)
321 goto out_dir; 321 goto out_dir;
322 inode_inc_link_count(old_inode); 322 inode_inc_link_count(old_inode);
323 ext2_set_link(new_dir, new_de, new_page, old_inode); 323 ext2_set_link(new_dir, new_de, new_page, old_inode, 1);
324 new_inode->i_ctime = CURRENT_TIME_SEC; 324 new_inode->i_ctime = CURRENT_TIME_SEC;
325 if (dir_de) 325 if (dir_de)
326 drop_nlink(new_inode); 326 drop_nlink(new_inode);
@@ -352,7 +352,8 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
352 inode_dec_link_count(old_inode); 352 inode_dec_link_count(old_inode);
353 353
354 if (dir_de) { 354 if (dir_de) {
355 ext2_set_link(old_inode, dir_de, dir_page, new_dir); 355 if (old_dir != new_dir)
356 ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0);
356 inode_dec_link_count(old_dir); 357 inode_dec_link_count(old_dir);
357 } 358 }
358 return 0; 359 return 0;
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index b0248c6d5d4c..05dea8132fc0 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -820,7 +820,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
820 while (count < maxblocks && count <= blocks_to_boundary) { 820 while (count < maxblocks && count <= blocks_to_boundary) {
821 ext3_fsblk_t blk; 821 ext3_fsblk_t blk;
822 822
823 if (!verify_chain(chain, partial)) { 823 if (!verify_chain(chain, chain + depth - 1)) {
824 /* 824 /*
825 * Indirect block might be removed by 825 * Indirect block might be removed by
826 * truncate while we were reading it. 826 * truncate while we were reading it.
@@ -2374,7 +2374,7 @@ void ext3_truncate(struct inode *inode)
2374 struct page *page; 2374 struct page *page;
2375 2375
2376 if (!ext3_can_truncate(inode)) 2376 if (!ext3_can_truncate(inode))
2377 return; 2377 goto out_notrans;
2378 2378
2379 if (inode->i_size == 0 && ext3_should_writeback_data(inode)) 2379 if (inode->i_size == 0 && ext3_should_writeback_data(inode))
2380 ei->i_state |= EXT3_STATE_FLUSH_ON_CLOSE; 2380 ei->i_state |= EXT3_STATE_FLUSH_ON_CLOSE;
@@ -2390,7 +2390,7 @@ void ext3_truncate(struct inode *inode)
2390 page = grab_cache_page(mapping, 2390 page = grab_cache_page(mapping,
2391 inode->i_size >> PAGE_CACHE_SHIFT); 2391 inode->i_size >> PAGE_CACHE_SHIFT);
2392 if (!page) 2392 if (!page)
2393 return; 2393 goto out_notrans;
2394 } 2394 }
2395 2395
2396 handle = start_transaction(inode); 2396 handle = start_transaction(inode);
@@ -2401,7 +2401,7 @@ void ext3_truncate(struct inode *inode)
2401 unlock_page(page); 2401 unlock_page(page);
2402 page_cache_release(page); 2402 page_cache_release(page);
2403 } 2403 }
2404 return; /* AKPM: return what? */ 2404 goto out_notrans;
2405 } 2405 }
2406 2406
2407 last_block = (inode->i_size + blocksize-1) 2407 last_block = (inode->i_size + blocksize-1)
@@ -2525,6 +2525,14 @@ out_stop:
2525 ext3_orphan_del(handle, inode); 2525 ext3_orphan_del(handle, inode);
2526 2526
2527 ext3_journal_stop(handle); 2527 ext3_journal_stop(handle);
2528 return;
2529out_notrans:
2530 /*
2531 * Delete the inode from orphan list so that it doesn't stay there
2532 * forever and trigger assertion on umount.
2533 */
2534 if (inode->i_nlink)
2535 ext3_orphan_del(NULL, inode);
2528} 2536}
2529 2537
2530static ext3_fsblk_t ext3_get_inode_block(struct super_block *sb, 2538static ext3_fsblk_t ext3_get_inode_block(struct super_block *sb,
@@ -3122,12 +3130,6 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
3122 3130
3123 rc = inode_setattr(inode, attr); 3131 rc = inode_setattr(inode, attr);
3124 3132
3125 /* If inode_setattr's call to ext3_truncate failed to get a
3126 * transaction handle at all, we need to clean up the in-core
3127 * orphan list manually. */
3128 if (inode->i_nlink)
3129 ext3_orphan_del(NULL, inode);
3130
3131 if (!rc && (ia_valid & ATTR_MODE)) 3133 if (!rc && (ia_valid & ATTR_MODE))
3132 rc = ext3_acl_chmod(inode); 3134 rc = ext3_acl_chmod(inode);
3133 3135
diff --git a/fs/ext4/Makefile b/fs/ext4/Makefile
index 8a34710ecf40..8867b2a1e5fe 100644
--- a/fs/ext4/Makefile
+++ b/fs/ext4/Makefile
@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT4_FS) += ext4.o
6 6
7ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ 7ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
8 ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \ 8 ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
9 ext4_jbd2.o migrate.o mballoc.o block_validity.o 9 ext4_jbd2.o migrate.o mballoc.o block_validity.o move_extent.o
10 10
11ext4-$(CONFIG_EXT4_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o 11ext4-$(CONFIG_EXT4_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
12ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o 12ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index cc7d5edc38c9..17b9998680e3 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -352,6 +352,7 @@ struct ext4_new_group_data {
352 /* note ioctl 10 reserved for an early version of the FIEMAP ioctl */ 352 /* note ioctl 10 reserved for an early version of the FIEMAP ioctl */
353 /* note ioctl 11 reserved for filesystem-independent FIEMAP ioctl */ 353 /* note ioctl 11 reserved for filesystem-independent FIEMAP ioctl */
354#define EXT4_IOC_ALLOC_DA_BLKS _IO('f', 12) 354#define EXT4_IOC_ALLOC_DA_BLKS _IO('f', 12)
355#define EXT4_IOC_MOVE_EXT _IOWR('f', 15, struct move_extent)
355 356
356/* 357/*
357 * ioctl commands in 32 bit emulation 358 * ioctl commands in 32 bit emulation
@@ -447,6 +448,15 @@ struct ext4_inode {
447 __le32 i_version_hi; /* high 32 bits for 64-bit version */ 448 __le32 i_version_hi; /* high 32 bits for 64-bit version */
448}; 449};
449 450
451struct move_extent {
452 __u32 reserved; /* should be zero */
453 __u32 donor_fd; /* donor file descriptor */
454 __u64 orig_start; /* logical start offset in block for orig */
455 __u64 donor_start; /* logical start offset in block for donor */
456 __u64 len; /* block length to be moved */
457 __u64 moved_len; /* moved block length */
458};
459#define MAX_DEFRAG_SIZE ((1UL<<31) - 1)
450 460
451#define EXT4_EPOCH_BITS 2 461#define EXT4_EPOCH_BITS 2
452#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1) 462#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
@@ -674,7 +684,6 @@ struct ext4_inode_info {
674#define EXT4_MOUNT_ERRORS_PANIC 0x00040 /* Panic on errors */ 684#define EXT4_MOUNT_ERRORS_PANIC 0x00040 /* Panic on errors */
675#define EXT4_MOUNT_MINIX_DF 0x00080 /* Mimics the Minix statfs */ 685#define EXT4_MOUNT_MINIX_DF 0x00080 /* Mimics the Minix statfs */
676#define EXT4_MOUNT_NOLOAD 0x00100 /* Don't use existing journal*/ 686#define EXT4_MOUNT_NOLOAD 0x00100 /* Don't use existing journal*/
677#define EXT4_MOUNT_ABORT 0x00200 /* Fatal error detected */
678#define EXT4_MOUNT_DATA_FLAGS 0x00C00 /* Mode for data writes: */ 687#define EXT4_MOUNT_DATA_FLAGS 0x00C00 /* Mode for data writes: */
679#define EXT4_MOUNT_JOURNAL_DATA 0x00400 /* Write data to journal */ 688#define EXT4_MOUNT_JOURNAL_DATA 0x00400 /* Write data to journal */
680#define EXT4_MOUNT_ORDERED_DATA 0x00800 /* Flush data before commit */ 689#define EXT4_MOUNT_ORDERED_DATA 0x00800 /* Flush data before commit */
@@ -696,17 +705,10 @@ struct ext4_inode_info {
696#define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */ 705#define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */
697#define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */ 706#define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */
698 707
699/* Compatibility, for having both ext2_fs.h and ext4_fs.h included at once */
700#ifndef _LINUX_EXT2_FS_H
701#define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt 708#define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt
702#define set_opt(o, opt) o |= EXT4_MOUNT_##opt 709#define set_opt(o, opt) o |= EXT4_MOUNT_##opt
703#define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \ 710#define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \
704 EXT4_MOUNT_##opt) 711 EXT4_MOUNT_##opt)
705#else
706#define EXT2_MOUNT_NOLOAD EXT4_MOUNT_NOLOAD
707#define EXT2_MOUNT_ABORT EXT4_MOUNT_ABORT
708#define EXT2_MOUNT_DATA_FLAGS EXT4_MOUNT_DATA_FLAGS
709#endif
710 712
711#define ext4_set_bit ext2_set_bit 713#define ext4_set_bit ext2_set_bit
712#define ext4_set_bit_atomic ext2_set_bit_atomic 714#define ext4_set_bit_atomic ext2_set_bit_atomic
@@ -824,6 +826,13 @@ struct ext4_super_block {
824}; 826};
825 827
826#ifdef __KERNEL__ 828#ifdef __KERNEL__
829
830/*
831 * run-time mount flags
832 */
833#define EXT4_MF_MNTDIR_SAMPLED 0x0001
834#define EXT4_MF_FS_ABORTED 0x0002 /* Fatal error detected */
835
827/* 836/*
828 * fourth extended-fs super-block data in memory 837 * fourth extended-fs super-block data in memory
829 */ 838 */
@@ -842,7 +851,8 @@ struct ext4_sb_info {
842 struct buffer_head * s_sbh; /* Buffer containing the super block */ 851 struct buffer_head * s_sbh; /* Buffer containing the super block */
843 struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */ 852 struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */
844 struct buffer_head **s_group_desc; 853 struct buffer_head **s_group_desc;
845 unsigned long s_mount_opt; 854 unsigned int s_mount_opt;
855 unsigned int s_mount_flags;
846 ext4_fsblk_t s_sb_block; 856 ext4_fsblk_t s_sb_block;
847 uid_t s_resuid; 857 uid_t s_resuid;
848 gid_t s_resgid; 858 gid_t s_resgid;
@@ -853,6 +863,7 @@ struct ext4_sb_info {
853 int s_inode_size; 863 int s_inode_size;
854 int s_first_ino; 864 int s_first_ino;
855 unsigned int s_inode_readahead_blks; 865 unsigned int s_inode_readahead_blks;
866 unsigned int s_inode_goal;
856 spinlock_t s_next_gen_lock; 867 spinlock_t s_next_gen_lock;
857 u32 s_next_generation; 868 u32 s_next_generation;
858 u32 s_hash_seed[4]; 869 u32 s_hash_seed[4];
@@ -1305,7 +1316,8 @@ extern int ext4fs_dirhash(const char *name, int len, struct
1305 dx_hash_info *hinfo); 1316 dx_hash_info *hinfo);
1306 1317
1307/* ialloc.c */ 1318/* ialloc.c */
1308extern struct inode * ext4_new_inode(handle_t *, struct inode *, int); 1319extern struct inode *ext4_new_inode(handle_t *, struct inode *, int,
1320 const struct qstr *qstr, __u32 goal);
1309extern void ext4_free_inode(handle_t *, struct inode *); 1321extern void ext4_free_inode(handle_t *, struct inode *);
1310extern struct inode * ext4_orphan_get(struct super_block *, unsigned long); 1322extern struct inode * ext4_orphan_get(struct super_block *, unsigned long);
1311extern unsigned long ext4_count_free_inodes(struct super_block *); 1323extern unsigned long ext4_count_free_inodes(struct super_block *);
@@ -1329,7 +1341,7 @@ extern void ext4_discard_preallocations(struct inode *);
1329extern int __init init_ext4_mballoc(void); 1341extern int __init init_ext4_mballoc(void);
1330extern void exit_ext4_mballoc(void); 1342extern void exit_ext4_mballoc(void);
1331extern void ext4_mb_free_blocks(handle_t *, struct inode *, 1343extern void ext4_mb_free_blocks(handle_t *, struct inode *,
1332 unsigned long, unsigned long, int, unsigned long *); 1344 ext4_fsblk_t, unsigned long, int, unsigned long *);
1333extern int ext4_mb_add_groupinfo(struct super_block *sb, 1345extern int ext4_mb_add_groupinfo(struct super_block *sb,
1334 ext4_group_t i, struct ext4_group_desc *desc); 1346 ext4_group_t i, struct ext4_group_desc *desc);
1335extern void ext4_mb_update_group_info(struct ext4_group_info *grp, 1347extern void ext4_mb_update_group_info(struct ext4_group_info *grp,
@@ -1647,6 +1659,11 @@ extern int ext4_get_blocks(handle_t *handle, struct inode *inode,
1647 struct buffer_head *bh, int flags); 1659 struct buffer_head *bh, int flags);
1648extern int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, 1660extern int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
1649 __u64 start, __u64 len); 1661 __u64 start, __u64 len);
1662/* move_extent.c */
1663extern int ext4_move_extents(struct file *o_filp, struct file *d_filp,
1664 __u64 start_orig, __u64 start_donor,
1665 __u64 len, __u64 *moved_len);
1666
1650 1667
1651/* 1668/*
1652 * Add new method to test wether block and inode bitmaps are properly 1669 * Add new method to test wether block and inode bitmaps are properly
diff --git a/fs/ext4/ext4_extents.h b/fs/ext4/ext4_extents.h
index f0c3ec85bd48..20a84105a10b 100644
--- a/fs/ext4/ext4_extents.h
+++ b/fs/ext4/ext4_extents.h
@@ -221,12 +221,16 @@ static inline int ext4_ext_get_actual_len(struct ext4_extent *ext)
221} 221}
222 222
223extern int ext4_ext_calc_metadata_amount(struct inode *inode, int blocks); 223extern int ext4_ext_calc_metadata_amount(struct inode *inode, int blocks);
224extern ext4_fsblk_t ext_pblock(struct ext4_extent *ex);
224extern ext4_fsblk_t idx_pblock(struct ext4_extent_idx *); 225extern ext4_fsblk_t idx_pblock(struct ext4_extent_idx *);
225extern void ext4_ext_store_pblock(struct ext4_extent *, ext4_fsblk_t); 226extern void ext4_ext_store_pblock(struct ext4_extent *, ext4_fsblk_t);
226extern int ext4_extent_tree_init(handle_t *, struct inode *); 227extern int ext4_extent_tree_init(handle_t *, struct inode *);
227extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode, 228extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,
228 int num, 229 int num,
229 struct ext4_ext_path *path); 230 struct ext4_ext_path *path);
231extern int ext4_can_extents_be_merged(struct inode *inode,
232 struct ext4_extent *ex1,
233 struct ext4_extent *ex2);
230extern int ext4_ext_try_to_merge(struct inode *inode, 234extern int ext4_ext_try_to_merge(struct inode *inode,
231 struct ext4_ext_path *path, 235 struct ext4_ext_path *path,
232 struct ext4_extent *); 236 struct ext4_extent *);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2593f748c3a4..50322a09bd01 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -49,7 +49,7 @@
49 * ext_pblock: 49 * ext_pblock:
50 * combine low and high parts of physical block number into ext4_fsblk_t 50 * combine low and high parts of physical block number into ext4_fsblk_t
51 */ 51 */
52static ext4_fsblk_t ext_pblock(struct ext4_extent *ex) 52ext4_fsblk_t ext_pblock(struct ext4_extent *ex)
53{ 53{
54 ext4_fsblk_t block; 54 ext4_fsblk_t block;
55 55
@@ -1417,7 +1417,7 @@ static int ext4_ext_correct_indexes(handle_t *handle, struct inode *inode,
1417 return err; 1417 return err;
1418} 1418}
1419 1419
1420static int 1420int
1421ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1, 1421ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1,
1422 struct ext4_extent *ex2) 1422 struct ext4_extent *ex2)
1423{ 1423{
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 588af8c77246..3f1873fef1c6 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -21,6 +21,8 @@
21#include <linux/time.h> 21#include <linux/time.h>
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/jbd2.h> 23#include <linux/jbd2.h>
24#include <linux/mount.h>
25#include <linux/path.h>
24#include "ext4.h" 26#include "ext4.h"
25#include "ext4_jbd2.h" 27#include "ext4_jbd2.h"
26#include "xattr.h" 28#include "xattr.h"
@@ -145,6 +147,38 @@ static int ext4_file_mmap(struct file *file, struct vm_area_struct *vma)
145 return 0; 147 return 0;
146} 148}
147 149
150static int ext4_file_open(struct inode * inode, struct file * filp)
151{
152 struct super_block *sb = inode->i_sb;
153 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
154 struct vfsmount *mnt = filp->f_path.mnt;
155 struct path path;
156 char buf[64], *cp;
157
158 if (unlikely(!(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED) &&
159 !(sb->s_flags & MS_RDONLY))) {
160 sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED;
161 /*
162 * Sample where the filesystem has been mounted and
163 * store it in the superblock for sysadmin convenience
164 * when trying to sort through large numbers of block
165 * devices or filesystem images.
166 */
167 memset(buf, 0, sizeof(buf));
168 path.mnt = mnt->mnt_parent;
169 path.dentry = mnt->mnt_mountpoint;
170 path_get(&path);
171 cp = d_path(&path, buf, sizeof(buf));
172 path_put(&path);
173 if (!IS_ERR(cp)) {
174 memcpy(sbi->s_es->s_last_mounted, cp,
175 sizeof(sbi->s_es->s_last_mounted));
176 sb->s_dirt = 1;
177 }
178 }
179 return generic_file_open(inode, filp);
180}
181
148const struct file_operations ext4_file_operations = { 182const struct file_operations ext4_file_operations = {
149 .llseek = generic_file_llseek, 183 .llseek = generic_file_llseek,
150 .read = do_sync_read, 184 .read = do_sync_read,
@@ -156,7 +190,7 @@ const struct file_operations ext4_file_operations = {
156 .compat_ioctl = ext4_compat_ioctl, 190 .compat_ioctl = ext4_compat_ioctl,
157#endif 191#endif
158 .mmap = ext4_file_mmap, 192 .mmap = ext4_file_mmap,
159 .open = generic_file_open, 193 .open = ext4_file_open,
160 .release = ext4_release_file, 194 .release = ext4_release_file,
161 .fsync = ext4_sync_file, 195 .fsync = ext4_sync_file,
162 .splice_read = generic_file_splice_read, 196 .splice_read = generic_file_splice_read,
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index 5afe4370840b..83cf6415f599 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -28,10 +28,12 @@
28#include <linux/writeback.h> 28#include <linux/writeback.h>
29#include <linux/jbd2.h> 29#include <linux/jbd2.h>
30#include <linux/blkdev.h> 30#include <linux/blkdev.h>
31#include <linux/marker.h> 31
32#include "ext4.h" 32#include "ext4.h"
33#include "ext4_jbd2.h" 33#include "ext4_jbd2.h"
34 34
35#include <trace/events/ext4.h>
36
35/* 37/*
36 * akpm: A new design for ext4_sync_file(). 38 * akpm: A new design for ext4_sync_file().
37 * 39 *
@@ -52,9 +54,7 @@ int ext4_sync_file(struct file *file, struct dentry *dentry, int datasync)
52 54
53 J_ASSERT(ext4_journal_current_handle() == NULL); 55 J_ASSERT(ext4_journal_current_handle() == NULL);
54 56
55 trace_mark(ext4_sync_file, "dev %s datasync %d ino %ld parent %ld", 57 trace_ext4_sync_file(file, dentry, datasync);
56 inode->i_sb->s_id, datasync, inode->i_ino,
57 dentry->d_parent->d_inode->i_ino);
58 58
59 /* 59 /*
60 * data=writeback: 60 * data=writeback:
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 3743bd849bce..2f645732e3b7 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -23,11 +23,14 @@
23#include <linux/bitops.h> 23#include <linux/bitops.h>
24#include <linux/blkdev.h> 24#include <linux/blkdev.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26
26#include "ext4.h" 27#include "ext4.h"
27#include "ext4_jbd2.h" 28#include "ext4_jbd2.h"
28#include "xattr.h" 29#include "xattr.h"
29#include "acl.h" 30#include "acl.h"
30 31
32#include <trace/events/ext4.h>
33
31/* 34/*
32 * ialloc.c contains the inodes allocation and deallocation routines 35 * ialloc.c contains the inodes allocation and deallocation routines
33 */ 36 */
@@ -208,11 +211,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
208 211
209 ino = inode->i_ino; 212 ino = inode->i_ino;
210 ext4_debug("freeing inode %lu\n", ino); 213 ext4_debug("freeing inode %lu\n", ino);
211 trace_mark(ext4_free_inode, 214 trace_ext4_free_inode(inode);
212 "dev %s ino %lu mode %d uid %lu gid %lu bocks %llu",
213 sb->s_id, inode->i_ino, inode->i_mode,
214 (unsigned long) inode->i_uid, (unsigned long) inode->i_gid,
215 (unsigned long long) inode->i_blocks);
216 215
217 /* 216 /*
218 * Note: we must free any quota before locking the superblock, 217 * Note: we must free any quota before locking the superblock,
@@ -471,7 +470,8 @@ void get_orlov_stats(struct super_block *sb, ext4_group_t g,
471 */ 470 */
472 471
473static int find_group_orlov(struct super_block *sb, struct inode *parent, 472static int find_group_orlov(struct super_block *sb, struct inode *parent,
474 ext4_group_t *group, int mode) 473 ext4_group_t *group, int mode,
474 const struct qstr *qstr)
475{ 475{
476 ext4_group_t parent_group = EXT4_I(parent)->i_block_group; 476 ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
477 struct ext4_sb_info *sbi = EXT4_SB(sb); 477 struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -486,6 +486,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
486 struct ext4_group_desc *desc; 486 struct ext4_group_desc *desc;
487 struct orlov_stats stats; 487 struct orlov_stats stats;
488 int flex_size = ext4_flex_bg_size(sbi); 488 int flex_size = ext4_flex_bg_size(sbi);
489 struct dx_hash_info hinfo;
489 490
490 ngroups = real_ngroups; 491 ngroups = real_ngroups;
491 if (flex_size > 1) { 492 if (flex_size > 1) {
@@ -507,7 +508,13 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
507 int best_ndir = inodes_per_group; 508 int best_ndir = inodes_per_group;
508 int ret = -1; 509 int ret = -1;
509 510
510 get_random_bytes(&grp, sizeof(grp)); 511 if (qstr) {
512 hinfo.hash_version = DX_HASH_HALF_MD4;
513 hinfo.seed = sbi->s_hash_seed;
514 ext4fs_dirhash(qstr->name, qstr->len, &hinfo);
515 grp = hinfo.hash;
516 } else
517 get_random_bytes(&grp, sizeof(grp));
511 parent_group = (unsigned)grp % ngroups; 518 parent_group = (unsigned)grp % ngroups;
512 for (i = 0; i < ngroups; i++) { 519 for (i = 0; i < ngroups; i++) {
513 g = (parent_group + i) % ngroups; 520 g = (parent_group + i) % ngroups;
@@ -650,7 +657,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent,
650 *group = parent_group + flex_size; 657 *group = parent_group + flex_size;
651 if (*group > ngroups) 658 if (*group > ngroups)
652 *group = 0; 659 *group = 0;
653 return find_group_orlov(sb, parent, group, mode); 660 return find_group_orlov(sb, parent, group, mode, 0);
654 } 661 }
655 662
656 /* 663 /*
@@ -791,7 +798,8 @@ err_ret:
791 * For other inodes, search forward from the parent directory's block 798 * For other inodes, search forward from the parent directory's block
792 * group to find a free inode. 799 * group to find a free inode.
793 */ 800 */
794struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode) 801struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode,
802 const struct qstr *qstr, __u32 goal)
795{ 803{
796 struct super_block *sb; 804 struct super_block *sb;
797 struct buffer_head *inode_bitmap_bh = NULL; 805 struct buffer_head *inode_bitmap_bh = NULL;
@@ -815,14 +823,23 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode)
815 823
816 sb = dir->i_sb; 824 sb = dir->i_sb;
817 ngroups = ext4_get_groups_count(sb); 825 ngroups = ext4_get_groups_count(sb);
818 trace_mark(ext4_request_inode, "dev %s dir %lu mode %d", sb->s_id, 826 trace_ext4_request_inode(dir, mode);
819 dir->i_ino, mode);
820 inode = new_inode(sb); 827 inode = new_inode(sb);
821 if (!inode) 828 if (!inode)
822 return ERR_PTR(-ENOMEM); 829 return ERR_PTR(-ENOMEM);
823 ei = EXT4_I(inode); 830 ei = EXT4_I(inode);
824 sbi = EXT4_SB(sb); 831 sbi = EXT4_SB(sb);
825 832
833 if (!goal)
834 goal = sbi->s_inode_goal;
835
836 if (goal && goal < le32_to_cpu(sbi->s_es->s_inodes_count)) {
837 group = (goal - 1) / EXT4_INODES_PER_GROUP(sb);
838 ino = (goal - 1) % EXT4_INODES_PER_GROUP(sb);
839 ret2 = 0;
840 goto got_group;
841 }
842
826 if (sbi->s_log_groups_per_flex && test_opt(sb, OLDALLOC)) { 843 if (sbi->s_log_groups_per_flex && test_opt(sb, OLDALLOC)) {
827 ret2 = find_group_flex(sb, dir, &group); 844 ret2 = find_group_flex(sb, dir, &group);
828 if (ret2 == -1) { 845 if (ret2 == -1) {
@@ -841,7 +858,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode)
841 if (test_opt(sb, OLDALLOC)) 858 if (test_opt(sb, OLDALLOC))
842 ret2 = find_group_dir(sb, dir, &group); 859 ret2 = find_group_dir(sb, dir, &group);
843 else 860 else
844 ret2 = find_group_orlov(sb, dir, &group, mode); 861 ret2 = find_group_orlov(sb, dir, &group, mode, qstr);
845 } else 862 } else
846 ret2 = find_group_other(sb, dir, &group, mode); 863 ret2 = find_group_other(sb, dir, &group, mode);
847 864
@@ -851,7 +868,7 @@ got_group:
851 if (ret2 == -1) 868 if (ret2 == -1)
852 goto out; 869 goto out;
853 870
854 for (i = 0; i < ngroups; i++) { 871 for (i = 0; i < ngroups; i++, ino = 0) {
855 err = -EIO; 872 err = -EIO;
856 873
857 gdp = ext4_get_group_desc(sb, group, &group_desc_bh); 874 gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
@@ -863,8 +880,6 @@ got_group:
863 if (!inode_bitmap_bh) 880 if (!inode_bitmap_bh)
864 goto fail; 881 goto fail;
865 882
866 ino = 0;
867
868repeat_in_this_group: 883repeat_in_this_group:
869 ino = ext4_find_next_zero_bit((unsigned long *) 884 ino = ext4_find_next_zero_bit((unsigned long *)
870 inode_bitmap_bh->b_data, 885 inode_bitmap_bh->b_data,
@@ -1047,8 +1062,7 @@ got:
1047 } 1062 }
1048 1063
1049 ext4_debug("allocating inode %lu\n", inode->i_ino); 1064 ext4_debug("allocating inode %lu\n", inode->i_ino);
1050 trace_mark(ext4_allocate_inode, "dev %s ino %lu dir %lu mode %d", 1065 trace_ext4_allocate_inode(inode, dir, mode);
1051 sb->s_id, inode->i_ino, dir->i_ino, mode);
1052 goto really_out; 1066 goto really_out;
1053fail: 1067fail:
1054 ext4_std_error(sb, err); 1068 ext4_std_error(sb, err);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 875db944b22f..7c17ae275af4 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -37,11 +37,14 @@
37#include <linux/namei.h> 37#include <linux/namei.h>
38#include <linux/uio.h> 38#include <linux/uio.h>
39#include <linux/bio.h> 39#include <linux/bio.h>
40
40#include "ext4_jbd2.h" 41#include "ext4_jbd2.h"
41#include "xattr.h" 42#include "xattr.h"
42#include "acl.h" 43#include "acl.h"
43#include "ext4_extents.h" 44#include "ext4_extents.h"
44 45
46#include <trace/events/ext4.h>
47
45#define MPAGE_DA_EXTENT_TAIL 0x01 48#define MPAGE_DA_EXTENT_TAIL 0x01
46 49
47static inline int ext4_begin_ordered_truncate(struct inode *inode, 50static inline int ext4_begin_ordered_truncate(struct inode *inode,
@@ -78,7 +81,7 @@ static int ext4_inode_is_fast_symlink(struct inode *inode)
78 * If the handle isn't valid we're not journaling so there's nothing to do. 81 * If the handle isn't valid we're not journaling so there's nothing to do.
79 */ 82 */
80int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, 83int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
81 struct buffer_head *bh, ext4_fsblk_t blocknr) 84 struct buffer_head *bh, ext4_fsblk_t blocknr)
82{ 85{
83 int err; 86 int err;
84 87
@@ -90,7 +93,7 @@ int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
90 BUFFER_TRACE(bh, "enter"); 93 BUFFER_TRACE(bh, "enter");
91 94
92 jbd_debug(4, "forgetting bh %p: is_metadata = %d, mode %o, " 95 jbd_debug(4, "forgetting bh %p: is_metadata = %d, mode %o, "
93 "data mode %lx\n", 96 "data mode %x\n",
94 bh, is_metadata, inode->i_mode, 97 bh, is_metadata, inode->i_mode,
95 test_opt(inode->i_sb, DATA_FLAGS)); 98 test_opt(inode->i_sb, DATA_FLAGS));
96 99
@@ -329,8 +332,8 @@ static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v)
329 */ 332 */
330 333
331static int ext4_block_to_path(struct inode *inode, 334static int ext4_block_to_path(struct inode *inode,
332 ext4_lblk_t i_block, 335 ext4_lblk_t i_block,
333 ext4_lblk_t offsets[4], int *boundary) 336 ext4_lblk_t offsets[4], int *boundary)
334{ 337{
335 int ptrs = EXT4_ADDR_PER_BLOCK(inode->i_sb); 338 int ptrs = EXT4_ADDR_PER_BLOCK(inode->i_sb);
336 int ptrs_bits = EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb); 339 int ptrs_bits = EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb);
@@ -362,9 +365,9 @@ static int ext4_block_to_path(struct inode *inode,
362 final = ptrs; 365 final = ptrs;
363 } else { 366 } else {
364 ext4_warning(inode->i_sb, "ext4_block_to_path", 367 ext4_warning(inode->i_sb, "ext4_block_to_path",
365 "block %lu > max in inode %lu", 368 "block %lu > max in inode %lu",
366 i_block + direct_blocks + 369 i_block + direct_blocks +
367 indirect_blocks + double_blocks, inode->i_ino); 370 indirect_blocks + double_blocks, inode->i_ino);
368 } 371 }
369 if (boundary) 372 if (boundary)
370 *boundary = final - 1 - (i_block & (ptrs - 1)); 373 *boundary = final - 1 - (i_block & (ptrs - 1));
@@ -379,25 +382,25 @@ static int __ext4_check_blockref(const char *function, struct inode *inode,
379 382
380 while (bref < p+max) { 383 while (bref < p+max) {
381 blk = le32_to_cpu(*bref++); 384 blk = le32_to_cpu(*bref++);
382 if (blk && 385 if (blk &&
383 unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb), 386 unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb),
384 blk, 1))) { 387 blk, 1))) {
385 ext4_error(inode->i_sb, function, 388 ext4_error(inode->i_sb, function,
386 "invalid block reference %u " 389 "invalid block reference %u "
387 "in inode #%lu", blk, inode->i_ino); 390 "in inode #%lu", blk, inode->i_ino);
388 return -EIO; 391 return -EIO;
389 } 392 }
390 } 393 }
391 return 0; 394 return 0;
392} 395}
393 396
394 397
395#define ext4_check_indirect_blockref(inode, bh) \ 398#define ext4_check_indirect_blockref(inode, bh) \
396 __ext4_check_blockref(__func__, inode, (__le32 *)(bh)->b_data, \ 399 __ext4_check_blockref(__func__, inode, (__le32 *)(bh)->b_data, \
397 EXT4_ADDR_PER_BLOCK((inode)->i_sb)) 400 EXT4_ADDR_PER_BLOCK((inode)->i_sb))
398 401
399#define ext4_check_inode_blockref(inode) \ 402#define ext4_check_inode_blockref(inode) \
400 __ext4_check_blockref(__func__, inode, EXT4_I(inode)->i_data, \ 403 __ext4_check_blockref(__func__, inode, EXT4_I(inode)->i_data, \
401 EXT4_NDIR_BLOCKS) 404 EXT4_NDIR_BLOCKS)
402 405
403/** 406/**
@@ -447,7 +450,7 @@ static Indirect *ext4_get_branch(struct inode *inode, int depth,
447 bh = sb_getblk(sb, le32_to_cpu(p->key)); 450 bh = sb_getblk(sb, le32_to_cpu(p->key));
448 if (unlikely(!bh)) 451 if (unlikely(!bh))
449 goto failure; 452 goto failure;
450 453
451 if (!bh_uptodate_or_lock(bh)) { 454 if (!bh_uptodate_or_lock(bh)) {
452 if (bh_submit_read(bh) < 0) { 455 if (bh_submit_read(bh) < 0) {
453 put_bh(bh); 456 put_bh(bh);
@@ -459,7 +462,7 @@ static Indirect *ext4_get_branch(struct inode *inode, int depth,
459 goto failure; 462 goto failure;
460 } 463 }
461 } 464 }
462 465
463 add_chain(++p, bh, (__le32 *)bh->b_data + *++offsets); 466 add_chain(++p, bh, (__le32 *)bh->b_data + *++offsets);
464 /* Reader: end */ 467 /* Reader: end */
465 if (!p->key) 468 if (!p->key)
@@ -552,7 +555,7 @@ static ext4_fsblk_t ext4_find_near(struct inode *inode, Indirect *ind)
552 * returns it. 555 * returns it.
553 */ 556 */
554static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block, 557static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block,
555 Indirect *partial) 558 Indirect *partial)
556{ 559{
557 /* 560 /*
558 * XXX need to get goal block from mballoc's data structures 561 * XXX need to get goal block from mballoc's data structures
@@ -574,7 +577,7 @@ static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block,
574 * direct and indirect blocks. 577 * direct and indirect blocks.
575 */ 578 */
576static int ext4_blks_to_allocate(Indirect *branch, int k, unsigned int blks, 579static int ext4_blks_to_allocate(Indirect *branch, int k, unsigned int blks,
577 int blocks_to_boundary) 580 int blocks_to_boundary)
578{ 581{
579 unsigned int count = 0; 582 unsigned int count = 0;
580 583
@@ -610,9 +613,9 @@ static int ext4_blks_to_allocate(Indirect *branch, int k, unsigned int blks,
610 * direct blocks 613 * direct blocks
611 */ 614 */
612static int ext4_alloc_blocks(handle_t *handle, struct inode *inode, 615static int ext4_alloc_blocks(handle_t *handle, struct inode *inode,
613 ext4_lblk_t iblock, ext4_fsblk_t goal, 616 ext4_lblk_t iblock, ext4_fsblk_t goal,
614 int indirect_blks, int blks, 617 int indirect_blks, int blks,
615 ext4_fsblk_t new_blocks[4], int *err) 618 ext4_fsblk_t new_blocks[4], int *err)
616{ 619{
617 struct ext4_allocation_request ar; 620 struct ext4_allocation_request ar;
618 int target, i; 621 int target, i;
@@ -683,10 +686,10 @@ static int ext4_alloc_blocks(handle_t *handle, struct inode *inode,
683 } 686 }
684 if (!*err) { 687 if (!*err) {
685 if (target == blks) { 688 if (target == blks) {
686 /* 689 /*
687 * save the new block number 690 * save the new block number
688 * for the first direct block 691 * for the first direct block
689 */ 692 */
690 new_blocks[index] = current_block; 693 new_blocks[index] = current_block;
691 } 694 }
692 blk_allocated += ar.len; 695 blk_allocated += ar.len;
@@ -728,9 +731,9 @@ failed_out:
728 * as described above and return 0. 731 * as described above and return 0.
729 */ 732 */
730static int ext4_alloc_branch(handle_t *handle, struct inode *inode, 733static int ext4_alloc_branch(handle_t *handle, struct inode *inode,
731 ext4_lblk_t iblock, int indirect_blks, 734 ext4_lblk_t iblock, int indirect_blks,
732 int *blks, ext4_fsblk_t goal, 735 int *blks, ext4_fsblk_t goal,
733 ext4_lblk_t *offsets, Indirect *branch) 736 ext4_lblk_t *offsets, Indirect *branch)
734{ 737{
735 int blocksize = inode->i_sb->s_blocksize; 738 int blocksize = inode->i_sb->s_blocksize;
736 int i, n = 0; 739 int i, n = 0;
@@ -777,7 +780,7 @@ static int ext4_alloc_branch(handle_t *handle, struct inode *inode,
777 * the chain to point to the new allocated 780 * the chain to point to the new allocated
778 * data blocks numbers 781 * data blocks numbers
779 */ 782 */
780 for (i=1; i < num; i++) 783 for (i = 1; i < num; i++)
781 *(branch[n].p + i) = cpu_to_le32(++current_block); 784 *(branch[n].p + i) = cpu_to_le32(++current_block);
782 } 785 }
783 BUFFER_TRACE(bh, "marking uptodate"); 786 BUFFER_TRACE(bh, "marking uptodate");
@@ -820,7 +823,8 @@ failed:
820 * chain to new block and return 0. 823 * chain to new block and return 0.
821 */ 824 */
822static int ext4_splice_branch(handle_t *handle, struct inode *inode, 825static int ext4_splice_branch(handle_t *handle, struct inode *inode,
823 ext4_lblk_t block, Indirect *where, int num, int blks) 826 ext4_lblk_t block, Indirect *where, int num,
827 int blks)
824{ 828{
825 int i; 829 int i;
826 int err = 0; 830 int err = 0;
@@ -852,10 +856,6 @@ static int ext4_splice_branch(handle_t *handle, struct inode *inode,
852 } 856 }
853 857
854 /* We are done with atomic stuff, now do the rest of housekeeping */ 858 /* We are done with atomic stuff, now do the rest of housekeeping */
855
856 inode->i_ctime = ext4_current_time(inode);
857 ext4_mark_inode_dirty(handle, inode);
858
859 /* had we spliced it onto indirect block? */ 859 /* had we spliced it onto indirect block? */
860 if (where->bh) { 860 if (where->bh) {
861 /* 861 /*
@@ -874,8 +874,8 @@ static int ext4_splice_branch(handle_t *handle, struct inode *inode,
874 } else { 874 } else {
875 /* 875 /*
876 * OK, we spliced it into the inode itself on a direct block. 876 * OK, we spliced it into the inode itself on a direct block.
877 * Inode was dirtied above.
878 */ 877 */
878 ext4_mark_inode_dirty(handle, inode);
879 jbd_debug(5, "splicing direct\n"); 879 jbd_debug(5, "splicing direct\n");
880 } 880 }
881 return err; 881 return err;
@@ -921,9 +921,9 @@ err_out:
921 * blocks. 921 * blocks.
922 */ 922 */
923static int ext4_ind_get_blocks(handle_t *handle, struct inode *inode, 923static int ext4_ind_get_blocks(handle_t *handle, struct inode *inode,
924 ext4_lblk_t iblock, unsigned int maxblocks, 924 ext4_lblk_t iblock, unsigned int maxblocks,
925 struct buffer_head *bh_result, 925 struct buffer_head *bh_result,
926 int flags) 926 int flags)
927{ 927{
928 int err = -EIO; 928 int err = -EIO;
929 ext4_lblk_t offsets[4]; 929 ext4_lblk_t offsets[4];
@@ -939,7 +939,7 @@ static int ext4_ind_get_blocks(handle_t *handle, struct inode *inode,
939 J_ASSERT(!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)); 939 J_ASSERT(!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL));
940 J_ASSERT(handle != NULL || (flags & EXT4_GET_BLOCKS_CREATE) == 0); 940 J_ASSERT(handle != NULL || (flags & EXT4_GET_BLOCKS_CREATE) == 0);
941 depth = ext4_block_to_path(inode, iblock, offsets, 941 depth = ext4_block_to_path(inode, iblock, offsets,
942 &blocks_to_boundary); 942 &blocks_to_boundary);
943 943
944 if (depth == 0) 944 if (depth == 0)
945 goto out; 945 goto out;
@@ -987,8 +987,8 @@ static int ext4_ind_get_blocks(handle_t *handle, struct inode *inode,
987 * Block out ext4_truncate while we alter the tree 987 * Block out ext4_truncate while we alter the tree
988 */ 988 */
989 err = ext4_alloc_branch(handle, inode, iblock, indirect_blks, 989 err = ext4_alloc_branch(handle, inode, iblock, indirect_blks,
990 &count, goal, 990 &count, goal,
991 offsets + (partial - chain), partial); 991 offsets + (partial - chain), partial);
992 992
993 /* 993 /*
994 * The ext4_splice_branch call will free and forget any buffers 994 * The ext4_splice_branch call will free and forget any buffers
@@ -999,8 +999,8 @@ static int ext4_ind_get_blocks(handle_t *handle, struct inode *inode,
999 */ 999 */
1000 if (!err) 1000 if (!err)
1001 err = ext4_splice_branch(handle, inode, iblock, 1001 err = ext4_splice_branch(handle, inode, iblock,
1002 partial, indirect_blks, count); 1002 partial, indirect_blks, count);
1003 else 1003 else
1004 goto cleanup; 1004 goto cleanup;
1005 1005
1006 set_buffer_new(bh_result); 1006 set_buffer_new(bh_result);
@@ -1172,7 +1172,7 @@ int ext4_get_blocks(handle_t *handle, struct inode *inode, sector_t block,
1172 up_read((&EXT4_I(inode)->i_data_sem)); 1172 up_read((&EXT4_I(inode)->i_data_sem));
1173 1173
1174 if (retval > 0 && buffer_mapped(bh)) { 1174 if (retval > 0 && buffer_mapped(bh)) {
1175 int ret = check_block_validity(inode, block, 1175 int ret = check_block_validity(inode, block,
1176 bh->b_blocknr, retval); 1176 bh->b_blocknr, retval);
1177 if (ret != 0) 1177 if (ret != 0)
1178 return ret; 1178 return ret;
@@ -1254,7 +1254,7 @@ int ext4_get_blocks(handle_t *handle, struct inode *inode, sector_t block,
1254 1254
1255 up_write((&EXT4_I(inode)->i_data_sem)); 1255 up_write((&EXT4_I(inode)->i_data_sem));
1256 if (retval > 0 && buffer_mapped(bh)) { 1256 if (retval > 0 && buffer_mapped(bh)) {
1257 int ret = check_block_validity(inode, block, 1257 int ret = check_block_validity(inode, block,
1258 bh->b_blocknr, retval); 1258 bh->b_blocknr, retval);
1259 if (ret != 0) 1259 if (ret != 0)
1260 return ret; 1260 return ret;
@@ -1405,8 +1405,7 @@ static int walk_page_buffers(handle_t *handle,
1405 1405
1406 for (bh = head, block_start = 0; 1406 for (bh = head, block_start = 0;
1407 ret == 0 && (bh != head || !block_start); 1407 ret == 0 && (bh != head || !block_start);
1408 block_start = block_end, bh = next) 1408 block_start = block_end, bh = next) {
1409 {
1410 next = bh->b_this_page; 1409 next = bh->b_this_page;
1411 block_end = block_start + blocksize; 1410 block_end = block_start + blocksize;
1412 if (block_end <= from || block_start >= to) { 1411 if (block_end <= from || block_start >= to) {
@@ -1447,7 +1446,7 @@ static int walk_page_buffers(handle_t *handle,
1447 * write. 1446 * write.
1448 */ 1447 */
1449static int do_journal_get_write_access(handle_t *handle, 1448static int do_journal_get_write_access(handle_t *handle,
1450 struct buffer_head *bh) 1449 struct buffer_head *bh)
1451{ 1450{
1452 if (!buffer_mapped(bh) || buffer_freed(bh)) 1451 if (!buffer_mapped(bh) || buffer_freed(bh))
1453 return 0; 1452 return 0;
@@ -1455,27 +1454,24 @@ static int do_journal_get_write_access(handle_t *handle,
1455} 1454}
1456 1455
1457static int ext4_write_begin(struct file *file, struct address_space *mapping, 1456static int ext4_write_begin(struct file *file, struct address_space *mapping,
1458 loff_t pos, unsigned len, unsigned flags, 1457 loff_t pos, unsigned len, unsigned flags,
1459 struct page **pagep, void **fsdata) 1458 struct page **pagep, void **fsdata)
1460{ 1459{
1461 struct inode *inode = mapping->host; 1460 struct inode *inode = mapping->host;
1462 int ret, needed_blocks; 1461 int ret, needed_blocks;
1463 handle_t *handle; 1462 handle_t *handle;
1464 int retries = 0; 1463 int retries = 0;
1465 struct page *page; 1464 struct page *page;
1466 pgoff_t index; 1465 pgoff_t index;
1467 unsigned from, to; 1466 unsigned from, to;
1468 1467
1469 trace_mark(ext4_write_begin, 1468 trace_ext4_write_begin(inode, pos, len, flags);
1470 "dev %s ino %lu pos %llu len %u flags %u",
1471 inode->i_sb->s_id, inode->i_ino,
1472 (unsigned long long) pos, len, flags);
1473 /* 1469 /*
1474 * Reserve one block more for addition to orphan list in case 1470 * Reserve one block more for addition to orphan list in case
1475 * we allocate blocks but write fails for some reason 1471 * we allocate blocks but write fails for some reason
1476 */ 1472 */
1477 needed_blocks = ext4_writepage_trans_blocks(inode) + 1; 1473 needed_blocks = ext4_writepage_trans_blocks(inode) + 1;
1478 index = pos >> PAGE_CACHE_SHIFT; 1474 index = pos >> PAGE_CACHE_SHIFT;
1479 from = pos & (PAGE_CACHE_SIZE - 1); 1475 from = pos & (PAGE_CACHE_SIZE - 1);
1480 to = from + len; 1476 to = from + len;
1481 1477
@@ -1523,7 +1519,7 @@ retry:
1523 ext4_journal_stop(handle); 1519 ext4_journal_stop(handle);
1524 if (pos + len > inode->i_size) { 1520 if (pos + len > inode->i_size) {
1525 vmtruncate(inode, inode->i_size); 1521 vmtruncate(inode, inode->i_size);
1526 /* 1522 /*
1527 * If vmtruncate failed early the inode might 1523 * If vmtruncate failed early the inode might
1528 * still be on the orphan list; we need to 1524 * still be on the orphan list; we need to
1529 * make sure the inode is removed from the 1525 * make sure the inode is removed from the
@@ -1550,9 +1546,9 @@ static int write_end_fn(handle_t *handle, struct buffer_head *bh)
1550} 1546}
1551 1547
1552static int ext4_generic_write_end(struct file *file, 1548static int ext4_generic_write_end(struct file *file,
1553 struct address_space *mapping, 1549 struct address_space *mapping,
1554 loff_t pos, unsigned len, unsigned copied, 1550 loff_t pos, unsigned len, unsigned copied,
1555 struct page *page, void *fsdata) 1551 struct page *page, void *fsdata)
1556{ 1552{
1557 int i_size_changed = 0; 1553 int i_size_changed = 0;
1558 struct inode *inode = mapping->host; 1554 struct inode *inode = mapping->host;
@@ -1603,18 +1599,15 @@ static int ext4_generic_write_end(struct file *file,
1603 * buffers are managed internally. 1599 * buffers are managed internally.
1604 */ 1600 */
1605static int ext4_ordered_write_end(struct file *file, 1601static int ext4_ordered_write_end(struct file *file,
1606 struct address_space *mapping, 1602 struct address_space *mapping,
1607 loff_t pos, unsigned len, unsigned copied, 1603 loff_t pos, unsigned len, unsigned copied,
1608 struct page *page, void *fsdata) 1604 struct page *page, void *fsdata)
1609{ 1605{
1610 handle_t *handle = ext4_journal_current_handle(); 1606 handle_t *handle = ext4_journal_current_handle();
1611 struct inode *inode = mapping->host; 1607 struct inode *inode = mapping->host;
1612 int ret = 0, ret2; 1608 int ret = 0, ret2;
1613 1609
1614 trace_mark(ext4_ordered_write_end, 1610 trace_ext4_ordered_write_end(inode, pos, len, copied);
1615 "dev %s ino %lu pos %llu len %u copied %u",
1616 inode->i_sb->s_id, inode->i_ino,
1617 (unsigned long long) pos, len, copied);
1618 ret = ext4_jbd2_file_inode(handle, inode); 1611 ret = ext4_jbd2_file_inode(handle, inode);
1619 1612
1620 if (ret == 0) { 1613 if (ret == 0) {
@@ -1636,7 +1629,7 @@ static int ext4_ordered_write_end(struct file *file,
1636 1629
1637 if (pos + len > inode->i_size) { 1630 if (pos + len > inode->i_size) {
1638 vmtruncate(inode, inode->i_size); 1631 vmtruncate(inode, inode->i_size);
1639 /* 1632 /*
1640 * If vmtruncate failed early the inode might still be 1633 * If vmtruncate failed early the inode might still be
1641 * on the orphan list; we need to make sure the inode 1634 * on the orphan list; we need to make sure the inode
1642 * is removed from the orphan list in that case. 1635 * is removed from the orphan list in that case.
@@ -1650,18 +1643,15 @@ static int ext4_ordered_write_end(struct file *file,
1650} 1643}
1651 1644
1652static int ext4_writeback_write_end(struct file *file, 1645static int ext4_writeback_write_end(struct file *file,
1653 struct address_space *mapping, 1646 struct address_space *mapping,
1654 loff_t pos, unsigned len, unsigned copied, 1647 loff_t pos, unsigned len, unsigned copied,
1655 struct page *page, void *fsdata) 1648 struct page *page, void *fsdata)
1656{ 1649{
1657 handle_t *handle = ext4_journal_current_handle(); 1650 handle_t *handle = ext4_journal_current_handle();
1658 struct inode *inode = mapping->host; 1651 struct inode *inode = mapping->host;
1659 int ret = 0, ret2; 1652 int ret = 0, ret2;
1660 1653
1661 trace_mark(ext4_writeback_write_end, 1654 trace_ext4_writeback_write_end(inode, pos, len, copied);
1662 "dev %s ino %lu pos %llu len %u copied %u",
1663 inode->i_sb->s_id, inode->i_ino,
1664 (unsigned long long) pos, len, copied);
1665 ret2 = ext4_generic_write_end(file, mapping, pos, len, copied, 1655 ret2 = ext4_generic_write_end(file, mapping, pos, len, copied,
1666 page, fsdata); 1656 page, fsdata);
1667 copied = ret2; 1657 copied = ret2;
@@ -1681,7 +1671,7 @@ static int ext4_writeback_write_end(struct file *file,
1681 1671
1682 if (pos + len > inode->i_size) { 1672 if (pos + len > inode->i_size) {
1683 vmtruncate(inode, inode->i_size); 1673 vmtruncate(inode, inode->i_size);
1684 /* 1674 /*
1685 * If vmtruncate failed early the inode might still be 1675 * If vmtruncate failed early the inode might still be
1686 * on the orphan list; we need to make sure the inode 1676 * on the orphan list; we need to make sure the inode
1687 * is removed from the orphan list in that case. 1677 * is removed from the orphan list in that case.
@@ -1694,9 +1684,9 @@ static int ext4_writeback_write_end(struct file *file,
1694} 1684}
1695 1685
1696static int ext4_journalled_write_end(struct file *file, 1686static int ext4_journalled_write_end(struct file *file,
1697 struct address_space *mapping, 1687 struct address_space *mapping,
1698 loff_t pos, unsigned len, unsigned copied, 1688 loff_t pos, unsigned len, unsigned copied,
1699 struct page *page, void *fsdata) 1689 struct page *page, void *fsdata)
1700{ 1690{
1701 handle_t *handle = ext4_journal_current_handle(); 1691 handle_t *handle = ext4_journal_current_handle();
1702 struct inode *inode = mapping->host; 1692 struct inode *inode = mapping->host;
@@ -1705,10 +1695,7 @@ static int ext4_journalled_write_end(struct file *file,
1705 unsigned from, to; 1695 unsigned from, to;
1706 loff_t new_i_size; 1696 loff_t new_i_size;
1707 1697
1708 trace_mark(ext4_journalled_write_end, 1698 trace_ext4_journalled_write_end(inode, pos, len, copied);
1709 "dev %s ino %lu pos %llu len %u copied %u",
1710 inode->i_sb->s_id, inode->i_ino,
1711 (unsigned long long) pos, len, copied);
1712 from = pos & (PAGE_CACHE_SIZE - 1); 1699 from = pos & (PAGE_CACHE_SIZE - 1);
1713 to = from + len; 1700 to = from + len;
1714 1701
@@ -1747,7 +1734,7 @@ static int ext4_journalled_write_end(struct file *file,
1747 ret = ret2; 1734 ret = ret2;
1748 if (pos + len > inode->i_size) { 1735 if (pos + len > inode->i_size) {
1749 vmtruncate(inode, inode->i_size); 1736 vmtruncate(inode, inode->i_size);
1750 /* 1737 /*
1751 * If vmtruncate failed early the inode might still be 1738 * If vmtruncate failed early the inode might still be
1752 * on the orphan list; we need to make sure the inode 1739 * on the orphan list; we need to make sure the inode
1753 * is removed from the orphan list in that case. 1740 * is removed from the orphan list in that case.
@@ -1854,7 +1841,7 @@ static void ext4_da_release_space(struct inode *inode, int to_free)
1854} 1841}
1855 1842
1856static void ext4_da_page_release_reservation(struct page *page, 1843static void ext4_da_page_release_reservation(struct page *page,
1857 unsigned long offset) 1844 unsigned long offset)
1858{ 1845{
1859 int to_release = 0; 1846 int to_release = 0;
1860 struct buffer_head *head, *bh; 1847 struct buffer_head *head, *bh;
@@ -2554,9 +2541,7 @@ static int ext4_da_writepage(struct page *page,
2554 struct buffer_head *page_bufs; 2541 struct buffer_head *page_bufs;
2555 struct inode *inode = page->mapping->host; 2542 struct inode *inode = page->mapping->host;
2556 2543
2557 trace_mark(ext4_da_writepage, 2544 trace_ext4_da_writepage(inode, page);
2558 "dev %s ino %lu page_index %lu",
2559 inode->i_sb->s_id, inode->i_ino, page->index);
2560 size = i_size_read(inode); 2545 size = i_size_read(inode);
2561 if (page->index == size >> PAGE_CACHE_SHIFT) 2546 if (page->index == size >> PAGE_CACHE_SHIFT)
2562 len = size & ~PAGE_CACHE_MASK; 2547 len = size & ~PAGE_CACHE_MASK;
@@ -2667,19 +2652,7 @@ static int ext4_da_writepages(struct address_space *mapping,
2667 int needed_blocks, ret = 0, nr_to_writebump = 0; 2652 int needed_blocks, ret = 0, nr_to_writebump = 0;
2668 struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb); 2653 struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb);
2669 2654
2670 trace_mark(ext4_da_writepages, 2655 trace_ext4_da_writepages(inode, wbc);
2671 "dev %s ino %lu nr_t_write %ld "
2672 "pages_skipped %ld range_start %llu "
2673 "range_end %llu nonblocking %d "
2674 "for_kupdate %d for_reclaim %d "
2675 "for_writepages %d range_cyclic %d",
2676 inode->i_sb->s_id, inode->i_ino,
2677 wbc->nr_to_write, wbc->pages_skipped,
2678 (unsigned long long) wbc->range_start,
2679 (unsigned long long) wbc->range_end,
2680 wbc->nonblocking, wbc->for_kupdate,
2681 wbc->for_reclaim, wbc->for_writepages,
2682 wbc->range_cyclic);
2683 2656
2684 /* 2657 /*
2685 * No pages to write? This is mainly a kludge to avoid starting 2658 * No pages to write? This is mainly a kludge to avoid starting
@@ -2693,13 +2666,13 @@ static int ext4_da_writepages(struct address_space *mapping,
2693 * If the filesystem has aborted, it is read-only, so return 2666 * If the filesystem has aborted, it is read-only, so return
2694 * right away instead of dumping stack traces later on that 2667 * right away instead of dumping stack traces later on that
2695 * will obscure the real source of the problem. We test 2668 * will obscure the real source of the problem. We test
2696 * EXT4_MOUNT_ABORT instead of sb->s_flag's MS_RDONLY because 2669 * EXT4_MF_FS_ABORTED instead of sb->s_flag's MS_RDONLY because
2697 * the latter could be true if the filesystem is mounted 2670 * the latter could be true if the filesystem is mounted
2698 * read-only, and in that case, ext4_da_writepages should 2671 * read-only, and in that case, ext4_da_writepages should
2699 * *never* be called, so if that ever happens, we would want 2672 * *never* be called, so if that ever happens, we would want
2700 * the stack trace. 2673 * the stack trace.
2701 */ 2674 */
2702 if (unlikely(sbi->s_mount_opt & EXT4_MOUNT_ABORT)) 2675 if (unlikely(sbi->s_mount_flags & EXT4_MF_FS_ABORTED))
2703 return -EROFS; 2676 return -EROFS;
2704 2677
2705 /* 2678 /*
@@ -2845,14 +2818,7 @@ out_writepages:
2845 if (!no_nrwrite_index_update) 2818 if (!no_nrwrite_index_update)
2846 wbc->no_nrwrite_index_update = 0; 2819 wbc->no_nrwrite_index_update = 0;
2847 wbc->nr_to_write -= nr_to_writebump; 2820 wbc->nr_to_write -= nr_to_writebump;
2848 trace_mark(ext4_da_writepage_result, 2821 trace_ext4_da_writepages_result(inode, wbc, ret, pages_written);
2849 "dev %s ino %lu ret %d pages_written %d "
2850 "pages_skipped %ld congestion %d "
2851 "more_io %d no_nrwrite_index_update %d",
2852 inode->i_sb->s_id, inode->i_ino, ret,
2853 pages_written, wbc->pages_skipped,
2854 wbc->encountered_congestion, wbc->more_io,
2855 wbc->no_nrwrite_index_update);
2856 return ret; 2822 return ret;
2857} 2823}
2858 2824
@@ -2884,8 +2850,8 @@ static int ext4_nonda_switch(struct super_block *sb)
2884} 2850}
2885 2851
2886static int ext4_da_write_begin(struct file *file, struct address_space *mapping, 2852static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
2887 loff_t pos, unsigned len, unsigned flags, 2853 loff_t pos, unsigned len, unsigned flags,
2888 struct page **pagep, void **fsdata) 2854 struct page **pagep, void **fsdata)
2889{ 2855{
2890 int ret, retries = 0; 2856 int ret, retries = 0;
2891 struct page *page; 2857 struct page *page;
@@ -2904,11 +2870,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
2904 len, flags, pagep, fsdata); 2870 len, flags, pagep, fsdata);
2905 } 2871 }
2906 *fsdata = (void *)0; 2872 *fsdata = (void *)0;
2907 2873 trace_ext4_da_write_begin(inode, pos, len, flags);
2908 trace_mark(ext4_da_write_begin,
2909 "dev %s ino %lu pos %llu len %u flags %u",
2910 inode->i_sb->s_id, inode->i_ino,
2911 (unsigned long long) pos, len, flags);
2912retry: 2874retry:
2913 /* 2875 /*
2914 * With delayed allocation, we don't log the i_disksize update 2876 * With delayed allocation, we don't log the i_disksize update
@@ -2959,7 +2921,7 @@ out:
2959 * when write to the end of file but not require block allocation 2921 * when write to the end of file but not require block allocation
2960 */ 2922 */
2961static int ext4_da_should_update_i_disksize(struct page *page, 2923static int ext4_da_should_update_i_disksize(struct page *page,
2962 unsigned long offset) 2924 unsigned long offset)
2963{ 2925{
2964 struct buffer_head *bh; 2926 struct buffer_head *bh;
2965 struct inode *inode = page->mapping->host; 2927 struct inode *inode = page->mapping->host;
@@ -2978,9 +2940,9 @@ static int ext4_da_should_update_i_disksize(struct page *page,
2978} 2940}
2979 2941
2980static int ext4_da_write_end(struct file *file, 2942static int ext4_da_write_end(struct file *file,
2981 struct address_space *mapping, 2943 struct address_space *mapping,
2982 loff_t pos, unsigned len, unsigned copied, 2944 loff_t pos, unsigned len, unsigned copied,
2983 struct page *page, void *fsdata) 2945 struct page *page, void *fsdata)
2984{ 2946{
2985 struct inode *inode = mapping->host; 2947 struct inode *inode = mapping->host;
2986 int ret = 0, ret2; 2948 int ret = 0, ret2;
@@ -3001,10 +2963,7 @@ static int ext4_da_write_end(struct file *file,
3001 } 2963 }
3002 } 2964 }
3003 2965
3004 trace_mark(ext4_da_write_end, 2966 trace_ext4_da_write_end(inode, pos, len, copied);
3005 "dev %s ino %lu pos %llu len %u copied %u",
3006 inode->i_sb->s_id, inode->i_ino,
3007 (unsigned long long) pos, len, copied);
3008 start = pos & (PAGE_CACHE_SIZE - 1); 2967 start = pos & (PAGE_CACHE_SIZE - 1);
3009 end = start + copied - 1; 2968 end = start + copied - 1;
3010 2969
@@ -3081,7 +3040,7 @@ int ext4_alloc_da_blocks(struct inode *inode)
3081 * not strictly speaking necessary (and for users of 3040 * not strictly speaking necessary (and for users of
3082 * laptop_mode, not even desirable). However, to do otherwise 3041 * laptop_mode, not even desirable). However, to do otherwise
3083 * would require replicating code paths in: 3042 * would require replicating code paths in:
3084 * 3043 *
3085 * ext4_da_writepages() -> 3044 * ext4_da_writepages() ->
3086 * write_cache_pages() ---> (via passed in callback function) 3045 * write_cache_pages() ---> (via passed in callback function)
3087 * __mpage_da_writepage() --> 3046 * __mpage_da_writepage() -->
@@ -3101,7 +3060,7 @@ int ext4_alloc_da_blocks(struct inode *inode)
3101 * write out the pages, but rather only collect contiguous 3060 * write out the pages, but rather only collect contiguous
3102 * logical block extents, call the multi-block allocator, and 3061 * logical block extents, call the multi-block allocator, and
3103 * then update the buffer heads with the block allocations. 3062 * then update the buffer heads with the block allocations.
3104 * 3063 *
3105 * For now, though, we'll cheat by calling filemap_flush(), 3064 * For now, though, we'll cheat by calling filemap_flush(),
3106 * which will map the blocks, and start the I/O, but not 3065 * which will map the blocks, and start the I/O, but not
3107 * actually wait for the I/O to complete. 3066 * actually wait for the I/O to complete.
@@ -3237,7 +3196,7 @@ static int bput_one(handle_t *handle, struct buffer_head *bh)
3237 * 3196 *
3238 */ 3197 */
3239static int __ext4_normal_writepage(struct page *page, 3198static int __ext4_normal_writepage(struct page *page,
3240 struct writeback_control *wbc) 3199 struct writeback_control *wbc)
3241{ 3200{
3242 struct inode *inode = page->mapping->host; 3201 struct inode *inode = page->mapping->host;
3243 3202
@@ -3249,15 +3208,13 @@ static int __ext4_normal_writepage(struct page *page,
3249} 3208}
3250 3209
3251static int ext4_normal_writepage(struct page *page, 3210static int ext4_normal_writepage(struct page *page,
3252 struct writeback_control *wbc) 3211 struct writeback_control *wbc)
3253{ 3212{
3254 struct inode *inode = page->mapping->host; 3213 struct inode *inode = page->mapping->host;
3255 loff_t size = i_size_read(inode); 3214 loff_t size = i_size_read(inode);
3256 loff_t len; 3215 loff_t len;
3257 3216
3258 trace_mark(ext4_normal_writepage, 3217 trace_ext4_normal_writepage(inode, page);
3259 "dev %s ino %lu page_index %lu",
3260 inode->i_sb->s_id, inode->i_ino, page->index);
3261 J_ASSERT(PageLocked(page)); 3218 J_ASSERT(PageLocked(page));
3262 if (page->index == size >> PAGE_CACHE_SHIFT) 3219 if (page->index == size >> PAGE_CACHE_SHIFT)
3263 len = size & ~PAGE_CACHE_MASK; 3220 len = size & ~PAGE_CACHE_MASK;
@@ -3287,7 +3244,7 @@ static int ext4_normal_writepage(struct page *page,
3287} 3244}
3288 3245
3289static int __ext4_journalled_writepage(struct page *page, 3246static int __ext4_journalled_writepage(struct page *page,
3290 struct writeback_control *wbc) 3247 struct writeback_control *wbc)
3291{ 3248{
3292 struct address_space *mapping = page->mapping; 3249 struct address_space *mapping = page->mapping;
3293 struct inode *inode = mapping->host; 3250 struct inode *inode = mapping->host;
@@ -3337,15 +3294,13 @@ out:
3337} 3294}
3338 3295
3339static int ext4_journalled_writepage(struct page *page, 3296static int ext4_journalled_writepage(struct page *page,
3340 struct writeback_control *wbc) 3297 struct writeback_control *wbc)
3341{ 3298{
3342 struct inode *inode = page->mapping->host; 3299 struct inode *inode = page->mapping->host;
3343 loff_t size = i_size_read(inode); 3300 loff_t size = i_size_read(inode);
3344 loff_t len; 3301 loff_t len;
3345 3302
3346 trace_mark(ext4_journalled_writepage, 3303 trace_ext4_journalled_writepage(inode, page);
3347 "dev %s ino %lu page_index %lu",
3348 inode->i_sb->s_id, inode->i_ino, page->index);
3349 J_ASSERT(PageLocked(page)); 3304 J_ASSERT(PageLocked(page));
3350 if (page->index == size >> PAGE_CACHE_SHIFT) 3305 if (page->index == size >> PAGE_CACHE_SHIFT)
3351 len = size & ~PAGE_CACHE_MASK; 3306 len = size & ~PAGE_CACHE_MASK;
@@ -3442,8 +3397,8 @@ static int ext4_releasepage(struct page *page, gfp_t wait)
3442 * VFS code falls back into buffered path in that case so we are safe. 3397 * VFS code falls back into buffered path in that case so we are safe.
3443 */ 3398 */
3444static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb, 3399static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
3445 const struct iovec *iov, loff_t offset, 3400 const struct iovec *iov, loff_t offset,
3446 unsigned long nr_segs) 3401 unsigned long nr_segs)
3447{ 3402{
3448 struct file *file = iocb->ki_filp; 3403 struct file *file = iocb->ki_filp;
3449 struct inode *inode = file->f_mapping->host; 3404 struct inode *inode = file->f_mapping->host;
@@ -3763,7 +3718,8 @@ static inline int all_zeroes(__le32 *p, __le32 *q)
3763 * (no partially truncated stuff there). */ 3718 * (no partially truncated stuff there). */
3764 3719
3765static Indirect *ext4_find_shared(struct inode *inode, int depth, 3720static Indirect *ext4_find_shared(struct inode *inode, int depth,
3766 ext4_lblk_t offsets[4], Indirect chain[4], __le32 *top) 3721 ext4_lblk_t offsets[4], Indirect chain[4],
3722 __le32 *top)
3767{ 3723{
3768 Indirect *partial, *p; 3724 Indirect *partial, *p;
3769 int k, err; 3725 int k, err;
@@ -3819,8 +3775,10 @@ no_top:
3819 * than `count' because there can be holes in there. 3775 * than `count' because there can be holes in there.
3820 */ 3776 */
3821static void ext4_clear_blocks(handle_t *handle, struct inode *inode, 3777static void ext4_clear_blocks(handle_t *handle, struct inode *inode,
3822 struct buffer_head *bh, ext4_fsblk_t block_to_free, 3778 struct buffer_head *bh,
3823 unsigned long count, __le32 *first, __le32 *last) 3779 ext4_fsblk_t block_to_free,
3780 unsigned long count, __le32 *first,
3781 __le32 *last)
3824{ 3782{
3825 __le32 *p; 3783 __le32 *p;
3826 if (try_to_extend_transaction(handle, inode)) { 3784 if (try_to_extend_transaction(handle, inode)) {
@@ -3837,10 +3795,11 @@ static void ext4_clear_blocks(handle_t *handle, struct inode *inode,
3837 } 3795 }
3838 3796
3839 /* 3797 /*
3840 * Any buffers which are on the journal will be in memory. We find 3798 * Any buffers which are on the journal will be in memory. We
3841 * them on the hash table so jbd2_journal_revoke() will run jbd2_journal_forget() 3799 * find them on the hash table so jbd2_journal_revoke() will
3842 * on them. We've already detached each block from the file, so 3800 * run jbd2_journal_forget() on them. We've already detached
3843 * bforget() in jbd2_journal_forget() should be safe. 3801 * each block from the file, so bforget() in
3802 * jbd2_journal_forget() should be safe.
3844 * 3803 *
3845 * AKPM: turn on bforget in jbd2_journal_forget()!!! 3804 * AKPM: turn on bforget in jbd2_journal_forget()!!!
3846 */ 3805 */
@@ -4212,7 +4171,7 @@ void ext4_truncate(struct inode *inode)
4212 (__le32*)partial->bh->b_data+addr_per_block, 4171 (__le32*)partial->bh->b_data+addr_per_block,
4213 (chain+n-1) - partial); 4172 (chain+n-1) - partial);
4214 BUFFER_TRACE(partial->bh, "call brelse"); 4173 BUFFER_TRACE(partial->bh, "call brelse");
4215 brelse (partial->bh); 4174 brelse(partial->bh);
4216 partial--; 4175 partial--;
4217 } 4176 }
4218do_indirects: 4177do_indirects:
@@ -4453,8 +4412,9 @@ void ext4_get_inode_flags(struct ext4_inode_info *ei)
4453 if (flags & S_DIRSYNC) 4412 if (flags & S_DIRSYNC)
4454 ei->i_flags |= EXT4_DIRSYNC_FL; 4413 ei->i_flags |= EXT4_DIRSYNC_FL;
4455} 4414}
4415
4456static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode, 4416static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode,
4457 struct ext4_inode_info *ei) 4417 struct ext4_inode_info *ei)
4458{ 4418{
4459 blkcnt_t i_blocks ; 4419 blkcnt_t i_blocks ;
4460 struct inode *inode = &(ei->vfs_inode); 4420 struct inode *inode = &(ei->vfs_inode);
@@ -4569,7 +4529,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4569 EXT4_GOOD_OLD_INODE_SIZE + 4529 EXT4_GOOD_OLD_INODE_SIZE +
4570 ei->i_extra_isize; 4530 ei->i_extra_isize;
4571 if (*magic == cpu_to_le32(EXT4_XATTR_MAGIC)) 4531 if (*magic == cpu_to_le32(EXT4_XATTR_MAGIC))
4572 ei->i_state |= EXT4_STATE_XATTR; 4532 ei->i_state |= EXT4_STATE_XATTR;
4573 } 4533 }
4574 } else 4534 } else
4575 ei->i_extra_isize = 0; 4535 ei->i_extra_isize = 0;
@@ -4588,7 +4548,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4588 4548
4589 ret = 0; 4549 ret = 0;
4590 if (ei->i_file_acl && 4550 if (ei->i_file_acl &&
4591 ((ei->i_file_acl < 4551 ((ei->i_file_acl <
4592 (le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block) + 4552 (le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block) +
4593 EXT4_SB(sb)->s_gdb_count)) || 4553 EXT4_SB(sb)->s_gdb_count)) ||
4594 (ei->i_file_acl >= ext4_blocks_count(EXT4_SB(sb)->s_es)))) { 4554 (ei->i_file_acl >= ext4_blocks_count(EXT4_SB(sb)->s_es)))) {
@@ -4603,15 +4563,15 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4603 !ext4_inode_is_fast_symlink(inode))) 4563 !ext4_inode_is_fast_symlink(inode)))
4604 /* Validate extent which is part of inode */ 4564 /* Validate extent which is part of inode */
4605 ret = ext4_ext_check_inode(inode); 4565 ret = ext4_ext_check_inode(inode);
4606 } else if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || 4566 } else if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
4607 (S_ISLNK(inode->i_mode) && 4567 (S_ISLNK(inode->i_mode) &&
4608 !ext4_inode_is_fast_symlink(inode))) { 4568 !ext4_inode_is_fast_symlink(inode))) {
4609 /* Validate block references which are part of inode */ 4569 /* Validate block references which are part of inode */
4610 ret = ext4_check_inode_blockref(inode); 4570 ret = ext4_check_inode_blockref(inode);
4611 } 4571 }
4612 if (ret) { 4572 if (ret) {
4613 brelse(bh); 4573 brelse(bh);
4614 goto bad_inode; 4574 goto bad_inode;
4615 } 4575 }
4616 4576
4617 if (S_ISREG(inode->i_mode)) { 4577 if (S_ISREG(inode->i_mode)) {
@@ -4642,7 +4602,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4642 } else { 4602 } else {
4643 brelse(bh); 4603 brelse(bh);
4644 ret = -EIO; 4604 ret = -EIO;
4645 ext4_error(inode->i_sb, __func__, 4605 ext4_error(inode->i_sb, __func__,
4646 "bogus i_mode (%o) for inode=%lu", 4606 "bogus i_mode (%o) for inode=%lu",
4647 inode->i_mode, inode->i_ino); 4607 inode->i_mode, inode->i_ino);
4648 goto bad_inode; 4608 goto bad_inode;
@@ -4795,8 +4755,9 @@ static int ext4_do_update_inode(handle_t *handle,
4795 cpu_to_le32(new_encode_dev(inode->i_rdev)); 4755 cpu_to_le32(new_encode_dev(inode->i_rdev));
4796 raw_inode->i_block[2] = 0; 4756 raw_inode->i_block[2] = 0;
4797 } 4757 }
4798 } else for (block = 0; block < EXT4_N_BLOCKS; block++) 4758 } else
4799 raw_inode->i_block[block] = ei->i_data[block]; 4759 for (block = 0; block < EXT4_N_BLOCKS; block++)
4760 raw_inode->i_block[block] = ei->i_data[block];
4800 4761
4801 raw_inode->i_disk_version = cpu_to_le32(inode->i_version); 4762 raw_inode->i_disk_version = cpu_to_le32(inode->i_version);
4802 if (ei->i_extra_isize) { 4763 if (ei->i_extra_isize) {
@@ -5150,7 +5111,7 @@ int ext4_chunk_trans_blocks(struct inode *inode, int nrblocks)
5150 * Give this, we know that the caller already has write access to iloc->bh. 5111 * Give this, we know that the caller already has write access to iloc->bh.
5151 */ 5112 */
5152int ext4_mark_iloc_dirty(handle_t *handle, 5113int ext4_mark_iloc_dirty(handle_t *handle,
5153 struct inode *inode, struct ext4_iloc *iloc) 5114 struct inode *inode, struct ext4_iloc *iloc)
5154{ 5115{
5155 int err = 0; 5116 int err = 0;
5156 5117
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 91e75f7a9e73..bb415408fdb6 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -14,6 +14,7 @@
14#include <linux/compat.h> 14#include <linux/compat.h>
15#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
16#include <linux/mount.h> 16#include <linux/mount.h>
17#include <linux/file.h>
17#include <asm/uaccess.h> 18#include <asm/uaccess.h>
18#include "ext4_jbd2.h" 19#include "ext4_jbd2.h"
19#include "ext4.h" 20#include "ext4.h"
@@ -213,6 +214,41 @@ setversion_out:
213 214
214 return err; 215 return err;
215 } 216 }
217
218 case EXT4_IOC_MOVE_EXT: {
219 struct move_extent me;
220 struct file *donor_filp;
221 int err;
222
223 if (copy_from_user(&me,
224 (struct move_extent __user *)arg, sizeof(me)))
225 return -EFAULT;
226
227 donor_filp = fget(me.donor_fd);
228 if (!donor_filp)
229 return -EBADF;
230
231 if (!capable(CAP_DAC_OVERRIDE)) {
232 if ((current->real_cred->fsuid != inode->i_uid) ||
233 !(inode->i_mode & S_IRUSR) ||
234 !(donor_filp->f_dentry->d_inode->i_mode &
235 S_IRUSR)) {
236 fput(donor_filp);
237 return -EACCES;
238 }
239 }
240
241 err = ext4_move_extents(filp, donor_filp, me.orig_start,
242 me.donor_start, me.len, &me.moved_len);
243 fput(donor_filp);
244
245 if (!err)
246 if (copy_to_user((struct move_extent *)arg,
247 &me, sizeof(me)))
248 return -EFAULT;
249 return err;
250 }
251
216 case EXT4_IOC_GROUP_ADD: { 252 case EXT4_IOC_GROUP_ADD: {
217 struct ext4_new_group_data input; 253 struct ext4_new_group_data input;
218 struct super_block *sb = inode->i_sb; 254 struct super_block *sb = inode->i_sb;
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index ed8482e22c0e..519a0a686d94 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -22,6 +22,8 @@
22 */ 22 */
23 23
24#include "mballoc.h" 24#include "mballoc.h"
25#include <trace/events/ext4.h>
26
25/* 27/*
26 * MUSTDO: 28 * MUSTDO:
27 * - test ext4_ext_search_left() and ext4_ext_search_right() 29 * - test ext4_ext_search_left() and ext4_ext_search_right()
@@ -340,8 +342,6 @@ static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
340 ext4_group_t group); 342 ext4_group_t group);
341static void release_blocks_on_commit(journal_t *journal, transaction_t *txn); 343static void release_blocks_on_commit(journal_t *journal, transaction_t *txn);
342 344
343
344
345static inline void *mb_correct_addr_and_bit(int *bit, void *addr) 345static inline void *mb_correct_addr_and_bit(int *bit, void *addr)
346{ 346{
347#if BITS_PER_LONG == 64 347#if BITS_PER_LONG == 64
@@ -2859,9 +2859,8 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn)
2859 discard_block = (ext4_fsblk_t) entry->group * EXT4_BLOCKS_PER_GROUP(sb) 2859 discard_block = (ext4_fsblk_t) entry->group * EXT4_BLOCKS_PER_GROUP(sb)
2860 + entry->start_blk 2860 + entry->start_blk
2861 + le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block); 2861 + le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
2862 trace_mark(ext4_discard_blocks, "dev %s blk %llu count %u", 2862 trace_ext4_discard_blocks(sb, (unsigned long long)discard_block,
2863 sb->s_id, (unsigned long long) discard_block, 2863 entry->count);
2864 entry->count);
2865 sb_issue_discard(sb, discard_block, entry->count); 2864 sb_issue_discard(sb, discard_block, entry->count);
2866 2865
2867 kmem_cache_free(ext4_free_ext_cachep, entry); 2866 kmem_cache_free(ext4_free_ext_cachep, entry);
@@ -3629,10 +3628,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
3629 3628
3630 mb_debug("new inode pa %p: %llu/%u for %u\n", pa, 3629 mb_debug("new inode pa %p: %llu/%u for %u\n", pa,
3631 pa->pa_pstart, pa->pa_len, pa->pa_lstart); 3630 pa->pa_pstart, pa->pa_len, pa->pa_lstart);
3632 trace_mark(ext4_mb_new_inode_pa, 3631 trace_ext4_mb_new_inode_pa(ac, pa);
3633 "dev %s ino %lu pstart %llu len %u lstart %u",
3634 sb->s_id, ac->ac_inode->i_ino,
3635 pa->pa_pstart, pa->pa_len, pa->pa_lstart);
3636 3632
3637 ext4_mb_use_inode_pa(ac, pa); 3633 ext4_mb_use_inode_pa(ac, pa);
3638 atomic_add(pa->pa_free, &EXT4_SB(sb)->s_mb_preallocated); 3634 atomic_add(pa->pa_free, &EXT4_SB(sb)->s_mb_preallocated);
@@ -3691,9 +3687,8 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
3691 pa->pa_type = MB_GROUP_PA; 3687 pa->pa_type = MB_GROUP_PA;
3692 3688
3693 mb_debug("new group pa %p: %llu/%u for %u\n", pa, 3689 mb_debug("new group pa %p: %llu/%u for %u\n", pa,
3694 pa->pa_pstart, pa->pa_len, pa->pa_lstart); 3690 pa->pa_pstart, pa->pa_len, pa->pa_lstart);
3695 trace_mark(ext4_mb_new_group_pa, "dev %s pstart %llu len %u lstart %u", 3691 trace_ext4_mb_new_group_pa(ac, pa);
3696 sb->s_id, pa->pa_pstart, pa->pa_len, pa->pa_lstart);
3697 3692
3698 ext4_mb_use_group_pa(ac, pa); 3693 ext4_mb_use_group_pa(ac, pa);
3699 atomic_add(pa->pa_free, &EXT4_SB(sb)->s_mb_preallocated); 3694 atomic_add(pa->pa_free, &EXT4_SB(sb)->s_mb_preallocated);
@@ -3783,10 +3778,8 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
3783 ext4_mb_store_history(ac); 3778 ext4_mb_store_history(ac);
3784 } 3779 }
3785 3780
3786 trace_mark(ext4_mb_release_inode_pa, 3781 trace_ext4_mb_release_inode_pa(ac, pa, grp_blk_start + bit,
3787 "dev %s ino %lu block %llu count %u", 3782 next - bit);
3788 sb->s_id, pa->pa_inode->i_ino, grp_blk_start + bit,
3789 next - bit);
3790 mb_free_blocks(pa->pa_inode, e4b, bit, next - bit); 3783 mb_free_blocks(pa->pa_inode, e4b, bit, next - bit);
3791 bit = next + 1; 3784 bit = next + 1;
3792 } 3785 }
@@ -3820,8 +3813,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
3820 if (ac) 3813 if (ac)
3821 ac->ac_op = EXT4_MB_HISTORY_DISCARD; 3814 ac->ac_op = EXT4_MB_HISTORY_DISCARD;
3822 3815
3823 trace_mark(ext4_mb_release_group_pa, "dev %s pstart %llu len %d", 3816 trace_ext4_mb_release_group_pa(ac, pa);
3824 sb->s_id, pa->pa_pstart, pa->pa_len);
3825 BUG_ON(pa->pa_deleted == 0); 3817 BUG_ON(pa->pa_deleted == 0);
3826 ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); 3818 ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit);
3827 BUG_ON(group != e4b->bd_group && pa->pa_len != 0); 3819 BUG_ON(group != e4b->bd_group && pa->pa_len != 0);
@@ -3889,6 +3881,8 @@ ext4_mb_discard_group_preallocations(struct super_block *sb,
3889 3881
3890 INIT_LIST_HEAD(&list); 3882 INIT_LIST_HEAD(&list);
3891 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); 3883 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
3884 if (ac)
3885 ac->ac_sb = sb;
3892repeat: 3886repeat:
3893 ext4_lock_group(sb, group); 3887 ext4_lock_group(sb, group);
3894 list_for_each_entry_safe(pa, tmp, 3888 list_for_each_entry_safe(pa, tmp,
@@ -3987,12 +3981,15 @@ void ext4_discard_preallocations(struct inode *inode)
3987 } 3981 }
3988 3982
3989 mb_debug("discard preallocation for inode %lu\n", inode->i_ino); 3983 mb_debug("discard preallocation for inode %lu\n", inode->i_ino);
3990 trace_mark(ext4_discard_preallocations, "dev %s ino %lu", sb->s_id, 3984 trace_ext4_discard_preallocations(inode);
3991 inode->i_ino);
3992 3985
3993 INIT_LIST_HEAD(&list); 3986 INIT_LIST_HEAD(&list);
3994 3987
3995 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); 3988 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
3989 if (ac) {
3990 ac->ac_sb = sb;
3991 ac->ac_inode = inode;
3992 }
3996repeat: 3993repeat:
3997 /* first, collect all pa's in the inode */ 3994 /* first, collect all pa's in the inode */
3998 spin_lock(&ei->i_prealloc_lock); 3995 spin_lock(&ei->i_prealloc_lock);
@@ -4276,6 +4273,8 @@ ext4_mb_discard_lg_preallocations(struct super_block *sb,
4276 4273
4277 INIT_LIST_HEAD(&discard_list); 4274 INIT_LIST_HEAD(&discard_list);
4278 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); 4275 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
4276 if (ac)
4277 ac->ac_sb = sb;
4279 4278
4280 spin_lock(&lg->lg_prealloc_lock); 4279 spin_lock(&lg->lg_prealloc_lock);
4281 list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[order], 4280 list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[order],
@@ -4445,8 +4444,7 @@ static int ext4_mb_discard_preallocations(struct super_block *sb, int needed)
4445 int ret; 4444 int ret;
4446 int freed = 0; 4445 int freed = 0;
4447 4446
4448 trace_mark(ext4_mb_discard_preallocations, "dev %s needed %d", 4447 trace_ext4_mb_discard_preallocations(sb, needed);
4449 sb->s_id, needed);
4450 for (i = 0; i < ngroups && needed > 0; i++) { 4448 for (i = 0; i < ngroups && needed > 0; i++) {
4451 ret = ext4_mb_discard_group_preallocations(sb, i, needed); 4449 ret = ext4_mb_discard_group_preallocations(sb, i, needed);
4452 freed += ret; 4450 freed += ret;
@@ -4475,17 +4473,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
4475 sb = ar->inode->i_sb; 4473 sb = ar->inode->i_sb;
4476 sbi = EXT4_SB(sb); 4474 sbi = EXT4_SB(sb);
4477 4475
4478 trace_mark(ext4_request_blocks, "dev %s flags %u len %u ino %lu " 4476 trace_ext4_request_blocks(ar);
4479 "lblk %llu goal %llu lleft %llu lright %llu "
4480 "pleft %llu pright %llu ",
4481 sb->s_id, ar->flags, ar->len,
4482 ar->inode ? ar->inode->i_ino : 0,
4483 (unsigned long long) ar->logical,
4484 (unsigned long long) ar->goal,
4485 (unsigned long long) ar->lleft,
4486 (unsigned long long) ar->lright,
4487 (unsigned long long) ar->pleft,
4488 (unsigned long long) ar->pright);
4489 4477
4490 /* 4478 /*
4491 * For delayed allocation, we could skip the ENOSPC and 4479 * For delayed allocation, we could skip the ENOSPC and
@@ -4521,7 +4509,10 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
4521 } 4509 }
4522 4510
4523 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); 4511 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
4524 if (!ac) { 4512 if (ac) {
4513 ac->ac_sb = sb;
4514 ac->ac_inode = ar->inode;
4515 } else {
4525 ar->len = 0; 4516 ar->len = 0;
4526 *errp = -ENOMEM; 4517 *errp = -ENOMEM;
4527 goto out1; 4518 goto out1;
@@ -4594,18 +4585,7 @@ out3:
4594 reserv_blks); 4585 reserv_blks);
4595 } 4586 }
4596 4587
4597 trace_mark(ext4_allocate_blocks, 4588 trace_ext4_allocate_blocks(ar, (unsigned long long)block);
4598 "dev %s block %llu flags %u len %u ino %lu "
4599 "logical %llu goal %llu lleft %llu lright %llu "
4600 "pleft %llu pright %llu ",
4601 sb->s_id, (unsigned long long) block,
4602 ar->flags, ar->len, ar->inode ? ar->inode->i_ino : 0,
4603 (unsigned long long) ar->logical,
4604 (unsigned long long) ar->goal,
4605 (unsigned long long) ar->lleft,
4606 (unsigned long long) ar->lright,
4607 (unsigned long long) ar->pleft,
4608 (unsigned long long) ar->pright);
4609 4589
4610 return block; 4590 return block;
4611} 4591}
@@ -4709,7 +4689,7 @@ ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
4709 * Main entry point into mballoc to free blocks 4689 * Main entry point into mballoc to free blocks
4710 */ 4690 */
4711void ext4_mb_free_blocks(handle_t *handle, struct inode *inode, 4691void ext4_mb_free_blocks(handle_t *handle, struct inode *inode,
4712 unsigned long block, unsigned long count, 4692 ext4_fsblk_t block, unsigned long count,
4713 int metadata, unsigned long *freed) 4693 int metadata, unsigned long *freed)
4714{ 4694{
4715 struct buffer_head *bitmap_bh = NULL; 4695 struct buffer_head *bitmap_bh = NULL;
@@ -4735,15 +4715,12 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode,
4735 block + count > ext4_blocks_count(es)) { 4715 block + count > ext4_blocks_count(es)) {
4736 ext4_error(sb, __func__, 4716 ext4_error(sb, __func__,
4737 "Freeing blocks not in datazone - " 4717 "Freeing blocks not in datazone - "
4738 "block = %lu, count = %lu", block, count); 4718 "block = %llu, count = %lu", block, count);
4739 goto error_return; 4719 goto error_return;
4740 } 4720 }
4741 4721
4742 ext4_debug("freeing block %lu\n", block); 4722 ext4_debug("freeing block %llu\n", block);
4743 trace_mark(ext4_free_blocks, 4723 trace_ext4_free_blocks(inode, block, count, metadata);
4744 "dev %s block %llu count %lu metadata %d ino %lu",
4745 sb->s_id, (unsigned long long) block, count, metadata,
4746 inode ? inode->i_ino : 0);
4747 4724
4748 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); 4725 ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
4749 if (ac) { 4726 if (ac) {
@@ -4784,7 +4761,7 @@ do_more:
4784 4761
4785 ext4_error(sb, __func__, 4762 ext4_error(sb, __func__,
4786 "Freeing blocks in system zone - " 4763 "Freeing blocks in system zone - "
4787 "Block = %lu, count = %lu", block, count); 4764 "Block = %llu, count = %lu", block, count);
4788 /* err = 0. ext4_std_error should be a no op */ 4765 /* err = 0. ext4_std_error should be a no op */
4789 goto error_return; 4766 goto error_return;
4790 } 4767 }
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h
index 75e34f69215b..c96bb19f58f9 100644
--- a/fs/ext4/mballoc.h
+++ b/fs/ext4/mballoc.h
@@ -19,7 +19,6 @@
19#include <linux/seq_file.h> 19#include <linux/seq_file.h>
20#include <linux/version.h> 20#include <linux/version.h>
21#include <linux/blkdev.h> 21#include <linux/blkdev.h>
22#include <linux/marker.h>
23#include <linux/mutex.h> 22#include <linux/mutex.h>
24#include "ext4_jbd2.h" 23#include "ext4_jbd2.h"
25#include "ext4.h" 24#include "ext4.h"
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index fe64d9f79852..313a50b39741 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -458,6 +458,7 @@ int ext4_ext_migrate(struct inode *inode)
458 struct inode *tmp_inode = NULL; 458 struct inode *tmp_inode = NULL;
459 struct list_blocks_struct lb; 459 struct list_blocks_struct lb;
460 unsigned long max_entries; 460 unsigned long max_entries;
461 __u32 goal;
461 462
462 /* 463 /*
463 * If the filesystem does not support extents, or the inode 464 * If the filesystem does not support extents, or the inode
@@ -483,9 +484,10 @@ int ext4_ext_migrate(struct inode *inode)
483 retval = PTR_ERR(handle); 484 retval = PTR_ERR(handle);
484 return retval; 485 return retval;
485 } 486 }
486 tmp_inode = ext4_new_inode(handle, 487 goal = (((inode->i_ino - 1) / EXT4_INODES_PER_GROUP(inode->i_sb)) *
487 inode->i_sb->s_root->d_inode, 488 EXT4_INODES_PER_GROUP(inode->i_sb)) + 1;
488 S_IFREG); 489 tmp_inode = ext4_new_inode(handle, inode->i_sb->s_root->d_inode,
490 S_IFREG, 0, goal);
489 if (IS_ERR(tmp_inode)) { 491 if (IS_ERR(tmp_inode)) {
490 retval = -ENOMEM; 492 retval = -ENOMEM;
491 ext4_journal_stop(handle); 493 ext4_journal_stop(handle);
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
new file mode 100644
index 000000000000..bbf2dd9404dc
--- /dev/null
+++ b/fs/ext4/move_extent.c
@@ -0,0 +1,1320 @@
1/*
2 * Copyright (c) 2008,2009 NEC Software Tohoku, Ltd.
3 * Written by Takashi Sato <t-sato@yk.jp.nec.com>
4 * Akira Fujita <a-fujita@rs.jp.nec.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2.1 of the GNU Lesser General Public License
8 * as published 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
16#include <linux/fs.h>
17#include <linux/quotaops.h>
18#include "ext4_jbd2.h"
19#include "ext4_extents.h"
20#include "ext4.h"
21
22#define get_ext_path(path, inode, block, ret) \
23 do { \
24 path = ext4_ext_find_extent(inode, block, path); \
25 if (IS_ERR(path)) { \
26 ret = PTR_ERR(path); \
27 path = NULL; \
28 } \
29 } while (0)
30
31/**
32 * copy_extent_status - Copy the extent's initialization status
33 *
34 * @src: an extent for getting initialize status
35 * @dest: an extent to be set the status
36 */
37static void
38copy_extent_status(struct ext4_extent *src, struct ext4_extent *dest)
39{
40 if (ext4_ext_is_uninitialized(src))
41 ext4_ext_mark_uninitialized(dest);
42 else
43 dest->ee_len = cpu_to_le16(ext4_ext_get_actual_len(dest));
44}
45
46/**
47 * mext_next_extent - Search for the next extent and set it to "extent"
48 *
49 * @inode: inode which is searched
50 * @path: this will obtain data for the next extent
51 * @extent: pointer to the next extent we have just gotten
52 *
53 * Search the next extent in the array of ext4_ext_path structure (@path)
54 * and set it to ext4_extent structure (@extent). In addition, the member of
55 * @path (->p_ext) also points the next extent. Return 0 on success, 1 if
56 * ext4_ext_path structure refers to the last extent, or a negative error
57 * value on failure.
58 */
59static int
60mext_next_extent(struct inode *inode, struct ext4_ext_path *path,
61 struct ext4_extent **extent)
62{
63 int ppos, leaf_ppos = path->p_depth;
64
65 ppos = leaf_ppos;
66 if (EXT_LAST_EXTENT(path[ppos].p_hdr) > path[ppos].p_ext) {
67 /* leaf block */
68 *extent = ++path[ppos].p_ext;
69 return 0;
70 }
71
72 while (--ppos >= 0) {
73 if (EXT_LAST_INDEX(path[ppos].p_hdr) >
74 path[ppos].p_idx) {
75 int cur_ppos = ppos;
76
77 /* index block */
78 path[ppos].p_idx++;
79 path[ppos].p_block = idx_pblock(path[ppos].p_idx);
80 if (path[ppos+1].p_bh)
81 brelse(path[ppos+1].p_bh);
82 path[ppos+1].p_bh =
83 sb_bread(inode->i_sb, path[ppos].p_block);
84 if (!path[ppos+1].p_bh)
85 return -EIO;
86 path[ppos+1].p_hdr =
87 ext_block_hdr(path[ppos+1].p_bh);
88
89 /* Halfway index block */
90 while (++cur_ppos < leaf_ppos) {
91 path[cur_ppos].p_idx =
92 EXT_FIRST_INDEX(path[cur_ppos].p_hdr);
93 path[cur_ppos].p_block =
94 idx_pblock(path[cur_ppos].p_idx);
95 if (path[cur_ppos+1].p_bh)
96 brelse(path[cur_ppos+1].p_bh);
97 path[cur_ppos+1].p_bh = sb_bread(inode->i_sb,
98 path[cur_ppos].p_block);
99 if (!path[cur_ppos+1].p_bh)
100 return -EIO;
101 path[cur_ppos+1].p_hdr =
102 ext_block_hdr(path[cur_ppos+1].p_bh);
103 }
104
105 /* leaf block */
106 path[leaf_ppos].p_ext = *extent =
107 EXT_FIRST_EXTENT(path[leaf_ppos].p_hdr);
108 return 0;
109 }
110 }
111 /* We found the last extent */
112 return 1;
113}
114
115/**
116 * mext_double_down_read - Acquire two inodes' read semaphore
117 *
118 * @orig_inode: original inode structure
119 * @donor_inode: donor inode structure
120 * Acquire read semaphore of the two inodes (orig and donor) by i_ino order.
121 */
122static void
123mext_double_down_read(struct inode *orig_inode, struct inode *donor_inode)
124{
125 struct inode *first = orig_inode, *second = donor_inode;
126
127 BUG_ON(orig_inode == NULL || donor_inode == NULL);
128
129 /*
130 * Use the inode number to provide the stable locking order instead
131 * of its address, because the C language doesn't guarantee you can
132 * compare pointers that don't come from the same array.
133 */
134 if (donor_inode->i_ino < orig_inode->i_ino) {
135 first = donor_inode;
136 second = orig_inode;
137 }
138
139 down_read(&EXT4_I(first)->i_data_sem);
140 down_read(&EXT4_I(second)->i_data_sem);
141}
142
143/**
144 * mext_double_down_write - Acquire two inodes' write semaphore
145 *
146 * @orig_inode: original inode structure
147 * @donor_inode: donor inode structure
148 * Acquire write semaphore of the two inodes (orig and donor) by i_ino order.
149 */
150static void
151mext_double_down_write(struct inode *orig_inode, struct inode *donor_inode)
152{
153 struct inode *first = orig_inode, *second = donor_inode;
154
155 BUG_ON(orig_inode == NULL || donor_inode == NULL);
156
157 /*
158 * Use the inode number to provide the stable locking order instead
159 * of its address, because the C language doesn't guarantee you can
160 * compare pointers that don't come from the same array.
161 */
162 if (donor_inode->i_ino < orig_inode->i_ino) {
163 first = donor_inode;
164 second = orig_inode;
165 }
166
167 down_write(&EXT4_I(first)->i_data_sem);
168 down_write(&EXT4_I(second)->i_data_sem);
169}
170
171/**
172 * mext_double_up_read - Release two inodes' read semaphore
173 *
174 * @orig_inode: original inode structure to be released its lock first
175 * @donor_inode: donor inode structure to be released its lock second
176 * Release read semaphore of two inodes (orig and donor).
177 */
178static void
179mext_double_up_read(struct inode *orig_inode, struct inode *donor_inode)
180{
181 BUG_ON(orig_inode == NULL || donor_inode == NULL);
182
183 up_read(&EXT4_I(orig_inode)->i_data_sem);
184 up_read(&EXT4_I(donor_inode)->i_data_sem);
185}
186
187/**
188 * mext_double_up_write - Release two inodes' write semaphore
189 *
190 * @orig_inode: original inode structure to be released its lock first
191 * @donor_inode: donor inode structure to be released its lock second
192 * Release write semaphore of two inodes (orig and donor).
193 */
194static void
195mext_double_up_write(struct inode *orig_inode, struct inode *donor_inode)
196{
197 BUG_ON(orig_inode == NULL || donor_inode == NULL);
198
199 up_write(&EXT4_I(orig_inode)->i_data_sem);
200 up_write(&EXT4_I(donor_inode)->i_data_sem);
201}
202
203/**
204 * mext_insert_across_blocks - Insert extents across leaf block
205 *
206 * @handle: journal handle
207 * @orig_inode: original inode
208 * @o_start: first original extent to be changed
209 * @o_end: last original extent to be changed
210 * @start_ext: first new extent to be inserted
211 * @new_ext: middle of new extent to be inserted
212 * @end_ext: last new extent to be inserted
213 *
214 * Allocate a new leaf block and insert extents into it. Return 0 on success,
215 * or a negative error value on failure.
216 */
217static int
218mext_insert_across_blocks(handle_t *handle, struct inode *orig_inode,
219 struct ext4_extent *o_start, struct ext4_extent *o_end,
220 struct ext4_extent *start_ext, struct ext4_extent *new_ext,
221 struct ext4_extent *end_ext)
222{
223 struct ext4_ext_path *orig_path = NULL;
224 ext4_lblk_t eblock = 0;
225 int new_flag = 0;
226 int end_flag = 0;
227 int err = 0;
228
229 if (start_ext->ee_len && new_ext->ee_len && end_ext->ee_len) {
230 if (o_start == o_end) {
231
232 /* start_ext new_ext end_ext
233 * donor |---------|-----------|--------|
234 * orig |------------------------------|
235 */
236 end_flag = 1;
237 } else {
238
239 /* start_ext new_ext end_ext
240 * donor |---------|----------|---------|
241 * orig |---------------|--------------|
242 */
243 o_end->ee_block = end_ext->ee_block;
244 o_end->ee_len = end_ext->ee_len;
245 ext4_ext_store_pblock(o_end, ext_pblock(end_ext));
246 }
247
248 o_start->ee_len = start_ext->ee_len;
249 new_flag = 1;
250
251 } else if (start_ext->ee_len && new_ext->ee_len &&
252 !end_ext->ee_len && o_start == o_end) {
253
254 /* start_ext new_ext
255 * donor |--------------|---------------|
256 * orig |------------------------------|
257 */
258 o_start->ee_len = start_ext->ee_len;
259 new_flag = 1;
260
261 } else if (!start_ext->ee_len && new_ext->ee_len &&
262 end_ext->ee_len && o_start == o_end) {
263
264 /* new_ext end_ext
265 * donor |--------------|---------------|
266 * orig |------------------------------|
267 */
268 o_end->ee_block = end_ext->ee_block;
269 o_end->ee_len = end_ext->ee_len;
270 ext4_ext_store_pblock(o_end, ext_pblock(end_ext));
271
272 /*
273 * Set 0 to the extent block if new_ext was
274 * the first block.
275 */
276 if (new_ext->ee_block)
277 eblock = le32_to_cpu(new_ext->ee_block);
278
279 new_flag = 1;
280 } else {
281 ext4_debug("ext4 move extent: Unexpected insert case\n");
282 return -EIO;
283 }
284
285 if (new_flag) {
286 get_ext_path(orig_path, orig_inode, eblock, err);
287 if (orig_path == NULL)
288 goto out;
289
290 if (ext4_ext_insert_extent(handle, orig_inode,
291 orig_path, new_ext))
292 goto out;
293 }
294
295 if (end_flag) {
296 get_ext_path(orig_path, orig_inode,
297 le32_to_cpu(end_ext->ee_block) - 1, err);
298 if (orig_path == NULL)
299 goto out;
300
301 if (ext4_ext_insert_extent(handle, orig_inode,
302 orig_path, end_ext))
303 goto out;
304 }
305out:
306 if (orig_path) {
307 ext4_ext_drop_refs(orig_path);
308 kfree(orig_path);
309 }
310
311 return err;
312
313}
314
315/**
316 * mext_insert_inside_block - Insert new extent to the extent block
317 *
318 * @o_start: first original extent to be moved
319 * @o_end: last original extent to be moved
320 * @start_ext: first new extent to be inserted
321 * @new_ext: middle of new extent to be inserted
322 * @end_ext: last new extent to be inserted
323 * @eh: extent header of target leaf block
324 * @range_to_move: used to decide how to insert extent
325 *
326 * Insert extents into the leaf block. The extent (@o_start) is overwritten
327 * by inserted extents.
328 */
329static void
330mext_insert_inside_block(struct ext4_extent *o_start,
331 struct ext4_extent *o_end,
332 struct ext4_extent *start_ext,
333 struct ext4_extent *new_ext,
334 struct ext4_extent *end_ext,
335 struct ext4_extent_header *eh,
336 int range_to_move)
337{
338 int i = 0;
339 unsigned long len;
340
341 /* Move the existing extents */
342 if (range_to_move && o_end < EXT_LAST_EXTENT(eh)) {
343 len = (unsigned long)(EXT_LAST_EXTENT(eh) + 1) -
344 (unsigned long)(o_end + 1);
345 memmove(o_end + 1 + range_to_move, o_end + 1, len);
346 }
347
348 /* Insert start entry */
349 if (start_ext->ee_len)
350 o_start[i++].ee_len = start_ext->ee_len;
351
352 /* Insert new entry */
353 if (new_ext->ee_len) {
354 o_start[i] = *new_ext;
355 ext4_ext_store_pblock(&o_start[i++], ext_pblock(new_ext));
356 }
357
358 /* Insert end entry */
359 if (end_ext->ee_len)
360 o_start[i] = *end_ext;
361
362 /* Increment the total entries counter on the extent block */
363 le16_add_cpu(&eh->eh_entries, range_to_move);
364}
365
366/**
367 * mext_insert_extents - Insert new extent
368 *
369 * @handle: journal handle
370 * @orig_inode: original inode
371 * @orig_path: path indicates first extent to be changed
372 * @o_start: first original extent to be changed
373 * @o_end: last original extent to be changed
374 * @start_ext: first new extent to be inserted
375 * @new_ext: middle of new extent to be inserted
376 * @end_ext: last new extent to be inserted
377 *
378 * Call the function to insert extents. If we cannot add more extents into
379 * the leaf block, we call mext_insert_across_blocks() to create a
380 * new leaf block. Otherwise call mext_insert_inside_block(). Return 0
381 * on success, or a negative error value on failure.
382 */
383static int
384mext_insert_extents(handle_t *handle, struct inode *orig_inode,
385 struct ext4_ext_path *orig_path,
386 struct ext4_extent *o_start,
387 struct ext4_extent *o_end,
388 struct ext4_extent *start_ext,
389 struct ext4_extent *new_ext,
390 struct ext4_extent *end_ext)
391{
392 struct ext4_extent_header *eh;
393 unsigned long need_slots, slots_range;
394 int range_to_move, depth, ret;
395
396 /*
397 * The extents need to be inserted
398 * start_extent + new_extent + end_extent.
399 */
400 need_slots = (start_ext->ee_len ? 1 : 0) + (end_ext->ee_len ? 1 : 0) +
401 (new_ext->ee_len ? 1 : 0);
402
403 /* The number of slots between start and end */
404 slots_range = ((unsigned long)(o_end + 1) - (unsigned long)o_start + 1)
405 / sizeof(struct ext4_extent);
406
407 /* Range to move the end of extent */
408 range_to_move = need_slots - slots_range;
409 depth = orig_path->p_depth;
410 orig_path += depth;
411 eh = orig_path->p_hdr;
412
413 if (depth) {
414 /* Register to journal */
415 ret = ext4_journal_get_write_access(handle, orig_path->p_bh);
416 if (ret)
417 return ret;
418 }
419
420 /* Expansion */
421 if (range_to_move > 0 &&
422 (range_to_move > le16_to_cpu(eh->eh_max)
423 - le16_to_cpu(eh->eh_entries))) {
424
425 ret = mext_insert_across_blocks(handle, orig_inode, o_start,
426 o_end, start_ext, new_ext, end_ext);
427 if (ret < 0)
428 return ret;
429 } else
430 mext_insert_inside_block(o_start, o_end, start_ext, new_ext,
431 end_ext, eh, range_to_move);
432
433 if (depth) {
434 ret = ext4_handle_dirty_metadata(handle, orig_inode,
435 orig_path->p_bh);
436 if (ret)
437 return ret;
438 } else {
439 ret = ext4_mark_inode_dirty(handle, orig_inode);
440 if (ret < 0)
441 return ret;
442 }
443
444 return 0;
445}
446
447/**
448 * mext_leaf_block - Move one leaf extent block into the inode.
449 *
450 * @handle: journal handle
451 * @orig_inode: original inode
452 * @orig_path: path indicates first extent to be changed
453 * @dext: donor extent
454 * @from: start offset on the target file
455 *
456 * In order to insert extents into the leaf block, we must divide the extent
457 * in the leaf block into three extents. The one is located to be inserted
458 * extents, and the others are located around it.
459 *
460 * Therefore, this function creates structures to save extents of the leaf
461 * block, and inserts extents by calling mext_insert_extents() with
462 * created extents. Return 0 on success, or a negative error value on failure.
463 */
464static int
465mext_leaf_block(handle_t *handle, struct inode *orig_inode,
466 struct ext4_ext_path *orig_path, struct ext4_extent *dext,
467 ext4_lblk_t *from)
468{
469 struct ext4_extent *oext, *o_start, *o_end, *prev_ext;
470 struct ext4_extent new_ext, start_ext, end_ext;
471 ext4_lblk_t new_ext_end;
472 ext4_fsblk_t new_phys_end;
473 int oext_alen, new_ext_alen, end_ext_alen;
474 int depth = ext_depth(orig_inode);
475 int ret;
476
477 o_start = o_end = oext = orig_path[depth].p_ext;
478 oext_alen = ext4_ext_get_actual_len(oext);
479 start_ext.ee_len = end_ext.ee_len = 0;
480
481 new_ext.ee_block = cpu_to_le32(*from);
482 ext4_ext_store_pblock(&new_ext, ext_pblock(dext));
483 new_ext.ee_len = dext->ee_len;
484 new_ext_alen = ext4_ext_get_actual_len(&new_ext);
485 new_ext_end = le32_to_cpu(new_ext.ee_block) + new_ext_alen - 1;
486 new_phys_end = ext_pblock(&new_ext) + new_ext_alen - 1;
487
488 /*
489 * Case: original extent is first
490 * oext |--------|
491 * new_ext |--|
492 * start_ext |--|
493 */
494 if (le32_to_cpu(oext->ee_block) < le32_to_cpu(new_ext.ee_block) &&
495 le32_to_cpu(new_ext.ee_block) <
496 le32_to_cpu(oext->ee_block) + oext_alen) {
497 start_ext.ee_len = cpu_to_le16(le32_to_cpu(new_ext.ee_block) -
498 le32_to_cpu(oext->ee_block));
499 copy_extent_status(oext, &start_ext);
500 } else if (oext > EXT_FIRST_EXTENT(orig_path[depth].p_hdr)) {
501 prev_ext = oext - 1;
502 /*
503 * We can merge new_ext into previous extent,
504 * if these are contiguous and same extent type.
505 */
506 if (ext4_can_extents_be_merged(orig_inode, prev_ext,
507 &new_ext)) {
508 o_start = prev_ext;
509 start_ext.ee_len = cpu_to_le16(
510 ext4_ext_get_actual_len(prev_ext) +
511 new_ext_alen);
512 copy_extent_status(prev_ext, &start_ext);
513 new_ext.ee_len = 0;
514 }
515 }
516
517 /*
518 * Case: new_ext_end must be less than oext
519 * oext |-----------|
520 * new_ext |-------|
521 */
522 BUG_ON(le32_to_cpu(oext->ee_block) + oext_alen - 1 < new_ext_end);
523
524 /*
525 * Case: new_ext is smaller than original extent
526 * oext |---------------|
527 * new_ext |-----------|
528 * end_ext |---|
529 */
530 if (le32_to_cpu(oext->ee_block) <= new_ext_end &&
531 new_ext_end < le32_to_cpu(oext->ee_block) + oext_alen - 1) {
532 end_ext.ee_len =
533 cpu_to_le16(le32_to_cpu(oext->ee_block) +
534 oext_alen - 1 - new_ext_end);
535 copy_extent_status(oext, &end_ext);
536 end_ext_alen = ext4_ext_get_actual_len(&end_ext);
537 ext4_ext_store_pblock(&end_ext,
538 (ext_pblock(o_end) + oext_alen - end_ext_alen));
539 end_ext.ee_block =
540 cpu_to_le32(le32_to_cpu(o_end->ee_block) +
541 oext_alen - end_ext_alen);
542 }
543
544 ret = mext_insert_extents(handle, orig_inode, orig_path, o_start,
545 o_end, &start_ext, &new_ext, &end_ext);
546 return ret;
547}
548
549/**
550 * mext_calc_swap_extents - Calculate extents for extent swapping.
551 *
552 * @tmp_dext: the extent that will belong to the original inode
553 * @tmp_oext: the extent that will belong to the donor inode
554 * @orig_off: block offset of original inode
555 * @donor_off: block offset of donor inode
556 * @max_count: the maximun length of extents
557 */
558static void
559mext_calc_swap_extents(struct ext4_extent *tmp_dext,
560 struct ext4_extent *tmp_oext,
561 ext4_lblk_t orig_off, ext4_lblk_t donor_off,
562 ext4_lblk_t max_count)
563{
564 ext4_lblk_t diff, orig_diff;
565 struct ext4_extent dext_old, oext_old;
566
567 dext_old = *tmp_dext;
568 oext_old = *tmp_oext;
569
570 /* When tmp_dext is too large, pick up the target range. */
571 diff = donor_off - le32_to_cpu(tmp_dext->ee_block);
572
573 ext4_ext_store_pblock(tmp_dext, ext_pblock(tmp_dext) + diff);
574 tmp_dext->ee_block =
575 cpu_to_le32(le32_to_cpu(tmp_dext->ee_block) + diff);
576 tmp_dext->ee_len = cpu_to_le16(le16_to_cpu(tmp_dext->ee_len) - diff);
577
578 if (max_count < ext4_ext_get_actual_len(tmp_dext))
579 tmp_dext->ee_len = cpu_to_le16(max_count);
580
581 orig_diff = orig_off - le32_to_cpu(tmp_oext->ee_block);
582 ext4_ext_store_pblock(tmp_oext, ext_pblock(tmp_oext) + orig_diff);
583
584 /* Adjust extent length if donor extent is larger than orig */
585 if (ext4_ext_get_actual_len(tmp_dext) >
586 ext4_ext_get_actual_len(tmp_oext) - orig_diff)
587 tmp_dext->ee_len = cpu_to_le16(le16_to_cpu(tmp_oext->ee_len) -
588 orig_diff);
589
590 tmp_oext->ee_len = cpu_to_le16(ext4_ext_get_actual_len(tmp_dext));
591
592 copy_extent_status(&oext_old, tmp_dext);
593 copy_extent_status(&dext_old, tmp_oext);
594}
595
596/**
597 * mext_replace_branches - Replace original extents with new extents
598 *
599 * @handle: journal handle
600 * @orig_inode: original inode
601 * @donor_inode: donor inode
602 * @from: block offset of orig_inode
603 * @count: block count to be replaced
604 *
605 * Replace original inode extents and donor inode extents page by page.
606 * We implement this replacement in the following three steps:
607 * 1. Save the block information of original and donor inodes into
608 * dummy extents.
609 * 2. Change the block information of original inode to point at the
610 * donor inode blocks.
611 * 3. Change the block information of donor inode to point at the saved
612 * original inode blocks in the dummy extents.
613 *
614 * Return 0 on success, or a negative error value on failure.
615 */
616static int
617mext_replace_branches(handle_t *handle, struct inode *orig_inode,
618 struct inode *donor_inode, ext4_lblk_t from,
619 ext4_lblk_t count)
620{
621 struct ext4_ext_path *orig_path = NULL;
622 struct ext4_ext_path *donor_path = NULL;
623 struct ext4_extent *oext, *dext;
624 struct ext4_extent tmp_dext, tmp_oext;
625 ext4_lblk_t orig_off = from, donor_off = from;
626 int err = 0;
627 int depth;
628 int replaced_count = 0;
629 int dext_alen;
630
631 mext_double_down_write(orig_inode, donor_inode);
632
633 /* Get the original extent for the block "orig_off" */
634 get_ext_path(orig_path, orig_inode, orig_off, err);
635 if (orig_path == NULL)
636 goto out;
637
638 /* Get the donor extent for the head */
639 get_ext_path(donor_path, donor_inode, donor_off, err);
640 if (donor_path == NULL)
641 goto out;
642 depth = ext_depth(orig_inode);
643 oext = orig_path[depth].p_ext;
644 tmp_oext = *oext;
645
646 depth = ext_depth(donor_inode);
647 dext = donor_path[depth].p_ext;
648 tmp_dext = *dext;
649
650 mext_calc_swap_extents(&tmp_dext, &tmp_oext, orig_off,
651 donor_off, count);
652
653 /* Loop for the donor extents */
654 while (1) {
655 /* The extent for donor must be found. */
656 BUG_ON(!dext || donor_off != le32_to_cpu(tmp_dext.ee_block));
657
658 /* Set donor extent to orig extent */
659 err = mext_leaf_block(handle, orig_inode,
660 orig_path, &tmp_dext, &orig_off);
661 if (err < 0)
662 goto out;
663
664 /* Set orig extent to donor extent */
665 err = mext_leaf_block(handle, donor_inode,
666 donor_path, &tmp_oext, &donor_off);
667 if (err < 0)
668 goto out;
669
670 dext_alen = ext4_ext_get_actual_len(&tmp_dext);
671 replaced_count += dext_alen;
672 donor_off += dext_alen;
673 orig_off += dext_alen;
674
675 /* Already moved the expected blocks */
676 if (replaced_count >= count)
677 break;
678
679 if (orig_path)
680 ext4_ext_drop_refs(orig_path);
681 get_ext_path(orig_path, orig_inode, orig_off, err);
682 if (orig_path == NULL)
683 goto out;
684 depth = ext_depth(orig_inode);
685 oext = orig_path[depth].p_ext;
686 if (le32_to_cpu(oext->ee_block) +
687 ext4_ext_get_actual_len(oext) <= orig_off) {
688 err = 0;
689 goto out;
690 }
691 tmp_oext = *oext;
692
693 if (donor_path)
694 ext4_ext_drop_refs(donor_path);
695 get_ext_path(donor_path, donor_inode,
696 donor_off, err);
697 if (donor_path == NULL)
698 goto out;
699 depth = ext_depth(donor_inode);
700 dext = donor_path[depth].p_ext;
701 if (le32_to_cpu(dext->ee_block) +
702 ext4_ext_get_actual_len(dext) <= donor_off) {
703 err = 0;
704 goto out;
705 }
706 tmp_dext = *dext;
707
708 mext_calc_swap_extents(&tmp_dext, &tmp_oext, orig_off,
709 donor_off,
710 count - replaced_count);
711 }
712
713out:
714 if (orig_path) {
715 ext4_ext_drop_refs(orig_path);
716 kfree(orig_path);
717 }
718 if (donor_path) {
719 ext4_ext_drop_refs(donor_path);
720 kfree(donor_path);
721 }
722
723 mext_double_up_write(orig_inode, donor_inode);
724 return err;
725}
726
727/**
728 * move_extent_per_page - Move extent data per page
729 *
730 * @o_filp: file structure of original file
731 * @donor_inode: donor inode
732 * @orig_page_offset: page index on original file
733 * @data_offset_in_page: block index where data swapping starts
734 * @block_len_in_page: the number of blocks to be swapped
735 * @uninit: orig extent is uninitialized or not
736 *
737 * Save the data in original inode blocks and replace original inode extents
738 * with donor inode extents by calling mext_replace_branches().
739 * Finally, write out the saved data in new original inode blocks. Return 0
740 * on success, or a negative error value on failure.
741 */
742static int
743move_extent_par_page(struct file *o_filp, struct inode *donor_inode,
744 pgoff_t orig_page_offset, int data_offset_in_page,
745 int block_len_in_page, int uninit)
746{
747 struct inode *orig_inode = o_filp->f_dentry->d_inode;
748 struct address_space *mapping = orig_inode->i_mapping;
749 struct buffer_head *bh;
750 struct page *page = NULL;
751 const struct address_space_operations *a_ops = mapping->a_ops;
752 handle_t *handle;
753 ext4_lblk_t orig_blk_offset;
754 long long offs = orig_page_offset << PAGE_CACHE_SHIFT;
755 unsigned long blocksize = orig_inode->i_sb->s_blocksize;
756 unsigned int w_flags = 0;
757 unsigned int tmp_data_len, data_len;
758 void *fsdata;
759 int ret, i, jblocks;
760 int blocks_per_page = PAGE_CACHE_SIZE >> orig_inode->i_blkbits;
761
762 /*
763 * It needs twice the amount of ordinary journal buffers because
764 * inode and donor_inode may change each different metadata blocks.
765 */
766 jblocks = ext4_writepage_trans_blocks(orig_inode) * 2;
767 handle = ext4_journal_start(orig_inode, jblocks);
768 if (IS_ERR(handle)) {
769 ret = PTR_ERR(handle);
770 return ret;
771 }
772
773 if (segment_eq(get_fs(), KERNEL_DS))
774 w_flags |= AOP_FLAG_UNINTERRUPTIBLE;
775
776 orig_blk_offset = orig_page_offset * blocks_per_page +
777 data_offset_in_page;
778
779 /*
780 * If orig extent is uninitialized one,
781 * it's not necessary force the page into memory
782 * and then force it to be written out again.
783 * Just swap data blocks between orig and donor.
784 */
785 if (uninit) {
786 ret = mext_replace_branches(handle, orig_inode,
787 donor_inode, orig_blk_offset,
788 block_len_in_page);
789
790 /* Clear the inode cache not to refer to the old data */
791 ext4_ext_invalidate_cache(orig_inode);
792 ext4_ext_invalidate_cache(donor_inode);
793 goto out2;
794 }
795
796 offs = (long long)orig_blk_offset << orig_inode->i_blkbits;
797
798 /* Calculate data_len */
799 if ((orig_blk_offset + block_len_in_page - 1) ==
800 ((orig_inode->i_size - 1) >> orig_inode->i_blkbits)) {
801 /* Replace the last block */
802 tmp_data_len = orig_inode->i_size & (blocksize - 1);
803 /*
804 * If data_len equal zero, it shows data_len is multiples of
805 * blocksize. So we set appropriate value.
806 */
807 if (tmp_data_len == 0)
808 tmp_data_len = blocksize;
809
810 data_len = tmp_data_len +
811 ((block_len_in_page - 1) << orig_inode->i_blkbits);
812 } else {
813 data_len = block_len_in_page << orig_inode->i_blkbits;
814 }
815
816 ret = a_ops->write_begin(o_filp, mapping, offs, data_len, w_flags,
817 &page, &fsdata);
818 if (unlikely(ret < 0))
819 goto out;
820
821 if (!PageUptodate(page)) {
822 mapping->a_ops->readpage(o_filp, page);
823 lock_page(page);
824 }
825
826 /*
827 * try_to_release_page() doesn't call releasepage in writeback mode.
828 * We should care about the order of writing to the same file
829 * by multiple move extent processes.
830 * It needs to call wait_on_page_writeback() to wait for the
831 * writeback of the page.
832 */
833 if (PageWriteback(page))
834 wait_on_page_writeback(page);
835
836 /* Release old bh and drop refs */
837 try_to_release_page(page, 0);
838
839 ret = mext_replace_branches(handle, orig_inode, donor_inode,
840 orig_blk_offset, block_len_in_page);
841 if (ret < 0)
842 goto out;
843
844 /* Clear the inode cache not to refer to the old data */
845 ext4_ext_invalidate_cache(orig_inode);
846 ext4_ext_invalidate_cache(donor_inode);
847
848 if (!page_has_buffers(page))
849 create_empty_buffers(page, 1 << orig_inode->i_blkbits, 0);
850
851 bh = page_buffers(page);
852 for (i = 0; i < data_offset_in_page; i++)
853 bh = bh->b_this_page;
854
855 for (i = 0; i < block_len_in_page; i++) {
856 ret = ext4_get_block(orig_inode,
857 (sector_t)(orig_blk_offset + i), bh, 0);
858 if (ret < 0)
859 goto out;
860
861 if (bh->b_this_page != NULL)
862 bh = bh->b_this_page;
863 }
864
865 ret = a_ops->write_end(o_filp, mapping, offs, data_len, data_len,
866 page, fsdata);
867 page = NULL;
868
869out:
870 if (unlikely(page)) {
871 if (PageLocked(page))
872 unlock_page(page);
873 page_cache_release(page);
874 }
875out2:
876 ext4_journal_stop(handle);
877
878 return ret < 0 ? ret : 0;
879}
880
881/**
882 * mext_check_argumants - Check whether move extent can be done
883 *
884 * @orig_inode: original inode
885 * @donor_inode: donor inode
886 * @orig_start: logical start offset in block for orig
887 * @donor_start: logical start offset in block for donor
888 * @len: the number of blocks to be moved
889 * @moved_len: moved block length
890 *
891 * Check the arguments of ext4_move_extents() whether the files can be
892 * exchanged with each other.
893 * Return 0 on success, or a negative error value on failure.
894 */
895static int
896mext_check_arguments(struct inode *orig_inode,
897 struct inode *donor_inode, __u64 orig_start,
898 __u64 donor_start, __u64 *len, __u64 moved_len)
899{
900 /* Regular file check */
901 if (!S_ISREG(orig_inode->i_mode) || !S_ISREG(donor_inode->i_mode)) {
902 ext4_debug("ext4 move extent: The argument files should be "
903 "regular file [ino:orig %lu, donor %lu]\n",
904 orig_inode->i_ino, donor_inode->i_ino);
905 return -EINVAL;
906 }
907
908 /* Ext4 move extent does not support swapfile */
909 if (IS_SWAPFILE(orig_inode) || IS_SWAPFILE(donor_inode)) {
910 ext4_debug("ext4 move extent: The argument files should "
911 "not be swapfile [ino:orig %lu, donor %lu]\n",
912 orig_inode->i_ino, donor_inode->i_ino);
913 return -EINVAL;
914 }
915
916 /* Files should be in the same ext4 FS */
917 if (orig_inode->i_sb != donor_inode->i_sb) {
918 ext4_debug("ext4 move extent: The argument files "
919 "should be in same FS [ino:orig %lu, donor %lu]\n",
920 orig_inode->i_ino, donor_inode->i_ino);
921 return -EINVAL;
922 }
923
924 /* orig and donor should be different file */
925 if (orig_inode->i_ino == donor_inode->i_ino) {
926 ext4_debug("ext4 move extent: The argument files should not "
927 "be same file [ino:orig %lu, donor %lu]\n",
928 orig_inode->i_ino, donor_inode->i_ino);
929 return -EINVAL;
930 }
931
932 /* Ext4 move extent supports only extent based file */
933 if (!(EXT4_I(orig_inode)->i_flags & EXT4_EXTENTS_FL)) {
934 ext4_debug("ext4 move extent: orig file is not extents "
935 "based file [ino:orig %lu]\n", orig_inode->i_ino);
936 return -EOPNOTSUPP;
937 } else if (!(EXT4_I(donor_inode)->i_flags & EXT4_EXTENTS_FL)) {
938 ext4_debug("ext4 move extent: donor file is not extents "
939 "based file [ino:donor %lu]\n", donor_inode->i_ino);
940 return -EOPNOTSUPP;
941 }
942
943 if ((!orig_inode->i_size) || (!donor_inode->i_size)) {
944 ext4_debug("ext4 move extent: File size is 0 byte\n");
945 return -EINVAL;
946 }
947
948 /* Start offset should be same */
949 if (orig_start != donor_start) {
950 ext4_debug("ext4 move extent: orig and donor's start "
951 "offset are not same [ino:orig %lu, donor %lu]\n",
952 orig_inode->i_ino, donor_inode->i_ino);
953 return -EINVAL;
954 }
955
956 if (moved_len) {
957 ext4_debug("ext4 move extent: moved_len should be 0 "
958 "[ino:orig %lu, donor %lu]\n", orig_inode->i_ino,
959 donor_inode->i_ino);
960 return -EINVAL;
961 }
962
963 if ((orig_start > MAX_DEFRAG_SIZE) ||
964 (donor_start > MAX_DEFRAG_SIZE) ||
965 (*len > MAX_DEFRAG_SIZE) ||
966 (orig_start + *len > MAX_DEFRAG_SIZE)) {
967 ext4_debug("ext4 move extent: Can't handle over [%lu] blocks "
968 "[ino:orig %lu, donor %lu]\n", MAX_DEFRAG_SIZE,
969 orig_inode->i_ino, donor_inode->i_ino);
970 return -EINVAL;
971 }
972
973 if (orig_inode->i_size > donor_inode->i_size) {
974 if (orig_start >= donor_inode->i_size) {
975 ext4_debug("ext4 move extent: orig start offset "
976 "[%llu] should be less than donor file size "
977 "[%lld] [ino:orig %lu, donor_inode %lu]\n",
978 orig_start, donor_inode->i_size,
979 orig_inode->i_ino, donor_inode->i_ino);
980 return -EINVAL;
981 }
982
983 if (orig_start + *len > donor_inode->i_size) {
984 ext4_debug("ext4 move extent: End offset [%llu] should "
985 "be less than donor file size [%lld]."
986 "So adjust length from %llu to %lld "
987 "[ino:orig %lu, donor %lu]\n",
988 orig_start + *len, donor_inode->i_size,
989 *len, donor_inode->i_size - orig_start,
990 orig_inode->i_ino, donor_inode->i_ino);
991 *len = donor_inode->i_size - orig_start;
992 }
993 } else {
994 if (orig_start >= orig_inode->i_size) {
995 ext4_debug("ext4 move extent: start offset [%llu] "
996 "should be less than original file size "
997 "[%lld] [inode:orig %lu, donor %lu]\n",
998 orig_start, orig_inode->i_size,
999 orig_inode->i_ino, donor_inode->i_ino);
1000 return -EINVAL;
1001 }
1002
1003 if (orig_start + *len > orig_inode->i_size) {
1004 ext4_debug("ext4 move extent: Adjust length "
1005 "from %llu to %lld. Because it should be "
1006 "less than original file size "
1007 "[ino:orig %lu, donor %lu]\n",
1008 *len, orig_inode->i_size - orig_start,
1009 orig_inode->i_ino, donor_inode->i_ino);
1010 *len = orig_inode->i_size - orig_start;
1011 }
1012 }
1013
1014 if (!*len) {
1015 ext4_debug("ext4 move extent: len shoudld not be 0 "
1016 "[ino:orig %lu, donor %lu]\n", orig_inode->i_ino,
1017 donor_inode->i_ino);
1018 return -EINVAL;
1019 }
1020
1021 return 0;
1022}
1023
1024/**
1025 * mext_inode_double_lock - Lock i_mutex on both @inode1 and @inode2
1026 *
1027 * @inode1: the inode structure
1028 * @inode2: the inode structure
1029 *
1030 * Lock two inodes' i_mutex by i_ino order. This function is moved from
1031 * fs/inode.c.
1032 */
1033static void
1034mext_inode_double_lock(struct inode *inode1, struct inode *inode2)
1035{
1036 if (inode1 == NULL || inode2 == NULL || inode1 == inode2) {
1037 if (inode1)
1038 mutex_lock(&inode1->i_mutex);
1039 else if (inode2)
1040 mutex_lock(&inode2->i_mutex);
1041 return;
1042 }
1043
1044 if (inode1->i_ino < inode2->i_ino) {
1045 mutex_lock_nested(&inode1->i_mutex, I_MUTEX_PARENT);
1046 mutex_lock_nested(&inode2->i_mutex, I_MUTEX_CHILD);
1047 } else {
1048 mutex_lock_nested(&inode2->i_mutex, I_MUTEX_PARENT);
1049 mutex_lock_nested(&inode1->i_mutex, I_MUTEX_CHILD);
1050 }
1051}
1052
1053/**
1054 * mext_inode_double_unlock - Release i_mutex on both @inode1 and @inode2
1055 *
1056 * @inode1: the inode that is released first
1057 * @inode2: the inode that is released second
1058 *
1059 * This function is moved from fs/inode.c.
1060 */
1061
1062static void
1063mext_inode_double_unlock(struct inode *inode1, struct inode *inode2)
1064{
1065 if (inode1)
1066 mutex_unlock(&inode1->i_mutex);
1067
1068 if (inode2 && inode2 != inode1)
1069 mutex_unlock(&inode2->i_mutex);
1070}
1071
1072/**
1073 * ext4_move_extents - Exchange the specified range of a file
1074 *
1075 * @o_filp: file structure of the original file
1076 * @d_filp: file structure of the donor file
1077 * @orig_start: start offset in block for orig
1078 * @donor_start: start offset in block for donor
1079 * @len: the number of blocks to be moved
1080 * @moved_len: moved block length
1081 *
1082 * This function returns 0 and moved block length is set in moved_len
1083 * if succeed, otherwise returns error value.
1084 *
1085 * Note: ext4_move_extents() proceeds the following order.
1086 * 1:ext4_move_extents() calculates the last block number of moving extent
1087 * function by the start block number (orig_start) and the number of blocks
1088 * to be moved (len) specified as arguments.
1089 * If the {orig, donor}_start points a hole, the extent's start offset
1090 * pointed by ext_cur (current extent), holecheck_path, orig_path are set
1091 * after hole behind.
1092 * 2:Continue step 3 to step 5, until the holecheck_path points to last_extent
1093 * or the ext_cur exceeds the block_end which is last logical block number.
1094 * 3:To get the length of continues area, call mext_next_extent()
1095 * specified with the ext_cur (initial value is holecheck_path) re-cursive,
1096 * until find un-continuous extent, the start logical block number exceeds
1097 * the block_end or the extent points to the last extent.
1098 * 4:Exchange the original inode data with donor inode data
1099 * from orig_page_offset to seq_end_page.
1100 * The start indexes of data are specified as arguments.
1101 * That of the original inode is orig_page_offset,
1102 * and the donor inode is also orig_page_offset
1103 * (To easily handle blocksize != pagesize case, the offset for the
1104 * donor inode is block unit).
1105 * 5:Update holecheck_path and orig_path to points a next proceeding extent,
1106 * then returns to step 2.
1107 * 6:Release holecheck_path, orig_path and set the len to moved_len
1108 * which shows the number of moved blocks.
1109 * The moved_len is useful for the command to calculate the file offset
1110 * for starting next move extent ioctl.
1111 * 7:Return 0 on success, or a negative error value on failure.
1112 */
1113int
1114ext4_move_extents(struct file *o_filp, struct file *d_filp,
1115 __u64 orig_start, __u64 donor_start, __u64 len,
1116 __u64 *moved_len)
1117{
1118 struct inode *orig_inode = o_filp->f_dentry->d_inode;
1119 struct inode *donor_inode = d_filp->f_dentry->d_inode;
1120 struct ext4_ext_path *orig_path = NULL, *holecheck_path = NULL;
1121 struct ext4_extent *ext_prev, *ext_cur, *ext_dummy;
1122 ext4_lblk_t block_start = orig_start;
1123 ext4_lblk_t block_end, seq_start, add_blocks, file_end, seq_blocks = 0;
1124 ext4_lblk_t rest_blocks;
1125 pgoff_t orig_page_offset = 0, seq_end_page;
1126 int ret, depth, last_extent = 0;
1127 int blocks_per_page = PAGE_CACHE_SIZE >> orig_inode->i_blkbits;
1128 int data_offset_in_page;
1129 int block_len_in_page;
1130 int uninit;
1131
1132 /* protect orig and donor against a truncate */
1133 mext_inode_double_lock(orig_inode, donor_inode);
1134
1135 mext_double_down_read(orig_inode, donor_inode);
1136 /* Check the filesystem environment whether move_extent can be done */
1137 ret = mext_check_arguments(orig_inode, donor_inode, orig_start,
1138 donor_start, &len, *moved_len);
1139 mext_double_up_read(orig_inode, donor_inode);
1140 if (ret)
1141 goto out2;
1142
1143 file_end = (i_size_read(orig_inode) - 1) >> orig_inode->i_blkbits;
1144 block_end = block_start + len - 1;
1145 if (file_end < block_end)
1146 len -= block_end - file_end;
1147
1148 get_ext_path(orig_path, orig_inode, block_start, ret);
1149 if (orig_path == NULL)
1150 goto out2;
1151
1152 /* Get path structure to check the hole */
1153 get_ext_path(holecheck_path, orig_inode, block_start, ret);
1154 if (holecheck_path == NULL)
1155 goto out;
1156
1157 depth = ext_depth(orig_inode);
1158 ext_cur = holecheck_path[depth].p_ext;
1159 if (ext_cur == NULL) {
1160 ret = -EINVAL;
1161 goto out;
1162 }
1163
1164 /*
1165 * Get proper extent whose ee_block is beyond block_start
1166 * if block_start was within the hole.
1167 */
1168 if (le32_to_cpu(ext_cur->ee_block) +
1169 ext4_ext_get_actual_len(ext_cur) - 1 < block_start) {
1170 last_extent = mext_next_extent(orig_inode,
1171 holecheck_path, &ext_cur);
1172 if (last_extent < 0) {
1173 ret = last_extent;
1174 goto out;
1175 }
1176 last_extent = mext_next_extent(orig_inode, orig_path,
1177 &ext_dummy);
1178 if (last_extent < 0) {
1179 ret = last_extent;
1180 goto out;
1181 }
1182 }
1183 seq_start = block_start;
1184
1185 /* No blocks within the specified range. */
1186 if (le32_to_cpu(ext_cur->ee_block) > block_end) {
1187 ext4_debug("ext4 move extent: The specified range of file "
1188 "may be the hole\n");
1189 ret = -EINVAL;
1190 goto out;
1191 }
1192
1193 /* Adjust start blocks */
1194 add_blocks = min(le32_to_cpu(ext_cur->ee_block) +
1195 ext4_ext_get_actual_len(ext_cur), block_end + 1) -
1196 max(le32_to_cpu(ext_cur->ee_block), block_start);
1197
1198 while (!last_extent && le32_to_cpu(ext_cur->ee_block) <= block_end) {
1199 seq_blocks += add_blocks;
1200
1201 /* Adjust tail blocks */
1202 if (seq_start + seq_blocks - 1 > block_end)
1203 seq_blocks = block_end - seq_start + 1;
1204
1205 ext_prev = ext_cur;
1206 last_extent = mext_next_extent(orig_inode, holecheck_path,
1207 &ext_cur);
1208 if (last_extent < 0) {
1209 ret = last_extent;
1210 break;
1211 }
1212 add_blocks = ext4_ext_get_actual_len(ext_cur);
1213
1214 /*
1215 * Extend the length of contiguous block (seq_blocks)
1216 * if extents are contiguous.
1217 */
1218 if (ext4_can_extents_be_merged(orig_inode,
1219 ext_prev, ext_cur) &&
1220 block_end >= le32_to_cpu(ext_cur->ee_block) &&
1221 !last_extent)
1222 continue;
1223
1224 /* Is original extent is uninitialized */
1225 uninit = ext4_ext_is_uninitialized(ext_prev);
1226
1227 data_offset_in_page = seq_start % blocks_per_page;
1228
1229 /*
1230 * Calculate data blocks count that should be swapped
1231 * at the first page.
1232 */
1233 if (data_offset_in_page + seq_blocks > blocks_per_page) {
1234 /* Swapped blocks are across pages */
1235 block_len_in_page =
1236 blocks_per_page - data_offset_in_page;
1237 } else {
1238 /* Swapped blocks are in a page */
1239 block_len_in_page = seq_blocks;
1240 }
1241
1242 orig_page_offset = seq_start >>
1243 (PAGE_CACHE_SHIFT - orig_inode->i_blkbits);
1244 seq_end_page = (seq_start + seq_blocks - 1) >>
1245 (PAGE_CACHE_SHIFT - orig_inode->i_blkbits);
1246 seq_start = le32_to_cpu(ext_cur->ee_block);
1247 rest_blocks = seq_blocks;
1248
1249 /* Discard preallocations of two inodes */
1250 down_write(&EXT4_I(orig_inode)->i_data_sem);
1251 ext4_discard_preallocations(orig_inode);
1252 up_write(&EXT4_I(orig_inode)->i_data_sem);
1253
1254 down_write(&EXT4_I(donor_inode)->i_data_sem);
1255 ext4_discard_preallocations(donor_inode);
1256 up_write(&EXT4_I(donor_inode)->i_data_sem);
1257
1258 while (orig_page_offset <= seq_end_page) {
1259
1260 /* Swap original branches with new branches */
1261 ret = move_extent_par_page(o_filp, donor_inode,
1262 orig_page_offset,
1263 data_offset_in_page,
1264 block_len_in_page, uninit);
1265 if (ret < 0)
1266 goto out;
1267 orig_page_offset++;
1268 /* Count how many blocks we have exchanged */
1269 *moved_len += block_len_in_page;
1270 BUG_ON(*moved_len > len);
1271
1272 data_offset_in_page = 0;
1273 rest_blocks -= block_len_in_page;
1274 if (rest_blocks > blocks_per_page)
1275 block_len_in_page = blocks_per_page;
1276 else
1277 block_len_in_page = rest_blocks;
1278 }
1279
1280 /* Decrease buffer counter */
1281 if (holecheck_path)
1282 ext4_ext_drop_refs(holecheck_path);
1283 get_ext_path(holecheck_path, orig_inode,
1284 seq_start, ret);
1285 if (holecheck_path == NULL)
1286 break;
1287 depth = holecheck_path->p_depth;
1288
1289 /* Decrease buffer counter */
1290 if (orig_path)
1291 ext4_ext_drop_refs(orig_path);
1292 get_ext_path(orig_path, orig_inode, seq_start, ret);
1293 if (orig_path == NULL)
1294 break;
1295
1296 ext_cur = holecheck_path[depth].p_ext;
1297 add_blocks = ext4_ext_get_actual_len(ext_cur);
1298 seq_blocks = 0;
1299
1300 }
1301out:
1302 if (orig_path) {
1303 ext4_ext_drop_refs(orig_path);
1304 kfree(orig_path);
1305 }
1306 if (holecheck_path) {
1307 ext4_ext_drop_refs(holecheck_path);
1308 kfree(holecheck_path);
1309 }
1310out2:
1311 mext_inode_double_unlock(orig_inode, donor_inode);
1312
1313 if (ret)
1314 return ret;
1315
1316 /* All of the specified blocks must be exchanged in succeed */
1317 BUG_ON(*moved_len != len);
1318
1319 return 0;
1320}
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 07eb6649e4fa..de04013d16ff 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1782,7 +1782,7 @@ retry:
1782 if (IS_DIRSYNC(dir)) 1782 if (IS_DIRSYNC(dir))
1783 ext4_handle_sync(handle); 1783 ext4_handle_sync(handle);
1784 1784
1785 inode = ext4_new_inode (handle, dir, mode); 1785 inode = ext4_new_inode(handle, dir, mode, &dentry->d_name, 0);
1786 err = PTR_ERR(inode); 1786 err = PTR_ERR(inode);
1787 if (!IS_ERR(inode)) { 1787 if (!IS_ERR(inode)) {
1788 inode->i_op = &ext4_file_inode_operations; 1788 inode->i_op = &ext4_file_inode_operations;
@@ -1816,7 +1816,7 @@ retry:
1816 if (IS_DIRSYNC(dir)) 1816 if (IS_DIRSYNC(dir))
1817 ext4_handle_sync(handle); 1817 ext4_handle_sync(handle);
1818 1818
1819 inode = ext4_new_inode(handle, dir, mode); 1819 inode = ext4_new_inode(handle, dir, mode, &dentry->d_name, 0);
1820 err = PTR_ERR(inode); 1820 err = PTR_ERR(inode);
1821 if (!IS_ERR(inode)) { 1821 if (!IS_ERR(inode)) {
1822 init_special_inode(inode, inode->i_mode, rdev); 1822 init_special_inode(inode, inode->i_mode, rdev);
@@ -1853,7 +1853,8 @@ retry:
1853 if (IS_DIRSYNC(dir)) 1853 if (IS_DIRSYNC(dir))
1854 ext4_handle_sync(handle); 1854 ext4_handle_sync(handle);
1855 1855
1856 inode = ext4_new_inode(handle, dir, S_IFDIR | mode); 1856 inode = ext4_new_inode(handle, dir, S_IFDIR | mode,
1857 &dentry->d_name, 0);
1857 err = PTR_ERR(inode); 1858 err = PTR_ERR(inode);
1858 if (IS_ERR(inode)) 1859 if (IS_ERR(inode))
1859 goto out_stop; 1860 goto out_stop;
@@ -2264,7 +2265,8 @@ retry:
2264 if (IS_DIRSYNC(dir)) 2265 if (IS_DIRSYNC(dir))
2265 ext4_handle_sync(handle); 2266 ext4_handle_sync(handle);
2266 2267
2267 inode = ext4_new_inode(handle, dir, S_IFLNK|S_IRWXUGO); 2268 inode = ext4_new_inode(handle, dir, S_IFLNK|S_IRWXUGO,
2269 &dentry->d_name, 0);
2268 err = PTR_ERR(inode); 2270 err = PTR_ERR(inode);
2269 if (IS_ERR(inode)) 2271 if (IS_ERR(inode))
2270 goto out_stop; 2272 goto out_stop;
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6e0c2d77c87e..8bb9e2d3e4b8 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -37,7 +37,6 @@
37#include <linux/seq_file.h> 37#include <linux/seq_file.h>
38#include <linux/proc_fs.h> 38#include <linux/proc_fs.h>
39#include <linux/ctype.h> 39#include <linux/ctype.h>
40#include <linux/marker.h>
41#include <linux/log2.h> 40#include <linux/log2.h>
42#include <linux/crc16.h> 41#include <linux/crc16.h>
43#include <asm/uaccess.h> 42#include <asm/uaccess.h>
@@ -47,6 +46,9 @@
47#include "xattr.h" 46#include "xattr.h"
48#include "acl.h" 47#include "acl.h"
49 48
49#define CREATE_TRACE_POINTS
50#include <trace/events/ext4.h>
51
50static int default_mb_history_length = 1000; 52static int default_mb_history_length = 1000;
51 53
52module_param_named(default_mb_history_length, default_mb_history_length, 54module_param_named(default_mb_history_length, default_mb_history_length,
@@ -301,7 +303,7 @@ static void ext4_handle_error(struct super_block *sb)
301 if (!test_opt(sb, ERRORS_CONT)) { 303 if (!test_opt(sb, ERRORS_CONT)) {
302 journal_t *journal = EXT4_SB(sb)->s_journal; 304 journal_t *journal = EXT4_SB(sb)->s_journal;
303 305
304 EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; 306 EXT4_SB(sb)->s_mount_flags |= EXT4_MF_FS_ABORTED;
305 if (journal) 307 if (journal)
306 jbd2_journal_abort(journal, -EIO); 308 jbd2_journal_abort(journal, -EIO);
307 } 309 }
@@ -414,7 +416,7 @@ void ext4_abort(struct super_block *sb, const char *function,
414 ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); 416 ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only");
415 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; 417 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
416 sb->s_flags |= MS_RDONLY; 418 sb->s_flags |= MS_RDONLY;
417 EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; 419 EXT4_SB(sb)->s_mount_flags |= EXT4_MF_FS_ABORTED;
418 if (EXT4_SB(sb)->s_journal) 420 if (EXT4_SB(sb)->s_journal)
419 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); 421 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO);
420} 422}
@@ -1474,7 +1476,7 @@ set_qf_format:
1474 break; 1476 break;
1475#endif 1477#endif
1476 case Opt_abort: 1478 case Opt_abort:
1477 set_opt(sbi->s_mount_opt, ABORT); 1479 sbi->s_mount_flags |= EXT4_MF_FS_ABORTED;
1478 break; 1480 break;
1479 case Opt_nobarrier: 1481 case Opt_nobarrier:
1480 clear_opt(sbi->s_mount_opt, BARRIER); 1482 clear_opt(sbi->s_mount_opt, BARRIER);
@@ -1653,7 +1655,7 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
1653 ext4_commit_super(sb, 1); 1655 ext4_commit_super(sb, 1);
1654 if (test_opt(sb, DEBUG)) 1656 if (test_opt(sb, DEBUG))
1655 printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, " 1657 printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
1656 "bpg=%lu, ipg=%lu, mo=%04lx]\n", 1658 "bpg=%lu, ipg=%lu, mo=%04x]\n",
1657 sb->s_blocksize, 1659 sb->s_blocksize,
1658 sbi->s_groups_count, 1660 sbi->s_groups_count,
1659 EXT4_BLOCKS_PER_GROUP(sb), 1661 EXT4_BLOCKS_PER_GROUP(sb),
@@ -2204,6 +2206,7 @@ EXT4_RO_ATTR(session_write_kbytes);
2204EXT4_RO_ATTR(lifetime_write_kbytes); 2206EXT4_RO_ATTR(lifetime_write_kbytes);
2205EXT4_ATTR_OFFSET(inode_readahead_blks, 0644, sbi_ui_show, 2207EXT4_ATTR_OFFSET(inode_readahead_blks, 0644, sbi_ui_show,
2206 inode_readahead_blks_store, s_inode_readahead_blks); 2208 inode_readahead_blks_store, s_inode_readahead_blks);
2209EXT4_RW_ATTR_SBI_UI(inode_goal, s_inode_goal);
2207EXT4_RW_ATTR_SBI_UI(mb_stats, s_mb_stats); 2210EXT4_RW_ATTR_SBI_UI(mb_stats, s_mb_stats);
2208EXT4_RW_ATTR_SBI_UI(mb_max_to_scan, s_mb_max_to_scan); 2211EXT4_RW_ATTR_SBI_UI(mb_max_to_scan, s_mb_max_to_scan);
2209EXT4_RW_ATTR_SBI_UI(mb_min_to_scan, s_mb_min_to_scan); 2212EXT4_RW_ATTR_SBI_UI(mb_min_to_scan, s_mb_min_to_scan);
@@ -2216,6 +2219,7 @@ static struct attribute *ext4_attrs[] = {
2216 ATTR_LIST(session_write_kbytes), 2219 ATTR_LIST(session_write_kbytes),
2217 ATTR_LIST(lifetime_write_kbytes), 2220 ATTR_LIST(lifetime_write_kbytes),
2218 ATTR_LIST(inode_readahead_blks), 2221 ATTR_LIST(inode_readahead_blks),
2222 ATTR_LIST(inode_goal),
2219 ATTR_LIST(mb_stats), 2223 ATTR_LIST(mb_stats),
2220 ATTR_LIST(mb_max_to_scan), 2224 ATTR_LIST(mb_max_to_scan),
2221 ATTR_LIST(mb_min_to_scan), 2225 ATTR_LIST(mb_min_to_scan),
@@ -3346,7 +3350,7 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
3346 int ret = 0; 3350 int ret = 0;
3347 tid_t target; 3351 tid_t target;
3348 3352
3349 trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait); 3353 trace_ext4_sync_fs(sb, wait);
3350 if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, &target)) { 3354 if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, &target)) {
3351 if (wait) 3355 if (wait)
3352 jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, target); 3356 jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, target);
@@ -3450,7 +3454,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
3450 goto restore_opts; 3454 goto restore_opts;
3451 } 3455 }
3452 3456
3453 if (sbi->s_mount_opt & EXT4_MOUNT_ABORT) 3457 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
3454 ext4_abort(sb, __func__, "Abort forced by user"); 3458 ext4_abort(sb, __func__, "Abort forced by user");
3455 3459
3456 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 3460 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
@@ -3465,7 +3469,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
3465 3469
3466 if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) || 3470 if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) ||
3467 n_blocks_count > ext4_blocks_count(es)) { 3471 n_blocks_count > ext4_blocks_count(es)) {
3468 if (sbi->s_mount_opt & EXT4_MOUNT_ABORT) { 3472 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
3469 err = -EROFS; 3473 err = -EROFS;
3470 goto restore_opts; 3474 goto restore_opts;
3471 } 3475 }
diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c
index 2f0dc5a14633..8ba5441063be 100644
--- a/fs/isofs/dir.c
+++ b/fs/isofs/dir.c
@@ -195,9 +195,8 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
195 * Do not report hidden files if so instructed, or associated 195 * Do not report hidden files if so instructed, or associated
196 * files unless instructed to do so 196 * files unless instructed to do so
197 */ 197 */
198 if ((sbi->s_hide == 'y' && 198 if ((sbi->s_hide && (de->flags[-sbi->s_high_sierra] & 1)) ||
199 (de->flags[-sbi->s_high_sierra] & 1)) || 199 (!sbi->s_showassoc &&
200 (sbi->s_showassoc =='n' &&
201 (de->flags[-sbi->s_high_sierra] & 4))) { 200 (de->flags[-sbi->s_high_sierra] & 4))) {
202 filp->f_pos += de_len; 201 filp->f_pos += de_len;
203 continue; 202 continue;
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 068b34b5a107..58a7963e168a 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -141,13 +141,17 @@ static const struct dentry_operations isofs_dentry_ops[] = {
141}; 141};
142 142
143struct iso9660_options{ 143struct iso9660_options{
144 char map; 144 unsigned int rock:1;
145 char rock; 145 unsigned int cruft:1;
146 unsigned int hide:1;
147 unsigned int showassoc:1;
148 unsigned int nocompress:1;
149 unsigned int overriderockperm:1;
150 unsigned int uid_set:1;
151 unsigned int gid_set:1;
152 unsigned int utf8:1;
153 unsigned char map;
146 char joliet; 154 char joliet;
147 char cruft;
148 char hide;
149 char showassoc;
150 char nocompress;
151 unsigned char check; 155 unsigned char check;
152 unsigned int blocksize; 156 unsigned int blocksize;
153 mode_t fmode; 157 mode_t fmode;
@@ -155,7 +159,6 @@ struct iso9660_options{
155 gid_t gid; 159 gid_t gid;
156 uid_t uid; 160 uid_t uid;
157 char *iocharset; 161 char *iocharset;
158 unsigned char utf8;
159 /* LVE */ 162 /* LVE */
160 s32 session; 163 s32 session;
161 s32 sbsector; 164 s32 sbsector;
@@ -312,7 +315,7 @@ enum {
312 Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore, 315 Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore,
313 Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet, 316 Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet,
314 Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err, 317 Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err,
315 Opt_nocompress, Opt_hide, Opt_showassoc, Opt_dmode, 318 Opt_nocompress, Opt_hide, Opt_showassoc, Opt_dmode, Opt_overriderockperm,
316}; 319};
317 320
318static const match_table_t tokens = { 321static const match_table_t tokens = {
@@ -340,6 +343,7 @@ static const match_table_t tokens = {
340 {Opt_gid, "gid=%u"}, 343 {Opt_gid, "gid=%u"},
341 {Opt_mode, "mode=%u"}, 344 {Opt_mode, "mode=%u"},
342 {Opt_dmode, "dmode=%u"}, 345 {Opt_dmode, "dmode=%u"},
346 {Opt_overriderockperm, "overriderockperm"},
343 {Opt_block, "block=%u"}, 347 {Opt_block, "block=%u"},
344 {Opt_ignore, "conv=binary"}, 348 {Opt_ignore, "conv=binary"},
345 {Opt_ignore, "conv=b"}, 349 {Opt_ignore, "conv=b"},
@@ -359,24 +363,22 @@ static int parse_options(char *options, struct iso9660_options *popt)
359 int option; 363 int option;
360 364
361 popt->map = 'n'; 365 popt->map = 'n';
362 popt->rock = 'y'; 366 popt->rock = 1;
363 popt->joliet = 'y'; 367 popt->joliet = 1;
364 popt->cruft = 'n'; 368 popt->cruft = 0;
365 popt->hide = 'n'; 369 popt->hide = 0;
366 popt->showassoc = 'n'; 370 popt->showassoc = 0;
367 popt->check = 'u'; /* unset */ 371 popt->check = 'u'; /* unset */
368 popt->nocompress = 0; 372 popt->nocompress = 0;
369 popt->blocksize = 1024; 373 popt->blocksize = 1024;
370 popt->fmode = popt->dmode = S_IRUGO | S_IXUGO; /* 374 popt->fmode = popt->dmode = ISOFS_INVALID_MODE;
371 * r-x for all. The disc could 375 popt->uid_set = 0;
372 * be shared with DOS machines so 376 popt->gid_set = 0;
373 * virtually anything could be
374 * a valid executable.
375 */
376 popt->gid = 0; 377 popt->gid = 0;
377 popt->uid = 0; 378 popt->uid = 0;
378 popt->iocharset = NULL; 379 popt->iocharset = NULL;
379 popt->utf8 = 0; 380 popt->utf8 = 0;
381 popt->overriderockperm = 0;
380 popt->session=-1; 382 popt->session=-1;
381 popt->sbsector=-1; 383 popt->sbsector=-1;
382 if (!options) 384 if (!options)
@@ -393,20 +395,20 @@ static int parse_options(char *options, struct iso9660_options *popt)
393 token = match_token(p, tokens, args); 395 token = match_token(p, tokens, args);
394 switch (token) { 396 switch (token) {
395 case Opt_norock: 397 case Opt_norock:
396 popt->rock = 'n'; 398 popt->rock = 0;
397 break; 399 break;
398 case Opt_nojoliet: 400 case Opt_nojoliet:
399 popt->joliet = 'n'; 401 popt->joliet = 0;
400 break; 402 break;
401 case Opt_hide: 403 case Opt_hide:
402 popt->hide = 'y'; 404 popt->hide = 1;
403 break; 405 break;
404 case Opt_unhide: 406 case Opt_unhide:
405 case Opt_showassoc: 407 case Opt_showassoc:
406 popt->showassoc = 'y'; 408 popt->showassoc = 1;
407 break; 409 break;
408 case Opt_cruft: 410 case Opt_cruft:
409 popt->cruft = 'y'; 411 popt->cruft = 1;
410 break; 412 break;
411 case Opt_utf8: 413 case Opt_utf8:
412 popt->utf8 = 1; 414 popt->utf8 = 1;
@@ -450,11 +452,13 @@ static int parse_options(char *options, struct iso9660_options *popt)
450 if (match_int(&args[0], &option)) 452 if (match_int(&args[0], &option))
451 return 0; 453 return 0;
452 popt->uid = option; 454 popt->uid = option;
455 popt->uid_set = 1;
453 break; 456 break;
454 case Opt_gid: 457 case Opt_gid:
455 if (match_int(&args[0], &option)) 458 if (match_int(&args[0], &option))
456 return 0; 459 return 0;
457 popt->gid = option; 460 popt->gid = option;
461 popt->gid_set = 1;
458 break; 462 break;
459 case Opt_mode: 463 case Opt_mode:
460 if (match_int(&args[0], &option)) 464 if (match_int(&args[0], &option))
@@ -466,6 +470,9 @@ static int parse_options(char *options, struct iso9660_options *popt)
466 return 0; 470 return 0;
467 popt->dmode = option; 471 popt->dmode = option;
468 break; 472 break;
473 case Opt_overriderockperm:
474 popt->overriderockperm = 1;
475 break;
469 case Opt_block: 476 case Opt_block:
470 if (match_int(&args[0], &option)) 477 if (match_int(&args[0], &option))
471 return 0; 478 return 0;
@@ -650,7 +657,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
650 goto out_freebh; 657 goto out_freebh;
651 658
652 sbi->s_high_sierra = 1; 659 sbi->s_high_sierra = 1;
653 opt.rock = 'n'; 660 opt.rock = 0;
654 h_pri = (struct hs_primary_descriptor *)vdp; 661 h_pri = (struct hs_primary_descriptor *)vdp;
655 goto root_found; 662 goto root_found;
656 } 663 }
@@ -673,7 +680,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
673 680
674root_found: 681root_found:
675 682
676 if (joliet_level && (pri == NULL || opt.rock == 'n')) { 683 if (joliet_level && (pri == NULL || !opt.rock)) {
677 /* This is the case of Joliet with the norock mount flag. 684 /* This is the case of Joliet with the norock mount flag.
678 * A disc with both Joliet and Rock Ridge is handled later 685 * A disc with both Joliet and Rock Ridge is handled later
679 */ 686 */
@@ -802,22 +809,31 @@ root_found:
802 s->s_op = &isofs_sops; 809 s->s_op = &isofs_sops;
803 s->s_export_op = &isofs_export_ops; 810 s->s_export_op = &isofs_export_ops;
804 sbi->s_mapping = opt.map; 811 sbi->s_mapping = opt.map;
805 sbi->s_rock = (opt.rock == 'y' ? 2 : 0); 812 sbi->s_rock = (opt.rock ? 2 : 0);
806 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/ 813 sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
807 sbi->s_cruft = opt.cruft; 814 sbi->s_cruft = opt.cruft;
808 sbi->s_hide = opt.hide; 815 sbi->s_hide = opt.hide;
809 sbi->s_showassoc = opt.showassoc; 816 sbi->s_showassoc = opt.showassoc;
810 sbi->s_uid = opt.uid; 817 sbi->s_uid = opt.uid;
811 sbi->s_gid = opt.gid; 818 sbi->s_gid = opt.gid;
819 sbi->s_uid_set = opt.uid_set;
820 sbi->s_gid_set = opt.gid_set;
812 sbi->s_utf8 = opt.utf8; 821 sbi->s_utf8 = opt.utf8;
813 sbi->s_nocompress = opt.nocompress; 822 sbi->s_nocompress = opt.nocompress;
823 sbi->s_overriderockperm = opt.overriderockperm;
814 /* 824 /*
815 * It would be incredibly stupid to allow people to mark every file 825 * It would be incredibly stupid to allow people to mark every file
816 * on the disk as suid, so we merely allow them to set the default 826 * on the disk as suid, so we merely allow them to set the default
817 * permissions. 827 * permissions.
818 */ 828 */
819 sbi->s_fmode = opt.fmode & 0777; 829 if (opt.fmode != ISOFS_INVALID_MODE)
820 sbi->s_dmode = opt.dmode & 0777; 830 sbi->s_fmode = opt.fmode & 0777;
831 else
832 sbi->s_fmode = ISOFS_INVALID_MODE;
833 if (opt.dmode != ISOFS_INVALID_MODE)
834 sbi->s_dmode = opt.dmode & 0777;
835 else
836 sbi->s_dmode = ISOFS_INVALID_MODE;
821 837
822 /* 838 /*
823 * Read the root inode, which _may_ result in changing 839 * Read the root inode, which _may_ result in changing
@@ -1095,18 +1111,6 @@ static const struct address_space_operations isofs_aops = {
1095 .bmap = _isofs_bmap 1111 .bmap = _isofs_bmap
1096}; 1112};
1097 1113
1098static inline void test_and_set_uid(uid_t *p, uid_t value)
1099{
1100 if (value)
1101 *p = value;
1102}
1103
1104static inline void test_and_set_gid(gid_t *p, gid_t value)
1105{
1106 if (value)
1107 *p = value;
1108}
1109
1110static int isofs_read_level3_size(struct inode *inode) 1114static int isofs_read_level3_size(struct inode *inode)
1111{ 1115{
1112 unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); 1116 unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
@@ -1261,7 +1265,10 @@ static int isofs_read_inode(struct inode *inode)
1261 ei->i_file_format = isofs_file_normal; 1265 ei->i_file_format = isofs_file_normal;
1262 1266
1263 if (de->flags[-high_sierra] & 2) { 1267 if (de->flags[-high_sierra] & 2) {
1264 inode->i_mode = sbi->s_dmode | S_IFDIR; 1268 if (sbi->s_dmode != ISOFS_INVALID_MODE)
1269 inode->i_mode = S_IFDIR | sbi->s_dmode;
1270 else
1271 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
1265 inode->i_nlink = 1; /* 1272 inode->i_nlink = 1; /*
1266 * Set to 1. We know there are 2, but 1273 * Set to 1. We know there are 2, but
1267 * the find utility tries to optimize 1274 * the find utility tries to optimize
@@ -1270,8 +1277,16 @@ static int isofs_read_inode(struct inode *inode)
1270 * do it the hard way. 1277 * do it the hard way.
1271 */ 1278 */
1272 } else { 1279 } else {
1273 /* Everybody gets to read the file. */ 1280 if (sbi->s_fmode != ISOFS_INVALID_MODE) {
1274 inode->i_mode = sbi->s_fmode | S_IFREG; 1281 inode->i_mode = S_IFREG | sbi->s_fmode;
1282 } else {
1283 /*
1284 * Set default permissions: r-x for all. The disc
1285 * could be shared with DOS machines so virtually
1286 * anything could be a valid executable.
1287 */
1288 inode->i_mode = S_IFREG | S_IRUGO | S_IXUGO;
1289 }
1275 inode->i_nlink = 1; 1290 inode->i_nlink = 1;
1276 } 1291 }
1277 inode->i_uid = sbi->s_uid; 1292 inode->i_uid = sbi->s_uid;
@@ -1300,7 +1315,7 @@ static int isofs_read_inode(struct inode *inode)
1300 * this CDROM was mounted with the cruft option. 1315 * this CDROM was mounted with the cruft option.
1301 */ 1316 */
1302 1317
1303 if (sbi->s_cruft == 'y') 1318 if (sbi->s_cruft)
1304 inode->i_size &= 0x00ffffff; 1319 inode->i_size &= 0x00ffffff;
1305 1320
1306 if (de->interleave[0]) { 1321 if (de->interleave[0]) {
@@ -1346,9 +1361,18 @@ static int isofs_read_inode(struct inode *inode)
1346 if (!high_sierra) { 1361 if (!high_sierra) {
1347 parse_rock_ridge_inode(de, inode); 1362 parse_rock_ridge_inode(de, inode);
1348 /* if we want uid/gid set, override the rock ridge setting */ 1363 /* if we want uid/gid set, override the rock ridge setting */
1349 test_and_set_uid(&inode->i_uid, sbi->s_uid); 1364 if (sbi->s_uid_set)
1350 test_and_set_gid(&inode->i_gid, sbi->s_gid); 1365 inode->i_uid = sbi->s_uid;
1366 if (sbi->s_gid_set)
1367 inode->i_gid = sbi->s_gid;
1351 } 1368 }
1369 /* Now set final access rights if overriding rock ridge setting */
1370 if (S_ISDIR(inode->i_mode) && sbi->s_overriderockperm &&
1371 sbi->s_dmode != ISOFS_INVALID_MODE)
1372 inode->i_mode = S_IFDIR | sbi->s_dmode;
1373 if (S_ISREG(inode->i_mode) && sbi->s_overriderockperm &&
1374 sbi->s_fmode != ISOFS_INVALID_MODE)
1375 inode->i_mode = S_IFREG | sbi->s_fmode;
1352 1376
1353 /* Install the inode operations vector */ 1377 /* Install the inode operations vector */
1354 if (S_ISREG(inode->i_mode)) { 1378 if (S_ISREG(inode->i_mode)) {
diff --git a/fs/isofs/isofs.h b/fs/isofs/isofs.h
index ccbf72faf27a..7d33de84f52a 100644
--- a/fs/isofs/isofs.h
+++ b/fs/isofs/isofs.h
@@ -35,21 +35,20 @@ struct isofs_sb_info {
35 unsigned long s_log_zone_size; 35 unsigned long s_log_zone_size;
36 unsigned long s_max_size; 36 unsigned long s_max_size;
37 37
38 unsigned char s_high_sierra; /* A simple flag */
39 unsigned char s_mapping;
40 int s_rock_offset; /* offset of SUSP fields within SU area */ 38 int s_rock_offset; /* offset of SUSP fields within SU area */
41 unsigned char s_rock;
42 unsigned char s_joliet_level; 39 unsigned char s_joliet_level;
43 unsigned char s_utf8; 40 unsigned char s_mapping;
44 unsigned char s_cruft; /* Broken disks with high 41 unsigned int s_high_sierra:1;
45 byte of length containing 42 unsigned int s_rock:2;
46 junk */ 43 unsigned int s_utf8:1;
47 unsigned char s_unhide; 44 unsigned int s_cruft:1; /* Broken disks with high byte of length
48 unsigned char s_nosuid; 45 * containing junk */
49 unsigned char s_nodev; 46 unsigned int s_nocompress:1;
50 unsigned char s_nocompress; 47 unsigned int s_hide:1;
51 unsigned char s_hide; 48 unsigned int s_showassoc:1;
52 unsigned char s_showassoc; 49 unsigned int s_overriderockperm:1;
50 unsigned int s_uid_set:1;
51 unsigned int s_gid_set:1;
53 52
54 mode_t s_fmode; 53 mode_t s_fmode;
55 mode_t s_dmode; 54 mode_t s_dmode;
@@ -58,6 +57,8 @@ struct isofs_sb_info {
58 struct nls_table *s_nls_iocharset; /* Native language support table */ 57 struct nls_table *s_nls_iocharset; /* Native language support table */
59}; 58};
60 59
60#define ISOFS_INVALID_MODE ((mode_t) -1)
61
61static inline struct isofs_sb_info *ISOFS_SB(struct super_block *sb) 62static inline struct isofs_sb_info *ISOFS_SB(struct super_block *sb)
62{ 63{
63 return sb->s_fs_info; 64 return sb->s_fs_info;
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c
index 8299889a835e..eaa831311c9c 100644
--- a/fs/isofs/namei.c
+++ b/fs/isofs/namei.c
@@ -142,9 +142,9 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
142 */ 142 */
143 match = 0; 143 match = 0;
144 if (dlen > 0 && 144 if (dlen > 0 &&
145 (sbi->s_hide =='n' || 145 (!sbi->s_hide ||
146 (!(de->flags[-sbi->s_high_sierra] & 1))) && 146 (!(de->flags[-sbi->s_high_sierra] & 1))) &&
147 (sbi->s_showassoc =='y' || 147 (sbi->s_showassoc ||
148 (!(de->flags[-sbi->s_high_sierra] & 4)))) { 148 (!(de->flags[-sbi->s_high_sierra] & 4)))) {
149 match = (isofs_cmp(dentry, dpnt, dlen) == 0); 149 match = (isofs_cmp(dentry, dpnt, dlen) == 0);
150 } 150 }
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index ed886e6db399..73242ba7c7b1 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1686,35 +1686,6 @@ out:
1686 return; 1686 return;
1687} 1687}
1688 1688
1689/*
1690 * journal_try_to_free_buffers() could race with journal_commit_transaction()
1691 * The latter might still hold the a count on buffers when inspecting
1692 * them on t_syncdata_list or t_locked_list.
1693 *
1694 * journal_try_to_free_buffers() will call this function to
1695 * wait for the current transaction to finish syncing data buffers, before
1696 * tryinf to free that buffer.
1697 *
1698 * Called with journal->j_state_lock held.
1699 */
1700static void journal_wait_for_transaction_sync_data(journal_t *journal)
1701{
1702 transaction_t *transaction = NULL;
1703 tid_t tid;
1704
1705 spin_lock(&journal->j_state_lock);
1706 transaction = journal->j_committing_transaction;
1707
1708 if (!transaction) {
1709 spin_unlock(&journal->j_state_lock);
1710 return;
1711 }
1712
1713 tid = transaction->t_tid;
1714 spin_unlock(&journal->j_state_lock);
1715 log_wait_commit(journal, tid);
1716}
1717
1718/** 1689/**
1719 * int journal_try_to_free_buffers() - try to free page buffers. 1690 * int journal_try_to_free_buffers() - try to free page buffers.
1720 * @journal: journal for operation 1691 * @journal: journal for operation
@@ -1786,25 +1757,6 @@ int journal_try_to_free_buffers(journal_t *journal,
1786 1757
1787 ret = try_to_free_buffers(page); 1758 ret = try_to_free_buffers(page);
1788 1759
1789 /*
1790 * There are a number of places where journal_try_to_free_buffers()
1791 * could race with journal_commit_transaction(), the later still
1792 * holds the reference to the buffers to free while processing them.
1793 * try_to_free_buffers() failed to free those buffers. Some of the
1794 * caller of releasepage() request page buffers to be dropped, otherwise
1795 * treat the fail-to-free as errors (such as generic_file_direct_IO())
1796 *
1797 * So, if the caller of try_to_release_page() wants the synchronous
1798 * behaviour(i.e make sure buffers are dropped upon return),
1799 * let's wait for the current transaction to finish flush of
1800 * dirty data buffers, then try to free those buffers again,
1801 * with the journal locked.
1802 */
1803 if (ret == 0 && (gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS)) {
1804 journal_wait_for_transaction_sync_data(journal);
1805 ret = try_to_free_buffers(page);
1806 }
1807
1808busy: 1760busy:
1809 return ret; 1761 return ret;
1810} 1762}
diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c
index 17159cacbd9e..5d70b3e6d49b 100644
--- a/fs/jbd2/checkpoint.c
+++ b/fs/jbd2/checkpoint.c
@@ -20,9 +20,9 @@
20#include <linux/time.h> 20#include <linux/time.h>
21#include <linux/fs.h> 21#include <linux/fs.h>
22#include <linux/jbd2.h> 22#include <linux/jbd2.h>
23#include <linux/marker.h>
24#include <linux/errno.h> 23#include <linux/errno.h>
25#include <linux/slab.h> 24#include <linux/slab.h>
25#include <trace/events/jbd2.h>
26 26
27/* 27/*
28 * Unlink a buffer from a transaction checkpoint list. 28 * Unlink a buffer from a transaction checkpoint list.
@@ -358,8 +358,7 @@ int jbd2_log_do_checkpoint(journal_t *journal)
358 * journal straight away. 358 * journal straight away.
359 */ 359 */
360 result = jbd2_cleanup_journal_tail(journal); 360 result = jbd2_cleanup_journal_tail(journal);
361 trace_mark(jbd2_checkpoint, "dev %s need_checkpoint %d", 361 trace_jbd2_checkpoint(journal, result);
362 journal->j_devname, result);
363 jbd_debug(1, "cleanup_journal_tail returned %d\n", result); 362 jbd_debug(1, "cleanup_journal_tail returned %d\n", result);
364 if (result <= 0) 363 if (result <= 0)
365 return result; 364 return result;
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 0b7d3b8226fd..7b4088b2364d 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -16,7 +16,6 @@
16#include <linux/time.h> 16#include <linux/time.h>
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/jbd2.h> 18#include <linux/jbd2.h>
19#include <linux/marker.h>
20#include <linux/errno.h> 19#include <linux/errno.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/mm.h> 21#include <linux/mm.h>
@@ -26,6 +25,7 @@
26#include <linux/writeback.h> 25#include <linux/writeback.h>
27#include <linux/backing-dev.h> 26#include <linux/backing-dev.h>
28#include <linux/bio.h> 27#include <linux/bio.h>
28#include <trace/events/jbd2.h>
29 29
30/* 30/*
31 * Default IO end handler for temporary BJ_IO buffer_heads. 31 * Default IO end handler for temporary BJ_IO buffer_heads.
@@ -253,6 +253,7 @@ static int journal_submit_data_buffers(journal_t *journal,
253 * block allocation with delalloc. We need to write 253 * block allocation with delalloc. We need to write
254 * only allocated blocks here. 254 * only allocated blocks here.
255 */ 255 */
256 trace_jbd2_submit_inode_data(jinode->i_vfs_inode);
256 err = journal_submit_inode_data_buffers(mapping); 257 err = journal_submit_inode_data_buffers(mapping);
257 if (!ret) 258 if (!ret)
258 ret = err; 259 ret = err;
@@ -394,8 +395,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
394 commit_transaction = journal->j_running_transaction; 395 commit_transaction = journal->j_running_transaction;
395 J_ASSERT(commit_transaction->t_state == T_RUNNING); 396 J_ASSERT(commit_transaction->t_state == T_RUNNING);
396 397
397 trace_mark(jbd2_start_commit, "dev %s transaction %d", 398 trace_jbd2_start_commit(journal, commit_transaction);
398 journal->j_devname, commit_transaction->t_tid);
399 jbd_debug(1, "JBD: starting commit of transaction %d\n", 399 jbd_debug(1, "JBD: starting commit of transaction %d\n",
400 commit_transaction->t_tid); 400 commit_transaction->t_tid);
401 401
@@ -409,6 +409,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
409 */ 409 */
410 if (commit_transaction->t_synchronous_commit) 410 if (commit_transaction->t_synchronous_commit)
411 write_op = WRITE_SYNC_PLUG; 411 write_op = WRITE_SYNC_PLUG;
412 trace_jbd2_commit_locking(journal, commit_transaction);
412 stats.u.run.rs_wait = commit_transaction->t_max_wait; 413 stats.u.run.rs_wait = commit_transaction->t_max_wait;
413 stats.u.run.rs_locked = jiffies; 414 stats.u.run.rs_locked = jiffies;
414 stats.u.run.rs_running = jbd2_time_diff(commit_transaction->t_start, 415 stats.u.run.rs_running = jbd2_time_diff(commit_transaction->t_start,
@@ -484,6 +485,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
484 */ 485 */
485 jbd2_journal_switch_revoke_table(journal); 486 jbd2_journal_switch_revoke_table(journal);
486 487
488 trace_jbd2_commit_flushing(journal, commit_transaction);
487 stats.u.run.rs_flushing = jiffies; 489 stats.u.run.rs_flushing = jiffies;
488 stats.u.run.rs_locked = jbd2_time_diff(stats.u.run.rs_locked, 490 stats.u.run.rs_locked = jbd2_time_diff(stats.u.run.rs_locked,
489 stats.u.run.rs_flushing); 491 stats.u.run.rs_flushing);
@@ -520,6 +522,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
520 commit_transaction->t_state = T_COMMIT; 522 commit_transaction->t_state = T_COMMIT;
521 spin_unlock(&journal->j_state_lock); 523 spin_unlock(&journal->j_state_lock);
522 524
525 trace_jbd2_commit_logging(journal, commit_transaction);
523 stats.u.run.rs_logging = jiffies; 526 stats.u.run.rs_logging = jiffies;
524 stats.u.run.rs_flushing = jbd2_time_diff(stats.u.run.rs_flushing, 527 stats.u.run.rs_flushing = jbd2_time_diff(stats.u.run.rs_flushing,
525 stats.u.run.rs_logging); 528 stats.u.run.rs_logging);
@@ -1054,9 +1057,7 @@ restart_loop:
1054 if (journal->j_commit_callback) 1057 if (journal->j_commit_callback)
1055 journal->j_commit_callback(journal, commit_transaction); 1058 journal->j_commit_callback(journal, commit_transaction);
1056 1059
1057 trace_mark(jbd2_end_commit, "dev %s transaction %d head %d", 1060 trace_jbd2_end_commit(journal, commit_transaction);
1058 journal->j_devname, commit_transaction->t_tid,
1059 journal->j_tail_sequence);
1060 jbd_debug(1, "JBD: commit %d complete, head %d\n", 1061 jbd_debug(1, "JBD: commit %d complete, head %d\n",
1061 journal->j_commit_sequence, journal->j_tail_sequence); 1062 journal->j_commit_sequence, journal->j_tail_sequence);
1062 if (to_free) 1063 if (to_free)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 62be7d294ec2..18bfd5dab642 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -38,6 +38,10 @@
38#include <linux/debugfs.h> 38#include <linux/debugfs.h>
39#include <linux/seq_file.h> 39#include <linux/seq_file.h>
40#include <linux/math64.h> 40#include <linux/math64.h>
41#include <linux/hash.h>
42
43#define CREATE_TRACE_POINTS
44#include <trace/events/jbd2.h>
41 45
42#include <asm/uaccess.h> 46#include <asm/uaccess.h>
43#include <asm/page.h> 47#include <asm/page.h>
@@ -2377,6 +2381,71 @@ static void __exit journal_exit(void)
2377 jbd2_journal_destroy_caches(); 2381 jbd2_journal_destroy_caches();
2378} 2382}
2379 2383
2384/*
2385 * jbd2_dev_to_name is a utility function used by the jbd2 and ext4
2386 * tracing infrastructure to map a dev_t to a device name.
2387 *
2388 * The caller should use rcu_read_lock() in order to make sure the
2389 * device name stays valid until its done with it. We use
2390 * rcu_read_lock() as well to make sure we're safe in case the caller
2391 * gets sloppy, and because rcu_read_lock() is cheap and can be safely
2392 * nested.
2393 */
2394struct devname_cache {
2395 struct rcu_head rcu;
2396 dev_t device;
2397 char devname[BDEVNAME_SIZE];
2398};
2399#define CACHE_SIZE_BITS 6
2400static struct devname_cache *devcache[1 << CACHE_SIZE_BITS];
2401static DEFINE_SPINLOCK(devname_cache_lock);
2402
2403static void free_devcache(struct rcu_head *rcu)
2404{
2405 kfree(rcu);
2406}
2407
2408const char *jbd2_dev_to_name(dev_t device)
2409{
2410 int i = hash_32(device, CACHE_SIZE_BITS);
2411 char *ret;
2412 struct block_device *bd;
2413
2414 rcu_read_lock();
2415 if (devcache[i] && devcache[i]->device == device) {
2416 ret = devcache[i]->devname;
2417 rcu_read_unlock();
2418 return ret;
2419 }
2420 rcu_read_unlock();
2421
2422 spin_lock(&devname_cache_lock);
2423 if (devcache[i]) {
2424 if (devcache[i]->device == device) {
2425 ret = devcache[i]->devname;
2426 spin_unlock(&devname_cache_lock);
2427 return ret;
2428 }
2429 call_rcu(&devcache[i]->rcu, free_devcache);
2430 }
2431 devcache[i] = kmalloc(sizeof(struct devname_cache), GFP_KERNEL);
2432 if (!devcache[i]) {
2433 spin_unlock(&devname_cache_lock);
2434 return "NODEV-ALLOCFAILURE"; /* Something non-NULL */
2435 }
2436 devcache[i]->device = device;
2437 bd = bdget(device);
2438 if (bd) {
2439 bdevname(bd, devcache[i]->devname);
2440 bdput(bd);
2441 } else
2442 __bdevname(device, devcache[i]->devname);
2443 ret = devcache[i]->devname;
2444 spin_unlock(&devname_cache_lock);
2445 return ret;
2446}
2447EXPORT_SYMBOL(jbd2_dev_to_name);
2448
2380MODULE_LICENSE("GPL"); 2449MODULE_LICENSE("GPL");
2381module_init(journal_init); 2450module_init(journal_init);
2382module_exit(journal_exit); 2451module_exit(journal_exit);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 996ffda06bf3..494501edba6b 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1547,36 +1547,6 @@ out:
1547 return; 1547 return;
1548} 1548}
1549 1549
1550/*
1551 * jbd2_journal_try_to_free_buffers() could race with
1552 * jbd2_journal_commit_transaction(). The later might still hold the
1553 * reference count to the buffers when inspecting them on
1554 * t_syncdata_list or t_locked_list.
1555 *
1556 * jbd2_journal_try_to_free_buffers() will call this function to
1557 * wait for the current transaction to finish syncing data buffers, before
1558 * try to free that buffer.
1559 *
1560 * Called with journal->j_state_lock hold.
1561 */
1562static void jbd2_journal_wait_for_transaction_sync_data(journal_t *journal)
1563{
1564 transaction_t *transaction;
1565 tid_t tid;
1566
1567 spin_lock(&journal->j_state_lock);
1568 transaction = journal->j_committing_transaction;
1569
1570 if (!transaction) {
1571 spin_unlock(&journal->j_state_lock);
1572 return;
1573 }
1574
1575 tid = transaction->t_tid;
1576 spin_unlock(&journal->j_state_lock);
1577 jbd2_log_wait_commit(journal, tid);
1578}
1579
1580/** 1550/**
1581 * int jbd2_journal_try_to_free_buffers() - try to free page buffers. 1551 * int jbd2_journal_try_to_free_buffers() - try to free page buffers.
1582 * @journal: journal for operation 1552 * @journal: journal for operation
@@ -1649,25 +1619,6 @@ int jbd2_journal_try_to_free_buffers(journal_t *journal,
1649 1619
1650 ret = try_to_free_buffers(page); 1620 ret = try_to_free_buffers(page);
1651 1621
1652 /*
1653 * There are a number of places where jbd2_journal_try_to_free_buffers()
1654 * could race with jbd2_journal_commit_transaction(), the later still
1655 * holds the reference to the buffers to free while processing them.
1656 * try_to_free_buffers() failed to free those buffers. Some of the
1657 * caller of releasepage() request page buffers to be dropped, otherwise
1658 * treat the fail-to-free as errors (such as generic_file_direct_IO())
1659 *
1660 * So, if the caller of try_to_release_page() wants the synchronous
1661 * behaviour(i.e make sure buffers are dropped upon return),
1662 * let's wait for the current transaction to finish flush of
1663 * dirty data buffers, then try to free those buffers again,
1664 * with the journal locked.
1665 */
1666 if (ret == 0 && (gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS)) {
1667 jbd2_journal_wait_for_transaction_sync_data(journal);
1668 ret = try_to_free_buffers(page);
1669 }
1670
1671busy: 1622busy:
1672 return ret; 1623 return ret;
1673} 1624}
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index 63d965193b22..11a7b5c68153 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -18,6 +18,7 @@ proc-y += meminfo.o
18proc-y += stat.o 18proc-y += stat.o
19proc-y += uptime.o 19proc-y += uptime.o
20proc-y += version.o 20proc-y += version.o
21proc-y += softirqs.o
21proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o 22proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o
22proc-$(CONFIG_NET) += proc_net.o 23proc-$(CONFIG_NET) += proc_net.o
23proc-$(CONFIG_PROC_KCORE) += kcore.o 24proc-$(CONFIG_PROC_KCORE) += kcore.o
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index fc6c3025befd..7ba79a54948c 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -195,20 +195,20 @@ void proc_device_tree_add_node(struct device_node *np,
195 p = fixup_name(np, de, p); 195 p = fixup_name(np, de, p);
196 196
197 ent = proc_mkdir(p, de); 197 ent = proc_mkdir(p, de);
198 if (ent == 0) 198 if (ent == NULL)
199 break; 199 break;
200 proc_device_tree_add_node(child, ent); 200 proc_device_tree_add_node(child, ent);
201 } 201 }
202 of_node_put(child); 202 of_node_put(child);
203 203
204 for (pp = np->properties; pp != 0; pp = pp->next) { 204 for (pp = np->properties; pp != NULL; pp = pp->next) {
205 p = pp->name; 205 p = pp->name;
206 206
207 if (duplicate_name(de, p)) 207 if (duplicate_name(de, p))
208 p = fixup_name(np, de, p); 208 p = fixup_name(np, de, p);
209 209
210 ent = __proc_device_tree_add_prop(de, pp, p); 210 ent = __proc_device_tree_add_prop(de, pp, p);
211 if (ent == 0) 211 if (ent == NULL)
212 break; 212 break;
213 } 213 }
214} 214}
@@ -221,10 +221,10 @@ void __init proc_device_tree_init(void)
221 struct device_node *root; 221 struct device_node *root;
222 222
223 proc_device_tree = proc_mkdir("device-tree", NULL); 223 proc_device_tree = proc_mkdir("device-tree", NULL);
224 if (proc_device_tree == 0) 224 if (proc_device_tree == NULL)
225 return; 225 return;
226 root = of_find_node_by_path("/"); 226 root = of_find_node_by_path("/");
227 if (root == 0) { 227 if (root == NULL) {
228 printk(KERN_ERR "/proc/device-tree: can't find root\n"); 228 printk(KERN_ERR "/proc/device-tree: can't find root\n");
229 return; 229 return;
230 } 230 }
diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c
new file mode 100644
index 000000000000..1807c2419f17
--- /dev/null
+++ b/fs/proc/softirqs.c
@@ -0,0 +1,44 @@
1#include <linux/init.h>
2#include <linux/kernel_stat.h>
3#include <linux/proc_fs.h>
4#include <linux/seq_file.h>
5
6/*
7 * /proc/softirqs ... display the number of softirqs
8 */
9static int show_softirqs(struct seq_file *p, void *v)
10{
11 int i, j;
12
13 seq_printf(p, " ");
14 for_each_possible_cpu(i)
15 seq_printf(p, "CPU%-8d", i);
16 seq_printf(p, "\n");
17
18 for (i = 0; i < NR_SOFTIRQS; i++) {
19 seq_printf(p, "%8s:", softirq_to_name[i]);
20 for_each_possible_cpu(j)
21 seq_printf(p, " %10u", kstat_softirqs_cpu(i, j));
22 seq_printf(p, "\n");
23 }
24 return 0;
25}
26
27static int softirqs_open(struct inode *inode, struct file *file)
28{
29 return single_open(file, show_softirqs, NULL);
30}
31
32static const struct file_operations proc_softirqs_operations = {
33 .open = softirqs_open,
34 .read = seq_read,
35 .llseek = seq_lseek,
36 .release = single_release,
37};
38
39static int __init proc_softirqs_init(void)
40{
41 proc_create("softirqs", 0, NULL, &proc_softirqs_operations);
42 return 0;
43}
44module_init(proc_softirqs_init);
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 81e4eb60972e..7cc726c6d70a 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -29,6 +29,8 @@ static int show_stat(struct seq_file *p, void *v)
29 cputime64_t user, nice, system, idle, iowait, irq, softirq, steal; 29 cputime64_t user, nice, system, idle, iowait, irq, softirq, steal;
30 cputime64_t guest; 30 cputime64_t guest;
31 u64 sum = 0; 31 u64 sum = 0;
32 u64 sum_softirq = 0;
33 unsigned int per_softirq_sums[NR_SOFTIRQS] = {0};
32 struct timespec boottime; 34 struct timespec boottime;
33 unsigned int per_irq_sum; 35 unsigned int per_irq_sum;
34 36
@@ -53,6 +55,13 @@ static int show_stat(struct seq_file *p, void *v)
53 sum += kstat_irqs_cpu(j, i); 55 sum += kstat_irqs_cpu(j, i);
54 } 56 }
55 sum += arch_irq_stat_cpu(i); 57 sum += arch_irq_stat_cpu(i);
58
59 for (j = 0; j < NR_SOFTIRQS; j++) {
60 unsigned int softirq_stat = kstat_softirqs_cpu(j, i);
61
62 per_softirq_sums[j] += softirq_stat;
63 sum_softirq += softirq_stat;
64 }
56 } 65 }
57 sum += arch_irq_stat(); 66 sum += arch_irq_stat();
58 67
@@ -115,6 +124,12 @@ static int show_stat(struct seq_file *p, void *v)
115 nr_running(), 124 nr_running(),
116 nr_iowait()); 125 nr_iowait());
117 126
127 seq_printf(p, "softirq %llu", (unsigned long long)sum_softirq);
128
129 for (i = 0; i < NR_SOFTIRQS; i++)
130 seq_printf(p, " %u", per_softirq_sums[i]);
131 seq_printf(p, "\n");
132
118 return 0; 133 return 0;
119} 134}
120 135
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 5edcc3f92ba7..0872afa58d39 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -166,12 +166,7 @@ static const struct file_operations proc_vmcore_operations = {
166 166
167static struct vmcore* __init get_new_element(void) 167static struct vmcore* __init get_new_element(void)
168{ 168{
169 struct vmcore *p; 169 return kzalloc(sizeof(struct vmcore), GFP_KERNEL);
170
171 p = kmalloc(sizeof(*p), GFP_KERNEL);
172 if (p)
173 memset(p, 0, sizeof(*p));
174 return p;
175} 170}
176 171
177static u64 __init get_vmcore_size_elf64(char *elfptr) 172static u64 __init get_vmcore_size_elf64(char *elfptr)
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
index 4beb964a2a3e..128d3f7c8aa5 100644
--- a/fs/reiserfs/do_balan.c
+++ b/fs/reiserfs/do_balan.c
@@ -1270,9 +1270,8 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h
1270 1270
1271 RFALSE(ih, "PAP-12210: ih must be 0"); 1271 RFALSE(ih, "PAP-12210: ih must be 0");
1272 1272
1273 if (is_direntry_le_ih 1273 aux_ih = B_N_PITEM_HEAD(tbS0, item_pos);
1274 (aux_ih = 1274 if (is_direntry_le_ih(aux_ih)) {
1275 B_N_PITEM_HEAD(tbS0, item_pos))) {
1276 /* we append to directory item */ 1275 /* we append to directory item */
1277 1276
1278 int entry_count; 1277 int entry_count;
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c
index 381750a155f6..03d85cbf90bf 100644
--- a/fs/reiserfs/lbalance.c
+++ b/fs/reiserfs/lbalance.c
@@ -390,7 +390,8 @@ static void leaf_item_bottle(struct buffer_info *dest_bi,
390 390
391 if (last_first == FIRST_TO_LAST) { 391 if (last_first == FIRST_TO_LAST) {
392 /* if ( if item in position item_num in buffer SOURCE is directory item ) */ 392 /* if ( if item in position item_num in buffer SOURCE is directory item ) */
393 if (is_direntry_le_ih(ih = B_N_PITEM_HEAD(src, item_num))) 393 ih = B_N_PITEM_HEAD(src, item_num);
394 if (is_direntry_le_ih(ih))
394 leaf_copy_dir_entries(dest_bi, src, FIRST_TO_LAST, 395 leaf_copy_dir_entries(dest_bi, src, FIRST_TO_LAST,
395 item_num, 0, cpy_bytes); 396 item_num, 0, cpy_bytes);
396 else { 397 else {
@@ -418,7 +419,8 @@ static void leaf_item_bottle(struct buffer_info *dest_bi,
418 } 419 }
419 } else { 420 } else {
420 /* if ( if item in position item_num in buffer SOURCE is directory item ) */ 421 /* if ( if item in position item_num in buffer SOURCE is directory item ) */
421 if (is_direntry_le_ih(ih = B_N_PITEM_HEAD(src, item_num))) 422 ih = B_N_PITEM_HEAD(src, item_num);
423 if (is_direntry_le_ih(ih))
422 leaf_copy_dir_entries(dest_bi, src, LAST_TO_FIRST, 424 leaf_copy_dir_entries(dest_bi, src, LAST_TO_FIRST,
423 item_num, 425 item_num,
424 I_ENTRY_COUNT(ih) - cpy_bytes, 426 I_ENTRY_COUNT(ih) - cpy_bytes,
@@ -774,8 +776,8 @@ void leaf_delete_items(struct buffer_info *cur_bi, int last_first,
774 leaf_delete_items_entirely(cur_bi, first + 1, 776 leaf_delete_items_entirely(cur_bi, first + 1,
775 del_num - 1); 777 del_num - 1);
776 778
777 if (is_direntry_le_ih 779 ih = B_N_PITEM_HEAD(bh, B_NR_ITEMS(bh) - 1);
778 (ih = B_N_PITEM_HEAD(bh, B_NR_ITEMS(bh) - 1))) 780 if (is_direntry_le_ih(ih))
779 /* the last item is directory */ 781 /* the last item is directory */
780 /* len = numbers of directory entries in this item */ 782 /* len = numbers of directory entries in this item */
781 len = ih_entry_count(ih); 783 len = ih_entry_count(ih);
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 7f40f30c55c5..6c959275f2d0 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -640,6 +640,26 @@ int seq_puts(struct seq_file *m, const char *s)
640} 640}
641EXPORT_SYMBOL(seq_puts); 641EXPORT_SYMBOL(seq_puts);
642 642
643/**
644 * seq_write - write arbitrary data to buffer
645 * @seq: seq_file identifying the buffer to which data should be written
646 * @data: data address
647 * @len: number of bytes
648 *
649 * Return 0 on success, non-zero otherwise.
650 */
651int seq_write(struct seq_file *seq, const void *data, size_t len)
652{
653 if (seq->count + len < seq->size) {
654 memcpy(seq->buf + seq->count, data, len);
655 seq->count += len;
656 return 0;
657 }
658 seq->count = seq->size;
659 return -1;
660}
661EXPORT_SYMBOL(seq_write);
662
643struct list_head *seq_list_start(struct list_head *head, loff_t pos) 663struct list_head *seq_list_start(struct list_head *head, loff_t pos)
644{ 664{
645 struct list_head *lh; 665 struct list_head *lh;
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 3d2512c21f05..7cf33379fd46 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -56,9 +56,7 @@ static int ufs_block_to_path(struct inode *inode, sector_t i_block, sector_t off
56 56
57 57
58 UFSD("ptrs=uspi->s_apb = %d,double_blocks=%ld \n",ptrs,double_blocks); 58 UFSD("ptrs=uspi->s_apb = %d,double_blocks=%ld \n",ptrs,double_blocks);
59 if (i_block < 0) { 59 if (i_block < direct_blocks) {
60 ufs_warning(inode->i_sb, "ufs_block_to_path", "block < 0");
61 } else if (i_block < direct_blocks) {
62 offsets[n++] = i_block; 60 offsets[n++] = i_block;
63 } else if ((i_block -= direct_blocks) < indirect_blocks) { 61 } else if ((i_block -= direct_blocks) < indirect_blocks) {
64 offsets[n++] = UFS_IND_BLOCK; 62 offsets[n++] = UFS_IND_BLOCK;
@@ -440,8 +438,6 @@ int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head
440 lock_kernel(); 438 lock_kernel();
441 439
442 UFSD("ENTER, ino %lu, fragment %llu\n", inode->i_ino, (unsigned long long)fragment); 440 UFSD("ENTER, ino %lu, fragment %llu\n", inode->i_ino, (unsigned long long)fragment);
443 if (fragment < 0)
444 goto abort_negative;
445 if (fragment > 441 if (fragment >
446 ((UFS_NDADDR + uspi->s_apb + uspi->s_2apb + uspi->s_3apb) 442 ((UFS_NDADDR + uspi->s_apb + uspi->s_2apb + uspi->s_3apb)
447 << uspi->s_fpbshift)) 443 << uspi->s_fpbshift))
@@ -504,10 +500,6 @@ abort:
504 unlock_kernel(); 500 unlock_kernel();
505 return err; 501 return err;
506 502
507abort_negative:
508 ufs_warning(sb, "ufs_get_block", "block < 0");
509 goto abort;
510
511abort_too_big: 503abort_too_big:
512 ufs_warning(sb, "ufs_get_block", "block > big"); 504 ufs_warning(sb, "ufs_get_block", "block > big");
513 goto abort; 505 goto abort;
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
new file mode 100644
index 000000000000..5406a601185c
--- /dev/null
+++ b/include/asm-generic/dma-mapping-common.h
@@ -0,0 +1,190 @@
1#ifndef _ASM_GENERIC_DMA_MAPPING_H
2#define _ASM_GENERIC_DMA_MAPPING_H
3
4#include <linux/kmemcheck.h>
5#include <linux/scatterlist.h>
6#include <linux/dma-debug.h>
7#include <linux/dma-attrs.h>
8
9static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
10 size_t size,
11 enum dma_data_direction dir,
12 struct dma_attrs *attrs)
13{
14 struct dma_map_ops *ops = get_dma_ops(dev);
15 dma_addr_t addr;
16
17 kmemcheck_mark_initialized(ptr, size);
18 BUG_ON(!valid_dma_direction(dir));
19 addr = ops->map_page(dev, virt_to_page(ptr),
20 (unsigned long)ptr & ~PAGE_MASK, size,
21 dir, attrs);
22 debug_dma_map_page(dev, virt_to_page(ptr),
23 (unsigned long)ptr & ~PAGE_MASK, size,
24 dir, addr, true);
25 return addr;
26}
27
28static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr,
29 size_t size,
30 enum dma_data_direction dir,
31 struct dma_attrs *attrs)
32{
33 struct dma_map_ops *ops = get_dma_ops(dev);
34
35 BUG_ON(!valid_dma_direction(dir));
36 if (ops->unmap_page)
37 ops->unmap_page(dev, addr, size, dir, attrs);
38 debug_dma_unmap_page(dev, addr, size, dir, true);
39}
40
41static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
42 int nents, enum dma_data_direction dir,
43 struct dma_attrs *attrs)
44{
45 struct dma_map_ops *ops = get_dma_ops(dev);
46 int i, ents;
47 struct scatterlist *s;
48
49 for_each_sg(sg, s, nents, i)
50 kmemcheck_mark_initialized(sg_virt(s), s->length);
51 BUG_ON(!valid_dma_direction(dir));
52 ents = ops->map_sg(dev, sg, nents, dir, attrs);
53 debug_dma_map_sg(dev, sg, nents, ents, dir);
54
55 return ents;
56}
57
58static inline void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg,
59 int nents, enum dma_data_direction dir,
60 struct dma_attrs *attrs)
61{
62 struct dma_map_ops *ops = get_dma_ops(dev);
63
64 BUG_ON(!valid_dma_direction(dir));
65 debug_dma_unmap_sg(dev, sg, nents, dir);
66 if (ops->unmap_sg)
67 ops->unmap_sg(dev, sg, nents, dir, attrs);
68}
69
70static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
71 size_t offset, size_t size,
72 enum dma_data_direction dir)
73{
74 struct dma_map_ops *ops = get_dma_ops(dev);
75 dma_addr_t addr;
76
77 kmemcheck_mark_initialized(page_address(page) + offset, size);
78 BUG_ON(!valid_dma_direction(dir));
79 addr = ops->map_page(dev, page, offset, size, dir, NULL);
80 debug_dma_map_page(dev, page, offset, size, dir, addr, false);
81
82 return addr;
83}
84
85static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
86 size_t size, enum dma_data_direction dir)
87{
88 struct dma_map_ops *ops = get_dma_ops(dev);
89
90 BUG_ON(!valid_dma_direction(dir));
91 if (ops->unmap_page)
92 ops->unmap_page(dev, addr, size, dir, NULL);
93 debug_dma_unmap_page(dev, addr, size, dir, false);
94}
95
96static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr,
97 size_t size,
98 enum dma_data_direction dir)
99{
100 struct dma_map_ops *ops = get_dma_ops(dev);
101
102 BUG_ON(!valid_dma_direction(dir));
103 if (ops->sync_single_for_cpu)
104 ops->sync_single_for_cpu(dev, addr, size, dir);
105 debug_dma_sync_single_for_cpu(dev, addr, size, dir);
106 flush_write_buffers();
107}
108
109static inline void dma_sync_single_for_device(struct device *dev,
110 dma_addr_t addr, size_t size,
111 enum dma_data_direction dir)
112{
113 struct dma_map_ops *ops = get_dma_ops(dev);
114
115 BUG_ON(!valid_dma_direction(dir));
116 if (ops->sync_single_for_device)
117 ops->sync_single_for_device(dev, addr, size, dir);
118 debug_dma_sync_single_for_device(dev, addr, size, dir);
119 flush_write_buffers();
120}
121
122static inline void dma_sync_single_range_for_cpu(struct device *dev,
123 dma_addr_t addr,
124 unsigned long offset,
125 size_t size,
126 enum dma_data_direction dir)
127{
128 struct dma_map_ops *ops = get_dma_ops(dev);
129
130 BUG_ON(!valid_dma_direction(dir));
131 if (ops->sync_single_range_for_cpu) {
132 ops->sync_single_range_for_cpu(dev, addr, offset, size, dir);
133 debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);
134
135 flush_write_buffers();
136 } else
137 dma_sync_single_for_cpu(dev, addr, size, dir);
138}
139
140static inline void dma_sync_single_range_for_device(struct device *dev,
141 dma_addr_t addr,
142 unsigned long offset,
143 size_t size,
144 enum dma_data_direction dir)
145{
146 struct dma_map_ops *ops = get_dma_ops(dev);
147
148 BUG_ON(!valid_dma_direction(dir));
149 if (ops->sync_single_range_for_device) {
150 ops->sync_single_range_for_device(dev, addr, offset, size, dir);
151 debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);
152
153 flush_write_buffers();
154 } else
155 dma_sync_single_for_device(dev, addr, size, dir);
156}
157
158static inline void
159dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
160 int nelems, enum dma_data_direction dir)
161{
162 struct dma_map_ops *ops = get_dma_ops(dev);
163
164 BUG_ON(!valid_dma_direction(dir));
165 if (ops->sync_sg_for_cpu)
166 ops->sync_sg_for_cpu(dev, sg, nelems, dir);
167 debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir);
168 flush_write_buffers();
169}
170
171static inline void
172dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
173 int nelems, enum dma_data_direction dir)
174{
175 struct dma_map_ops *ops = get_dma_ops(dev);
176
177 BUG_ON(!valid_dma_direction(dir));
178 if (ops->sync_sg_for_device)
179 ops->sync_sg_for_device(dev, sg, nelems, dir);
180 debug_dma_sync_sg_for_device(dev, sg, nelems, dir);
181
182 flush_write_buffers();
183}
184
185#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
186#define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL)
187#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL)
188#define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL)
189
190#endif
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 4ce48e878530..d083561337f2 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -14,6 +14,9 @@ extern char __kprobes_text_start[], __kprobes_text_end[];
14extern char __initdata_begin[], __initdata_end[]; 14extern char __initdata_begin[], __initdata_end[];
15extern char __start_rodata[], __end_rodata[]; 15extern char __start_rodata[], __end_rodata[];
16 16
17/* Start and end of .ctors section - used for constructor calls. */
18extern char __ctors_start[], __ctors_end[];
19
17/* function descriptor handling (if any). Override 20/* function descriptor handling (if any). Override
18 * in asm/sections.h */ 21 * in asm/sections.h */
19#ifndef dereference_function_descriptor 22#ifndef dereference_function_descriptor
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 6bdba10fef4a..55413e568f07 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -440,12 +440,21 @@
440 INIT_TASK \ 440 INIT_TASK \
441 } 441 }
442 442
443#ifdef CONFIG_CONSTRUCTORS
444#define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \
445 *(.ctors) \
446 VMLINUX_SYMBOL(__ctors_end) = .;
447#else
448#define KERNEL_CTORS()
449#endif
450
443/* init and exit section handling */ 451/* init and exit section handling */
444#define INIT_DATA \ 452#define INIT_DATA \
445 *(.init.data) \ 453 *(.init.data) \
446 DEV_DISCARD(init.data) \ 454 DEV_DISCARD(init.data) \
447 CPU_DISCARD(init.data) \ 455 CPU_DISCARD(init.data) \
448 MEM_DISCARD(init.data) \ 456 MEM_DISCARD(init.data) \
457 KERNEL_CTORS() \
449 *(.init.rodata) \ 458 *(.init.rodata) \
450 DEV_DISCARD(init.rodata) \ 459 DEV_DISCARD(init.rodata) \
451 CPU_DISCARD(init.rodata) \ 460 CPU_DISCARD(init.rodata) \
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index a2df7030d49d..03f22076381f 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -308,6 +308,7 @@ unifdef-y += pmu.h
308unifdef-y += poll.h 308unifdef-y += poll.h
309unifdef-y += ppp_defs.h 309unifdef-y += ppp_defs.h
310unifdef-y += ppp-comp.h 310unifdef-y += ppp-comp.h
311unifdef-y += pps.h
311unifdef-y += ptrace.h 312unifdef-y += ptrace.h
312unifdef-y += quota.h 313unifdef-y += quota.h
313unifdef-y += random.h 314unifdef-y += random.h
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h
new file mode 100644
index 000000000000..b4fbd9862606
--- /dev/null
+++ b/include/linux/amba/pl061.h
@@ -0,0 +1,15 @@
1/* platform data for the PL061 GPIO driver */
2
3struct pl061_platform_data {
4 /* number of the first GPIO */
5 unsigned gpio_base;
6
7 /* number of the first IRQ.
8 * If the IRQ functionality in not desired this must be set to
9 * (unsigned) -1.
10 */
11 unsigned irq_base;
12
13 u8 directions; /* startup directions, 1: out, 0: in */
14 u8 values; /* startup values */
15};
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
index 8005effc04f1..b721129e0469 100644
--- a/include/linux/compiler-gcc3.h
+++ b/include/linux/compiler-gcc3.h
@@ -16,6 +16,12 @@
16#define __must_check __attribute__((warn_unused_result)) 16#define __must_check __attribute__((warn_unused_result))
17#endif 17#endif
18 18
19#ifdef CONFIG_GCOV_KERNEL
20# if __GNUC_MINOR__ < 4
21# error "GCOV profiling support for gcc versions below 3.4 not included"
22# endif /* __GNUC_MINOR__ */
23#endif /* CONFIG_GCOV_KERNEL */
24
19/* 25/*
20 * A trick to suppress uninitialized variable warning without generating any 26 * A trick to suppress uninitialized variable warning without generating any
21 * code 27 * code
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 8083b6a36a38..07dfd460d286 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -63,24 +63,26 @@ struct dma_map_ops {
63 63
64#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) 64#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
65 65
66typedef u64 DMA_nnBIT_MASK __deprecated;
67
66/* 68/*
67 * NOTE: do not use the below macros in new code and do not add new definitions 69 * NOTE: do not use the below macros in new code and do not add new definitions
68 * here. 70 * here.
69 * 71 *
70 * Instead, just open-code DMA_BIT_MASK(n) within your driver 72 * Instead, just open-code DMA_BIT_MASK(n) within your driver
71 */ 73 */
72#define DMA_64BIT_MASK DMA_BIT_MASK(64) 74#define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64)
73#define DMA_48BIT_MASK DMA_BIT_MASK(48) 75#define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48)
74#define DMA_47BIT_MASK DMA_BIT_MASK(47) 76#define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47)
75#define DMA_40BIT_MASK DMA_BIT_MASK(40) 77#define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40)
76#define DMA_39BIT_MASK DMA_BIT_MASK(39) 78#define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39)
77#define DMA_35BIT_MASK DMA_BIT_MASK(35) 79#define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35)
78#define DMA_32BIT_MASK DMA_BIT_MASK(32) 80#define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32)
79#define DMA_31BIT_MASK DMA_BIT_MASK(31) 81#define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31)
80#define DMA_30BIT_MASK DMA_BIT_MASK(30) 82#define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30)
81#define DMA_29BIT_MASK DMA_BIT_MASK(29) 83#define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29)
82#define DMA_28BIT_MASK DMA_BIT_MASK(28) 84#define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28)
83#define DMA_24BIT_MASK DMA_BIT_MASK(24) 85#define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24)
84 86
85#define DMA_MASK_NONE 0x0ULL 87#define DMA_MASK_NONE 0x0ULL
86 88
@@ -107,9 +109,20 @@ static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size)
107#include <asm-generic/dma-mapping-broken.h> 109#include <asm-generic/dma-mapping-broken.h>
108#endif 110#endif
109 111
110/* Backwards compat, remove in 2.7.x */ 112/* for backwards compatibility, removed soon */
111#define dma_sync_single dma_sync_single_for_cpu 113static inline void __deprecated dma_sync_single(struct device *dev,
112#define dma_sync_sg dma_sync_sg_for_cpu 114 dma_addr_t addr, size_t size,
115 enum dma_data_direction dir)
116{
117 dma_sync_single_for_cpu(dev, addr, size, dir);
118}
119
120static inline void __deprecated dma_sync_sg(struct device *dev,
121 struct scatterlist *sg, int nelems,
122 enum dma_data_direction dir)
123{
124 dma_sync_sg_for_cpu(dev, sg, nelems, dir);
125}
113 126
114static inline u64 dma_get_mask(struct device *dev) 127static inline u64 dma_get_mask(struct device *dev)
115{ 128{
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 244677cc082b..43fc95d822d5 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -79,10 +79,6 @@ struct fsl_spi_platform_data {
79 u16 max_chipselect; 79 u16 max_chipselect;
80 void (*cs_control)(struct spi_device *spi, bool on); 80 void (*cs_control)(struct spi_device *spi, bool on);
81 u32 sysclk; 81 u32 sysclk;
82
83 /* Legacy hooks, used by mpc52xx_psc_spi driver. */
84 void (*activate_cs)(u8 cs, u8 polarity);
85 void (*deactivate_cs)(u8 cs, u8 polarity);
86}; 82};
87 83
88struct mpc8xx_pcmcia_ops { 84struct mpc8xx_pcmcia_ops {
diff --git a/include/linux/gcd.h b/include/linux/gcd.h
new file mode 100644
index 000000000000..69f5e8a01bad
--- /dev/null
+++ b/include/linux/gcd.h
@@ -0,0 +1,8 @@
1#ifndef _GCD_H
2#define _GCD_H
3
4#include <linux/compiler.h>
5
6unsigned long gcd(unsigned long a, unsigned long b) __attribute_const__;
7
8#endif /* _GCD_H */
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index cfdb35d71bca..7c777a0da17a 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -99,7 +99,7 @@ struct vm_area_struct;
99 __GFP_NORETRY|__GFP_NOMEMALLOC) 99 __GFP_NORETRY|__GFP_NOMEMALLOC)
100 100
101/* Control slab gfp mask during early boot */ 101/* Control slab gfp mask during early boot */
102#define SLAB_GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) 102#define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)
103 103
104/* Control allocation constraints */ 104/* Control allocation constraints */
105#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) 105#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
@@ -348,4 +348,11 @@ static inline void oom_killer_enable(void)
348 oom_killer_disabled = false; 348 oom_killer_disabled = false;
349} 349}
350 350
351extern gfp_t gfp_allowed_mask;
352
353static inline void set_gfp_allowed_mask(gfp_t mask)
354{
355 gfp_allowed_mask = mask;
356}
357
351#endif /* __LINUX_GFP_H */ 358#endif /* __LINUX_GFP_H */
diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h
index 3c7361217df8..81736d6a8db7 100644
--- a/include/linux/i2c/pca953x.h
+++ b/include/linux/i2c/pca953x.h
@@ -15,4 +15,5 @@ struct pca953x_platform_data {
15 int (*teardown)(struct i2c_client *client, 15 int (*teardown)(struct i2c_client *client,
16 unsigned gpio, unsigned ngpio, 16 unsigned gpio, unsigned ngpio,
17 void *context); 17 void *context);
18 char **names;
18}; 19};
diff --git a/include/linux/init.h b/include/linux/init.h
index 8c2c9989626d..13b633ed695e 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -134,6 +134,9 @@ typedef void (*exitcall_t)(void);
134extern initcall_t __con_initcall_start[], __con_initcall_end[]; 134extern initcall_t __con_initcall_start[], __con_initcall_end[];
135extern initcall_t __security_initcall_start[], __security_initcall_end[]; 135extern initcall_t __security_initcall_start[], __security_initcall_end[];
136 136
137/* Used for contructor calls. */
138typedef void (*ctor_fn_t)(void);
139
137/* Defined in init/main.c */ 140/* Defined in init/main.c */
138extern int do_one_initcall(initcall_t fn); 141extern int do_one_initcall(initcall_t fn);
139extern char __initdata boot_command_line[]; 142extern char __initdata boot_command_line[];
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index 3bf40e246a80..e408722a84c7 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -94,13 +94,8 @@ static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
94#endif 94#endif
95 95
96#if defined(CONFIG_IPC_NS) 96#if defined(CONFIG_IPC_NS)
97extern void free_ipc_ns(struct ipc_namespace *ns);
98extern struct ipc_namespace *copy_ipcs(unsigned long flags, 97extern struct ipc_namespace *copy_ipcs(unsigned long flags,
99 struct ipc_namespace *ns); 98 struct ipc_namespace *ns);
100extern void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
101 void (*free)(struct ipc_namespace *,
102 struct kern_ipc_perm *));
103
104static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) 99static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
105{ 100{
106 if (ns) 101 if (ns)
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index cc02393bfce8..d97eb652d6ca 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1315,6 +1315,12 @@ extern int jbd_blocks_per_page(struct inode *inode);
1315#define BUFFER_TRACE2(bh, bh2, info) do {} while (0) 1315#define BUFFER_TRACE2(bh, bh2, info) do {} while (0)
1316#define JBUFFER_TRACE(jh, info) do {} while (0) 1316#define JBUFFER_TRACE(jh, info) do {} while (0)
1317 1317
1318/*
1319 * jbd2_dev_to_name is a utility function used by the jbd2 and ext4
1320 * tracing infrastructure to map a dev_t to a device name.
1321 */
1322extern const char *jbd2_dev_to_name(dev_t device);
1323
1318#endif /* __KERNEL__ */ 1324#endif /* __KERNEL__ */
1319 1325
1320#endif /* _LINUX_JBD2_H */ 1326#endif /* _LINUX_JBD2_H */
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index a77c6007dc99..348fa8874b52 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -5,6 +5,7 @@
5#include <linux/threads.h> 5#include <linux/threads.h>
6#include <linux/percpu.h> 6#include <linux/percpu.h>
7#include <linux/cpumask.h> 7#include <linux/cpumask.h>
8#include <linux/interrupt.h>
8#include <asm/irq.h> 9#include <asm/irq.h>
9#include <asm/cputime.h> 10#include <asm/cputime.h>
10 11
@@ -31,6 +32,7 @@ struct kernel_stat {
31#ifndef CONFIG_GENERIC_HARDIRQS 32#ifndef CONFIG_GENERIC_HARDIRQS
32 unsigned int irqs[NR_IRQS]; 33 unsigned int irqs[NR_IRQS];
33#endif 34#endif
35 unsigned int softirqs[NR_SOFTIRQS];
34}; 36};
35 37
36DECLARE_PER_CPU(struct kernel_stat, kstat); 38DECLARE_PER_CPU(struct kernel_stat, kstat);
@@ -67,6 +69,16 @@ extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
67 69
68#endif 70#endif
69 71
72static inline void kstat_incr_softirqs_this_cpu(unsigned int irq)
73{
74 kstat_this_cpu.softirqs[irq]++;
75}
76
77static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu)
78{
79 return kstat_cpu(cpu).softirqs[irq];
80}
81
70/* 82/*
71 * Number of interrupts per specific IRQ source, since bootup 83 * Number of interrupts per specific IRQ source, since bootup
72 */ 84 */
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 45add35dda1b..e46a0734ab6e 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -117,7 +117,7 @@ static inline bool mem_cgroup_disabled(void)
117} 117}
118 118
119extern bool mem_cgroup_oom_called(struct task_struct *task); 119extern bool mem_cgroup_oom_called(struct task_struct *task);
120 120void mem_cgroup_update_mapped_file_stat(struct page *page, int val);
121#else /* CONFIG_CGROUP_MEM_RES_CTLR */ 121#else /* CONFIG_CGROUP_MEM_RES_CTLR */
122struct mem_cgroup; 122struct mem_cgroup;
123 123
@@ -271,6 +271,11 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
271{ 271{
272} 272}
273 273
274static inline void mem_cgroup_update_mapped_file_stat(struct page *page,
275 int val)
276{
277}
278
274#endif /* CONFIG_CGROUP_MEM_CONT */ 279#endif /* CONFIG_CGROUP_MEM_CONT */
275 280
276#endif /* _LINUX_MEMCONTROL_H */ 281#endif /* _LINUX_MEMCONTROL_H */
diff --git a/include/linux/module.h b/include/linux/module.h
index 505f20dcc1c7..098bdb7bfacf 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -363,6 +363,12 @@ struct module
363 local_t ref; 363 local_t ref;
364#endif 364#endif
365#endif 365#endif
366
367#ifdef CONFIG_CONSTRUCTORS
368 /* Constructor functions. */
369 ctor_fn_t *ctors;
370 unsigned int num_ctors;
371#endif
366}; 372};
367#ifndef MODULE_ARCH_INIT 373#ifndef MODULE_ARCH_INIT
368#define MODULE_ARCH_INIT {} 374#define MODULE_ARCH_INIT {}
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9ea8d6dfe540..d4a4d9867794 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -224,6 +224,11 @@ struct netdev_hw_addr {
224 struct rcu_head rcu_head; 224 struct rcu_head rcu_head;
225}; 225};
226 226
227struct netdev_hw_addr_list {
228 struct list_head list;
229 int count;
230};
231
227struct hh_cache 232struct hh_cache
228{ 233{
229 struct hh_cache *hh_next; /* Next entry */ 234 struct hh_cache *hh_next; /* Next entry */
@@ -776,9 +781,8 @@ struct net_device
776 unsigned char addr_len; /* hardware address length */ 781 unsigned char addr_len; /* hardware address length */
777 unsigned short dev_id; /* for shared network cards */ 782 unsigned short dev_id; /* for shared network cards */
778 783
779 struct list_head uc_list; /* Secondary unicast mac 784 struct netdev_hw_addr_list uc; /* Secondary unicast
780 addresses */ 785 mac addresses */
781 int uc_count; /* Number of installed ucasts */
782 int uc_promisc; 786 int uc_promisc;
783 spinlock_t addr_list_lock; 787 spinlock_t addr_list_lock;
784 struct dev_addr_list *mc_list; /* Multicast mac addresses */ 788 struct dev_addr_list *mc_list; /* Multicast mac addresses */
@@ -810,7 +814,8 @@ struct net_device
810 because most packets are 814 because most packets are
811 unicast) */ 815 unicast) */
812 816
813 struct list_head dev_addr_list; /* list of device hw addresses */ 817 struct netdev_hw_addr_list dev_addrs; /* list of device
818 hw addresses */
814 819
815 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ 820 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
816 821
@@ -1806,11 +1811,11 @@ static inline void netif_addr_unlock_bh(struct net_device *dev)
1806} 1811}
1807 1812
1808/* 1813/*
1809 * dev_addr_list walker. Should be used only for read access. Call with 1814 * dev_addrs walker. Should be used only for read access. Call with
1810 * rcu_read_lock held. 1815 * rcu_read_lock held.
1811 */ 1816 */
1812#define for_each_dev_addr(dev, ha) \ 1817#define for_each_dev_addr(dev, ha) \
1813 list_for_each_entry_rcu(ha, &dev->dev_addr_list, list) 1818 list_for_each_entry_rcu(ha, &dev->dev_addrs.list, list)
1814 1819
1815/* These functions live elsewhere (drivers/net/net_init.c, but related) */ 1820/* These functions live elsewhere (drivers/net/net_init.c, but related) */
1816 1821
diff --git a/include/linux/pps.h b/include/linux/pps.h
new file mode 100644
index 000000000000..cfe5c7214ec6
--- /dev/null
+++ b/include/linux/pps.h
@@ -0,0 +1,122 @@
1/*
2 * PPS API header
3 *
4 * Copyright (C) 2005-2009 Rodolfo Giometti <giometti@linux.it>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21
22#ifndef _PPS_H_
23#define _PPS_H_
24
25#define PPS_VERSION "5.3.6"
26#define PPS_MAX_SOURCES 16 /* should be enough... */
27
28/* Implementation note: the logical states ``assert'' and ``clear''
29 * are implemented in terms of the chip register, i.e. ``assert''
30 * means the bit is set. */
31
32/*
33 * 3.2 New data structures
34 */
35
36#define PPS_API_VERS_1 1
37#define PPS_API_VERS PPS_API_VERS_1 /* we use API version 1 */
38#define PPS_MAX_NAME_LEN 32
39
40/* 32-bit vs. 64-bit compatibility.
41 *
42 * 0n i386, the alignment of a uint64_t is only 4 bytes, while on most other
43 * architectures it's 8 bytes. On i386, there will be no padding between the
44 * two consecutive 'struct pps_ktime' members of struct pps_kinfo and struct
45 * pps_kparams. But on most platforms there will be padding to ensure correct
46 * alignment.
47 *
48 * The simple fix is probably to add an explicit padding.
49 * [David Woodhouse]
50 */
51struct pps_ktime {
52 __s64 sec;
53 __s32 nsec;
54 __u32 flags;
55};
56#define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */
57
58struct pps_kinfo {
59 __u32 assert_sequence; /* seq. num. of assert event */
60 __u32 clear_sequence; /* seq. num. of clear event */
61 struct pps_ktime assert_tu; /* time of assert event */
62 struct pps_ktime clear_tu; /* time of clear event */
63 int current_mode; /* current mode bits */
64};
65
66struct pps_kparams {
67 int api_version; /* API version # */
68 int mode; /* mode bits */
69 struct pps_ktime assert_off_tu; /* offset compensation for assert */
70 struct pps_ktime clear_off_tu; /* offset compensation for clear */
71};
72
73/*
74 * 3.3 Mode bit definitions
75 */
76
77/* Device/implementation parameters */
78#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
79#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
80#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
81
82#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
83#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
84
85#define PPS_CANWAIT 0x100 /* can we wait for an event? */
86#define PPS_CANPOLL 0x200 /* bit reserved for future use */
87
88/* Kernel actions */
89#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
90#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
91
92/* Timestamp formats */
93#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
94#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
95
96/*
97 * 3.4.4 New functions: disciplining the kernel timebase
98 */
99
100/* Kernel consumers */
101#define PPS_KC_HARDPPS 0 /* hardpps() (or equivalent) */
102#define PPS_KC_HARDPPS_PLL 1 /* hardpps() constrained to
103 use a phase-locked loop */
104#define PPS_KC_HARDPPS_FLL 2 /* hardpps() constrained to
105 use a frequency-locked loop */
106/*
107 * Here begins the implementation-specific part!
108 */
109
110struct pps_fdata {
111 struct pps_kinfo info;
112 struct pps_ktime timeout;
113};
114
115#include <linux/ioctl.h>
116
117#define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *)
118#define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams *)
119#define PPS_GETCAP _IOR('p', 0xa3, int *)
120#define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *)
121
122#endif /* _PPS_H_ */
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h
new file mode 100644
index 000000000000..e0a193f830ef
--- /dev/null
+++ b/include/linux/pps_kernel.h
@@ -0,0 +1,89 @@
1/*
2 * PPS API kernel header
3 *
4 * Copyright (C) 2009 Rodolfo Giometti <giometti@linux.it>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#include <linux/pps.h>
22
23#include <linux/cdev.h>
24#include <linux/device.h>
25#include <linux/time.h>
26
27/*
28 * Global defines
29 */
30
31/* The specific PPS source info */
32struct pps_source_info {
33 char name[PPS_MAX_NAME_LEN]; /* simbolic name */
34 char path[PPS_MAX_NAME_LEN]; /* path of connected device */
35 int mode; /* PPS's allowed mode */
36
37 void (*echo)(int source, int event, void *data); /* PPS echo function */
38
39 struct module *owner;
40 struct device *dev;
41};
42
43/* The main struct */
44struct pps_device {
45 struct pps_source_info info; /* PSS source info */
46
47 struct pps_kparams params; /* PPS's current params */
48
49 __u32 assert_sequence; /* PPS' assert event seq # */
50 __u32 clear_sequence; /* PPS' clear event seq # */
51 struct pps_ktime assert_tu;
52 struct pps_ktime clear_tu;
53 int current_mode; /* PPS mode at event time */
54
55 int go; /* PPS event is arrived? */
56 wait_queue_head_t queue; /* PPS event queue */
57
58 unsigned int id; /* PPS source unique ID */
59 struct cdev cdev;
60 struct device *dev;
61 int devno;
62 struct fasync_struct *async_queue; /* fasync method */
63 spinlock_t lock;
64
65 atomic_t usage; /* usage count */
66};
67
68/*
69 * Global variables
70 */
71
72extern spinlock_t pps_idr_lock;
73extern struct idr pps_idr;
74extern struct timespec pps_irq_ts[];
75
76extern struct device_attribute pps_attrs[];
77
78/*
79 * Exported functions
80 */
81
82struct pps_device *pps_get_source(int source);
83extern void pps_put_source(struct pps_device *pps);
84extern int pps_register_source(struct pps_source_info *info,
85 int default_params);
86extern void pps_unregister_source(int source);
87extern int pps_register_cdev(struct pps_device *pps);
88extern void pps_unregister_cdev(struct pps_device *pps);
89extern void pps_event(int source, struct pps_ktime *ts, int event, void *data);
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 59e133d39d50..7456d7d87a19 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -81,7 +81,6 @@
81 81
82 82
83extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); 83extern long arch_ptrace(struct task_struct *child, long request, long addr, long data);
84extern struct task_struct *ptrace_get_task_struct(pid_t pid);
85extern int ptrace_traceme(void); 84extern int ptrace_traceme(void);
86extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); 85extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
87extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); 86extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 6ba830fa8538..ffa2efbbe382 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -232,7 +232,7 @@ struct mdp_superblock_1 {
232 __le64 reshape_position; /* next address in array-space for reshape */ 232 __le64 reshape_position; /* next address in array-space for reshape */
233 __le32 delta_disks; /* change in number of raid_disks */ 233 __le32 delta_disks; /* change in number of raid_disks */
234 __le32 new_layout; /* new layout */ 234 __le32 new_layout; /* new layout */
235 __le32 new_chunk; /* new chunk size (bytes) */ 235 __le32 new_chunk; /* new chunk size (512byte sectors) */
236 __u8 pad1[128-124]; /* set to 0 when written */ 236 __u8 pad1[128-124]; /* set to 0 when written */
237 237
238 /* constant this-device information - 64 bytes */ 238 /* constant this-device information - 64 bytes */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 2245c78d5876..dd31e7bae35c 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -660,23 +660,54 @@ static inline void set_le_key_k_type(int version, struct reiserfs_key *key,
660 cpu_to_le32(type2uniqueness(type))) 660 cpu_to_le32(type2uniqueness(type)))
661 : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type)); 661 : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type));
662} 662}
663
663static inline void set_le_ih_k_type(struct item_head *ih, int type) 664static inline void set_le_ih_k_type(struct item_head *ih, int type)
664{ 665{
665 set_le_key_k_type(ih_version(ih), &(ih->ih_key), type); 666 set_le_key_k_type(ih_version(ih), &(ih->ih_key), type);
666} 667}
667 668
668#define is_direntry_le_key(version,key) (le_key_k_type (version, key) == TYPE_DIRENTRY) 669static inline int is_direntry_le_key(int version, struct reiserfs_key *key)
669#define is_direct_le_key(version,key) (le_key_k_type (version, key) == TYPE_DIRECT) 670{
670#define is_indirect_le_key(version,key) (le_key_k_type (version, key) == TYPE_INDIRECT) 671 return le_key_k_type(version, key) == TYPE_DIRENTRY;
671#define is_statdata_le_key(version,key) (le_key_k_type (version, key) == TYPE_STAT_DATA) 672}
673
674static inline int is_direct_le_key(int version, struct reiserfs_key *key)
675{
676 return le_key_k_type(version, key) == TYPE_DIRECT;
677}
678
679static inline int is_indirect_le_key(int version, struct reiserfs_key *key)
680{
681 return le_key_k_type(version, key) == TYPE_INDIRECT;
682}
683
684static inline int is_statdata_le_key(int version, struct reiserfs_key *key)
685{
686 return le_key_k_type(version, key) == TYPE_STAT_DATA;
687}
672 688
673// 689//
674// item header has version. 690// item header has version.
675// 691//
676#define is_direntry_le_ih(ih) is_direntry_le_key (ih_version (ih), &((ih)->ih_key)) 692static inline int is_direntry_le_ih(struct item_head *ih)
677#define is_direct_le_ih(ih) is_direct_le_key (ih_version (ih), &((ih)->ih_key)) 693{
678#define is_indirect_le_ih(ih) is_indirect_le_key (ih_version(ih), &((ih)->ih_key)) 694 return is_direntry_le_key(ih_version(ih), &ih->ih_key);
679#define is_statdata_le_ih(ih) is_statdata_le_key (ih_version (ih), &((ih)->ih_key)) 695}
696
697static inline int is_direct_le_ih(struct item_head *ih)
698{
699 return is_direct_le_key(ih_version(ih), &ih->ih_key);
700}
701
702static inline int is_indirect_le_ih(struct item_head *ih)
703{
704 return is_indirect_le_key(ih_version(ih), &ih->ih_key);
705}
706
707static inline int is_statdata_le_ih(struct item_head *ih)
708{
709 return is_statdata_le_key(ih_version(ih), &ih->ih_key);
710}
680 711
681// 712//
682// key is pointer to cpu key, result is cpu 713// key is pointer to cpu key, result is cpu
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
index 4c5bcf6ca7e8..511f42fc6816 100644
--- a/include/linux/res_counter.h
+++ b/include/linux/res_counter.h
@@ -49,6 +49,8 @@ struct res_counter {
49 struct res_counter *parent; 49 struct res_counter *parent;
50}; 50};
51 51
52#define RESOURCE_MAX (unsigned long long)LLONG_MAX
53
52/** 54/**
53 * Helpers to interact with userspace 55 * Helpers to interact with userspace
54 * res_counter_read_u64() - returns the value of the specified member. 56 * res_counter_read_u64() - returns the value of the specified member.
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 02042e7f2196..4d0754269884 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -92,7 +92,6 @@ struct sched_param {
92 92
93#include <asm/processor.h> 93#include <asm/processor.h>
94 94
95struct mem_cgroup;
96struct exec_domain; 95struct exec_domain;
97struct futex_pi_state; 96struct futex_pi_state;
98struct robust_list_head; 97struct robust_list_head;
@@ -1879,9 +1878,6 @@ extern struct pid_namespace init_pid_ns;
1879/* 1878/*
1880 * find a task by one of its numerical ids 1879 * find a task by one of its numerical ids
1881 * 1880 *
1882 * find_task_by_pid_type_ns():
1883 * it is the most generic call - it finds a task by all id,
1884 * type and namespace specified
1885 * find_task_by_pid_ns(): 1881 * find_task_by_pid_ns():
1886 * finds a task by its pid in the specified namespace 1882 * finds a task by its pid in the specified namespace
1887 * find_task_by_vpid(): 1883 * find_task_by_vpid():
@@ -1890,9 +1886,6 @@ extern struct pid_namespace init_pid_ns;
1890 * see also find_vpid() etc in include/linux/pid.h 1886 * see also find_vpid() etc in include/linux/pid.h
1891 */ 1887 */
1892 1888
1893extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
1894 struct pid_namespace *ns);
1895
1896extern struct task_struct *find_task_by_vpid(pid_t nr); 1889extern struct task_struct *find_task_by_vpid(pid_t nr);
1897extern struct task_struct *find_task_by_pid_ns(pid_t nr, 1890extern struct task_struct *find_task_by_pid_ns(pid_t nr,
1898 struct pid_namespace *ns); 1891 struct pid_namespace *ns);
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 004f3b3342c5..0c6a86b79596 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -43,6 +43,7 @@ int seq_release(struct inode *, struct file *);
43int seq_escape(struct seq_file *, const char *, const char *); 43int seq_escape(struct seq_file *, const char *, const char *);
44int seq_putc(struct seq_file *m, char c); 44int seq_putc(struct seq_file *m, char c);
45int seq_puts(struct seq_file *m, const char *s); 45int seq_puts(struct seq_file *m, const char *s);
46int seq_write(struct seq_file *seq, const void *data, size_t len);
46 47
47int seq_printf(struct seq_file *, const char *, ...) 48int seq_printf(struct seq_file *, const char *, ...)
48 __attribute__ ((format (printf,2,3))); 49 __attribute__ ((format (printf,2,3)));
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 63ef24bc01d0..b47b3f039d14 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -265,7 +265,7 @@ typedef unsigned char *sk_buff_data_t;
265 * @transport_header: Transport layer header 265 * @transport_header: Transport layer header
266 * @network_header: Network layer header 266 * @network_header: Network layer header
267 * @mac_header: Link layer header 267 * @mac_header: Link layer header
268 * @dst: destination entry 268 * @_skb_dst: destination entry
269 * @sp: the security path, used for xfrm 269 * @sp: the security path, used for xfrm
270 * @cb: Control buffer. Free for use by every layer. Put private vars here 270 * @cb: Control buffer. Free for use by every layer. Put private vars here
271 * @len: Length of actual data 271 * @len: Length of actual data
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index a0faa18f7b1b..9c4cd27f4685 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -245,6 +245,9 @@ struct spi_master {
245 */ 245 */
246 u16 dma_alignment; 246 u16 dma_alignment;
247 247
248 /* spi_device.mode flags understood by this controller driver */
249 u16 mode_bits;
250
248 /* Setup mode and clock, etc (spi driver may call many times). 251 /* Setup mode and clock, etc (spi driver may call many times).
249 * 252 *
250 * IMPORTANT: this may be called when transfers to another 253 * IMPORTANT: this may be called when transfers to another
@@ -523,30 +526,7 @@ static inline void spi_message_free(struct spi_message *m)
523 kfree(m); 526 kfree(m);
524} 527}
525 528
526/** 529extern int spi_setup(struct spi_device *spi);
527 * spi_setup - setup SPI mode and clock rate
528 * @spi: the device whose settings are being modified
529 * Context: can sleep, and no requests are queued to the device
530 *
531 * SPI protocol drivers may need to update the transfer mode if the
532 * device doesn't work with its default. They may likewise need
533 * to update clock rates or word sizes from initial values. This function
534 * changes those settings, and must be called from a context that can sleep.
535 * Except for SPI_CS_HIGH, which takes effect immediately, the changes take
536 * effect the next time the device is selected and data is transferred to
537 * or from it. When this function returns, the spi device is deselected.
538 *
539 * Note that this call will fail if the protocol driver specifies an option
540 * that the underlying controller or its driver does not support. For
541 * example, not all hardware supports wire transfers using nine bit words,
542 * LSB-first wire encoding, or active-high chipselects.
543 */
544static inline int
545spi_setup(struct spi_device *spi)
546{
547 return spi->master->setup(spi);
548}
549
550 530
551/** 531/**
552 * spi_async - asynchronous SPI transfer 532 * spi_async - asynchronous SPI transfer
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 0cedf31af0b0..c88b36665f79 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -319,10 +319,11 @@ static inline void disable_swap_token(void)
319} 319}
320 320
321#ifdef CONFIG_CGROUP_MEM_RES_CTLR 321#ifdef CONFIG_CGROUP_MEM_RES_CTLR
322extern void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent); 322extern void
323mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout);
323#else 324#else
324static inline void 325static inline void
325mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) 326mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
326{ 327{
327} 328}
328#endif 329#endif
@@ -423,12 +424,6 @@ static inline swp_entry_t get_swap_page(void)
423#define has_swap_token(x) 0 424#define has_swap_token(x) 0
424#define disable_swap_token() do { } while(0) 425#define disable_swap_token() do { } while(0)
425 426
426static inline int mem_cgroup_cache_charge_swapin(struct page *page,
427 struct mm_struct *mm, gfp_t mask, bool locked)
428{
429 return 0;
430}
431
432static inline void 427static inline void
433mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) 428mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)
434{ 429{
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index eb96603d92db..17ba82efa483 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -143,7 +143,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
143 * 143 *
144 * Return %LSM_UNSAFE_* bits applied to an exec because of tracing. 144 * Return %LSM_UNSAFE_* bits applied to an exec because of tracing.
145 * 145 *
146 * Called with task_lock() held on @task. 146 * @task->cred_guard_mutex is held by the caller through the do_execve().
147 */ 147 */
148static inline int tracehook_unsafe_exec(struct task_struct *task) 148static inline int tracehook_unsafe_exec(struct task_struct *task)
149{ 149{
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h
index 9797fec7748a..3adeff82212f 100644
--- a/include/linux/w1-gpio.h
+++ b/include/linux/w1-gpio.h
@@ -18,6 +18,7 @@
18struct w1_gpio_platform_data { 18struct w1_gpio_platform_data {
19 unsigned int pin; 19 unsigned int pin;
20 unsigned int is_open_drain:1; 20 unsigned int is_open_drain:1;
21 void (*enable_external_pullup)(int enable);
21}; 22};
22 23
23#endif /* _LINUX_W1_GPIO_H */ 24#endif /* _LINUX_W1_GPIO_H */
diff --git a/include/net/sock.h b/include/net/sock.h
index 95bd3fd75f94..07133c5e9868 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1208,6 +1208,39 @@ static inline int skb_copy_to_page(struct sock *sk, char __user *from,
1208 return 0; 1208 return 0;
1209} 1209}
1210 1210
1211/**
1212 * sk_wmem_alloc_get - returns write allocations
1213 * @sk: socket
1214 *
1215 * Returns sk_wmem_alloc minus initial offset of one
1216 */
1217static inline int sk_wmem_alloc_get(const struct sock *sk)
1218{
1219 return atomic_read(&sk->sk_wmem_alloc) - 1;
1220}
1221
1222/**
1223 * sk_rmem_alloc_get - returns read allocations
1224 * @sk: socket
1225 *
1226 * Returns sk_rmem_alloc
1227 */
1228static inline int sk_rmem_alloc_get(const struct sock *sk)
1229{
1230 return atomic_read(&sk->sk_rmem_alloc);
1231}
1232
1233/**
1234 * sk_has_allocations - check if allocations are outstanding
1235 * @sk: socket
1236 *
1237 * Returns true if socket has write or read allocations
1238 */
1239static inline int sk_has_allocations(const struct sock *sk)
1240{
1241 return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk);
1242}
1243
1211/* 1244/*
1212 * Queue a received datagram if it will fit. Stream and sequenced 1245 * Queue a received datagram if it will fit. Stream and sequenced
1213 * protocols can't normally use this as they need to fit buffers in 1246 * protocols can't normally use this as they need to fit buffers in
diff --git a/include/net/x25.h b/include/net/x25.h
index fc3f03d976f8..2cda04011568 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -187,7 +187,7 @@ extern int x25_addr_ntoa(unsigned char *, struct x25_address *,
187extern int x25_addr_aton(unsigned char *, struct x25_address *, 187extern int x25_addr_aton(unsigned char *, struct x25_address *,
188 struct x25_address *); 188 struct x25_address *);
189extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); 189extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *);
190extern void x25_destroy_socket(struct sock *); 190extern void x25_destroy_socket_from_timer(struct sock *);
191extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); 191extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int);
192extern void x25_kill_by_neigh(struct x25_neigh *); 192extern void x25_kill_by_neigh(struct x25_neigh *);
193 193
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
new file mode 100644
index 000000000000..acf4cc9cd36d
--- /dev/null
+++ b/include/trace/events/ext4.h
@@ -0,0 +1,719 @@
1#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_EXT4_H
3
4#undef TRACE_SYSTEM
5#define TRACE_SYSTEM ext4
6
7#include <linux/writeback.h>
8#include "../../../fs/ext4/ext4.h"
9#include "../../../fs/ext4/mballoc.h"
10#include <linux/tracepoint.h>
11
12TRACE_EVENT(ext4_free_inode,
13 TP_PROTO(struct inode *inode),
14
15 TP_ARGS(inode),
16
17 TP_STRUCT__entry(
18 __field( dev_t, dev )
19 __field( ino_t, ino )
20 __field( umode_t, mode )
21 __field( uid_t, uid )
22 __field( gid_t, gid )
23 __field( blkcnt_t, blocks )
24 ),
25
26 TP_fast_assign(
27 __entry->dev = inode->i_sb->s_dev;
28 __entry->ino = inode->i_ino;
29 __entry->mode = inode->i_mode;
30 __entry->uid = inode->i_uid;
31 __entry->gid = inode->i_gid;
32 __entry->blocks = inode->i_blocks;
33 ),
34
35 TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu",
36 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode,
37 __entry->uid, __entry->gid, __entry->blocks)
38);
39
40TRACE_EVENT(ext4_request_inode,
41 TP_PROTO(struct inode *dir, int mode),
42
43 TP_ARGS(dir, mode),
44
45 TP_STRUCT__entry(
46 __field( dev_t, dev )
47 __field( ino_t, dir )
48 __field( umode_t, mode )
49 ),
50
51 TP_fast_assign(
52 __entry->dev = dir->i_sb->s_dev;
53 __entry->dir = dir->i_ino;
54 __entry->mode = mode;
55 ),
56
57 TP_printk("dev %s dir %lu mode %d",
58 jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode)
59);
60
61TRACE_EVENT(ext4_allocate_inode,
62 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
63
64 TP_ARGS(inode, dir, mode),
65
66 TP_STRUCT__entry(
67 __field( dev_t, dev )
68 __field( ino_t, ino )
69 __field( ino_t, dir )
70 __field( umode_t, mode )
71 ),
72
73 TP_fast_assign(
74 __entry->dev = inode->i_sb->s_dev;
75 __entry->ino = inode->i_ino;
76 __entry->dir = dir->i_ino;
77 __entry->mode = mode;
78 ),
79
80 TP_printk("dev %s ino %lu dir %lu mode %d",
81 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode)
82);
83
84TRACE_EVENT(ext4_write_begin,
85
86 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
87 unsigned int flags),
88
89 TP_ARGS(inode, pos, len, flags),
90
91 TP_STRUCT__entry(
92 __field( dev_t, dev )
93 __field( ino_t, ino )
94 __field( loff_t, pos )
95 __field( unsigned int, len )
96 __field( unsigned int, flags )
97 ),
98
99 TP_fast_assign(
100 __entry->dev = inode->i_sb->s_dev;
101 __entry->ino = inode->i_ino;
102 __entry->pos = pos;
103 __entry->len = len;
104 __entry->flags = flags;
105 ),
106
107 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
108 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len,
109 __entry->flags)
110);
111
112TRACE_EVENT(ext4_ordered_write_end,
113 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
114 unsigned int copied),
115
116 TP_ARGS(inode, pos, len, copied),
117
118 TP_STRUCT__entry(
119 __field( dev_t, dev )
120 __field( ino_t, ino )
121 __field( loff_t, pos )
122 __field( unsigned int, len )
123 __field( unsigned int, copied )
124 ),
125
126 TP_fast_assign(
127 __entry->dev = inode->i_sb->s_dev;
128 __entry->ino = inode->i_ino;
129 __entry->pos = pos;
130 __entry->len = len;
131 __entry->copied = copied;
132 ),
133
134 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
135 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len,
136 __entry->copied)
137);
138
139TRACE_EVENT(ext4_writeback_write_end,
140 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
141 unsigned int copied),
142
143 TP_ARGS(inode, pos, len, copied),
144
145 TP_STRUCT__entry(
146 __field( dev_t, dev )
147 __field( ino_t, ino )
148 __field( loff_t, pos )
149 __field( unsigned int, len )
150 __field( unsigned int, copied )
151 ),
152
153 TP_fast_assign(
154 __entry->dev = inode->i_sb->s_dev;
155 __entry->ino = inode->i_ino;
156 __entry->pos = pos;
157 __entry->len = len;
158 __entry->copied = copied;
159 ),
160
161 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
162 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len,
163 __entry->copied)
164);
165
166TRACE_EVENT(ext4_journalled_write_end,
167 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
168 unsigned int copied),
169 TP_ARGS(inode, pos, len, copied),
170
171 TP_STRUCT__entry(
172 __field( dev_t, dev )
173 __field( ino_t, ino )
174 __field( loff_t, pos )
175 __field( unsigned int, len )
176 __field( unsigned int, copied )
177 ),
178
179 TP_fast_assign(
180 __entry->dev = inode->i_sb->s_dev;
181 __entry->ino = inode->i_ino;
182 __entry->pos = pos;
183 __entry->len = len;
184 __entry->copied = copied;
185 ),
186
187 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
188 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len,
189 __entry->copied)
190);
191
192TRACE_EVENT(ext4_da_writepage,
193 TP_PROTO(struct inode *inode, struct page *page),
194
195 TP_ARGS(inode, page),
196
197 TP_STRUCT__entry(
198 __field( dev_t, dev )
199 __field( ino_t, ino )
200 __field( pgoff_t, index )
201
202 ),
203
204 TP_fast_assign(
205 __entry->dev = inode->i_sb->s_dev;
206 __entry->ino = inode->i_ino;
207 __entry->index = page->index;
208 ),
209
210 TP_printk("dev %s ino %lu page_index %lu",
211 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index)
212);
213
214TRACE_EVENT(ext4_da_writepages,
215 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
216
217 TP_ARGS(inode, wbc),
218
219 TP_STRUCT__entry(
220 __field( dev_t, dev )
221 __field( ino_t, ino )
222 __field( long, nr_to_write )
223 __field( long, pages_skipped )
224 __field( loff_t, range_start )
225 __field( loff_t, range_end )
226 __field( char, nonblocking )
227 __field( char, for_kupdate )
228 __field( char, for_reclaim )
229 __field( char, for_writepages )
230 __field( char, range_cyclic )
231 ),
232
233 TP_fast_assign(
234 __entry->dev = inode->i_sb->s_dev;
235 __entry->ino = inode->i_ino;
236 __entry->nr_to_write = wbc->nr_to_write;
237 __entry->pages_skipped = wbc->pages_skipped;
238 __entry->range_start = wbc->range_start;
239 __entry->range_end = wbc->range_end;
240 __entry->nonblocking = wbc->nonblocking;
241 __entry->for_kupdate = wbc->for_kupdate;
242 __entry->for_reclaim = wbc->for_reclaim;
243 __entry->for_writepages = wbc->for_writepages;
244 __entry->range_cyclic = wbc->range_cyclic;
245 ),
246
247 TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d",
248 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write,
249 __entry->pages_skipped, __entry->range_start,
250 __entry->range_end, __entry->nonblocking,
251 __entry->for_kupdate, __entry->for_reclaim,
252 __entry->for_writepages, __entry->range_cyclic)
253);
254
255TRACE_EVENT(ext4_da_writepages_result,
256 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
257 int ret, int pages_written),
258
259 TP_ARGS(inode, wbc, ret, pages_written),
260
261 TP_STRUCT__entry(
262 __field( dev_t, dev )
263 __field( ino_t, ino )
264 __field( int, ret )
265 __field( int, pages_written )
266 __field( long, pages_skipped )
267 __field( char, encountered_congestion )
268 __field( char, more_io )
269 __field( char, no_nrwrite_index_update )
270 ),
271
272 TP_fast_assign(
273 __entry->dev = inode->i_sb->s_dev;
274 __entry->ino = inode->i_ino;
275 __entry->ret = ret;
276 __entry->pages_written = pages_written;
277 __entry->pages_skipped = wbc->pages_skipped;
278 __entry->encountered_congestion = wbc->encountered_congestion;
279 __entry->more_io = wbc->more_io;
280 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
281 ),
282
283 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d",
284 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret,
285 __entry->pages_written, __entry->pages_skipped,
286 __entry->encountered_congestion, __entry->more_io,
287 __entry->no_nrwrite_index_update)
288);
289
290TRACE_EVENT(ext4_da_write_begin,
291 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
292 unsigned int flags),
293
294 TP_ARGS(inode, pos, len, flags),
295
296 TP_STRUCT__entry(
297 __field( dev_t, dev )
298 __field( ino_t, ino )
299 __field( loff_t, pos )
300 __field( unsigned int, len )
301 __field( unsigned int, flags )
302 ),
303
304 TP_fast_assign(
305 __entry->dev = inode->i_sb->s_dev;
306 __entry->ino = inode->i_ino;
307 __entry->pos = pos;
308 __entry->len = len;
309 __entry->flags = flags;
310 ),
311
312 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
313 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len,
314 __entry->flags)
315);
316
317TRACE_EVENT(ext4_da_write_end,
318 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
319 unsigned int copied),
320
321 TP_ARGS(inode, pos, len, copied),
322
323 TP_STRUCT__entry(
324 __field( dev_t, dev )
325 __field( ino_t, ino )
326 __field( loff_t, pos )
327 __field( unsigned int, len )
328 __field( unsigned int, copied )
329 ),
330
331 TP_fast_assign(
332 __entry->dev = inode->i_sb->s_dev;
333 __entry->ino = inode->i_ino;
334 __entry->pos = pos;
335 __entry->len = len;
336 __entry->copied = copied;
337 ),
338
339 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
340 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len,
341 __entry->copied)
342);
343
344TRACE_EVENT(ext4_normal_writepage,
345 TP_PROTO(struct inode *inode, struct page *page),
346
347 TP_ARGS(inode, page),
348
349 TP_STRUCT__entry(
350 __field( dev_t, dev )
351 __field( ino_t, ino )
352 __field( pgoff_t, index )
353 ),
354
355 TP_fast_assign(
356 __entry->dev = inode->i_sb->s_dev;
357 __entry->ino = inode->i_ino;
358 __entry->index = page->index;
359 ),
360
361 TP_printk("dev %s ino %lu page_index %lu",
362 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index)
363);
364
365TRACE_EVENT(ext4_journalled_writepage,
366 TP_PROTO(struct inode *inode, struct page *page),
367
368 TP_ARGS(inode, page),
369
370 TP_STRUCT__entry(
371 __field( dev_t, dev )
372 __field( ino_t, ino )
373 __field( pgoff_t, index )
374
375 ),
376
377 TP_fast_assign(
378 __entry->dev = inode->i_sb->s_dev;
379 __entry->ino = inode->i_ino;
380 __entry->index = page->index;
381 ),
382
383 TP_printk("dev %s ino %lu page_index %lu",
384 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index)
385);
386
387TRACE_EVENT(ext4_discard_blocks,
388 TP_PROTO(struct super_block *sb, unsigned long long blk,
389 unsigned long long count),
390
391 TP_ARGS(sb, blk, count),
392
393 TP_STRUCT__entry(
394 __field( dev_t, dev )
395 __field( __u64, blk )
396 __field( __u64, count )
397
398 ),
399
400 TP_fast_assign(
401 __entry->dev = sb->s_dev;
402 __entry->blk = blk;
403 __entry->count = count;
404 ),
405
406 TP_printk("dev %s blk %llu count %llu",
407 jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count)
408);
409
410TRACE_EVENT(ext4_mb_new_inode_pa,
411 TP_PROTO(struct ext4_allocation_context *ac,
412 struct ext4_prealloc_space *pa),
413
414 TP_ARGS(ac, pa),
415
416 TP_STRUCT__entry(
417 __field( dev_t, dev )
418 __field( ino_t, ino )
419 __field( __u64, pa_pstart )
420 __field( __u32, pa_len )
421 __field( __u64, pa_lstart )
422
423 ),
424
425 TP_fast_assign(
426 __entry->dev = ac->ac_sb->s_dev;
427 __entry->ino = ac->ac_inode->i_ino;
428 __entry->pa_pstart = pa->pa_pstart;
429 __entry->pa_len = pa->pa_len;
430 __entry->pa_lstart = pa->pa_lstart;
431 ),
432
433 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
434 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart,
435 __entry->pa_len, __entry->pa_lstart)
436);
437
438TRACE_EVENT(ext4_mb_new_group_pa,
439 TP_PROTO(struct ext4_allocation_context *ac,
440 struct ext4_prealloc_space *pa),
441
442 TP_ARGS(ac, pa),
443
444 TP_STRUCT__entry(
445 __field( dev_t, dev )
446 __field( ino_t, ino )
447 __field( __u64, pa_pstart )
448 __field( __u32, pa_len )
449 __field( __u64, pa_lstart )
450
451 ),
452
453 TP_fast_assign(
454 __entry->dev = ac->ac_sb->s_dev;
455 __entry->ino = ac->ac_inode->i_ino;
456 __entry->pa_pstart = pa->pa_pstart;
457 __entry->pa_len = pa->pa_len;
458 __entry->pa_lstart = pa->pa_lstart;
459 ),
460
461 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
462 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart,
463 __entry->pa_len, __entry->pa_lstart)
464);
465
466TRACE_EVENT(ext4_mb_release_inode_pa,
467 TP_PROTO(struct ext4_allocation_context *ac,
468 struct ext4_prealloc_space *pa,
469 unsigned long long block, unsigned int count),
470
471 TP_ARGS(ac, pa, block, count),
472
473 TP_STRUCT__entry(
474 __field( dev_t, dev )
475 __field( ino_t, ino )
476 __field( __u64, block )
477 __field( __u32, count )
478
479 ),
480
481 TP_fast_assign(
482 __entry->dev = ac->ac_sb->s_dev;
483 __entry->ino = ac->ac_inode->i_ino;
484 __entry->block = block;
485 __entry->count = count;
486 ),
487
488 TP_printk("dev %s ino %lu block %llu count %u",
489 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block,
490 __entry->count)
491);
492
493TRACE_EVENT(ext4_mb_release_group_pa,
494 TP_PROTO(struct ext4_allocation_context *ac,
495 struct ext4_prealloc_space *pa),
496
497 TP_ARGS(ac, pa),
498
499 TP_STRUCT__entry(
500 __field( dev_t, dev )
501 __field( ino_t, ino )
502 __field( __u64, pa_pstart )
503 __field( __u32, pa_len )
504
505 ),
506
507 TP_fast_assign(
508 __entry->dev = ac->ac_sb->s_dev;
509 __entry->ino = ac->ac_inode->i_ino;
510 __entry->pa_pstart = pa->pa_pstart;
511 __entry->pa_len = pa->pa_len;
512 ),
513
514 TP_printk("dev %s pstart %llu len %u",
515 jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len)
516);
517
518TRACE_EVENT(ext4_discard_preallocations,
519 TP_PROTO(struct inode *inode),
520
521 TP_ARGS(inode),
522
523 TP_STRUCT__entry(
524 __field( dev_t, dev )
525 __field( ino_t, ino )
526
527 ),
528
529 TP_fast_assign(
530 __entry->dev = inode->i_sb->s_dev;
531 __entry->ino = inode->i_ino;
532 ),
533
534 TP_printk("dev %s ino %lu",
535 jbd2_dev_to_name(__entry->dev), __entry->ino)
536);
537
538TRACE_EVENT(ext4_mb_discard_preallocations,
539 TP_PROTO(struct super_block *sb, int needed),
540
541 TP_ARGS(sb, needed),
542
543 TP_STRUCT__entry(
544 __field( dev_t, dev )
545 __field( int, needed )
546
547 ),
548
549 TP_fast_assign(
550 __entry->dev = sb->s_dev;
551 __entry->needed = needed;
552 ),
553
554 TP_printk("dev %s needed %d",
555 jbd2_dev_to_name(__entry->dev), __entry->needed)
556);
557
558TRACE_EVENT(ext4_request_blocks,
559 TP_PROTO(struct ext4_allocation_request *ar),
560
561 TP_ARGS(ar),
562
563 TP_STRUCT__entry(
564 __field( dev_t, dev )
565 __field( ino_t, ino )
566 __field( unsigned int, flags )
567 __field( unsigned int, len )
568 __field( __u64, logical )
569 __field( __u64, goal )
570 __field( __u64, lleft )
571 __field( __u64, lright )
572 __field( __u64, pleft )
573 __field( __u64, pright )
574 ),
575
576 TP_fast_assign(
577 __entry->dev = ar->inode->i_sb->s_dev;
578 __entry->ino = ar->inode->i_ino;
579 __entry->flags = ar->flags;
580 __entry->len = ar->len;
581 __entry->logical = ar->logical;
582 __entry->goal = ar->goal;
583 __entry->lleft = ar->lleft;
584 __entry->lright = ar->lright;
585 __entry->pleft = ar->pleft;
586 __entry->pright = ar->pright;
587 ),
588
589 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
590 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags,
591 __entry->len,
592 (unsigned long long) __entry->logical,
593 (unsigned long long) __entry->goal,
594 (unsigned long long) __entry->lleft,
595 (unsigned long long) __entry->lright,
596 (unsigned long long) __entry->pleft,
597 (unsigned long long) __entry->pright)
598);
599
600TRACE_EVENT(ext4_allocate_blocks,
601 TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
602
603 TP_ARGS(ar, block),
604
605 TP_STRUCT__entry(
606 __field( dev_t, dev )
607 __field( ino_t, ino )
608 __field( __u64, block )
609 __field( unsigned int, flags )
610 __field( unsigned int, len )
611 __field( __u64, logical )
612 __field( __u64, goal )
613 __field( __u64, lleft )
614 __field( __u64, lright )
615 __field( __u64, pleft )
616 __field( __u64, pright )
617 ),
618
619 TP_fast_assign(
620 __entry->dev = ar->inode->i_sb->s_dev;
621 __entry->ino = ar->inode->i_ino;
622 __entry->block = block;
623 __entry->flags = ar->flags;
624 __entry->len = ar->len;
625 __entry->logical = ar->logical;
626 __entry->goal = ar->goal;
627 __entry->lleft = ar->lleft;
628 __entry->lright = ar->lright;
629 __entry->pleft = ar->pleft;
630 __entry->pright = ar->pright;
631 ),
632
633 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
634 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags,
635 __entry->len, __entry->block,
636 (unsigned long long) __entry->logical,
637 (unsigned long long) __entry->goal,
638 (unsigned long long) __entry->lleft,
639 (unsigned long long) __entry->lright,
640 (unsigned long long) __entry->pleft,
641 (unsigned long long) __entry->pright)
642);
643
644TRACE_EVENT(ext4_free_blocks,
645 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
646 int metadata),
647
648 TP_ARGS(inode, block, count, metadata),
649
650 TP_STRUCT__entry(
651 __field( dev_t, dev )
652 __field( ino_t, ino )
653 __field( __u64, block )
654 __field( unsigned long, count )
655 __field( int, metadata )
656
657 ),
658
659 TP_fast_assign(
660 __entry->dev = inode->i_sb->s_dev;
661 __entry->ino = inode->i_ino;
662 __entry->block = block;
663 __entry->count = count;
664 __entry->metadata = metadata;
665 ),
666
667 TP_printk("dev %s ino %lu block %llu count %lu metadata %d",
668 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block,
669 __entry->count, __entry->metadata)
670);
671
672TRACE_EVENT(ext4_sync_file,
673 TP_PROTO(struct file *file, struct dentry *dentry, int datasync),
674
675 TP_ARGS(file, dentry, datasync),
676
677 TP_STRUCT__entry(
678 __field( dev_t, dev )
679 __field( ino_t, ino )
680 __field( ino_t, parent )
681 __field( int, datasync )
682 ),
683
684 TP_fast_assign(
685 __entry->dev = dentry->d_inode->i_sb->s_dev;
686 __entry->ino = dentry->d_inode->i_ino;
687 __entry->datasync = datasync;
688 __entry->parent = dentry->d_parent->d_inode->i_ino;
689 ),
690
691 TP_printk("dev %s ino %ld parent %ld datasync %d ",
692 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent,
693 __entry->datasync)
694);
695
696TRACE_EVENT(ext4_sync_fs,
697 TP_PROTO(struct super_block *sb, int wait),
698
699 TP_ARGS(sb, wait),
700
701 TP_STRUCT__entry(
702 __field( dev_t, dev )
703 __field( int, wait )
704
705 ),
706
707 TP_fast_assign(
708 __entry->dev = sb->s_dev;
709 __entry->wait = wait;
710 ),
711
712 TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev),
713 __entry->wait)
714);
715
716#endif /* _TRACE_EXT4_H */
717
718/* This part must be outside protection */
719#include <trace/define_trace.h>
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
new file mode 100644
index 000000000000..845b0b4b48fd
--- /dev/null
+++ b/include/trace/events/jbd2.h
@@ -0,0 +1,168 @@
1#if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_JBD2_H
3
4#include <linux/jbd2.h>
5#include <linux/tracepoint.h>
6
7#undef TRACE_SYSTEM
8#define TRACE_SYSTEM jbd2
9
10TRACE_EVENT(jbd2_checkpoint,
11
12 TP_PROTO(journal_t *journal, int result),
13
14 TP_ARGS(journal, result),
15
16 TP_STRUCT__entry(
17 __field( dev_t, dev )
18 __field( int, result )
19 ),
20
21 TP_fast_assign(
22 __entry->dev = journal->j_fs_dev->bd_dev;
23 __entry->result = result;
24 ),
25
26 TP_printk("dev %s result %d",
27 jbd2_dev_to_name(__entry->dev), __entry->result)
28);
29
30TRACE_EVENT(jbd2_start_commit,
31
32 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
33
34 TP_ARGS(journal, commit_transaction),
35
36 TP_STRUCT__entry(
37 __field( dev_t, dev )
38 __field( char, sync_commit )
39 __field( int, transaction )
40 ),
41
42 TP_fast_assign(
43 __entry->dev = journal->j_fs_dev->bd_dev;
44 __entry->sync_commit = commit_transaction->t_synchronous_commit;
45 __entry->transaction = commit_transaction->t_tid;
46 ),
47
48 TP_printk("dev %s transaction %d sync %d",
49 jbd2_dev_to_name(__entry->dev), __entry->transaction,
50 __entry->sync_commit)
51);
52
53TRACE_EVENT(jbd2_commit_locking,
54
55 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
56
57 TP_ARGS(journal, commit_transaction),
58
59 TP_STRUCT__entry(
60 __field( dev_t, dev )
61 __field( char, sync_commit )
62 __field( int, transaction )
63 ),
64
65 TP_fast_assign(
66 __entry->dev = journal->j_fs_dev->bd_dev;
67 __entry->sync_commit = commit_transaction->t_synchronous_commit;
68 __entry->transaction = commit_transaction->t_tid;
69 ),
70
71 TP_printk("dev %s transaction %d sync %d",
72 jbd2_dev_to_name(__entry->dev), __entry->transaction,
73 __entry->sync_commit)
74);
75
76TRACE_EVENT(jbd2_commit_flushing,
77
78 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
79
80 TP_ARGS(journal, commit_transaction),
81
82 TP_STRUCT__entry(
83 __field( dev_t, dev )
84 __field( char, sync_commit )
85 __field( int, transaction )
86 ),
87
88 TP_fast_assign(
89 __entry->dev = journal->j_fs_dev->bd_dev;
90 __entry->sync_commit = commit_transaction->t_synchronous_commit;
91 __entry->transaction = commit_transaction->t_tid;
92 ),
93
94 TP_printk("dev %s transaction %d sync %d",
95 jbd2_dev_to_name(__entry->dev), __entry->transaction,
96 __entry->sync_commit)
97);
98
99TRACE_EVENT(jbd2_commit_logging,
100
101 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
102
103 TP_ARGS(journal, commit_transaction),
104
105 TP_STRUCT__entry(
106 __field( dev_t, dev )
107 __field( char, sync_commit )
108 __field( int, transaction )
109 ),
110
111 TP_fast_assign(
112 __entry->dev = journal->j_fs_dev->bd_dev;
113 __entry->sync_commit = commit_transaction->t_synchronous_commit;
114 __entry->transaction = commit_transaction->t_tid;
115 ),
116
117 TP_printk("dev %s transaction %d sync %d",
118 jbd2_dev_to_name(__entry->dev), __entry->transaction,
119 __entry->sync_commit)
120);
121
122TRACE_EVENT(jbd2_end_commit,
123 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
124
125 TP_ARGS(journal, commit_transaction),
126
127 TP_STRUCT__entry(
128 __field( dev_t, dev )
129 __field( char, sync_commit )
130 __field( int, transaction )
131 __field( int, head )
132 ),
133
134 TP_fast_assign(
135 __entry->dev = journal->j_fs_dev->bd_dev;
136 __entry->sync_commit = commit_transaction->t_synchronous_commit;
137 __entry->transaction = commit_transaction->t_tid;
138 __entry->head = journal->j_tail_sequence;
139 ),
140
141 TP_printk("dev %s transaction %d sync %d head %d",
142 jbd2_dev_to_name(__entry->dev), __entry->transaction,
143 __entry->sync_commit, __entry->head)
144);
145
146TRACE_EVENT(jbd2_submit_inode_data,
147 TP_PROTO(struct inode *inode),
148
149 TP_ARGS(inode),
150
151 TP_STRUCT__entry(
152 __field( dev_t, dev )
153 __field( ino_t, ino )
154 ),
155
156 TP_fast_assign(
157 __entry->dev = inode->i_sb->s_dev;
158 __entry->ino = inode->i_ino;
159 ),
160
161 TP_printk("dev %s ino %lu",
162 jbd2_dev_to_name(__entry->dev), __entry->ino)
163);
164
165#endif /* _TRACE_JBD2_H */
166
167/* This part must be outside protection */
168#include <trace/define_trace.h>
diff --git a/init/Kconfig b/init/Kconfig
index c4b3c6d51a72..1ce05a4cb5f6 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -16,6 +16,11 @@ config DEFCONFIG_LIST
16 default "$ARCH_DEFCONFIG" 16 default "$ARCH_DEFCONFIG"
17 default "arch/$ARCH/defconfig" 17 default "arch/$ARCH/defconfig"
18 18
19config CONSTRUCTORS
20 bool
21 depends on !UML
22 default y
23
19menu "General setup" 24menu "General setup"
20 25
21config EXPERIMENTAL 26config EXPERIMENTAL
diff --git a/init/main.c b/init/main.c
index 0e7aedeaa05f..09131ec090c1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -642,6 +642,10 @@ asmlinkage void __init start_kernel(void)
642 "enabled early\n"); 642 "enabled early\n");
643 early_boot_irqs_on(); 643 early_boot_irqs_on();
644 local_irq_enable(); 644 local_irq_enable();
645
646 /* Interrupts are enabled now so all GFP allocations are safe. */
647 set_gfp_allowed_mask(__GFP_BITS_MASK);
648
645 kmem_cache_init_late(); 649 kmem_cache_init_late();
646 650
647 /* 651 /*
@@ -720,6 +724,17 @@ asmlinkage void __init start_kernel(void)
720 rest_init(); 724 rest_init();
721} 725}
722 726
727/* Call all constructor functions linked into the kernel. */
728static void __init do_ctors(void)
729{
730#ifdef CONFIG_CONSTRUCTORS
731 ctor_fn_t *call = (ctor_fn_t *) __ctors_start;
732
733 for (; call < (ctor_fn_t *) __ctors_end; call++)
734 (*call)();
735#endif
736}
737
723int initcall_debug; 738int initcall_debug;
724core_param(initcall_debug, initcall_debug, bool, 0644); 739core_param(initcall_debug, initcall_debug, bool, 0644);
725 740
@@ -800,6 +815,7 @@ static void __init do_basic_setup(void)
800 usermodehelper_init(); 815 usermodehelper_init();
801 driver_init(); 816 driver_init();
802 init_irq_proc(); 817 init_irq_proc();
818 do_ctors();
803 do_initcalls(); 819 do_initcalls();
804} 820}
805 821
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 4a5e752a9276..a1094ff0befa 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -14,7 +14,7 @@
14 14
15#include "util.h" 15#include "util.h"
16 16
17static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) 17static struct ipc_namespace *create_ipc_ns(void)
18{ 18{
19 struct ipc_namespace *ns; 19 struct ipc_namespace *ns;
20 int err; 20 int err;
@@ -48,18 +48,9 @@ static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)
48 48
49struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns) 49struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns)
50{ 50{
51 struct ipc_namespace *new_ns;
52
53 BUG_ON(!ns);
54 get_ipc_ns(ns);
55
56 if (!(flags & CLONE_NEWIPC)) 51 if (!(flags & CLONE_NEWIPC))
57 return ns; 52 return get_ipc_ns(ns);
58 53 return create_ipc_ns();
59 new_ns = clone_ipc_ns(ns);
60
61 put_ipc_ns(ns);
62 return new_ns;
63} 54}
64 55
65/* 56/*
@@ -92,6 +83,30 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
92 up_write(&ids->rw_mutex); 83 up_write(&ids->rw_mutex);
93} 84}
94 85
86static void free_ipc_ns(struct ipc_namespace *ns)
87{
88 /*
89 * Unregistering the hotplug notifier at the beginning guarantees
90 * that the ipc namespace won't be freed while we are inside the
91 * callback routine. Since the blocking_notifier_chain_XXX routines
92 * hold a rw lock on the notifier list, unregister_ipcns_notifier()
93 * won't take the rw lock before blocking_notifier_call_chain() has
94 * released the rd lock.
95 */
96 unregister_ipcns_notifier(ns);
97 sem_exit_ns(ns);
98 msg_exit_ns(ns);
99 shm_exit_ns(ns);
100 kfree(ns);
101 atomic_dec(&nr_ipc_ns);
102
103 /*
104 * Do the ipcns removal notification after decrementing nr_ipc_ns in
105 * order to have a correct value when recomputing msgmni.
106 */
107 ipcns_notify(IPCNS_REMOVED);
108}
109
95/* 110/*
96 * put_ipc_ns - drop a reference to an ipc namespace. 111 * put_ipc_ns - drop a reference to an ipc namespace.
97 * @ns: the namespace to put 112 * @ns: the namespace to put
@@ -117,27 +132,3 @@ void put_ipc_ns(struct ipc_namespace *ns)
117 free_ipc_ns(ns); 132 free_ipc_ns(ns);
118 } 133 }
119} 134}
120
121void free_ipc_ns(struct ipc_namespace *ns)
122{
123 /*
124 * Unregistering the hotplug notifier at the beginning guarantees
125 * that the ipc namespace won't be freed while we are inside the
126 * callback routine. Since the blocking_notifier_chain_XXX routines
127 * hold a rw lock on the notifier list, unregister_ipcns_notifier()
128 * won't take the rw lock before blocking_notifier_call_chain() has
129 * released the rd lock.
130 */
131 unregister_ipcns_notifier(ns);
132 sem_exit_ns(ns);
133 msg_exit_ns(ns);
134 shm_exit_ns(ns);
135 kfree(ns);
136 atomic_dec(&nr_ipc_ns);
137
138 /*
139 * Do the ipcns removal notification after decrementing nr_ipc_ns in
140 * order to have a correct value when recomputing msgmni.
141 */
142 ipcns_notify(IPCNS_REMOVED);
143}
diff --git a/ipc/util.h b/ipc/util.h
index 1187332a89d2..ab3ebf2621b9 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -128,7 +128,7 @@ void ipc_update_perm(struct ipc64_perm *in, struct kern_ipc_perm *out);
128struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd, 128struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd,
129 struct ipc64_perm *perm, int extra_perm); 129 struct ipc64_perm *perm, int extra_perm);
130 130
131#if defined(__ia64__) || defined(__x86_64__) || defined(__hppa__) || defined(__XTENSA__) 131#ifndef __ARCH_WANT_IPC_PARSE_VERSION
132 /* On IA-64, we always use the "64-bit version" of the IPC structures. */ 132 /* On IA-64, we always use the "64-bit version" of the IPC structures. */
133# define ipc_parse_version(cmd) IPC_64 133# define ipc_parse_version(cmd) IPC_64
134#else 134#else
@@ -171,5 +171,6 @@ static inline void ipc_unlock(struct kern_ipc_perm *perm)
171struct kern_ipc_perm *ipc_lock_check(struct ipc_ids *ids, int id); 171struct kern_ipc_perm *ipc_lock_check(struct ipc_ids *ids, int id);
172int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, 172int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids,
173 struct ipc_ops *ops, struct ipc_params *params); 173 struct ipc_ops *ops, struct ipc_params *params);
174 174void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
175 void (*free)(struct ipc_namespace *, struct kern_ipc_perm *));
175#endif 176#endif
diff --git a/kernel/Makefile b/kernel/Makefile
index 9df4501cb921..0a32cb21ec97 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -71,6 +71,7 @@ obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
71obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o 71obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
72obj-$(CONFIG_AUDIT) += audit.o auditfilter.o 72obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
73obj-$(CONFIG_AUDITSYSCALL) += auditsc.o 73obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
74obj-$(CONFIG_GCOV_KERNEL) += gcov/
74obj-$(CONFIG_AUDIT_TREE) += audit_tree.o 75obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
75obj-$(CONFIG_KPROBES) += kprobes.o 76obj-$(CONFIG_KPROBES) += kprobes.o
76obj-$(CONFIG_KGDB) += kgdb.o 77obj-$(CONFIG_KGDB) += kgdb.o
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 3fb789f6df94..3737a682cdf5 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -843,6 +843,11 @@ static int parse_cgroupfs_options(char *data,
843 struct cgroup_sb_opts *opts) 843 struct cgroup_sb_opts *opts)
844{ 844{
845 char *token, *o = data ?: "all"; 845 char *token, *o = data ?: "all";
846 unsigned long mask = (unsigned long)-1;
847
848#ifdef CONFIG_CPUSETS
849 mask = ~(1UL << cpuset_subsys_id);
850#endif
846 851
847 opts->subsys_bits = 0; 852 opts->subsys_bits = 0;
848 opts->flags = 0; 853 opts->flags = 0;
@@ -887,6 +892,15 @@ static int parse_cgroupfs_options(char *data,
887 } 892 }
888 } 893 }
889 894
895 /*
896 * Option noprefix was introduced just for backward compatibility
897 * with the old cpuset, so we allow noprefix only if mounting just
898 * the cpuset subsystem.
899 */
900 if (test_bit(ROOT_NOPREFIX, &opts->flags) &&
901 (opts->subsys_bits & mask))
902 return -EINVAL;
903
890 /* We can't have an empty hierarchy */ 904 /* We can't have an empty hierarchy */
891 if (!opts->subsys_bits) 905 if (!opts->subsys_bits)
892 return -EINVAL; 906 return -EINVAL;
diff --git a/kernel/exit.c b/kernel/exit.c
index b6c90b5ef509..628d41f0dd54 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -375,9 +375,8 @@ static void set_special_pids(struct pid *pid)
375} 375}
376 376
377/* 377/*
378 * Let kernel threads use this to say that they 378 * Let kernel threads use this to say that they allow a certain signal.
379 * allow a certain signal (since daemonize() will 379 * Must not be used if kthread was cloned with CLONE_SIGHAND.
380 * have disabled all of them by default).
381 */ 380 */
382int allow_signal(int sig) 381int allow_signal(int sig)
383{ 382{
@@ -385,14 +384,14 @@ int allow_signal(int sig)
385 return -EINVAL; 384 return -EINVAL;
386 385
387 spin_lock_irq(&current->sighand->siglock); 386 spin_lock_irq(&current->sighand->siglock);
387 /* This is only needed for daemonize()'ed kthreads */
388 sigdelset(&current->blocked, sig); 388 sigdelset(&current->blocked, sig);
389 if (!current->mm) { 389 /*
390 /* Kernel threads handle their own signals. 390 * Kernel threads handle their own signals. Let the signal code
391 Let the signal code know it'll be handled, so 391 * know it'll be handled, so that they don't get converted to
392 that they don't get converted to SIGKILL or 392 * SIGKILL or just silently dropped.
393 just silently dropped */ 393 */
394 current->sighand->action[(sig)-1].sa.sa_handler = (void __user *)2; 394 current->sighand->action[(sig)-1].sa.sa_handler = (void __user *)2;
395 }
396 recalc_sigpending(); 395 recalc_sigpending();
397 spin_unlock_irq(&current->sighand->siglock); 396 spin_unlock_irq(&current->sighand->siglock);
398 return 0; 397 return 0;
@@ -591,7 +590,7 @@ retry:
591 /* 590 /*
592 * Search in the siblings 591 * Search in the siblings
593 */ 592 */
594 list_for_each_entry(c, &p->parent->children, sibling) { 593 list_for_each_entry(c, &p->real_parent->children, sibling) {
595 if (c->mm == mm) 594 if (c->mm == mm)
596 goto assign_new_owner; 595 goto assign_new_owner;
597 } 596 }
@@ -758,7 +757,7 @@ static void reparent_thread(struct task_struct *father, struct task_struct *p,
758 p->exit_signal = SIGCHLD; 757 p->exit_signal = SIGCHLD;
759 758
760 /* If it has exited notify the new parent about this child's death. */ 759 /* If it has exited notify the new parent about this child's death. */
761 if (!p->ptrace && 760 if (!task_ptrace(p) &&
762 p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) { 761 p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) {
763 do_notify_parent(p, p->exit_signal); 762 do_notify_parent(p, p->exit_signal);
764 if (task_detached(p)) { 763 if (task_detached(p)) {
@@ -783,7 +782,7 @@ static void forget_original_parent(struct task_struct *father)
783 list_for_each_entry_safe(p, n, &father->children, sibling) { 782 list_for_each_entry_safe(p, n, &father->children, sibling) {
784 p->real_parent = reaper; 783 p->real_parent = reaper;
785 if (p->parent == father) { 784 if (p->parent == father) {
786 BUG_ON(p->ptrace); 785 BUG_ON(task_ptrace(p));
787 p->parent = p->real_parent; 786 p->parent = p->real_parent;
788 } 787 }
789 reparent_thread(father, p, &dead_children); 788 reparent_thread(father, p, &dead_children);
@@ -1081,6 +1080,18 @@ SYSCALL_DEFINE1(exit_group, int, error_code)
1081 return 0; 1080 return 0;
1082} 1081}
1083 1082
1083struct wait_opts {
1084 enum pid_type wo_type;
1085 int wo_flags;
1086 struct pid *wo_pid;
1087
1088 struct siginfo __user *wo_info;
1089 int __user *wo_stat;
1090 struct rusage __user *wo_rusage;
1091
1092 int notask_error;
1093};
1094
1084static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) 1095static struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
1085{ 1096{
1086 struct pid *pid = NULL; 1097 struct pid *pid = NULL;
@@ -1091,13 +1102,12 @@ static struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
1091 return pid; 1102 return pid;
1092} 1103}
1093 1104
1094static int eligible_child(enum pid_type type, struct pid *pid, int options, 1105static int eligible_child(struct wait_opts *wo, struct task_struct *p)
1095 struct task_struct *p)
1096{ 1106{
1097 int err; 1107 int err;
1098 1108
1099 if (type < PIDTYPE_MAX) { 1109 if (wo->wo_type < PIDTYPE_MAX) {
1100 if (task_pid_type(p, type) != pid) 1110 if (task_pid_type(p, wo->wo_type) != wo->wo_pid)
1101 return 0; 1111 return 0;
1102 } 1112 }
1103 1113
@@ -1106,8 +1116,8 @@ static int eligible_child(enum pid_type type, struct pid *pid, int options,
1106 * set; otherwise, wait for non-clone children *only*. (Note: 1116 * set; otherwise, wait for non-clone children *only*. (Note:
1107 * A "clone" child here is one that reports to its parent 1117 * A "clone" child here is one that reports to its parent
1108 * using a signal other than SIGCHLD.) */ 1118 * using a signal other than SIGCHLD.) */
1109 if (((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0)) 1119 if (((p->exit_signal != SIGCHLD) ^ !!(wo->wo_flags & __WCLONE))
1110 && !(options & __WALL)) 1120 && !(wo->wo_flags & __WALL))
1111 return 0; 1121 return 0;
1112 1122
1113 err = security_task_wait(p); 1123 err = security_task_wait(p);
@@ -1117,14 +1127,15 @@ static int eligible_child(enum pid_type type, struct pid *pid, int options,
1117 return 1; 1127 return 1;
1118} 1128}
1119 1129
1120static int wait_noreap_copyout(struct task_struct *p, pid_t pid, uid_t uid, 1130static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
1121 int why, int status, 1131 pid_t pid, uid_t uid, int why, int status)
1122 struct siginfo __user *infop,
1123 struct rusage __user *rusagep)
1124{ 1132{
1125 int retval = rusagep ? getrusage(p, RUSAGE_BOTH, rusagep) : 0; 1133 struct siginfo __user *infop;
1134 int retval = wo->wo_rusage
1135 ? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
1126 1136
1127 put_task_struct(p); 1137 put_task_struct(p);
1138 infop = wo->wo_info;
1128 if (!retval) 1139 if (!retval)
1129 retval = put_user(SIGCHLD, &infop->si_signo); 1140 retval = put_user(SIGCHLD, &infop->si_signo);
1130 if (!retval) 1141 if (!retval)
@@ -1148,19 +1159,18 @@ static int wait_noreap_copyout(struct task_struct *p, pid_t pid, uid_t uid,
1148 * the lock and this task is uninteresting. If we return nonzero, we have 1159 * the lock and this task is uninteresting. If we return nonzero, we have
1149 * released the lock and the system call should return. 1160 * released the lock and the system call should return.
1150 */ 1161 */
1151static int wait_task_zombie(struct task_struct *p, int options, 1162static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
1152 struct siginfo __user *infop,
1153 int __user *stat_addr, struct rusage __user *ru)
1154{ 1163{
1155 unsigned long state; 1164 unsigned long state;
1156 int retval, status, traced; 1165 int retval, status, traced;
1157 pid_t pid = task_pid_vnr(p); 1166 pid_t pid = task_pid_vnr(p);
1158 uid_t uid = __task_cred(p)->uid; 1167 uid_t uid = __task_cred(p)->uid;
1168 struct siginfo __user *infop;
1159 1169
1160 if (!likely(options & WEXITED)) 1170 if (!likely(wo->wo_flags & WEXITED))
1161 return 0; 1171 return 0;
1162 1172
1163 if (unlikely(options & WNOWAIT)) { 1173 if (unlikely(wo->wo_flags & WNOWAIT)) {
1164 int exit_code = p->exit_code; 1174 int exit_code = p->exit_code;
1165 int why, status; 1175 int why, status;
1166 1176
@@ -1173,8 +1183,7 @@ static int wait_task_zombie(struct task_struct *p, int options,
1173 why = (exit_code & 0x80) ? CLD_DUMPED : CLD_KILLED; 1183 why = (exit_code & 0x80) ? CLD_DUMPED : CLD_KILLED;
1174 status = exit_code & 0x7f; 1184 status = exit_code & 0x7f;
1175 } 1185 }
1176 return wait_noreap_copyout(p, pid, uid, why, 1186 return wait_noreap_copyout(wo, p, pid, uid, why, status);
1177 status, infop, ru);
1178 } 1187 }
1179 1188
1180 /* 1189 /*
@@ -1188,11 +1197,13 @@ static int wait_task_zombie(struct task_struct *p, int options,
1188 } 1197 }
1189 1198
1190 traced = ptrace_reparented(p); 1199 traced = ptrace_reparented(p);
1191 1200 /*
1192 if (likely(!traced)) { 1201 * It can be ptraced but not reparented, check
1202 * !task_detached() to filter out sub-threads.
1203 */
1204 if (likely(!traced) && likely(!task_detached(p))) {
1193 struct signal_struct *psig; 1205 struct signal_struct *psig;
1194 struct signal_struct *sig; 1206 struct signal_struct *sig;
1195 struct task_cputime cputime;
1196 1207
1197 /* 1208 /*
1198 * The resource counters for the group leader are in its 1209 * The resource counters for the group leader are in its
@@ -1205,26 +1216,23 @@ static int wait_task_zombie(struct task_struct *p, int options,
1205 * p->signal fields, because they are only touched by 1216 * p->signal fields, because they are only touched by
1206 * __exit_signal, which runs with tasklist_lock 1217 * __exit_signal, which runs with tasklist_lock
1207 * write-locked anyway, and so is excluded here. We do 1218 * write-locked anyway, and so is excluded here. We do
1208 * need to protect the access to p->parent->signal fields, 1219 * need to protect the access to parent->signal fields,
1209 * as other threads in the parent group can be right 1220 * as other threads in the parent group can be right
1210 * here reaping other children at the same time. 1221 * here reaping other children at the same time.
1211 *
1212 * We use thread_group_cputime() to get times for the thread
1213 * group, which consolidates times for all threads in the
1214 * group including the group leader.
1215 */ 1222 */
1216 thread_group_cputime(p, &cputime); 1223 spin_lock_irq(&p->real_parent->sighand->siglock);
1217 spin_lock_irq(&p->parent->sighand->siglock); 1224 psig = p->real_parent->signal;
1218 psig = p->parent->signal;
1219 sig = p->signal; 1225 sig = p->signal;
1220 psig->cutime = 1226 psig->cutime =
1221 cputime_add(psig->cutime, 1227 cputime_add(psig->cutime,
1222 cputime_add(cputime.utime, 1228 cputime_add(p->utime,
1223 sig->cutime)); 1229 cputime_add(sig->utime,
1230 sig->cutime)));
1224 psig->cstime = 1231 psig->cstime =
1225 cputime_add(psig->cstime, 1232 cputime_add(psig->cstime,
1226 cputime_add(cputime.stime, 1233 cputime_add(p->stime,
1227 sig->cstime)); 1234 cputime_add(sig->stime,
1235 sig->cstime)));
1228 psig->cgtime = 1236 psig->cgtime =
1229 cputime_add(psig->cgtime, 1237 cputime_add(psig->cgtime,
1230 cputime_add(p->gtime, 1238 cputime_add(p->gtime,
@@ -1246,7 +1254,7 @@ static int wait_task_zombie(struct task_struct *p, int options,
1246 sig->oublock + sig->coublock; 1254 sig->oublock + sig->coublock;
1247 task_io_accounting_add(&psig->ioac, &p->ioac); 1255 task_io_accounting_add(&psig->ioac, &p->ioac);
1248 task_io_accounting_add(&psig->ioac, &sig->ioac); 1256 task_io_accounting_add(&psig->ioac, &sig->ioac);
1249 spin_unlock_irq(&p->parent->sighand->siglock); 1257 spin_unlock_irq(&p->real_parent->sighand->siglock);
1250 } 1258 }
1251 1259
1252 /* 1260 /*
@@ -1255,11 +1263,14 @@ static int wait_task_zombie(struct task_struct *p, int options,
1255 */ 1263 */
1256 read_unlock(&tasklist_lock); 1264 read_unlock(&tasklist_lock);
1257 1265
1258 retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; 1266 retval = wo->wo_rusage
1267 ? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
1259 status = (p->signal->flags & SIGNAL_GROUP_EXIT) 1268 status = (p->signal->flags & SIGNAL_GROUP_EXIT)
1260 ? p->signal->group_exit_code : p->exit_code; 1269 ? p->signal->group_exit_code : p->exit_code;
1261 if (!retval && stat_addr) 1270 if (!retval && wo->wo_stat)
1262 retval = put_user(status, stat_addr); 1271 retval = put_user(status, wo->wo_stat);
1272
1273 infop = wo->wo_info;
1263 if (!retval && infop) 1274 if (!retval && infop)
1264 retval = put_user(SIGCHLD, &infop->si_signo); 1275 retval = put_user(SIGCHLD, &infop->si_signo);
1265 if (!retval && infop) 1276 if (!retval && infop)
@@ -1327,15 +1338,18 @@ static int *task_stopped_code(struct task_struct *p, bool ptrace)
1327 * the lock and this task is uninteresting. If we return nonzero, we have 1338 * the lock and this task is uninteresting. If we return nonzero, we have
1328 * released the lock and the system call should return. 1339 * released the lock and the system call should return.
1329 */ 1340 */
1330static int wait_task_stopped(int ptrace, struct task_struct *p, 1341static int wait_task_stopped(struct wait_opts *wo,
1331 int options, struct siginfo __user *infop, 1342 int ptrace, struct task_struct *p)
1332 int __user *stat_addr, struct rusage __user *ru)
1333{ 1343{
1344 struct siginfo __user *infop;
1334 int retval, exit_code, *p_code, why; 1345 int retval, exit_code, *p_code, why;
1335 uid_t uid = 0; /* unneeded, required by compiler */ 1346 uid_t uid = 0; /* unneeded, required by compiler */
1336 pid_t pid; 1347 pid_t pid;
1337 1348
1338 if (!(options & WUNTRACED)) 1349 /*
1350 * Traditionally we see ptrace'd stopped tasks regardless of options.
1351 */
1352 if (!ptrace && !(wo->wo_flags & WUNTRACED))
1339 return 0; 1353 return 0;
1340 1354
1341 exit_code = 0; 1355 exit_code = 0;
@@ -1349,7 +1363,7 @@ static int wait_task_stopped(int ptrace, struct task_struct *p,
1349 if (!exit_code) 1363 if (!exit_code)
1350 goto unlock_sig; 1364 goto unlock_sig;
1351 1365
1352 if (!unlikely(options & WNOWAIT)) 1366 if (!unlikely(wo->wo_flags & WNOWAIT))
1353 *p_code = 0; 1367 *p_code = 0;
1354 1368
1355 /* don't need the RCU readlock here as we're holding a spinlock */ 1369 /* don't need the RCU readlock here as we're holding a spinlock */
@@ -1371,14 +1385,15 @@ unlock_sig:
1371 why = ptrace ? CLD_TRAPPED : CLD_STOPPED; 1385 why = ptrace ? CLD_TRAPPED : CLD_STOPPED;
1372 read_unlock(&tasklist_lock); 1386 read_unlock(&tasklist_lock);
1373 1387
1374 if (unlikely(options & WNOWAIT)) 1388 if (unlikely(wo->wo_flags & WNOWAIT))
1375 return wait_noreap_copyout(p, pid, uid, 1389 return wait_noreap_copyout(wo, p, pid, uid, why, exit_code);
1376 why, exit_code,
1377 infop, ru);
1378 1390
1379 retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; 1391 retval = wo->wo_rusage
1380 if (!retval && stat_addr) 1392 ? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
1381 retval = put_user((exit_code << 8) | 0x7f, stat_addr); 1393 if (!retval && wo->wo_stat)
1394 retval = put_user((exit_code << 8) | 0x7f, wo->wo_stat);
1395
1396 infop = wo->wo_info;
1382 if (!retval && infop) 1397 if (!retval && infop)
1383 retval = put_user(SIGCHLD, &infop->si_signo); 1398 retval = put_user(SIGCHLD, &infop->si_signo);
1384 if (!retval && infop) 1399 if (!retval && infop)
@@ -1405,15 +1420,13 @@ unlock_sig:
1405 * the lock and this task is uninteresting. If we return nonzero, we have 1420 * the lock and this task is uninteresting. If we return nonzero, we have
1406 * released the lock and the system call should return. 1421 * released the lock and the system call should return.
1407 */ 1422 */
1408static int wait_task_continued(struct task_struct *p, int options, 1423static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
1409 struct siginfo __user *infop,
1410 int __user *stat_addr, struct rusage __user *ru)
1411{ 1424{
1412 int retval; 1425 int retval;
1413 pid_t pid; 1426 pid_t pid;
1414 uid_t uid; 1427 uid_t uid;
1415 1428
1416 if (!unlikely(options & WCONTINUED)) 1429 if (!unlikely(wo->wo_flags & WCONTINUED))
1417 return 0; 1430 return 0;
1418 1431
1419 if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) 1432 if (!(p->signal->flags & SIGNAL_STOP_CONTINUED))
@@ -1425,7 +1438,7 @@ static int wait_task_continued(struct task_struct *p, int options,
1425 spin_unlock_irq(&p->sighand->siglock); 1438 spin_unlock_irq(&p->sighand->siglock);
1426 return 0; 1439 return 0;
1427 } 1440 }
1428 if (!unlikely(options & WNOWAIT)) 1441 if (!unlikely(wo->wo_flags & WNOWAIT))
1429 p->signal->flags &= ~SIGNAL_STOP_CONTINUED; 1442 p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
1430 uid = __task_cred(p)->uid; 1443 uid = __task_cred(p)->uid;
1431 spin_unlock_irq(&p->sighand->siglock); 1444 spin_unlock_irq(&p->sighand->siglock);
@@ -1434,17 +1447,17 @@ static int wait_task_continued(struct task_struct *p, int options,
1434 get_task_struct(p); 1447 get_task_struct(p);
1435 read_unlock(&tasklist_lock); 1448 read_unlock(&tasklist_lock);
1436 1449
1437 if (!infop) { 1450 if (!wo->wo_info) {
1438 retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; 1451 retval = wo->wo_rusage
1452 ? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
1439 put_task_struct(p); 1453 put_task_struct(p);
1440 if (!retval && stat_addr) 1454 if (!retval && wo->wo_stat)
1441 retval = put_user(0xffff, stat_addr); 1455 retval = put_user(0xffff, wo->wo_stat);
1442 if (!retval) 1456 if (!retval)
1443 retval = pid; 1457 retval = pid;
1444 } else { 1458 } else {
1445 retval = wait_noreap_copyout(p, pid, uid, 1459 retval = wait_noreap_copyout(wo, p, pid, uid,
1446 CLD_CONTINUED, SIGCONT, 1460 CLD_CONTINUED, SIGCONT);
1447 infop, ru);
1448 BUG_ON(retval == 0); 1461 BUG_ON(retval == 0);
1449 } 1462 }
1450 1463
@@ -1454,19 +1467,16 @@ static int wait_task_continued(struct task_struct *p, int options,
1454/* 1467/*
1455 * Consider @p for a wait by @parent. 1468 * Consider @p for a wait by @parent.
1456 * 1469 *
1457 * -ECHILD should be in *@notask_error before the first call. 1470 * -ECHILD should be in ->notask_error before the first call.
1458 * Returns nonzero for a final return, when we have unlocked tasklist_lock. 1471 * Returns nonzero for a final return, when we have unlocked tasklist_lock.
1459 * Returns zero if the search for a child should continue; 1472 * Returns zero if the search for a child should continue;
1460 * then *@notask_error is 0 if @p is an eligible child, 1473 * then ->notask_error is 0 if @p is an eligible child,
1461 * or another error from security_task_wait(), or still -ECHILD. 1474 * or another error from security_task_wait(), or still -ECHILD.
1462 */ 1475 */
1463static int wait_consider_task(struct task_struct *parent, int ptrace, 1476static int wait_consider_task(struct wait_opts *wo, struct task_struct *parent,
1464 struct task_struct *p, int *notask_error, 1477 int ptrace, struct task_struct *p)
1465 enum pid_type type, struct pid *pid, int options,
1466 struct siginfo __user *infop,
1467 int __user *stat_addr, struct rusage __user *ru)
1468{ 1478{
1469 int ret = eligible_child(type, pid, options, p); 1479 int ret = eligible_child(wo, p);
1470 if (!ret) 1480 if (!ret)
1471 return ret; 1481 return ret;
1472 1482
@@ -1478,17 +1488,17 @@ static int wait_consider_task(struct task_struct *parent, int ptrace,
1478 * to look for security policy problems, rather 1488 * to look for security policy problems, rather
1479 * than for mysterious wait bugs. 1489 * than for mysterious wait bugs.
1480 */ 1490 */
1481 if (*notask_error) 1491 if (wo->notask_error)
1482 *notask_error = ret; 1492 wo->notask_error = ret;
1483 return 0; 1493 return 0;
1484 } 1494 }
1485 1495
1486 if (likely(!ptrace) && unlikely(p->ptrace)) { 1496 if (likely(!ptrace) && unlikely(task_ptrace(p))) {
1487 /* 1497 /*
1488 * This child is hidden by ptrace. 1498 * This child is hidden by ptrace.
1489 * We aren't allowed to see it now, but eventually we will. 1499 * We aren't allowed to see it now, but eventually we will.
1490 */ 1500 */
1491 *notask_error = 0; 1501 wo->notask_error = 0;
1492 return 0; 1502 return 0;
1493 } 1503 }
1494 1504
@@ -1499,34 +1509,30 @@ static int wait_consider_task(struct task_struct *parent, int ptrace,
1499 * We don't reap group leaders with subthreads. 1509 * We don't reap group leaders with subthreads.
1500 */ 1510 */
1501 if (p->exit_state == EXIT_ZOMBIE && !delay_group_leader(p)) 1511 if (p->exit_state == EXIT_ZOMBIE && !delay_group_leader(p))
1502 return wait_task_zombie(p, options, infop, stat_addr, ru); 1512 return wait_task_zombie(wo, p);
1503 1513
1504 /* 1514 /*
1505 * It's stopped or running now, so it might 1515 * It's stopped or running now, so it might
1506 * later continue, exit, or stop again. 1516 * later continue, exit, or stop again.
1507 */ 1517 */
1508 *notask_error = 0; 1518 wo->notask_error = 0;
1509 1519
1510 if (task_stopped_code(p, ptrace)) 1520 if (task_stopped_code(p, ptrace))
1511 return wait_task_stopped(ptrace, p, options, 1521 return wait_task_stopped(wo, ptrace, p);
1512 infop, stat_addr, ru);
1513 1522
1514 return wait_task_continued(p, options, infop, stat_addr, ru); 1523 return wait_task_continued(wo, p);
1515} 1524}
1516 1525
1517/* 1526/*
1518 * Do the work of do_wait() for one thread in the group, @tsk. 1527 * Do the work of do_wait() for one thread in the group, @tsk.
1519 * 1528 *
1520 * -ECHILD should be in *@notask_error before the first call. 1529 * -ECHILD should be in ->notask_error before the first call.
1521 * Returns nonzero for a final return, when we have unlocked tasklist_lock. 1530 * Returns nonzero for a final return, when we have unlocked tasklist_lock.
1522 * Returns zero if the search for a child should continue; then 1531 * Returns zero if the search for a child should continue; then
1523 * *@notask_error is 0 if there were any eligible children, 1532 * ->notask_error is 0 if there were any eligible children,
1524 * or another error from security_task_wait(), or still -ECHILD. 1533 * or another error from security_task_wait(), or still -ECHILD.
1525 */ 1534 */
1526static int do_wait_thread(struct task_struct *tsk, int *notask_error, 1535static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
1527 enum pid_type type, struct pid *pid, int options,
1528 struct siginfo __user *infop, int __user *stat_addr,
1529 struct rusage __user *ru)
1530{ 1536{
1531 struct task_struct *p; 1537 struct task_struct *p;
1532 1538
@@ -1535,9 +1541,7 @@ static int do_wait_thread(struct task_struct *tsk, int *notask_error,
1535 * Do not consider detached threads. 1541 * Do not consider detached threads.
1536 */ 1542 */
1537 if (!task_detached(p)) { 1543 if (!task_detached(p)) {
1538 int ret = wait_consider_task(tsk, 0, p, notask_error, 1544 int ret = wait_consider_task(wo, tsk, 0, p);
1539 type, pid, options,
1540 infop, stat_addr, ru);
1541 if (ret) 1545 if (ret)
1542 return ret; 1546 return ret;
1543 } 1547 }
@@ -1546,22 +1550,12 @@ static int do_wait_thread(struct task_struct *tsk, int *notask_error,
1546 return 0; 1550 return 0;
1547} 1551}
1548 1552
1549static int ptrace_do_wait(struct task_struct *tsk, int *notask_error, 1553static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
1550 enum pid_type type, struct pid *pid, int options,
1551 struct siginfo __user *infop, int __user *stat_addr,
1552 struct rusage __user *ru)
1553{ 1554{
1554 struct task_struct *p; 1555 struct task_struct *p;
1555 1556
1556 /*
1557 * Traditionally we see ptrace'd stopped tasks regardless of options.
1558 */
1559 options |= WUNTRACED;
1560
1561 list_for_each_entry(p, &tsk->ptraced, ptrace_entry) { 1557 list_for_each_entry(p, &tsk->ptraced, ptrace_entry) {
1562 int ret = wait_consider_task(tsk, 1, p, notask_error, 1558 int ret = wait_consider_task(wo, tsk, 1, p);
1563 type, pid, options,
1564 infop, stat_addr, ru);
1565 if (ret) 1559 if (ret)
1566 return ret; 1560 return ret;
1567 } 1561 }
@@ -1569,65 +1563,59 @@ static int ptrace_do_wait(struct task_struct *tsk, int *notask_error,
1569 return 0; 1563 return 0;
1570} 1564}
1571 1565
1572static long do_wait(enum pid_type type, struct pid *pid, int options, 1566static long do_wait(struct wait_opts *wo)
1573 struct siginfo __user *infop, int __user *stat_addr,
1574 struct rusage __user *ru)
1575{ 1567{
1576 DECLARE_WAITQUEUE(wait, current); 1568 DECLARE_WAITQUEUE(wait, current);
1577 struct task_struct *tsk; 1569 struct task_struct *tsk;
1578 int retval; 1570 int retval;
1579 1571
1580 trace_sched_process_wait(pid); 1572 trace_sched_process_wait(wo->wo_pid);
1581 1573
1582 add_wait_queue(&current->signal->wait_chldexit,&wait); 1574 add_wait_queue(&current->signal->wait_chldexit,&wait);
1583repeat: 1575repeat:
1584 /* 1576 /*
1585 * If there is nothing that can match our critiera just get out. 1577 * If there is nothing that can match our critiera just get out.
1586 * We will clear @retval to zero if we see any child that might later 1578 * We will clear ->notask_error to zero if we see any child that
1587 * match our criteria, even if we are not able to reap it yet. 1579 * might later match our criteria, even if we are not able to reap
1580 * it yet.
1588 */ 1581 */
1589 retval = -ECHILD; 1582 wo->notask_error = -ECHILD;
1590 if ((type < PIDTYPE_MAX) && (!pid || hlist_empty(&pid->tasks[type]))) 1583 if ((wo->wo_type < PIDTYPE_MAX) &&
1591 goto end; 1584 (!wo->wo_pid || hlist_empty(&wo->wo_pid->tasks[wo->wo_type])))
1585 goto notask;
1592 1586
1593 current->state = TASK_INTERRUPTIBLE; 1587 set_current_state(TASK_INTERRUPTIBLE);
1594 read_lock(&tasklist_lock); 1588 read_lock(&tasklist_lock);
1595 tsk = current; 1589 tsk = current;
1596 do { 1590 do {
1597 int tsk_result = do_wait_thread(tsk, &retval, 1591 retval = do_wait_thread(wo, tsk);
1598 type, pid, options, 1592 if (retval)
1599 infop, stat_addr, ru); 1593 goto end;
1600 if (!tsk_result) 1594
1601 tsk_result = ptrace_do_wait(tsk, &retval, 1595 retval = ptrace_do_wait(wo, tsk);
1602 type, pid, options, 1596 if (retval)
1603 infop, stat_addr, ru);
1604 if (tsk_result) {
1605 /*
1606 * tasklist_lock is unlocked and we have a final result.
1607 */
1608 retval = tsk_result;
1609 goto end; 1597 goto end;
1610 }
1611 1598
1612 if (options & __WNOTHREAD) 1599 if (wo->wo_flags & __WNOTHREAD)
1613 break; 1600 break;
1614 tsk = next_thread(tsk); 1601 } while_each_thread(current, tsk);
1615 BUG_ON(tsk->signal != current->signal);
1616 } while (tsk != current);
1617 read_unlock(&tasklist_lock); 1602 read_unlock(&tasklist_lock);
1618 1603
1619 if (!retval && !(options & WNOHANG)) { 1604notask:
1605 retval = wo->notask_error;
1606 if (!retval && !(wo->wo_flags & WNOHANG)) {
1620 retval = -ERESTARTSYS; 1607 retval = -ERESTARTSYS;
1621 if (!signal_pending(current)) { 1608 if (!signal_pending(current)) {
1622 schedule(); 1609 schedule();
1623 goto repeat; 1610 goto repeat;
1624 } 1611 }
1625 } 1612 }
1626
1627end: 1613end:
1628 current->state = TASK_RUNNING; 1614 __set_current_state(TASK_RUNNING);
1629 remove_wait_queue(&current->signal->wait_chldexit,&wait); 1615 remove_wait_queue(&current->signal->wait_chldexit,&wait);
1630 if (infop) { 1616 if (wo->wo_info) {
1617 struct siginfo __user *infop = wo->wo_info;
1618
1631 if (retval > 0) 1619 if (retval > 0)
1632 retval = 0; 1620 retval = 0;
1633 else { 1621 else {
@@ -1656,6 +1644,7 @@ end:
1656SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, 1644SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
1657 infop, int, options, struct rusage __user *, ru) 1645 infop, int, options, struct rusage __user *, ru)
1658{ 1646{
1647 struct wait_opts wo;
1659 struct pid *pid = NULL; 1648 struct pid *pid = NULL;
1660 enum pid_type type; 1649 enum pid_type type;
1661 long ret; 1650 long ret;
@@ -1685,7 +1674,14 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
1685 1674
1686 if (type < PIDTYPE_MAX) 1675 if (type < PIDTYPE_MAX)
1687 pid = find_get_pid(upid); 1676 pid = find_get_pid(upid);
1688 ret = do_wait(type, pid, options, infop, NULL, ru); 1677
1678 wo.wo_type = type;
1679 wo.wo_pid = pid;
1680 wo.wo_flags = options;
1681 wo.wo_info = infop;
1682 wo.wo_stat = NULL;
1683 wo.wo_rusage = ru;
1684 ret = do_wait(&wo);
1689 put_pid(pid); 1685 put_pid(pid);
1690 1686
1691 /* avoid REGPARM breakage on x86: */ 1687 /* avoid REGPARM breakage on x86: */
@@ -1696,6 +1692,7 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
1696SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, 1692SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
1697 int, options, struct rusage __user *, ru) 1693 int, options, struct rusage __user *, ru)
1698{ 1694{
1695 struct wait_opts wo;
1699 struct pid *pid = NULL; 1696 struct pid *pid = NULL;
1700 enum pid_type type; 1697 enum pid_type type;
1701 long ret; 1698 long ret;
@@ -1717,7 +1714,13 @@ SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
1717 pid = find_get_pid(upid); 1714 pid = find_get_pid(upid);
1718 } 1715 }
1719 1716
1720 ret = do_wait(type, pid, options | WEXITED, NULL, stat_addr, ru); 1717 wo.wo_type = type;
1718 wo.wo_pid = pid;
1719 wo.wo_flags = options | WEXITED;
1720 wo.wo_info = NULL;
1721 wo.wo_stat = stat_addr;
1722 wo.wo_rusage = ru;
1723 ret = do_wait(&wo);
1721 put_pid(pid); 1724 put_pid(pid);
1722 1725
1723 /* avoid REGPARM breakage on x86: */ 1726 /* avoid REGPARM breakage on x86: */
diff --git a/kernel/fork.c b/kernel/fork.c
index be022c200da6..467746b3f0aa 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1029,7 +1029,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1029 p->vfork_done = NULL; 1029 p->vfork_done = NULL;
1030 spin_lock_init(&p->alloc_lock); 1030 spin_lock_init(&p->alloc_lock);
1031 1031
1032 clear_tsk_thread_flag(p, TIF_SIGPENDING);
1033 init_sigpending(&p->pending); 1032 init_sigpending(&p->pending);
1034 1033
1035 p->utime = cputime_zero; 1034 p->utime = cputime_zero;
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
new file mode 100644
index 000000000000..22e9dcfaa3d3
--- /dev/null
+++ b/kernel/gcov/Kconfig
@@ -0,0 +1,48 @@
1menu "GCOV-based kernel profiling"
2
3config GCOV_KERNEL
4 bool "Enable gcov-based kernel profiling"
5 depends on DEBUG_FS && CONSTRUCTORS
6 default n
7 ---help---
8 This option enables gcov-based code profiling (e.g. for code coverage
9 measurements).
10
11 If unsure, say N.
12
13 Additionally specify CONFIG_GCOV_PROFILE_ALL=y to get profiling data
14 for the entire kernel. To enable profiling for specific files or
15 directories, add a line similar to the following to the respective
16 Makefile:
17
18 For a single file (e.g. main.o):
19 GCOV_PROFILE_main.o := y
20
21 For all files in one directory:
22 GCOV_PROFILE := y
23
24 To exclude files from being profiled even when CONFIG_GCOV_PROFILE_ALL
25 is specified, use:
26
27 GCOV_PROFILE_main.o := n
28 and:
29 GCOV_PROFILE := n
30
31 Note that the debugfs filesystem has to be mounted to access
32 profiling data.
33
34config GCOV_PROFILE_ALL
35 bool "Profile entire Kernel"
36 depends on GCOV_KERNEL
37 depends on S390 || X86
38 default n
39 ---help---
40 This options activates profiling for the entire kernel.
41
42 If unsure, say N.
43
44 Note that a kernel compiled with profiling flags will be significantly
45 larger and run slower. Also be sure to exclude files from profiling
46 which are not linked to the kernel image to prevent linker errors.
47
48endmenu
diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile
new file mode 100644
index 000000000000..3f761001d517
--- /dev/null
+++ b/kernel/gcov/Makefile
@@ -0,0 +1,3 @@
1EXTRA_CFLAGS := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
2
3obj-$(CONFIG_GCOV_KERNEL) := base.o fs.o gcc_3_4.o
diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
new file mode 100644
index 000000000000..9b22d03cc581
--- /dev/null
+++ b/kernel/gcov/base.c
@@ -0,0 +1,148 @@
1/*
2 * This code maintains a list of active profiling data structures.
3 *
4 * Copyright IBM Corp. 2009
5 * Author(s): Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
6 *
7 * Uses gcc-internal data definitions.
8 * Based on the gcov-kernel patch by:
9 * Hubertus Franke <frankeh@us.ibm.com>
10 * Nigel Hinds <nhinds@us.ibm.com>
11 * Rajan Ravindran <rajancr@us.ibm.com>
12 * Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
13 * Paul Larson
14 */
15
16#define pr_fmt(fmt) "gcov: " fmt
17
18#include <linux/init.h>
19#include <linux/module.h>
20#include <linux/mutex.h>
21#include "gcov.h"
22
23static struct gcov_info *gcov_info_head;
24static int gcov_events_enabled;
25static DEFINE_MUTEX(gcov_lock);
26
27/*
28 * __gcov_init is called by gcc-generated constructor code for each object
29 * file compiled with -fprofile-arcs.
30 */
31void __gcov_init(struct gcov_info *info)
32{
33 static unsigned int gcov_version;
34
35 mutex_lock(&gcov_lock);
36 if (gcov_version == 0) {
37 gcov_version = info->version;
38 /*
39 * Printing gcc's version magic may prove useful for debugging
40 * incompatibility reports.
41 */
42 pr_info("version magic: 0x%x\n", gcov_version);
43 }
44 /*
45 * Add new profiling data structure to list and inform event
46 * listener.
47 */
48 info->next = gcov_info_head;
49 gcov_info_head = info;
50 if (gcov_events_enabled)
51 gcov_event(GCOV_ADD, info);
52 mutex_unlock(&gcov_lock);
53}
54EXPORT_SYMBOL(__gcov_init);
55
56/*
57 * These functions may be referenced by gcc-generated profiling code but serve
58 * no function for kernel profiling.
59 */
60void __gcov_flush(void)
61{
62 /* Unused. */
63}
64EXPORT_SYMBOL(__gcov_flush);
65
66void __gcov_merge_add(gcov_type *counters, unsigned int n_counters)
67{
68 /* Unused. */
69}
70EXPORT_SYMBOL(__gcov_merge_add);
71
72void __gcov_merge_single(gcov_type *counters, unsigned int n_counters)
73{
74 /* Unused. */
75}
76EXPORT_SYMBOL(__gcov_merge_single);
77
78void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters)
79{
80 /* Unused. */
81}
82EXPORT_SYMBOL(__gcov_merge_delta);
83
84/**
85 * gcov_enable_events - enable event reporting through gcov_event()
86 *
87 * Turn on reporting of profiling data load/unload-events through the
88 * gcov_event() callback. Also replay all previous events once. This function
89 * is needed because some events are potentially generated too early for the
90 * callback implementation to handle them initially.
91 */
92void gcov_enable_events(void)
93{
94 struct gcov_info *info;
95
96 mutex_lock(&gcov_lock);
97 gcov_events_enabled = 1;
98 /* Perform event callback for previously registered entries. */
99 for (info = gcov_info_head; info; info = info->next)
100 gcov_event(GCOV_ADD, info);
101 mutex_unlock(&gcov_lock);
102}
103
104#ifdef CONFIG_MODULES
105static inline int within(void *addr, void *start, unsigned long size)
106{
107 return ((addr >= start) && (addr < start + size));
108}
109
110/* Update list and generate events when modules are unloaded. */
111static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
112 void *data)
113{
114 struct module *mod = data;
115 struct gcov_info *info;
116 struct gcov_info *prev;
117
118 if (event != MODULE_STATE_GOING)
119 return NOTIFY_OK;
120 mutex_lock(&gcov_lock);
121 prev = NULL;
122 /* Remove entries located in module from linked list. */
123 for (info = gcov_info_head; info; info = info->next) {
124 if (within(info, mod->module_core, mod->core_size)) {
125 if (prev)
126 prev->next = info->next;
127 else
128 gcov_info_head = info->next;
129 if (gcov_events_enabled)
130 gcov_event(GCOV_REMOVE, info);
131 } else
132 prev = info;
133 }
134 mutex_unlock(&gcov_lock);
135
136 return NOTIFY_OK;
137}
138
139static struct notifier_block gcov_nb = {
140 .notifier_call = gcov_module_notifier,
141};
142
143static int __init gcov_init(void)
144{
145 return register_module_notifier(&gcov_nb);
146}
147device_initcall(gcov_init);
148#endif /* CONFIG_MODULES */
diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
new file mode 100644
index 000000000000..ef3c3f88a7a3
--- /dev/null
+++ b/kernel/gcov/fs.c
@@ -0,0 +1,673 @@
1/*
2 * This code exports profiling data as debugfs files to userspace.
3 *
4 * Copyright IBM Corp. 2009
5 * Author(s): Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
6 *
7 * Uses gcc-internal data definitions.
8 * Based on the gcov-kernel patch by:
9 * Hubertus Franke <frankeh@us.ibm.com>
10 * Nigel Hinds <nhinds@us.ibm.com>
11 * Rajan Ravindran <rajancr@us.ibm.com>
12 * Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
13 * Paul Larson
14 * Yi CDL Yang
15 */
16
17#define pr_fmt(fmt) "gcov: " fmt
18
19#include <linux/init.h>
20#include <linux/module.h>
21#include <linux/debugfs.h>
22#include <linux/fs.h>
23#include <linux/list.h>
24#include <linux/string.h>
25#include <linux/slab.h>
26#include <linux/mutex.h>
27#include <linux/seq_file.h>
28#include "gcov.h"
29
30/**
31 * struct gcov_node - represents a debugfs entry
32 * @list: list head for child node list
33 * @children: child nodes
34 * @all: list head for list of all nodes
35 * @parent: parent node
36 * @info: associated profiling data structure if not a directory
37 * @ghost: when an object file containing profiling data is unloaded we keep a
38 * copy of the profiling data here to allow collecting coverage data
39 * for cleanup code. Such a node is called a "ghost".
40 * @dentry: main debugfs entry, either a directory or data file
41 * @links: associated symbolic links
42 * @name: data file basename
43 *
44 * struct gcov_node represents an entity within the gcov/ subdirectory
45 * of debugfs. There are directory and data file nodes. The latter represent
46 * the actual synthesized data file plus any associated symbolic links which
47 * are needed by the gcov tool to work correctly.
48 */
49struct gcov_node {
50 struct list_head list;
51 struct list_head children;
52 struct list_head all;
53 struct gcov_node *parent;
54 struct gcov_info *info;
55 struct gcov_info *ghost;
56 struct dentry *dentry;
57 struct dentry **links;
58 char name[0];
59};
60
61static const char objtree[] = OBJTREE;
62static const char srctree[] = SRCTREE;
63static struct gcov_node root_node;
64static struct dentry *reset_dentry;
65static LIST_HEAD(all_head);
66static DEFINE_MUTEX(node_lock);
67
68/* If non-zero, keep copies of profiling data for unloaded modules. */
69static int gcov_persist = 1;
70
71static int __init gcov_persist_setup(char *str)
72{
73 unsigned long val;
74
75 if (strict_strtoul(str, 0, &val)) {
76 pr_warning("invalid gcov_persist parameter '%s'\n", str);
77 return 0;
78 }
79 gcov_persist = val;
80 pr_info("setting gcov_persist to %d\n", gcov_persist);
81
82 return 1;
83}
84__setup("gcov_persist=", gcov_persist_setup);
85
86/*
87 * seq_file.start() implementation for gcov data files. Note that the
88 * gcov_iterator interface is designed to be more restrictive than seq_file
89 * (no start from arbitrary position, etc.), to simplify the iterator
90 * implementation.
91 */
92static void *gcov_seq_start(struct seq_file *seq, loff_t *pos)
93{
94 loff_t i;
95
96 gcov_iter_start(seq->private);
97 for (i = 0; i < *pos; i++) {
98 if (gcov_iter_next(seq->private))
99 return NULL;
100 }
101 return seq->private;
102}
103
104/* seq_file.next() implementation for gcov data files. */
105static void *gcov_seq_next(struct seq_file *seq, void *data, loff_t *pos)
106{
107 struct gcov_iterator *iter = data;
108
109 if (gcov_iter_next(iter))
110 return NULL;
111 (*pos)++;
112
113 return iter;
114}
115
116/* seq_file.show() implementation for gcov data files. */
117static int gcov_seq_show(struct seq_file *seq, void *data)
118{
119 struct gcov_iterator *iter = data;
120
121 if (gcov_iter_write(iter, seq))
122 return -EINVAL;
123 return 0;
124}
125
126static void gcov_seq_stop(struct seq_file *seq, void *data)
127{
128 /* Unused. */
129}
130
131static const struct seq_operations gcov_seq_ops = {
132 .start = gcov_seq_start,
133 .next = gcov_seq_next,
134 .show = gcov_seq_show,
135 .stop = gcov_seq_stop,
136};
137
138/*
139 * Return the profiling data set for a given node. This can either be the
140 * original profiling data structure or a duplicate (also called "ghost")
141 * in case the associated object file has been unloaded.
142 */
143static struct gcov_info *get_node_info(struct gcov_node *node)
144{
145 if (node->info)
146 return node->info;
147
148 return node->ghost;
149}
150
151/*
152 * open() implementation for gcov data files. Create a copy of the profiling
153 * data set and initialize the iterator and seq_file interface.
154 */
155static int gcov_seq_open(struct inode *inode, struct file *file)
156{
157 struct gcov_node *node = inode->i_private;
158 struct gcov_iterator *iter;
159 struct seq_file *seq;
160 struct gcov_info *info;
161 int rc = -ENOMEM;
162
163 mutex_lock(&node_lock);
164 /*
165 * Read from a profiling data copy to minimize reference tracking
166 * complexity and concurrent access.
167 */
168 info = gcov_info_dup(get_node_info(node));
169 if (!info)
170 goto out_unlock;
171 iter = gcov_iter_new(info);
172 if (!iter)
173 goto err_free_info;
174 rc = seq_open(file, &gcov_seq_ops);
175 if (rc)
176 goto err_free_iter_info;
177 seq = file->private_data;
178 seq->private = iter;
179out_unlock:
180 mutex_unlock(&node_lock);
181 return rc;
182
183err_free_iter_info:
184 gcov_iter_free(iter);
185err_free_info:
186 gcov_info_free(info);
187 goto out_unlock;
188}
189
190/*
191 * release() implementation for gcov data files. Release resources allocated
192 * by open().
193 */
194static int gcov_seq_release(struct inode *inode, struct file *file)
195{
196 struct gcov_iterator *iter;
197 struct gcov_info *info;
198 struct seq_file *seq;
199
200 seq = file->private_data;
201 iter = seq->private;
202 info = gcov_iter_get_info(iter);
203 gcov_iter_free(iter);
204 gcov_info_free(info);
205 seq_release(inode, file);
206
207 return 0;
208}
209
210/*
211 * Find a node by the associated data file name. Needs to be called with
212 * node_lock held.
213 */
214static struct gcov_node *get_node_by_name(const char *name)
215{
216 struct gcov_node *node;
217 struct gcov_info *info;
218
219 list_for_each_entry(node, &all_head, all) {
220 info = get_node_info(node);
221 if (info && (strcmp(info->filename, name) == 0))
222 return node;
223 }
224
225 return NULL;
226}
227
228static void remove_node(struct gcov_node *node);
229
230/*
231 * write() implementation for gcov data files. Reset profiling data for the
232 * associated file. If the object file has been unloaded (i.e. this is
233 * a "ghost" node), remove the debug fs node as well.
234 */
235static ssize_t gcov_seq_write(struct file *file, const char __user *addr,
236 size_t len, loff_t *pos)
237{
238 struct seq_file *seq;
239 struct gcov_info *info;
240 struct gcov_node *node;
241
242 seq = file->private_data;
243 info = gcov_iter_get_info(seq->private);
244 mutex_lock(&node_lock);
245 node = get_node_by_name(info->filename);
246 if (node) {
247 /* Reset counts or remove node for unloaded modules. */
248 if (node->ghost)
249 remove_node(node);
250 else
251 gcov_info_reset(node->info);
252 }
253 /* Reset counts for open file. */
254 gcov_info_reset(info);
255 mutex_unlock(&node_lock);
256
257 return len;
258}
259
260/*
261 * Given a string <path> representing a file path of format:
262 * path/to/file.gcda
263 * construct and return a new string:
264 * <dir/>path/to/file.<ext>
265 */
266static char *link_target(const char *dir, const char *path, const char *ext)
267{
268 char *target;
269 char *old_ext;
270 char *copy;
271
272 copy = kstrdup(path, GFP_KERNEL);
273 if (!copy)
274 return NULL;
275 old_ext = strrchr(copy, '.');
276 if (old_ext)
277 *old_ext = '\0';
278 if (dir)
279 target = kasprintf(GFP_KERNEL, "%s/%s.%s", dir, copy, ext);
280 else
281 target = kasprintf(GFP_KERNEL, "%s.%s", copy, ext);
282 kfree(copy);
283
284 return target;
285}
286
287/*
288 * Construct a string representing the symbolic link target for the given
289 * gcov data file name and link type. Depending on the link type and the
290 * location of the data file, the link target can either point to a
291 * subdirectory of srctree, objtree or in an external location.
292 */
293static char *get_link_target(const char *filename, const struct gcov_link *ext)
294{
295 const char *rel;
296 char *result;
297
298 if (strncmp(filename, objtree, strlen(objtree)) == 0) {
299 rel = filename + strlen(objtree) + 1;
300 if (ext->dir == SRC_TREE)
301 result = link_target(srctree, rel, ext->ext);
302 else
303 result = link_target(objtree, rel, ext->ext);
304 } else {
305 /* External compilation. */
306 result = link_target(NULL, filename, ext->ext);
307 }
308
309 return result;
310}
311
312#define SKEW_PREFIX ".tmp_"
313
314/*
315 * For a filename .tmp_filename.ext return filename.ext. Needed to compensate
316 * for filename skewing caused by the mod-versioning mechanism.
317 */
318static const char *deskew(const char *basename)
319{
320 if (strncmp(basename, SKEW_PREFIX, sizeof(SKEW_PREFIX) - 1) == 0)
321 return basename + sizeof(SKEW_PREFIX) - 1;
322 return basename;
323}
324
325/*
326 * Create links to additional files (usually .c and .gcno files) which the
327 * gcov tool expects to find in the same directory as the gcov data file.
328 */
329static void add_links(struct gcov_node *node, struct dentry *parent)
330{
331 char *basename;
332 char *target;
333 int num;
334 int i;
335
336 for (num = 0; gcov_link[num].ext; num++)
337 /* Nothing. */;
338 node->links = kcalloc(num, sizeof(struct dentry *), GFP_KERNEL);
339 if (!node->links)
340 return;
341 for (i = 0; i < num; i++) {
342 target = get_link_target(get_node_info(node)->filename,
343 &gcov_link[i]);
344 if (!target)
345 goto out_err;
346 basename = strrchr(target, '/');
347 if (!basename)
348 goto out_err;
349 basename++;
350 node->links[i] = debugfs_create_symlink(deskew(basename),
351 parent, target);
352 if (!node->links[i])
353 goto out_err;
354 kfree(target);
355 }
356
357 return;
358out_err:
359 kfree(target);
360 while (i-- > 0)
361 debugfs_remove(node->links[i]);
362 kfree(node->links);
363 node->links = NULL;
364}
365
366static const struct file_operations gcov_data_fops = {
367 .open = gcov_seq_open,
368 .release = gcov_seq_release,
369 .read = seq_read,
370 .llseek = seq_lseek,
371 .write = gcov_seq_write,
372};
373
374/* Basic initialization of a new node. */
375static void init_node(struct gcov_node *node, struct gcov_info *info,
376 const char *name, struct gcov_node *parent)
377{
378 INIT_LIST_HEAD(&node->list);
379 INIT_LIST_HEAD(&node->children);
380 INIT_LIST_HEAD(&node->all);
381 node->info = info;
382 node->parent = parent;
383 if (name)
384 strcpy(node->name, name);
385}
386
387/*
388 * Create a new node and associated debugfs entry. Needs to be called with
389 * node_lock held.
390 */
391static struct gcov_node *new_node(struct gcov_node *parent,
392 struct gcov_info *info, const char *name)
393{
394 struct gcov_node *node;
395
396 node = kzalloc(sizeof(struct gcov_node) + strlen(name) + 1, GFP_KERNEL);
397 if (!node) {
398 pr_warning("out of memory\n");
399 return NULL;
400 }
401 init_node(node, info, name, parent);
402 /* Differentiate between gcov data file nodes and directory nodes. */
403 if (info) {
404 node->dentry = debugfs_create_file(deskew(node->name), 0600,
405 parent->dentry, node, &gcov_data_fops);
406 } else
407 node->dentry = debugfs_create_dir(node->name, parent->dentry);
408 if (!node->dentry) {
409 pr_warning("could not create file\n");
410 kfree(node);
411 return NULL;
412 }
413 if (info)
414 add_links(node, parent->dentry);
415 list_add(&node->list, &parent->children);
416 list_add(&node->all, &all_head);
417
418 return node;
419}
420
421/* Remove symbolic links associated with node. */
422static void remove_links(struct gcov_node *node)
423{
424 int i;
425
426 if (!node->links)
427 return;
428 for (i = 0; gcov_link[i].ext; i++)
429 debugfs_remove(node->links[i]);
430 kfree(node->links);
431 node->links = NULL;
432}
433
434/*
435 * Remove node from all lists and debugfs and release associated resources.
436 * Needs to be called with node_lock held.
437 */
438static void release_node(struct gcov_node *node)
439{
440 list_del(&node->list);
441 list_del(&node->all);
442 debugfs_remove(node->dentry);
443 remove_links(node);
444 if (node->ghost)
445 gcov_info_free(node->ghost);
446 kfree(node);
447}
448
449/* Release node and empty parents. Needs to be called with node_lock held. */
450static void remove_node(struct gcov_node *node)
451{
452 struct gcov_node *parent;
453
454 while ((node != &root_node) && list_empty(&node->children)) {
455 parent = node->parent;
456 release_node(node);
457 node = parent;
458 }
459}
460
461/*
462 * Find child node with given basename. Needs to be called with node_lock
463 * held.
464 */
465static struct gcov_node *get_child_by_name(struct gcov_node *parent,
466 const char *name)
467{
468 struct gcov_node *node;
469
470 list_for_each_entry(node, &parent->children, list) {
471 if (strcmp(node->name, name) == 0)
472 return node;
473 }
474
475 return NULL;
476}
477
478/*
479 * write() implementation for reset file. Reset all profiling data to zero
480 * and remove ghost nodes.
481 */
482static ssize_t reset_write(struct file *file, const char __user *addr,
483 size_t len, loff_t *pos)
484{
485 struct gcov_node *node;
486
487 mutex_lock(&node_lock);
488restart:
489 list_for_each_entry(node, &all_head, all) {
490 if (node->info)
491 gcov_info_reset(node->info);
492 else if (list_empty(&node->children)) {
493 remove_node(node);
494 /* Several nodes may have gone - restart loop. */
495 goto restart;
496 }
497 }
498 mutex_unlock(&node_lock);
499
500 return len;
501}
502
503/* read() implementation for reset file. Unused. */
504static ssize_t reset_read(struct file *file, char __user *addr, size_t len,
505 loff_t *pos)
506{
507 /* Allow read operation so that a recursive copy won't fail. */
508 return 0;
509}
510
511static const struct file_operations gcov_reset_fops = {
512 .write = reset_write,
513 .read = reset_read,
514};
515
516/*
517 * Create a node for a given profiling data set and add it to all lists and
518 * debugfs. Needs to be called with node_lock held.
519 */
520static void add_node(struct gcov_info *info)
521{
522 char *filename;
523 char *curr;
524 char *next;
525 struct gcov_node *parent;
526 struct gcov_node *node;
527
528 filename = kstrdup(info->filename, GFP_KERNEL);
529 if (!filename)
530 return;
531 parent = &root_node;
532 /* Create directory nodes along the path. */
533 for (curr = filename; (next = strchr(curr, '/')); curr = next + 1) {
534 if (curr == next)
535 continue;
536 *next = 0;
537 if (strcmp(curr, ".") == 0)
538 continue;
539 if (strcmp(curr, "..") == 0) {
540 if (!parent->parent)
541 goto err_remove;
542 parent = parent->parent;
543 continue;
544 }
545 node = get_child_by_name(parent, curr);
546 if (!node) {
547 node = new_node(parent, NULL, curr);
548 if (!node)
549 goto err_remove;
550 }
551 parent = node;
552 }
553 /* Create file node. */
554 node = new_node(parent, info, curr);
555 if (!node)
556 goto err_remove;
557out:
558 kfree(filename);
559 return;
560
561err_remove:
562 remove_node(parent);
563 goto out;
564}
565
566/*
567 * The profiling data set associated with this node is being unloaded. Store a
568 * copy of the profiling data and turn this node into a "ghost".
569 */
570static int ghost_node(struct gcov_node *node)
571{
572 node->ghost = gcov_info_dup(node->info);
573 if (!node->ghost) {
574 pr_warning("could not save data for '%s' (out of memory)\n",
575 node->info->filename);
576 return -ENOMEM;
577 }
578 node->info = NULL;
579
580 return 0;
581}
582
583/*
584 * Profiling data for this node has been loaded again. Add profiling data
585 * from previous instantiation and turn this node into a regular node.
586 */
587static void revive_node(struct gcov_node *node, struct gcov_info *info)
588{
589 if (gcov_info_is_compatible(node->ghost, info))
590 gcov_info_add(info, node->ghost);
591 else {
592 pr_warning("discarding saved data for '%s' (version changed)\n",
593 info->filename);
594 }
595 gcov_info_free(node->ghost);
596 node->ghost = NULL;
597 node->info = info;
598}
599
600/*
601 * Callback to create/remove profiling files when code compiled with
602 * -fprofile-arcs is loaded/unloaded.
603 */
604void gcov_event(enum gcov_action action, struct gcov_info *info)
605{
606 struct gcov_node *node;
607
608 mutex_lock(&node_lock);
609 node = get_node_by_name(info->filename);
610 switch (action) {
611 case GCOV_ADD:
612 /* Add new node or revive ghost. */
613 if (!node) {
614 add_node(info);
615 break;
616 }
617 if (gcov_persist)
618 revive_node(node, info);
619 else {
620 pr_warning("could not add '%s' (already exists)\n",
621 info->filename);
622 }
623 break;
624 case GCOV_REMOVE:
625 /* Remove node or turn into ghost. */
626 if (!node) {
627 pr_warning("could not remove '%s' (not found)\n",
628 info->filename);
629 break;
630 }
631 if (gcov_persist) {
632 if (!ghost_node(node))
633 break;
634 }
635 remove_node(node);
636 break;
637 }
638 mutex_unlock(&node_lock);
639}
640
641/* Create debugfs entries. */
642static __init int gcov_fs_init(void)
643{
644 int rc = -EIO;
645
646 init_node(&root_node, NULL, NULL, NULL);
647 /*
648 * /sys/kernel/debug/gcov will be parent for the reset control file
649 * and all profiling files.
650 */
651 root_node.dentry = debugfs_create_dir("gcov", NULL);
652 if (!root_node.dentry)
653 goto err_remove;
654 /*
655 * Create reset file which resets all profiling counts when written
656 * to.
657 */
658 reset_dentry = debugfs_create_file("reset", 0600, root_node.dentry,
659 NULL, &gcov_reset_fops);
660 if (!reset_dentry)
661 goto err_remove;
662 /* Replay previous events to get our fs hierarchy up-to-date. */
663 gcov_enable_events();
664 return 0;
665
666err_remove:
667 pr_err("init failed\n");
668 if (root_node.dentry)
669 debugfs_remove(root_node.dentry);
670
671 return rc;
672}
673device_initcall(gcov_fs_init);
diff --git a/kernel/gcov/gcc_3_4.c b/kernel/gcov/gcc_3_4.c
new file mode 100644
index 000000000000..ae5bb4260033
--- /dev/null
+++ b/kernel/gcov/gcc_3_4.c
@@ -0,0 +1,447 @@
1/*
2 * This code provides functions to handle gcc's profiling data format
3 * introduced with gcc 3.4. Future versions of gcc may change the gcov
4 * format (as happened before), so all format-specific information needs
5 * to be kept modular and easily exchangeable.
6 *
7 * This file is based on gcc-internal definitions. Functions and data
8 * structures are defined to be compatible with gcc counterparts.
9 * For a better understanding, refer to gcc source: gcc/gcov-io.h.
10 *
11 * Copyright IBM Corp. 2009
12 * Author(s): Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
13 *
14 * Uses gcc-internal data definitions.
15 */
16
17#include <linux/errno.h>
18#include <linux/slab.h>
19#include <linux/string.h>
20#include <linux/seq_file.h>
21#include <linux/vmalloc.h>
22#include "gcov.h"
23
24/* Symbolic links to be created for each profiling data file. */
25const struct gcov_link gcov_link[] = {
26 { OBJ_TREE, "gcno" }, /* Link to .gcno file in $(objtree). */
27 { 0, NULL},
28};
29
30/*
31 * Determine whether a counter is active. Based on gcc magic. Doesn't change
32 * at run-time.
33 */
34static int counter_active(struct gcov_info *info, unsigned int type)
35{
36 return (1 << type) & info->ctr_mask;
37}
38
39/* Determine number of active counters. Based on gcc magic. */
40static unsigned int num_counter_active(struct gcov_info *info)
41{
42 unsigned int i;
43 unsigned int result = 0;
44
45 for (i = 0; i < GCOV_COUNTERS; i++) {
46 if (counter_active(info, i))
47 result++;
48 }
49 return result;
50}
51
52/**
53 * gcov_info_reset - reset profiling data to zero
54 * @info: profiling data set
55 */
56void gcov_info_reset(struct gcov_info *info)
57{
58 unsigned int active = num_counter_active(info);
59 unsigned int i;
60
61 for (i = 0; i < active; i++) {
62 memset(info->counts[i].values, 0,
63 info->counts[i].num * sizeof(gcov_type));
64 }
65}
66
67/**
68 * gcov_info_is_compatible - check if profiling data can be added
69 * @info1: first profiling data set
70 * @info2: second profiling data set
71 *
72 * Returns non-zero if profiling data can be added, zero otherwise.
73 */
74int gcov_info_is_compatible(struct gcov_info *info1, struct gcov_info *info2)
75{
76 return (info1->stamp == info2->stamp);
77}
78
79/**
80 * gcov_info_add - add up profiling data
81 * @dest: profiling data set to which data is added
82 * @source: profiling data set which is added
83 *
84 * Adds profiling counts of @source to @dest.
85 */
86void gcov_info_add(struct gcov_info *dest, struct gcov_info *source)
87{
88 unsigned int i;
89 unsigned int j;
90
91 for (i = 0; i < num_counter_active(dest); i++) {
92 for (j = 0; j < dest->counts[i].num; j++) {
93 dest->counts[i].values[j] +=
94 source->counts[i].values[j];
95 }
96 }
97}
98
99/* Get size of function info entry. Based on gcc magic. */
100static size_t get_fn_size(struct gcov_info *info)
101{
102 size_t size;
103
104 size = sizeof(struct gcov_fn_info) + num_counter_active(info) *
105 sizeof(unsigned int);
106 if (__alignof__(struct gcov_fn_info) > sizeof(unsigned int))
107 size = ALIGN(size, __alignof__(struct gcov_fn_info));
108 return size;
109}
110
111/* Get address of function info entry. Based on gcc magic. */
112static struct gcov_fn_info *get_fn_info(struct gcov_info *info, unsigned int fn)
113{
114 return (struct gcov_fn_info *)
115 ((char *) info->functions + fn * get_fn_size(info));
116}
117
118/**
119 * gcov_info_dup - duplicate profiling data set
120 * @info: profiling data set to duplicate
121 *
122 * Return newly allocated duplicate on success, %NULL on error.
123 */
124struct gcov_info *gcov_info_dup(struct gcov_info *info)
125{
126 struct gcov_info *dup;
127 unsigned int i;
128 unsigned int active;
129
130 /* Duplicate gcov_info. */
131 active = num_counter_active(info);
132 dup = kzalloc(sizeof(struct gcov_info) +
133 sizeof(struct gcov_ctr_info) * active, GFP_KERNEL);
134 if (!dup)
135 return NULL;
136 dup->version = info->version;
137 dup->stamp = info->stamp;
138 dup->n_functions = info->n_functions;
139 dup->ctr_mask = info->ctr_mask;
140 /* Duplicate filename. */
141 dup->filename = kstrdup(info->filename, GFP_KERNEL);
142 if (!dup->filename)
143 goto err_free;
144 /* Duplicate table of functions. */
145 dup->functions = kmemdup(info->functions, info->n_functions *
146 get_fn_size(info), GFP_KERNEL);
147 if (!dup->functions)
148 goto err_free;
149 /* Duplicate counter arrays. */
150 for (i = 0; i < active ; i++) {
151 struct gcov_ctr_info *ctr = &info->counts[i];
152 size_t size = ctr->num * sizeof(gcov_type);
153
154 dup->counts[i].num = ctr->num;
155 dup->counts[i].merge = ctr->merge;
156 dup->counts[i].values = vmalloc(size);
157 if (!dup->counts[i].values)
158 goto err_free;
159 memcpy(dup->counts[i].values, ctr->values, size);
160 }
161 return dup;
162
163err_free:
164 gcov_info_free(dup);
165 return NULL;
166}
167
168/**
169 * gcov_info_free - release memory for profiling data set duplicate
170 * @info: profiling data set duplicate to free
171 */
172void gcov_info_free(struct gcov_info *info)
173{
174 unsigned int active = num_counter_active(info);
175 unsigned int i;
176
177 for (i = 0; i < active ; i++)
178 vfree(info->counts[i].values);
179 kfree(info->functions);
180 kfree(info->filename);
181 kfree(info);
182}
183
184/**
185 * struct type_info - iterator helper array
186 * @ctr_type: counter type
187 * @offset: index of the first value of the current function for this type
188 *
189 * This array is needed to convert the in-memory data format into the in-file
190 * data format:
191 *
192 * In-memory:
193 * for each counter type
194 * for each function
195 * values
196 *
197 * In-file:
198 * for each function
199 * for each counter type
200 * values
201 *
202 * See gcc source gcc/gcov-io.h for more information on data organization.
203 */
204struct type_info {
205 int ctr_type;
206 unsigned int offset;
207};
208
209/**
210 * struct gcov_iterator - specifies current file position in logical records
211 * @info: associated profiling data
212 * @record: record type
213 * @function: function number
214 * @type: counter type
215 * @count: index into values array
216 * @num_types: number of counter types
217 * @type_info: helper array to get values-array offset for current function
218 */
219struct gcov_iterator {
220 struct gcov_info *info;
221
222 int record;
223 unsigned int function;
224 unsigned int type;
225 unsigned int count;
226
227 int num_types;
228 struct type_info type_info[0];
229};
230
231static struct gcov_fn_info *get_func(struct gcov_iterator *iter)
232{
233 return get_fn_info(iter->info, iter->function);
234}
235
236static struct type_info *get_type(struct gcov_iterator *iter)
237{
238 return &iter->type_info[iter->type];
239}
240
241/**
242 * gcov_iter_new - allocate and initialize profiling data iterator
243 * @info: profiling data set to be iterated
244 *
245 * Return file iterator on success, %NULL otherwise.
246 */
247struct gcov_iterator *gcov_iter_new(struct gcov_info *info)
248{
249 struct gcov_iterator *iter;
250
251 iter = kzalloc(sizeof(struct gcov_iterator) +
252 num_counter_active(info) * sizeof(struct type_info),
253 GFP_KERNEL);
254 if (iter)
255 iter->info = info;
256
257 return iter;
258}
259
260/**
261 * gcov_iter_free - release memory for iterator
262 * @iter: file iterator to free
263 */
264void gcov_iter_free(struct gcov_iterator *iter)
265{
266 kfree(iter);
267}
268
269/**
270 * gcov_iter_get_info - return profiling data set for given file iterator
271 * @iter: file iterator
272 */
273struct gcov_info *gcov_iter_get_info(struct gcov_iterator *iter)
274{
275 return iter->info;
276}
277
278/**
279 * gcov_iter_start - reset file iterator to starting position
280 * @iter: file iterator
281 */
282void gcov_iter_start(struct gcov_iterator *iter)
283{
284 int i;
285
286 iter->record = 0;
287 iter->function = 0;
288 iter->type = 0;
289 iter->count = 0;
290 iter->num_types = 0;
291 for (i = 0; i < GCOV_COUNTERS; i++) {
292 if (counter_active(iter->info, i)) {
293 iter->type_info[iter->num_types].ctr_type = i;
294 iter->type_info[iter->num_types++].offset = 0;
295 }
296 }
297}
298
299/* Mapping of logical record number to actual file content. */
300#define RECORD_FILE_MAGIC 0
301#define RECORD_GCOV_VERSION 1
302#define RECORD_TIME_STAMP 2
303#define RECORD_FUNCTION_TAG 3
304#define RECORD_FUNCTON_TAG_LEN 4
305#define RECORD_FUNCTION_IDENT 5
306#define RECORD_FUNCTION_CHECK 6
307#define RECORD_COUNT_TAG 7
308#define RECORD_COUNT_LEN 8
309#define RECORD_COUNT 9
310
311/**
312 * gcov_iter_next - advance file iterator to next logical record
313 * @iter: file iterator
314 *
315 * Return zero if new position is valid, non-zero if iterator has reached end.
316 */
317int gcov_iter_next(struct gcov_iterator *iter)
318{
319 switch (iter->record) {
320 case RECORD_FILE_MAGIC:
321 case RECORD_GCOV_VERSION:
322 case RECORD_FUNCTION_TAG:
323 case RECORD_FUNCTON_TAG_LEN:
324 case RECORD_FUNCTION_IDENT:
325 case RECORD_COUNT_TAG:
326 /* Advance to next record */
327 iter->record++;
328 break;
329 case RECORD_COUNT:
330 /* Advance to next count */
331 iter->count++;
332 /* fall through */
333 case RECORD_COUNT_LEN:
334 if (iter->count < get_func(iter)->n_ctrs[iter->type]) {
335 iter->record = 9;
336 break;
337 }
338 /* Advance to next counter type */
339 get_type(iter)->offset += iter->count;
340 iter->count = 0;
341 iter->type++;
342 /* fall through */
343 case RECORD_FUNCTION_CHECK:
344 if (iter->type < iter->num_types) {
345 iter->record = 7;
346 break;
347 }
348 /* Advance to next function */
349 iter->type = 0;
350 iter->function++;
351 /* fall through */
352 case RECORD_TIME_STAMP:
353 if (iter->function < iter->info->n_functions)
354 iter->record = 3;
355 else
356 iter->record = -1;
357 break;
358 }
359 /* Check for EOF. */
360 if (iter->record == -1)
361 return -EINVAL;
362 else
363 return 0;
364}
365
366/**
367 * seq_write_gcov_u32 - write 32 bit number in gcov format to seq_file
368 * @seq: seq_file handle
369 * @v: value to be stored
370 *
371 * Number format defined by gcc: numbers are recorded in the 32 bit
372 * unsigned binary form of the endianness of the machine generating the
373 * file.
374 */
375static int seq_write_gcov_u32(struct seq_file *seq, u32 v)
376{
377 return seq_write(seq, &v, sizeof(v));
378}
379
380/**
381 * seq_write_gcov_u64 - write 64 bit number in gcov format to seq_file
382 * @seq: seq_file handle
383 * @v: value to be stored
384 *
385 * Number format defined by gcc: numbers are recorded in the 32 bit
386 * unsigned binary form of the endianness of the machine generating the
387 * file. 64 bit numbers are stored as two 32 bit numbers, the low part
388 * first.
389 */
390static int seq_write_gcov_u64(struct seq_file *seq, u64 v)
391{
392 u32 data[2];
393
394 data[0] = (v & 0xffffffffUL);
395 data[1] = (v >> 32);
396 return seq_write(seq, data, sizeof(data));
397}
398
399/**
400 * gcov_iter_write - write data for current pos to seq_file
401 * @iter: file iterator
402 * @seq: seq_file handle
403 *
404 * Return zero on success, non-zero otherwise.
405 */
406int gcov_iter_write(struct gcov_iterator *iter, struct seq_file *seq)
407{
408 int rc = -EINVAL;
409
410 switch (iter->record) {
411 case RECORD_FILE_MAGIC:
412 rc = seq_write_gcov_u32(seq, GCOV_DATA_MAGIC);
413 break;
414 case RECORD_GCOV_VERSION:
415 rc = seq_write_gcov_u32(seq, iter->info->version);
416 break;
417 case RECORD_TIME_STAMP:
418 rc = seq_write_gcov_u32(seq, iter->info->stamp);
419 break;
420 case RECORD_FUNCTION_TAG:
421 rc = seq_write_gcov_u32(seq, GCOV_TAG_FUNCTION);
422 break;
423 case RECORD_FUNCTON_TAG_LEN:
424 rc = seq_write_gcov_u32(seq, 2);
425 break;
426 case RECORD_FUNCTION_IDENT:
427 rc = seq_write_gcov_u32(seq, get_func(iter)->ident);
428 break;
429 case RECORD_FUNCTION_CHECK:
430 rc = seq_write_gcov_u32(seq, get_func(iter)->checksum);
431 break;
432 case RECORD_COUNT_TAG:
433 rc = seq_write_gcov_u32(seq,
434 GCOV_TAG_FOR_COUNTER(get_type(iter)->ctr_type));
435 break;
436 case RECORD_COUNT_LEN:
437 rc = seq_write_gcov_u32(seq,
438 get_func(iter)->n_ctrs[iter->type] * 2);
439 break;
440 case RECORD_COUNT:
441 rc = seq_write_gcov_u64(seq,
442 iter->info->counts[iter->type].
443 values[iter->count + get_type(iter)->offset]);
444 break;
445 }
446 return rc;
447}
diff --git a/kernel/gcov/gcov.h b/kernel/gcov/gcov.h
new file mode 100644
index 000000000000..060073ebf7a6
--- /dev/null
+++ b/kernel/gcov/gcov.h
@@ -0,0 +1,128 @@
1/*
2 * Profiling infrastructure declarations.
3 *
4 * This file is based on gcc-internal definitions. Data structures are
5 * defined to be compatible with gcc counterparts. For a better
6 * understanding, refer to gcc source: gcc/gcov-io.h.
7 *
8 * Copyright IBM Corp. 2009
9 * Author(s): Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
10 *
11 * Uses gcc-internal data definitions.
12 */
13
14#ifndef GCOV_H
15#define GCOV_H GCOV_H
16
17#include <linux/types.h>
18
19/*
20 * Profiling data types used for gcc 3.4 and above - these are defined by
21 * gcc and need to be kept as close to the original definition as possible to
22 * remain compatible.
23 */
24#define GCOV_COUNTERS 5
25#define GCOV_DATA_MAGIC ((unsigned int) 0x67636461)
26#define GCOV_TAG_FUNCTION ((unsigned int) 0x01000000)
27#define GCOV_TAG_COUNTER_BASE ((unsigned int) 0x01a10000)
28#define GCOV_TAG_FOR_COUNTER(count) \
29 (GCOV_TAG_COUNTER_BASE + ((unsigned int) (count) << 17))
30
31#if BITS_PER_LONG >= 64
32typedef long gcov_type;
33#else
34typedef long long gcov_type;
35#endif
36
37/**
38 * struct gcov_fn_info - profiling meta data per function
39 * @ident: object file-unique function identifier
40 * @checksum: function checksum
41 * @n_ctrs: number of values per counter type belonging to this function
42 *
43 * This data is generated by gcc during compilation and doesn't change
44 * at run-time.
45 */
46struct gcov_fn_info {
47 unsigned int ident;
48 unsigned int checksum;
49 unsigned int n_ctrs[0];
50};
51
52/**
53 * struct gcov_ctr_info - profiling data per counter type
54 * @num: number of counter values for this type
55 * @values: array of counter values for this type
56 * @merge: merge function for counter values of this type (unused)
57 *
58 * This data is generated by gcc during compilation and doesn't change
59 * at run-time with the exception of the values array.
60 */
61struct gcov_ctr_info {
62 unsigned int num;
63 gcov_type *values;
64 void (*merge)(gcov_type *, unsigned int);
65};
66
67/**
68 * struct gcov_info - profiling data per object file
69 * @version: gcov version magic indicating the gcc version used for compilation
70 * @next: list head for a singly-linked list
71 * @stamp: time stamp
72 * @filename: name of the associated gcov data file
73 * @n_functions: number of instrumented functions
74 * @functions: function data
75 * @ctr_mask: mask specifying which counter types are active
76 * @counts: counter data per counter type
77 *
78 * This data is generated by gcc during compilation and doesn't change
79 * at run-time with the exception of the next pointer.
80 */
81struct gcov_info {
82 unsigned int version;
83 struct gcov_info *next;
84 unsigned int stamp;
85 const char *filename;
86 unsigned int n_functions;
87 const struct gcov_fn_info *functions;
88 unsigned int ctr_mask;
89 struct gcov_ctr_info counts[0];
90};
91
92/* Base interface. */
93enum gcov_action {
94 GCOV_ADD,
95 GCOV_REMOVE,
96};
97
98void gcov_event(enum gcov_action action, struct gcov_info *info);
99void gcov_enable_events(void);
100
101/* Iterator control. */
102struct seq_file;
103struct gcov_iterator;
104
105struct gcov_iterator *gcov_iter_new(struct gcov_info *info);
106void gcov_iter_free(struct gcov_iterator *iter);
107void gcov_iter_start(struct gcov_iterator *iter);
108int gcov_iter_next(struct gcov_iterator *iter);
109int gcov_iter_write(struct gcov_iterator *iter, struct seq_file *seq);
110struct gcov_info *gcov_iter_get_info(struct gcov_iterator *iter);
111
112/* gcov_info control. */
113void gcov_info_reset(struct gcov_info *info);
114int gcov_info_is_compatible(struct gcov_info *info1, struct gcov_info *info2);
115void gcov_info_add(struct gcov_info *dest, struct gcov_info *source);
116struct gcov_info *gcov_info_dup(struct gcov_info *info);
117void gcov_info_free(struct gcov_info *info);
118
119struct gcov_link {
120 enum {
121 OBJ_TREE,
122 SRC_TREE,
123 } dir;
124 const char *ext;
125};
126extern const struct gcov_link gcov_link[];
127
128#endif /* GCOV_H */
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 7fa441333529..9b1a7de26979 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -27,7 +27,6 @@ struct kthread_create_info
27 /* Information passed to kthread() from kthreadd. */ 27 /* Information passed to kthread() from kthreadd. */
28 int (*threadfn)(void *data); 28 int (*threadfn)(void *data);
29 void *data; 29 void *data;
30 struct completion started;
31 30
32 /* Result passed back to kthread_create() from kthreadd. */ 31 /* Result passed back to kthread_create() from kthreadd. */
33 struct task_struct *result; 32 struct task_struct *result;
@@ -36,17 +35,13 @@ struct kthread_create_info
36 struct list_head list; 35 struct list_head list;
37}; 36};
38 37
39struct kthread_stop_info 38struct kthread {
40{ 39 int should_stop;
41 struct task_struct *k; 40 struct completion exited;
42 int err;
43 struct completion done;
44}; 41};
45 42
46/* Thread stopping is done by setthing this var: lock serializes 43#define to_kthread(tsk) \
47 * multiple kthread_stop calls. */ 44 container_of((tsk)->vfork_done, struct kthread, exited)
48static DEFINE_MUTEX(kthread_stop_lock);
49static struct kthread_stop_info kthread_stop_info;
50 45
51/** 46/**
52 * kthread_should_stop - should this kthread return now? 47 * kthread_should_stop - should this kthread return now?
@@ -57,36 +52,35 @@ static struct kthread_stop_info kthread_stop_info;
57 */ 52 */
58int kthread_should_stop(void) 53int kthread_should_stop(void)
59{ 54{
60 return (kthread_stop_info.k == current); 55 return to_kthread(current)->should_stop;
61} 56}
62EXPORT_SYMBOL(kthread_should_stop); 57EXPORT_SYMBOL(kthread_should_stop);
63 58
64static int kthread(void *_create) 59static int kthread(void *_create)
65{ 60{
61 /* Copy data: it's on kthread's stack */
66 struct kthread_create_info *create = _create; 62 struct kthread_create_info *create = _create;
67 int (*threadfn)(void *data); 63 int (*threadfn)(void *data) = create->threadfn;
68 void *data; 64 void *data = create->data;
69 int ret = -EINTR; 65 struct kthread self;
66 int ret;
70 67
71 /* Copy data: it's on kthread's stack */ 68 self.should_stop = 0;
72 threadfn = create->threadfn; 69 init_completion(&self.exited);
73 data = create->data; 70 current->vfork_done = &self.exited;
74 71
75 /* OK, tell user we're spawned, wait for stop or wakeup */ 72 /* OK, tell user we're spawned, wait for stop or wakeup */
76 __set_current_state(TASK_UNINTERRUPTIBLE); 73 __set_current_state(TASK_UNINTERRUPTIBLE);
77 create->result = current; 74 create->result = current;
78 complete(&create->started); 75 complete(&create->done);
79 schedule(); 76 schedule();
80 77
81 if (!kthread_should_stop()) 78 ret = -EINTR;
79 if (!self.should_stop)
82 ret = threadfn(data); 80 ret = threadfn(data);
83 81
84 /* It might have exited on its own, w/o kthread_stop. Check. */ 82 /* we can't just return, we must preserve "self" on stack */
85 if (kthread_should_stop()) { 83 do_exit(ret);
86 kthread_stop_info.err = ret;
87 complete(&kthread_stop_info.done);
88 }
89 return 0;
90} 84}
91 85
92static void create_kthread(struct kthread_create_info *create) 86static void create_kthread(struct kthread_create_info *create)
@@ -95,11 +89,10 @@ static void create_kthread(struct kthread_create_info *create)
95 89
96 /* We want our own signal handler (we take no signals by default). */ 90 /* We want our own signal handler (we take no signals by default). */
97 pid = kernel_thread(kthread, create, CLONE_FS | CLONE_FILES | SIGCHLD); 91 pid = kernel_thread(kthread, create, CLONE_FS | CLONE_FILES | SIGCHLD);
98 if (pid < 0) 92 if (pid < 0) {
99 create->result = ERR_PTR(pid); 93 create->result = ERR_PTR(pid);
100 else 94 complete(&create->done);
101 wait_for_completion(&create->started); 95 }
102 complete(&create->done);
103} 96}
104 97
105/** 98/**
@@ -130,7 +123,6 @@ struct task_struct *kthread_create(int (*threadfn)(void *data),
130 123
131 create.threadfn = threadfn; 124 create.threadfn = threadfn;
132 create.data = data; 125 create.data = data;
133 init_completion(&create.started);
134 init_completion(&create.done); 126 init_completion(&create.done);
135 127
136 spin_lock(&kthread_create_lock); 128 spin_lock(&kthread_create_lock);
@@ -198,30 +190,22 @@ EXPORT_SYMBOL(kthread_bind);
198 */ 190 */
199int kthread_stop(struct task_struct *k) 191int kthread_stop(struct task_struct *k)
200{ 192{
193 struct kthread *kthread;
201 int ret; 194 int ret;
202 195
203 mutex_lock(&kthread_stop_lock);
204
205 /* It could exit after stop_info.k set, but before wake_up_process. */
206 get_task_struct(k);
207
208 trace_sched_kthread_stop(k); 196 trace_sched_kthread_stop(k);
197 get_task_struct(k);
209 198
210 /* Must init completion *before* thread sees kthread_stop_info.k */ 199 kthread = to_kthread(k);
211 init_completion(&kthread_stop_info.done); 200 barrier(); /* it might have exited */
212 smp_wmb(); 201 if (k->vfork_done != NULL) {
202 kthread->should_stop = 1;
203 wake_up_process(k);
204 wait_for_completion(&kthread->exited);
205 }
206 ret = k->exit_code;
213 207
214 /* Now set kthread_should_stop() to true, and wake it up. */
215 kthread_stop_info.k = k;
216 wake_up_process(k);
217 put_task_struct(k); 208 put_task_struct(k);
218
219 /* Once it dies, reset stop ptr, gather result and we're done. */
220 wait_for_completion(&kthread_stop_info.done);
221 kthread_stop_info.k = NULL;
222 ret = kthread_stop_info.err;
223 mutex_unlock(&kthread_stop_lock);
224
225 trace_sched_kthread_stop_ret(ret); 209 trace_sched_kthread_stop_ret(ret);
226 210
227 return ret; 211 return ret;
diff --git a/kernel/module.c b/kernel/module.c
index 215aaab09e91..38928fcaff2b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2216,6 +2216,10 @@ static noinline struct module *load_module(void __user *umod,
2216 mod->unused_gpl_crcs = section_addr(hdr, sechdrs, secstrings, 2216 mod->unused_gpl_crcs = section_addr(hdr, sechdrs, secstrings,
2217 "__kcrctab_unused_gpl"); 2217 "__kcrctab_unused_gpl");
2218#endif 2218#endif
2219#ifdef CONFIG_CONSTRUCTORS
2220 mod->ctors = section_objs(hdr, sechdrs, secstrings, ".ctors",
2221 sizeof(*mod->ctors), &mod->num_ctors);
2222#endif
2219 2223
2220#ifdef CONFIG_MARKERS 2224#ifdef CONFIG_MARKERS
2221 mod->markers = section_objs(hdr, sechdrs, secstrings, "__markers", 2225 mod->markers = section_objs(hdr, sechdrs, secstrings, "__markers",
@@ -2389,6 +2393,17 @@ static noinline struct module *load_module(void __user *umod,
2389 goto free_hdr; 2393 goto free_hdr;
2390} 2394}
2391 2395
2396/* Call module constructors. */
2397static void do_mod_ctors(struct module *mod)
2398{
2399#ifdef CONFIG_CONSTRUCTORS
2400 unsigned long i;
2401
2402 for (i = 0; i < mod->num_ctors; i++)
2403 mod->ctors[i]();
2404#endif
2405}
2406
2392/* This is where the real work happens */ 2407/* This is where the real work happens */
2393SYSCALL_DEFINE3(init_module, void __user *, umod, 2408SYSCALL_DEFINE3(init_module, void __user *, umod,
2394 unsigned long, len, const char __user *, uargs) 2409 unsigned long, len, const char __user *, uargs)
@@ -2417,6 +2432,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
2417 blocking_notifier_call_chain(&module_notify_list, 2432 blocking_notifier_call_chain(&module_notify_list,
2418 MODULE_STATE_COMING, mod); 2433 MODULE_STATE_COMING, mod);
2419 2434
2435 do_mod_ctors(mod);
2420 /* Start the module */ 2436 /* Start the module */
2421 if (mod->init != NULL) 2437 if (mod->init != NULL)
2422 ret = do_one_initcall(mod->init); 2438 ret = do_one_initcall(mod->init);
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 63598dca2d0c..09b4ff9711b2 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -26,19 +26,14 @@ static struct kmem_cache *nsproxy_cachep;
26 26
27struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy); 27struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy);
28 28
29/* 29static inline struct nsproxy *create_nsproxy(void)
30 * creates a copy of "orig" with refcount 1.
31 */
32static inline struct nsproxy *clone_nsproxy(struct nsproxy *orig)
33{ 30{
34 struct nsproxy *ns; 31 struct nsproxy *nsproxy;
35 32
36 ns = kmem_cache_alloc(nsproxy_cachep, GFP_KERNEL); 33 nsproxy = kmem_cache_alloc(nsproxy_cachep, GFP_KERNEL);
37 if (ns) { 34 if (nsproxy)
38 memcpy(ns, orig, sizeof(struct nsproxy)); 35 atomic_set(&nsproxy->count, 1);
39 atomic_set(&ns->count, 1); 36 return nsproxy;
40 }
41 return ns;
42} 37}
43 38
44/* 39/*
@@ -52,7 +47,7 @@ static struct nsproxy *create_new_namespaces(unsigned long flags,
52 struct nsproxy *new_nsp; 47 struct nsproxy *new_nsp;
53 int err; 48 int err;
54 49
55 new_nsp = clone_nsproxy(tsk->nsproxy); 50 new_nsp = create_nsproxy();
56 if (!new_nsp) 51 if (!new_nsp)
57 return ERR_PTR(-ENOMEM); 52 return ERR_PTR(-ENOMEM);
58 53
diff --git a/kernel/pid.c b/kernel/pid.c
index b2e5f78fd281..31310b5d3f50 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -378,26 +378,15 @@ EXPORT_SYMBOL(pid_task);
378/* 378/*
379 * Must be called under rcu_read_lock() or with tasklist_lock read-held. 379 * Must be called under rcu_read_lock() or with tasklist_lock read-held.
380 */ 380 */
381struct task_struct *find_task_by_pid_type_ns(int type, int nr, 381struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
382 struct pid_namespace *ns)
383{ 382{
384 return pid_task(find_pid_ns(nr, ns), type); 383 return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID);
385} 384}
386 385
387EXPORT_SYMBOL(find_task_by_pid_type_ns);
388
389struct task_struct *find_task_by_vpid(pid_t vnr) 386struct task_struct *find_task_by_vpid(pid_t vnr)
390{ 387{
391 return find_task_by_pid_type_ns(PIDTYPE_PID, vnr, 388 return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
392 current->nsproxy->pid_ns);
393}
394EXPORT_SYMBOL(find_task_by_vpid);
395
396struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
397{
398 return find_task_by_pid_type_ns(PIDTYPE_PID, nr, ns);
399} 389}
400EXPORT_SYMBOL(find_task_by_pid_ns);
401 390
402struct pid *get_task_pid(struct task_struct *task, enum pid_type type) 391struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
403{ 392{
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 2d1001b4858d..821722ae58a7 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -67,9 +67,10 @@ err_alloc:
67 return NULL; 67 return NULL;
68} 68}
69 69
70static struct pid_namespace *create_pid_namespace(unsigned int level) 70static struct pid_namespace *create_pid_namespace(struct pid_namespace *parent_pid_ns)
71{ 71{
72 struct pid_namespace *ns; 72 struct pid_namespace *ns;
73 unsigned int level = parent_pid_ns->level + 1;
73 int i; 74 int i;
74 75
75 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); 76 ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL);
@@ -86,6 +87,7 @@ static struct pid_namespace *create_pid_namespace(unsigned int level)
86 87
87 kref_init(&ns->kref); 88 kref_init(&ns->kref);
88 ns->level = level; 89 ns->level = level;
90 ns->parent = get_pid_ns(parent_pid_ns);
89 91
90 set_bit(0, ns->pidmap[0].page); 92 set_bit(0, ns->pidmap[0].page);
91 atomic_set(&ns->pidmap[0].nr_free, BITS_PER_PAGE - 1); 93 atomic_set(&ns->pidmap[0].nr_free, BITS_PER_PAGE - 1);
@@ -114,25 +116,11 @@ static void destroy_pid_namespace(struct pid_namespace *ns)
114 116
115struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *old_ns) 117struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *old_ns)
116{ 118{
117 struct pid_namespace *new_ns;
118
119 BUG_ON(!old_ns);
120 new_ns = get_pid_ns(old_ns);
121 if (!(flags & CLONE_NEWPID)) 119 if (!(flags & CLONE_NEWPID))
122 goto out; 120 return get_pid_ns(old_ns);
123
124 new_ns = ERR_PTR(-EINVAL);
125 if (flags & CLONE_THREAD) 121 if (flags & CLONE_THREAD)
126 goto out_put; 122 return ERR_PTR(-EINVAL);
127 123 return create_pid_namespace(old_ns);
128 new_ns = create_pid_namespace(old_ns->level + 1);
129 if (!IS_ERR(new_ns))
130 new_ns->parent = get_pid_ns(old_ns);
131
132out_put:
133 put_pid_ns(old_ns);
134out:
135 return new_ns;
136} 124}
137 125
138void free_pid_ns(struct kref *kref) 126void free_pid_ns(struct kref *kref)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index f6d8b8cb5e34..61c78b2c07ba 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -167,67 +167,82 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
167int ptrace_attach(struct task_struct *task) 167int ptrace_attach(struct task_struct *task)
168{ 168{
169 int retval; 169 int retval;
170 unsigned long flags;
171 170
172 audit_ptrace(task); 171 audit_ptrace(task);
173 172
174 retval = -EPERM; 173 retval = -EPERM;
174 if (unlikely(task->flags & PF_KTHREAD))
175 goto out;
175 if (same_thread_group(task, current)) 176 if (same_thread_group(task, current))
176 goto out; 177 goto out;
177 178
178 /* Protect the target's credential calculations against our 179 /*
180 * Protect exec's credential calculations against our interference;
179 * interference; SUID, SGID and LSM creds get determined differently 181 * interference; SUID, SGID and LSM creds get determined differently
180 * under ptrace. 182 * under ptrace.
181 */ 183 */
182 retval = mutex_lock_interruptible(&task->cred_guard_mutex); 184 retval = mutex_lock_interruptible(&task->cred_guard_mutex);
183 if (retval < 0) 185 if (retval < 0)
184 goto out; 186 goto out;
185 187
186 retval = -EPERM;
187repeat:
188 /*
189 * Nasty, nasty.
190 *
191 * We want to hold both the task-lock and the
192 * tasklist_lock for writing at the same time.
193 * But that's against the rules (tasklist_lock
194 * is taken for reading by interrupts on other
195 * cpu's that may have task_lock).
196 */
197 task_lock(task); 188 task_lock(task);
198 if (!write_trylock_irqsave(&tasklist_lock, flags)) {
199 task_unlock(task);
200 do {
201 cpu_relax();
202 } while (!write_can_lock(&tasklist_lock));
203 goto repeat;
204 }
205
206 if (!task->mm)
207 goto bad;
208 /* the same process cannot be attached many times */
209 if (task->ptrace & PT_PTRACED)
210 goto bad;
211 retval = __ptrace_may_access(task, PTRACE_MODE_ATTACH); 189 retval = __ptrace_may_access(task, PTRACE_MODE_ATTACH);
190 task_unlock(task);
212 if (retval) 191 if (retval)
213 goto bad; 192 goto unlock_creds;
214 193
215 /* Go */ 194 write_lock_irq(&tasklist_lock);
216 task->ptrace |= PT_PTRACED; 195 retval = -EPERM;
196 if (unlikely(task->exit_state))
197 goto unlock_tasklist;
198 if (task->ptrace)
199 goto unlock_tasklist;
200
201 task->ptrace = PT_PTRACED;
217 if (capable(CAP_SYS_PTRACE)) 202 if (capable(CAP_SYS_PTRACE))
218 task->ptrace |= PT_PTRACE_CAP; 203 task->ptrace |= PT_PTRACE_CAP;
219 204
220 __ptrace_link(task, current); 205 __ptrace_link(task, current);
221
222 send_sig_info(SIGSTOP, SEND_SIG_FORCED, task); 206 send_sig_info(SIGSTOP, SEND_SIG_FORCED, task);
223bad: 207
224 write_unlock_irqrestore(&tasklist_lock, flags); 208 retval = 0;
225 task_unlock(task); 209unlock_tasklist:
210 write_unlock_irq(&tasklist_lock);
211unlock_creds:
226 mutex_unlock(&task->cred_guard_mutex); 212 mutex_unlock(&task->cred_guard_mutex);
227out: 213out:
228 return retval; 214 return retval;
229} 215}
230 216
217/**
218 * ptrace_traceme -- helper for PTRACE_TRACEME
219 *
220 * Performs checks and sets PT_PTRACED.
221 * Should be used by all ptrace implementations for PTRACE_TRACEME.
222 */
223int ptrace_traceme(void)
224{
225 int ret = -EPERM;
226
227 write_lock_irq(&tasklist_lock);
228 /* Are we already being traced? */
229 if (!current->ptrace) {
230 ret = security_ptrace_traceme(current->parent);
231 /*
232 * Check PF_EXITING to ensure ->real_parent has not passed
233 * exit_ptrace(). Otherwise we don't report the error but
234 * pretend ->real_parent untraces us right after return.
235 */
236 if (!ret && !(current->real_parent->flags & PF_EXITING)) {
237 current->ptrace = PT_PTRACED;
238 __ptrace_link(current, current->real_parent);
239 }
240 }
241 write_unlock_irq(&tasklist_lock);
242
243 return ret;
244}
245
231/* 246/*
232 * Called with irqs disabled, returns true if childs should reap themselves. 247 * Called with irqs disabled, returns true if childs should reap themselves.
233 */ 248 */
@@ -409,37 +424,33 @@ static int ptrace_setoptions(struct task_struct *child, long data)
409 424
410static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info) 425static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info)
411{ 426{
427 unsigned long flags;
412 int error = -ESRCH; 428 int error = -ESRCH;
413 429
414 read_lock(&tasklist_lock); 430 if (lock_task_sighand(child, &flags)) {
415 if (likely(child->sighand != NULL)) {
416 error = -EINVAL; 431 error = -EINVAL;
417 spin_lock_irq(&child->sighand->siglock);
418 if (likely(child->last_siginfo != NULL)) { 432 if (likely(child->last_siginfo != NULL)) {
419 *info = *child->last_siginfo; 433 *info = *child->last_siginfo;
420 error = 0; 434 error = 0;
421 } 435 }
422 spin_unlock_irq(&child->sighand->siglock); 436 unlock_task_sighand(child, &flags);
423 } 437 }
424 read_unlock(&tasklist_lock);
425 return error; 438 return error;
426} 439}
427 440
428static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info) 441static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
429{ 442{
443 unsigned long flags;
430 int error = -ESRCH; 444 int error = -ESRCH;
431 445
432 read_lock(&tasklist_lock); 446 if (lock_task_sighand(child, &flags)) {
433 if (likely(child->sighand != NULL)) {
434 error = -EINVAL; 447 error = -EINVAL;
435 spin_lock_irq(&child->sighand->siglock);
436 if (likely(child->last_siginfo != NULL)) { 448 if (likely(child->last_siginfo != NULL)) {
437 *child->last_siginfo = *info; 449 *child->last_siginfo = *info;
438 error = 0; 450 error = 0;
439 } 451 }
440 spin_unlock_irq(&child->sighand->siglock); 452 unlock_task_sighand(child, &flags);
441 } 453 }
442 read_unlock(&tasklist_lock);
443 return error; 454 return error;
444} 455}
445 456
@@ -566,72 +577,16 @@ int ptrace_request(struct task_struct *child, long request,
566 return ret; 577 return ret;
567} 578}
568 579
569/** 580static struct task_struct *ptrace_get_task_struct(pid_t pid)
570 * ptrace_traceme -- helper for PTRACE_TRACEME
571 *
572 * Performs checks and sets PT_PTRACED.
573 * Should be used by all ptrace implementations for PTRACE_TRACEME.
574 */
575int ptrace_traceme(void)
576{
577 int ret = -EPERM;
578
579 /*
580 * Are we already being traced?
581 */
582repeat:
583 task_lock(current);
584 if (!(current->ptrace & PT_PTRACED)) {
585 /*
586 * See ptrace_attach() comments about the locking here.
587 */
588 unsigned long flags;
589 if (!write_trylock_irqsave(&tasklist_lock, flags)) {
590 task_unlock(current);
591 do {
592 cpu_relax();
593 } while (!write_can_lock(&tasklist_lock));
594 goto repeat;
595 }
596
597 ret = security_ptrace_traceme(current->parent);
598
599 /*
600 * Check PF_EXITING to ensure ->real_parent has not passed
601 * exit_ptrace(). Otherwise we don't report the error but
602 * pretend ->real_parent untraces us right after return.
603 */
604 if (!ret && !(current->real_parent->flags & PF_EXITING)) {
605 current->ptrace |= PT_PTRACED;
606 __ptrace_link(current, current->real_parent);
607 }
608
609 write_unlock_irqrestore(&tasklist_lock, flags);
610 }
611 task_unlock(current);
612 return ret;
613}
614
615/**
616 * ptrace_get_task_struct -- grab a task struct reference for ptrace
617 * @pid: process id to grab a task_struct reference of
618 *
619 * This function is a helper for ptrace implementations. It checks
620 * permissions and then grabs a task struct for use of the actual
621 * ptrace implementation.
622 *
623 * Returns the task_struct for @pid or an ERR_PTR() on failure.
624 */
625struct task_struct *ptrace_get_task_struct(pid_t pid)
626{ 581{
627 struct task_struct *child; 582 struct task_struct *child;
628 583
629 read_lock(&tasklist_lock); 584 rcu_read_lock();
630 child = find_task_by_vpid(pid); 585 child = find_task_by_vpid(pid);
631 if (child) 586 if (child)
632 get_task_struct(child); 587 get_task_struct(child);
588 rcu_read_unlock();
633 589
634 read_unlock(&tasklist_lock);
635 if (!child) 590 if (!child)
636 return ERR_PTR(-ESRCH); 591 return ERR_PTR(-ESRCH);
637 return child; 592 return child;
diff --git a/kernel/res_counter.c b/kernel/res_counter.c
index bf8e7534c803..e1338f074314 100644
--- a/kernel/res_counter.c
+++ b/kernel/res_counter.c
@@ -18,7 +18,7 @@
18void res_counter_init(struct res_counter *counter, struct res_counter *parent) 18void res_counter_init(struct res_counter *counter, struct res_counter *parent)
19{ 19{
20 spin_lock_init(&counter->lock); 20 spin_lock_init(&counter->lock);
21 counter->limit = (unsigned long long)LLONG_MAX; 21 counter->limit = RESOURCE_MAX;
22 counter->parent = parent; 22 counter->parent = parent;
23} 23}
24 24
@@ -133,6 +133,16 @@ int res_counter_memparse_write_strategy(const char *buf,
133 unsigned long long *res) 133 unsigned long long *res)
134{ 134{
135 char *end; 135 char *end;
136
137 /* return RESOURCE_MAX(unlimited) if "-1" is specified */
138 if (*buf == '-') {
139 *res = simple_strtoull(buf + 1, &end, 10);
140 if (*res != 1 || *end != '\0')
141 return -EINVAL;
142 *res = RESOURCE_MAX;
143 return 0;
144 }
145
136 /* FIXME - make memparse() take const char* args */ 146 /* FIXME - make memparse() take const char* args */
137 *res = memparse((char *)buf, &end); 147 *res = memparse((char *)buf, &end);
138 if (*end != '\0') 148 if (*end != '\0')
diff --git a/kernel/sched.c b/kernel/sched.c
index 8fb88a906aaa..247fd0fedd0b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7045,7 +7045,7 @@ static int migration_thread(void *data)
7045 7045
7046 if (cpu_is_offline(cpu)) { 7046 if (cpu_is_offline(cpu)) {
7047 spin_unlock_irq(&rq->lock); 7047 spin_unlock_irq(&rq->lock);
7048 goto wait_to_die; 7048 break;
7049 } 7049 }
7050 7050
7051 if (rq->active_balance) { 7051 if (rq->active_balance) {
@@ -7071,16 +7071,7 @@ static int migration_thread(void *data)
7071 complete(&req->done); 7071 complete(&req->done);
7072 } 7072 }
7073 __set_current_state(TASK_RUNNING); 7073 __set_current_state(TASK_RUNNING);
7074 return 0;
7075 7074
7076wait_to_die:
7077 /* Wait for kthread_stop */
7078 set_current_state(TASK_INTERRUPTIBLE);
7079 while (!kthread_should_stop()) {
7080 schedule();
7081 set_current_state(TASK_INTERRUPTIBLE);
7082 }
7083 __set_current_state(TASK_RUNNING);
7084 return 0; 7075 return 0;
7085} 7076}
7086 7077
@@ -7494,6 +7485,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
7494 rq = task_rq_lock(p, &flags); 7485 rq = task_rq_lock(p, &flags);
7495 __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); 7486 __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1);
7496 task_rq_unlock(rq, &flags); 7487 task_rq_unlock(rq, &flags);
7488 get_task_struct(p);
7497 cpu_rq(cpu)->migration_thread = p; 7489 cpu_rq(cpu)->migration_thread = p;
7498 break; 7490 break;
7499 7491
@@ -7524,6 +7516,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
7524 kthread_bind(cpu_rq(cpu)->migration_thread, 7516 kthread_bind(cpu_rq(cpu)->migration_thread,
7525 cpumask_any(cpu_online_mask)); 7517 cpumask_any(cpu_online_mask));
7526 kthread_stop(cpu_rq(cpu)->migration_thread); 7518 kthread_stop(cpu_rq(cpu)->migration_thread);
7519 put_task_struct(cpu_rq(cpu)->migration_thread);
7527 cpu_rq(cpu)->migration_thread = NULL; 7520 cpu_rq(cpu)->migration_thread = NULL;
7528 break; 7521 break;
7529 7522
@@ -7533,6 +7526,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
7533 migrate_live_tasks(cpu); 7526 migrate_live_tasks(cpu);
7534 rq = cpu_rq(cpu); 7527 rq = cpu_rq(cpu);
7535 kthread_stop(rq->migration_thread); 7528 kthread_stop(rq->migration_thread);
7529 put_task_struct(rq->migration_thread);
7536 rq->migration_thread = NULL; 7530 rq->migration_thread = NULL;
7537 /* Idle task back to normal (off runqueue, low prio) */ 7531 /* Idle task back to normal (off runqueue, low prio) */
7538 spin_lock_irq(&rq->lock); 7532 spin_lock_irq(&rq->lock);
diff --git a/kernel/signal.c b/kernel/signal.c
index d81f4952eebb..ccf1ceedaebe 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1410,7 +1410,7 @@ int do_notify_parent(struct task_struct *tsk, int sig)
1410 /* do_notify_parent_cldstop should have been called instead. */ 1410 /* do_notify_parent_cldstop should have been called instead. */
1411 BUG_ON(task_is_stopped_or_traced(tsk)); 1411 BUG_ON(task_is_stopped_or_traced(tsk));
1412 1412
1413 BUG_ON(!tsk->ptrace && 1413 BUG_ON(!task_ptrace(tsk) &&
1414 (tsk->group_leader != tsk || !thread_group_empty(tsk))); 1414 (tsk->group_leader != tsk || !thread_group_empty(tsk)));
1415 1415
1416 info.si_signo = sig; 1416 info.si_signo = sig;
@@ -1449,7 +1449,7 @@ int do_notify_parent(struct task_struct *tsk, int sig)
1449 1449
1450 psig = tsk->parent->sighand; 1450 psig = tsk->parent->sighand;
1451 spin_lock_irqsave(&psig->siglock, flags); 1451 spin_lock_irqsave(&psig->siglock, flags);
1452 if (!tsk->ptrace && sig == SIGCHLD && 1452 if (!task_ptrace(tsk) && sig == SIGCHLD &&
1453 (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN || 1453 (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN ||
1454 (psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) { 1454 (psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) {
1455 /* 1455 /*
@@ -1486,7 +1486,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
1486 struct task_struct *parent; 1486 struct task_struct *parent;
1487 struct sighand_struct *sighand; 1487 struct sighand_struct *sighand;
1488 1488
1489 if (tsk->ptrace & PT_PTRACED) 1489 if (task_ptrace(tsk))
1490 parent = tsk->parent; 1490 parent = tsk->parent;
1491 else { 1491 else {
1492 tsk = tsk->group_leader; 1492 tsk = tsk->group_leader;
@@ -1499,7 +1499,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
1499 * see comment in do_notify_parent() abot the following 3 lines 1499 * see comment in do_notify_parent() abot the following 3 lines
1500 */ 1500 */
1501 rcu_read_lock(); 1501 rcu_read_lock();
1502 info.si_pid = task_pid_nr_ns(tsk, tsk->parent->nsproxy->pid_ns); 1502 info.si_pid = task_pid_nr_ns(tsk, parent->nsproxy->pid_ns);
1503 info.si_uid = __task_cred(tsk)->uid; 1503 info.si_uid = __task_cred(tsk)->uid;
1504 rcu_read_unlock(); 1504 rcu_read_unlock();
1505 1505
@@ -1535,7 +1535,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
1535 1535
1536static inline int may_ptrace_stop(void) 1536static inline int may_ptrace_stop(void)
1537{ 1537{
1538 if (!likely(current->ptrace & PT_PTRACED)) 1538 if (!likely(task_ptrace(current)))
1539 return 0; 1539 return 0;
1540 /* 1540 /*
1541 * Are we in the middle of do_coredump? 1541 * Are we in the middle of do_coredump?
@@ -1753,7 +1753,7 @@ static int do_signal_stop(int signr)
1753static int ptrace_signal(int signr, siginfo_t *info, 1753static int ptrace_signal(int signr, siginfo_t *info,
1754 struct pt_regs *regs, void *cookie) 1754 struct pt_regs *regs, void *cookie)
1755{ 1755{
1756 if (!(current->ptrace & PT_PTRACED)) 1756 if (!task_ptrace(current))
1757 return signr; 1757 return signr;
1758 1758
1759 ptrace_signal_deliver(regs, cookie); 1759 ptrace_signal_deliver(regs, cookie);
diff --git a/kernel/softirq.c b/kernel/softirq.c
index b41fb710e114..3a94905fa5d2 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -213,6 +213,7 @@ restart:
213 do { 213 do {
214 if (pending & 1) { 214 if (pending & 1) {
215 int prev_count = preempt_count(); 215 int prev_count = preempt_count();
216 kstat_incr_softirqs_this_cpu(h - softirq_vec);
216 217
217 trace_softirq_entry(h, softirq_vec); 218 trace_softirq_entry(h, softirq_vec);
218 h->action(h); 219 h->action(h);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ab462b9968d5..62e4ff9968b5 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2283,7 +2283,7 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
2283 void *data) 2283 void *data)
2284{ 2284{
2285#define TMPBUFLEN 21 2285#define TMPBUFLEN 21
2286 int *i, vleft, first=1, neg, val; 2286 int *i, vleft, first = 1, neg;
2287 unsigned long lval; 2287 unsigned long lval;
2288 size_t left, len; 2288 size_t left, len;
2289 2289
@@ -2336,8 +2336,6 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
2336 len = p-buf; 2336 len = p-buf;
2337 if ((len < left) && *p && !isspace(*p)) 2337 if ((len < left) && *p && !isspace(*p))
2338 break; 2338 break;
2339 if (neg)
2340 val = -val;
2341 s += len; 2339 s += len;
2342 left -= len; 2340 left -= len;
2343 2341
diff --git a/kernel/utsname.c b/kernel/utsname.c
index 815237a55af8..8a82b4b8ea52 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -15,6 +15,16 @@
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17 17
18static struct uts_namespace *create_uts_ns(void)
19{
20 struct uts_namespace *uts_ns;
21
22 uts_ns = kmalloc(sizeof(struct uts_namespace), GFP_KERNEL);
23 if (uts_ns)
24 kref_init(&uts_ns->kref);
25 return uts_ns;
26}
27
18/* 28/*
19 * Clone a new ns copying an original utsname, setting refcount to 1 29 * Clone a new ns copying an original utsname, setting refcount to 1
20 * @old_ns: namespace to clone 30 * @old_ns: namespace to clone
@@ -24,14 +34,13 @@ static struct uts_namespace *clone_uts_ns(struct uts_namespace *old_ns)
24{ 34{
25 struct uts_namespace *ns; 35 struct uts_namespace *ns;
26 36
27 ns = kmalloc(sizeof(struct uts_namespace), GFP_KERNEL); 37 ns = create_uts_ns();
28 if (!ns) 38 if (!ns)
29 return ERR_PTR(-ENOMEM); 39 return ERR_PTR(-ENOMEM);
30 40
31 down_read(&uts_sem); 41 down_read(&uts_sem);
32 memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); 42 memcpy(&ns->name, &old_ns->name, sizeof(ns->name));
33 up_read(&uts_sem); 43 up_read(&uts_sem);
34 kref_init(&ns->kref);
35 return ns; 44 return ns;
36} 45}
37 46
diff --git a/lib/Makefile b/lib/Makefile
index 8e9bcf9d3261..b6d1857bbf08 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -21,7 +21,7 @@ lib-y += kobject.o kref.o klist.o
21 21
22obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ 22obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
23 bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ 23 bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
24 string_helpers.o 24 string_helpers.o gcd.o
25 25
26ifeq ($(CONFIG_DEBUG_KOBJECT),y) 26ifeq ($(CONFIG_DEBUG_KOBJECT),y)
27CFLAGS_kobject.o += -DDEBUG 27CFLAGS_kobject.o += -DDEBUG
diff --git a/lib/gcd.c b/lib/gcd.c
new file mode 100644
index 000000000000..f879033d9822
--- /dev/null
+++ b/lib/gcd.c
@@ -0,0 +1,18 @@
1#include <linux/kernel.h>
2#include <linux/gcd.h>
3#include <linux/module.h>
4
5/* Greatest common divisor */
6unsigned long gcd(unsigned long a, unsigned long b)
7{
8 unsigned long r;
9
10 if (a < b)
11 swap(a, b);
12 while ((r = a % b) != 0) {
13 a = b;
14 b = r;
15 }
16 return b;
17}
18EXPORT_SYMBOL_GPL(gcd);
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 282df0a09e6f..d2a9ce952768 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -536,11 +536,15 @@ static void * __init alloc_arch_preferred_bootmem(bootmem_data_t *bdata,
536 return kzalloc(size, GFP_NOWAIT); 536 return kzalloc(size, GFP_NOWAIT);
537 537
538#ifdef CONFIG_HAVE_ARCH_BOOTMEM 538#ifdef CONFIG_HAVE_ARCH_BOOTMEM
539 bootmem_data_t *p_bdata; 539 {
540 540 bootmem_data_t *p_bdata;
541 p_bdata = bootmem_arch_preferred_node(bdata, size, align, goal, limit); 541
542 if (p_bdata) 542 p_bdata = bootmem_arch_preferred_node(bdata, size, align,
543 return alloc_bootmem_core(p_bdata, size, align, goal, limit); 543 goal, limit);
544 if (p_bdata)
545 return alloc_bootmem_core(p_bdata, size, align,
546 goal, limit);
547 }
544#endif 548#endif
545 return NULL; 549 return NULL;
546} 550}
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 70db6e0a5eec..e2fa20dadf40 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -45,7 +45,7 @@ struct cgroup_subsys mem_cgroup_subsys __read_mostly;
45#define MEM_CGROUP_RECLAIM_RETRIES 5 45#define MEM_CGROUP_RECLAIM_RETRIES 5
46 46
47#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 47#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
48/* Turned on only when memory cgroup is enabled && really_do_swap_account = 0 */ 48/* Turned on only when memory cgroup is enabled && really_do_swap_account = 1 */
49int do_swap_account __read_mostly; 49int do_swap_account __read_mostly;
50static int really_do_swap_account __initdata = 1; /* for remember boot option*/ 50static int really_do_swap_account __initdata = 1; /* for remember boot option*/
51#else 51#else
@@ -62,7 +62,8 @@ enum mem_cgroup_stat_index {
62 * For MEM_CONTAINER_TYPE_ALL, usage = pagecache + rss. 62 * For MEM_CONTAINER_TYPE_ALL, usage = pagecache + rss.
63 */ 63 */
64 MEM_CGROUP_STAT_CACHE, /* # of pages charged as cache */ 64 MEM_CGROUP_STAT_CACHE, /* # of pages charged as cache */
65 MEM_CGROUP_STAT_RSS, /* # of pages charged as rss */ 65 MEM_CGROUP_STAT_RSS, /* # of pages charged as anon rss */
66 MEM_CGROUP_STAT_MAPPED_FILE, /* # of pages charged as file rss */
66 MEM_CGROUP_STAT_PGPGIN_COUNT, /* # of pages paged in */ 67 MEM_CGROUP_STAT_PGPGIN_COUNT, /* # of pages paged in */
67 MEM_CGROUP_STAT_PGPGOUT_COUNT, /* # of pages paged out */ 68 MEM_CGROUP_STAT_PGPGOUT_COUNT, /* # of pages paged out */
68 69
@@ -176,6 +177,9 @@ struct mem_cgroup {
176 177
177 unsigned int swappiness; 178 unsigned int swappiness;
178 179
180 /* set when res.limit == memsw.limit */
181 bool memsw_is_minimum;
182
179 /* 183 /*
180 * statistics. This must be placed at the end of memcg. 184 * statistics. This must be placed at the end of memcg.
181 */ 185 */
@@ -188,6 +192,7 @@ enum charge_type {
188 MEM_CGROUP_CHARGE_TYPE_SHMEM, /* used by page migration of shmem */ 192 MEM_CGROUP_CHARGE_TYPE_SHMEM, /* used by page migration of shmem */
189 MEM_CGROUP_CHARGE_TYPE_FORCE, /* used by force_empty */ 193 MEM_CGROUP_CHARGE_TYPE_FORCE, /* used by force_empty */
190 MEM_CGROUP_CHARGE_TYPE_SWAPOUT, /* for accounting swapcache */ 194 MEM_CGROUP_CHARGE_TYPE_SWAPOUT, /* for accounting swapcache */
195 MEM_CGROUP_CHARGE_TYPE_DROP, /* a page was unused swap cache */
191 NR_CHARGE_TYPE, 196 NR_CHARGE_TYPE,
192}; 197};
193 198
@@ -644,6 +649,7 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
644 int zid = zone_idx(z); 649 int zid = zone_idx(z);
645 struct mem_cgroup_per_zone *mz; 650 struct mem_cgroup_per_zone *mz;
646 int lru = LRU_FILE * !!file + !!active; 651 int lru = LRU_FILE * !!file + !!active;
652 int ret;
647 653
648 BUG_ON(!mem_cont); 654 BUG_ON(!mem_cont);
649 mz = mem_cgroup_zoneinfo(mem_cont, nid, zid); 655 mz = mem_cgroup_zoneinfo(mem_cont, nid, zid);
@@ -661,9 +667,19 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
661 continue; 667 continue;
662 668
663 scan++; 669 scan++;
664 if (__isolate_lru_page(page, mode, file) == 0) { 670 ret = __isolate_lru_page(page, mode, file);
671 switch (ret) {
672 case 0:
665 list_move(&page->lru, dst); 673 list_move(&page->lru, dst);
674 mem_cgroup_del_lru(page);
666 nr_taken++; 675 nr_taken++;
676 break;
677 case -EBUSY:
678 /* we don't affect global LRU but rotate in our LRU */
679 mem_cgroup_rotate_lru_list(page, page_lru(page));
680 break;
681 default:
682 break;
667 } 683 }
668 } 684 }
669 685
@@ -845,6 +861,10 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
845 int ret, total = 0; 861 int ret, total = 0;
846 int loop = 0; 862 int loop = 0;
847 863
864 /* If memsw_is_minimum==1, swap-out is of-no-use. */
865 if (root_mem->memsw_is_minimum)
866 noswap = true;
867
848 while (loop < 2) { 868 while (loop < 2) {
849 victim = mem_cgroup_select_victim(root_mem); 869 victim = mem_cgroup_select_victim(root_mem);
850 if (victim == root_mem) 870 if (victim == root_mem)
@@ -900,6 +920,44 @@ static void record_last_oom(struct mem_cgroup *mem)
900 mem_cgroup_walk_tree(mem, NULL, record_last_oom_cb); 920 mem_cgroup_walk_tree(mem, NULL, record_last_oom_cb);
901} 921}
902 922
923/*
924 * Currently used to update mapped file statistics, but the routine can be
925 * generalized to update other statistics as well.
926 */
927void mem_cgroup_update_mapped_file_stat(struct page *page, int val)
928{
929 struct mem_cgroup *mem;
930 struct mem_cgroup_stat *stat;
931 struct mem_cgroup_stat_cpu *cpustat;
932 int cpu;
933 struct page_cgroup *pc;
934
935 if (!page_is_file_cache(page))
936 return;
937
938 pc = lookup_page_cgroup(page);
939 if (unlikely(!pc))
940 return;
941
942 lock_page_cgroup(pc);
943 mem = pc->mem_cgroup;
944 if (!mem)
945 goto done;
946
947 if (!PageCgroupUsed(pc))
948 goto done;
949
950 /*
951 * Preemption is already disabled, we don't need get_cpu()
952 */
953 cpu = smp_processor_id();
954 stat = &mem->stat;
955 cpustat = &stat->cpustat[cpu];
956
957 __mem_cgroup_stat_add_safe(cpustat, MEM_CGROUP_STAT_MAPPED_FILE, val);
958done:
959 unlock_page_cgroup(pc);
960}
903 961
904/* 962/*
905 * Unlike exported interface, "oom" parameter is added. if oom==true, 963 * Unlike exported interface, "oom" parameter is added. if oom==true,
@@ -1098,6 +1156,10 @@ static int mem_cgroup_move_account(struct page_cgroup *pc,
1098 struct mem_cgroup_per_zone *from_mz, *to_mz; 1156 struct mem_cgroup_per_zone *from_mz, *to_mz;
1099 int nid, zid; 1157 int nid, zid;
1100 int ret = -EBUSY; 1158 int ret = -EBUSY;
1159 struct page *page;
1160 int cpu;
1161 struct mem_cgroup_stat *stat;
1162 struct mem_cgroup_stat_cpu *cpustat;
1101 1163
1102 VM_BUG_ON(from == to); 1164 VM_BUG_ON(from == to);
1103 VM_BUG_ON(PageLRU(pc->page)); 1165 VM_BUG_ON(PageLRU(pc->page));
@@ -1118,6 +1180,23 @@ static int mem_cgroup_move_account(struct page_cgroup *pc,
1118 1180
1119 res_counter_uncharge(&from->res, PAGE_SIZE); 1181 res_counter_uncharge(&from->res, PAGE_SIZE);
1120 mem_cgroup_charge_statistics(from, pc, false); 1182 mem_cgroup_charge_statistics(from, pc, false);
1183
1184 page = pc->page;
1185 if (page_is_file_cache(page) && page_mapped(page)) {
1186 cpu = smp_processor_id();
1187 /* Update mapped_file data for mem_cgroup "from" */
1188 stat = &from->stat;
1189 cpustat = &stat->cpustat[cpu];
1190 __mem_cgroup_stat_add_safe(cpustat, MEM_CGROUP_STAT_MAPPED_FILE,
1191 -1);
1192
1193 /* Update mapped_file data for mem_cgroup "to" */
1194 stat = &to->stat;
1195 cpustat = &stat->cpustat[cpu];
1196 __mem_cgroup_stat_add_safe(cpustat, MEM_CGROUP_STAT_MAPPED_FILE,
1197 1);
1198 }
1199
1121 if (do_swap_account) 1200 if (do_swap_account)
1122 res_counter_uncharge(&from->memsw, PAGE_SIZE); 1201 res_counter_uncharge(&from->memsw, PAGE_SIZE);
1123 css_put(&from->css); 1202 css_put(&from->css);
@@ -1433,6 +1512,7 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
1433 1512
1434 switch (ctype) { 1513 switch (ctype) {
1435 case MEM_CGROUP_CHARGE_TYPE_MAPPED: 1514 case MEM_CGROUP_CHARGE_TYPE_MAPPED:
1515 case MEM_CGROUP_CHARGE_TYPE_DROP:
1436 if (page_mapped(page)) 1516 if (page_mapped(page))
1437 goto unlock_out; 1517 goto unlock_out;
1438 break; 1518 break;
@@ -1496,18 +1576,23 @@ void mem_cgroup_uncharge_cache_page(struct page *page)
1496 * called after __delete_from_swap_cache() and drop "page" account. 1576 * called after __delete_from_swap_cache() and drop "page" account.
1497 * memcg information is recorded to swap_cgroup of "ent" 1577 * memcg information is recorded to swap_cgroup of "ent"
1498 */ 1578 */
1499void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) 1579void
1580mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
1500{ 1581{
1501 struct mem_cgroup *memcg; 1582 struct mem_cgroup *memcg;
1583 int ctype = MEM_CGROUP_CHARGE_TYPE_SWAPOUT;
1584
1585 if (!swapout) /* this was a swap cache but the swap is unused ! */
1586 ctype = MEM_CGROUP_CHARGE_TYPE_DROP;
1587
1588 memcg = __mem_cgroup_uncharge_common(page, ctype);
1502 1589
1503 memcg = __mem_cgroup_uncharge_common(page,
1504 MEM_CGROUP_CHARGE_TYPE_SWAPOUT);
1505 /* record memcg information */ 1590 /* record memcg information */
1506 if (do_swap_account && memcg) { 1591 if (do_swap_account && swapout && memcg) {
1507 swap_cgroup_record(ent, css_id(&memcg->css)); 1592 swap_cgroup_record(ent, css_id(&memcg->css));
1508 mem_cgroup_get(memcg); 1593 mem_cgroup_get(memcg);
1509 } 1594 }
1510 if (memcg) 1595 if (swapout && memcg)
1511 css_put(&memcg->css); 1596 css_put(&memcg->css);
1512} 1597}
1513#endif 1598#endif
@@ -1685,6 +1770,12 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg,
1685 break; 1770 break;
1686 } 1771 }
1687 ret = res_counter_set_limit(&memcg->res, val); 1772 ret = res_counter_set_limit(&memcg->res, val);
1773 if (!ret) {
1774 if (memswlimit == val)
1775 memcg->memsw_is_minimum = true;
1776 else
1777 memcg->memsw_is_minimum = false;
1778 }
1688 mutex_unlock(&set_limit_mutex); 1779 mutex_unlock(&set_limit_mutex);
1689 1780
1690 if (!ret) 1781 if (!ret)
@@ -1703,16 +1794,14 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg,
1703 return ret; 1794 return ret;
1704} 1795}
1705 1796
1706int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, 1797static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg,
1707 unsigned long long val) 1798 unsigned long long val)
1708{ 1799{
1709 int retry_count; 1800 int retry_count;
1710 u64 memlimit, oldusage, curusage; 1801 u64 memlimit, oldusage, curusage;
1711 int children = mem_cgroup_count_children(memcg); 1802 int children = mem_cgroup_count_children(memcg);
1712 int ret = -EBUSY; 1803 int ret = -EBUSY;
1713 1804
1714 if (!do_swap_account)
1715 return -EINVAL;
1716 /* see mem_cgroup_resize_res_limit */ 1805 /* see mem_cgroup_resize_res_limit */
1717 retry_count = children * MEM_CGROUP_RECLAIM_RETRIES; 1806 retry_count = children * MEM_CGROUP_RECLAIM_RETRIES;
1718 oldusage = res_counter_read_u64(&memcg->memsw, RES_USAGE); 1807 oldusage = res_counter_read_u64(&memcg->memsw, RES_USAGE);
@@ -1734,6 +1823,12 @@ int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg,
1734 break; 1823 break;
1735 } 1824 }
1736 ret = res_counter_set_limit(&memcg->memsw, val); 1825 ret = res_counter_set_limit(&memcg->memsw, val);
1826 if (!ret) {
1827 if (memlimit == val)
1828 memcg->memsw_is_minimum = true;
1829 else
1830 memcg->memsw_is_minimum = false;
1831 }
1737 mutex_unlock(&set_limit_mutex); 1832 mutex_unlock(&set_limit_mutex);
1738 1833
1739 if (!ret) 1834 if (!ret)
@@ -1947,8 +2042,7 @@ static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
1947 val = res_counter_read_u64(&mem->res, name); 2042 val = res_counter_read_u64(&mem->res, name);
1948 break; 2043 break;
1949 case _MEMSWAP: 2044 case _MEMSWAP:
1950 if (do_swap_account) 2045 val = res_counter_read_u64(&mem->memsw, name);
1951 val = res_counter_read_u64(&mem->memsw, name);
1952 break; 2046 break;
1953 default: 2047 default:
1954 BUG(); 2048 BUG();
@@ -2046,6 +2140,7 @@ static int mem_cgroup_reset(struct cgroup *cont, unsigned int event)
2046enum { 2140enum {
2047 MCS_CACHE, 2141 MCS_CACHE,
2048 MCS_RSS, 2142 MCS_RSS,
2143 MCS_MAPPED_FILE,
2049 MCS_PGPGIN, 2144 MCS_PGPGIN,
2050 MCS_PGPGOUT, 2145 MCS_PGPGOUT,
2051 MCS_INACTIVE_ANON, 2146 MCS_INACTIVE_ANON,
@@ -2066,6 +2161,7 @@ struct {
2066} memcg_stat_strings[NR_MCS_STAT] = { 2161} memcg_stat_strings[NR_MCS_STAT] = {
2067 {"cache", "total_cache"}, 2162 {"cache", "total_cache"},
2068 {"rss", "total_rss"}, 2163 {"rss", "total_rss"},
2164 {"mapped_file", "total_mapped_file"},
2069 {"pgpgin", "total_pgpgin"}, 2165 {"pgpgin", "total_pgpgin"},
2070 {"pgpgout", "total_pgpgout"}, 2166 {"pgpgout", "total_pgpgout"},
2071 {"inactive_anon", "total_inactive_anon"}, 2167 {"inactive_anon", "total_inactive_anon"},
@@ -2086,6 +2182,8 @@ static int mem_cgroup_get_local_stat(struct mem_cgroup *mem, void *data)
2086 s->stat[MCS_CACHE] += val * PAGE_SIZE; 2182 s->stat[MCS_CACHE] += val * PAGE_SIZE;
2087 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_RSS); 2183 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_RSS);
2088 s->stat[MCS_RSS] += val * PAGE_SIZE; 2184 s->stat[MCS_RSS] += val * PAGE_SIZE;
2185 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_MAPPED_FILE);
2186 s->stat[MCS_MAPPED_FILE] += val * PAGE_SIZE;
2089 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_PGPGIN_COUNT); 2187 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_PGPGIN_COUNT);
2090 s->stat[MCS_PGPGIN] += val; 2188 s->stat[MCS_PGPGIN] += val;
2091 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_PGPGOUT_COUNT); 2189 val = mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_PGPGOUT_COUNT);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a5f3c278c573..6f0753fe694c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -73,6 +73,7 @@ unsigned long totalram_pages __read_mostly;
73unsigned long totalreserve_pages __read_mostly; 73unsigned long totalreserve_pages __read_mostly;
74unsigned long highest_memmap_pfn __read_mostly; 74unsigned long highest_memmap_pfn __read_mostly;
75int percpu_pagelist_fraction; 75int percpu_pagelist_fraction;
76gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
76 77
77#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE 78#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
78int pageblock_order __read_mostly; 79int pageblock_order __read_mostly;
@@ -1863,6 +1864,8 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
1863 struct page *page; 1864 struct page *page;
1864 int migratetype = allocflags_to_migratetype(gfp_mask); 1865 int migratetype = allocflags_to_migratetype(gfp_mask);
1865 1866
1867 gfp_mask &= gfp_allowed_mask;
1868
1866 lockdep_trace_alloc(gfp_mask); 1869 lockdep_trace_alloc(gfp_mask);
1867 1870
1868 might_sleep_if(gfp_mask & __GFP_WAIT); 1871 might_sleep_if(gfp_mask & __GFP_WAIT);
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 11a8a10a3909..f22b4ebbd8dc 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -83,12 +83,12 @@ void __init page_cgroup_init_flatmem(void)
83 goto fail; 83 goto fail;
84 } 84 }
85 printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage); 85 printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage);
86 printk(KERN_INFO "please try cgroup_disable=memory option if you" 86 printk(KERN_INFO "please try 'cgroup_disable=memory' option if you"
87 " don't want\n"); 87 " don't want memory cgroups\n");
88 return; 88 return;
89fail: 89fail:
90 printk(KERN_CRIT "allocation of page_cgroup was failed.\n"); 90 printk(KERN_CRIT "allocation of page_cgroup failed.\n");
91 printk(KERN_CRIT "please try cgroup_disable=memory boot option\n"); 91 printk(KERN_CRIT "please try 'cgroup_disable=memory' boot option\n");
92 panic("Out of memory"); 92 panic("Out of memory");
93} 93}
94 94
@@ -99,6 +99,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
99 unsigned long pfn = page_to_pfn(page); 99 unsigned long pfn = page_to_pfn(page);
100 struct mem_section *section = __pfn_to_section(pfn); 100 struct mem_section *section = __pfn_to_section(pfn);
101 101
102 if (!section->page_cgroup)
103 return NULL;
102 return section->page_cgroup + pfn; 104 return section->page_cgroup + pfn;
103} 105}
104 106
@@ -252,14 +254,14 @@ void __init page_cgroup_init(void)
252 fail = init_section_page_cgroup(pfn); 254 fail = init_section_page_cgroup(pfn);
253 } 255 }
254 if (fail) { 256 if (fail) {
255 printk(KERN_CRIT "try cgroup_disable=memory boot option\n"); 257 printk(KERN_CRIT "try 'cgroup_disable=memory' boot option\n");
256 panic("Out of memory"); 258 panic("Out of memory");
257 } else { 259 } else {
258 hotplug_memory_notifier(page_cgroup_callback, 0); 260 hotplug_memory_notifier(page_cgroup_callback, 0);
259 } 261 }
260 printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage); 262 printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage);
261 printk(KERN_INFO "please try cgroup_disable=memory option if you don't" 263 printk(KERN_INFO "please try 'cgroup_disable=memory' option if you don't"
262 " want\n"); 264 " want memory cgroups\n");
263} 265}
264 266
265void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) 267void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
@@ -309,8 +311,6 @@ static int swap_cgroup_prepare(int type)
309 struct swap_cgroup_ctrl *ctrl; 311 struct swap_cgroup_ctrl *ctrl;
310 unsigned long idx, max; 312 unsigned long idx, max;
311 313
312 if (!do_swap_account)
313 return 0;
314 ctrl = &swap_cgroup_ctrl[type]; 314 ctrl = &swap_cgroup_ctrl[type];
315 315
316 for (idx = 0; idx < ctrl->length; idx++) { 316 for (idx = 0; idx < ctrl->length; idx++) {
@@ -347,9 +347,6 @@ unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
347 struct swap_cgroup *sc; 347 struct swap_cgroup *sc;
348 unsigned short old; 348 unsigned short old;
349 349
350 if (!do_swap_account)
351 return 0;
352
353 ctrl = &swap_cgroup_ctrl[type]; 350 ctrl = &swap_cgroup_ctrl[type];
354 351
355 mappage = ctrl->map[idx]; 352 mappage = ctrl->map[idx];
@@ -378,9 +375,6 @@ unsigned short lookup_swap_cgroup(swp_entry_t ent)
378 struct swap_cgroup *sc; 375 struct swap_cgroup *sc;
379 unsigned short ret; 376 unsigned short ret;
380 377
381 if (!do_swap_account)
382 return 0;
383
384 ctrl = &swap_cgroup_ctrl[type]; 378 ctrl = &swap_cgroup_ctrl[type];
385 mappage = ctrl->map[idx]; 379 mappage = ctrl->map[idx];
386 sc = page_address(mappage); 380 sc = page_address(mappage);
diff --git a/mm/rmap.c b/mm/rmap.c
index c9ccc1a72dc3..836c6c63e1f2 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -703,8 +703,10 @@ void page_add_new_anon_rmap(struct page *page,
703 */ 703 */
704void page_add_file_rmap(struct page *page) 704void page_add_file_rmap(struct page *page)
705{ 705{
706 if (atomic_inc_and_test(&page->_mapcount)) 706 if (atomic_inc_and_test(&page->_mapcount)) {
707 __inc_zone_page_state(page, NR_FILE_MAPPED); 707 __inc_zone_page_state(page, NR_FILE_MAPPED);
708 mem_cgroup_update_mapped_file_stat(page, 1);
709 }
708} 710}
709 711
710#ifdef CONFIG_DEBUG_VM 712#ifdef CONFIG_DEBUG_VM
@@ -753,6 +755,7 @@ void page_remove_rmap(struct page *page)
753 mem_cgroup_uncharge_page(page); 755 mem_cgroup_uncharge_page(page);
754 __dec_zone_page_state(page, 756 __dec_zone_page_state(page,
755 PageAnon(page) ? NR_ANON_PAGES : NR_FILE_MAPPED); 757 PageAnon(page) ? NR_ANON_PAGES : NR_FILE_MAPPED);
758 mem_cgroup_update_mapped_file_stat(page, -1);
756 /* 759 /*
757 * It would be tidy to reset the PageAnon mapping here, 760 * It would be tidy to reset the PageAnon mapping here,
758 * but that might overwrite a racing page_add_anon_rmap 761 * but that might overwrite a racing page_add_anon_rmap
diff --git a/mm/slab.c b/mm/slab.c
index d08692303f6e..e74a16e4ced6 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -305,12 +305,6 @@ struct kmem_list3 {
305}; 305};
306 306
307/* 307/*
308 * The slab allocator is initialized with interrupts disabled. Therefore, make
309 * sure early boot allocations don't accidentally enable interrupts.
310 */
311static gfp_t slab_gfp_mask __read_mostly = SLAB_GFP_BOOT_MASK;
312
313/*
314 * Need this for bootstrapping a per node allocator. 308 * Need this for bootstrapping a per node allocator.
315 */ 309 */
316#define NUM_INIT_LISTS (3 * MAX_NUMNODES) 310#define NUM_INIT_LISTS (3 * MAX_NUMNODES)
@@ -1559,11 +1553,6 @@ void __init kmem_cache_init_late(void)
1559{ 1553{
1560 struct kmem_cache *cachep; 1554 struct kmem_cache *cachep;
1561 1555
1562 /*
1563 * Interrupts are enabled now so all GFP allocations are safe.
1564 */
1565 slab_gfp_mask = __GFP_BITS_MASK;
1566
1567 /* 6) resize the head arrays to their final sizes */ 1556 /* 6) resize the head arrays to their final sizes */
1568 mutex_lock(&cache_chain_mutex); 1557 mutex_lock(&cache_chain_mutex);
1569 list_for_each_entry(cachep, &cache_chain, next) 1558 list_for_each_entry(cachep, &cache_chain, next)
@@ -3307,7 +3296,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
3307 unsigned long save_flags; 3296 unsigned long save_flags;
3308 void *ptr; 3297 void *ptr;
3309 3298
3310 flags &= slab_gfp_mask; 3299 flags &= gfp_allowed_mask;
3311 3300
3312 lockdep_trace_alloc(flags); 3301 lockdep_trace_alloc(flags);
3313 3302
@@ -3392,7 +3381,7 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
3392 unsigned long save_flags; 3381 unsigned long save_flags;
3393 void *objp; 3382 void *objp;
3394 3383
3395 flags &= slab_gfp_mask; 3384 flags &= gfp_allowed_mask;
3396 3385
3397 lockdep_trace_alloc(flags); 3386 lockdep_trace_alloc(flags);
3398 3387
diff --git a/mm/slub.c b/mm/slub.c
index 4c6449310a0e..ce62b770e2fc 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -179,12 +179,6 @@ static enum {
179 SYSFS /* Sysfs up */ 179 SYSFS /* Sysfs up */
180} slab_state = DOWN; 180} slab_state = DOWN;
181 181
182/*
183 * The slab allocator is initialized with interrupts disabled. Therefore, make
184 * sure early boot allocations don't accidentally enable interrupts.
185 */
186static gfp_t slab_gfp_mask __read_mostly = SLAB_GFP_BOOT_MASK;
187
188/* A list of all slab caches on the system */ 182/* A list of all slab caches on the system */
189static DECLARE_RWSEM(slub_lock); 183static DECLARE_RWSEM(slub_lock);
190static LIST_HEAD(slab_caches); 184static LIST_HEAD(slab_caches);
@@ -1692,7 +1686,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
1692 unsigned long flags; 1686 unsigned long flags;
1693 unsigned int objsize; 1687 unsigned int objsize;
1694 1688
1695 gfpflags &= slab_gfp_mask; 1689 gfpflags &= gfp_allowed_mask;
1696 1690
1697 lockdep_trace_alloc(gfpflags); 1691 lockdep_trace_alloc(gfpflags);
1698 might_sleep_if(gfpflags & __GFP_WAIT); 1692 might_sleep_if(gfpflags & __GFP_WAIT);
@@ -3220,10 +3214,6 @@ void __init kmem_cache_init(void)
3220 3214
3221void __init kmem_cache_init_late(void) 3215void __init kmem_cache_init_late(void)
3222{ 3216{
3223 /*
3224 * Interrupts are enabled now so all GFP allocations are safe.
3225 */
3226 slab_gfp_mask = __GFP_BITS_MASK;
3227} 3217}
3228 3218
3229/* 3219/*
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 28faa01cf578..d1ade1a48ee7 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -583,8 +583,9 @@ static int swap_entry_free(struct swap_info_struct *p,
583 swap_list.next = p - swap_info; 583 swap_list.next = p - swap_info;
584 nr_swap_pages++; 584 nr_swap_pages++;
585 p->inuse_pages--; 585 p->inuse_pages--;
586 mem_cgroup_uncharge_swap(ent);
587 } 586 }
587 if (!swap_count(count))
588 mem_cgroup_uncharge_swap(ent);
588 return count; 589 return count;
589} 590}
590 591
@@ -609,12 +610,19 @@ void swap_free(swp_entry_t entry)
609void swapcache_free(swp_entry_t entry, struct page *page) 610void swapcache_free(swp_entry_t entry, struct page *page)
610{ 611{
611 struct swap_info_struct *p; 612 struct swap_info_struct *p;
613 int ret;
612 614
613 if (page)
614 mem_cgroup_uncharge_swapcache(page, entry);
615 p = swap_info_get(entry); 615 p = swap_info_get(entry);
616 if (p) { 616 if (p) {
617 swap_entry_free(p, entry, SWAP_CACHE); 617 ret = swap_entry_free(p, entry, SWAP_CACHE);
618 if (page) {
619 bool swapout;
620 if (ret)
621 swapout = true; /* the end of swap out */
622 else
623 swapout = false; /* no more swap users! */
624 mem_cgroup_uncharge_swapcache(page, entry, swapout);
625 }
618 spin_unlock(&swap_lock); 626 spin_unlock(&swap_lock);
619 } 627 }
620 return; 628 return;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4139aa52b941..e8fa2d9eb212 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -837,7 +837,6 @@ int __isolate_lru_page(struct page *page, int mode, int file)
837 */ 837 */
838 ClearPageLRU(page); 838 ClearPageLRU(page);
839 ret = 0; 839 ret = 0;
840 mem_cgroup_del_lru(page);
841 } 840 }
842 841
843 return ret; 842 return ret;
@@ -885,12 +884,14 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
885 switch (__isolate_lru_page(page, mode, file)) { 884 switch (__isolate_lru_page(page, mode, file)) {
886 case 0: 885 case 0:
887 list_move(&page->lru, dst); 886 list_move(&page->lru, dst);
887 mem_cgroup_del_lru(page);
888 nr_taken++; 888 nr_taken++;
889 break; 889 break;
890 890
891 case -EBUSY: 891 case -EBUSY:
892 /* else it is being freed elsewhere */ 892 /* else it is being freed elsewhere */
893 list_move(&page->lru, src); 893 list_move(&page->lru, src);
894 mem_cgroup_rotate_lru_list(page, page_lru(page));
894 continue; 895 continue;
895 896
896 default: 897 default:
@@ -931,6 +932,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
931 continue; 932 continue;
932 if (__isolate_lru_page(cursor_page, mode, file) == 0) { 933 if (__isolate_lru_page(cursor_page, mode, file) == 0) {
933 list_move(&cursor_page->lru, dst); 934 list_move(&cursor_page->lru, dst);
935 mem_cgroup_del_lru(page);
934 nr_taken++; 936 nr_taken++;
935 scan++; 937 scan++;
936 } 938 }
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c
index fd8e0847b254..80caad1a31a5 100644
--- a/net/appletalk/atalk_proc.c
+++ b/net/appletalk/atalk_proc.c
@@ -204,8 +204,8 @@ static int atalk_seq_socket_show(struct seq_file *seq, void *v)
204 "%02X %d\n", 204 "%02X %d\n",
205 s->sk_type, ntohs(at->src_net), at->src_node, at->src_port, 205 s->sk_type, ntohs(at->src_net), at->src_node, at->src_port,
206 ntohs(at->dest_net), at->dest_node, at->dest_port, 206 ntohs(at->dest_net), at->dest_node, at->dest_port,
207 atomic_read(&s->sk_wmem_alloc), 207 sk_wmem_alloc_get(s),
208 atomic_read(&s->sk_rmem_alloc), 208 sk_rmem_alloc_get(s),
209 s->sk_state, SOCK_INODE(s->sk_socket)->i_uid); 209 s->sk_state, SOCK_INODE(s->sk_socket)->i_uid);
210out: 210out:
211 return 0; 211 return 0;
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index b603cbacdc58..590b83963622 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -162,8 +162,7 @@ static void atalk_destroy_timer(unsigned long data)
162{ 162{
163 struct sock *sk = (struct sock *)data; 163 struct sock *sk = (struct sock *)data;
164 164
165 if (atomic_read(&sk->sk_wmem_alloc) || 165 if (sk_has_allocations(sk)) {
166 atomic_read(&sk->sk_rmem_alloc)) {
167 sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; 166 sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME;
168 add_timer(&sk->sk_timer); 167 add_timer(&sk->sk_timer);
169 } else 168 } else
@@ -175,8 +174,7 @@ static inline void atalk_destroy_socket(struct sock *sk)
175 atalk_remove_socket(sk); 174 atalk_remove_socket(sk);
176 skb_queue_purge(&sk->sk_receive_queue); 175 skb_queue_purge(&sk->sk_receive_queue);
177 176
178 if (atomic_read(&sk->sk_wmem_alloc) || 177 if (sk_has_allocations(sk)) {
179 atomic_read(&sk->sk_rmem_alloc)) {
180 setup_timer(&sk->sk_timer, atalk_destroy_timer, 178 setup_timer(&sk->sk_timer, atalk_destroy_timer,
181 (unsigned long)sk); 179 (unsigned long)sk);
182 sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; 180 sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME;
@@ -1750,8 +1748,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1750 switch (cmd) { 1748 switch (cmd) {
1751 /* Protocol layer */ 1749 /* Protocol layer */
1752 case TIOCOUTQ: { 1750 case TIOCOUTQ: {
1753 long amount = sk->sk_sndbuf - 1751 long amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1754 atomic_read(&sk->sk_wmem_alloc);
1755 1752
1756 if (amount < 0) 1753 if (amount < 0)
1757 amount = 0; 1754 amount = 0;
diff --git a/net/atm/common.c b/net/atm/common.c
index d34edbe754c8..c1c97936192c 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -62,15 +62,15 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size)
62 struct sk_buff *skb; 62 struct sk_buff *skb;
63 struct sock *sk = sk_atm(vcc); 63 struct sock *sk = sk_atm(vcc);
64 64
65 if (atomic_read(&sk->sk_wmem_alloc) && !atm_may_send(vcc, size)) { 65 if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
66 pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", 66 pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
67 atomic_read(&sk->sk_wmem_alloc), size, 67 sk_wmem_alloc_get(sk), size,
68 sk->sk_sndbuf); 68 sk->sk_sndbuf);
69 return NULL; 69 return NULL;
70 } 70 }
71 while (!(skb = alloc_skb(size,GFP_KERNEL))) schedule(); 71 while (!(skb = alloc_skb(size, GFP_KERNEL)))
72 pr_debug("AlTx %d += %d\n", atomic_read(&sk->sk_wmem_alloc), 72 schedule();
73 skb->truesize); 73 pr_debug("AlTx %d += %d\n", sk_wmem_alloc_get(sk), skb->truesize);
74 atomic_add(skb->truesize, &sk->sk_wmem_alloc); 74 atomic_add(skb->truesize, &sk->sk_wmem_alloc);
75 return skb; 75 return skb;
76} 76}
@@ -145,7 +145,7 @@ int vcc_create(struct net *net, struct socket *sock, int protocol, int family)
145 memset(&vcc->local,0,sizeof(struct sockaddr_atmsvc)); 145 memset(&vcc->local,0,sizeof(struct sockaddr_atmsvc));
146 memset(&vcc->remote,0,sizeof(struct sockaddr_atmsvc)); 146 memset(&vcc->remote,0,sizeof(struct sockaddr_atmsvc));
147 vcc->qos.txtp.max_sdu = 1 << 16; /* for meta VCs */ 147 vcc->qos.txtp.max_sdu = 1 << 16; /* for meta VCs */
148 atomic_set(&sk->sk_wmem_alloc, 0); 148 atomic_set(&sk->sk_wmem_alloc, 1);
149 atomic_set(&sk->sk_rmem_alloc, 0); 149 atomic_set(&sk->sk_rmem_alloc, 0);
150 vcc->push = NULL; 150 vcc->push = NULL;
151 vcc->pop = NULL; 151 vcc->pop = NULL;
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c
index 76ed3c8d26e6..4da8892ced5f 100644
--- a/net/atm/ioctl.c
+++ b/net/atm/ioctl.c
@@ -63,8 +63,7 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
63 error = -EINVAL; 63 error = -EINVAL;
64 goto done; 64 goto done;
65 } 65 }
66 error = put_user(sk->sk_sndbuf - 66 error = put_user(sk->sk_sndbuf - sk_wmem_alloc_get(sk),
67 atomic_read(&sk->sk_wmem_alloc),
68 (int __user *) argp) ? -EFAULT : 0; 67 (int __user *) argp) ? -EFAULT : 0;
69 goto done; 68 goto done;
70 case SIOCINQ: 69 case SIOCINQ:
diff --git a/net/atm/proc.c b/net/atm/proc.c
index e7b3b273907d..38de5ff61ecd 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -204,8 +204,8 @@ static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc)
204 seq_printf(seq, "%3d", sk->sk_family); 204 seq_printf(seq, "%3d", sk->sk_family);
205 } 205 }
206 seq_printf(seq, " %04lx %5d %7d/%7d %7d/%7d [%d]\n", vcc->flags, sk->sk_err, 206 seq_printf(seq, " %04lx %5d %7d/%7d %7d/%7d [%d]\n", vcc->flags, sk->sk_err,
207 atomic_read(&sk->sk_wmem_alloc), sk->sk_sndbuf, 207 sk_wmem_alloc_get(sk), sk->sk_sndbuf,
208 atomic_read(&sk->sk_rmem_alloc), sk->sk_rcvbuf, 208 sk_rmem_alloc_get(sk), sk->sk_rcvbuf,
209 atomic_read(&sk->sk_refcnt)); 209 atomic_read(&sk->sk_refcnt));
210} 210}
211 211
diff --git a/net/atm/raw.c b/net/atm/raw.c
index b0a2d8cb6744..cbfcc71a17b1 100644
--- a/net/atm/raw.c
+++ b/net/atm/raw.c
@@ -33,7 +33,7 @@ static void atm_pop_raw(struct atm_vcc *vcc,struct sk_buff *skb)
33 struct sock *sk = sk_atm(vcc); 33 struct sock *sk = sk_atm(vcc);
34 34
35 pr_debug("APopR (%d) %d -= %d\n", vcc->vci, 35 pr_debug("APopR (%d) %d -= %d\n", vcc->vci,
36 atomic_read(&sk->sk_wmem_alloc), skb->truesize); 36 sk_wmem_alloc_get(sk), skb->truesize);
37 atomic_sub(skb->truesize, &sk->sk_wmem_alloc); 37 atomic_sub(skb->truesize, &sk->sk_wmem_alloc);
38 dev_kfree_skb_any(skb); 38 dev_kfree_skb_any(skb);
39 sk->sk_write_space(sk); 39 sk->sk_write_space(sk);
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index fd9d06f291dc..da0f64f82b57 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -330,8 +330,7 @@ void ax25_destroy_socket(ax25_cb *ax25)
330 } 330 }
331 331
332 if (ax25->sk != NULL) { 332 if (ax25->sk != NULL) {
333 if (atomic_read(&ax25->sk->sk_wmem_alloc) || 333 if (sk_has_allocations(ax25->sk)) {
334 atomic_read(&ax25->sk->sk_rmem_alloc)) {
335 /* Defer: outstanding buffers */ 334 /* Defer: outstanding buffers */
336 setup_timer(&ax25->dtimer, ax25_destroy_timer, 335 setup_timer(&ax25->dtimer, ax25_destroy_timer,
337 (unsigned long)ax25); 336 (unsigned long)ax25);
@@ -1691,7 +1690,8 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1691 switch (cmd) { 1690 switch (cmd) {
1692 case TIOCOUTQ: { 1691 case TIOCOUTQ: {
1693 long amount; 1692 long amount;
1694 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1693
1694 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1695 if (amount < 0) 1695 if (amount < 0)
1696 amount = 0; 1696 amount = 0;
1697 res = put_user(amount, (int __user *)argp); 1697 res = put_user(amount, (int __user *)argp);
@@ -1781,8 +1781,8 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1781 ax25_info.idletimer = ax25_display_timer(&ax25->idletimer) / (60 * HZ); 1781 ax25_info.idletimer = ax25_display_timer(&ax25->idletimer) / (60 * HZ);
1782 ax25_info.n2count = ax25->n2count; 1782 ax25_info.n2count = ax25->n2count;
1783 ax25_info.state = ax25->state; 1783 ax25_info.state = ax25->state;
1784 ax25_info.rcv_q = atomic_read(&sk->sk_rmem_alloc); 1784 ax25_info.rcv_q = sk_wmem_alloc_get(sk);
1785 ax25_info.snd_q = atomic_read(&sk->sk_wmem_alloc); 1785 ax25_info.snd_q = sk_rmem_alloc_get(sk);
1786 ax25_info.vs = ax25->vs; 1786 ax25_info.vs = ax25->vs;
1787 ax25_info.vr = ax25->vr; 1787 ax25_info.vr = ax25->vr;
1788 ax25_info.va = ax25->va; 1788 ax25_info.va = ax25->va;
@@ -1922,8 +1922,8 @@ static int ax25_info_show(struct seq_file *seq, void *v)
1922 1922
1923 if (ax25->sk != NULL) { 1923 if (ax25->sk != NULL) {
1924 seq_printf(seq, " %d %d %lu\n", 1924 seq_printf(seq, " %d %d %lu\n",
1925 atomic_read(&ax25->sk->sk_wmem_alloc), 1925 sk_wmem_alloc_get(ax25->sk),
1926 atomic_read(&ax25->sk->sk_rmem_alloc), 1926 sk_rmem_alloc_get(ax25->sk),
1927 sock_i_ino(ax25->sk)); 1927 sock_i_ino(ax25->sk));
1928 } else { 1928 } else {
1929 seq_puts(seq, " * * *\n"); 1929 seq_puts(seq, " * * *\n");
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 02b9baa1930b..0250e0600150 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -337,7 +337,7 @@ int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
337 if (sk->sk_state == BT_LISTEN) 337 if (sk->sk_state == BT_LISTEN)
338 return -EINVAL; 338 return -EINVAL;
339 339
340 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 340 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
341 if (amount < 0) 341 if (amount < 0)
342 amount = 0; 342 amount = 0;
343 err = put_user(amount, (int __user *) arg); 343 err = put_user(amount, (int __user *) arg);
diff --git a/net/core/dev.c b/net/core/dev.c
index 576a61574a93..baf2dc13a34a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3461,10 +3461,10 @@ void __dev_set_rx_mode(struct net_device *dev)
3461 /* Unicast addresses changes may only happen under the rtnl, 3461 /* Unicast addresses changes may only happen under the rtnl,
3462 * therefore calling __dev_set_promiscuity here is safe. 3462 * therefore calling __dev_set_promiscuity here is safe.
3463 */ 3463 */
3464 if (dev->uc_count > 0 && !dev->uc_promisc) { 3464 if (dev->uc.count > 0 && !dev->uc_promisc) {
3465 __dev_set_promiscuity(dev, 1); 3465 __dev_set_promiscuity(dev, 1);
3466 dev->uc_promisc = 1; 3466 dev->uc_promisc = 1;
3467 } else if (dev->uc_count == 0 && dev->uc_promisc) { 3467 } else if (dev->uc.count == 0 && dev->uc_promisc) {
3468 __dev_set_promiscuity(dev, -1); 3468 __dev_set_promiscuity(dev, -1);
3469 dev->uc_promisc = 0; 3469 dev->uc_promisc = 0;
3470 } 3470 }
@@ -3483,9 +3483,8 @@ void dev_set_rx_mode(struct net_device *dev)
3483 3483
3484/* hw addresses list handling functions */ 3484/* hw addresses list handling functions */
3485 3485
3486static int __hw_addr_add(struct list_head *list, int *delta, 3486static int __hw_addr_add(struct netdev_hw_addr_list *list, unsigned char *addr,
3487 unsigned char *addr, int addr_len, 3487 int addr_len, unsigned char addr_type)
3488 unsigned char addr_type)
3489{ 3488{
3490 struct netdev_hw_addr *ha; 3489 struct netdev_hw_addr *ha;
3491 int alloc_size; 3490 int alloc_size;
@@ -3493,7 +3492,7 @@ static int __hw_addr_add(struct list_head *list, int *delta,
3493 if (addr_len > MAX_ADDR_LEN) 3492 if (addr_len > MAX_ADDR_LEN)
3494 return -EINVAL; 3493 return -EINVAL;
3495 3494
3496 list_for_each_entry(ha, list, list) { 3495 list_for_each_entry(ha, &list->list, list) {
3497 if (!memcmp(ha->addr, addr, addr_len) && 3496 if (!memcmp(ha->addr, addr, addr_len) &&
3498 ha->type == addr_type) { 3497 ha->type == addr_type) {
3499 ha->refcount++; 3498 ha->refcount++;
@@ -3512,9 +3511,8 @@ static int __hw_addr_add(struct list_head *list, int *delta,
3512 ha->type = addr_type; 3511 ha->type = addr_type;
3513 ha->refcount = 1; 3512 ha->refcount = 1;
3514 ha->synced = false; 3513 ha->synced = false;
3515 list_add_tail_rcu(&ha->list, list); 3514 list_add_tail_rcu(&ha->list, &list->list);
3516 if (delta) 3515 list->count++;
3517 (*delta)++;
3518 return 0; 3516 return 0;
3519} 3517}
3520 3518
@@ -3526,120 +3524,121 @@ static void ha_rcu_free(struct rcu_head *head)
3526 kfree(ha); 3524 kfree(ha);
3527} 3525}
3528 3526
3529static int __hw_addr_del(struct list_head *list, int *delta, 3527static int __hw_addr_del(struct netdev_hw_addr_list *list, unsigned char *addr,
3530 unsigned char *addr, int addr_len, 3528 int addr_len, unsigned char addr_type)
3531 unsigned char addr_type)
3532{ 3529{
3533 struct netdev_hw_addr *ha; 3530 struct netdev_hw_addr *ha;
3534 3531
3535 list_for_each_entry(ha, list, list) { 3532 list_for_each_entry(ha, &list->list, list) {
3536 if (!memcmp(ha->addr, addr, addr_len) && 3533 if (!memcmp(ha->addr, addr, addr_len) &&
3537 (ha->type == addr_type || !addr_type)) { 3534 (ha->type == addr_type || !addr_type)) {
3538 if (--ha->refcount) 3535 if (--ha->refcount)
3539 return 0; 3536 return 0;
3540 list_del_rcu(&ha->list); 3537 list_del_rcu(&ha->list);
3541 call_rcu(&ha->rcu_head, ha_rcu_free); 3538 call_rcu(&ha->rcu_head, ha_rcu_free);
3542 if (delta) 3539 list->count--;
3543 (*delta)--;
3544 return 0; 3540 return 0;
3545 } 3541 }
3546 } 3542 }
3547 return -ENOENT; 3543 return -ENOENT;
3548} 3544}
3549 3545
3550static int __hw_addr_add_multiple(struct list_head *to_list, int *to_delta, 3546static int __hw_addr_add_multiple(struct netdev_hw_addr_list *to_list,
3551 struct list_head *from_list, int addr_len, 3547 struct netdev_hw_addr_list *from_list,
3548 int addr_len,
3552 unsigned char addr_type) 3549 unsigned char addr_type)
3553{ 3550{
3554 int err; 3551 int err;
3555 struct netdev_hw_addr *ha, *ha2; 3552 struct netdev_hw_addr *ha, *ha2;
3556 unsigned char type; 3553 unsigned char type;
3557 3554
3558 list_for_each_entry(ha, from_list, list) { 3555 list_for_each_entry(ha, &from_list->list, list) {
3559 type = addr_type ? addr_type : ha->type; 3556 type = addr_type ? addr_type : ha->type;
3560 err = __hw_addr_add(to_list, to_delta, ha->addr, 3557 err = __hw_addr_add(to_list, ha->addr, addr_len, type);
3561 addr_len, type);
3562 if (err) 3558 if (err)
3563 goto unroll; 3559 goto unroll;
3564 } 3560 }
3565 return 0; 3561 return 0;
3566 3562
3567unroll: 3563unroll:
3568 list_for_each_entry(ha2, from_list, list) { 3564 list_for_each_entry(ha2, &from_list->list, list) {
3569 if (ha2 == ha) 3565 if (ha2 == ha)
3570 break; 3566 break;
3571 type = addr_type ? addr_type : ha2->type; 3567 type = addr_type ? addr_type : ha2->type;
3572 __hw_addr_del(to_list, to_delta, ha2->addr, 3568 __hw_addr_del(to_list, ha2->addr, addr_len, type);
3573 addr_len, type);
3574 } 3569 }
3575 return err; 3570 return err;
3576} 3571}
3577 3572
3578static void __hw_addr_del_multiple(struct list_head *to_list, int *to_delta, 3573static void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list,
3579 struct list_head *from_list, int addr_len, 3574 struct netdev_hw_addr_list *from_list,
3575 int addr_len,
3580 unsigned char addr_type) 3576 unsigned char addr_type)
3581{ 3577{
3582 struct netdev_hw_addr *ha; 3578 struct netdev_hw_addr *ha;
3583 unsigned char type; 3579 unsigned char type;
3584 3580
3585 list_for_each_entry(ha, from_list, list) { 3581 list_for_each_entry(ha, &from_list->list, list) {
3586 type = addr_type ? addr_type : ha->type; 3582 type = addr_type ? addr_type : ha->type;
3587 __hw_addr_del(to_list, to_delta, ha->addr, 3583 __hw_addr_del(to_list, ha->addr, addr_len, addr_type);
3588 addr_len, addr_type);
3589 } 3584 }
3590} 3585}
3591 3586
3592static int __hw_addr_sync(struct list_head *to_list, int *to_delta, 3587static int __hw_addr_sync(struct netdev_hw_addr_list *to_list,
3593 struct list_head *from_list, int *from_delta, 3588 struct netdev_hw_addr_list *from_list,
3594 int addr_len) 3589 int addr_len)
3595{ 3590{
3596 int err = 0; 3591 int err = 0;
3597 struct netdev_hw_addr *ha, *tmp; 3592 struct netdev_hw_addr *ha, *tmp;
3598 3593
3599 list_for_each_entry_safe(ha, tmp, from_list, list) { 3594 list_for_each_entry_safe(ha, tmp, &from_list->list, list) {
3600 if (!ha->synced) { 3595 if (!ha->synced) {
3601 err = __hw_addr_add(to_list, to_delta, ha->addr, 3596 err = __hw_addr_add(to_list, ha->addr,
3602 addr_len, ha->type); 3597 addr_len, ha->type);
3603 if (err) 3598 if (err)
3604 break; 3599 break;
3605 ha->synced = true; 3600 ha->synced = true;
3606 ha->refcount++; 3601 ha->refcount++;
3607 } else if (ha->refcount == 1) { 3602 } else if (ha->refcount == 1) {
3608 __hw_addr_del(to_list, to_delta, ha->addr, 3603 __hw_addr_del(to_list, ha->addr, addr_len, ha->type);
3609 addr_len, ha->type); 3604 __hw_addr_del(from_list, ha->addr, addr_len, ha->type);
3610 __hw_addr_del(from_list, from_delta, ha->addr,
3611 addr_len, ha->type);
3612 } 3605 }
3613 } 3606 }
3614 return err; 3607 return err;
3615} 3608}
3616 3609
3617static void __hw_addr_unsync(struct list_head *to_list, int *to_delta, 3610static void __hw_addr_unsync(struct netdev_hw_addr_list *to_list,
3618 struct list_head *from_list, int *from_delta, 3611 struct netdev_hw_addr_list *from_list,
3619 int addr_len) 3612 int addr_len)
3620{ 3613{
3621 struct netdev_hw_addr *ha, *tmp; 3614 struct netdev_hw_addr *ha, *tmp;
3622 3615
3623 list_for_each_entry_safe(ha, tmp, from_list, list) { 3616 list_for_each_entry_safe(ha, tmp, &from_list->list, list) {
3624 if (ha->synced) { 3617 if (ha->synced) {
3625 __hw_addr_del(to_list, to_delta, ha->addr, 3618 __hw_addr_del(to_list, ha->addr,
3626 addr_len, ha->type); 3619 addr_len, ha->type);
3627 ha->synced = false; 3620 ha->synced = false;
3628 __hw_addr_del(from_list, from_delta, ha->addr, 3621 __hw_addr_del(from_list, ha->addr,
3629 addr_len, ha->type); 3622 addr_len, ha->type);
3630 } 3623 }
3631 } 3624 }
3632} 3625}
3633 3626
3634 3627static void __hw_addr_flush(struct netdev_hw_addr_list *list)
3635static void __hw_addr_flush(struct list_head *list)
3636{ 3628{
3637 struct netdev_hw_addr *ha, *tmp; 3629 struct netdev_hw_addr *ha, *tmp;
3638 3630
3639 list_for_each_entry_safe(ha, tmp, list, list) { 3631 list_for_each_entry_safe(ha, tmp, &list->list, list) {
3640 list_del_rcu(&ha->list); 3632 list_del_rcu(&ha->list);
3641 call_rcu(&ha->rcu_head, ha_rcu_free); 3633 call_rcu(&ha->rcu_head, ha_rcu_free);
3642 } 3634 }
3635 list->count = 0;
3636}
3637
3638static void __hw_addr_init(struct netdev_hw_addr_list *list)
3639{
3640 INIT_LIST_HEAD(&list->list);
3641 list->count = 0;
3643} 3642}
3644 3643
3645/* Device addresses handling functions */ 3644/* Device addresses handling functions */
@@ -3648,7 +3647,7 @@ static void dev_addr_flush(struct net_device *dev)
3648{ 3647{
3649 /* rtnl_mutex must be held here */ 3648 /* rtnl_mutex must be held here */
3650 3649
3651 __hw_addr_flush(&dev->dev_addr_list); 3650 __hw_addr_flush(&dev->dev_addrs);
3652 dev->dev_addr = NULL; 3651 dev->dev_addr = NULL;
3653} 3652}
3654 3653
@@ -3660,16 +3659,16 @@ static int dev_addr_init(struct net_device *dev)
3660 3659
3661 /* rtnl_mutex must be held here */ 3660 /* rtnl_mutex must be held here */
3662 3661
3663 INIT_LIST_HEAD(&dev->dev_addr_list); 3662 __hw_addr_init(&dev->dev_addrs);
3664 memset(addr, 0, sizeof(addr)); 3663 memset(addr, 0, sizeof(addr));
3665 err = __hw_addr_add(&dev->dev_addr_list, NULL, addr, sizeof(addr), 3664 err = __hw_addr_add(&dev->dev_addrs, addr, sizeof(addr),
3666 NETDEV_HW_ADDR_T_LAN); 3665 NETDEV_HW_ADDR_T_LAN);
3667 if (!err) { 3666 if (!err) {
3668 /* 3667 /*
3669 * Get the first (previously created) address from the list 3668 * Get the first (previously created) address from the list
3670 * and set dev_addr pointer to this location. 3669 * and set dev_addr pointer to this location.
3671 */ 3670 */
3672 ha = list_first_entry(&dev->dev_addr_list, 3671 ha = list_first_entry(&dev->dev_addrs.list,
3673 struct netdev_hw_addr, list); 3672 struct netdev_hw_addr, list);
3674 dev->dev_addr = ha->addr; 3673 dev->dev_addr = ha->addr;
3675 } 3674 }
@@ -3694,8 +3693,7 @@ int dev_addr_add(struct net_device *dev, unsigned char *addr,
3694 3693
3695 ASSERT_RTNL(); 3694 ASSERT_RTNL();
3696 3695
3697 err = __hw_addr_add(&dev->dev_addr_list, NULL, addr, dev->addr_len, 3696 err = __hw_addr_add(&dev->dev_addrs, addr, dev->addr_len, addr_type);
3698 addr_type);
3699 if (!err) 3697 if (!err)
3700 call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); 3698 call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
3701 return err; 3699 return err;
@@ -3725,11 +3723,12 @@ int dev_addr_del(struct net_device *dev, unsigned char *addr,
3725 * We can not remove the first address from the list because 3723 * We can not remove the first address from the list because
3726 * dev->dev_addr points to that. 3724 * dev->dev_addr points to that.
3727 */ 3725 */
3728 ha = list_first_entry(&dev->dev_addr_list, struct netdev_hw_addr, list); 3726 ha = list_first_entry(&dev->dev_addrs.list,
3727 struct netdev_hw_addr, list);
3729 if (ha->addr == dev->dev_addr && ha->refcount == 1) 3728 if (ha->addr == dev->dev_addr && ha->refcount == 1)
3730 return -ENOENT; 3729 return -ENOENT;
3731 3730
3732 err = __hw_addr_del(&dev->dev_addr_list, NULL, addr, dev->addr_len, 3731 err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len,
3733 addr_type); 3732 addr_type);
3734 if (!err) 3733 if (!err)
3735 call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); 3734 call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
@@ -3757,8 +3756,7 @@ int dev_addr_add_multiple(struct net_device *to_dev,
3757 3756
3758 if (from_dev->addr_len != to_dev->addr_len) 3757 if (from_dev->addr_len != to_dev->addr_len)
3759 return -EINVAL; 3758 return -EINVAL;
3760 err = __hw_addr_add_multiple(&to_dev->dev_addr_list, NULL, 3759 err = __hw_addr_add_multiple(&to_dev->dev_addrs, &from_dev->dev_addrs,
3761 &from_dev->dev_addr_list,
3762 to_dev->addr_len, addr_type); 3760 to_dev->addr_len, addr_type);
3763 if (!err) 3761 if (!err)
3764 call_netdevice_notifiers(NETDEV_CHANGEADDR, to_dev); 3762 call_netdevice_notifiers(NETDEV_CHANGEADDR, to_dev);
@@ -3784,15 +3782,14 @@ int dev_addr_del_multiple(struct net_device *to_dev,
3784 3782
3785 if (from_dev->addr_len != to_dev->addr_len) 3783 if (from_dev->addr_len != to_dev->addr_len)
3786 return -EINVAL; 3784 return -EINVAL;
3787 __hw_addr_del_multiple(&to_dev->dev_addr_list, NULL, 3785 __hw_addr_del_multiple(&to_dev->dev_addrs, &from_dev->dev_addrs,
3788 &from_dev->dev_addr_list,
3789 to_dev->addr_len, addr_type); 3786 to_dev->addr_len, addr_type);
3790 call_netdevice_notifiers(NETDEV_CHANGEADDR, to_dev); 3787 call_netdevice_notifiers(NETDEV_CHANGEADDR, to_dev);
3791 return 0; 3788 return 0;
3792} 3789}
3793EXPORT_SYMBOL(dev_addr_del_multiple); 3790EXPORT_SYMBOL(dev_addr_del_multiple);
3794 3791
3795/* unicast and multicast addresses handling functions */ 3792/* multicast addresses handling functions */
3796 3793
3797int __dev_addr_delete(struct dev_addr_list **list, int *count, 3794int __dev_addr_delete(struct dev_addr_list **list, int *count,
3798 void *addr, int alen, int glbl) 3795 void *addr, int alen, int glbl)
@@ -3868,8 +3865,8 @@ int dev_unicast_delete(struct net_device *dev, void *addr)
3868 3865
3869 ASSERT_RTNL(); 3866 ASSERT_RTNL();
3870 3867
3871 err = __hw_addr_del(&dev->uc_list, &dev->uc_count, addr, 3868 err = __hw_addr_del(&dev->uc, addr, dev->addr_len,
3872 dev->addr_len, NETDEV_HW_ADDR_T_UNICAST); 3869 NETDEV_HW_ADDR_T_UNICAST);
3873 if (!err) 3870 if (!err)
3874 __dev_set_rx_mode(dev); 3871 __dev_set_rx_mode(dev);
3875 return err; 3872 return err;
@@ -3892,8 +3889,8 @@ int dev_unicast_add(struct net_device *dev, void *addr)
3892 3889
3893 ASSERT_RTNL(); 3890 ASSERT_RTNL();
3894 3891
3895 err = __hw_addr_add(&dev->uc_list, &dev->uc_count, addr, 3892 err = __hw_addr_add(&dev->uc, addr, dev->addr_len,
3896 dev->addr_len, NETDEV_HW_ADDR_T_UNICAST); 3893 NETDEV_HW_ADDR_T_UNICAST);
3897 if (!err) 3894 if (!err)
3898 __dev_set_rx_mode(dev); 3895 __dev_set_rx_mode(dev);
3899 return err; 3896 return err;
@@ -3966,8 +3963,7 @@ int dev_unicast_sync(struct net_device *to, struct net_device *from)
3966 if (to->addr_len != from->addr_len) 3963 if (to->addr_len != from->addr_len)
3967 return -EINVAL; 3964 return -EINVAL;
3968 3965
3969 err = __hw_addr_sync(&to->uc_list, &to->uc_count, 3966 err = __hw_addr_sync(&to->uc, &from->uc, to->addr_len);
3970 &from->uc_list, &from->uc_count, to->addr_len);
3971 if (!err) 3967 if (!err)
3972 __dev_set_rx_mode(to); 3968 __dev_set_rx_mode(to);
3973 return err; 3969 return err;
@@ -3990,8 +3986,7 @@ void dev_unicast_unsync(struct net_device *to, struct net_device *from)
3990 if (to->addr_len != from->addr_len) 3986 if (to->addr_len != from->addr_len)
3991 return; 3987 return;
3992 3988
3993 __hw_addr_unsync(&to->uc_list, &to->uc_count, 3989 __hw_addr_unsync(&to->uc, &from->uc, to->addr_len);
3994 &from->uc_list, &from->uc_count, to->addr_len);
3995 __dev_set_rx_mode(to); 3990 __dev_set_rx_mode(to);
3996} 3991}
3997EXPORT_SYMBOL(dev_unicast_unsync); 3992EXPORT_SYMBOL(dev_unicast_unsync);
@@ -4000,15 +3995,14 @@ static void dev_unicast_flush(struct net_device *dev)
4000{ 3995{
4001 /* rtnl_mutex must be held here */ 3996 /* rtnl_mutex must be held here */
4002 3997
4003 __hw_addr_flush(&dev->uc_list); 3998 __hw_addr_flush(&dev->uc);
4004 dev->uc_count = 0;
4005} 3999}
4006 4000
4007static void dev_unicast_init(struct net_device *dev) 4001static void dev_unicast_init(struct net_device *dev)
4008{ 4002{
4009 /* rtnl_mutex must be held here */ 4003 /* rtnl_mutex must be held here */
4010 4004
4011 INIT_LIST_HEAD(&dev->uc_list); 4005 __hw_addr_init(&dev->uc);
4012} 4006}
4013 4007
4014 4008
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 5c93435b0347..9e0597d189b0 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -204,6 +204,10 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
204 skb->end = skb->tail + size; 204 skb->end = skb->tail + size;
205 kmemcheck_annotate_bitfield(skb, flags1); 205 kmemcheck_annotate_bitfield(skb, flags1);
206 kmemcheck_annotate_bitfield(skb, flags2); 206 kmemcheck_annotate_bitfield(skb, flags2);
207#ifdef NET_SKBUFF_DATA_USES_OFFSET
208 skb->mac_header = ~0U;
209#endif
210
207 /* make sure we initialize shinfo sequentially */ 211 /* make sure we initialize shinfo sequentially */
208 shinfo = skb_shinfo(skb); 212 shinfo = skb_shinfo(skb);
209 atomic_set(&shinfo->dataref, 1); 213 atomic_set(&shinfo->dataref, 1);
@@ -665,7 +669,8 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
665 /* {transport,network,mac}_header are relative to skb->head */ 669 /* {transport,network,mac}_header are relative to skb->head */
666 new->transport_header += offset; 670 new->transport_header += offset;
667 new->network_header += offset; 671 new->network_header += offset;
668 new->mac_header += offset; 672 if (skb_mac_header_was_set(new))
673 new->mac_header += offset;
669#endif 674#endif
670 skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size; 675 skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size;
671 skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; 676 skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
@@ -847,7 +852,8 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
847 skb->tail += off; 852 skb->tail += off;
848 skb->transport_header += off; 853 skb->transport_header += off;
849 skb->network_header += off; 854 skb->network_header += off;
850 skb->mac_header += off; 855 if (skb_mac_header_was_set(skb))
856 skb->mac_header += off;
851 skb->csum_start += nhead; 857 skb->csum_start += nhead;
852 skb->cloned = 0; 858 skb->cloned = 0;
853 skb->hdr_len = 0; 859 skb->hdr_len = 0;
@@ -939,7 +945,8 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
939#ifdef NET_SKBUFF_DATA_USES_OFFSET 945#ifdef NET_SKBUFF_DATA_USES_OFFSET
940 n->transport_header += off; 946 n->transport_header += off;
941 n->network_header += off; 947 n->network_header += off;
942 n->mac_header += off; 948 if (skb_mac_header_was_set(skb))
949 n->mac_header += off;
943#endif 950#endif
944 951
945 return n; 952 return n;
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index a5e3a593e472..d351b8db0df5 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1240,7 +1240,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1240 return val; 1240 return val;
1241 1241
1242 case TIOCOUTQ: 1242 case TIOCOUTQ:
1243 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1243 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1244 if (amount < 0) 1244 if (amount < 0)
1245 amount = 0; 1245 amount = 0;
1246 err = put_user(amount, (int __user *)arg); 1246 err = put_user(amount, (int __user *)arg);
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 8121bf0029e3..2e1f836d4240 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -540,8 +540,7 @@ static void econet_destroy_timer(unsigned long data)
540{ 540{
541 struct sock *sk=(struct sock *)data; 541 struct sock *sk=(struct sock *)data;
542 542
543 if (!atomic_read(&sk->sk_wmem_alloc) && 543 if (!sk_has_allocations(sk)) {
544 !atomic_read(&sk->sk_rmem_alloc)) {
545 sk_free(sk); 544 sk_free(sk);
546 return; 545 return;
547 } 546 }
@@ -579,8 +578,7 @@ static int econet_release(struct socket *sock)
579 578
580 skb_queue_purge(&sk->sk_receive_queue); 579 skb_queue_purge(&sk->sk_receive_queue);
581 580
582 if (atomic_read(&sk->sk_rmem_alloc) || 581 if (sk_has_allocations(sk)) {
583 atomic_read(&sk->sk_wmem_alloc)) {
584 sk->sk_timer.data = (unsigned long)sk; 582 sk->sk_timer.data = (unsigned long)sk;
585 sk->sk_timer.expires = jiffies + HZ; 583 sk->sk_timer.expires = jiffies + HZ;
586 sk->sk_timer.function = econet_destroy_timer; 584 sk->sk_timer.function = econet_destroy_timer;
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c
index 1779677aed46..14d39840dd62 100644
--- a/net/ieee802154/dgram.c
+++ b/net/ieee802154/dgram.c
@@ -126,7 +126,8 @@ static int dgram_ioctl(struct sock *sk, int cmd, unsigned long arg)
126 switch (cmd) { 126 switch (cmd) {
127 case SIOCOUTQ: 127 case SIOCOUTQ:
128 { 128 {
129 int amount = atomic_read(&sk->sk_wmem_alloc); 129 int amount = sk_wmem_alloc_get(sk);
130
130 return put_user(amount, (int __user *)arg); 131 return put_user(amount, (int __user *)arg);
131 } 132 }
132 133
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index d1a39b1277d6..012cf5a68581 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -391,13 +391,8 @@ static inline void tnode_free(struct tnode *tn)
391static void tnode_free_safe(struct tnode *tn) 391static void tnode_free_safe(struct tnode *tn)
392{ 392{
393 BUG_ON(IS_LEAF(tn)); 393 BUG_ON(IS_LEAF(tn));
394 394 tn->tnode_free = tnode_free_head;
395 if (node_parent((struct node *) tn)) { 395 tnode_free_head = tn;
396 tn->tnode_free = tnode_free_head;
397 tnode_free_head = tn;
398 } else {
399 tnode_free(tn);
400 }
401} 396}
402 397
403static void tnode_free_flush(void) 398static void tnode_free_flush(void)
@@ -1009,7 +1004,7 @@ fib_find_node(struct trie *t, u32 key)
1009 return NULL; 1004 return NULL;
1010} 1005}
1011 1006
1012static struct node *trie_rebalance(struct trie *t, struct tnode *tn) 1007static void trie_rebalance(struct trie *t, struct tnode *tn)
1013{ 1008{
1014 int wasfull; 1009 int wasfull;
1015 t_key cindex, key; 1010 t_key cindex, key;
@@ -1033,12 +1028,13 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
1033 } 1028 }
1034 1029
1035 /* Handle last (top) tnode */ 1030 /* Handle last (top) tnode */
1036 if (IS_TNODE(tn)) { 1031 if (IS_TNODE(tn))
1037 tn = (struct tnode *)resize(t, (struct tnode *)tn); 1032 tn = (struct tnode *)resize(t, (struct tnode *)tn);
1038 tnode_free_flush();
1039 }
1040 1033
1041 return (struct node *)tn; 1034 rcu_assign_pointer(t->trie, (struct node *)tn);
1035 tnode_free_flush();
1036
1037 return;
1042} 1038}
1043 1039
1044/* only used from updater-side */ 1040/* only used from updater-side */
@@ -1186,7 +1182,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen)
1186 1182
1187 /* Rebalance the trie */ 1183 /* Rebalance the trie */
1188 1184
1189 rcu_assign_pointer(t->trie, trie_rebalance(t, tp)); 1185 trie_rebalance(t, tp);
1190done: 1186done:
1191 return fa_head; 1187 return fa_head;
1192} 1188}
@@ -1605,7 +1601,7 @@ static void trie_leaf_remove(struct trie *t, struct leaf *l)
1605 if (tp) { 1601 if (tp) {
1606 t_key cindex = tkey_extract_bits(l->key, tp->pos, tp->bits); 1602 t_key cindex = tkey_extract_bits(l->key, tp->pos, tp->bits);
1607 put_child(t, (struct tnode *)tp, cindex, NULL); 1603 put_child(t, (struct tnode *)tp, cindex, NULL);
1608 rcu_assign_pointer(t->trie, trie_rebalance(t, tp)); 1604 trie_rebalance(t, tp);
1609 } else 1605 } else
1610 rcu_assign_pointer(t->trie, NULL); 1606 rcu_assign_pointer(t->trie, NULL);
1611 1607
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index b0b273503e2a..a706a47f4dbb 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -156,10 +156,10 @@ static int inet_csk_diag_fill(struct sock *sk,
156 r->idiag_inode = sock_i_ino(sk); 156 r->idiag_inode = sock_i_ino(sk);
157 157
158 if (minfo) { 158 if (minfo) {
159 minfo->idiag_rmem = atomic_read(&sk->sk_rmem_alloc); 159 minfo->idiag_rmem = sk_rmem_alloc_get(sk);
160 minfo->idiag_wmem = sk->sk_wmem_queued; 160 minfo->idiag_wmem = sk->sk_wmem_queued;
161 minfo->idiag_fmem = sk->sk_forward_alloc; 161 minfo->idiag_fmem = sk->sk_forward_alloc;
162 minfo->idiag_tmem = atomic_read(&sk->sk_wmem_alloc); 162 minfo->idiag_tmem = sk_wmem_alloc_get(sk);
163 } 163 }
164 164
165 handler->idiag_get_info(sk, r, info); 165 handler->idiag_get_info(sk, r, info);
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 3dc9171a272f..2979f14bb188 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -799,7 +799,8 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg)
799{ 799{
800 switch (cmd) { 800 switch (cmd) {
801 case SIOCOUTQ: { 801 case SIOCOUTQ: {
802 int amount = atomic_read(&sk->sk_wmem_alloc); 802 int amount = sk_wmem_alloc_get(sk);
803
803 return put_user(amount, (int __user *)arg); 804 return put_user(amount, (int __user *)arg);
804 } 805 }
805 case SIOCINQ: { 806 case SIOCINQ: {
@@ -935,8 +936,8 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
935 seq_printf(seq, "%4d: %08X:%04X %08X:%04X" 936 seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
936 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d\n", 937 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d\n",
937 i, src, srcp, dest, destp, sp->sk_state, 938 i, src, srcp, dest, destp, sp->sk_state,
938 atomic_read(&sp->sk_wmem_alloc), 939 sk_wmem_alloc_get(sp),
939 atomic_read(&sp->sk_rmem_alloc), 940 sk_rmem_alloc_get(sp),
940 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp), 941 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
941 atomic_read(&sp->sk_refcnt), sp, atomic_read(&sp->sk_drops)); 942 atomic_read(&sp->sk_refcnt), sp, atomic_read(&sp->sk_drops));
942} 943}
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 8f4158d7c9a6..80e3812837ad 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -840,7 +840,8 @@ int udp_ioctl(struct sock *sk, int cmd, unsigned long arg)
840 switch (cmd) { 840 switch (cmd) {
841 case SIOCOUTQ: 841 case SIOCOUTQ:
842 { 842 {
843 int amount = atomic_read(&sk->sk_wmem_alloc); 843 int amount = sk_wmem_alloc_get(sk);
844
844 return put_user(amount, (int __user *)arg); 845 return put_user(amount, (int __user *)arg);
845 } 846 }
846 847
@@ -1721,8 +1722,8 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
1721 seq_printf(f, "%4d: %08X:%04X %08X:%04X" 1722 seq_printf(f, "%4d: %08X:%04X %08X:%04X"
1722 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d%n", 1723 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d%n",
1723 bucket, src, srcp, dest, destp, sp->sk_state, 1724 bucket, src, srcp, dest, destp, sp->sk_state,
1724 atomic_read(&sp->sk_wmem_alloc), 1725 sk_wmem_alloc_get(sp),
1725 atomic_read(&sp->sk_rmem_alloc), 1726 sk_rmem_alloc_get(sp),
1726 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp), 1727 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
1727 atomic_read(&sp->sk_refcnt), sp, 1728 atomic_read(&sp->sk_refcnt), sp,
1728 atomic_read(&sp->sk_drops), len); 1729 atomic_read(&sp->sk_drops), len);
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 36a090d87a3d..8b0b6f948063 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1130,7 +1130,8 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg)
1130 switch(cmd) { 1130 switch(cmd) {
1131 case SIOCOUTQ: 1131 case SIOCOUTQ:
1132 { 1132 {
1133 int amount = atomic_read(&sk->sk_wmem_alloc); 1133 int amount = sk_wmem_alloc_get(sk);
1134
1134 return put_user(amount, (int __user *)arg); 1135 return put_user(amount, (int __user *)arg);
1135 } 1136 }
1136 case SIOCINQ: 1137 case SIOCINQ:
@@ -1236,8 +1237,8 @@ static void raw6_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
1236 dest->s6_addr32[0], dest->s6_addr32[1], 1237 dest->s6_addr32[0], dest->s6_addr32[1],
1237 dest->s6_addr32[2], dest->s6_addr32[3], destp, 1238 dest->s6_addr32[2], dest->s6_addr32[3], destp,
1238 sp->sk_state, 1239 sp->sk_state,
1239 atomic_read(&sp->sk_wmem_alloc), 1240 sk_wmem_alloc_get(sp),
1240 atomic_read(&sp->sk_rmem_alloc), 1241 sk_rmem_alloc_get(sp),
1241 0, 0L, 0, 1242 0, 0L, 0,
1242 sock_i_uid(sp), 0, 1243 sock_i_uid(sp), 0,
1243 sock_i_ino(sp), 1244 sock_i_ino(sp),
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index fc333d854728..023beda6b224 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1061,8 +1061,8 @@ static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket
1061 dest->s6_addr32[0], dest->s6_addr32[1], 1061 dest->s6_addr32[0], dest->s6_addr32[1],
1062 dest->s6_addr32[2], dest->s6_addr32[3], destp, 1062 dest->s6_addr32[2], dest->s6_addr32[3], destp,
1063 sp->sk_state, 1063 sp->sk_state,
1064 atomic_read(&sp->sk_wmem_alloc), 1064 sk_wmem_alloc_get(sp),
1065 atomic_read(&sp->sk_rmem_alloc), 1065 sk_rmem_alloc_get(sp),
1066 0, 0L, 0, 1066 0, 0L, 0,
1067 sock_i_uid(sp), 0, 1067 sock_i_uid(sp), 0,
1068 sock_i_ino(sp), 1068 sock_i_ino(sp),
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 1627050e29fd..417b0e309495 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1835,7 +1835,7 @@ static int ipx_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1835 1835
1836 switch (cmd) { 1836 switch (cmd) {
1837 case TIOCOUTQ: 1837 case TIOCOUTQ:
1838 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1838 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1839 if (amount < 0) 1839 if (amount < 0)
1840 amount = 0; 1840 amount = 0;
1841 rc = put_user(amount, (int __user *)argp); 1841 rc = put_user(amount, (int __user *)argp);
diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c
index 5ed97ad0e2e3..576178482f89 100644
--- a/net/ipx/ipx_proc.c
+++ b/net/ipx/ipx_proc.c
@@ -280,8 +280,8 @@ static int ipx_seq_socket_show(struct seq_file *seq, void *v)
280 } 280 }
281 281
282 seq_printf(seq, "%08X %08X %02X %03d\n", 282 seq_printf(seq, "%08X %08X %02X %03d\n",
283 atomic_read(&s->sk_wmem_alloc), 283 sk_wmem_alloc_get(s),
284 atomic_read(&s->sk_rmem_alloc), 284 sk_rmem_alloc_get(s),
285 s->sk_state, SOCK_INODE(s->sk_socket)->i_uid); 285 s->sk_state, SOCK_INODE(s->sk_socket)->i_uid);
286out: 286out:
287 return 0; 287 return 0;
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 3eb5bcc75f99..5922febe25c4 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1762,7 +1762,8 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1762 switch (cmd) { 1762 switch (cmd) {
1763 case TIOCOUTQ: { 1763 case TIOCOUTQ: {
1764 long amount; 1764 long amount;
1765 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1765
1766 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1766 if (amount < 0) 1767 if (amount < 0)
1767 amount = 0; 1768 amount = 0;
1768 if (put_user(amount, (unsigned int __user *)arg)) 1769 if (put_user(amount, (unsigned int __user *)arg))
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 643c1be2d02e..dba9abd27f90 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3662,8 +3662,8 @@ static int pfkey_seq_show(struct seq_file *f, void *v)
3662 seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n", 3662 seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n",
3663 s, 3663 s,
3664 atomic_read(&s->sk_refcnt), 3664 atomic_read(&s->sk_refcnt),
3665 atomic_read(&s->sk_rmem_alloc), 3665 sk_rmem_alloc_get(s),
3666 atomic_read(&s->sk_wmem_alloc), 3666 sk_wmem_alloc_get(s),
3667 sock_i_uid(s), 3667 sock_i_uid(s),
3668 sock_i_ino(s) 3668 sock_i_ino(s)
3669 ); 3669 );
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c
index d208b3396d94..f97be471fe2e 100644
--- a/net/llc/llc_proc.c
+++ b/net/llc/llc_proc.c
@@ -134,8 +134,8 @@ static int llc_seq_socket_show(struct seq_file *seq, void *v)
134 seq_printf(seq, "@%02X ", llc->sap->laddr.lsap); 134 seq_printf(seq, "@%02X ", llc->sap->laddr.lsap);
135 llc_ui_format_mac(seq, llc->daddr.mac); 135 llc_ui_format_mac(seq, llc->daddr.mac);
136 seq_printf(seq, "@%02X %8d %8d %2d %3d %4d\n", llc->daddr.lsap, 136 seq_printf(seq, "@%02X %8d %8d %2d %3d %4d\n", llc->daddr.lsap,
137 atomic_read(&sk->sk_wmem_alloc), 137 sk_wmem_alloc_get(sk),
138 atomic_read(&sk->sk_rmem_alloc) - llc->copied_seq, 138 sk_rmem_alloc_get(sk) - llc->copied_seq,
139 sk->sk_state, 139 sk->sk_state,
140 sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : -1, 140 sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : -1,
141 llc->link); 141 llc->link);
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 11c72311f35b..6c439cd5ccea 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -163,6 +163,29 @@ static const struct file_operations noack_ops = {
163 .open = mac80211_open_file_generic 163 .open = mac80211_open_file_generic
164}; 164};
165 165
166static ssize_t queues_read(struct file *file, char __user *user_buf,
167 size_t count, loff_t *ppos)
168{
169 struct ieee80211_local *local = file->private_data;
170 unsigned long flags;
171 char buf[IEEE80211_MAX_QUEUES * 20];
172 int q, res = 0;
173
174 spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
175 for (q = 0; q < local->hw.queues; q++)
176 res += sprintf(buf + res, "%02d: %#.8lx/%d\n", q,
177 local->queue_stop_reasons[q],
178 __netif_subqueue_stopped(local->mdev, q));
179 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
180
181 return simple_read_from_buffer(user_buf, count, ppos, buf, res);
182}
183
184static const struct file_operations queues_ops = {
185 .read = queues_read,
186 .open = mac80211_open_file_generic
187};
188
166/* statistics stuff */ 189/* statistics stuff */
167 190
168#define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \ 191#define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \
@@ -298,6 +321,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
298 DEBUGFS_ADD(total_ps_buffered); 321 DEBUGFS_ADD(total_ps_buffered);
299 DEBUGFS_ADD(wep_iv); 322 DEBUGFS_ADD(wep_iv);
300 DEBUGFS_ADD(tsf); 323 DEBUGFS_ADD(tsf);
324 DEBUGFS_ADD(queues);
301 DEBUGFS_ADD_MODE(reset, 0200); 325 DEBUGFS_ADD_MODE(reset, 0200);
302 DEBUGFS_ADD(noack); 326 DEBUGFS_ADD(noack);
303 327
@@ -350,6 +374,7 @@ void debugfs_hw_del(struct ieee80211_local *local)
350 DEBUGFS_DEL(total_ps_buffered); 374 DEBUGFS_DEL(total_ps_buffered);
351 DEBUGFS_DEL(wep_iv); 375 DEBUGFS_DEL(wep_iv);
352 DEBUGFS_DEL(tsf); 376 DEBUGFS_DEL(tsf);
377 DEBUGFS_DEL(queues);
353 DEBUGFS_DEL(reset); 378 DEBUGFS_DEL(reset);
354 DEBUGFS_DEL(noack); 379 DEBUGFS_DEL(noack);
355 380
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4dbc28964196..68eb5052179a 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -783,6 +783,7 @@ struct ieee80211_local {
783 struct dentry *total_ps_buffered; 783 struct dentry *total_ps_buffered;
784 struct dentry *wep_iv; 784 struct dentry *wep_iv;
785 struct dentry *tsf; 785 struct dentry *tsf;
786 struct dentry *queues;
786 struct dentry *reset; 787 struct dentry *reset;
787 struct dentry *noack; 788 struct dentry *noack;
788 struct dentry *statistics; 789 struct dentry *statistics;
@@ -1100,7 +1101,6 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
1100u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, 1101u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
1101 struct ieee802_11_elems *elems, 1102 struct ieee802_11_elems *elems,
1102 u64 filter, u32 crc); 1103 u64 filter, u32 crc);
1103int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq);
1104u32 ieee80211_mandatory_rates(struct ieee80211_local *local, 1104u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
1105 enum ieee80211_band band); 1105 enum ieee80211_band band);
1106 1106
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d779c57a8220..aca22b00b6a3 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1102,14 +1102,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1102 struct sta_info *sta; 1102 struct sta_info *sta;
1103 u32 changed = 0, config_changed = 0; 1103 u32 changed = 0, config_changed = 0;
1104 1104
1105 rcu_read_lock();
1106
1107 sta = sta_info_get(local, ifmgd->bssid);
1108 if (!sta) {
1109 rcu_read_unlock();
1110 return;
1111 }
1112
1113 if (deauth) { 1105 if (deauth) {
1114 ifmgd->direct_probe_tries = 0; 1106 ifmgd->direct_probe_tries = 0;
1115 ifmgd->auth_tries = 0; 1107 ifmgd->auth_tries = 0;
@@ -1120,7 +1112,11 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1120 netif_tx_stop_all_queues(sdata->dev); 1112 netif_tx_stop_all_queues(sdata->dev);
1121 netif_carrier_off(sdata->dev); 1113 netif_carrier_off(sdata->dev);
1122 1114
1123 ieee80211_sta_tear_down_BA_sessions(sta); 1115 rcu_read_lock();
1116 sta = sta_info_get(local, ifmgd->bssid);
1117 if (sta)
1118 ieee80211_sta_tear_down_BA_sessions(sta);
1119 rcu_read_unlock();
1124 1120
1125 bss = ieee80211_rx_bss_get(local, ifmgd->bssid, 1121 bss = ieee80211_rx_bss_get(local, ifmgd->bssid,
1126 conf->channel->center_freq, 1122 conf->channel->center_freq,
@@ -1156,8 +1152,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1156 ifmgd->ssid, ifmgd->ssid_len); 1152 ifmgd->ssid, ifmgd->ssid_len);
1157 } 1153 }
1158 1154
1159 rcu_read_unlock();
1160
1161 ieee80211_set_wmm_default(sdata); 1155 ieee80211_set_wmm_default(sdata);
1162 1156
1163 ieee80211_recalc_idle(local); 1157 ieee80211_recalc_idle(local);
@@ -2223,7 +2217,10 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata)
2223 capa_mask, capa_val); 2217 capa_mask, capa_val);
2224 2218
2225 if (bss) { 2219 if (bss) {
2226 ieee80211_set_freq(sdata, bss->cbss.channel->center_freq); 2220 local->oper_channel = bss->cbss.channel;
2221 local->oper_channel_type = NL80211_CHAN_NO_HT;
2222 ieee80211_hw_config(local, 0);
2223
2227 if (!(ifmgd->flags & IEEE80211_STA_SSID_SET)) 2224 if (!(ifmgd->flags & IEEE80211_STA_SSID_SET))
2228 ieee80211_sta_set_ssid(sdata, bss->ssid, 2225 ieee80211_sta_set_ssid(sdata, bss->ssid,
2229 bss->ssid_len); 2226 bss->ssid_len);
@@ -2445,6 +2442,14 @@ void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata)
2445 ieee80211_set_disassoc(sdata, true, true, 2442 ieee80211_set_disassoc(sdata, true, true,
2446 WLAN_REASON_DEAUTH_LEAVING); 2443 WLAN_REASON_DEAUTH_LEAVING);
2447 2444
2445 if (ifmgd->ssid_len == 0) {
2446 /*
2447 * Only allow association to be started if a valid SSID
2448 * is configured.
2449 */
2450 return;
2451 }
2452
2448 if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) || 2453 if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) ||
2449 ifmgd->state != IEEE80211_STA_MLME_ASSOCIATE) 2454 ifmgd->state != IEEE80211_STA_MLME_ASSOCIATE)
2450 set_bit(IEEE80211_STA_REQ_AUTH, &ifmgd->request); 2455 set_bit(IEEE80211_STA_REQ_AUTH, &ifmgd->request);
@@ -2476,6 +2481,10 @@ int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size
2476 ifmgd = &sdata->u.mgd; 2481 ifmgd = &sdata->u.mgd;
2477 2482
2478 if (ifmgd->ssid_len != len || memcmp(ifmgd->ssid, ssid, len) != 0) { 2483 if (ifmgd->ssid_len != len || memcmp(ifmgd->ssid, ssid, len) != 0) {
2484 if (ifmgd->state == IEEE80211_STA_MLME_ASSOCIATED)
2485 ieee80211_set_disassoc(sdata, true, true,
2486 WLAN_REASON_DEAUTH_LEAVING);
2487
2479 /* 2488 /*
2480 * Do not use reassociation if SSID is changed (different ESS). 2489 * Do not use reassociation if SSID is changed (different ESS).
2481 */ 2490 */
@@ -2500,6 +2509,11 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid)
2500{ 2509{
2501 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 2510 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2502 2511
2512 if (compare_ether_addr(bssid, ifmgd->bssid) != 0 &&
2513 ifmgd->state == IEEE80211_STA_MLME_ASSOCIATED)
2514 ieee80211_set_disassoc(sdata, true, true,
2515 WLAN_REASON_DEAUTH_LEAVING);
2516
2503 if (is_valid_ether_addr(bssid)) { 2517 if (is_valid_ether_addr(bssid)) {
2504 memcpy(ifmgd->bssid, bssid, ETH_ALEN); 2518 memcpy(ifmgd->bssid, bssid, ETH_ALEN);
2505 ifmgd->flags |= IEEE80211_STA_BSSID_SET; 2519 ifmgd->flags |= IEEE80211_STA_BSSID_SET;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 66ce96a69f31..915e77769312 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -774,31 +774,6 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
774 dev_queue_xmit(skb); 774 dev_queue_xmit(skb);
775} 775}
776 776
777int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
778{
779 int ret = -EINVAL;
780 struct ieee80211_channel *chan;
781 struct ieee80211_local *local = sdata->local;
782
783 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);
784
785 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
786 if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
787 chan->flags & IEEE80211_CHAN_NO_IBSS)
788 return ret;
789 local->oper_channel = chan;
790 local->oper_channel_type = NL80211_CHAN_NO_HT;
791
792 if (local->sw_scanning || local->hw_scanning)
793 ret = 0;
794 else
795 ret = ieee80211_hw_config(
796 local, IEEE80211_CONF_CHANGE_CHANNEL);
797 }
798
799 return ret;
800}
801
802u32 ieee80211_mandatory_rates(struct ieee80211_local *local, 777u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
803 enum ieee80211_band band) 778 enum ieee80211_band band)
804{ 779{
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index d2d81b103341..1da81f456744 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -55,6 +55,8 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
55 struct iw_freq *freq, char *extra) 55 struct iw_freq *freq, char *extra)
56{ 56{
57 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 57 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
58 struct ieee80211_local *local = sdata->local;
59 struct ieee80211_channel *chan;
58 60
59 if (sdata->vif.type == NL80211_IFTYPE_ADHOC) 61 if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
60 return cfg80211_ibss_wext_siwfreq(dev, info, freq, extra); 62 return cfg80211_ibss_wext_siwfreq(dev, info, freq, extra);
@@ -69,17 +71,38 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
69 IEEE80211_STA_AUTO_CHANNEL_SEL; 71 IEEE80211_STA_AUTO_CHANNEL_SEL;
70 return 0; 72 return 0;
71 } else 73 } else
72 return ieee80211_set_freq(sdata, 74 chan = ieee80211_get_channel(local->hw.wiphy,
73 ieee80211_channel_to_frequency(freq->m)); 75 ieee80211_channel_to_frequency(freq->m));
74 } else { 76 } else {
75 int i, div = 1000000; 77 int i, div = 1000000;
76 for (i = 0; i < freq->e; i++) 78 for (i = 0; i < freq->e; i++)
77 div /= 10; 79 div /= 10;
78 if (div > 0) 80 if (div <= 0)
79 return ieee80211_set_freq(sdata, freq->m / div);
80 else
81 return -EINVAL; 81 return -EINVAL;
82 chan = ieee80211_get_channel(local->hw.wiphy, freq->m / div);
82 } 83 }
84
85 if (!chan)
86 return -EINVAL;
87
88 if (chan->flags & IEEE80211_CHAN_DISABLED)
89 return -EINVAL;
90
91 /*
92 * no change except maybe auto -> fixed, ignore the HT
93 * setting so you can fix a channel you're on already
94 */
95 if (local->oper_channel == chan)
96 return 0;
97
98 if (sdata->vif.type == NL80211_IFTYPE_STATION)
99 ieee80211_sta_req_auth(sdata);
100
101 local->oper_channel = chan;
102 local->oper_channel_type = NL80211_CHAN_NO_HT;
103 ieee80211_hw_config(local, 0);
104
105 return 0;
83} 106}
84 107
85 108
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 8b6bbb3032b0..2936fa3b6dc8 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1914,8 +1914,8 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
1914 s->sk_protocol, 1914 s->sk_protocol,
1915 nlk->pid, 1915 nlk->pid,
1916 nlk->groups ? (u32)nlk->groups[0] : 0, 1916 nlk->groups ? (u32)nlk->groups[0] : 0,
1917 atomic_read(&s->sk_rmem_alloc), 1917 sk_rmem_alloc_get(s),
1918 atomic_read(&s->sk_wmem_alloc), 1918 sk_wmem_alloc_get(s),
1919 nlk->cb, 1919 nlk->cb,
1920 atomic_read(&s->sk_refcnt), 1920 atomic_read(&s->sk_refcnt),
1921 atomic_read(&s->sk_drops) 1921 atomic_read(&s->sk_drops)
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 3be0e016ab7d..ce51ce012cda 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -286,8 +286,7 @@ void nr_destroy_socket(struct sock *sk)
286 kfree_skb(skb); 286 kfree_skb(skb);
287 } 287 }
288 288
289 if (atomic_read(&sk->sk_wmem_alloc) || 289 if (sk_has_allocations(sk)) {
290 atomic_read(&sk->sk_rmem_alloc)) {
291 /* Defer: outstanding buffers */ 290 /* Defer: outstanding buffers */
292 sk->sk_timer.function = nr_destroy_timer; 291 sk->sk_timer.function = nr_destroy_timer;
293 sk->sk_timer.expires = jiffies + 2 * HZ; 292 sk->sk_timer.expires = jiffies + 2 * HZ;
@@ -1206,7 +1205,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1206 long amount; 1205 long amount;
1207 1206
1208 lock_sock(sk); 1207 lock_sock(sk);
1209 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1208 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1210 if (amount < 0) 1209 if (amount < 0)
1211 amount = 0; 1210 amount = 0;
1212 release_sock(sk); 1211 release_sock(sk);
@@ -1342,8 +1341,8 @@ static int nr_info_show(struct seq_file *seq, void *v)
1342 nr->n2count, 1341 nr->n2count,
1343 nr->n2, 1342 nr->n2,
1344 nr->window, 1343 nr->window,
1345 atomic_read(&s->sk_wmem_alloc), 1344 sk_wmem_alloc_get(s),
1346 atomic_read(&s->sk_rmem_alloc), 1345 sk_rmem_alloc_get(s),
1347 s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); 1346 s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
1348 1347
1349 bh_unlock_sock(s); 1348 bh_unlock_sock(s);
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 4f76e5552d8e..ebe5718baa31 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1987,7 +1987,8 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
1987 switch (cmd) { 1987 switch (cmd) {
1988 case SIOCOUTQ: 1988 case SIOCOUTQ:
1989 { 1989 {
1990 int amount = atomic_read(&sk->sk_wmem_alloc); 1990 int amount = sk_wmem_alloc_get(sk);
1991
1991 return put_user(amount, (int __user *)arg); 1992 return put_user(amount, (int __user *)arg);
1992 } 1993 }
1993 case SIOCINQ: 1994 case SIOCINQ:
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 877a7f65f707..6bd8e93869ed 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -356,8 +356,7 @@ void rose_destroy_socket(struct sock *sk)
356 kfree_skb(skb); 356 kfree_skb(skb);
357 } 357 }
358 358
359 if (atomic_read(&sk->sk_wmem_alloc) || 359 if (sk_has_allocations(sk)) {
360 atomic_read(&sk->sk_rmem_alloc)) {
361 /* Defer: outstanding buffers */ 360 /* Defer: outstanding buffers */
362 setup_timer(&sk->sk_timer, rose_destroy_timer, 361 setup_timer(&sk->sk_timer, rose_destroy_timer,
363 (unsigned long)sk); 362 (unsigned long)sk);
@@ -1310,7 +1309,8 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1310 switch (cmd) { 1309 switch (cmd) {
1311 case TIOCOUTQ: { 1310 case TIOCOUTQ: {
1312 long amount; 1311 long amount;
1313 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1312
1313 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1314 if (amount < 0) 1314 if (amount < 0)
1315 amount = 0; 1315 amount = 0;
1316 return put_user(amount, (unsigned int __user *) argp); 1316 return put_user(amount, (unsigned int __user *) argp);
@@ -1481,8 +1481,8 @@ static int rose_info_show(struct seq_file *seq, void *v)
1481 rose->hb / HZ, 1481 rose->hb / HZ,
1482 ax25_display_timer(&rose->idletimer) / (60 * HZ), 1482 ax25_display_timer(&rose->idletimer) / (60 * HZ),
1483 rose->idle / (60 * HZ), 1483 rose->idle / (60 * HZ),
1484 atomic_read(&s->sk_wmem_alloc), 1484 sk_wmem_alloc_get(s),
1485 atomic_read(&s->sk_rmem_alloc), 1485 sk_rmem_alloc_get(s),
1486 s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); 1486 s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
1487 } 1487 }
1488 1488
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index f8f047b61245..723964c3ee4f 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -294,6 +294,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
294 if (police->tcfp_ewma_rate && 294 if (police->tcfp_ewma_rate &&
295 police->tcf_rate_est.bps >= police->tcfp_ewma_rate) { 295 police->tcf_rate_est.bps >= police->tcfp_ewma_rate) {
296 police->tcf_qstats.overlimits++; 296 police->tcf_qstats.overlimits++;
297 if (police->tcf_action == TC_ACT_SHOT)
298 police->tcf_qstats.drops++;
297 spin_unlock(&police->tcf_lock); 299 spin_unlock(&police->tcf_lock);
298 return police->tcf_action; 300 return police->tcf_action;
299 } 301 }
@@ -327,6 +329,8 @@ static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
327 } 329 }
328 330
329 police->tcf_qstats.overlimits++; 331 police->tcf_qstats.overlimits++;
332 if (police->tcf_action == TC_ACT_SHOT)
333 police->tcf_qstats.drops++;
330 spin_unlock(&police->tcf_lock); 334 spin_unlock(&police->tcf_lock);
331 return police->tcf_action; 335 return police->tcf_action;
332} 336}
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 266151ae85a3..18d85d259104 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -349,13 +349,13 @@ META_COLLECTOR(int_sk_type)
349META_COLLECTOR(int_sk_rmem_alloc) 349META_COLLECTOR(int_sk_rmem_alloc)
350{ 350{
351 SKIP_NONLOCAL(skb); 351 SKIP_NONLOCAL(skb);
352 dst->value = atomic_read(&skb->sk->sk_rmem_alloc); 352 dst->value = sk_rmem_alloc_get(skb->sk);
353} 353}
354 354
355META_COLLECTOR(int_sk_wmem_alloc) 355META_COLLECTOR(int_sk_wmem_alloc)
356{ 356{
357 SKIP_NONLOCAL(skb); 357 SKIP_NONLOCAL(skb);
358 dst->value = atomic_read(&skb->sk->sk_wmem_alloc); 358 dst->value = sk_wmem_alloc_get(skb->sk);
359} 359}
360 360
361META_COLLECTOR(int_sk_omem_alloc) 361META_COLLECTOR(int_sk_omem_alloc)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 0f01e5d8a24f..35ba035970a2 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -130,7 +130,7 @@ static inline int sctp_wspace(struct sctp_association *asoc)
130 if (asoc->ep->sndbuf_policy) 130 if (asoc->ep->sndbuf_policy)
131 amt = asoc->sndbuf_used; 131 amt = asoc->sndbuf_used;
132 else 132 else
133 amt = atomic_read(&asoc->base.sk->sk_wmem_alloc); 133 amt = sk_wmem_alloc_get(asoc->base.sk);
134 134
135 if (amt >= asoc->base.sk->sk_sndbuf) { 135 if (amt >= asoc->base.sk->sk_sndbuf) {
136 if (asoc->base.sk->sk_userlocks & SOCK_SNDBUF_LOCK) 136 if (asoc->base.sk->sk_userlocks & SOCK_SNDBUF_LOCK)
@@ -6523,7 +6523,7 @@ static int sctp_writeable(struct sock *sk)
6523{ 6523{
6524 int amt = 0; 6524 int amt = 0;
6525 6525
6526 amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 6526 amt = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
6527 if (amt < 0) 6527 if (amt < 0)
6528 amt = 0; 6528 amt = 0;
6529 return amt; 6529 return amt;
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 9dcc6e7f96ec..36d4e44d6233 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1946,7 +1946,7 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1946 1946
1947 switch (cmd) { 1947 switch (cmd) {
1948 case SIOCOUTQ: 1948 case SIOCOUTQ:
1949 amount = atomic_read(&sk->sk_wmem_alloc); 1949 amount = sk_wmem_alloc_get(sk);
1950 err = put_user(amount, (int __user *)arg); 1950 err = put_user(amount, (int __user *)arg);
1951 break; 1951 break;
1952 case SIOCINQ: 1952 case SIOCINQ:
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index ed80af8ca5fb..21cdc872004e 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -332,14 +332,14 @@ static unsigned int x25_new_lci(struct x25_neigh *nb)
332/* 332/*
333 * Deferred destroy. 333 * Deferred destroy.
334 */ 334 */
335void x25_destroy_socket(struct sock *); 335static void __x25_destroy_socket(struct sock *);
336 336
337/* 337/*
338 * handler for deferred kills. 338 * handler for deferred kills.
339 */ 339 */
340static void x25_destroy_timer(unsigned long data) 340static void x25_destroy_timer(unsigned long data)
341{ 341{
342 x25_destroy_socket((struct sock *)data); 342 x25_destroy_socket_from_timer((struct sock *)data);
343} 343}
344 344
345/* 345/*
@@ -349,12 +349,10 @@ static void x25_destroy_timer(unsigned long data)
349 * will touch it and we are (fairly 8-) ) safe. 349 * will touch it and we are (fairly 8-) ) safe.
350 * Not static as it's used by the timer 350 * Not static as it's used by the timer
351 */ 351 */
352void x25_destroy_socket(struct sock *sk) 352static void __x25_destroy_socket(struct sock *sk)
353{ 353{
354 struct sk_buff *skb; 354 struct sk_buff *skb;
355 355
356 sock_hold(sk);
357 lock_sock(sk);
358 x25_stop_heartbeat(sk); 356 x25_stop_heartbeat(sk);
359 x25_stop_timer(sk); 357 x25_stop_timer(sk);
360 358
@@ -374,8 +372,7 @@ void x25_destroy_socket(struct sock *sk)
374 kfree_skb(skb); 372 kfree_skb(skb);
375 } 373 }
376 374
377 if (atomic_read(&sk->sk_wmem_alloc) || 375 if (sk_has_allocations(sk)) {
378 atomic_read(&sk->sk_rmem_alloc)) {
379 /* Defer: outstanding buffers */ 376 /* Defer: outstanding buffers */
380 sk->sk_timer.expires = jiffies + 10 * HZ; 377 sk->sk_timer.expires = jiffies + 10 * HZ;
381 sk->sk_timer.function = x25_destroy_timer; 378 sk->sk_timer.function = x25_destroy_timer;
@@ -385,7 +382,22 @@ void x25_destroy_socket(struct sock *sk)
385 /* drop last reference so sock_put will free */ 382 /* drop last reference so sock_put will free */
386 __sock_put(sk); 383 __sock_put(sk);
387 } 384 }
385}
386
387void x25_destroy_socket_from_timer(struct sock *sk)
388{
389 sock_hold(sk);
390 bh_lock_sock(sk);
391 __x25_destroy_socket(sk);
392 bh_unlock_sock(sk);
393 sock_put(sk);
394}
388 395
396static void x25_destroy_socket(struct sock *sk)
397{
398 sock_hold(sk);
399 lock_sock(sk);
400 __x25_destroy_socket(sk);
389 release_sock(sk); 401 release_sock(sk);
390 sock_put(sk); 402 sock_put(sk);
391} 403}
@@ -1259,8 +1271,8 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1259 1271
1260 switch (cmd) { 1272 switch (cmd) {
1261 case TIOCOUTQ: { 1273 case TIOCOUTQ: {
1262 int amount = sk->sk_sndbuf - 1274 int amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1263 atomic_read(&sk->sk_wmem_alloc); 1275
1264 if (amount < 0) 1276 if (amount < 0)
1265 amount = 0; 1277 amount = 0;
1266 rc = put_user(amount, (unsigned int __user *)argp); 1278 rc = put_user(amount, (unsigned int __user *)argp);
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c
index 1afa44d25beb..0a04e62e0e18 100644
--- a/net/x25/x25_proc.c
+++ b/net/x25/x25_proc.c
@@ -163,8 +163,8 @@ static int x25_seq_socket_show(struct seq_file *seq, void *v)
163 devname, x25->lci & 0x0FFF, x25->state, x25->vs, x25->vr, 163 devname, x25->lci & 0x0FFF, x25->state, x25->vs, x25->vr,
164 x25->va, x25_display_timer(s) / HZ, x25->t2 / HZ, 164 x25->va, x25_display_timer(s) / HZ, x25->t2 / HZ,
165 x25->t21 / HZ, x25->t22 / HZ, x25->t23 / HZ, 165 x25->t21 / HZ, x25->t22 / HZ, x25->t23 / HZ,
166 atomic_read(&s->sk_wmem_alloc), 166 sk_wmem_alloc_get(s),
167 atomic_read(&s->sk_rmem_alloc), 167 sk_rmem_alloc_get(s),
168 s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); 168 s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
169out: 169out:
170 return 0; 170 return 0;
diff --git a/net/x25/x25_timer.c b/net/x25/x25_timer.c
index d3e3e54db936..5c5db1a36399 100644
--- a/net/x25/x25_timer.c
+++ b/net/x25/x25_timer.c
@@ -113,7 +113,7 @@ static void x25_heartbeat_expiry(unsigned long param)
113 (sk->sk_state == TCP_LISTEN && 113 (sk->sk_state == TCP_LISTEN &&
114 sock_flag(sk, SOCK_DEAD))) { 114 sock_flag(sk, SOCK_DEAD))) {
115 bh_unlock_sock(sk); 115 bh_unlock_sock(sk);
116 x25_destroy_socket(sk); 116 x25_destroy_socket_from_timer(sk);
117 return; 117 return;
118 } 118 }
119 break; 119 break;
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 2b706617c89a..7a7778746ea6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -116,6 +116,17 @@ _a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
116 $(asflags-y) $(AFLAGS_$(basetarget).o) 116 $(asflags-y) $(AFLAGS_$(basetarget).o)
117_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) 117_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
118 118
119#
120# Enable gcov profiling flags for a file, directory or for all files depending
121# on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL
122# (in this order)
123#
124ifeq ($(CONFIG_GCOV_KERNEL),y)
125_c_flags += $(if $(patsubst n%,, \
126 $(GCOV_PROFILE_$(basetarget).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \
127 $(CFLAGS_GCOV))
128endif
129
119# If building the kernel in a separate objtree expand all occurrences 130# If building the kernel in a separate objtree expand all occurrences
120# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). 131# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
121 132
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 5fda7df19723..b8186bac8b7e 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -490,7 +490,7 @@ int devcgroup_inode_permission(struct inode *inode, int mask)
490 490
491 list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) { 491 list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) {
492 if (wh->type & DEV_ALL) 492 if (wh->type & DEV_ALL)
493 goto acc_check; 493 goto found;
494 if ((wh->type & DEV_BLOCK) && !S_ISBLK(inode->i_mode)) 494 if ((wh->type & DEV_BLOCK) && !S_ISBLK(inode->i_mode))
495 continue; 495 continue;
496 if ((wh->type & DEV_CHAR) && !S_ISCHR(inode->i_mode)) 496 if ((wh->type & DEV_CHAR) && !S_ISCHR(inode->i_mode))
@@ -499,11 +499,12 @@ int devcgroup_inode_permission(struct inode *inode, int mask)
499 continue; 499 continue;
500 if (wh->minor != ~0 && wh->minor != iminor(inode)) 500 if (wh->minor != ~0 && wh->minor != iminor(inode))
501 continue; 501 continue;
502acc_check: 502
503 if ((mask & MAY_WRITE) && !(wh->access & ACC_WRITE)) 503 if ((mask & MAY_WRITE) && !(wh->access & ACC_WRITE))
504 continue; 504 continue;
505 if ((mask & MAY_READ) && !(wh->access & ACC_READ)) 505 if ((mask & MAY_READ) && !(wh->access & ACC_READ))
506 continue; 506 continue;
507found:
507 rcu_read_unlock(); 508 rcu_read_unlock();
508 return 0; 509 return 0;
509 } 510 }
@@ -527,7 +528,7 @@ int devcgroup_inode_mknod(int mode, dev_t dev)
527 528
528 list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) { 529 list_for_each_entry_rcu(wh, &dev_cgroup->whitelist, list) {
529 if (wh->type & DEV_ALL) 530 if (wh->type & DEV_ALL)
530 goto acc_check; 531 goto found;
531 if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode)) 532 if ((wh->type & DEV_BLOCK) && !S_ISBLK(mode))
532 continue; 533 continue;
533 if ((wh->type & DEV_CHAR) && !S_ISCHR(mode)) 534 if ((wh->type & DEV_CHAR) && !S_ISCHR(mode))
@@ -536,9 +537,10 @@ int devcgroup_inode_mknod(int mode, dev_t dev)
536 continue; 537 continue;
537 if (wh->minor != ~0 && wh->minor != MINOR(dev)) 538 if (wh->minor != ~0 && wh->minor != MINOR(dev))
538 continue; 539 continue;
539acc_check: 540
540 if (!(wh->access & ACC_MKNOD)) 541 if (!(wh->access & ACC_MKNOD))
541 continue; 542 continue;
543found:
542 rcu_read_unlock(); 544 rcu_read_unlock();
543 return 0; 545 return 0;
544 } 546 }
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c
index ccf1b38c88ea..18da2ef04d09 100644
--- a/sound/pci/lx6464es/lx6464es.c
+++ b/sound/pci/lx6464es/lx6464es.c
@@ -988,7 +988,7 @@ static int __devinit snd_lx6464es_create(struct snd_card *card,
988 pci_set_master(pci); 988 pci_set_master(pci);
989 989
990 /* check if we can restrict PCI DMA transfers to 32 bits */ 990 /* check if we can restrict PCI DMA transfers to 32 bits */
991 err = pci_set_dma_mask(pci, DMA_32BIT_MASK); 991 err = pci_set_dma_mask(pci, DMA_BIT_MASK(32));
992 if (err < 0) { 992 if (err < 0) {
993 snd_printk(KERN_ERR "architecture does not support " 993 snd_printk(KERN_ERR "architecture does not support "
994 "32bit PCI busmaster DMA\n"); 994 "32bit PCI busmaster DMA\n");