aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/gpio/led.txt6
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--Documentation/hwmon/jc4226
-rw-r--r--Documentation/input/alps.txt3
-rw-r--r--Documentation/kernel-parameters.txt6
-rw-r--r--MAINTAINERS12
-rw-r--r--Makefile2
-rw-r--r--arch/alpha/include/asm/futex.h2
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/boot/.gitignore1
-rw-r--r--arch/arm/include/asm/pmu.h2
-rw-r--r--arch/arm/kernel/ecard.c1
-rw-r--r--arch/arm/kernel/perf_event.c45
-rw-r--r--arch/arm/kernel/perf_event_v6.c22
-rw-r--r--arch/arm/kernel/perf_event_v7.c11
-rw-r--r--arch/arm/kernel/perf_event_xscale.c20
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c19
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c8
-rw-r--r--arch/arm/mach-ep93xx/vision_ep9307.c2
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c2
-rw-r--r--arch/arm/mach-omap2/id.c1
-rw-r--r--arch/arm/mach-omap2/mailbox.c3
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c3
-rw-r--r--arch/arm/mach-omap2/omap4-common.c2
-rw-r--r--arch/arm/mach-omap2/twl-common.c1
-rw-r--r--arch/arm/mach-pxa/generic.h1
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c7
-rw-r--r--arch/arm/mach-pxa/pxa25x.c2
-rw-r--r--arch/arm/mach-pxa/pxa27x.c2
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c1
-rw-r--r--arch/arm/mach-pxa/pxa95x.c1
-rw-r--r--arch/arm/mach-s3c2440/common.h2
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-at2440evb.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-mini2440.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-nexcoder.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-rx1950.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-rx3715.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-smdk2440.c2
-rw-r--r--arch/arm/mach-s3c2440/s3c2440.c13
-rw-r--r--arch/arm/mach-s3c2440/s3c244x.c12
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c40
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c45
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c47
-rw-r--r--arch/arm/mach-shmobile/board-g3evm.c38
-rw-r--r--arch/arm/mach-shmobile/board-g4evm.c38
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c38
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c44
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c62
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7740.c8
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7779.c4
-rw-r--r--arch/arm/mach-shmobile/clock-sh7367.c8
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c10
-rw-r--r--arch/arm/mach-shmobile/clock-sh7377.c8
-rw-r--r--arch/arm/mach-shmobile/clock-sh73a0.c14
-rw-r--r--arch/arm/mach-shmobile/clock.c2
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h9
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c45
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c54
-rw-r--r--arch/arm/mach-shmobile/setup-sh7367.c32
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c39
-rw-r--r--arch/arm/mach-shmobile/setup-sh7377.c32
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c32
-rw-r--r--arch/arm/mach-shmobile/timer.c6
-rw-r--r--arch/arm/mach-ux500/Kconfig2
-rw-r--r--arch/arm/mach-vexpress/Kconfig2
-rw-r--r--arch/arm/mm/proc-v7.S4
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h10
-rw-r--r--arch/arm/plat-s3c24xx/dma.c2
-rw-r--r--arch/arm/plat-samsung/devs.c2
-rw-r--r--arch/arm/plat-spear/time.c6
-rw-r--r--arch/c6x/include/asm/processor.h4
-rw-r--r--arch/mips/alchemy/common/time.c2
-rw-r--r--arch/mips/ath79/dev-wmac.c2
-rw-r--r--arch/mips/configs/nlm_xlp_defconfig4
-rw-r--r--arch/mips/configs/nlm_xlr_defconfig4
-rw-r--r--arch/mips/configs/powertv_defconfig2
-rw-r--r--arch/mips/include/asm/mach-au1x00/gpio-au1300.h20
-rw-r--r--arch/mips/include/asm/page.h3
-rw-r--r--arch/mips/kernel/smp-bmips.c1
-rw-r--r--arch/mips/kernel/traps.c2
-rw-r--r--arch/mips/kernel/vmlinux.lds.S1
-rw-r--r--arch/mips/mm/fault.c36
-rw-r--r--arch/mips/pci/pci.c5
-rw-r--r--arch/mips/pmc-sierra/yosemite/ht-irq.c10
-rw-r--r--arch/mips/txx9/generic/7segled.c2
-rw-r--r--arch/sh/boards/mach-highlander/setup.c2
-rw-r--r--arch/sh/boards/mach-sdk7786/setup.c2
-rw-r--r--arch/sh/include/asm/clock.h2
-rw-r--r--arch/sh/kernel/cpu/sh2/clock-sh7619.c12
-rw-r--r--arch/sh/kernel/cpu/sh2a/clock-sh7201.c12
-rw-r--r--arch/sh/kernel/cpu/sh2a/clock-sh7203.c12
-rw-r--r--arch/sh/kernel/cpu/sh2a/clock-sh7206.c12
-rw-r--r--arch/sh/kernel/cpu/sh2a/ex.S1
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh3.c12
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh7705.c12
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh7706.c12
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh7709.c12
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh7710.c12
-rw-r--r--arch/sh/kernel/cpu/sh3/clock-sh7712.c10
-rw-r--r--arch/sh/kernel/cpu/sh4/clock-sh4-202.c6
-rw-r--r--arch/sh/kernel/cpu/sh4/clock-sh4.c12
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7343.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7366.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7722.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7723.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7724.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7757.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7763.c14
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7770.c12
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7780.c14
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7785.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7786.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-shx3.c2
-rw-r--r--arch/sh/kernel/cpu/sh5/clock-sh5.c12
-rw-r--r--arch/sparc/Makefile2
-rw-r--r--arch/tile/configs/tilegx_defconfig1412
-rw-r--r--arch/tile/configs/tilepro_defconfig1629
-rw-r--r--arch/tile/kernel/compat_signal.c5
-rw-r--r--arch/tile/kernel/signal.c13
-rw-r--r--arch/tile/kernel/sysfs.c2
-rw-r--r--arch/tile/lib/spinlock_32.c2
-rw-r--r--arch/x86/ia32/ia32_aout.c14
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel.c17
-rw-r--r--arch/x86/lib/delay.c4
-rw-r--r--arch/x86/mm/hugetlbpage.c4
-rw-r--r--arch/x86/pci/acpi.c22
-rw-r--r--block/blk-ioc.c135
-rw-r--r--block/cfq-iosched.c12
-rw-r--r--block/genhd.c42
-rw-r--r--block/partition-generic.c48
-rw-r--r--drivers/block/DAC960.c18
-rw-r--r--drivers/block/floppy.c2
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_device.c2
-rw-r--r--drivers/gpu/drm/gma500/framebuffer.c1
-rw-r--r--drivers/gpu/drm/gma500/gtt.c9
-rw-r--r--drivers/gpu/drm/radeon/r600.c3
-rw-r--r--drivers/gpu/drm/radeon/r600_blit_shaders.c8
-rw-r--r--drivers/gpu/drm/radeon/r600d.h1
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c18
-rw-r--r--drivers/gpu/drm/radeon/radeon_encoders.c6
-rw-r--r--drivers/gpu/drm/radeon/radeon_fb.c11
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h2
-rw-r--r--drivers/hid/hid-ids.h3
-rw-r--r--drivers/hid/hid-input.c9
-rw-r--r--drivers/hid/usbhid/hid-quirks.c1
-rw-r--r--drivers/hwmon/Kconfig5
-rw-r--r--drivers/hwmon/jc42.c30
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c3
-rw-r--r--drivers/hwmon/pmbus/zl6100.c10
-rw-r--r--drivers/input/evdev.c2
-rw-r--r--drivers/input/misc/twl4030-vibra.c6
-rw-r--r--drivers/input/mouse/alps.c7
-rw-r--r--drivers/input/tablet/Kconfig2
-rw-r--r--drivers/input/tablet/wacom_wac.c2
-rw-r--r--drivers/iommu/amd_iommu_init.c2
-rw-r--r--drivers/md/dm-flakey.c2
-rw-r--r--drivers/md/dm-io.c23
-rw-r--r--drivers/md/dm-ioctl.c2
-rw-r--r--drivers/md/dm-raid.c17
-rw-r--r--drivers/md/dm-thin-metadata.c25
-rw-r--r--drivers/md/raid1.c2
-rw-r--r--drivers/md/raid10.c38
-rw-r--r--drivers/mfd/ab8500-core.c5
-rw-r--r--drivers/mfd/mfd-core.c2
-rw-r--r--drivers/mfd/s5m-core.c2
-rw-r--r--drivers/mfd/tps65910.c2
-rw-r--r--drivers/mfd/tps65912-core.c2
-rw-r--r--drivers/mfd/wm8350-irq.c1
-rw-r--r--drivers/mfd/wm8994-core.c14
-rw-r--r--drivers/mfd/wm8994-regmap.c1
-rw-r--r--drivers/misc/c2port/core.c4
-rw-r--r--drivers/mmc/core/core.c3
-rw-r--r--drivers/mmc/core/host.c4
-rw-r--r--drivers/mmc/core/mmc.c3
-rw-r--r--drivers/mmc/core/sd.c8
-rw-r--r--drivers/mmc/core/sdio.c8
-rw-r--r--drivers/mmc/host/atmel-mci.c21
-rw-r--r--drivers/mmc/host/mmci.c7
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c5
-rw-r--r--drivers/net/caif/caif_hsi.c2
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h12
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c8
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c12
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c51
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c2
-rw-r--r--drivers/net/ethernet/cisco/enic/enic.h2
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_main.c2
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_main.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/qp.c5
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/resource_tracker.c3
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c15
-rw-r--r--drivers/net/ethernet/packetengines/Kconfig1
-rw-r--r--drivers/net/ethernet/qlogic/qla3xxx.c5
-rw-r--r--drivers/net/ethernet/realtek/r8169.c13
-rw-r--r--drivers/net/hyperv/netvsc_drv.c4
-rw-r--r--drivers/net/tun.c15
-rw-r--r--drivers/net/usb/asix.c4
-rw-r--r--drivers/net/usb/usbnet.c2
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c7
-rw-r--r--drivers/net/vmxnet3/vmxnet3_int.h4
-rw-r--r--drivers/net/wireless/ath/ath9k/ar5008_phy.c25
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9002_hw.c19
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/carl9170/tx.c9
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/ampdu.c12
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c2
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c10
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c9
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c9
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c3
-rw-r--r--drivers/of/fdt.c1
-rw-r--r--drivers/of/of_mdio.c2
-rw-r--r--drivers/pci/pcie/aspm.c3
-rw-r--r--drivers/platform/x86/Kconfig24
-rw-r--r--drivers/platform/x86/Makefile2
-rw-r--r--drivers/platform/x86/acer-wmi.c30
-rw-r--r--drivers/platform/x86/amilo-rfkill.c173
-rw-r--r--drivers/platform/x86/fujitsu-tablet.c478
-rw-r--r--drivers/platform/x86/panasonic-laptop.c4
-rw-r--r--drivers/pps/pps.c4
-rw-r--r--drivers/rapidio/devices/tsi721.c5
-rw-r--r--drivers/regulator/da9052-regulator.c20
-rw-r--r--drivers/regulator/tps6524x-regulator.c2
-rw-r--r--drivers/regulator/tps65910-regulator.c2
-rw-r--r--drivers/rtc/rtc-r9701.c14
-rw-r--r--drivers/s390/cio/qdio_main.c4
-rw-r--r--drivers/scsi/sd_dif.c2
-rw-r--r--drivers/sh/clk/cpg.c16
-rw-r--r--drivers/spi/spi-pl022.c2
-rw-r--r--drivers/tty/Kconfig2
-rw-r--r--drivers/tty/serial/sh-sci.c5
-rw-r--r--drivers/usb/host/ehci-fsl.c11
-rw-r--r--drivers/usb/host/ehci-fsl.h1
-rw-r--r--fs/aio.c24
-rw-r--r--fs/binfmt_aout.c14
-rw-r--r--fs/block_dev.c16
-rw-r--r--fs/btrfs/backref.c8
-rw-r--r--fs/btrfs/reada.c2
-rw-r--r--fs/cifs/dir.c20
-rw-r--r--fs/cifs/file.c69
-rw-r--r--fs/cifs/inode.c28
-rw-r--r--fs/cifs/xattr.c6
-rw-r--r--fs/dcache.c20
-rw-r--r--fs/exec.c18
-rw-r--r--fs/inode.c4
-rw-r--r--fs/namei.c4
-rw-r--r--fs/udf/file.c2
-rw-r--r--include/linux/amba/serial.h2
-rw-r--r--include/linux/dcache.h20
-rw-r--r--include/linux/genhd.h1
-rw-r--r--include/linux/iocontext.h10
-rw-r--r--include/linux/kmsg_dump.h9
-rw-r--r--include/linux/memcontrol.h5
-rw-r--r--include/linux/of.h8
-rw-r--r--include/linux/percpu.h29
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/sh_clk.h5
-rw-r--r--include/linux/tcp.h3
-rw-r--r--include/linux/workqueue.h4
-rw-r--r--include/net/inetpeer.h4
-rw-r--r--include/net/tcp.h5
-rw-r--r--kernel/fork.c60
-rw-r--r--kernel/hung_task.c11
-rw-r--r--kernel/irq/manage.c44
-rw-r--r--kernel/kprobes.c12
-rw-r--r--kernel/printk.c6
-rw-r--r--kernel/sched/core.c4
-rw-r--r--kernel/workqueue.c7
-rw-r--r--lib/debugobjects.c14
-rw-r--r--lib/dynamic_queue_limits.c1
-rw-r--r--lib/vsprintf.c12
-rw-r--r--mm/huge_memory.c6
-rw-r--r--mm/hugetlb.c2
-rw-r--r--mm/ksm.c11
-rw-r--r--mm/memcontrol.c102
-rw-r--r--mm/mempolicy.c3
-rw-r--r--mm/migrate.c2
-rw-r--r--mm/mlock.c3
-rw-r--r--mm/mmap.c17
-rw-r--r--mm/mprotect.c3
-rw-r--r--mm/page_cgroup.c4
-rw-r--r--mm/percpu-vm.c3
-rw-r--r--mm/swap.c8
-rw-r--r--mm/swap_state.c10
-rw-r--r--net/bridge/br_multicast.c7
-rw-r--r--net/bridge/br_netfilter.c32
-rw-r--r--net/bridge/br_stp.c8
-rw-r--r--net/bridge/br_stp_if.c3
-rw-r--r--net/bridge/netfilter/ebtables.c26
-rw-r--r--net/core/rtnetlink.c18
-rw-r--r--net/ipv4/inetpeer.c81
-rw-r--r--net/ipv4/route.c12
-rw-r--r--net/ipv4/syncookies.c30
-rw-r--r--net/ipv4/tcp_input.c23
-rw-r--r--net/ipv4/tcp_ipv4.c10
-rw-r--r--net/ipv6/addrconf.c4
-rw-r--r--net/mac80211/iface.c3
-rw-r--r--net/mac80211/rate.c2
-rw-r--r--net/netfilter/nf_conntrack_core.c8
-rw-r--r--net/netfilter/nf_conntrack_netlink.c3
-rw-r--r--net/openvswitch/actions.c44
-rw-r--r--net/openvswitch/datapath.c3
-rw-r--r--sound/pci/hda/patch_realtek.c17
-rw-r--r--sound/pci/rme9652/hdspm.c1
-rw-r--r--sound/soc/samsung/neo1973_wm8753.c4
-rw-r--r--tools/perf/builtin-record.c33
-rw-r--r--tools/perf/builtin-top.c23
-rw-r--r--tools/perf/perf.h1
-rw-r--r--tools/perf/util/parse-events.c2
-rw-r--r--tools/perf/util/top.h1
-rw-r--r--tools/perf/util/util.c2
323 files changed, 3367 insertions, 3824 deletions
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt
index 141087cf3107..fd2bd56e7195 100644
--- a/Documentation/devicetree/bindings/gpio/led.txt
+++ b/Documentation/devicetree/bindings/gpio/led.txt
@@ -7,9 +7,9 @@ Each LED is represented as a sub-node of the gpio-leds device. Each
7node's name represents the name of the corresponding LED. 7node's name represents the name of the corresponding LED.
8 8
9LED sub-node properties: 9LED sub-node properties:
10- gpios : Should specify the LED's GPIO, see "Specifying GPIO information 10- gpios : Should specify the LED's GPIO, see "gpios property" in
11 for devices" in Documentation/devicetree/booting-without-of.txt. Active 11 Documentation/devicetree/gpio.txt. Active low LEDs should be
12 low LEDs should be indicated using flags in the GPIO specifier. 12 indicated using flags in the GPIO specifier.
13- label : (optional) The label for this LED. If omitted, the label is 13- label : (optional) The label for this LED. If omitted, the label is
14 taken from the node name (excluding the unit address). 14 taken from the node name (excluding the unit address).
15- linux,default-trigger : (optional) This parameter, if present, is a 15- linux,default-trigger : (optional) This parameter, if present, is a
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ecc6a6cd26c1..a20008ab319a 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -30,6 +30,7 @@ national National Semiconductor
30nintendo Nintendo 30nintendo Nintendo
31nvidia NVIDIA 31nvidia NVIDIA
32nxp NXP Semiconductors 32nxp NXP Semiconductors
33picochip Picochip Ltd
33powervr Imagination Technologies 34powervr Imagination Technologies
34qcom Qualcomm, Inc. 35qcom Qualcomm, Inc.
35ramtron Ramtron International 36ramtron Ramtron International
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42
index a22ecf48f255..52729a756c1b 100644
--- a/Documentation/hwmon/jc42
+++ b/Documentation/hwmon/jc42
@@ -7,21 +7,29 @@ Supported chips:
7 Addresses scanned: I2C 0x18 - 0x1f 7 Addresses scanned: I2C 0x18 - 0x1f
8 Datasheets: 8 Datasheets:
9 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf 9 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf
10 * IDT TSE2002B3, TS3000B3 10 * Atmel AT30TS00
11 Prefix: 'tse2002b3', 'ts3000b3' 11 Prefix: 'at30ts00'
12 Addresses scanned: I2C 0x18 - 0x1f 12 Addresses scanned: I2C 0x18 - 0x1f
13 Datasheets: 13 Datasheets:
14 http://www.idt.com/products/getdoc.cfm?docid=18715691 14 http://www.atmel.com/Images/doc8585.pdf
15 http://www.idt.com/products/getdoc.cfm?docid=18715692 15 * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2
16 Prefix: 'tse2002', 'ts3000'
17 Addresses scanned: I2C 0x18 - 0x1f
18 Datasheets:
19 http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf
20 http://www.idt.com/sites/default/files/documents/IDT_TSE2002GB2A1_DST_20111107_120303145914.pdf
21 http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf
22 http://www.idt.com/sites/default/files/documents/IDT_TS3000GB2A1_DST_20111104_120303151012.pdf
16 * Maxim MAX6604 23 * Maxim MAX6604
17 Prefix: 'max6604' 24 Prefix: 'max6604'
18 Addresses scanned: I2C 0x18 - 0x1f 25 Addresses scanned: I2C 0x18 - 0x1f
19 Datasheets: 26 Datasheets:
20 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf 27 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
21 * Microchip MCP9805, MCP98242, MCP98243, MCP9843 28 * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP9843
22 Prefixes: 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843' 29 Prefixes: 'mcp9804', 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843'
23 Addresses scanned: I2C 0x18 - 0x1f 30 Addresses scanned: I2C 0x18 - 0x1f
24 Datasheets: 31 Datasheets:
32 http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf
25 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf 33 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf
26 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf 34 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf
27 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf 35 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf
@@ -48,6 +56,12 @@ Supported chips:
48 Datasheets: 56 Datasheets:
49 http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf 57 http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf
50 http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf 58 http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf
59 * ST Microelectronics STTS2002, STTS3000
60 Prefix: 'stts2002', 'stts3000'
61 Addresses scanned: I2C 0x18 - 0x1f
62 Datasheets:
63 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf
64 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf
51 * JEDEC JC 42.4 compliant temperature sensor chips 65 * JEDEC JC 42.4 compliant temperature sensor chips
52 Prefix: 'jc42' 66 Prefix: 'jc42'
53 Addresses scanned: I2C 0x18 - 0x1f 67 Addresses scanned: I2C 0x18 - 0x1f
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
index f274c28b5103..2f95308251d4 100644
--- a/Documentation/input/alps.txt
+++ b/Documentation/input/alps.txt
@@ -13,7 +13,8 @@ Detection
13 13
14All ALPS touchpads should respond to the "E6 report" command sequence: 14All ALPS touchpads should respond to the "E6 report" command sequence:
15E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or 15E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
1600-00-64. 1600-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s
17if some buttons are pressed.
17 18
18If the E6 report is successful, the touchpad model is identified using the "E7 19If the E6 report is successful, the touchpad model is identified using the "E7
19report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is 20report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 033d4e69b43b..d99fd9c0ec0e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2211,6 +2211,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2211 2211
2212 default: off. 2212 default: off.
2213 2213
2214 printk.always_kmsg_dump=
2215 Trigger kmsg_dump for cases other than kernel oops or
2216 panics
2217 Format: <bool> (1/Y/y=enable, 0/N/n=disable)
2218 default: disabled
2219
2214 printk.time= Show timing data prefixed to each printk message line 2220 printk.time= Show timing data prefixed to each printk message line
2215 Format: <bool> (1/Y/y=enable, 0/N/n=disable) 2221 Format: <bool> (1/Y/y=enable, 0/N/n=disable)
2216 2222
diff --git a/MAINTAINERS b/MAINTAINERS
index 4e41d5255d72..95e4e43a12b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -962,7 +962,7 @@ F: drivers/tty/serial/msm_serial.c
962F: drivers/platform/msm/ 962F: drivers/platform/msm/
963F: drivers/*/pm8???-* 963F: drivers/*/pm8???-*
964F: include/linux/mfd/pm8xxx/ 964F: include/linux/mfd/pm8xxx/
965T: git git://codeaurora.org/quic/kernel/davidb/linux-msm.git 965T: git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
966S: Maintained 966S: Maintained
967 967
968ARM/TOSA MACHINE SUPPORT 968ARM/TOSA MACHINE SUPPORT
@@ -1310,7 +1310,7 @@ F: drivers/atm/
1310F: include/linux/atm* 1310F: include/linux/atm*
1311 1311
1312ATMEL AT91 MCI DRIVER 1312ATMEL AT91 MCI DRIVER
1313M: Nicolas Ferre <nicolas.ferre@atmel.com> 1313M: Ludovic Desroches <ludovic.desroches@atmel.com>
1314L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1314L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1315W: http://www.atmel.com/products/AT91/ 1315W: http://www.atmel.com/products/AT91/
1316W: http://www.at91.com/ 1316W: http://www.at91.com/
@@ -1318,7 +1318,7 @@ S: Maintained
1318F: drivers/mmc/host/at91_mci.c 1318F: drivers/mmc/host/at91_mci.c
1319 1319
1320ATMEL AT91 / AT32 MCI DRIVER 1320ATMEL AT91 / AT32 MCI DRIVER
1321M: Nicolas Ferre <nicolas.ferre@atmel.com> 1321M: Ludovic Desroches <ludovic.desroches@atmel.com>
1322S: Maintained 1322S: Maintained
1323F: drivers/mmc/host/atmel-mci.c 1323F: drivers/mmc/host/atmel-mci.c
1324F: drivers/mmc/host/atmel-mci-regs.h 1324F: drivers/mmc/host/atmel-mci-regs.h
@@ -2845,6 +2845,12 @@ S: Maintained
2845F: drivers/media/video/m5mols/ 2845F: drivers/media/video/m5mols/
2846F: include/media/m5mols.h 2846F: include/media/m5mols.h
2847 2847
2848FUJITSU TABLET EXTRAS
2849M: Robert Gerlach <khnz@gmx.de>
2850L: platform-driver-x86@vger.kernel.org
2851S: Maintained
2852F: drivers/platform/x86/fujitsu-tablet.c
2853
2848FUSE: FILESYSTEM IN USERSPACE 2854FUSE: FILESYSTEM IN USERSPACE
2849M: Miklos Szeredi <miklos@szeredi.hu> 2855M: Miklos Szeredi <miklos@szeredi.hu>
2850L: fuse-devel@lists.sourceforge.net 2856L: fuse-devel@lists.sourceforge.net
diff --git a/Makefile b/Makefile
index 66d13c917bc7..56d481727c30 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 3 2PATCHLEVEL = 3
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc6 4EXTRAVERSION = -rc7
5NAME = Saber-toothed Squirrel 5NAME = Saber-toothed Squirrel
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/alpha/include/asm/futex.h b/arch/alpha/include/asm/futex.h
index e8a761aee088..f939794363ac 100644
--- a/arch/alpha/include/asm/futex.h
+++ b/arch/alpha/include/asm/futex.h
@@ -108,7 +108,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
108 " lda $31,3b-2b(%0)\n" 108 " lda $31,3b-2b(%0)\n"
109 " .previous\n" 109 " .previous\n"
110 : "+r"(ret), "=&r"(prev), "=&r"(cmp) 110 : "+r"(ret), "=&r"(prev), "=&r"(cmp)
111 : "r"(uaddr), "r"((long)oldval), "r"(newval) 111 : "r"(uaddr), "r"((long)(int)oldval), "r"(newval)
112 : "memory"); 112 : "memory");
113 113
114 *uval = prev; 114 *uval = prev;
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7d809b7e0504..87693e631129 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1286,7 +1286,7 @@ config ARM_ERRATA_743622
1286 depends on CPU_V7 1286 depends on CPU_V7
1287 help 1287 help
1288 This option enables the workaround for the 743622 Cortex-A9 1288 This option enables the workaround for the 743622 Cortex-A9
1289 (r2p0..r2p2) erratum. Under very rare conditions, a faulty 1289 (r2p*) erratum. Under very rare conditions, a faulty
1290 optimisation in the Cortex-A9 Store Buffer may lead to data 1290 optimisation in the Cortex-A9 Store Buffer may lead to data
1291 corruption. This workaround sets a specific bit in the diagnostic 1291 corruption. This workaround sets a specific bit in the diagnostic
1292 register of the Cortex-A9 which disables the Store Buffer 1292 register of the Cortex-A9 which disables the Store Buffer
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
index ce1c5ff746e7..3c79f85975aa 100644
--- a/arch/arm/boot/.gitignore
+++ b/arch/arm/boot/.gitignore
@@ -3,3 +3,4 @@ zImage
3xipImage 3xipImage
4bootpImage 4bootpImage
5uImage 5uImage
6*.dtb
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h
index b5a5be2536c1..90114faa9f3c 100644
--- a/arch/arm/include/asm/pmu.h
+++ b/arch/arm/include/asm/pmu.h
@@ -134,7 +134,7 @@ int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type);
134 134
135u64 armpmu_event_update(struct perf_event *event, 135u64 armpmu_event_update(struct perf_event *event,
136 struct hw_perf_event *hwc, 136 struct hw_perf_event *hwc,
137 int idx, int overflow); 137 int idx);
138 138
139int armpmu_event_set_period(struct perf_event *event, 139int armpmu_event_set_period(struct perf_event *event,
140 struct hw_perf_event *hwc, 140 struct hw_perf_event *hwc,
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index 4dd0edab6a65..1651d4950744 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -242,6 +242,7 @@ static void ecard_init_pgtables(struct mm_struct *mm)
242 242
243 memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); 243 memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));
244 244
245 vma.vm_flags = VM_EXEC;
245 vma.vm_mm = mm; 246 vma.vm_mm = mm;
246 247
247 flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE); 248 flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE);
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index 5bb91bf3d47f..b2abfa18f137 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -180,7 +180,7 @@ armpmu_event_set_period(struct perf_event *event,
180u64 180u64
181armpmu_event_update(struct perf_event *event, 181armpmu_event_update(struct perf_event *event,
182 struct hw_perf_event *hwc, 182 struct hw_perf_event *hwc,
183 int idx, int overflow) 183 int idx)
184{ 184{
185 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); 185 struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
186 u64 delta, prev_raw_count, new_raw_count; 186 u64 delta, prev_raw_count, new_raw_count;
@@ -193,13 +193,7 @@ again:
193 new_raw_count) != prev_raw_count) 193 new_raw_count) != prev_raw_count)
194 goto again; 194 goto again;
195 195
196 new_raw_count &= armpmu->max_period; 196 delta = (new_raw_count - prev_raw_count) & armpmu->max_period;
197 prev_raw_count &= armpmu->max_period;
198
199 if (overflow)
200 delta = armpmu->max_period - prev_raw_count + new_raw_count + 1;
201 else
202 delta = new_raw_count - prev_raw_count;
203 197
204 local64_add(delta, &event->count); 198 local64_add(delta, &event->count);
205 local64_sub(delta, &hwc->period_left); 199 local64_sub(delta, &hwc->period_left);
@@ -216,7 +210,7 @@ armpmu_read(struct perf_event *event)
216 if (hwc->idx < 0) 210 if (hwc->idx < 0)
217 return; 211 return;
218 212
219 armpmu_event_update(event, hwc, hwc->idx, 0); 213 armpmu_event_update(event, hwc, hwc->idx);
220} 214}
221 215
222static void 216static void
@@ -232,7 +226,7 @@ armpmu_stop(struct perf_event *event, int flags)
232 if (!(hwc->state & PERF_HES_STOPPED)) { 226 if (!(hwc->state & PERF_HES_STOPPED)) {
233 armpmu->disable(hwc, hwc->idx); 227 armpmu->disable(hwc, hwc->idx);
234 barrier(); /* why? */ 228 barrier(); /* why? */
235 armpmu_event_update(event, hwc, hwc->idx, 0); 229 armpmu_event_update(event, hwc, hwc->idx);
236 hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; 230 hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
237 } 231 }
238} 232}
@@ -518,7 +512,13 @@ __hw_perf_event_init(struct perf_event *event)
518 hwc->config_base |= (unsigned long)mapping; 512 hwc->config_base |= (unsigned long)mapping;
519 513
520 if (!hwc->sample_period) { 514 if (!hwc->sample_period) {
521 hwc->sample_period = armpmu->max_period; 515 /*
516 * For non-sampling runs, limit the sample_period to half
517 * of the counter width. That way, the new counter value
518 * is far less likely to overtake the previous one unless
519 * you have some serious IRQ latency issues.
520 */
521 hwc->sample_period = armpmu->max_period >> 1;
522 hwc->last_period = hwc->sample_period; 522 hwc->last_period = hwc->sample_period;
523 local64_set(&hwc->period_left, hwc->sample_period); 523 local64_set(&hwc->period_left, hwc->sample_period);
524 } 524 }
@@ -680,6 +680,28 @@ static void __init cpu_pmu_init(struct arm_pmu *armpmu)
680} 680}
681 681
682/* 682/*
683 * PMU hardware loses all context when a CPU goes offline.
684 * When a CPU is hotplugged back in, since some hardware registers are
685 * UNKNOWN at reset, the PMU must be explicitly reset to avoid reading
686 * junk values out of them.
687 */
688static int __cpuinit pmu_cpu_notify(struct notifier_block *b,
689 unsigned long action, void *hcpu)
690{
691 if ((action & ~CPU_TASKS_FROZEN) != CPU_STARTING)
692 return NOTIFY_DONE;
693
694 if (cpu_pmu && cpu_pmu->reset)
695 cpu_pmu->reset(NULL);
696
697 return NOTIFY_OK;
698}
699
700static struct notifier_block __cpuinitdata pmu_cpu_notifier = {
701 .notifier_call = pmu_cpu_notify,
702};
703
704/*
683 * CPU PMU identification and registration. 705 * CPU PMU identification and registration.
684 */ 706 */
685static int __init 707static int __init
@@ -730,6 +752,7 @@ init_hw_perf_events(void)
730 pr_info("enabled with %s PMU driver, %d counters available\n", 752 pr_info("enabled with %s PMU driver, %d counters available\n",
731 cpu_pmu->name, cpu_pmu->num_events); 753 cpu_pmu->name, cpu_pmu->num_events);
732 cpu_pmu_init(cpu_pmu); 754 cpu_pmu_init(cpu_pmu);
755 register_cpu_notifier(&pmu_cpu_notifier);
733 armpmu_register(cpu_pmu, "cpu", PERF_TYPE_RAW); 756 armpmu_register(cpu_pmu, "cpu", PERF_TYPE_RAW);
734 } else { 757 } else {
735 pr_info("no hardware support available\n"); 758 pr_info("no hardware support available\n");
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c
index 533be9930ec2..b78af0cc6ef3 100644
--- a/arch/arm/kernel/perf_event_v6.c
+++ b/arch/arm/kernel/perf_event_v6.c
@@ -467,23 +467,6 @@ armv6pmu_enable_event(struct hw_perf_event *hwc,
467 raw_spin_unlock_irqrestore(&events->pmu_lock, flags); 467 raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
468} 468}
469 469
470static int counter_is_active(unsigned long pmcr, int idx)
471{
472 unsigned long mask = 0;
473 if (idx == ARMV6_CYCLE_COUNTER)
474 mask = ARMV6_PMCR_CCOUNT_IEN;
475 else if (idx == ARMV6_COUNTER0)
476 mask = ARMV6_PMCR_COUNT0_IEN;
477 else if (idx == ARMV6_COUNTER1)
478 mask = ARMV6_PMCR_COUNT1_IEN;
479
480 if (mask)
481 return pmcr & mask;
482
483 WARN_ONCE(1, "invalid counter number (%d)\n", idx);
484 return 0;
485}
486
487static irqreturn_t 470static irqreturn_t
488armv6pmu_handle_irq(int irq_num, 471armv6pmu_handle_irq(int irq_num,
489 void *dev) 472 void *dev)
@@ -513,7 +496,8 @@ armv6pmu_handle_irq(int irq_num,
513 struct perf_event *event = cpuc->events[idx]; 496 struct perf_event *event = cpuc->events[idx];
514 struct hw_perf_event *hwc; 497 struct hw_perf_event *hwc;
515 498
516 if (!counter_is_active(pmcr, idx)) 499 /* Ignore if we don't have an event. */
500 if (!event)
517 continue; 501 continue;
518 502
519 /* 503 /*
@@ -524,7 +508,7 @@ armv6pmu_handle_irq(int irq_num,
524 continue; 508 continue;
525 509
526 hwc = &event->hw; 510 hwc = &event->hw;
527 armpmu_event_update(event, hwc, idx, 1); 511 armpmu_event_update(event, hwc, idx);
528 data.period = event->hw.last_period; 512 data.period = event->hw.last_period;
529 if (!armpmu_event_set_period(event, hwc, idx)) 513 if (!armpmu_event_set_period(event, hwc, idx))
530 continue; 514 continue;
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 6933244c68f9..4d7095af2ab3 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -809,6 +809,11 @@ static inline int armv7_pmnc_disable_intens(int idx)
809 809
810 counter = ARMV7_IDX_TO_COUNTER(idx); 810 counter = ARMV7_IDX_TO_COUNTER(idx);
811 asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter))); 811 asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter)));
812 isb();
813 /* Clear the overflow flag in case an interrupt is pending. */
814 asm volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (BIT(counter)));
815 isb();
816
812 return idx; 817 return idx;
813} 818}
814 819
@@ -955,6 +960,10 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
955 struct perf_event *event = cpuc->events[idx]; 960 struct perf_event *event = cpuc->events[idx];
956 struct hw_perf_event *hwc; 961 struct hw_perf_event *hwc;
957 962
963 /* Ignore if we don't have an event. */
964 if (!event)
965 continue;
966
958 /* 967 /*
959 * We have a single interrupt for all counters. Check that 968 * We have a single interrupt for all counters. Check that
960 * each counter has overflowed before we process it. 969 * each counter has overflowed before we process it.
@@ -963,7 +972,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
963 continue; 972 continue;
964 973
965 hwc = &event->hw; 974 hwc = &event->hw;
966 armpmu_event_update(event, hwc, idx, 1); 975 armpmu_event_update(event, hwc, idx);
967 data.period = event->hw.last_period; 976 data.period = event->hw.last_period;
968 if (!armpmu_event_set_period(event, hwc, idx)) 977 if (!armpmu_event_set_period(event, hwc, idx))
969 continue; 978 continue;
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c
index 3b99d8269829..71a21e6712f5 100644
--- a/arch/arm/kernel/perf_event_xscale.c
+++ b/arch/arm/kernel/perf_event_xscale.c
@@ -255,11 +255,14 @@ xscale1pmu_handle_irq(int irq_num, void *dev)
255 struct perf_event *event = cpuc->events[idx]; 255 struct perf_event *event = cpuc->events[idx];
256 struct hw_perf_event *hwc; 256 struct hw_perf_event *hwc;
257 257
258 if (!event)
259 continue;
260
258 if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx)) 261 if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx))
259 continue; 262 continue;
260 263
261 hwc = &event->hw; 264 hwc = &event->hw;
262 armpmu_event_update(event, hwc, idx, 1); 265 armpmu_event_update(event, hwc, idx);
263 data.period = event->hw.last_period; 266 data.period = event->hw.last_period;
264 if (!armpmu_event_set_period(event, hwc, idx)) 267 if (!armpmu_event_set_period(event, hwc, idx))
265 continue; 268 continue;
@@ -592,11 +595,14 @@ xscale2pmu_handle_irq(int irq_num, void *dev)
592 struct perf_event *event = cpuc->events[idx]; 595 struct perf_event *event = cpuc->events[idx];
593 struct hw_perf_event *hwc; 596 struct hw_perf_event *hwc;
594 597
595 if (!xscale2_pmnc_counter_has_overflowed(pmnc, idx)) 598 if (!event)
599 continue;
600
601 if (!xscale2_pmnc_counter_has_overflowed(of_flags, idx))
596 continue; 602 continue;
597 603
598 hwc = &event->hw; 604 hwc = &event->hw;
599 armpmu_event_update(event, hwc, idx, 1); 605 armpmu_event_update(event, hwc, idx);
600 data.period = event->hw.last_period; 606 data.period = event->hw.last_period;
601 if (!armpmu_event_set_period(event, hwc, idx)) 607 if (!armpmu_event_set_period(event, hwc, idx))
602 continue; 608 continue;
@@ -663,7 +669,7 @@ xscale2pmu_enable_event(struct hw_perf_event *hwc, int idx)
663static void 669static void
664xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) 670xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
665{ 671{
666 unsigned long flags, ien, evtsel; 672 unsigned long flags, ien, evtsel, of_flags;
667 struct pmu_hw_events *events = cpu_pmu->get_hw_events(); 673 struct pmu_hw_events *events = cpu_pmu->get_hw_events();
668 674
669 ien = xscale2pmu_read_int_enable(); 675 ien = xscale2pmu_read_int_enable();
@@ -672,26 +678,31 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
672 switch (idx) { 678 switch (idx) {
673 case XSCALE_CYCLE_COUNTER: 679 case XSCALE_CYCLE_COUNTER:
674 ien &= ~XSCALE2_CCOUNT_INT_EN; 680 ien &= ~XSCALE2_CCOUNT_INT_EN;
681 of_flags = XSCALE2_CCOUNT_OVERFLOW;
675 break; 682 break;
676 case XSCALE_COUNTER0: 683 case XSCALE_COUNTER0:
677 ien &= ~XSCALE2_COUNT0_INT_EN; 684 ien &= ~XSCALE2_COUNT0_INT_EN;
678 evtsel &= ~XSCALE2_COUNT0_EVT_MASK; 685 evtsel &= ~XSCALE2_COUNT0_EVT_MASK;
679 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT; 686 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT;
687 of_flags = XSCALE2_COUNT0_OVERFLOW;
680 break; 688 break;
681 case XSCALE_COUNTER1: 689 case XSCALE_COUNTER1:
682 ien &= ~XSCALE2_COUNT1_INT_EN; 690 ien &= ~XSCALE2_COUNT1_INT_EN;
683 evtsel &= ~XSCALE2_COUNT1_EVT_MASK; 691 evtsel &= ~XSCALE2_COUNT1_EVT_MASK;
684 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT; 692 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT;
693 of_flags = XSCALE2_COUNT1_OVERFLOW;
685 break; 694 break;
686 case XSCALE_COUNTER2: 695 case XSCALE_COUNTER2:
687 ien &= ~XSCALE2_COUNT2_INT_EN; 696 ien &= ~XSCALE2_COUNT2_INT_EN;
688 evtsel &= ~XSCALE2_COUNT2_EVT_MASK; 697 evtsel &= ~XSCALE2_COUNT2_EVT_MASK;
689 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT; 698 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT;
699 of_flags = XSCALE2_COUNT2_OVERFLOW;
690 break; 700 break;
691 case XSCALE_COUNTER3: 701 case XSCALE_COUNTER3:
692 ien &= ~XSCALE2_COUNT3_INT_EN; 702 ien &= ~XSCALE2_COUNT3_INT_EN;
693 evtsel &= ~XSCALE2_COUNT3_EVT_MASK; 703 evtsel &= ~XSCALE2_COUNT3_EVT_MASK;
694 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT; 704 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT;
705 of_flags = XSCALE2_COUNT3_OVERFLOW;
695 break; 706 break;
696 default: 707 default:
697 WARN_ONCE(1, "invalid counter number (%d)\n", idx); 708 WARN_ONCE(1, "invalid counter number (%d)\n", idx);
@@ -701,6 +712,7 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
701 raw_spin_lock_irqsave(&events->pmu_lock, flags); 712 raw_spin_lock_irqsave(&events->pmu_lock, flags);
702 xscale2pmu_write_event_select(evtsel); 713 xscale2pmu_write_event_select(evtsel);
703 xscale2pmu_write_int_enable(ien); 714 xscale2pmu_write_int_enable(ien);
715 xscale2pmu_write_overflow_flags(of_flags);
704 raw_spin_unlock_irqrestore(&events->pmu_lock, flags); 716 raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
705} 717}
706 718
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index b7582dd10dc3..96e2adcd5a84 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -38,10 +38,6 @@
38#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) 38#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
39static u64 hdmac_dmamask = DMA_BIT_MASK(32); 39static u64 hdmac_dmamask = DMA_BIT_MASK(32);
40 40
41static struct at_dma_platform_data atdma_pdata = {
42 .nr_channels = 8,
43};
44
45static struct resource hdmac_resources[] = { 41static struct resource hdmac_resources[] = {
46 [0] = { 42 [0] = {
47 .start = AT91SAM9G45_BASE_DMA, 43 .start = AT91SAM9G45_BASE_DMA,
@@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = {
56}; 52};
57 53
58static struct platform_device at_hdmac_device = { 54static struct platform_device at_hdmac_device = {
59 .name = "at_hdmac", 55 .name = "at91sam9g45_dma",
60 .id = -1, 56 .id = -1,
61 .dev = { 57 .dev = {
62 .dma_mask = &hdmac_dmamask, 58 .dma_mask = &hdmac_dmamask,
63 .coherent_dma_mask = DMA_BIT_MASK(32), 59 .coherent_dma_mask = DMA_BIT_MASK(32),
64 .platform_data = &atdma_pdata,
65 }, 60 },
66 .resource = hdmac_resources, 61 .resource = hdmac_resources,
67 .num_resources = ARRAY_SIZE(hdmac_resources), 62 .num_resources = ARRAY_SIZE(hdmac_resources),
@@ -69,9 +64,15 @@ static struct platform_device at_hdmac_device = {
69 64
70void __init at91_add_device_hdmac(void) 65void __init at91_add_device_hdmac(void)
71{ 66{
72 dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); 67#if defined(CONFIG_OF)
73 dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask); 68 struct device_node *of_node =
74 platform_device_register(&at_hdmac_device); 69 of_find_node_by_name(NULL, "dma-controller");
70
71 if (of_node)
72 of_node_put(of_node);
73 else
74#endif
75 platform_device_register(&at_hdmac_device);
75} 76}
76#else 77#else
77void __init at91_add_device_hdmac(void) {} 78void __init at91_add_device_hdmac(void) {}
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 61908dce9784..9be71c11d0f0 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -33,10 +33,6 @@
33#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) 33#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
34static u64 hdmac_dmamask = DMA_BIT_MASK(32); 34static u64 hdmac_dmamask = DMA_BIT_MASK(32);
35 35
36static struct at_dma_platform_data atdma_pdata = {
37 .nr_channels = 2,
38};
39
40static struct resource hdmac_resources[] = { 36static struct resource hdmac_resources[] = {
41 [0] = { 37 [0] = {
42 .start = AT91SAM9RL_BASE_DMA, 38 .start = AT91SAM9RL_BASE_DMA,
@@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = {
51}; 47};
52 48
53static struct platform_device at_hdmac_device = { 49static struct platform_device at_hdmac_device = {
54 .name = "at_hdmac", 50 .name = "at91sam9rl_dma",
55 .id = -1, 51 .id = -1,
56 .dev = { 52 .dev = {
57 .dma_mask = &hdmac_dmamask, 53 .dma_mask = &hdmac_dmamask,
58 .coherent_dma_mask = DMA_BIT_MASK(32), 54 .coherent_dma_mask = DMA_BIT_MASK(32),
59 .platform_data = &atdma_pdata,
60 }, 55 },
61 .resource = hdmac_resources, 56 .resource = hdmac_resources,
62 .num_resources = ARRAY_SIZE(hdmac_resources), 57 .num_resources = ARRAY_SIZE(hdmac_resources),
@@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = {
64 59
65void __init at91_add_device_hdmac(void) 60void __init at91_add_device_hdmac(void)
66{ 61{
67 dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
68 platform_device_register(&at_hdmac_device); 62 platform_device_register(&at_hdmac_device);
69} 63}
70#else 64#else
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index d5fb44f16d31..d67d0b4feb6f 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -34,6 +34,7 @@
34#include <mach/ep93xx_spi.h> 34#include <mach/ep93xx_spi.h>
35#include <mach/gpio-ep93xx.h> 35#include <mach/gpio-ep93xx.h>
36 36
37#include <asm/hardware/vic.h>
37#include <asm/mach-types.h> 38#include <asm/mach-types.h>
38#include <asm/mach/map.h> 39#include <asm/mach/map.h>
39#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
@@ -361,6 +362,7 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
361 .atag_offset = 0x100, 362 .atag_offset = 0x100,
362 .map_io = vision_map_io, 363 .map_io = vision_map_io,
363 .init_irq = ep93xx_init_irq, 364 .init_irq = ep93xx_init_irq,
365 .handle_irq = vic_handle_irq,
364 .timer = &ep93xx_timer, 366 .timer = &ep93xx_timer,
365 .init_machine = vision_init_machine, 367 .init_machine = vision_init_machine,
366 .restart = ep93xx_restart, 368 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index e00d8e26d525..5ca91ec12642 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -13,6 +13,7 @@
13#include <linux/i2c.h> 13#include <linux/i2c.h>
14#include <linux/gpio_keys.h> 14#include <linux/gpio_keys.h>
15#include <linux/gpio.h> 15#include <linux/gpio.h>
16#include <linux/interrupt.h>
16#include <linux/fb.h> 17#include <linux/fb.h>
17#include <linux/mfd/max8998.h> 18#include <linux/mfd/max8998.h>
18#include <linux/regulator/machine.h> 19#include <linux/regulator/machine.h>
@@ -595,6 +596,7 @@ static struct mxt_platform_data qt602240_platform_data = {
595 .threshold = 0x28, 596 .threshold = 0x28,
596 .voltage = 2800000, /* 2.8V */ 597 .voltage = 2800000, /* 2.8V */
597 .orient = MXT_DIAGONAL, 598 .orient = MXT_DIAGONAL,
599 .irqflags = IRQF_TRIGGER_FALLING,
598}; 600};
599 601
600static struct i2c_board_info i2c3_devs[] __initdata = { 602static struct i2c_board_info i2c3_devs[] __initdata = {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 6c5826605eae..719ee423abe2 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -343,6 +343,7 @@ static void __init omap3_check_revision(const char **cpu_rev)
343 case 0xb944: 343 case 0xb944:
344 omap_revision = AM335X_REV_ES1_0; 344 omap_revision = AM335X_REV_ES1_0;
345 *cpu_rev = "1.0"; 345 *cpu_rev = "1.0";
346 break;
346 case 0xb8f2: 347 case 0xb8f2:
347 switch (rev) { 348 switch (rev) {
348 case 0: 349 case 0:
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 2cc1aa004b94..415a6f1cf419 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -420,8 +420,7 @@ static void __exit omap2_mbox_exit(void)
420 platform_driver_unregister(&omap2_mbox_driver); 420 platform_driver_unregister(&omap2_mbox_driver);
421} 421}
422 422
423/* must be ready before omap3isp is probed */ 423module_init(omap2_mbox_init);
424subsys_initcall(omap2_mbox_init);
425module_exit(omap2_mbox_exit); 424module_exit(omap2_mbox_exit);
426 425
427MODULE_LICENSE("GPL v2"); 426MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index b8822048e409..ac49384d0285 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -150,7 +150,8 @@ err_out:
150 platform_device_put(omap_iommu_pdev[i]); 150 platform_device_put(omap_iommu_pdev[i]);
151 return err; 151 return err;
152} 152}
153module_init(omap_iommu_init); 153/* must be ready before omap3isp is probed */
154subsys_initcall(omap_iommu_init);
154 155
155static void __exit omap_iommu_exit(void) 156static void __exit omap_iommu_exit(void)
156{ 157{
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index ebc595091312..70de277f5c15 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -31,6 +31,7 @@
31 31
32#include "common.h" 32#include "common.h"
33#include "omap4-sar-layout.h" 33#include "omap4-sar-layout.h"
34#include <linux/export.h>
34 35
35#ifdef CONFIG_CACHE_L2X0 36#ifdef CONFIG_CACHE_L2X0
36static void __iomem *l2cache_base; 37static void __iomem *l2cache_base;
@@ -55,6 +56,7 @@ void omap_bus_sync(void)
55 isb(); 56 isb();
56 } 57 }
57} 58}
59EXPORT_SYMBOL(omap_bus_sync);
58 60
59/* Steal one page physical memory for barrier implementation */ 61/* Steal one page physical memory for barrier implementation */
60int __init omap_barrier_reserve_memblock(void) 62int __init omap_barrier_reserve_memblock(void)
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 10b20c652e5d..4b57757bf9d1 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -270,7 +270,6 @@ static struct regulator_init_data omap4_vusb_idata = {
270 .constraints = { 270 .constraints = {
271 .min_uV = 3300000, 271 .min_uV = 3300000,
272 .max_uV = 3300000, 272 .max_uV = 3300000,
273 .apply_uV = true,
274 .valid_modes_mask = REGULATOR_MODE_NORMAL 273 .valid_modes_mask = REGULATOR_MODE_NORMAL
275 | REGULATOR_MODE_STANDBY, 274 | REGULATOR_MODE_STANDBY,
276 .valid_ops_mask = REGULATOR_CHANGE_MODE 275 .valid_ops_mask = REGULATOR_CHANGE_MODE
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 0d729e6619df..42d5cca66257 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -49,7 +49,6 @@ extern unsigned pxa3xx_get_clk_frequency_khz(int);
49#endif 49#endif
50 50
51extern struct syscore_ops pxa_irq_syscore_ops; 51extern struct syscore_ops pxa_irq_syscore_ops;
52extern struct syscore_ops pxa_gpio_syscore_ops;
53extern struct syscore_ops pxa2xx_mfp_syscore_ops; 52extern struct syscore_ops pxa2xx_mfp_syscore_ops;
54extern struct syscore_ops pxa3xx_mfp_syscore_ops; 53extern struct syscore_ops pxa3xx_mfp_syscore_ops;
55 54
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index f14775536b83..29b62afc6f7c 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -226,6 +226,12 @@ static void __init pxa25x_mfp_init(void)
226{ 226{
227 int i; 227 int i;
228 228
229 /* running before pxa_gpio_probe() */
230#ifdef CONFIG_CPU_PXA26x
231 pxa_last_gpio = 89;
232#else
233 pxa_last_gpio = 84;
234#endif
229 for (i = 0; i <= pxa_last_gpio; i++) 235 for (i = 0; i <= pxa_last_gpio; i++)
230 gpio_desc[i].valid = 1; 236 gpio_desc[i].valid = 1;
231 237
@@ -295,6 +301,7 @@ static void __init pxa27x_mfp_init(void)
295{ 301{
296 int i, gpio; 302 int i, gpio;
297 303
304 pxa_last_gpio = 120; /* running before pxa_gpio_probe() */
298 for (i = 0; i <= pxa_last_gpio; i++) { 305 for (i = 0; i <= pxa_last_gpio; i++) {
299 /* skip GPIO2, 5, 6, 7, 8, they are not 306 /* skip GPIO2, 5, 6, 7, 8, they are not
300 * valid pins allow configuration 307 * valid pins allow configuration
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 00d6eacab8e4..3352b37b60cf 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -208,6 +208,7 @@ static struct clk_lookup pxa25x_clkregs[] = {
208 INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), 208 INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"),
209 INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), 209 INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"),
210 INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), 210 INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL),
211 INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL),
211}; 212};
212 213
213static struct clk_lookup pxa25x_hwuart_clkreg = 214static struct clk_lookup pxa25x_hwuart_clkreg =
@@ -367,7 +368,6 @@ static int __init pxa25x_init(void)
367 368
368 register_syscore_ops(&pxa_irq_syscore_ops); 369 register_syscore_ops(&pxa_irq_syscore_ops);
369 register_syscore_ops(&pxa2xx_mfp_syscore_ops); 370 register_syscore_ops(&pxa2xx_mfp_syscore_ops);
370 register_syscore_ops(&pxa_gpio_syscore_ops);
371 register_syscore_ops(&pxa2xx_clock_syscore_ops); 371 register_syscore_ops(&pxa2xx_clock_syscore_ops);
372 372
373 ret = platform_add_devices(pxa25x_devices, 373 ret = platform_add_devices(pxa25x_devices,
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index c1673b3441d4..6bce78edce7a 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -229,6 +229,7 @@ static struct clk_lookup pxa27x_clkregs[] = {
229 INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), 229 INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"),
230 INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), 230 INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"),
231 INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), 231 INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL),
232 INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL),
232}; 233};
233 234
234#ifdef CONFIG_PM 235#ifdef CONFIG_PM
@@ -455,7 +456,6 @@ static int __init pxa27x_init(void)
455 456
456 register_syscore_ops(&pxa_irq_syscore_ops); 457 register_syscore_ops(&pxa_irq_syscore_ops);
457 register_syscore_ops(&pxa2xx_mfp_syscore_ops); 458 register_syscore_ops(&pxa2xx_mfp_syscore_ops);
458 register_syscore_ops(&pxa_gpio_syscore_ops);
459 register_syscore_ops(&pxa2xx_clock_syscore_ops); 459 register_syscore_ops(&pxa2xx_clock_syscore_ops);
460 460
461 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 461 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 4f402afa6609..3918a672238e 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -462,7 +462,6 @@ static int __init pxa3xx_init(void)
462 462
463 register_syscore_ops(&pxa_irq_syscore_ops); 463 register_syscore_ops(&pxa_irq_syscore_ops);
464 register_syscore_ops(&pxa3xx_mfp_syscore_ops); 464 register_syscore_ops(&pxa3xx_mfp_syscore_ops);
465 register_syscore_ops(&pxa_gpio_syscore_ops);
466 register_syscore_ops(&pxa3xx_clock_syscore_ops); 465 register_syscore_ops(&pxa3xx_clock_syscore_ops);
467 466
468 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 467 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c
index d082a583df78..5ce434b95e87 100644
--- a/arch/arm/mach-pxa/pxa95x.c
+++ b/arch/arm/mach-pxa/pxa95x.c
@@ -283,7 +283,6 @@ static int __init pxa95x_init(void)
283 return ret; 283 return ret;
284 284
285 register_syscore_ops(&pxa_irq_syscore_ops); 285 register_syscore_ops(&pxa_irq_syscore_ops);
286 register_syscore_ops(&pxa_gpio_syscore_ops);
287 register_syscore_ops(&pxa3xx_clock_syscore_ops); 286 register_syscore_ops(&pxa3xx_clock_syscore_ops);
288 287
289 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 288 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-s3c2440/common.h b/arch/arm/mach-s3c2440/common.h
index db8a98ac68c5..0c1eb1dfc534 100644
--- a/arch/arm/mach-s3c2440/common.h
+++ b/arch/arm/mach-s3c2440/common.h
@@ -12,6 +12,6 @@
12#ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H 12#ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H
13#define __ARCH_ARM_MACH_S3C2440_COMMON_H 13#define __ARCH_ARM_MACH_S3C2440_COMMON_H
14 14
15void s3c2440_restart(char mode, const char *cmd); 15void s3c244x_restart(char mode, const char *cmd);
16 16
17#endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ 17#endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 24569550de1a..19b577bc09b8 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -487,5 +487,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
487 .init_machine = anubis_init, 487 .init_machine = anubis_init,
488 .init_irq = s3c24xx_init_irq, 488 .init_irq = s3c24xx_init_irq,
489 .timer = &s3c24xx_timer, 489 .timer = &s3c24xx_timer,
490 .restart = s3c2440_restart, 490 .restart = s3c244x_restart,
491MACHINE_END 491MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c
index d6a9763110cd..d7ae49c90118 100644
--- a/arch/arm/mach-s3c2440/mach-at2440evb.c
+++ b/arch/arm/mach-s3c2440/mach-at2440evb.c
@@ -222,5 +222,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
222 .init_machine = at2440evb_init, 222 .init_machine = at2440evb_init,
223 .init_irq = s3c24xx_init_irq, 223 .init_irq = s3c24xx_init_irq,
224 .timer = &s3c24xx_timer, 224 .timer = &s3c24xx_timer,
225 .restart = s3c2440_restart, 225 .restart = s3c244x_restart,
226MACHINE_END 226MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 7365a441cc5c..cfd20202e944 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -601,5 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
601 .init_irq = s3c24xx_init_irq, 601 .init_irq = s3c24xx_init_irq,
602 .init_machine = gta02_machine_init, 602 .init_machine = gta02_machine_init,
603 .timer = &s3c24xx_timer, 603 .timer = &s3c24xx_timer,
604 .restart = s3c2440_restart, 604 .restart = s3c244x_restart,
605MACHINE_END 605MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c
index adbbb85bc4cd..5d66fb218a41 100644
--- a/arch/arm/mach-s3c2440/mach-mini2440.c
+++ b/arch/arm/mach-s3c2440/mach-mini2440.c
@@ -701,5 +701,5 @@ MACHINE_START(MINI2440, "MINI2440")
701 .init_machine = mini2440_init, 701 .init_machine = mini2440_init,
702 .init_irq = s3c24xx_init_irq, 702 .init_irq = s3c24xx_init_irq,
703 .timer = &s3c24xx_timer, 703 .timer = &s3c24xx_timer,
704 .restart = s3c2440_restart, 704 .restart = s3c244x_restart,
705MACHINE_END 705MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c
index 40eaf844bc1f..5198e3e1c5be 100644
--- a/arch/arm/mach-s3c2440/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2440/mach-nexcoder.c
@@ -158,5 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
158 .init_machine = nexcoder_init, 158 .init_machine = nexcoder_init,
159 .init_irq = s3c24xx_init_irq, 159 .init_irq = s3c24xx_init_irq,
160 .timer = &s3c24xx_timer, 160 .timer = &s3c24xx_timer,
161 .restart = s3c2440_restart, 161 .restart = s3c244x_restart,
162MACHINE_END 162MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 4c480ef734f6..c5daeb612a88 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -436,5 +436,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
436 .init_irq = s3c24xx_init_irq, 436 .init_irq = s3c24xx_init_irq,
437 .init_machine = osiris_init, 437 .init_machine = osiris_init,
438 .timer = &s3c24xx_timer, 438 .timer = &s3c24xx_timer,
439 .restart = s3c2440_restart, 439 .restart = s3c244x_restart,
440MACHINE_END 440MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c
index 4a8e2d34994c..200debb4c72d 100644
--- a/arch/arm/mach-s3c2440/mach-rx1950.c
+++ b/arch/arm/mach-s3c2440/mach-rx1950.c
@@ -822,5 +822,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
822 .init_irq = s3c24xx_init_irq, 822 .init_irq = s3c24xx_init_irq,
823 .init_machine = rx1950_init_machine, 823 .init_machine = rx1950_init_machine,
824 .timer = &s3c24xx_timer, 824 .timer = &s3c24xx_timer,
825 .restart = s3c2440_restart, 825 .restart = s3c244x_restart,
826MACHINE_END 826MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c
index 20103bafbd4b..56af35447598 100644
--- a/arch/arm/mach-s3c2440/mach-rx3715.c
+++ b/arch/arm/mach-s3c2440/mach-rx3715.c
@@ -213,5 +213,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
213 .init_irq = rx3715_init_irq, 213 .init_irq = rx3715_init_irq,
214 .init_machine = rx3715_init_machine, 214 .init_machine = rx3715_init_machine,
215 .timer = &s3c24xx_timer, 215 .timer = &s3c24xx_timer,
216 .restart = s3c2440_restart, 216 .restart = s3c244x_restart,
217MACHINE_END 217MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c
index 1deb60d12a60..83a1036d7dcb 100644
--- a/arch/arm/mach-s3c2440/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2440/mach-smdk2440.c
@@ -183,5 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440")
183 .map_io = smdk2440_map_io, 183 .map_io = smdk2440_map_io,
184 .init_machine = smdk2440_machine_init, 184 .init_machine = smdk2440_machine_init,
185 .timer = &s3c24xx_timer, 185 .timer = &s3c24xx_timer,
186 .restart = s3c2440_restart, 186 .restart = s3c244x_restart,
187MACHINE_END 187MACHINE_END
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c
index 517623a09fc5..2b3dddb49af7 100644
--- a/arch/arm/mach-s3c2440/s3c2440.c
+++ b/arch/arm/mach-s3c2440/s3c2440.c
@@ -35,7 +35,6 @@
35#include <plat/cpu.h> 35#include <plat/cpu.h>
36#include <plat/s3c244x.h> 36#include <plat/s3c244x.h>
37#include <plat/pm.h> 37#include <plat/pm.h>
38#include <plat/watchdog-reset.h>
39 38
40#include <plat/gpio-core.h> 39#include <plat/gpio-core.h>
41#include <plat/gpio-cfg.h> 40#include <plat/gpio-cfg.h>
@@ -74,15 +73,3 @@ void __init s3c2440_map_io(void)
74 s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; 73 s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
75 s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; 74 s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;
76} 75}
77
78void s3c2440_restart(char mode, const char *cmd)
79{
80 if (mode == 's') {
81 soft_restart(0);
82 }
83
84 arch_wdt_reset();
85
86 /* we'll take a jump through zero as a poor second */
87 soft_restart(0);
88}
diff --git a/arch/arm/mach-s3c2440/s3c244x.c b/arch/arm/mach-s3c2440/s3c244x.c
index 36bc60f61d0a..d15852f642b7 100644
--- a/arch/arm/mach-s3c2440/s3c244x.c
+++ b/arch/arm/mach-s3c2440/s3c244x.c
@@ -46,6 +46,7 @@
46#include <plat/pm.h> 46#include <plat/pm.h>
47#include <plat/pll.h> 47#include <plat/pll.h>
48#include <plat/nand-core.h> 48#include <plat/nand-core.h>
49#include <plat/watchdog-reset.h>
49 50
50static struct map_desc s3c244x_iodesc[] __initdata = { 51static struct map_desc s3c244x_iodesc[] __initdata = {
51 IODESC_ENT(CLKPWR), 52 IODESC_ENT(CLKPWR),
@@ -196,3 +197,14 @@ struct syscore_ops s3c244x_pm_syscore_ops = {
196 .suspend = s3c244x_suspend, 197 .suspend = s3c244x_suspend,
197 .resume = s3c244x_resume, 198 .resume = s3c244x_resume,
198}; 199};
200
201void s3c244x_restart(char mode, const char *cmd)
202{
203 if (mode == 's')
204 soft_restart(0);
205
206 arch_wdt_reset();
207
208 /* we'll take a jump through zero as a poor second */
209 soft_restart(0);
210}
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 068b754bc348..bd7953b59a84 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -38,6 +38,7 @@
38#include <linux/mmc/sh_mobile_sdhi.h> 38#include <linux/mmc/sh_mobile_sdhi.h>
39#include <linux/mfd/tmio.h> 39#include <linux/mfd/tmio.h>
40#include <linux/sh_clk.h> 40#include <linux/sh_clk.h>
41#include <linux/videodev2.h>
41#include <video/sh_mobile_lcdc.h> 42#include <video/sh_mobile_lcdc.h>
42#include <video/sh_mipi_dsi.h> 43#include <video/sh_mipi_dsi.h>
43#include <sound/sh_fsi.h> 44#include <sound/sh_fsi.h>
@@ -46,8 +47,6 @@
46#include <mach/common.h> 47#include <mach/common.h>
47#include <asm/mach-types.h> 48#include <asm/mach-types.h>
48#include <asm/mach/arch.h> 49#include <asm/mach/arch.h>
49#include <asm/mach/map.h>
50#include <asm/mach/time.h>
51#include <asm/hardware/gic.h> 50#include <asm/hardware/gic.h>
52#include <asm/hardware/cache-l2x0.h> 51#include <asm/hardware/cache-l2x0.h>
53#include <asm/traps.h> 52#include <asm/traps.h>
@@ -486,27 +485,6 @@ static struct platform_device *ag5evm_devices[] __initdata = {
486 &sdhi1_device, 485 &sdhi1_device,
487}; 486};
488 487
489static struct map_desc ag5evm_io_desc[] __initdata = {
490 /* create a 1:1 entity map for 0xe6xxxxxx
491 * used by CPGA, INTC and PFC.
492 */
493 {
494 .virtual = 0xe6000000,
495 .pfn = __phys_to_pfn(0xe6000000),
496 .length = 256 << 20,
497 .type = MT_DEVICE_NONSHARED
498 },
499};
500
501static void __init ag5evm_map_io(void)
502{
503 iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
504
505 /* setup early devices and console here as well */
506 sh73a0_add_early_devices();
507 shmobile_setup_console();
508}
509
510static void __init ag5evm_init(void) 488static void __init ag5evm_init(void)
511{ 489{
512 sh73a0_pinmux_init(); 490 sh73a0_pinmux_init();
@@ -622,22 +600,12 @@ static void __init ag5evm_init(void)
622 platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); 600 platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices));
623} 601}
624 602
625static void __init ag5evm_timer_init(void)
626{
627 sh73a0_clock_init();
628 shmobile_timer.init();
629 return;
630}
631
632struct sys_timer ag5evm_timer = {
633 .init = ag5evm_timer_init,
634};
635
636MACHINE_START(AG5EVM, "ag5evm") 603MACHINE_START(AG5EVM, "ag5evm")
637 .map_io = ag5evm_map_io, 604 .map_io = sh73a0_map_io,
605 .init_early = sh73a0_add_early_devices,
638 .nr_irqs = NR_IRQS_LEGACY, 606 .nr_irqs = NR_IRQS_LEGACY,
639 .init_irq = sh73a0_init_irq, 607 .init_irq = sh73a0_init_irq,
640 .handle_irq = gic_handle_irq, 608 .handle_irq = gic_handle_irq,
641 .init_machine = ag5evm_init, 609 .init_machine = ag5evm_init,
642 .timer = &ag5evm_timer, 610 .timer = &shmobile_timer,
643MACHINE_END 611MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index eeb4d9664584..c92c00527123 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -61,8 +61,6 @@
61 61
62#include <asm/mach-types.h> 62#include <asm/mach-types.h>
63#include <asm/mach/arch.h> 63#include <asm/mach/arch.h>
64#include <asm/mach/map.h>
65#include <asm/mach/time.h>
66#include <asm/setup.h> 64#include <asm/setup.h>
67 65
68/* 66/*
@@ -794,7 +792,7 @@ static struct fsi_ak4642_info fsi2_ak4643_info = {
794static struct platform_device fsi_ak4643_device = { 792static struct platform_device fsi_ak4643_device = {
795 .name = "fsi-ak4642-audio", 793 .name = "fsi-ak4642-audio",
796 .dev = { 794 .dev = {
797 .platform_data = &fsi_info, 795 .platform_data = &fsi2_ak4643_info,
798 }, 796 },
799}; 797};
800 798
@@ -1190,26 +1188,6 @@ static struct i2c_board_info i2c1_devices[] = {
1190 }, 1188 },
1191}; 1189};
1192 1190
1193static struct map_desc ap4evb_io_desc[] __initdata = {
1194 /* create a 1:1 entity map for 0xe6xxxxxx
1195 * used by CPGA, INTC and PFC.
1196 */
1197 {
1198 .virtual = 0xe6000000,
1199 .pfn = __phys_to_pfn(0xe6000000),
1200 .length = 256 << 20,
1201 .type = MT_DEVICE_NONSHARED
1202 },
1203};
1204
1205static void __init ap4evb_map_io(void)
1206{
1207 iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
1208
1209 /* setup early devices and console here as well */
1210 sh7372_add_early_devices();
1211 shmobile_setup_console();
1212}
1213 1191
1214#define GPIO_PORT9CR 0xE6051009 1192#define GPIO_PORT9CR 0xE6051009
1215#define GPIO_PORT10CR 0xE605100A 1193#define GPIO_PORT10CR 0xE605100A
@@ -1219,6 +1197,9 @@ static void __init ap4evb_init(void)
1219 u32 srcr4; 1197 u32 srcr4;
1220 struct clk *clk; 1198 struct clk *clk;
1221 1199
1200 /* External clock source */
1201 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
1202
1222 sh7372_pinmux_init(); 1203 sh7372_pinmux_init();
1223 1204
1224 /* enable SCIFA0 */ 1205 /* enable SCIFA0 */
@@ -1455,23 +1436,11 @@ static void __init ap4evb_init(void)
1455 pm_clk_add(&lcdc1_device.dev, "hdmi"); 1436 pm_clk_add(&lcdc1_device.dev, "hdmi");
1456} 1437}
1457 1438
1458static void __init ap4evb_timer_init(void)
1459{
1460 sh7372_clock_init();
1461 shmobile_timer.init();
1462
1463 /* External clock source */
1464 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
1465}
1466
1467static struct sys_timer ap4evb_timer = {
1468 .init = ap4evb_timer_init,
1469};
1470
1471MACHINE_START(AP4EVB, "ap4evb") 1439MACHINE_START(AP4EVB, "ap4evb")
1472 .map_io = ap4evb_map_io, 1440 .map_io = sh7372_map_io,
1441 .init_early = sh7372_add_early_devices,
1473 .init_irq = sh7372_init_irq, 1442 .init_irq = sh7372_init_irq,
1474 .handle_irq = shmobile_handle_irq_intc, 1443 .handle_irq = shmobile_handle_irq_intc,
1475 .init_machine = ap4evb_init, 1444 .init_machine = ap4evb_init,
1476 .timer = &ap4evb_timer, 1445 .timer = &shmobile_timer,
1477MACHINE_END 1446MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index 4d2201622323..396814a6a2c9 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -27,6 +27,7 @@
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/gpio.h> 28#include <linux/gpio.h>
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/videodev2.h>
30#include <mach/common.h> 31#include <mach/common.h>
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -241,7 +242,7 @@ static struct sh_mobile_lcdc_info lcdc0_info = {
241 .clock_source = LCDC_CLK_BUS, 242 .clock_source = LCDC_CLK_BUS,
242 .ch[0] = { 243 .ch[0] = {
243 .chan = LCDC_CHAN_MAINLCD, 244 .chan = LCDC_CHAN_MAINLCD,
244 .bpp = 16, 245 .fourcc = V4L2_PIX_FMT_RGB565,
245 .interface_type = RGB24, 246 .interface_type = RGB24,
246 .clock_divider = 5, 247 .clock_divider = 5,
247 .flags = 0, 248 .flags = 0,
@@ -327,28 +328,6 @@ static struct platform_device *bonito_base_devices[] __initdata = {
327 * map I/O 328 * map I/O
328 */ 329 */
329static struct map_desc bonito_io_desc[] __initdata = { 330static struct map_desc bonito_io_desc[] __initdata = {
330 /*
331 * for CPGA/INTC/PFC
332 * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
333 */
334 {
335 .virtual = 0xe6000000,
336 .pfn = __phys_to_pfn(0xe6000000),
337 .length = 160 << 20,
338 .type = MT_DEVICE_NONSHARED
339 },
340#ifdef CONFIG_CACHE_L2X0
341 /*
342 * for l2x0_init()
343 * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
344 */
345 {
346 .virtual = 0xf0002000,
347 .pfn = __phys_to_pfn(0xf0100000),
348 .length = PAGE_SIZE,
349 .type = MT_DEVICE_NONSHARED
350 },
351#endif
352 /* 331 /*
353 * for FPGA (0x1800000-0x19ffffff) 332 * for FPGA (0x1800000-0x19ffffff)
354 * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000 333 * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000
@@ -363,11 +342,8 @@ static struct map_desc bonito_io_desc[] __initdata = {
363 342
364static void __init bonito_map_io(void) 343static void __init bonito_map_io(void)
365{ 344{
345 r8a7740_map_io();
366 iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc)); 346 iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc));
367
368 /* setup early devices and console here as well */
369 r8a7740_add_early_devices();
370 shmobile_setup_console();
371} 347}
372 348
373/* 349/*
@@ -491,7 +467,7 @@ static void __init bonito_init(void)
491 } 467 }
492} 468}
493 469
494static void __init bonito_timer_init(void) 470static void __init bonito_earlytimer_init(void)
495{ 471{
496 u16 val; 472 u16 val;
497 u8 md_ck = 0; 473 u8 md_ck = 0;
@@ -506,17 +482,22 @@ static void __init bonito_timer_init(void)
506 md_ck |= MD_CK0; 482 md_ck |= MD_CK0;
507 483
508 r8a7740_clock_init(md_ck); 484 r8a7740_clock_init(md_ck);
509 shmobile_timer.init(); 485 shmobile_earlytimer_init();
510} 486}
511 487
512struct sys_timer bonito_timer = { 488void __init bonito_add_early_devices(void)
513 .init = bonito_timer_init, 489{
514}; 490 r8a7740_add_early_devices();
491
492 /* override timer setup with board-specific code */
493 shmobile_timer.init = bonito_earlytimer_init;
494}
515 495
516MACHINE_START(BONITO, "bonito") 496MACHINE_START(BONITO, "bonito")
517 .map_io = bonito_map_io, 497 .map_io = bonito_map_io,
498 .init_early = bonito_add_early_devices,
518 .init_irq = r8a7740_init_irq, 499 .init_irq = r8a7740_init_irq,
519 .handle_irq = shmobile_handle_irq_intc, 500 .handle_irq = shmobile_handle_irq_intc,
520 .init_machine = bonito_init, 501 .init_machine = bonito_init,
521 .timer = &bonito_timer, 502 .timer = &shmobile_timer,
522MACHINE_END 503MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
index 72d557281b1f..b627e89037f5 100644
--- a/arch/arm/mach-shmobile/board-g3evm.c
+++ b/arch/arm/mach-shmobile/board-g3evm.c
@@ -37,8 +37,6 @@
37#include <mach/common.h> 37#include <mach/common.h>
38#include <asm/mach-types.h> 38#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
40#include <asm/mach/map.h>
41#include <asm/mach/time.h>
42 40
43/* 41/*
44 * IrDA 42 * IrDA
@@ -246,27 +244,6 @@ static struct platform_device *g3evm_devices[] __initdata = {
246 &irda_device, 244 &irda_device,
247}; 245};
248 246
249static struct map_desc g3evm_io_desc[] __initdata = {
250 /* create a 1:1 entity map for 0xe6xxxxxx
251 * used by CPGA, INTC and PFC.
252 */
253 {
254 .virtual = 0xe6000000,
255 .pfn = __phys_to_pfn(0xe6000000),
256 .length = 256 << 20,
257 .type = MT_DEVICE_NONSHARED
258 },
259};
260
261static void __init g3evm_map_io(void)
262{
263 iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc));
264
265 /* setup early devices and console here as well */
266 sh7367_add_early_devices();
267 shmobile_setup_console();
268}
269
270static void __init g3evm_init(void) 247static void __init g3evm_init(void)
271{ 248{
272 sh7367_pinmux_init(); 249 sh7367_pinmux_init();
@@ -354,20 +331,11 @@ static void __init g3evm_init(void)
354 platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); 331 platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices));
355} 332}
356 333
357static void __init g3evm_timer_init(void)
358{
359 sh7367_clock_init();
360 shmobile_timer.init();
361}
362
363static struct sys_timer g3evm_timer = {
364 .init = g3evm_timer_init,
365};
366
367MACHINE_START(G3EVM, "g3evm") 334MACHINE_START(G3EVM, "g3evm")
368 .map_io = g3evm_map_io, 335 .map_io = sh7367_map_io,
336 .init_early = sh7367_add_early_devices,
369 .init_irq = sh7367_init_irq, 337 .init_irq = sh7367_init_irq,
370 .handle_irq = shmobile_handle_irq_intc, 338 .handle_irq = shmobile_handle_irq_intc,
371 .init_machine = g3evm_init, 339 .init_machine = g3evm_init,
372 .timer = &g3evm_timer, 340 .timer = &shmobile_timer,
373MACHINE_END 341MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
index 2220b885cff5..46d757d2759d 100644
--- a/arch/arm/mach-shmobile/board-g4evm.c
+++ b/arch/arm/mach-shmobile/board-g4evm.c
@@ -38,8 +38,6 @@
38#include <mach/common.h> 38#include <mach/common.h>
39#include <asm/mach-types.h> 39#include <asm/mach-types.h>
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/map.h>
42#include <asm/mach/time.h>
43 41
44/* 42/*
45 * SDHI 43 * SDHI
@@ -260,27 +258,6 @@ static struct platform_device *g4evm_devices[] __initdata = {
260 &sdhi1_device, 258 &sdhi1_device,
261}; 259};
262 260
263static struct map_desc g4evm_io_desc[] __initdata = {
264 /* create a 1:1 entity map for 0xe6xxxxxx
265 * used by CPGA, INTC and PFC.
266 */
267 {
268 .virtual = 0xe6000000,
269 .pfn = __phys_to_pfn(0xe6000000),
270 .length = 256 << 20,
271 .type = MT_DEVICE_NONSHARED
272 },
273};
274
275static void __init g4evm_map_io(void)
276{
277 iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc));
278
279 /* setup early devices and console here as well */
280 sh7377_add_early_devices();
281 shmobile_setup_console();
282}
283
284#define GPIO_SDHID0_D0 0xe60520fc 261#define GPIO_SDHID0_D0 0xe60520fc
285#define GPIO_SDHID0_D1 0xe60520fd 262#define GPIO_SDHID0_D1 0xe60520fd
286#define GPIO_SDHID0_D2 0xe60520fe 263#define GPIO_SDHID0_D2 0xe60520fe
@@ -397,20 +374,11 @@ static void __init g4evm_init(void)
397 platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); 374 platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices));
398} 375}
399 376
400static void __init g4evm_timer_init(void)
401{
402 sh7377_clock_init();
403 shmobile_timer.init();
404}
405
406static struct sys_timer g4evm_timer = {
407 .init = g4evm_timer_init,
408};
409
410MACHINE_START(G4EVM, "g4evm") 377MACHINE_START(G4EVM, "g4evm")
411 .map_io = g4evm_map_io, 378 .map_io = sh7377_map_io,
379 .init_early = sh7377_add_early_devices,
412 .init_irq = sh7377_init_irq, 380 .init_irq = sh7377_init_irq,
413 .handle_irq = shmobile_handle_irq_intc, 381 .handle_irq = shmobile_handle_irq_intc,
414 .init_machine = g4evm_init, 382 .init_machine = g4evm_init,
415 .timer = &g4evm_timer, 383 .timer = &shmobile_timer,
416MACHINE_END 384MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index c8e7ca23fc06..61c067294660 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -43,7 +43,6 @@
43#include <mach/common.h> 43#include <mach/common.h>
44#include <asm/mach-types.h> 44#include <asm/mach-types.h>
45#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
46#include <asm/mach/map.h>
47#include <asm/mach/time.h> 46#include <asm/mach/time.h>
48#include <asm/hardware/gic.h> 47#include <asm/hardware/gic.h>
49#include <asm/hardware/cache-l2x0.h> 48#include <asm/hardware/cache-l2x0.h>
@@ -409,27 +408,6 @@ static struct platform_device *kota2_devices[] __initdata = {
409 &sdhi1_device, 408 &sdhi1_device,
410}; 409};
411 410
412static struct map_desc kota2_io_desc[] __initdata = {
413 /* create a 1:1 entity map for 0xe6xxxxxx
414 * used by CPGA, INTC and PFC.
415 */
416 {
417 .virtual = 0xe6000000,
418 .pfn = __phys_to_pfn(0xe6000000),
419 .length = 256 << 20,
420 .type = MT_DEVICE_NONSHARED
421 },
422};
423
424static void __init kota2_map_io(void)
425{
426 iotable_init(kota2_io_desc, ARRAY_SIZE(kota2_io_desc));
427
428 /* setup early devices and console here as well */
429 sh73a0_add_early_devices();
430 shmobile_setup_console();
431}
432
433static void __init kota2_init(void) 411static void __init kota2_init(void)
434{ 412{
435 sh73a0_pinmux_init(); 413 sh73a0_pinmux_init();
@@ -535,22 +513,12 @@ static void __init kota2_init(void)
535 platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices)); 513 platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices));
536} 514}
537 515
538static void __init kota2_timer_init(void)
539{
540 sh73a0_clock_init();
541 shmobile_timer.init();
542 return;
543}
544
545struct sys_timer kota2_timer = {
546 .init = kota2_timer_init,
547};
548
549MACHINE_START(KOTA2, "kota2") 516MACHINE_START(KOTA2, "kota2")
550 .map_io = kota2_map_io, 517 .map_io = sh73a0_map_io,
518 .init_early = sh73a0_add_early_devices,
551 .nr_irqs = NR_IRQS_LEGACY, 519 .nr_irqs = NR_IRQS_LEGACY,
552 .init_irq = sh73a0_init_irq, 520 .init_irq = sh73a0_init_irq,
553 .handle_irq = gic_handle_irq, 521 .handle_irq = gic_handle_irq,
554 .init_machine = kota2_init, 522 .init_machine = kota2_init,
555 .timer = &kota2_timer, 523 .timer = &shmobile_timer,
556MACHINE_END 524MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index a2813247b455..55da7a115912 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -57,8 +57,6 @@
57#include <mach/sh7372.h> 57#include <mach/sh7372.h>
58 58
59#include <asm/mach/arch.h> 59#include <asm/mach/arch.h>
60#include <asm/mach/time.h>
61#include <asm/mach/map.h>
62#include <asm/mach-types.h> 60#include <asm/mach-types.h>
63 61
64/* 62/*
@@ -1337,27 +1335,6 @@ static struct i2c_board_info i2c1_devices[] = {
1337 }, 1335 },
1338}; 1336};
1339 1337
1340static struct map_desc mackerel_io_desc[] __initdata = {
1341 /* create a 1:1 entity map for 0xe6xxxxxx
1342 * used by CPGA, INTC and PFC.
1343 */
1344 {
1345 .virtual = 0xe6000000,
1346 .pfn = __phys_to_pfn(0xe6000000),
1347 .length = 256 << 20,
1348 .type = MT_DEVICE_NONSHARED
1349 },
1350};
1351
1352static void __init mackerel_map_io(void)
1353{
1354 iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
1355
1356 /* setup early devices and console here as well */
1357 sh7372_add_early_devices();
1358 shmobile_setup_console();
1359}
1360
1361#define GPIO_PORT9CR 0xE6051009 1338#define GPIO_PORT9CR 0xE6051009
1362#define GPIO_PORT10CR 0xE605100A 1339#define GPIO_PORT10CR 0xE605100A
1363#define GPIO_PORT167CR 0xE60520A7 1340#define GPIO_PORT167CR 0xE60520A7
@@ -1370,6 +1347,9 @@ static void __init mackerel_init(void)
1370 struct clk *clk; 1347 struct clk *clk;
1371 int ret; 1348 int ret;
1372 1349
1350 /* External clock source */
1351 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
1352
1373 sh7372_pinmux_init(); 1353 sh7372_pinmux_init();
1374 1354
1375 /* enable SCIFA0 */ 1355 /* enable SCIFA0 */
@@ -1573,23 +1553,11 @@ static void __init mackerel_init(void)
1573 pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); 1553 pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
1574} 1554}
1575 1555
1576static void __init mackerel_timer_init(void)
1577{
1578 sh7372_clock_init();
1579 shmobile_timer.init();
1580
1581 /* External clock source */
1582 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
1583}
1584
1585static struct sys_timer mackerel_timer = {
1586 .init = mackerel_timer_init,
1587};
1588
1589MACHINE_START(MACKEREL, "mackerel") 1556MACHINE_START(MACKEREL, "mackerel")
1590 .map_io = mackerel_map_io, 1557 .map_io = sh7372_map_io,
1558 .init_early = sh7372_add_early_devices,
1591 .init_irq = sh7372_init_irq, 1559 .init_irq = sh7372_init_irq,
1592 .handle_irq = shmobile_handle_irq_intc, 1560 .handle_irq = shmobile_handle_irq_intc,
1593 .init_machine = mackerel_init, 1561 .init_machine = mackerel_init,
1594 .timer = &mackerel_timer, 1562 .timer = &shmobile_timer,
1595MACHINE_END 1563MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index f0e02c0ce99f..cbd5e4cd06d2 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -33,8 +33,6 @@
33#include <mach/common.h> 33#include <mach/common.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
36#include <asm/mach/map.h>
37#include <asm/mach/time.h>
38#include <asm/hardware/gic.h> 36#include <asm/hardware/gic.h>
39#include <asm/traps.h> 37#include <asm/traps.h>
40 38
@@ -72,49 +70,6 @@ static struct platform_device *marzen_devices[] __initdata = {
72 &eth_device, 70 &eth_device,
73}; 71};
74 72
75static struct map_desc marzen_io_desc[] __initdata = {
76 /* 2M entity map for 0xf0000000 (MPCORE) */
77 {
78 .virtual = 0xf0000000,
79 .pfn = __phys_to_pfn(0xf0000000),
80 .length = SZ_2M,
81 .type = MT_DEVICE_NONSHARED
82 },
83 /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */
84 {
85 .virtual = 0xfe000000,
86 .pfn = __phys_to_pfn(0xfe000000),
87 .length = SZ_16M,
88 .type = MT_DEVICE_NONSHARED
89 },
90};
91
92static void __init marzen_map_io(void)
93{
94 iotable_init(marzen_io_desc, ARRAY_SIZE(marzen_io_desc));
95}
96
97static void __init marzen_init_early(void)
98{
99 r8a7779_add_early_devices();
100
101 /* Early serial console setup is not included here due to
102 * memory map collisions. The SCIF serial ports in r8a7779
103 * are difficult to entity map 1:1 due to collision with the
104 * virtual memory range used by the coherent DMA code on ARM.
105 *
106 * Anyone wanting to debug early can remove UPF_IOREMAP from
107 * the sh-sci serial console platform data, adjust mapbase
108 * to a static M:N virt:phys mapping that needs to be added to
109 * the mappings passed with iotable_init() above.
110 *
111 * Then add a call to shmobile_setup_console() from this function.
112 *
113 * As a final step pass earlyprint=sh-sci.2,115200 on the kernel
114 * command line.
115 */
116}
117
118static void __init marzen_init(void) 73static void __init marzen_init(void)
119{ 74{
120 r8a7779_pinmux_init(); 75 r8a7779_pinmux_init();
@@ -135,23 +90,12 @@ static void __init marzen_init(void)
135 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); 90 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
136} 91}
137 92
138static void __init marzen_timer_init(void)
139{
140 r8a7779_clock_init();
141 shmobile_timer.init();
142 return;
143}
144
145struct sys_timer marzen_timer = {
146 .init = marzen_timer_init,
147};
148
149MACHINE_START(MARZEN, "marzen") 93MACHINE_START(MARZEN, "marzen")
150 .map_io = marzen_map_io, 94 .map_io = r8a7779_map_io,
151 .init_early = marzen_init_early, 95 .init_early = r8a7779_add_early_devices,
152 .nr_irqs = NR_IRQS_LEGACY, 96 .nr_irqs = NR_IRQS_LEGACY,
153 .init_irq = r8a7779_init_irq, 97 .init_irq = r8a7779_init_irq,
154 .handle_irq = gic_handle_irq, 98 .handle_irq = gic_handle_irq,
155 .init_machine = marzen_init, 99 .init_machine = marzen_init,
156 .timer = &marzen_timer, 100 .timer = &shmobile_timer,
157MACHINE_END 101MACHINE_END
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 3b35b9afc001..99c4d743a99c 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -93,7 +93,7 @@ static unsigned long div_recalc(struct clk *clk)
93 return clk->parent->rate / (int)(clk->priv); 93 return clk->parent->rate / (int)(clk->priv);
94} 94}
95 95
96static struct clk_ops div_clk_ops = { 96static struct sh_clk_ops div_clk_ops = {
97 .recalc = div_recalc, 97 .recalc = div_recalc,
98}; 98};
99 99
@@ -125,7 +125,7 @@ static struct clk extal2_div2_clk = {
125 .parent = &extal2_clk, 125 .parent = &extal2_clk,
126}; 126};
127 127
128static struct clk_ops followparent_clk_ops = { 128static struct sh_clk_ops followparent_clk_ops = {
129 .recalc = followparent_recalc, 129 .recalc = followparent_recalc,
130}; 130};
131 131
@@ -156,7 +156,7 @@ static unsigned long pllc01_recalc(struct clk *clk)
156 return clk->parent->rate * mult; 156 return clk->parent->rate * mult;
157} 157}
158 158
159static struct clk_ops pllc01_clk_ops = { 159static struct sh_clk_ops pllc01_clk_ops = {
160 .recalc = pllc01_recalc, 160 .recalc = pllc01_recalc,
161}; 161};
162 162
@@ -376,7 +376,7 @@ void __init r8a7740_clock_init(u8 md_ck)
376 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 376 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
377 377
378 if (!ret) 378 if (!ret)
379 clk_init(); 379 shmobile_clk_init();
380 else 380 else
381 panic("failed to setup r8a7740 clocks\n"); 381 panic("failed to setup r8a7740 clocks\n");
382} 382}
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index b4b0e8cd096d..7d6e9fe47b56 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -107,7 +107,7 @@ static unsigned long mul4_recalc(struct clk *clk)
107 return clk->parent->rate * 4; 107 return clk->parent->rate * 4;
108} 108}
109 109
110static struct clk_ops mul4_clk_ops = { 110static struct sh_clk_ops mul4_clk_ops = {
111 .recalc = mul4_recalc, 111 .recalc = mul4_recalc,
112}; 112};
113 113
@@ -170,7 +170,7 @@ void __init r8a7779_clock_init(void)
170 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 170 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
171 171
172 if (!ret) 172 if (!ret)
173 clk_init(); 173 shmobile_clk_init();
174 else 174 else
175 panic("failed to setup r8a7779 clocks\n"); 175 panic("failed to setup r8a7779 clocks\n");
176} 176}
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c
index 5218c34a9cc6..006e7b5d304c 100644
--- a/arch/arm/mach-shmobile/clock-sh7367.c
+++ b/arch/arm/mach-shmobile/clock-sh7367.c
@@ -74,7 +74,7 @@ static unsigned long div2_recalc(struct clk *clk)
74 return clk->parent->rate / 2; 74 return clk->parent->rate / 2;
75} 75}
76 76
77static struct clk_ops div2_clk_ops = { 77static struct sh_clk_ops div2_clk_ops = {
78 .recalc = div2_recalc, 78 .recalc = div2_recalc,
79}; 79};
80 80
@@ -101,7 +101,7 @@ static unsigned long pllc1_recalc(struct clk *clk)
101 return clk->parent->rate * mult; 101 return clk->parent->rate * mult;
102} 102}
103 103
104static struct clk_ops pllc1_clk_ops = { 104static struct sh_clk_ops pllc1_clk_ops = {
105 .recalc = pllc1_recalc, 105 .recalc = pllc1_recalc,
106}; 106};
107 107
@@ -128,7 +128,7 @@ static unsigned long pllc2_recalc(struct clk *clk)
128 return clk->parent->rate * mult; 128 return clk->parent->rate * mult;
129} 129}
130 130
131static struct clk_ops pllc2_clk_ops = { 131static struct sh_clk_ops pllc2_clk_ops = {
132 .recalc = pllc2_recalc, 132 .recalc = pllc2_recalc,
133}; 133};
134 134
@@ -349,7 +349,7 @@ void __init sh7367_clock_init(void)
349 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 349 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
350 350
351 if (!ret) 351 if (!ret)
352 clk_init(); 352 shmobile_clk_init();
353 else 353 else
354 panic("failed to setup sh7367 clocks\n"); 354 panic("failed to setup sh7367 clocks\n");
355} 355}
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 293456d8dcfd..de243e3c8392 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -89,7 +89,7 @@ static unsigned long div2_recalc(struct clk *clk)
89 return clk->parent->rate / 2; 89 return clk->parent->rate / 2;
90} 90}
91 91
92static struct clk_ops div2_clk_ops = { 92static struct sh_clk_ops div2_clk_ops = {
93 .recalc = div2_recalc, 93 .recalc = div2_recalc,
94}; 94};
95 95
@@ -128,7 +128,7 @@ static unsigned long pllc01_recalc(struct clk *clk)
128 return clk->parent->rate * mult; 128 return clk->parent->rate * mult;
129} 129}
130 130
131static struct clk_ops pllc01_clk_ops = { 131static struct sh_clk_ops pllc01_clk_ops = {
132 .recalc = pllc01_recalc, 132 .recalc = pllc01_recalc,
133}; 133};
134 134
@@ -276,7 +276,7 @@ static int pllc2_set_parent(struct clk *clk, struct clk *parent)
276 return 0; 276 return 0;
277} 277}
278 278
279static struct clk_ops pllc2_clk_ops = { 279static struct sh_clk_ops pllc2_clk_ops = {
280 .recalc = pllc2_recalc, 280 .recalc = pllc2_recalc,
281 .round_rate = pllc2_round_rate, 281 .round_rate = pllc2_round_rate,
282 .set_rate = pllc2_set_rate, 282 .set_rate = pllc2_set_rate,
@@ -468,7 +468,7 @@ static int fsidiv_set_rate(struct clk *clk, unsigned long rate)
468 return 0; 468 return 0;
469} 469}
470 470
471static struct clk_ops fsidiv_clk_ops = { 471static struct sh_clk_ops fsidiv_clk_ops = {
472 .recalc = fsidiv_recalc, 472 .recalc = fsidiv_recalc,
473 .round_rate = fsidiv_round_rate, 473 .round_rate = fsidiv_round_rate,
474 .set_rate = fsidiv_set_rate, 474 .set_rate = fsidiv_set_rate,
@@ -710,7 +710,7 @@ void __init sh7372_clock_init(void)
710 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 710 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
711 711
712 if (!ret) 712 if (!ret)
713 clk_init(); 713 shmobile_clk_init();
714 else 714 else
715 panic("failed to setup sh7372 clocks\n"); 715 panic("failed to setup sh7372 clocks\n");
716 716
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c
index 8cee7b151ae3..0798a15936c3 100644
--- a/arch/arm/mach-shmobile/clock-sh7377.c
+++ b/arch/arm/mach-shmobile/clock-sh7377.c
@@ -77,7 +77,7 @@ static unsigned long div2_recalc(struct clk *clk)
77 return clk->parent->rate / 2; 77 return clk->parent->rate / 2;
78} 78}
79 79
80static struct clk_ops div2_clk_ops = { 80static struct sh_clk_ops div2_clk_ops = {
81 .recalc = div2_recalc, 81 .recalc = div2_recalc,
82}; 82};
83 83
@@ -110,7 +110,7 @@ static unsigned long pllc1_recalc(struct clk *clk)
110 return clk->parent->rate * mult; 110 return clk->parent->rate * mult;
111} 111}
112 112
113static struct clk_ops pllc1_clk_ops = { 113static struct sh_clk_ops pllc1_clk_ops = {
114 .recalc = pllc1_recalc, 114 .recalc = pllc1_recalc,
115}; 115};
116 116
@@ -137,7 +137,7 @@ static unsigned long pllc2_recalc(struct clk *clk)
137 return clk->parent->rate * mult; 137 return clk->parent->rate * mult;
138} 138}
139 139
140static struct clk_ops pllc2_clk_ops = { 140static struct sh_clk_ops pllc2_clk_ops = {
141 .recalc = pllc2_recalc, 141 .recalc = pllc2_recalc,
142}; 142};
143 143
@@ -360,7 +360,7 @@ void __init sh7377_clock_init(void)
360 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 360 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
361 361
362 if (!ret) 362 if (!ret)
363 clk_init(); 363 shmobile_clk_init();
364 else 364 else
365 panic("failed to setup sh7377 clocks\n"); 365 panic("failed to setup sh7377 clocks\n");
366} 366}
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 7727cca6136c..472d1f5361e5 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -88,7 +88,7 @@ static unsigned long div2_recalc(struct clk *clk)
88 return clk->parent->rate / 2; 88 return clk->parent->rate / 2;
89} 89}
90 90
91static struct clk_ops div2_clk_ops = { 91static struct sh_clk_ops div2_clk_ops = {
92 .recalc = div2_recalc, 92 .recalc = div2_recalc,
93}; 93};
94 94
@@ -97,7 +97,7 @@ static unsigned long div7_recalc(struct clk *clk)
97 return clk->parent->rate / 7; 97 return clk->parent->rate / 7;
98} 98}
99 99
100static struct clk_ops div7_clk_ops = { 100static struct sh_clk_ops div7_clk_ops = {
101 .recalc = div7_recalc, 101 .recalc = div7_recalc,
102}; 102};
103 103
@@ -106,7 +106,7 @@ static unsigned long div13_recalc(struct clk *clk)
106 return clk->parent->rate / 13; 106 return clk->parent->rate / 13;
107} 107}
108 108
109static struct clk_ops div13_clk_ops = { 109static struct sh_clk_ops div13_clk_ops = {
110 .recalc = div13_recalc, 110 .recalc = div13_recalc,
111}; 111};
112 112
@@ -122,7 +122,7 @@ static struct clk extal2_div2_clk = {
122 .parent = &sh73a0_extal2_clk, 122 .parent = &sh73a0_extal2_clk,
123}; 123};
124 124
125static struct clk_ops main_clk_ops = { 125static struct sh_clk_ops main_clk_ops = {
126 .recalc = followparent_recalc, 126 .recalc = followparent_recalc,
127}; 127};
128 128
@@ -156,7 +156,7 @@ static unsigned long pll_recalc(struct clk *clk)
156 return clk->parent->rate * mult; 156 return clk->parent->rate * mult;
157} 157}
158 158
159static struct clk_ops pll_clk_ops = { 159static struct sh_clk_ops pll_clk_ops = {
160 .recalc = pll_recalc, 160 .recalc = pll_recalc,
161}; 161};
162 162
@@ -438,7 +438,7 @@ static int dsiphy_set_rate(struct clk *clk, unsigned long rate)
438 return 0; 438 return 0;
439} 439}
440 440
441static struct clk_ops dsiphy_clk_ops = { 441static struct sh_clk_ops dsiphy_clk_ops = {
442 .recalc = dsiphy_recalc, 442 .recalc = dsiphy_recalc,
443 .round_rate = dsiphy_round_rate, 443 .round_rate = dsiphy_round_rate,
444 .set_rate = dsiphy_set_rate, 444 .set_rate = dsiphy_set_rate,
@@ -620,7 +620,7 @@ void __init sh73a0_clock_init(void)
620 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 620 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
621 621
622 if (!ret) 622 if (!ret)
623 clk_init(); 623 shmobile_clk_init();
624 else 624 else
625 panic("failed to setup sh73a0 clocks\n"); 625 panic("failed to setup sh73a0 clocks\n");
626} 626}
diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
index 31654d78b96b..e816ca9bd213 100644
--- a/arch/arm/mach-shmobile/clock.c
+++ b/arch/arm/mach-shmobile/clock.c
@@ -24,7 +24,7 @@
24#include <linux/sh_clk.h> 24#include <linux/sh_clk.h>
25#include <linux/export.h> 25#include <linux/export.h>
26 26
27int __init clk_init(void) 27int __init shmobile_clk_init(void)
28{ 28{
29 /* Kick the child clocks.. */ 29 /* Kick the child clocks.. */
30 recalculate_root_clocks(); 30 recalculate_root_clocks();
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index e4b945e271e7..e41b61a48439 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -1,12 +1,13 @@
1#ifndef __ARCH_MACH_COMMON_H 1#ifndef __ARCH_MACH_COMMON_H
2#define __ARCH_MACH_COMMON_H 2#define __ARCH_MACH_COMMON_H
3 3
4extern void shmobile_earlytimer_init(void);
4extern struct sys_timer shmobile_timer; 5extern struct sys_timer shmobile_timer;
5extern void shmobile_setup_console(void); 6extern void shmobile_setup_console(void);
6extern void shmobile_secondary_vector(void); 7extern void shmobile_secondary_vector(void);
7extern int shmobile_platform_cpu_kill(unsigned int cpu); 8extern int shmobile_platform_cpu_kill(unsigned int cpu);
8struct clk; 9struct clk;
9extern int clk_init(void); 10extern int shmobile_clk_init(void);
10extern void shmobile_handle_irq_intc(struct pt_regs *); 11extern void shmobile_handle_irq_intc(struct pt_regs *);
11extern struct platform_suspend_ops shmobile_suspend_ops; 12extern struct platform_suspend_ops shmobile_suspend_ops;
12struct cpuidle_driver; 13struct cpuidle_driver;
@@ -14,6 +15,7 @@ extern void (*shmobile_cpuidle_modes[])(void);
14extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); 15extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv);
15 16
16extern void sh7367_init_irq(void); 17extern void sh7367_init_irq(void);
18extern void sh7367_map_io(void);
17extern void sh7367_add_early_devices(void); 19extern void sh7367_add_early_devices(void);
18extern void sh7367_add_standard_devices(void); 20extern void sh7367_add_standard_devices(void);
19extern void sh7367_clock_init(void); 21extern void sh7367_clock_init(void);
@@ -22,6 +24,7 @@ extern struct clk sh7367_extalb1_clk;
22extern struct clk sh7367_extal2_clk; 24extern struct clk sh7367_extal2_clk;
23 25
24extern void sh7377_init_irq(void); 26extern void sh7377_init_irq(void);
27extern void sh7377_map_io(void);
25extern void sh7377_add_early_devices(void); 28extern void sh7377_add_early_devices(void);
26extern void sh7377_add_standard_devices(void); 29extern void sh7377_add_standard_devices(void);
27extern void sh7377_clock_init(void); 30extern void sh7377_clock_init(void);
@@ -30,6 +33,7 @@ extern struct clk sh7377_extalc1_clk;
30extern struct clk sh7377_extal2_clk; 33extern struct clk sh7377_extal2_clk;
31 34
32extern void sh7372_init_irq(void); 35extern void sh7372_init_irq(void);
36extern void sh7372_map_io(void);
33extern void sh7372_add_early_devices(void); 37extern void sh7372_add_early_devices(void);
34extern void sh7372_add_standard_devices(void); 38extern void sh7372_add_standard_devices(void);
35extern void sh7372_clock_init(void); 39extern void sh7372_clock_init(void);
@@ -41,6 +45,7 @@ extern struct clk sh7372_extal1_clk;
41extern struct clk sh7372_extal2_clk; 45extern struct clk sh7372_extal2_clk;
42 46
43extern void sh73a0_init_irq(void); 47extern void sh73a0_init_irq(void);
48extern void sh73a0_map_io(void);
44extern void sh73a0_add_early_devices(void); 49extern void sh73a0_add_early_devices(void);
45extern void sh73a0_add_standard_devices(void); 50extern void sh73a0_add_standard_devices(void);
46extern void sh73a0_clock_init(void); 51extern void sh73a0_clock_init(void);
@@ -56,12 +61,14 @@ extern int sh73a0_boot_secondary(unsigned int cpu);
56extern void sh73a0_smp_prepare_cpus(void); 61extern void sh73a0_smp_prepare_cpus(void);
57 62
58extern void r8a7740_init_irq(void); 63extern void r8a7740_init_irq(void);
64extern void r8a7740_map_io(void);
59extern void r8a7740_add_early_devices(void); 65extern void r8a7740_add_early_devices(void);
60extern void r8a7740_add_standard_devices(void); 66extern void r8a7740_add_standard_devices(void);
61extern void r8a7740_clock_init(u8 md_ck); 67extern void r8a7740_clock_init(u8 md_ck);
62extern void r8a7740_pinmux_init(void); 68extern void r8a7740_pinmux_init(void);
63 69
64extern void r8a7779_init_irq(void); 70extern void r8a7779_init_irq(void);
71extern void r8a7779_map_io(void);
65extern void r8a7779_add_early_devices(void); 72extern void r8a7779_add_early_devices(void);
66extern void r8a7779_add_standard_devices(void); 73extern void r8a7779_add_standard_devices(void);
67extern void r8a7779_clock_init(void); 74extern void r8a7779_clock_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 986dca6b3fad..74e52341dd1b 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -25,8 +25,41 @@
25#include <linux/serial_sci.h> 25#include <linux/serial_sci.h>
26#include <linux/sh_timer.h> 26#include <linux/sh_timer.h>
27#include <mach/r8a7740.h> 27#include <mach/r8a7740.h>
28#include <mach/common.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/map.h>
29#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/time.h>
33
34static struct map_desc r8a7740_io_desc[] __initdata = {
35 /*
36 * for CPGA/INTC/PFC
37 * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
38 */
39 {
40 .virtual = 0xe6000000,
41 .pfn = __phys_to_pfn(0xe6000000),
42 .length = 160 << 20,
43 .type = MT_DEVICE_NONSHARED
44 },
45#ifdef CONFIG_CACHE_L2X0
46 /*
47 * for l2x0_init()
48 * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
49 */
50 {
51 .virtual = 0xf0002000,
52 .pfn = __phys_to_pfn(0xf0100000),
53 .length = PAGE_SIZE,
54 .type = MT_DEVICE_NONSHARED
55 },
56#endif
57};
58
59void __init r8a7740_map_io(void)
60{
61 iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
62}
30 63
31/* SCIFA0 */ 64/* SCIFA0 */
32static struct plat_sci_port scif0_platform_data = { 65static struct plat_sci_port scif0_platform_data = {
@@ -345,8 +378,20 @@ void __init r8a7740_add_standard_devices(void)
345 ARRAY_SIZE(r8a7740_late_devices)); 378 ARRAY_SIZE(r8a7740_late_devices));
346} 379}
347 380
381static void __init r8a7740_earlytimer_init(void)
382{
383 r8a7740_clock_init(0);
384 shmobile_earlytimer_init();
385}
386
348void __init r8a7740_add_early_devices(void) 387void __init r8a7740_add_early_devices(void)
349{ 388{
350 early_platform_add_devices(r8a7740_early_devices, 389 early_platform_add_devices(r8a7740_early_devices,
351 ARRAY_SIZE(r8a7740_early_devices)); 390 ARRAY_SIZE(r8a7740_early_devices));
391
392 /* setup early console here as well */
393 shmobile_setup_console();
394
395 /* override timer setup with soc-specific code */
396 shmobile_timer.init = r8a7740_earlytimer_init;
352} 397}
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 4725663bd032..6820d785493d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -33,6 +33,31 @@
33#include <mach/common.h> 33#include <mach/common.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
36#include <asm/mach/time.h>
37#include <asm/mach/map.h>
38#include <asm/hardware/cache-l2x0.h>
39
40static struct map_desc r8a7779_io_desc[] __initdata = {
41 /* 2M entity map for 0xf0000000 (MPCORE) */
42 {
43 .virtual = 0xf0000000,
44 .pfn = __phys_to_pfn(0xf0000000),
45 .length = SZ_2M,
46 .type = MT_DEVICE_NONSHARED
47 },
48 /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */
49 {
50 .virtual = 0xfe000000,
51 .pfn = __phys_to_pfn(0xfe000000),
52 .length = SZ_16M,
53 .type = MT_DEVICE_NONSHARED
54 },
55};
56
57void __init r8a7779_map_io(void)
58{
59 iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc));
60}
36 61
37static struct plat_sci_port scif0_platform_data = { 62static struct plat_sci_port scif0_platform_data = {
38 .mapbase = 0xffe40000, 63 .mapbase = 0xffe40000,
@@ -219,6 +244,10 @@ static struct platform_device *r8a7779_late_devices[] __initdata = {
219 244
220void __init r8a7779_add_standard_devices(void) 245void __init r8a7779_add_standard_devices(void)
221{ 246{
247#ifdef CONFIG_CACHE_L2X0
248 /* Early BRESP enable, Shared attribute override enable, 64K*16way */
249 l2x0_init((void __iomem __force *)(0xf0100000), 0x40470000, 0x82000fff);
250#endif
222 r8a7779_pm_init(); 251 r8a7779_pm_init();
223 252
224 r8a7779_init_pm_domain(&r8a7779_sh4a); 253 r8a7779_init_pm_domain(&r8a7779_sh4a);
@@ -232,8 +261,33 @@ void __init r8a7779_add_standard_devices(void)
232 ARRAY_SIZE(r8a7779_late_devices)); 261 ARRAY_SIZE(r8a7779_late_devices));
233} 262}
234 263
264static void __init r8a7779_earlytimer_init(void)
265{
266 r8a7779_clock_init();
267 shmobile_earlytimer_init();
268}
269
235void __init r8a7779_add_early_devices(void) 270void __init r8a7779_add_early_devices(void)
236{ 271{
237 early_platform_add_devices(r8a7779_early_devices, 272 early_platform_add_devices(r8a7779_early_devices,
238 ARRAY_SIZE(r8a7779_early_devices)); 273 ARRAY_SIZE(r8a7779_early_devices));
274
275 /* Early serial console setup is not included here due to
276 * memory map collisions. The SCIF serial ports in r8a7779
277 * are difficult to entity map 1:1 due to collision with the
278 * virtual memory range used by the coherent DMA code on ARM.
279 *
280 * Anyone wanting to debug early can remove UPF_IOREMAP from
281 * the sh-sci serial console platform data, adjust mapbase
282 * to a static M:N virt:phys mapping that needs to be added to
283 * the mappings passed with iotable_init() above.
284 *
285 * Then add a call to shmobile_setup_console() from this function.
286 *
287 * As a final step pass earlyprint=sh-sci.2,115200 on the kernel
288 * command line in case of the marzen board.
289 */
290
291 /* override timer setup with soc-specific code */
292 shmobile_timer.init = r8a7779_earlytimer_init;
239} 293}
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c
index e546017f15de..a51e1a1e6996 100644
--- a/arch/arm/mach-shmobile/setup-sh7367.c
+++ b/arch/arm/mach-shmobile/setup-sh7367.c
@@ -29,8 +29,28 @@
29#include <linux/serial_sci.h> 29#include <linux/serial_sci.h>
30#include <linux/sh_timer.h> 30#include <linux/sh_timer.h>
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/common.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/time.h>
37
38static struct map_desc sh7367_io_desc[] __initdata = {
39 /* create a 1:1 entity map for 0xe6xxxxxx
40 * used by CPGA, INTC and PFC.
41 */
42 {
43 .virtual = 0xe6000000,
44 .pfn = __phys_to_pfn(0xe6000000),
45 .length = 256 << 20,
46 .type = MT_DEVICE_NONSHARED
47 },
48};
49
50void __init sh7367_map_io(void)
51{
52 iotable_init(sh7367_io_desc, ARRAY_SIZE(sh7367_io_desc));
53}
34 54
35/* SCIFA0 */ 55/* SCIFA0 */
36static struct plat_sci_port scif0_platform_data = { 56static struct plat_sci_port scif0_platform_data = {
@@ -435,6 +455,12 @@ void __init sh7367_add_standard_devices(void)
435 ARRAY_SIZE(sh7367_devices)); 455 ARRAY_SIZE(sh7367_devices));
436} 456}
437 457
458static void __init sh7367_earlytimer_init(void)
459{
460 sh7367_clock_init();
461 shmobile_earlytimer_init();
462}
463
438#define SYMSTPCR2 0xe6158048 464#define SYMSTPCR2 0xe6158048
439#define SYMSTPCR2_CMT1 (1 << 29) 465#define SYMSTPCR2_CMT1 (1 << 29)
440 466
@@ -445,4 +471,10 @@ void __init sh7367_add_early_devices(void)
445 471
446 early_platform_add_devices(sh7367_early_devices, 472 early_platform_add_devices(sh7367_early_devices,
447 ARRAY_SIZE(sh7367_early_devices)); 473 ARRAY_SIZE(sh7367_early_devices));
474
475 /* setup early console here as well */
476 shmobile_setup_console();
477
478 /* override timer setup with soc-specific code */
479 shmobile_timer.init = sh7367_earlytimer_init;
448} 480}
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index a83cf51fc099..0ebbee087b5e 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -31,10 +31,37 @@
31#include <linux/sh_intc.h> 31#include <linux/sh_intc.h>
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <linux/pm_domain.h> 33#include <linux/pm_domain.h>
34#include <linux/dma-mapping.h>
34#include <mach/hardware.h> 35#include <mach/hardware.h>
35#include <mach/sh7372.h> 36#include <mach/sh7372.h>
37#include <mach/common.h>
38#include <asm/mach/map.h>
36#include <asm/mach-types.h> 39#include <asm/mach-types.h>
37#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/time.h>
42
43static struct map_desc sh7372_io_desc[] __initdata = {
44 /* create a 1:1 entity map for 0xe6xxxxxx
45 * used by CPGA, INTC and PFC.
46 */
47 {
48 .virtual = 0xe6000000,
49 .pfn = __phys_to_pfn(0xe6000000),
50 .length = 256 << 20,
51 .type = MT_DEVICE_NONSHARED
52 },
53};
54
55void __init sh7372_map_io(void)
56{
57 iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
58
59 /*
60 * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
61 * enough to allocate the frame buffer memory.
62 */
63 init_consistent_dma_size(12 << 20);
64}
38 65
39/* SCIFA0 */ 66/* SCIFA0 */
40static struct plat_sci_port scif0_platform_data = { 67static struct plat_sci_port scif0_platform_data = {
@@ -1045,8 +1072,20 @@ void __init sh7372_add_standard_devices(void)
1045 sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device); 1072 sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device);
1046} 1073}
1047 1074
1075static void __init sh7372_earlytimer_init(void)
1076{
1077 sh7372_clock_init();
1078 shmobile_earlytimer_init();
1079}
1080
1048void __init sh7372_add_early_devices(void) 1081void __init sh7372_add_early_devices(void)
1049{ 1082{
1050 early_platform_add_devices(sh7372_early_devices, 1083 early_platform_add_devices(sh7372_early_devices,
1051 ARRAY_SIZE(sh7372_early_devices)); 1084 ARRAY_SIZE(sh7372_early_devices));
1085
1086 /* setup early console here as well */
1087 shmobile_setup_console();
1088
1089 /* override timer setup with soc-specific code */
1090 shmobile_timer.init = sh7372_earlytimer_init;
1052} 1091}
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c
index bb405b8e459b..9f146095098b 100644
--- a/arch/arm/mach-shmobile/setup-sh7377.c
+++ b/arch/arm/mach-shmobile/setup-sh7377.c
@@ -30,8 +30,28 @@
30#include <linux/sh_intc.h> 30#include <linux/sh_intc.h>
31#include <linux/sh_timer.h> 31#include <linux/sh_timer.h>
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/common.h>
34#include <asm/mach/map.h>
33#include <asm/mach-types.h> 35#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
37#include <asm/mach/time.h>
38
39static struct map_desc sh7377_io_desc[] __initdata = {
40 /* create a 1:1 entity map for 0xe6xxxxxx
41 * used by CPGA, INTC and PFC.
42 */
43 {
44 .virtual = 0xe6000000,
45 .pfn = __phys_to_pfn(0xe6000000),
46 .length = 256 << 20,
47 .type = MT_DEVICE_NONSHARED
48 },
49};
50
51void __init sh7377_map_io(void)
52{
53 iotable_init(sh7377_io_desc, ARRAY_SIZE(sh7377_io_desc));
54}
35 55
36/* SCIFA0 */ 56/* SCIFA0 */
37static struct plat_sci_port scif0_platform_data = { 57static struct plat_sci_port scif0_platform_data = {
@@ -456,6 +476,12 @@ void __init sh7377_add_standard_devices(void)
456 ARRAY_SIZE(sh7377_devices)); 476 ARRAY_SIZE(sh7377_devices));
457} 477}
458 478
479static void __init sh7377_earlytimer_init(void)
480{
481 sh7377_clock_init();
482 shmobile_earlytimer_init();
483}
484
459#define SMSTPCR3 0xe615013c 485#define SMSTPCR3 0xe615013c
460#define SMSTPCR3_CMT1 (1 << 29) 486#define SMSTPCR3_CMT1 (1 << 29)
461 487
@@ -466,4 +492,10 @@ void __init sh7377_add_early_devices(void)
466 492
467 early_platform_add_devices(sh7377_early_devices, 493 early_platform_add_devices(sh7377_early_devices,
468 ARRAY_SIZE(sh7377_early_devices)); 494 ARRAY_SIZE(sh7377_early_devices));
495
496 /* setup early console here as well */
497 shmobile_setup_console();
498
499 /* override timer setup with soc-specific code */
500 shmobile_timer.init = sh7377_earlytimer_init;
469} 501}
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 20e71e5cace4..b6a0734a738e 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -32,8 +32,28 @@
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34#include <mach/sh73a0.h> 34#include <mach/sh73a0.h>
35#include <mach/common.h>
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37#include <asm/mach/map.h>
36#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
39#include <asm/mach/time.h>
40
41static struct map_desc sh73a0_io_desc[] __initdata = {
42 /* create a 1:1 entity map for 0xe6xxxxxx
43 * used by CPGA, INTC and PFC.
44 */
45 {
46 .virtual = 0xe6000000,
47 .pfn = __phys_to_pfn(0xe6000000),
48 .length = 256 << 20,
49 .type = MT_DEVICE_NONSHARED
50 },
51};
52
53void __init sh73a0_map_io(void)
54{
55 iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
56}
37 57
38static struct plat_sci_port scif0_platform_data = { 58static struct plat_sci_port scif0_platform_data = {
39 .mapbase = 0xe6c40000, 59 .mapbase = 0xe6c40000,
@@ -667,8 +687,20 @@ void __init sh73a0_add_standard_devices(void)
667 ARRAY_SIZE(sh73a0_late_devices)); 687 ARRAY_SIZE(sh73a0_late_devices));
668} 688}
669 689
690static void __init sh73a0_earlytimer_init(void)
691{
692 sh73a0_clock_init();
693 shmobile_earlytimer_init();
694}
695
670void __init sh73a0_add_early_devices(void) 696void __init sh73a0_add_early_devices(void)
671{ 697{
672 early_platform_add_devices(sh73a0_early_devices, 698 early_platform_add_devices(sh73a0_early_devices,
673 ARRAY_SIZE(sh73a0_early_devices)); 699 ARRAY_SIZE(sh73a0_early_devices));
700
701 /* setup early console here as well */
702 shmobile_setup_console();
703
704 /* override timer setup with soc-specific code */
705 shmobile_timer.init = sh73a0_earlytimer_init;
674} 706}
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index 895794b543cd..be1ad70fe404 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -36,11 +36,15 @@ static void __init shmobile_late_time_init(void)
36 early_platform_driver_probe("earlytimer", 2, 0); 36 early_platform_driver_probe("earlytimer", 2, 0);
37} 37}
38 38
39static void __init shmobile_timer_init(void) 39void __init shmobile_earlytimer_init(void)
40{ 40{
41 late_time_init = shmobile_late_time_init; 41 late_time_init = shmobile_late_time_init;
42} 42}
43 43
44static void __init shmobile_timer_init(void)
45{
46}
47
44struct sys_timer shmobile_timer = { 48struct sys_timer shmobile_timer = {
45 .init = shmobile_timer_init, 49 .init = shmobile_timer_init,
46}; 50};
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 5cfa5390e0fd..d07a3afc38c0 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -5,7 +5,7 @@ config UX500_SOC_COMMON
5 default y 5 default y
6 select ARM_GIC 6 select ARM_GIC
7 select HAS_MTU 7 select HAS_MTU
8 select ARM_ERRATA_753970 8 select PL310_ERRATA_753970
9 select ARM_ERRATA_754322 9 select ARM_ERRATA_754322
10 select ARM_ERRATA_764369 10 select ARM_ERRATA_764369
11 11
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 9b3d0fbaee72..88c3ba151e87 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -7,7 +7,7 @@ config ARCH_VEXPRESS_CA9X4
7 select ARM_GIC 7 select ARM_GIC
8 select ARM_ERRATA_720789 8 select ARM_ERRATA_720789
9 select ARM_ERRATA_751472 9 select ARM_ERRATA_751472
10 select ARM_ERRATA_753970 10 select PL310_ERRATA_753970
11 select HAVE_SMP 11 select HAVE_SMP
12 select MIGHT_HAVE_CACHE_L2X0 12 select MIGHT_HAVE_CACHE_L2X0
13 13
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 0404ccbb8aa3..f1c8486f7501 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -230,9 +230,7 @@ __v7_setup:
230 mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register 230 mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register
231#endif 231#endif
232#ifdef CONFIG_ARM_ERRATA_743622 232#ifdef CONFIG_ARM_ERRATA_743622
233 teq r6, #0x20 @ present in r2p0 233 teq r5, #0x00200000 @ only present in r2p*
234 teqne r6, #0x21 @ present in r2p1
235 teqne r6, #0x22 @ present in r2p2
236 mrceq p15, 0, r10, c15, c0, 1 @ read diagnostic register 234 mrceq p15, 0, r10, c15, c0, 1 @ read diagnostic register
237 orreq r10, r10, #1 << 6 @ set bit #6 235 orreq r10, r10, #1 << 6 @ set bit #6
238 mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register 236 mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index 2efd6454bce0..37bbbbb981b2 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -428,8 +428,16 @@
428#define OMAP_GPMC_NR_IRQS 8 428#define OMAP_GPMC_NR_IRQS 8
429#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) 429#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
430 430
431/* PRCM IRQ handler */
432#ifdef CONFIG_ARCH_OMAP2PLUS
433#define OMAP_PRCM_IRQ_BASE (OMAP_GPMC_IRQ_END)
434#define OMAP_PRCM_NR_IRQS 64
435#define OMAP_PRCM_IRQ_END (OMAP_PRCM_IRQ_BASE + OMAP_PRCM_NR_IRQS)
436#else
437#define OMAP_PRCM_IRQ_END OMAP_GPMC_IRQ_END
438#endif
431 439
432#define NR_IRQS OMAP_GPMC_IRQ_END 440#define NR_IRQS OMAP_PRCM_IRQ_END
433 441
434#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) 442#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
435 443
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 9fe35348e03b..2bab4c99a234 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
1249 struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1; 1249 struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
1250 int channel; 1250 int channel;
1251 1251
1252 for (channel = dma_channels - 1; channel >= 0; cp++, channel--) 1252 for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
1253 s3c2410_dma_resume_chan(cp); 1253 s3c2410_dma_resume_chan(cp);
1254} 1254}
1255 1255
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index cd5aac08a265..8b928f9bc1c3 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -1445,7 +1445,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
1445 1445
1446#ifdef CONFIG_S3C_DEV_USB_HSOTG 1446#ifdef CONFIG_S3C_DEV_USB_HSOTG
1447static struct resource s3c_usb_hsotg_resources[] = { 1447static struct resource s3c_usb_hsotg_resources[] = {
1448 [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_16K), 1448 [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K),
1449 [1] = DEFINE_RES_IRQ(IRQ_OTG), 1449 [1] = DEFINE_RES_IRQ(IRQ_OTG),
1450}; 1450};
1451 1451
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
index 0c77e4298675..abb5bdecd509 100644
--- a/arch/arm/plat-spear/time.c
+++ b/arch/arm/plat-spear/time.c
@@ -145,11 +145,13 @@ static void clockevent_set_mode(enum clock_event_mode mode,
145static int clockevent_next_event(unsigned long cycles, 145static int clockevent_next_event(unsigned long cycles,
146 struct clock_event_device *clk_event_dev) 146 struct clock_event_device *clk_event_dev)
147{ 147{
148 u16 val; 148 u16 val = readw(gpt_base + CR(CLKEVT));
149
150 if (val & CTRL_ENABLE)
151 writew(val & ~CTRL_ENABLE, gpt_base + CR(CLKEVT));
149 152
150 writew(cycles, gpt_base + LOAD(CLKEVT)); 153 writew(cycles, gpt_base + LOAD(CLKEVT));
151 154
152 val = readw(gpt_base + CR(CLKEVT));
153 val |= CTRL_ENABLE | CTRL_INT_ENABLE; 155 val |= CTRL_ENABLE | CTRL_INT_ENABLE;
154 writew(val, gpt_base + CR(CLKEVT)); 156 writew(val, gpt_base + CR(CLKEVT));
155 157
diff --git a/arch/c6x/include/asm/processor.h b/arch/c6x/include/asm/processor.h
index 8154c4ee8c9c..77ecbded1f37 100644
--- a/arch/c6x/include/asm/processor.h
+++ b/arch/c6x/include/asm/processor.h
@@ -122,8 +122,8 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
122 122
123extern unsigned long get_wchan(struct task_struct *p); 123extern unsigned long get_wchan(struct task_struct *p);
124 124
125#define KSTK_EIP(tsk) (task_pt_regs(task)->pc) 125#define KSTK_EIP(task) (task_pt_regs(task)->pc)
126#define KSTK_ESP(tsk) (task_pt_regs(task)->sp) 126#define KSTK_ESP(task) (task_pt_regs(task)->sp)
127 127
128#define cpu_relax() do { } while (0) 128#define cpu_relax() do { } while (0)
129 129
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index 7da4d0081487..a7193ae13a5d 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -146,7 +146,7 @@ static int __init alchemy_time_init(unsigned int m2int)
146 cd->shift = 32; 146 cd->shift = 32;
147 cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); 147 cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift);
148 cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd); 148 cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd);
149 cd->min_delta_ns = clockevent_delta2ns(8, cd); /* ~0.25ms */ 149 cd->min_delta_ns = clockevent_delta2ns(9, cd); /* ~0.28ms */
150 clockevents_register_device(cd); 150 clockevents_register_device(cd);
151 setup_irq(m2int, &au1x_rtcmatch2_irqaction); 151 setup_irq(m2int, &au1x_rtcmatch2_irqaction);
152 152
diff --git a/arch/mips/ath79/dev-wmac.c b/arch/mips/ath79/dev-wmac.c
index 24f546985b69..e21507052066 100644
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
@@ -96,7 +96,7 @@ void __init ath79_register_wmac(u8 *cal_data)
96{ 96{
97 if (soc_is_ar913x()) 97 if (soc_is_ar913x())
98 ar913x_wmac_setup(); 98 ar913x_wmac_setup();
99 if (soc_is_ar933x()) 99 else if (soc_is_ar933x())
100 ar933x_wmac_setup(); 100 ar933x_wmac_setup();
101 else 101 else
102 BUG(); 102 BUG();
diff --git a/arch/mips/configs/nlm_xlp_defconfig b/arch/mips/configs/nlm_xlp_defconfig
index 4479fd669ac1..28c6b276c216 100644
--- a/arch/mips/configs/nlm_xlp_defconfig
+++ b/arch/mips/configs/nlm_xlp_defconfig
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
8# CONFIG_SECCOMP is not set 8# CONFIG_SECCOMP is not set
9CONFIG_USE_OF=y 9CONFIG_USE_OF=y
10CONFIG_EXPERIMENTAL=y 10CONFIG_EXPERIMENTAL=y
11CONFIG_CROSS_COMPILE="mips-linux-gnu-" 11CONFIG_CROSS_COMPILE=""
12# CONFIG_LOCALVERSION_AUTO is not set 12# CONFIG_LOCALVERSION_AUTO is not set
13CONFIG_SYSVIPC=y 13CONFIG_SYSVIPC=y
14CONFIG_POSIX_MQUEUE=y 14CONFIG_POSIX_MQUEUE=y
@@ -22,7 +22,7 @@ CONFIG_AUDIT=y
22CONFIG_CGROUPS=y 22CONFIG_CGROUPS=y
23CONFIG_NAMESPACES=y 23CONFIG_NAMESPACES=y
24CONFIG_BLK_DEV_INITRD=y 24CONFIG_BLK_DEV_INITRD=y
25CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlp" 25CONFIG_INITRAMFS_SOURCE=""
26CONFIG_RD_BZIP2=y 26CONFIG_RD_BZIP2=y
27CONFIG_RD_LZMA=y 27CONFIG_RD_LZMA=y
28CONFIG_INITRAMFS_COMPRESSION_LZMA=y 28CONFIG_INITRAMFS_COMPRESSION_LZMA=y
diff --git a/arch/mips/configs/nlm_xlr_defconfig b/arch/mips/configs/nlm_xlr_defconfig
index 7c68666fdd64..d0b857d98c91 100644
--- a/arch/mips/configs/nlm_xlr_defconfig
+++ b/arch/mips/configs/nlm_xlr_defconfig
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
8CONFIG_PREEMPT_VOLUNTARY=y 8CONFIG_PREEMPT_VOLUNTARY=y
9CONFIG_KEXEC=y 9CONFIG_KEXEC=y
10CONFIG_EXPERIMENTAL=y 10CONFIG_EXPERIMENTAL=y
11CONFIG_CROSS_COMPILE="mips-linux-gnu-" 11CONFIG_CROSS_COMPILE=""
12# CONFIG_LOCALVERSION_AUTO is not set 12# CONFIG_LOCALVERSION_AUTO is not set
13CONFIG_SYSVIPC=y 13CONFIG_SYSVIPC=y
14CONFIG_POSIX_MQUEUE=y 14CONFIG_POSIX_MQUEUE=y
@@ -22,7 +22,7 @@ CONFIG_AUDIT=y
22CONFIG_NAMESPACES=y 22CONFIG_NAMESPACES=y
23CONFIG_SCHED_AUTOGROUP=y 23CONFIG_SCHED_AUTOGROUP=y
24CONFIG_BLK_DEV_INITRD=y 24CONFIG_BLK_DEV_INITRD=y
25CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlr" 25CONFIG_INITRAMFS_SOURCE=""
26CONFIG_RD_BZIP2=y 26CONFIG_RD_BZIP2=y
27CONFIG_RD_LZMA=y 27CONFIG_RD_LZMA=y
28CONFIG_INITRAMFS_COMPRESSION_GZIP=y 28CONFIG_INITRAMFS_COMPRESSION_GZIP=y
diff --git a/arch/mips/configs/powertv_defconfig b/arch/mips/configs/powertv_defconfig
index 3b0b6e8c8533..7fda0ce5f692 100644
--- a/arch/mips/configs/powertv_defconfig
+++ b/arch/mips/configs/powertv_defconfig
@@ -6,7 +6,7 @@ CONFIG_HZ_1000=y
6CONFIG_PREEMPT=y 6CONFIG_PREEMPT=y
7# CONFIG_SECCOMP is not set 7# CONFIG_SECCOMP is not set
8CONFIG_EXPERIMENTAL=y 8CONFIG_EXPERIMENTAL=y
9CONFIG_CROSS_COMPILE="mips-linux-" 9CONFIG_CROSS_COMPILE=""
10# CONFIG_SWAP is not set 10# CONFIG_SWAP is not set
11CONFIG_SYSVIPC=y 11CONFIG_SYSVIPC=y
12CONFIG_LOG_BUF_SHIFT=16 12CONFIG_LOG_BUF_SHIFT=16
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h
index 556e1be20bf6..fb9975c74c57 100644
--- a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h
+++ b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h
@@ -11,6 +11,9 @@
11#include <asm/io.h> 11#include <asm/io.h>
12#include <asm/mach-au1x00/au1000.h> 12#include <asm/mach-au1x00/au1000.h>
13 13
14struct gpio;
15struct gpio_chip;
16
14/* with the current GPIC design, up to 128 GPIOs are possible. 17/* with the current GPIC design, up to 128 GPIOs are possible.
15 * The only implementation so far is in the Au1300, which has 75 externally 18 * The only implementation so far is in the Au1300, which has 75 externally
16 * available GPIOs. 19 * available GPIOs.
@@ -203,7 +206,22 @@ static inline int gpio_request(unsigned int gpio, const char *label)
203 return 0; 206 return 0;
204} 207}
205 208
206static inline void gpio_free(unsigned int gpio) 209static inline int gpio_request_one(unsigned gpio,
210 unsigned long flags, const char *label)
211{
212 return 0;
213}
214
215static inline int gpio_request_array(struct gpio *array, size_t num)
216{
217 return 0;
218}
219
220static inline void gpio_free(unsigned gpio)
221{
222}
223
224static inline void gpio_free_array(struct gpio *array, size_t num)
207{ 225{
208} 226}
209 227
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index d41790928c64..da9bd7d270d1 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -39,9 +39,6 @@
39#define HPAGE_MASK (~(HPAGE_SIZE - 1)) 39#define HPAGE_MASK (~(HPAGE_SIZE - 1))
40#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) 40#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
41#else /* !CONFIG_HUGETLB_PAGE */ 41#else /* !CONFIG_HUGETLB_PAGE */
42# ifndef BUILD_BUG
43# define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0)
44# endif
45#define HPAGE_SHIFT ({BUILD_BUG(); 0; }) 42#define HPAGE_SHIFT ({BUILD_BUG(); 0; })
46#define HPAGE_SIZE ({BUILD_BUG(); 0; }) 43#define HPAGE_SIZE ({BUILD_BUG(); 0; })
47#define HPAGE_MASK ({BUILD_BUG(); 0; }) 44#define HPAGE_MASK ({BUILD_BUG(); 0; })
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index 58fe71afd879..d5e950ab8527 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -8,7 +8,6 @@
8 * SMP support for BMIPS 8 * SMP support for BMIPS
9 */ 9 */
10 10
11#include <linux/version.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index cc4a3f120f54..d79ae5437b58 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1135,7 +1135,7 @@ asmlinkage void do_mt(struct pt_regs *regs)
1135 printk(KERN_DEBUG "YIELD Scheduler Exception\n"); 1135 printk(KERN_DEBUG "YIELD Scheduler Exception\n");
1136 break; 1136 break;
1137 case 5: 1137 case 5:
1138 printk(KERN_DEBUG "Gating Storage Schedulier Exception\n"); 1138 printk(KERN_DEBUG "Gating Storage Scheduler Exception\n");
1139 break; 1139 break;
1140 default: 1140 default:
1141 printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", 1141 printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n",
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index a81176f44c74..924da5eb7031 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -69,7 +69,6 @@ SECTIONS
69 RODATA 69 RODATA
70 70
71 /* writeable */ 71 /* writeable */
72 _sdata = .; /* Start of data section */
73 .data : { /* Data */ 72 .data : { /* Data */
74 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ 73 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
75 74
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 937cf3368164..69ebd586d7ff 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -42,6 +42,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
42 const int field = sizeof(unsigned long) * 2; 42 const int field = sizeof(unsigned long) * 2;
43 siginfo_t info; 43 siginfo_t info;
44 int fault; 44 int fault;
45 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
46 (write ? FAULT_FLAG_WRITE : 0);
45 47
46#if 0 48#if 0
47 printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), 49 printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(),
@@ -91,6 +93,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
91 if (in_atomic() || !mm) 93 if (in_atomic() || !mm)
92 goto bad_area_nosemaphore; 94 goto bad_area_nosemaphore;
93 95
96retry:
94 down_read(&mm->mmap_sem); 97 down_read(&mm->mmap_sem);
95 vma = find_vma(mm, address); 98 vma = find_vma(mm, address);
96 if (!vma) 99 if (!vma)
@@ -144,7 +147,11 @@ good_area:
144 * make sure we exit gracefully rather than endlessly redo 147 * make sure we exit gracefully rather than endlessly redo
145 * the fault. 148 * the fault.
146 */ 149 */
147 fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); 150 fault = handle_mm_fault(mm, vma, address, flags);
151
152 if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
153 return;
154
148 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); 155 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
149 if (unlikely(fault & VM_FAULT_ERROR)) { 156 if (unlikely(fault & VM_FAULT_ERROR)) {
150 if (fault & VM_FAULT_OOM) 157 if (fault & VM_FAULT_OOM)
@@ -153,12 +160,27 @@ good_area:
153 goto do_sigbus; 160 goto do_sigbus;
154 BUG(); 161 BUG();
155 } 162 }
156 if (fault & VM_FAULT_MAJOR) { 163 if (flags & FAULT_FLAG_ALLOW_RETRY) {
157 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address); 164 if (fault & VM_FAULT_MAJOR) {
158 tsk->maj_flt++; 165 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1,
159 } else { 166 regs, address);
160 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); 167 tsk->maj_flt++;
161 tsk->min_flt++; 168 } else {
169 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1,
170 regs, address);
171 tsk->min_flt++;
172 }
173 if (fault & VM_FAULT_RETRY) {
174 flags &= ~FAULT_FLAG_ALLOW_RETRY;
175
176 /*
177 * No need to up_read(&mm->mmap_sem) as we would
178 * have already released it in __lock_page_or_retry
179 * in mm/filemap.c.
180 */
181
182 goto retry;
183 }
162 } 184 }
163 185
164 up_read(&mm->mmap_sem); 186 up_read(&mm->mmap_sem);
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index aec2b111d35b..15521505ebe8 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
279{ 279{
280 /* Propagate hose info into the subordinate devices. */ 280 /* Propagate hose info into the subordinate devices. */
281 281
282 struct list_head *ln;
283 struct pci_dev *dev = bus->self; 282 struct pci_dev *dev = bus->self;
284 283
285 if (pci_probe_only && dev && 284 if (pci_probe_only && dev &&
@@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
288 pcibios_fixup_device_resources(dev, bus); 287 pcibios_fixup_device_resources(dev, bus);
289 } 288 }
290 289
291 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { 290 list_for_each_entry(dev, &bus->devices, bus_list) {
292 dev = pci_dev_b(ln);
293
294 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) 291 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
295 pcibios_fixup_device_resources(dev, bus); 292 pcibios_fixup_device_resources(dev, bus);
296 } 293 }
diff --git a/arch/mips/pmc-sierra/yosemite/ht-irq.c b/arch/mips/pmc-sierra/yosemite/ht-irq.c
index 86b98e98fb4f..62ead6601c69 100644
--- a/arch/mips/pmc-sierra/yosemite/ht-irq.c
+++ b/arch/mips/pmc-sierra/yosemite/ht-irq.c
@@ -35,16 +35,6 @@
35 */ 35 */
36void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) 36void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus)
37{ 37{
38 struct pci_bus *current_bus = bus;
39 struct pci_dev *devices;
40 struct list_head *devices_link;
41
42 list_for_each(devices_link, &(current_bus->devices)) {
43 devices = pci_dev_b(devices_link);
44 if (devices == NULL)
45 continue;
46 }
47
48 /* 38 /*
49 * PLX and SPKT related changes go here 39 * PLX and SPKT related changes go here
50 */ 40 */
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c
index 8e93b2122524..4642f56e70e5 100644
--- a/arch/mips/txx9/generic/7segled.c
+++ b/arch/mips/txx9/generic/7segled.c
@@ -102,7 +102,7 @@ static int __init tx_7segled_init_sysfs(void)
102 break; 102 break;
103 } 103 }
104 dev->id = i; 104 dev->id = i;
105 dev->dev = &tx_7segled_subsys; 105 dev->bus = &tx_7segled_subsys;
106 error = device_register(dev); 106 error = device_register(dev);
107 if (!error) { 107 if (!error) {
108 device_create_file(dev, &dev_attr_ascii); 108 device_create_file(dev, &dev_attr_ascii);
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index 74b8db1b74a9..4a52590fe3d8 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -322,7 +322,7 @@ static void ivdr_clk_disable(struct clk *clk)
322 __raw_writew(__raw_readw(PA_IVDRCTL) & ~(1 << IVDR_CK_ON), PA_IVDRCTL); 322 __raw_writew(__raw_readw(PA_IVDRCTL) & ~(1 << IVDR_CK_ON), PA_IVDRCTL);
323} 323}
324 324
325static struct clk_ops ivdr_clk_ops = { 325static struct sh_clk_ops ivdr_clk_ops = {
326 .enable = ivdr_clk_enable, 326 .enable = ivdr_clk_enable,
327 .disable = ivdr_clk_disable, 327 .disable = ivdr_clk_disable,
328}; 328};
diff --git a/arch/sh/boards/mach-sdk7786/setup.c b/arch/sh/boards/mach-sdk7786/setup.c
index 486d1ac3694c..27a2314f50ac 100644
--- a/arch/sh/boards/mach-sdk7786/setup.c
+++ b/arch/sh/boards/mach-sdk7786/setup.c
@@ -167,7 +167,7 @@ static void sdk7786_pcie_clk_disable(struct clk *clk)
167 fpga_write_reg(fpga_read_reg(PCIECR) & ~PCIECR_CLKEN, PCIECR); 167 fpga_write_reg(fpga_read_reg(PCIECR) & ~PCIECR_CLKEN, PCIECR);
168} 168}
169 169
170static struct clk_ops sdk7786_pcie_clk_ops = { 170static struct sh_clk_ops sdk7786_pcie_clk_ops = {
171 .enable = sdk7786_pcie_clk_enable, 171 .enable = sdk7786_pcie_clk_enable,
172 .disable = sdk7786_pcie_clk_disable, 172 .disable = sdk7786_pcie_clk_disable,
173}; 173};
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h
index 803d4c7f09dc..0390a07e7e3b 100644
--- a/arch/sh/include/asm/clock.h
+++ b/arch/sh/include/asm/clock.h
@@ -4,7 +4,7 @@
4#include <linux/sh_clk.h> 4#include <linux/sh_clk.h>
5 5
6/* Should be defined by processor-specific code */ 6/* Should be defined by processor-specific code */
7void __deprecated arch_init_clk_ops(struct clk_ops **, int type); 7void __deprecated arch_init_clk_ops(struct sh_clk_ops **, int type);
8int __init arch_clk_init(void); 8int __init arch_clk_init(void);
9 9
10/* arch/sh/kernel/cpu/clock-cpg.c */ 10/* arch/sh/kernel/cpu/clock-cpg.c */
diff --git a/arch/sh/kernel/cpu/sh2/clock-sh7619.c b/arch/sh/kernel/cpu/sh2/clock-sh7619.c
index 5b7f12e58a8d..e80252ae5bca 100644
--- a/arch/sh/kernel/cpu/sh2/clock-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/clock-sh7619.c
@@ -28,7 +28,7 @@ static void master_clk_init(struct clk *clk)
28 clk->rate *= pll2_mult * pll1rate[(__raw_readw(FREQCR) >> 8) & 7]; 28 clk->rate *= pll2_mult * pll1rate[(__raw_readw(FREQCR) >> 8) & 7];
29} 29}
30 30
31static struct clk_ops sh7619_master_clk_ops = { 31static struct sh_clk_ops sh7619_master_clk_ops = {
32 .init = master_clk_init, 32 .init = master_clk_init,
33}; 33};
34 34
@@ -38,7 +38,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
38 return clk->parent->rate / pfc_divisors[idx]; 38 return clk->parent->rate / pfc_divisors[idx];
39} 39}
40 40
41static struct clk_ops sh7619_module_clk_ops = { 41static struct sh_clk_ops sh7619_module_clk_ops = {
42 .recalc = module_clk_recalc, 42 .recalc = module_clk_recalc,
43}; 43};
44 44
@@ -47,22 +47,22 @@ static unsigned long bus_clk_recalc(struct clk *clk)
47 return clk->parent->rate / pll1rate[(__raw_readw(FREQCR) >> 8) & 7]; 47 return clk->parent->rate / pll1rate[(__raw_readw(FREQCR) >> 8) & 7];
48} 48}
49 49
50static struct clk_ops sh7619_bus_clk_ops = { 50static struct sh_clk_ops sh7619_bus_clk_ops = {
51 .recalc = bus_clk_recalc, 51 .recalc = bus_clk_recalc,
52}; 52};
53 53
54static struct clk_ops sh7619_cpu_clk_ops = { 54static struct sh_clk_ops sh7619_cpu_clk_ops = {
55 .recalc = followparent_recalc, 55 .recalc = followparent_recalc,
56}; 56};
57 57
58static struct clk_ops *sh7619_clk_ops[] = { 58static struct sh_clk_ops *sh7619_clk_ops[] = {
59 &sh7619_master_clk_ops, 59 &sh7619_master_clk_ops,
60 &sh7619_module_clk_ops, 60 &sh7619_module_clk_ops,
61 &sh7619_bus_clk_ops, 61 &sh7619_bus_clk_ops,
62 &sh7619_cpu_clk_ops, 62 &sh7619_cpu_clk_ops,
63}; 63};
64 64
65void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 65void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
66{ 66{
67 if (test_mode_pin(MODE_PIN2 | MODE_PIN0) || 67 if (test_mode_pin(MODE_PIN2 | MODE_PIN0) ||
68 test_mode_pin(MODE_PIN2 | MODE_PIN1)) 68 test_mode_pin(MODE_PIN2 | MODE_PIN1))
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7201.c b/arch/sh/kernel/cpu/sh2a/clock-sh7201.c
index 1174e2d96c03..532a36c72322 100644
--- a/arch/sh/kernel/cpu/sh2a/clock-sh7201.c
+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7201.c
@@ -30,7 +30,7 @@ static void master_clk_init(struct clk *clk)
30 pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007]; 30 pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
31} 31}
32 32
33static struct clk_ops sh7201_master_clk_ops = { 33static struct sh_clk_ops sh7201_master_clk_ops = {
34 .init = master_clk_init, 34 .init = master_clk_init,
35}; 35};
36 36
@@ -40,7 +40,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
40 return clk->parent->rate / pfc_divisors[idx]; 40 return clk->parent->rate / pfc_divisors[idx];
41} 41}
42 42
43static struct clk_ops sh7201_module_clk_ops = { 43static struct sh_clk_ops sh7201_module_clk_ops = {
44 .recalc = module_clk_recalc, 44 .recalc = module_clk_recalc,
45}; 45};
46 46
@@ -50,7 +50,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
50 return clk->parent->rate / pfc_divisors[idx]; 50 return clk->parent->rate / pfc_divisors[idx];
51} 51}
52 52
53static struct clk_ops sh7201_bus_clk_ops = { 53static struct sh_clk_ops sh7201_bus_clk_ops = {
54 .recalc = bus_clk_recalc, 54 .recalc = bus_clk_recalc,
55}; 55};
56 56
@@ -60,18 +60,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
60 return clk->parent->rate / ifc_divisors[idx]; 60 return clk->parent->rate / ifc_divisors[idx];
61} 61}
62 62
63static struct clk_ops sh7201_cpu_clk_ops = { 63static struct sh_clk_ops sh7201_cpu_clk_ops = {
64 .recalc = cpu_clk_recalc, 64 .recalc = cpu_clk_recalc,
65}; 65};
66 66
67static struct clk_ops *sh7201_clk_ops[] = { 67static struct sh_clk_ops *sh7201_clk_ops[] = {
68 &sh7201_master_clk_ops, 68 &sh7201_master_clk_ops,
69 &sh7201_module_clk_ops, 69 &sh7201_module_clk_ops,
70 &sh7201_bus_clk_ops, 70 &sh7201_bus_clk_ops,
71 &sh7201_cpu_clk_ops, 71 &sh7201_cpu_clk_ops,
72}; 72};
73 73
74void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 74void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
75{ 75{
76 if (test_mode_pin(MODE_PIN1 | MODE_PIN0)) 76 if (test_mode_pin(MODE_PIN1 | MODE_PIN0))
77 pll2_mult = 1; 77 pll2_mult = 1;
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c
index 95a008e8b735..529f719b6e33 100644
--- a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c
+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c
@@ -32,7 +32,7 @@ static void master_clk_init(struct clk *clk)
32 clk->rate *= pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0003] * pll2_mult; 32 clk->rate *= pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0003] * pll2_mult;
33} 33}
34 34
35static struct clk_ops sh7203_master_clk_ops = { 35static struct sh_clk_ops sh7203_master_clk_ops = {
36 .init = master_clk_init, 36 .init = master_clk_init,
37}; 37};
38 38
@@ -42,7 +42,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
42 return clk->parent->rate / pfc_divisors[idx]; 42 return clk->parent->rate / pfc_divisors[idx];
43} 43}
44 44
45static struct clk_ops sh7203_module_clk_ops = { 45static struct sh_clk_ops sh7203_module_clk_ops = {
46 .recalc = module_clk_recalc, 46 .recalc = module_clk_recalc,
47}; 47};
48 48
@@ -52,22 +52,22 @@ static unsigned long bus_clk_recalc(struct clk *clk)
52 return clk->parent->rate / pfc_divisors[idx-2]; 52 return clk->parent->rate / pfc_divisors[idx-2];
53} 53}
54 54
55static struct clk_ops sh7203_bus_clk_ops = { 55static struct sh_clk_ops sh7203_bus_clk_ops = {
56 .recalc = bus_clk_recalc, 56 .recalc = bus_clk_recalc,
57}; 57};
58 58
59static struct clk_ops sh7203_cpu_clk_ops = { 59static struct sh_clk_ops sh7203_cpu_clk_ops = {
60 .recalc = followparent_recalc, 60 .recalc = followparent_recalc,
61}; 61};
62 62
63static struct clk_ops *sh7203_clk_ops[] = { 63static struct sh_clk_ops *sh7203_clk_ops[] = {
64 &sh7203_master_clk_ops, 64 &sh7203_master_clk_ops,
65 &sh7203_module_clk_ops, 65 &sh7203_module_clk_ops,
66 &sh7203_bus_clk_ops, 66 &sh7203_bus_clk_ops,
67 &sh7203_cpu_clk_ops, 67 &sh7203_cpu_clk_ops,
68}; 68};
69 69
70void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 70void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
71{ 71{
72 if (test_mode_pin(MODE_PIN1)) 72 if (test_mode_pin(MODE_PIN1))
73 pll2_mult = 4; 73 pll2_mult = 4;
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c
index 3c314d7cd6e6..177789834678 100644
--- a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c
@@ -29,7 +29,7 @@ static void master_clk_init(struct clk *clk)
29 clk->rate *= pll2_mult * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007]; 29 clk->rate *= pll2_mult * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
30} 30}
31 31
32static struct clk_ops sh7206_master_clk_ops = { 32static struct sh_clk_ops sh7206_master_clk_ops = {
33 .init = master_clk_init, 33 .init = master_clk_init,
34}; 34};
35 35
@@ -39,7 +39,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
39 return clk->parent->rate / pfc_divisors[idx]; 39 return clk->parent->rate / pfc_divisors[idx];
40} 40}
41 41
42static struct clk_ops sh7206_module_clk_ops = { 42static struct sh_clk_ops sh7206_module_clk_ops = {
43 .recalc = module_clk_recalc, 43 .recalc = module_clk_recalc,
44}; 44};
45 45
@@ -48,7 +48,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
48 return clk->parent->rate / pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007]; 48 return clk->parent->rate / pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
49} 49}
50 50
51static struct clk_ops sh7206_bus_clk_ops = { 51static struct sh_clk_ops sh7206_bus_clk_ops = {
52 .recalc = bus_clk_recalc, 52 .recalc = bus_clk_recalc,
53}; 53};
54 54
@@ -58,18 +58,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
58 return clk->parent->rate / ifc_divisors[idx]; 58 return clk->parent->rate / ifc_divisors[idx];
59} 59}
60 60
61static struct clk_ops sh7206_cpu_clk_ops = { 61static struct sh_clk_ops sh7206_cpu_clk_ops = {
62 .recalc = cpu_clk_recalc, 62 .recalc = cpu_clk_recalc,
63}; 63};
64 64
65static struct clk_ops *sh7206_clk_ops[] = { 65static struct sh_clk_ops *sh7206_clk_ops[] = {
66 &sh7206_master_clk_ops, 66 &sh7206_master_clk_ops,
67 &sh7206_module_clk_ops, 67 &sh7206_module_clk_ops,
68 &sh7206_bus_clk_ops, 68 &sh7206_bus_clk_ops,
69 &sh7206_cpu_clk_ops, 69 &sh7206_cpu_clk_ops,
70}; 70};
71 71
72void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 72void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
73{ 73{
74 if (test_mode_pin(MODE_PIN2 | MODE_PIN1 | MODE_PIN0)) 74 if (test_mode_pin(MODE_PIN2 | MODE_PIN1 | MODE_PIN0))
75 pll2_mult = 1; 75 pll2_mult = 1;
diff --git a/arch/sh/kernel/cpu/sh2a/ex.S b/arch/sh/kernel/cpu/sh2a/ex.S
index 3ead9e63965a..4568066700cf 100644
--- a/arch/sh/kernel/cpu/sh2a/ex.S
+++ b/arch/sh/kernel/cpu/sh2a/ex.S
@@ -66,6 +66,7 @@ vector = 0
66 .long exception_entry0 + vector * 6 66 .long exception_entry0 + vector * 6
67vector = vector + 1 67vector = vector + 1
68 .endr 68 .endr
69vector = 0
69 .rept 256 70 .rept 256
70 .long exception_entry1 + vector * 6 71 .long exception_entry1 + vector * 6
71vector = vector + 1 72vector = vector + 1
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh3.c b/arch/sh/kernel/cpu/sh3/clock-sh3.c
index b78384afac09..90faa44ca94d 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh3.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh3.c
@@ -34,7 +34,7 @@ static void master_clk_init(struct clk *clk)
34 clk->rate *= pfc_divisors[idx]; 34 clk->rate *= pfc_divisors[idx];
35} 35}
36 36
37static struct clk_ops sh3_master_clk_ops = { 37static struct sh_clk_ops sh3_master_clk_ops = {
38 .init = master_clk_init, 38 .init = master_clk_init,
39}; 39};
40 40
@@ -46,7 +46,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
46 return clk->parent->rate / pfc_divisors[idx]; 46 return clk->parent->rate / pfc_divisors[idx];
47} 47}
48 48
49static struct clk_ops sh3_module_clk_ops = { 49static struct sh_clk_ops sh3_module_clk_ops = {
50 .recalc = module_clk_recalc, 50 .recalc = module_clk_recalc,
51}; 51};
52 52
@@ -58,7 +58,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
58 return clk->parent->rate / stc_multipliers[idx]; 58 return clk->parent->rate / stc_multipliers[idx];
59} 59}
60 60
61static struct clk_ops sh3_bus_clk_ops = { 61static struct sh_clk_ops sh3_bus_clk_ops = {
62 .recalc = bus_clk_recalc, 62 .recalc = bus_clk_recalc,
63}; 63};
64 64
@@ -70,18 +70,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
70 return clk->parent->rate / ifc_divisors[idx]; 70 return clk->parent->rate / ifc_divisors[idx];
71} 71}
72 72
73static struct clk_ops sh3_cpu_clk_ops = { 73static struct sh_clk_ops sh3_cpu_clk_ops = {
74 .recalc = cpu_clk_recalc, 74 .recalc = cpu_clk_recalc,
75}; 75};
76 76
77static struct clk_ops *sh3_clk_ops[] = { 77static struct sh_clk_ops *sh3_clk_ops[] = {
78 &sh3_master_clk_ops, 78 &sh3_master_clk_ops,
79 &sh3_module_clk_ops, 79 &sh3_module_clk_ops,
80 &sh3_bus_clk_ops, 80 &sh3_bus_clk_ops,
81 &sh3_cpu_clk_ops, 81 &sh3_cpu_clk_ops,
82}; 82};
83 83
84void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 84void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
85{ 85{
86 if (idx < ARRAY_SIZE(sh3_clk_ops)) 86 if (idx < ARRAY_SIZE(sh3_clk_ops))
87 *ops = sh3_clk_ops[idx]; 87 *ops = sh3_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7705.c b/arch/sh/kernel/cpu/sh3/clock-sh7705.c
index 0ecea1451c6f..a8da4a9986b3 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh7705.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh7705.c
@@ -35,7 +35,7 @@ static void master_clk_init(struct clk *clk)
35 clk->rate *= pfc_divisors[__raw_readw(FRQCR) & 0x0003]; 35 clk->rate *= pfc_divisors[__raw_readw(FRQCR) & 0x0003];
36} 36}
37 37
38static struct clk_ops sh7705_master_clk_ops = { 38static struct sh_clk_ops sh7705_master_clk_ops = {
39 .init = master_clk_init, 39 .init = master_clk_init,
40}; 40};
41 41
@@ -45,7 +45,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
45 return clk->parent->rate / pfc_divisors[idx]; 45 return clk->parent->rate / pfc_divisors[idx];
46} 46}
47 47
48static struct clk_ops sh7705_module_clk_ops = { 48static struct sh_clk_ops sh7705_module_clk_ops = {
49 .recalc = module_clk_recalc, 49 .recalc = module_clk_recalc,
50}; 50};
51 51
@@ -55,7 +55,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
55 return clk->parent->rate / stc_multipliers[idx]; 55 return clk->parent->rate / stc_multipliers[idx];
56} 56}
57 57
58static struct clk_ops sh7705_bus_clk_ops = { 58static struct sh_clk_ops sh7705_bus_clk_ops = {
59 .recalc = bus_clk_recalc, 59 .recalc = bus_clk_recalc,
60}; 60};
61 61
@@ -65,18 +65,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
65 return clk->parent->rate / ifc_divisors[idx]; 65 return clk->parent->rate / ifc_divisors[idx];
66} 66}
67 67
68static struct clk_ops sh7705_cpu_clk_ops = { 68static struct sh_clk_ops sh7705_cpu_clk_ops = {
69 .recalc = cpu_clk_recalc, 69 .recalc = cpu_clk_recalc,
70}; 70};
71 71
72static struct clk_ops *sh7705_clk_ops[] = { 72static struct sh_clk_ops *sh7705_clk_ops[] = {
73 &sh7705_master_clk_ops, 73 &sh7705_master_clk_ops,
74 &sh7705_module_clk_ops, 74 &sh7705_module_clk_ops,
75 &sh7705_bus_clk_ops, 75 &sh7705_bus_clk_ops,
76 &sh7705_cpu_clk_ops, 76 &sh7705_cpu_clk_ops,
77}; 77};
78 78
79void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 79void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
80{ 80{
81 if (idx < ARRAY_SIZE(sh7705_clk_ops)) 81 if (idx < ARRAY_SIZE(sh7705_clk_ops))
82 *ops = sh7705_clk_ops[idx]; 82 *ops = sh7705_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7706.c b/arch/sh/kernel/cpu/sh3/clock-sh7706.c
index 6f9ff8b57dd6..a4088e5b2203 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh7706.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh7706.c
@@ -30,7 +30,7 @@ static void master_clk_init(struct clk *clk)
30 clk->rate *= pfc_divisors[idx]; 30 clk->rate *= pfc_divisors[idx];
31} 31}
32 32
33static struct clk_ops sh7706_master_clk_ops = { 33static struct sh_clk_ops sh7706_master_clk_ops = {
34 .init = master_clk_init, 34 .init = master_clk_init,
35}; 35};
36 36
@@ -42,7 +42,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
42 return clk->parent->rate / pfc_divisors[idx]; 42 return clk->parent->rate / pfc_divisors[idx];
43} 43}
44 44
45static struct clk_ops sh7706_module_clk_ops = { 45static struct sh_clk_ops sh7706_module_clk_ops = {
46 .recalc = module_clk_recalc, 46 .recalc = module_clk_recalc,
47}; 47};
48 48
@@ -54,7 +54,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
54 return clk->parent->rate / stc_multipliers[idx]; 54 return clk->parent->rate / stc_multipliers[idx];
55} 55}
56 56
57static struct clk_ops sh7706_bus_clk_ops = { 57static struct sh_clk_ops sh7706_bus_clk_ops = {
58 .recalc = bus_clk_recalc, 58 .recalc = bus_clk_recalc,
59}; 59};
60 60
@@ -66,18 +66,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
66 return clk->parent->rate / ifc_divisors[idx]; 66 return clk->parent->rate / ifc_divisors[idx];
67} 67}
68 68
69static struct clk_ops sh7706_cpu_clk_ops = { 69static struct sh_clk_ops sh7706_cpu_clk_ops = {
70 .recalc = cpu_clk_recalc, 70 .recalc = cpu_clk_recalc,
71}; 71};
72 72
73static struct clk_ops *sh7706_clk_ops[] = { 73static struct sh_clk_ops *sh7706_clk_ops[] = {
74 &sh7706_master_clk_ops, 74 &sh7706_master_clk_ops,
75 &sh7706_module_clk_ops, 75 &sh7706_module_clk_ops,
76 &sh7706_bus_clk_ops, 76 &sh7706_bus_clk_ops,
77 &sh7706_cpu_clk_ops, 77 &sh7706_cpu_clk_ops,
78}; 78};
79 79
80void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 80void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
81{ 81{
82 if (idx < ARRAY_SIZE(sh7706_clk_ops)) 82 if (idx < ARRAY_SIZE(sh7706_clk_ops))
83 *ops = sh7706_clk_ops[idx]; 83 *ops = sh7706_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7709.c b/arch/sh/kernel/cpu/sh3/clock-sh7709.c
index f302ba09e681..54a6d4bcc0db 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh7709.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh7709.c
@@ -30,7 +30,7 @@ static void master_clk_init(struct clk *clk)
30 clk->rate *= pfc_divisors[idx]; 30 clk->rate *= pfc_divisors[idx];
31} 31}
32 32
33static struct clk_ops sh7709_master_clk_ops = { 33static struct sh_clk_ops sh7709_master_clk_ops = {
34 .init = master_clk_init, 34 .init = master_clk_init,
35}; 35};
36 36
@@ -42,7 +42,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
42 return clk->parent->rate / pfc_divisors[idx]; 42 return clk->parent->rate / pfc_divisors[idx];
43} 43}
44 44
45static struct clk_ops sh7709_module_clk_ops = { 45static struct sh_clk_ops sh7709_module_clk_ops = {
46 .recalc = module_clk_recalc, 46 .recalc = module_clk_recalc,
47}; 47};
48 48
@@ -55,7 +55,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
55 return clk->parent->rate * stc_multipliers[idx]; 55 return clk->parent->rate * stc_multipliers[idx];
56} 56}
57 57
58static struct clk_ops sh7709_bus_clk_ops = { 58static struct sh_clk_ops sh7709_bus_clk_ops = {
59 .recalc = bus_clk_recalc, 59 .recalc = bus_clk_recalc,
60}; 60};
61 61
@@ -67,18 +67,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
67 return clk->parent->rate / ifc_divisors[idx]; 67 return clk->parent->rate / ifc_divisors[idx];
68} 68}
69 69
70static struct clk_ops sh7709_cpu_clk_ops = { 70static struct sh_clk_ops sh7709_cpu_clk_ops = {
71 .recalc = cpu_clk_recalc, 71 .recalc = cpu_clk_recalc,
72}; 72};
73 73
74static struct clk_ops *sh7709_clk_ops[] = { 74static struct sh_clk_ops *sh7709_clk_ops[] = {
75 &sh7709_master_clk_ops, 75 &sh7709_master_clk_ops,
76 &sh7709_module_clk_ops, 76 &sh7709_module_clk_ops,
77 &sh7709_bus_clk_ops, 77 &sh7709_bus_clk_ops,
78 &sh7709_cpu_clk_ops, 78 &sh7709_cpu_clk_ops,
79}; 79};
80 80
81void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 81void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
82{ 82{
83 if (idx < ARRAY_SIZE(sh7709_clk_ops)) 83 if (idx < ARRAY_SIZE(sh7709_clk_ops))
84 *ops = sh7709_clk_ops[idx]; 84 *ops = sh7709_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7710.c b/arch/sh/kernel/cpu/sh3/clock-sh7710.c
index 29a87d8946a4..ce601b2e3976 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh7710.c
@@ -29,7 +29,7 @@ static void master_clk_init(struct clk *clk)
29 clk->rate *= md_table[__raw_readw(FRQCR) & 0x0007]; 29 clk->rate *= md_table[__raw_readw(FRQCR) & 0x0007];
30} 30}
31 31
32static struct clk_ops sh7710_master_clk_ops = { 32static struct sh_clk_ops sh7710_master_clk_ops = {
33 .init = master_clk_init, 33 .init = master_clk_init,
34}; 34};
35 35
@@ -39,7 +39,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
39 return clk->parent->rate / md_table[idx]; 39 return clk->parent->rate / md_table[idx];
40} 40}
41 41
42static struct clk_ops sh7710_module_clk_ops = { 42static struct sh_clk_ops sh7710_module_clk_ops = {
43 .recalc = module_clk_recalc, 43 .recalc = module_clk_recalc,
44}; 44};
45 45
@@ -49,7 +49,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
49 return clk->parent->rate / md_table[idx]; 49 return clk->parent->rate / md_table[idx];
50} 50}
51 51
52static struct clk_ops sh7710_bus_clk_ops = { 52static struct sh_clk_ops sh7710_bus_clk_ops = {
53 .recalc = bus_clk_recalc, 53 .recalc = bus_clk_recalc,
54}; 54};
55 55
@@ -59,18 +59,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
59 return clk->parent->rate / md_table[idx]; 59 return clk->parent->rate / md_table[idx];
60} 60}
61 61
62static struct clk_ops sh7710_cpu_clk_ops = { 62static struct sh_clk_ops sh7710_cpu_clk_ops = {
63 .recalc = cpu_clk_recalc, 63 .recalc = cpu_clk_recalc,
64}; 64};
65 65
66static struct clk_ops *sh7710_clk_ops[] = { 66static struct sh_clk_ops *sh7710_clk_ops[] = {
67 &sh7710_master_clk_ops, 67 &sh7710_master_clk_ops,
68 &sh7710_module_clk_ops, 68 &sh7710_module_clk_ops,
69 &sh7710_bus_clk_ops, 69 &sh7710_bus_clk_ops,
70 &sh7710_cpu_clk_ops, 70 &sh7710_cpu_clk_ops,
71}; 71};
72 72
73void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 73void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
74{ 74{
75 if (idx < ARRAY_SIZE(sh7710_clk_ops)) 75 if (idx < ARRAY_SIZE(sh7710_clk_ops))
76 *ops = sh7710_clk_ops[idx]; 76 *ops = sh7710_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7712.c b/arch/sh/kernel/cpu/sh3/clock-sh7712.c
index b0d0c5203996..21438a9a1ae1 100644
--- a/arch/sh/kernel/cpu/sh3/clock-sh7712.c
+++ b/arch/sh/kernel/cpu/sh3/clock-sh7712.c
@@ -29,7 +29,7 @@ static void master_clk_init(struct clk *clk)
29 clk->rate *= multipliers[idx]; 29 clk->rate *= multipliers[idx];
30} 30}
31 31
32static struct clk_ops sh7712_master_clk_ops = { 32static struct sh_clk_ops sh7712_master_clk_ops = {
33 .init = master_clk_init, 33 .init = master_clk_init,
34}; 34};
35 35
@@ -41,7 +41,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
41 return clk->parent->rate / divisors[idx]; 41 return clk->parent->rate / divisors[idx];
42} 42}
43 43
44static struct clk_ops sh7712_module_clk_ops = { 44static struct sh_clk_ops sh7712_module_clk_ops = {
45 .recalc = module_clk_recalc, 45 .recalc = module_clk_recalc,
46}; 46};
47 47
@@ -53,17 +53,17 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
53 return clk->parent->rate / divisors[idx]; 53 return clk->parent->rate / divisors[idx];
54} 54}
55 55
56static struct clk_ops sh7712_cpu_clk_ops = { 56static struct sh_clk_ops sh7712_cpu_clk_ops = {
57 .recalc = cpu_clk_recalc, 57 .recalc = cpu_clk_recalc,
58}; 58};
59 59
60static struct clk_ops *sh7712_clk_ops[] = { 60static struct sh_clk_ops *sh7712_clk_ops[] = {
61 &sh7712_master_clk_ops, 61 &sh7712_master_clk_ops,
62 &sh7712_module_clk_ops, 62 &sh7712_module_clk_ops,
63 &sh7712_cpu_clk_ops, 63 &sh7712_cpu_clk_ops,
64}; 64};
65 65
66void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 66void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
67{ 67{
68 if (idx < ARRAY_SIZE(sh7712_clk_ops)) 68 if (idx < ARRAY_SIZE(sh7712_clk_ops))
69 *ops = sh7712_clk_ops[idx]; 69 *ops = sh7712_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
index f4e262adb39e..4b5bab5f875f 100644
--- a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
+++ b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
@@ -41,7 +41,7 @@ static inline int frqcr3_lookup(struct clk *clk, unsigned long rate)
41 return 5; 41 return 5;
42} 42}
43 43
44static struct clk_ops sh4202_emi_clk_ops = { 44static struct sh_clk_ops sh4202_emi_clk_ops = {
45 .recalc = emi_clk_recalc, 45 .recalc = emi_clk_recalc,
46}; 46};
47 47
@@ -56,7 +56,7 @@ static unsigned long femi_clk_recalc(struct clk *clk)
56 return clk->parent->rate / frqcr3_divisors[idx]; 56 return clk->parent->rate / frqcr3_divisors[idx];
57} 57}
58 58
59static struct clk_ops sh4202_femi_clk_ops = { 59static struct sh_clk_ops sh4202_femi_clk_ops = {
60 .recalc = femi_clk_recalc, 60 .recalc = femi_clk_recalc,
61}; 61};
62 62
@@ -130,7 +130,7 @@ static int shoc_clk_set_rate(struct clk *clk, unsigned long rate)
130 return 0; 130 return 0;
131} 131}
132 132
133static struct clk_ops sh4202_shoc_clk_ops = { 133static struct sh_clk_ops sh4202_shoc_clk_ops = {
134 .init = shoc_clk_init, 134 .init = shoc_clk_init,
135 .recalc = shoc_clk_recalc, 135 .recalc = shoc_clk_recalc,
136 .set_rate = shoc_clk_set_rate, 136 .set_rate = shoc_clk_set_rate,
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4.c b/arch/sh/kernel/cpu/sh4/clock-sh4.c
index 5add75c1f539..99e5ec8b483d 100644
--- a/arch/sh/kernel/cpu/sh4/clock-sh4.c
+++ b/arch/sh/kernel/cpu/sh4/clock-sh4.c
@@ -31,7 +31,7 @@ static void master_clk_init(struct clk *clk)
31 clk->rate *= pfc_divisors[__raw_readw(FRQCR) & 0x0007]; 31 clk->rate *= pfc_divisors[__raw_readw(FRQCR) & 0x0007];
32} 32}
33 33
34static struct clk_ops sh4_master_clk_ops = { 34static struct sh_clk_ops sh4_master_clk_ops = {
35 .init = master_clk_init, 35 .init = master_clk_init,
36}; 36};
37 37
@@ -41,7 +41,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
41 return clk->parent->rate / pfc_divisors[idx]; 41 return clk->parent->rate / pfc_divisors[idx];
42} 42}
43 43
44static struct clk_ops sh4_module_clk_ops = { 44static struct sh_clk_ops sh4_module_clk_ops = {
45 .recalc = module_clk_recalc, 45 .recalc = module_clk_recalc,
46}; 46};
47 47
@@ -51,7 +51,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
51 return clk->parent->rate / bfc_divisors[idx]; 51 return clk->parent->rate / bfc_divisors[idx];
52} 52}
53 53
54static struct clk_ops sh4_bus_clk_ops = { 54static struct sh_clk_ops sh4_bus_clk_ops = {
55 .recalc = bus_clk_recalc, 55 .recalc = bus_clk_recalc,
56}; 56};
57 57
@@ -61,18 +61,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
61 return clk->parent->rate / ifc_divisors[idx]; 61 return clk->parent->rate / ifc_divisors[idx];
62} 62}
63 63
64static struct clk_ops sh4_cpu_clk_ops = { 64static struct sh_clk_ops sh4_cpu_clk_ops = {
65 .recalc = cpu_clk_recalc, 65 .recalc = cpu_clk_recalc,
66}; 66};
67 67
68static struct clk_ops *sh4_clk_ops[] = { 68static struct sh_clk_ops *sh4_clk_ops[] = {
69 &sh4_master_clk_ops, 69 &sh4_master_clk_ops,
70 &sh4_module_clk_ops, 70 &sh4_module_clk_ops,
71 &sh4_bus_clk_ops, 71 &sh4_bus_clk_ops,
72 &sh4_cpu_clk_ops, 72 &sh4_cpu_clk_ops,
73}; 73};
74 74
75void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 75void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
76{ 76{
77 if (idx < ARRAY_SIZE(sh4_clk_ops)) 77 if (idx < ARRAY_SIZE(sh4_clk_ops))
78 *ops = sh4_clk_ops[idx]; 78 *ops = sh4_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c
index 70e45bdaadc7..ea01a72f1b94 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c
@@ -61,7 +61,7 @@ static unsigned long dll_recalc(struct clk *clk)
61 return clk->parent->rate * mult; 61 return clk->parent->rate * mult;
62} 62}
63 63
64static struct clk_ops dll_clk_ops = { 64static struct sh_clk_ops dll_clk_ops = {
65 .recalc = dll_recalc, 65 .recalc = dll_recalc,
66}; 66};
67 67
@@ -81,7 +81,7 @@ static unsigned long pll_recalc(struct clk *clk)
81 return clk->parent->rate * mult; 81 return clk->parent->rate * mult;
82} 82}
83 83
84static struct clk_ops pll_clk_ops = { 84static struct sh_clk_ops pll_clk_ops = {
85 .recalc = pll_recalc, 85 .recalc = pll_recalc,
86}; 86};
87 87
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7366.c b/arch/sh/kernel/cpu/sh4a/clock-sh7366.c
index 3c3165000c52..7ac07b4f75de 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7366.c
@@ -61,7 +61,7 @@ static unsigned long dll_recalc(struct clk *clk)
61 return clk->parent->rate * mult; 61 return clk->parent->rate * mult;
62} 62}
63 63
64static struct clk_ops dll_clk_ops = { 64static struct sh_clk_ops dll_clk_ops = {
65 .recalc = dll_recalc, 65 .recalc = dll_recalc,
66}; 66};
67 67
@@ -84,7 +84,7 @@ static unsigned long pll_recalc(struct clk *clk)
84 return (clk->parent->rate * mult) / div; 84 return (clk->parent->rate * mult) / div;
85} 85}
86 86
87static struct clk_ops pll_clk_ops = { 87static struct sh_clk_ops pll_clk_ops = {
88 .recalc = pll_recalc, 88 .recalc = pll_recalc,
89}; 89};
90 90
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
index 212c72ef959c..8e1f97010c0d 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
@@ -64,7 +64,7 @@ static unsigned long dll_recalc(struct clk *clk)
64 return clk->parent->rate * mult; 64 return clk->parent->rate * mult;
65} 65}
66 66
67static struct clk_ops dll_clk_ops = { 67static struct sh_clk_ops dll_clk_ops = {
68 .recalc = dll_recalc, 68 .recalc = dll_recalc,
69}; 69};
70 70
@@ -87,7 +87,7 @@ static unsigned long pll_recalc(struct clk *clk)
87 return (clk->parent->rate * mult) / div; 87 return (clk->parent->rate * mult) / div;
88} 88}
89 89
90static struct clk_ops pll_clk_ops = { 90static struct sh_clk_ops pll_clk_ops = {
91 .recalc = pll_recalc, 91 .recalc = pll_recalc,
92}; 92};
93 93
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
index 2f8c9179da47..35f75cf0c7e5 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
@@ -65,7 +65,7 @@ static unsigned long dll_recalc(struct clk *clk)
65 return clk->parent->rate * mult; 65 return clk->parent->rate * mult;
66} 66}
67 67
68static struct clk_ops dll_clk_ops = { 68static struct sh_clk_ops dll_clk_ops = {
69 .recalc = dll_recalc, 69 .recalc = dll_recalc,
70}; 70};
71 71
@@ -88,7 +88,7 @@ static unsigned long pll_recalc(struct clk *clk)
88 return (clk->parent->rate * mult) / div; 88 return (clk->parent->rate * mult) / div;
89} 89}
90 90
91static struct clk_ops pll_clk_ops = { 91static struct sh_clk_ops pll_clk_ops = {
92 .recalc = pll_recalc, 92 .recalc = pll_recalc,
93}; 93};
94 94
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index 70bd96646f42..2a87901673fe 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -70,7 +70,7 @@ static unsigned long fll_recalc(struct clk *clk)
70 return (clk->parent->rate * mult) / div; 70 return (clk->parent->rate * mult) / div;
71} 71}
72 72
73static struct clk_ops fll_clk_ops = { 73static struct sh_clk_ops fll_clk_ops = {
74 .recalc = fll_recalc, 74 .recalc = fll_recalc,
75}; 75};
76 76
@@ -90,7 +90,7 @@ static unsigned long pll_recalc(struct clk *clk)
90 return clk->parent->rate * mult; 90 return clk->parent->rate * mult;
91} 91}
92 92
93static struct clk_ops pll_clk_ops = { 93static struct sh_clk_ops pll_clk_ops = {
94 .recalc = pll_recalc, 94 .recalc = pll_recalc,
95}; 95};
96 96
@@ -105,7 +105,7 @@ static unsigned long div3_recalc(struct clk *clk)
105 return clk->parent->rate / 3; 105 return clk->parent->rate / 3;
106} 106}
107 107
108static struct clk_ops div3_clk_ops = { 108static struct sh_clk_ops div3_clk_ops = {
109 .recalc = div3_recalc, 109 .recalc = div3_recalc,
110}; 110};
111 111
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
index 0fbff1422f54..5853989586ed 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
@@ -33,7 +33,7 @@ static unsigned long pll_recalc(struct clk *clk)
33 return clk->parent->rate * multiplier; 33 return clk->parent->rate * multiplier;
34} 34}
35 35
36static struct clk_ops pll_clk_ops = { 36static struct sh_clk_ops pll_clk_ops = {
37 .recalc = pll_recalc, 37 .recalc = pll_recalc,
38}; 38};
39 39
@@ -79,7 +79,7 @@ struct clk div4_clks[DIV4_NR] = {
79#define MSTPCR1 0xffc80034 79#define MSTPCR1 0xffc80034
80#define MSTPCR2 0xffc10028 80#define MSTPCR2 0xffc10028
81 81
82enum { MSTP004, MSTP000, MSTP114, MSTP113, MSTP112, 82enum { MSTP004, MSTP000, MSTP127, MSTP114, MSTP113, MSTP112,
83 MSTP111, MSTP110, MSTP103, MSTP102, MSTP220, 83 MSTP111, MSTP110, MSTP103, MSTP102, MSTP220,
84 MSTP_NR }; 84 MSTP_NR };
85 85
@@ -89,6 +89,7 @@ static struct clk mstp_clks[MSTP_NR] = {
89 [MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0), 89 [MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0),
90 90
91 /* MSTPCR1 */ 91 /* MSTPCR1 */
92 [MSTP127] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 27, 0),
92 [MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0), 93 [MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0),
93 [MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0), 94 [MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0),
94 [MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0), 95 [MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0),
@@ -131,6 +132,7 @@ static struct clk_lookup lookups[] = {
131 CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]), 132 CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]),
132 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]), 133 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]),
133 CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]), 134 CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]),
135 CLKDEV_CON_ID("rspi2", &mstp_clks[MSTP127]),
134}; 136};
135 137
136int __init arch_clk_init(void) 138int __init arch_clk_init(void)
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c
index 2d4c7fd79c02..7707e35aea46 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c
@@ -27,7 +27,7 @@ static void master_clk_init(struct clk *clk)
27 clk->rate *= p0fc_divisors[(__raw_readl(FRQCR) >> 4) & 0x07]; 27 clk->rate *= p0fc_divisors[(__raw_readl(FRQCR) >> 4) & 0x07];
28} 28}
29 29
30static struct clk_ops sh7763_master_clk_ops = { 30static struct sh_clk_ops sh7763_master_clk_ops = {
31 .init = master_clk_init, 31 .init = master_clk_init,
32}; 32};
33 33
@@ -37,7 +37,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
37 return clk->parent->rate / p0fc_divisors[idx]; 37 return clk->parent->rate / p0fc_divisors[idx];
38} 38}
39 39
40static struct clk_ops sh7763_module_clk_ops = { 40static struct sh_clk_ops sh7763_module_clk_ops = {
41 .recalc = module_clk_recalc, 41 .recalc = module_clk_recalc,
42}; 42};
43 43
@@ -47,22 +47,22 @@ static unsigned long bus_clk_recalc(struct clk *clk)
47 return clk->parent->rate / bfc_divisors[idx]; 47 return clk->parent->rate / bfc_divisors[idx];
48} 48}
49 49
50static struct clk_ops sh7763_bus_clk_ops = { 50static struct sh_clk_ops sh7763_bus_clk_ops = {
51 .recalc = bus_clk_recalc, 51 .recalc = bus_clk_recalc,
52}; 52};
53 53
54static struct clk_ops sh7763_cpu_clk_ops = { 54static struct sh_clk_ops sh7763_cpu_clk_ops = {
55 .recalc = followparent_recalc, 55 .recalc = followparent_recalc,
56}; 56};
57 57
58static struct clk_ops *sh7763_clk_ops[] = { 58static struct sh_clk_ops *sh7763_clk_ops[] = {
59 &sh7763_master_clk_ops, 59 &sh7763_master_clk_ops,
60 &sh7763_module_clk_ops, 60 &sh7763_module_clk_ops,
61 &sh7763_bus_clk_ops, 61 &sh7763_bus_clk_ops,
62 &sh7763_cpu_clk_ops, 62 &sh7763_cpu_clk_ops,
63}; 63};
64 64
65void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 65void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
66{ 66{
67 if (idx < ARRAY_SIZE(sh7763_clk_ops)) 67 if (idx < ARRAY_SIZE(sh7763_clk_ops))
68 *ops = sh7763_clk_ops[idx]; 68 *ops = sh7763_clk_ops[idx];
@@ -74,7 +74,7 @@ static unsigned long shyway_clk_recalc(struct clk *clk)
74 return clk->parent->rate / cfc_divisors[idx]; 74 return clk->parent->rate / cfc_divisors[idx];
75} 75}
76 76
77static struct clk_ops sh7763_shyway_clk_ops = { 77static struct sh_clk_ops sh7763_shyway_clk_ops = {
78 .recalc = shyway_clk_recalc, 78 .recalc = shyway_clk_recalc,
79}; 79};
80 80
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7770.c b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c
index 9e3354365d40..5d36f334bb0a 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7770.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c
@@ -24,7 +24,7 @@ static void master_clk_init(struct clk *clk)
24 clk->rate *= pfc_divisors[(__raw_readl(FRQCR) >> 28) & 0x000f]; 24 clk->rate *= pfc_divisors[(__raw_readl(FRQCR) >> 28) & 0x000f];
25} 25}
26 26
27static struct clk_ops sh7770_master_clk_ops = { 27static struct sh_clk_ops sh7770_master_clk_ops = {
28 .init = master_clk_init, 28 .init = master_clk_init,
29}; 29};
30 30
@@ -34,7 +34,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
34 return clk->parent->rate / pfc_divisors[idx]; 34 return clk->parent->rate / pfc_divisors[idx];
35} 35}
36 36
37static struct clk_ops sh7770_module_clk_ops = { 37static struct sh_clk_ops sh7770_module_clk_ops = {
38 .recalc = module_clk_recalc, 38 .recalc = module_clk_recalc,
39}; 39};
40 40
@@ -44,7 +44,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
44 return clk->parent->rate / bfc_divisors[idx]; 44 return clk->parent->rate / bfc_divisors[idx];
45} 45}
46 46
47static struct clk_ops sh7770_bus_clk_ops = { 47static struct sh_clk_ops sh7770_bus_clk_ops = {
48 .recalc = bus_clk_recalc, 48 .recalc = bus_clk_recalc,
49}; 49};
50 50
@@ -54,18 +54,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
54 return clk->parent->rate / ifc_divisors[idx]; 54 return clk->parent->rate / ifc_divisors[idx];
55} 55}
56 56
57static struct clk_ops sh7770_cpu_clk_ops = { 57static struct sh_clk_ops sh7770_cpu_clk_ops = {
58 .recalc = cpu_clk_recalc, 58 .recalc = cpu_clk_recalc,
59}; 59};
60 60
61static struct clk_ops *sh7770_clk_ops[] = { 61static struct sh_clk_ops *sh7770_clk_ops[] = {
62 &sh7770_master_clk_ops, 62 &sh7770_master_clk_ops,
63 &sh7770_module_clk_ops, 63 &sh7770_module_clk_ops,
64 &sh7770_bus_clk_ops, 64 &sh7770_bus_clk_ops,
65 &sh7770_cpu_clk_ops, 65 &sh7770_cpu_clk_ops,
66}; 66};
67 67
68void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 68void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
69{ 69{
70 if (idx < ARRAY_SIZE(sh7770_clk_ops)) 70 if (idx < ARRAY_SIZE(sh7770_clk_ops))
71 *ops = sh7770_clk_ops[idx]; 71 *ops = sh7770_clk_ops[idx];
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
index 3b53348fe2fc..793dae42a2f8 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
@@ -27,7 +27,7 @@ static void master_clk_init(struct clk *clk)
27 clk->rate *= pfc_divisors[__raw_readl(FRQCR) & 0x0003]; 27 clk->rate *= pfc_divisors[__raw_readl(FRQCR) & 0x0003];
28} 28}
29 29
30static struct clk_ops sh7780_master_clk_ops = { 30static struct sh_clk_ops sh7780_master_clk_ops = {
31 .init = master_clk_init, 31 .init = master_clk_init,
32}; 32};
33 33
@@ -37,7 +37,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
37 return clk->parent->rate / pfc_divisors[idx]; 37 return clk->parent->rate / pfc_divisors[idx];
38} 38}
39 39
40static struct clk_ops sh7780_module_clk_ops = { 40static struct sh_clk_ops sh7780_module_clk_ops = {
41 .recalc = module_clk_recalc, 41 .recalc = module_clk_recalc,
42}; 42};
43 43
@@ -47,7 +47,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
47 return clk->parent->rate / bfc_divisors[idx]; 47 return clk->parent->rate / bfc_divisors[idx];
48} 48}
49 49
50static struct clk_ops sh7780_bus_clk_ops = { 50static struct sh_clk_ops sh7780_bus_clk_ops = {
51 .recalc = bus_clk_recalc, 51 .recalc = bus_clk_recalc,
52}; 52};
53 53
@@ -57,18 +57,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
57 return clk->parent->rate / ifc_divisors[idx]; 57 return clk->parent->rate / ifc_divisors[idx];
58} 58}
59 59
60static struct clk_ops sh7780_cpu_clk_ops = { 60static struct sh_clk_ops sh7780_cpu_clk_ops = {
61 .recalc = cpu_clk_recalc, 61 .recalc = cpu_clk_recalc,
62}; 62};
63 63
64static struct clk_ops *sh7780_clk_ops[] = { 64static struct sh_clk_ops *sh7780_clk_ops[] = {
65 &sh7780_master_clk_ops, 65 &sh7780_master_clk_ops,
66 &sh7780_module_clk_ops, 66 &sh7780_module_clk_ops,
67 &sh7780_bus_clk_ops, 67 &sh7780_bus_clk_ops,
68 &sh7780_cpu_clk_ops, 68 &sh7780_cpu_clk_ops,
69}; 69};
70 70
71void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 71void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
72{ 72{
73 if (idx < ARRAY_SIZE(sh7780_clk_ops)) 73 if (idx < ARRAY_SIZE(sh7780_clk_ops))
74 *ops = sh7780_clk_ops[idx]; 74 *ops = sh7780_clk_ops[idx];
@@ -80,7 +80,7 @@ static unsigned long shyway_clk_recalc(struct clk *clk)
80 return clk->parent->rate / cfc_divisors[idx]; 80 return clk->parent->rate / cfc_divisors[idx];
81} 81}
82 82
83static struct clk_ops sh7780_shyway_clk_ops = { 83static struct sh_clk_ops sh7780_shyway_clk_ops = {
84 .recalc = shyway_clk_recalc, 84 .recalc = shyway_clk_recalc,
85}; 85};
86 86
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
index e5b420cc1265..ab1c58f2d101 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
@@ -36,7 +36,7 @@ static unsigned long pll_recalc(struct clk *clk)
36 return clk->parent->rate * multiplier; 36 return clk->parent->rate * multiplier;
37} 37}
38 38
39static struct clk_ops pll_clk_ops = { 39static struct sh_clk_ops pll_clk_ops = {
40 .recalc = pll_recalc, 40 .recalc = pll_recalc,
41}; 41};
42 42
@@ -156,7 +156,7 @@ static struct clk_lookup lookups[] = {
156 CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]), 156 CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]),
157 CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]), 157 CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
158 CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]), 158 CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]),
159 CLKDEV_CON_ID("ubc_fck", &mstp_clks[MSTP117]), 159 CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP117]),
160 CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]), 160 CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
161 CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]), 161 CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]),
162 CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]), 162 CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]),
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
index f6c0c3d5599f..491709483e10 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
@@ -38,7 +38,7 @@ static unsigned long pll_recalc(struct clk *clk)
38 return clk->parent->rate * multiplier; 38 return clk->parent->rate * multiplier;
39} 39}
40 40
41static struct clk_ops pll_clk_ops = { 41static struct sh_clk_ops pll_clk_ops = {
42 .recalc = pll_recalc, 42 .recalc = pll_recalc,
43}; 43};
44 44
diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
index bf2d00b8b908..0f11b392bf46 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
@@ -32,7 +32,7 @@ static unsigned long pll_recalc(struct clk *clk)
32 return clk->parent->rate * 72; 32 return clk->parent->rate * 72;
33} 33}
34 34
35static struct clk_ops pll_clk_ops = { 35static struct sh_clk_ops pll_clk_ops = {
36 .recalc = pll_recalc, 36 .recalc = pll_recalc,
37}; 37};
38 38
diff --git a/arch/sh/kernel/cpu/sh5/clock-sh5.c b/arch/sh/kernel/cpu/sh5/clock-sh5.c
index 9cfc19b8dbe4..c48b93d4c081 100644
--- a/arch/sh/kernel/cpu/sh5/clock-sh5.c
+++ b/arch/sh/kernel/cpu/sh5/clock-sh5.c
@@ -28,7 +28,7 @@ static void master_clk_init(struct clk *clk)
28 clk->rate *= ifc_table[idx]; 28 clk->rate *= ifc_table[idx];
29} 29}
30 30
31static struct clk_ops sh5_master_clk_ops = { 31static struct sh_clk_ops sh5_master_clk_ops = {
32 .init = master_clk_init, 32 .init = master_clk_init,
33}; 33};
34 34
@@ -38,7 +38,7 @@ static unsigned long module_clk_recalc(struct clk *clk)
38 return clk->parent->rate / ifc_table[idx]; 38 return clk->parent->rate / ifc_table[idx];
39} 39}
40 40
41static struct clk_ops sh5_module_clk_ops = { 41static struct sh_clk_ops sh5_module_clk_ops = {
42 .recalc = module_clk_recalc, 42 .recalc = module_clk_recalc,
43}; 43};
44 44
@@ -48,7 +48,7 @@ static unsigned long bus_clk_recalc(struct clk *clk)
48 return clk->parent->rate / ifc_table[idx]; 48 return clk->parent->rate / ifc_table[idx];
49} 49}
50 50
51static struct clk_ops sh5_bus_clk_ops = { 51static struct sh_clk_ops sh5_bus_clk_ops = {
52 .recalc = bus_clk_recalc, 52 .recalc = bus_clk_recalc,
53}; 53};
54 54
@@ -58,18 +58,18 @@ static unsigned long cpu_clk_recalc(struct clk *clk)
58 return clk->parent->rate / ifc_table[idx]; 58 return clk->parent->rate / ifc_table[idx];
59} 59}
60 60
61static struct clk_ops sh5_cpu_clk_ops = { 61static struct sh_clk_ops sh5_cpu_clk_ops = {
62 .recalc = cpu_clk_recalc, 62 .recalc = cpu_clk_recalc,
63}; 63};
64 64
65static struct clk_ops *sh5_clk_ops[] = { 65static struct sh_clk_ops *sh5_clk_ops[] = {
66 &sh5_master_clk_ops, 66 &sh5_master_clk_ops,
67 &sh5_module_clk_ops, 67 &sh5_module_clk_ops,
68 &sh5_bus_clk_ops, 68 &sh5_bus_clk_ops,
69 &sh5_cpu_clk_ops, 69 &sh5_cpu_clk_ops,
70}; 70};
71 71
72void __init arch_init_clk_ops(struct clk_ops **ops, int idx) 72void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
73{ 73{
74 cprc_base = (unsigned long)ioremap_nocache(CPRC_BASE, 1024); 74 cprc_base = (unsigned long)ioremap_nocache(CPRC_BASE, 1024);
75 BUG_ON(!cprc_base); 75 BUG_ON(!cprc_base);
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index ad1fb5d969f3..eddcfb36aafb 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -31,7 +31,7 @@ UTS_MACHINE := sparc
31 31
32#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 32#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
33KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 33KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
34KBUILD_AFLAGS += -m32 34KBUILD_AFLAGS += -m32 -Wa,-Av8
35 35
36#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 36#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
37# Since 2.5.40, the first stage is left not btfix-ed. 37# Since 2.5.40, the first stage is left not btfix-ed.
diff --git a/arch/tile/configs/tilegx_defconfig b/arch/tile/configs/tilegx_defconfig
index dafdbbae1124..b8d99aca5431 100644
--- a/arch/tile/configs/tilegx_defconfig
+++ b/arch/tile/configs/tilegx_defconfig
@@ -1,337 +1,93 @@
1#
2# Automatically generated make config: don't edit
3# Linux/tilegx 2.6.39-rc5 Kernel Configuration
4# Wed May 4 11:08:04 2011
5#
6CONFIG_TILE=y
7CONFIG_MMU=y
8CONFIG_GENERIC_CSUM=y
9CONFIG_SEMAPHORE_SLEEPERS=y
10CONFIG_HAVE_ARCH_ALLOC_REMAP=y
11CONFIG_HAVE_SETUP_PER_CPU_AREA=y
12CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
13CONFIG_SYS_SUPPORTS_HUGETLBFS=y
14CONFIG_GENERIC_CLOCKEVENTS=y
15CONFIG_RWSEM_GENERIC_SPINLOCK=y
16CONFIG_DEFAULT_MIGRATION_COST=10000000
17CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
18CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
19CONFIG_ARCH_DMA_ADDR_T_64BIT=y
20CONFIG_LOCKDEP_SUPPORT=y
21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
23CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
25CONFIG_STRICT_DEVMEM=y
26CONFIG_SMP=y
27# CONFIG_DEBUG_COPY_FROM_USER is not set
28CONFIG_HVC_TILE=y
29CONFIG_TILEGX=y 1CONFIG_TILEGX=y
30CONFIG_64BIT=y
31CONFIG_ARCH_DEFCONFIG="arch/tile/configs/tilegx_defconfig"
32CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
33CONFIG_CONSTRUCTORS=y
34
35#
36# General setup
37#
38CONFIG_EXPERIMENTAL=y 2CONFIG_EXPERIMENTAL=y
39CONFIG_INIT_ENV_ARG_LIMIT=32
40CONFIG_CROSS_COMPILE=""
41CONFIG_LOCALVERSION=""
42# CONFIG_LOCALVERSION_AUTO is not set 3# CONFIG_LOCALVERSION_AUTO is not set
43CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 4CONFIG_SYSVIPC=y
45CONFIG_SYSVIPC_SYSCTL=y
46CONFIG_POSIX_MQUEUE=y 5CONFIG_POSIX_MQUEUE=y
47CONFIG_POSIX_MQUEUE_SYSCTL=y
48CONFIG_BSD_PROCESS_ACCT=y 6CONFIG_BSD_PROCESS_ACCT=y
49CONFIG_BSD_PROCESS_ACCT_V3=y 7CONFIG_BSD_PROCESS_ACCT_V3=y
50# CONFIG_FHANDLE is not set 8CONFIG_FHANDLE=y
51CONFIG_TASKSTATS=y 9CONFIG_TASKSTATS=y
52CONFIG_TASK_DELAY_ACCT=y 10CONFIG_TASK_DELAY_ACCT=y
53CONFIG_TASK_XACCT=y 11CONFIG_TASK_XACCT=y
54CONFIG_TASK_IO_ACCOUNTING=y 12CONFIG_TASK_IO_ACCOUNTING=y
55CONFIG_AUDIT=y 13CONFIG_AUDIT=y
56CONFIG_HAVE_GENERIC_HARDIRQS=y
57
58#
59# IRQ subsystem
60#
61CONFIG_GENERIC_HARDIRQS=y
62CONFIG_GENERIC_IRQ_PROBE=y
63CONFIG_GENERIC_IRQ_SHOW=y
64CONFIG_GENERIC_PENDING_IRQ=y
65
66#
67# RCU Subsystem
68#
69CONFIG_TREE_RCU=y
70# CONFIG_PREEMPT_RCU is not set
71# CONFIG_RCU_TRACE is not set
72CONFIG_RCU_FANOUT=64
73# CONFIG_RCU_FANOUT_EXACT is not set
74# CONFIG_RCU_FAST_NO_HZ is not set
75# CONFIG_TREE_RCU_TRACE is not set
76# CONFIG_IKCONFIG is not set
77CONFIG_LOG_BUF_SHIFT=19 14CONFIG_LOG_BUF_SHIFT=19
78CONFIG_CGROUPS=y 15CONFIG_CGROUPS=y
79CONFIG_CGROUP_DEBUG=y 16CONFIG_CGROUP_DEBUG=y
80CONFIG_CGROUP_NS=y
81# CONFIG_CGROUP_FREEZER is not set
82CONFIG_CGROUP_DEVICE=y 17CONFIG_CGROUP_DEVICE=y
83CONFIG_CPUSETS=y 18CONFIG_CPUSETS=y
84CONFIG_PROC_PID_CPUSET=y
85CONFIG_CGROUP_CPUACCT=y 19CONFIG_CGROUP_CPUACCT=y
86CONFIG_RESOURCE_COUNTERS=y 20CONFIG_RESOURCE_COUNTERS=y
87CONFIG_CGROUP_MEM_RES_CTLR=y 21CONFIG_CGROUP_MEM_RES_CTLR=y
88CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y 22CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
89CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y
90CONFIG_CGROUP_SCHED=y 23CONFIG_CGROUP_SCHED=y
91CONFIG_FAIR_GROUP_SCHED=y
92CONFIG_RT_GROUP_SCHED=y 24CONFIG_RT_GROUP_SCHED=y
93CONFIG_BLK_CGROUP=y 25CONFIG_BLK_CGROUP=y
94# CONFIG_DEBUG_BLK_CGROUP is not set
95CONFIG_NAMESPACES=y 26CONFIG_NAMESPACES=y
96CONFIG_UTS_NS=y
97CONFIG_IPC_NS=y
98CONFIG_USER_NS=y
99CONFIG_PID_NS=y
100CONFIG_NET_NS=y
101# CONFIG_SCHED_AUTOGROUP is not set
102CONFIG_MM_OWNER=y
103# CONFIG_SYSFS_DEPRECATED is not set
104CONFIG_RELAY=y 27CONFIG_RELAY=y
105CONFIG_BLK_DEV_INITRD=y 28CONFIG_BLK_DEV_INITRD=y
106CONFIG_INITRAMFS_SOURCE="usr/contents.txt"
107CONFIG_INITRAMFS_ROOT_UID=0
108CONFIG_INITRAMFS_ROOT_GID=0
109CONFIG_RD_GZIP=y
110# CONFIG_RD_BZIP2 is not set
111# CONFIG_RD_LZMA is not set
112# CONFIG_RD_XZ is not set
113# CONFIG_RD_LZO is not set
114CONFIG_INITRAMFS_COMPRESSION_NONE=y
115# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
116CONFIG_CC_OPTIMIZE_FOR_SIZE=y
117CONFIG_SYSCTL=y
118CONFIG_ANON_INODES=y
119CONFIG_EXPERT=y
120CONFIG_SYSCTL_SYSCALL=y 29CONFIG_SYSCTL_SYSCALL=y
121CONFIG_KALLSYMS=y
122# CONFIG_KALLSYMS_ALL is not set
123# CONFIG_KALLSYMS_EXTRA_PASS is not set
124CONFIG_HOTPLUG=y
125CONFIG_PRINTK=y
126CONFIG_BUG=y
127CONFIG_ELF_CORE=y
128CONFIG_BASE_FULL=y
129CONFIG_FUTEX=y
130CONFIG_EPOLL=y
131CONFIG_SIGNALFD=y
132CONFIG_TIMERFD=y
133CONFIG_EVENTFD=y
134CONFIG_SHMEM=y
135CONFIG_AIO=y
136CONFIG_EMBEDDED=y 30CONFIG_EMBEDDED=y
137
138#
139# Kernel Performance Events And Counters
140#
141CONFIG_VM_EVENT_COUNTERS=y
142CONFIG_PCI_QUIRKS=y
143CONFIG_SLUB_DEBUG=y
144# CONFIG_COMPAT_BRK is not set 31# CONFIG_COMPAT_BRK is not set
145# CONFIG_SLAB is not set
146CONFIG_SLUB=y
147# CONFIG_SLOB is not set
148CONFIG_PROFILING=y 32CONFIG_PROFILING=y
149CONFIG_USE_GENERIC_SMP_HELPERS=y
150
151#
152# GCOV-based kernel profiling
153#
154# CONFIG_GCOV_KERNEL is not set
155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
156CONFIG_SLABINFO=y
157CONFIG_RT_MUTEXES=y
158CONFIG_BASE_SMALL=0
159CONFIG_MODULES=y 33CONFIG_MODULES=y
160CONFIG_MODULE_FORCE_LOAD=y 34CONFIG_MODULE_FORCE_LOAD=y
161CONFIG_MODULE_UNLOAD=y 35CONFIG_MODULE_UNLOAD=y
162# CONFIG_MODULE_FORCE_UNLOAD is not set
163# CONFIG_MODVERSIONS is not set
164# CONFIG_MODULE_SRCVERSION_ALL is not set
165CONFIG_STOP_MACHINE=y
166CONFIG_BLOCK=y
167CONFIG_BLK_DEV_BSG=y
168CONFIG_BLK_DEV_INTEGRITY=y 36CONFIG_BLK_DEV_INTEGRITY=y
169# CONFIG_BLK_DEV_THROTTLING is not set 37CONFIG_PARTITION_ADVANCED=y
170CONFIG_BLOCK_COMPAT=y 38CONFIG_OSF_PARTITION=y
171 39CONFIG_AMIGA_PARTITION=y
172# 40CONFIG_MAC_PARTITION=y
173# IO Schedulers 41CONFIG_BSD_DISKLABEL=y
174# 42CONFIG_MINIX_SUBPARTITION=y
175CONFIG_IOSCHED_NOOP=y 43CONFIG_SOLARIS_X86_PARTITION=y
176CONFIG_IOSCHED_DEADLINE=y 44CONFIG_UNIXWARE_DISKLABEL=y
177CONFIG_IOSCHED_CFQ=y 45CONFIG_SGI_PARTITION=y
46CONFIG_SUN_PARTITION=y
47CONFIG_KARMA_PARTITION=y
48CONFIG_EFI_PARTITION=y
178CONFIG_CFQ_GROUP_IOSCHED=y 49CONFIG_CFQ_GROUP_IOSCHED=y
179# CONFIG_DEFAULT_DEADLINE is not set
180CONFIG_DEFAULT_CFQ=y
181# CONFIG_DEFAULT_NOOP is not set
182CONFIG_DEFAULT_IOSCHED="cfq"
183CONFIG_PADATA=y
184# CONFIG_INLINE_SPIN_TRYLOCK is not set
185# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
186# CONFIG_INLINE_SPIN_LOCK is not set
187# CONFIG_INLINE_SPIN_LOCK_BH is not set
188# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
189# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
190CONFIG_INLINE_SPIN_UNLOCK=y
191# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
192CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
193# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
194# CONFIG_INLINE_READ_TRYLOCK is not set
195# CONFIG_INLINE_READ_LOCK is not set
196# CONFIG_INLINE_READ_LOCK_BH is not set
197# CONFIG_INLINE_READ_LOCK_IRQ is not set
198# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
199CONFIG_INLINE_READ_UNLOCK=y
200# CONFIG_INLINE_READ_UNLOCK_BH is not set
201CONFIG_INLINE_READ_UNLOCK_IRQ=y
202# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
203# CONFIG_INLINE_WRITE_TRYLOCK is not set
204# CONFIG_INLINE_WRITE_LOCK is not set
205# CONFIG_INLINE_WRITE_LOCK_BH is not set
206# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
207# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
208CONFIG_INLINE_WRITE_UNLOCK=y
209# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
210CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
211# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
212CONFIG_MUTEX_SPIN_ON_OWNER=y
213
214#
215# Tilera-specific configuration
216#
217CONFIG_NR_CPUS=100 50CONFIG_NR_CPUS=100
218CONFIG_TICK_ONESHOT=y
219CONFIG_NO_HZ=y 51CONFIG_NO_HZ=y
220CONFIG_HIGH_RES_TIMERS=y 52CONFIG_HIGH_RES_TIMERS=y
221CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
222CONFIG_HZ_100=y 53CONFIG_HZ_100=y
223# CONFIG_HZ_250 is not set
224# CONFIG_HZ_300 is not set
225# CONFIG_HZ_1000 is not set
226CONFIG_HZ=100
227CONFIG_SCHED_HRTICK=y
228# CONFIG_KEXEC is not set
229CONFIG_COMPAT=y
230CONFIG_SYSVIPC_COMPAT=y
231# CONFIG_HIGHMEM is not set
232CONFIG_NUMA=y
233CONFIG_NODES_SHIFT=2
234CONFIG_PAGE_OFFSET=0xC0000000
235CONFIG_SELECT_MEMORY_MODEL=y
236CONFIG_DISCONTIGMEM_MANUAL=y
237CONFIG_DISCONTIGMEM=y
238CONFIG_FLAT_NODE_MEM_MAP=y
239CONFIG_NEED_MULTIPLE_NODES=y
240CONFIG_PAGEFLAGS_EXTENDED=y
241CONFIG_SPLIT_PTLOCK_CPUS=4
242# CONFIG_COMPACTION is not set
243CONFIG_MIGRATION=y
244CONFIG_PHYS_ADDR_T_64BIT=y
245CONFIG_ZONE_DMA_FLAG=0
246CONFIG_VIRT_TO_BUS=y
247# CONFIG_KSM is not set
248CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
249# CONFIG_CMDLINE_BOOL is not set
250CONFIG_VMALLOC_RESERVE=0x1000000
251CONFIG_HARDWALL=y
252CONFIG_KERNEL_PL=1
253
254#
255# Bus options
256#
257CONFIG_PCI=y
258CONFIG_PCI_DOMAINS=y
259# CONFIG_NO_IOMEM is not set
260# CONFIG_NO_IOPORT is not set
261# CONFIG_ARCH_SUPPORTS_MSI is not set
262CONFIG_PCI_DEBUG=y 54CONFIG_PCI_DEBUG=y
263# CONFIG_PCI_STUB is not set
264# CONFIG_PCI_IOV is not set
265# CONFIG_HOTPLUG_PCI is not set
266
267#
268# Executable file formats
269#
270CONFIG_KCORE_ELF=y
271CONFIG_BINFMT_ELF=y
272CONFIG_COMPAT_BINFMT_ELF=y
273# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 55# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
274# CONFIG_HAVE_AOUT is not set
275CONFIG_BINFMT_MISC=y 56CONFIG_BINFMT_MISC=y
276CONFIG_NET=y 57CONFIG_NET=y
277
278#
279# Networking options
280#
281CONFIG_PACKET=y 58CONFIG_PACKET=y
282CONFIG_UNIX=y 59CONFIG_UNIX=y
283CONFIG_XFRM=y
284CONFIG_XFRM_USER=y 60CONFIG_XFRM_USER=y
285CONFIG_XFRM_SUB_POLICY=y 61CONFIG_XFRM_SUB_POLICY=y
286CONFIG_XFRM_MIGRATE=y
287CONFIG_XFRM_STATISTICS=y 62CONFIG_XFRM_STATISTICS=y
288CONFIG_XFRM_IPCOMP=m
289CONFIG_NET_KEY=m 63CONFIG_NET_KEY=m
290CONFIG_NET_KEY_MIGRATE=y 64CONFIG_NET_KEY_MIGRATE=y
291CONFIG_INET=y 65CONFIG_INET=y
292CONFIG_IP_MULTICAST=y 66CONFIG_IP_MULTICAST=y
293CONFIG_IP_ADVANCED_ROUTER=y 67CONFIG_IP_ADVANCED_ROUTER=y
294# CONFIG_IP_FIB_TRIE_STATS is not set
295CONFIG_IP_MULTIPLE_TABLES=y 68CONFIG_IP_MULTIPLE_TABLES=y
296CONFIG_IP_ROUTE_MULTIPATH=y 69CONFIG_IP_ROUTE_MULTIPATH=y
297CONFIG_IP_ROUTE_VERBOSE=y 70CONFIG_IP_ROUTE_VERBOSE=y
298CONFIG_IP_ROUTE_CLASSID=y
299# CONFIG_IP_PNP is not set
300CONFIG_NET_IPIP=m 71CONFIG_NET_IPIP=m
301# CONFIG_NET_IPGRE_DEMUX is not set
302CONFIG_IP_MROUTE=y 72CONFIG_IP_MROUTE=y
303# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
304CONFIG_IP_PIMSM_V1=y 73CONFIG_IP_PIMSM_V1=y
305CONFIG_IP_PIMSM_V2=y 74CONFIG_IP_PIMSM_V2=y
306# CONFIG_ARPD is not set
307CONFIG_SYN_COOKIES=y 75CONFIG_SYN_COOKIES=y
308CONFIG_INET_AH=m 76CONFIG_INET_AH=m
309CONFIG_INET_ESP=m 77CONFIG_INET_ESP=m
310CONFIG_INET_IPCOMP=m 78CONFIG_INET_IPCOMP=m
311CONFIG_INET_XFRM_TUNNEL=m
312CONFIG_INET_TUNNEL=m
313CONFIG_INET_XFRM_MODE_TRANSPORT=m 79CONFIG_INET_XFRM_MODE_TRANSPORT=m
314CONFIG_INET_XFRM_MODE_TUNNEL=m 80CONFIG_INET_XFRM_MODE_TUNNEL=m
315CONFIG_INET_XFRM_MODE_BEET=m 81CONFIG_INET_XFRM_MODE_BEET=m
316CONFIG_INET_LRO=y
317CONFIG_INET_DIAG=m 82CONFIG_INET_DIAG=m
318CONFIG_INET_TCP_DIAG=m
319CONFIG_TCP_CONG_ADVANCED=y 83CONFIG_TCP_CONG_ADVANCED=y
320CONFIG_TCP_CONG_BIC=m
321CONFIG_TCP_CONG_CUBIC=y
322CONFIG_TCP_CONG_WESTWOOD=m
323CONFIG_TCP_CONG_HTCP=m
324CONFIG_TCP_CONG_HSTCP=m 84CONFIG_TCP_CONG_HSTCP=m
325CONFIG_TCP_CONG_HYBLA=m 85CONFIG_TCP_CONG_HYBLA=m
326CONFIG_TCP_CONG_VEGAS=m
327CONFIG_TCP_CONG_SCALABLE=m 86CONFIG_TCP_CONG_SCALABLE=m
328CONFIG_TCP_CONG_LP=m 87CONFIG_TCP_CONG_LP=m
329CONFIG_TCP_CONG_VENO=m 88CONFIG_TCP_CONG_VENO=m
330CONFIG_TCP_CONG_YEAH=m 89CONFIG_TCP_CONG_YEAH=m
331CONFIG_TCP_CONG_ILLINOIS=m 90CONFIG_TCP_CONG_ILLINOIS=m
332CONFIG_DEFAULT_CUBIC=y
333# CONFIG_DEFAULT_RENO is not set
334CONFIG_DEFAULT_TCP_CONG="cubic"
335CONFIG_TCP_MD5SIG=y 91CONFIG_TCP_MD5SIG=y
336CONFIG_IPV6=y 92CONFIG_IPV6=y
337CONFIG_IPV6_PRIVACY=y 93CONFIG_IPV6_PRIVACY=y
@@ -342,108 +98,60 @@ CONFIG_INET6_AH=m
342CONFIG_INET6_ESP=m 98CONFIG_INET6_ESP=m
343CONFIG_INET6_IPCOMP=m 99CONFIG_INET6_IPCOMP=m
344CONFIG_IPV6_MIP6=m 100CONFIG_IPV6_MIP6=m
345CONFIG_INET6_XFRM_TUNNEL=m
346CONFIG_INET6_TUNNEL=m
347CONFIG_INET6_XFRM_MODE_TRANSPORT=m 101CONFIG_INET6_XFRM_MODE_TRANSPORT=m
348CONFIG_INET6_XFRM_MODE_TUNNEL=m 102CONFIG_INET6_XFRM_MODE_TUNNEL=m
349CONFIG_INET6_XFRM_MODE_BEET=m 103CONFIG_INET6_XFRM_MODE_BEET=m
350CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m 104CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
351CONFIG_IPV6_SIT=m 105CONFIG_IPV6_SIT=m
352# CONFIG_IPV6_SIT_6RD is not set
353CONFIG_IPV6_NDISC_NODETYPE=y
354CONFIG_IPV6_TUNNEL=m 106CONFIG_IPV6_TUNNEL=m
355CONFIG_IPV6_MULTIPLE_TABLES=y 107CONFIG_IPV6_MULTIPLE_TABLES=y
356# CONFIG_IPV6_SUBTREES is not set
357CONFIG_IPV6_MROUTE=y 108CONFIG_IPV6_MROUTE=y
358# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set
359CONFIG_IPV6_PIMSM_V2=y 109CONFIG_IPV6_PIMSM_V2=y
360CONFIG_NETLABEL=y 110CONFIG_NETLABEL=y
361CONFIG_NETWORK_SECMARK=y
362# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
363CONFIG_NETFILTER=y 111CONFIG_NETFILTER=y
364# CONFIG_NETFILTER_DEBUG is not set 112CONFIG_NF_CONNTRACK=m
365CONFIG_NETFILTER_ADVANCED=y
366CONFIG_BRIDGE_NETFILTER=y
367
368#
369# Core Netfilter Configuration
370#
371CONFIG_NETFILTER_NETLINK=m
372CONFIG_NETFILTER_NETLINK_QUEUE=m
373CONFIG_NETFILTER_NETLINK_LOG=m
374CONFIG_NF_CONNTRACK=y
375CONFIG_NF_CONNTRACK_MARK=y
376CONFIG_NF_CONNTRACK_SECMARK=y 113CONFIG_NF_CONNTRACK_SECMARK=y
377CONFIG_NF_CONNTRACK_ZONES=y 114CONFIG_NF_CONNTRACK_ZONES=y
378CONFIG_NF_CONNTRACK_EVENTS=y 115CONFIG_NF_CONNTRACK_EVENTS=y
379# CONFIG_NF_CONNTRACK_TIMESTAMP is not set
380CONFIG_NF_CT_PROTO_DCCP=m 116CONFIG_NF_CT_PROTO_DCCP=m
381CONFIG_NF_CT_PROTO_GRE=m
382CONFIG_NF_CT_PROTO_SCTP=m
383CONFIG_NF_CT_PROTO_UDPLITE=m 117CONFIG_NF_CT_PROTO_UDPLITE=m
384CONFIG_NF_CONNTRACK_AMANDA=m 118CONFIG_NF_CONNTRACK_AMANDA=m
385CONFIG_NF_CONNTRACK_FTP=m 119CONFIG_NF_CONNTRACK_FTP=m
386CONFIG_NF_CONNTRACK_H323=m 120CONFIG_NF_CONNTRACK_H323=m
387CONFIG_NF_CONNTRACK_IRC=m 121CONFIG_NF_CONNTRACK_IRC=m
388CONFIG_NF_CONNTRACK_BROADCAST=m
389CONFIG_NF_CONNTRACK_NETBIOS_NS=m 122CONFIG_NF_CONNTRACK_NETBIOS_NS=m
390# CONFIG_NF_CONNTRACK_SNMP is not set
391CONFIG_NF_CONNTRACK_PPTP=m 123CONFIG_NF_CONNTRACK_PPTP=m
392CONFIG_NF_CONNTRACK_SANE=m 124CONFIG_NF_CONNTRACK_SANE=m
393CONFIG_NF_CONNTRACK_SIP=m 125CONFIG_NF_CONNTRACK_SIP=m
394CONFIG_NF_CONNTRACK_TFTP=m 126CONFIG_NF_CONNTRACK_TFTP=m
395# CONFIG_NF_CT_NETLINK is not set
396CONFIG_NETFILTER_TPROXY=m 127CONFIG_NETFILTER_TPROXY=m
397CONFIG_NETFILTER_XTABLES=y
398
399#
400# Xtables combined modules
401#
402CONFIG_NETFILTER_XT_MARK=m
403CONFIG_NETFILTER_XT_CONNMARK=m
404
405#
406# Xtables targets
407#
408# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set
409# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set
410CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 128CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
411CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 129CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
412CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 130CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
413CONFIG_NETFILTER_XT_TARGET_CT=m 131CONFIG_NETFILTER_XT_TARGET_CT=m
414CONFIG_NETFILTER_XT_TARGET_DSCP=m 132CONFIG_NETFILTER_XT_TARGET_DSCP=m
415CONFIG_NETFILTER_XT_TARGET_HL=m
416CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m 133CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
417CONFIG_NETFILTER_XT_TARGET_MARK=m 134CONFIG_NETFILTER_XT_TARGET_MARK=m
418CONFIG_NETFILTER_XT_TARGET_NFLOG=m 135CONFIG_NETFILTER_XT_TARGET_NFLOG=m
419CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 136CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
420CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 137CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
421CONFIG_NETFILTER_XT_TARGET_RATEEST=m
422CONFIG_NETFILTER_XT_TARGET_TEE=m 138CONFIG_NETFILTER_XT_TARGET_TEE=m
423CONFIG_NETFILTER_XT_TARGET_TPROXY=m 139CONFIG_NETFILTER_XT_TARGET_TPROXY=m
424CONFIG_NETFILTER_XT_TARGET_TRACE=m 140CONFIG_NETFILTER_XT_TARGET_TRACE=m
425CONFIG_NETFILTER_XT_TARGET_SECMARK=m 141CONFIG_NETFILTER_XT_TARGET_SECMARK=m
426CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 142CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
427CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m 143CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
428
429#
430# Xtables matches
431#
432# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set
433CONFIG_NETFILTER_XT_MATCH_CLUSTER=m 144CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
434CONFIG_NETFILTER_XT_MATCH_COMMENT=m 145CONFIG_NETFILTER_XT_MATCH_COMMENT=m
435CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 146CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
436CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m 147CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
437CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 148CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
438CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y 149CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
439# CONFIG_NETFILTER_XT_MATCH_CPU is not set
440CONFIG_NETFILTER_XT_MATCH_DCCP=m 150CONFIG_NETFILTER_XT_MATCH_DCCP=m
441# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set
442CONFIG_NETFILTER_XT_MATCH_DSCP=m 151CONFIG_NETFILTER_XT_MATCH_DSCP=m
443CONFIG_NETFILTER_XT_MATCH_ESP=m 152CONFIG_NETFILTER_XT_MATCH_ESP=m
444CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 153CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
445CONFIG_NETFILTER_XT_MATCH_HELPER=m 154CONFIG_NETFILTER_XT_MATCH_HELPER=m
446CONFIG_NETFILTER_XT_MATCH_HL=m
447CONFIG_NETFILTER_XT_MATCH_IPRANGE=m 155CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
448CONFIG_NETFILTER_XT_MATCH_IPVS=m 156CONFIG_NETFILTER_XT_MATCH_IPVS=m
449CONFIG_NETFILTER_XT_MATCH_LENGTH=m 157CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -460,55 +168,29 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m
460CONFIG_NETFILTER_XT_MATCH_RATEEST=m 168CONFIG_NETFILTER_XT_MATCH_RATEEST=m
461CONFIG_NETFILTER_XT_MATCH_REALM=m 169CONFIG_NETFILTER_XT_MATCH_REALM=m
462CONFIG_NETFILTER_XT_MATCH_RECENT=m 170CONFIG_NETFILTER_XT_MATCH_RECENT=m
463CONFIG_NETFILTER_XT_MATCH_SCTP=m
464CONFIG_NETFILTER_XT_MATCH_SOCKET=m 171CONFIG_NETFILTER_XT_MATCH_SOCKET=m
465CONFIG_NETFILTER_XT_MATCH_STATE=y 172CONFIG_NETFILTER_XT_MATCH_STATE=m
466CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 173CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
467CONFIG_NETFILTER_XT_MATCH_STRING=m 174CONFIG_NETFILTER_XT_MATCH_STRING=m
468CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 175CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
469CONFIG_NETFILTER_XT_MATCH_TIME=m 176CONFIG_NETFILTER_XT_MATCH_TIME=m
470CONFIG_NETFILTER_XT_MATCH_U32=m 177CONFIG_NETFILTER_XT_MATCH_U32=m
471# CONFIG_IP_SET is not set
472CONFIG_IP_VS=m 178CONFIG_IP_VS=m
473CONFIG_IP_VS_IPV6=y 179CONFIG_IP_VS_IPV6=y
474# CONFIG_IP_VS_DEBUG is not set
475CONFIG_IP_VS_TAB_BITS=12
476
477#
478# IPVS transport protocol load balancing support
479#
480CONFIG_IP_VS_PROTO_TCP=y 180CONFIG_IP_VS_PROTO_TCP=y
481CONFIG_IP_VS_PROTO_UDP=y 181CONFIG_IP_VS_PROTO_UDP=y
482CONFIG_IP_VS_PROTO_AH_ESP=y
483CONFIG_IP_VS_PROTO_ESP=y 182CONFIG_IP_VS_PROTO_ESP=y
484CONFIG_IP_VS_PROTO_AH=y 183CONFIG_IP_VS_PROTO_AH=y
485CONFIG_IP_VS_PROTO_SCTP=y 184CONFIG_IP_VS_PROTO_SCTP=y
486
487#
488# IPVS scheduler
489#
490CONFIG_IP_VS_RR=m 185CONFIG_IP_VS_RR=m
491CONFIG_IP_VS_WRR=m 186CONFIG_IP_VS_WRR=m
492CONFIG_IP_VS_LC=m 187CONFIG_IP_VS_LC=m
493CONFIG_IP_VS_WLC=m 188CONFIG_IP_VS_WLC=m
494CONFIG_IP_VS_LBLC=m 189CONFIG_IP_VS_LBLC=m
495CONFIG_IP_VS_LBLCR=m 190CONFIG_IP_VS_LBLCR=m
496# CONFIG_IP_VS_DH is not set
497# CONFIG_IP_VS_SH is not set
498CONFIG_IP_VS_SED=m 191CONFIG_IP_VS_SED=m
499CONFIG_IP_VS_NQ=m 192CONFIG_IP_VS_NQ=m
500 193CONFIG_NF_CONNTRACK_IPV4=m
501#
502# IPVS application helper
503#
504# CONFIG_IP_VS_NFCT is not set
505# CONFIG_IP_VS_PE_SIP is not set
506
507#
508# IP: Netfilter Configuration
509#
510CONFIG_NF_DEFRAG_IPV4=y
511CONFIG_NF_CONNTRACK_IPV4=y
512# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set 194# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
513CONFIG_IP_NF_QUEUE=m 195CONFIG_IP_NF_QUEUE=m
514CONFIG_IP_NF_IPTABLES=y 196CONFIG_IP_NF_IPTABLES=y
@@ -519,9 +201,7 @@ CONFIG_IP_NF_FILTER=y
519CONFIG_IP_NF_TARGET_REJECT=y 201CONFIG_IP_NF_TARGET_REJECT=y
520CONFIG_IP_NF_TARGET_LOG=m 202CONFIG_IP_NF_TARGET_LOG=m
521CONFIG_IP_NF_TARGET_ULOG=m 203CONFIG_IP_NF_TARGET_ULOG=m
522# CONFIG_NF_NAT is not set
523CONFIG_IP_NF_MANGLE=m 204CONFIG_IP_NF_MANGLE=m
524# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
525CONFIG_IP_NF_TARGET_ECN=m 205CONFIG_IP_NF_TARGET_ECN=m
526CONFIG_IP_NF_TARGET_TTL=m 206CONFIG_IP_NF_TARGET_TTL=m
527CONFIG_IP_NF_RAW=m 207CONFIG_IP_NF_RAW=m
@@ -529,11 +209,6 @@ CONFIG_IP_NF_SECURITY=m
529CONFIG_IP_NF_ARPTABLES=m 209CONFIG_IP_NF_ARPTABLES=m
530CONFIG_IP_NF_ARPFILTER=m 210CONFIG_IP_NF_ARPFILTER=m
531CONFIG_IP_NF_ARP_MANGLE=m 211CONFIG_IP_NF_ARP_MANGLE=m
532
533#
534# IPv6: Netfilter Configuration
535#
536CONFIG_NF_DEFRAG_IPV6=m
537CONFIG_NF_CONNTRACK_IPV6=m 212CONFIG_NF_CONNTRACK_IPV6=m
538CONFIG_IP6_NF_QUEUE=m 213CONFIG_IP6_NF_QUEUE=m
539CONFIG_IP6_NF_IPTABLES=m 214CONFIG_IP6_NF_IPTABLES=m
@@ -574,57 +249,20 @@ CONFIG_BRIDGE_EBT_SNAT=m
574CONFIG_BRIDGE_EBT_LOG=m 249CONFIG_BRIDGE_EBT_LOG=m
575CONFIG_BRIDGE_EBT_ULOG=m 250CONFIG_BRIDGE_EBT_ULOG=m
576CONFIG_BRIDGE_EBT_NFLOG=m 251CONFIG_BRIDGE_EBT_NFLOG=m
577# CONFIG_IP_DCCP is not set
578CONFIG_IP_SCTP=m
579# CONFIG_SCTP_DBG_MSG is not set
580# CONFIG_SCTP_DBG_OBJCNT is not set
581# CONFIG_SCTP_HMAC_NONE is not set
582# CONFIG_SCTP_HMAC_SHA1 is not set
583CONFIG_SCTP_HMAC_MD5=y
584CONFIG_RDS=m 252CONFIG_RDS=m
585CONFIG_RDS_TCP=m 253CONFIG_RDS_TCP=m
586# CONFIG_RDS_DEBUG is not set
587# CONFIG_TIPC is not set
588# CONFIG_ATM is not set
589# CONFIG_L2TP is not set
590CONFIG_STP=m
591CONFIG_GARP=m
592CONFIG_BRIDGE=m 254CONFIG_BRIDGE=m
593CONFIG_BRIDGE_IGMP_SNOOPING=y
594CONFIG_NET_DSA=y 255CONFIG_NET_DSA=y
595CONFIG_NET_DSA_TAG_DSA=y
596CONFIG_NET_DSA_TAG_EDSA=y
597CONFIG_NET_DSA_TAG_TRAILER=y
598CONFIG_NET_DSA_MV88E6XXX=y
599CONFIG_NET_DSA_MV88E6060=y
600CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
601CONFIG_NET_DSA_MV88E6131=y
602CONFIG_NET_DSA_MV88E6123_61_65=y
603CONFIG_VLAN_8021Q=m 256CONFIG_VLAN_8021Q=m
604CONFIG_VLAN_8021Q_GVRP=y 257CONFIG_VLAN_8021Q_GVRP=y
605# CONFIG_DECNET is not set
606CONFIG_LLC=m
607# CONFIG_LLC2 is not set
608# CONFIG_IPX is not set
609# CONFIG_ATALK is not set
610# CONFIG_X25 is not set
611# CONFIG_LAPB is not set
612# CONFIG_ECONET is not set
613# CONFIG_WAN_ROUTER is not set
614CONFIG_PHONET=m 258CONFIG_PHONET=m
615# CONFIG_IEEE802154 is not set
616CONFIG_NET_SCHED=y 259CONFIG_NET_SCHED=y
617
618#
619# Queueing/Scheduling
620#
621CONFIG_NET_SCH_CBQ=m 260CONFIG_NET_SCH_CBQ=m
622CONFIG_NET_SCH_HTB=m 261CONFIG_NET_SCH_HTB=m
623CONFIG_NET_SCH_HFSC=m 262CONFIG_NET_SCH_HFSC=m
624CONFIG_NET_SCH_PRIO=m 263CONFIG_NET_SCH_PRIO=m
625CONFIG_NET_SCH_MULTIQ=m 264CONFIG_NET_SCH_MULTIQ=m
626CONFIG_NET_SCH_RED=m 265CONFIG_NET_SCH_RED=m
627# CONFIG_NET_SCH_SFB is not set
628CONFIG_NET_SCH_SFQ=m 266CONFIG_NET_SCH_SFQ=m
629CONFIG_NET_SCH_TEQL=m 267CONFIG_NET_SCH_TEQL=m
630CONFIG_NET_SCH_TBF=m 268CONFIG_NET_SCH_TBF=m
@@ -632,14 +270,7 @@ CONFIG_NET_SCH_GRED=m
632CONFIG_NET_SCH_DSMARK=m 270CONFIG_NET_SCH_DSMARK=m
633CONFIG_NET_SCH_NETEM=m 271CONFIG_NET_SCH_NETEM=m
634CONFIG_NET_SCH_DRR=m 272CONFIG_NET_SCH_DRR=m
635# CONFIG_NET_SCH_MQPRIO is not set
636# CONFIG_NET_SCH_CHOKE is not set
637CONFIG_NET_SCH_INGRESS=m 273CONFIG_NET_SCH_INGRESS=m
638
639#
640# Classification
641#
642CONFIG_NET_CLS=y
643CONFIG_NET_CLS_BASIC=m 274CONFIG_NET_CLS_BASIC=m
644CONFIG_NET_CLS_TCINDEX=m 275CONFIG_NET_CLS_TCINDEX=m
645CONFIG_NET_CLS_ROUTE4=m 276CONFIG_NET_CLS_ROUTE4=m
@@ -652,7 +283,6 @@ CONFIG_NET_CLS_RSVP6=m
652CONFIG_NET_CLS_FLOW=m 283CONFIG_NET_CLS_FLOW=m
653CONFIG_NET_CLS_CGROUP=y 284CONFIG_NET_CLS_CGROUP=y
654CONFIG_NET_EMATCH=y 285CONFIG_NET_EMATCH=y
655CONFIG_NET_EMATCH_STACK=32
656CONFIG_NET_EMATCH_CMP=m 286CONFIG_NET_EMATCH_CMP=m
657CONFIG_NET_EMATCH_NBYTE=m 287CONFIG_NET_EMATCH_NBYTE=m
658CONFIG_NET_EMATCH_U32=m 288CONFIG_NET_EMATCH_U32=m
@@ -668,307 +298,46 @@ CONFIG_NET_ACT_NAT=m
668CONFIG_NET_ACT_PEDIT=m 298CONFIG_NET_ACT_PEDIT=m
669CONFIG_NET_ACT_SIMP=m 299CONFIG_NET_ACT_SIMP=m
670CONFIG_NET_ACT_SKBEDIT=m 300CONFIG_NET_ACT_SKBEDIT=m
671# CONFIG_NET_ACT_CSUM is not set
672CONFIG_NET_CLS_IND=y 301CONFIG_NET_CLS_IND=y
673CONFIG_NET_SCH_FIFO=y
674CONFIG_DCB=y 302CONFIG_DCB=y
675CONFIG_DNS_RESOLVER=y
676# CONFIG_BATMAN_ADV is not set
677CONFIG_RPS=y
678CONFIG_RFS_ACCEL=y
679CONFIG_XPS=y
680
681#
682# Network testing
683#
684# CONFIG_NET_PKTGEN is not set
685# CONFIG_HAMRADIO is not set
686# CONFIG_CAN is not set
687# CONFIG_IRDA is not set
688# CONFIG_BT is not set
689# CONFIG_AF_RXRPC is not set
690CONFIG_FIB_RULES=y
691# CONFIG_WIRELESS is not set 303# CONFIG_WIRELESS is not set
692# CONFIG_WIMAX is not set
693# CONFIG_RFKILL is not set
694# CONFIG_NET_9P is not set
695# CONFIG_CAIF is not set
696# CONFIG_CEPH_LIB is not set
697
698#
699# Device Drivers
700#
701
702#
703# Generic Driver Options
704#
705CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 304CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
706CONFIG_DEVTMPFS=y 305CONFIG_DEVTMPFS=y
707CONFIG_DEVTMPFS_MOUNT=y 306CONFIG_DEVTMPFS_MOUNT=y
708CONFIG_STANDALONE=y
709CONFIG_PREVENT_FIRMWARE_BUILD=y
710CONFIG_FW_LOADER=y
711# CONFIG_FIRMWARE_IN_KERNEL is not set 307# CONFIG_FIRMWARE_IN_KERNEL is not set
712CONFIG_EXTRA_FIRMWARE=""
713# CONFIG_DEBUG_DRIVER is not set
714# CONFIG_DEBUG_DEVRES is not set
715# CONFIG_SYS_HYPERVISOR is not set
716CONFIG_CONNECTOR=y 308CONFIG_CONNECTOR=y
717CONFIG_PROC_EVENTS=y
718# CONFIG_MTD is not set
719# CONFIG_PARPORT is not set
720CONFIG_BLK_DEV=y
721# CONFIG_BLK_CPQ_DA is not set
722# CONFIG_BLK_CPQ_CISS_DA is not set
723# CONFIG_BLK_DEV_DAC960 is not set
724# CONFIG_BLK_DEV_UMEM is not set
725# CONFIG_BLK_DEV_COW_COMMON is not set
726CONFIG_BLK_DEV_LOOP=y 309CONFIG_BLK_DEV_LOOP=y
727CONFIG_BLK_DEV_CRYPTOLOOP=m 310CONFIG_BLK_DEV_CRYPTOLOOP=m
728# CONFIG_BLK_DEV_DRBD is not set
729# CONFIG_BLK_DEV_NBD is not set
730CONFIG_BLK_DEV_SX8=m 311CONFIG_BLK_DEV_SX8=m
731CONFIG_BLK_DEV_RAM=y 312CONFIG_BLK_DEV_RAM=y
732CONFIG_BLK_DEV_RAM_COUNT=16
733CONFIG_BLK_DEV_RAM_SIZE=16384 313CONFIG_BLK_DEV_RAM_SIZE=16384
734# CONFIG_BLK_DEV_XIP is not set 314CONFIG_ATA_OVER_ETH=m
735# CONFIG_CDROM_PKTCDVD is not set
736CONFIG_ATA_OVER_ETH=y
737# CONFIG_BLK_DEV_RBD is not set
738# CONFIG_SENSORS_LIS3LV02D is not set
739CONFIG_MISC_DEVICES=y
740# CONFIG_AD525X_DPOT is not set
741# CONFIG_PHANTOM is not set
742# CONFIG_SGI_IOC4 is not set
743# CONFIG_TIFM_CORE is not set
744# CONFIG_ICS932S401 is not set
745# CONFIG_ENCLOSURE_SERVICES is not set
746# CONFIG_HP_ILO is not set
747# CONFIG_APDS9802ALS is not set
748# CONFIG_ISL29003 is not set
749# CONFIG_ISL29020 is not set
750# CONFIG_SENSORS_TSL2550 is not set
751# CONFIG_SENSORS_BH1780 is not set
752# CONFIG_SENSORS_BH1770 is not set
753# CONFIG_SENSORS_APDS990X is not set
754# CONFIG_HMC6352 is not set
755# CONFIG_DS1682 is not set
756# CONFIG_BMP085 is not set
757# CONFIG_PCH_PHUB is not set
758# CONFIG_C2PORT is not set
759
760#
761# EEPROM support
762#
763# CONFIG_EEPROM_AT24 is not set
764# CONFIG_EEPROM_LEGACY is not set
765# CONFIG_EEPROM_MAX6875 is not set
766# CONFIG_EEPROM_93CX6 is not set
767# CONFIG_CB710_CORE is not set
768
769#
770# Texas Instruments shared transport line discipline
771#
772# CONFIG_SENSORS_LIS3_I2C is not set
773
774#
775# SCSI device support
776#
777CONFIG_SCSI_MOD=m
778CONFIG_RAID_ATTRS=m 315CONFIG_RAID_ATTRS=m
779CONFIG_SCSI=m
780CONFIG_SCSI_DMA=y
781CONFIG_SCSI_TGT=m 316CONFIG_SCSI_TGT=m
782# CONFIG_SCSI_NETLINK is not set 317CONFIG_BLK_DEV_SD=y
783CONFIG_SCSI_PROC_FS=y
784
785#
786# SCSI support type (disk, tape, CD-ROM)
787#
788CONFIG_BLK_DEV_SD=m
789# CONFIG_CHR_DEV_ST is not set
790# CONFIG_CHR_DEV_OSST is not set
791# CONFIG_BLK_DEV_SR is not set
792# CONFIG_CHR_DEV_SG is not set
793# CONFIG_CHR_DEV_SCH is not set
794# CONFIG_SCSI_MULTI_LUN is not set
795CONFIG_SCSI_CONSTANTS=y 318CONFIG_SCSI_CONSTANTS=y
796CONFIG_SCSI_LOGGING=y 319CONFIG_SCSI_LOGGING=y
797# CONFIG_SCSI_SCAN_ASYNC is not set 320CONFIG_SCSI_SAS_ATA=y
798CONFIG_SCSI_WAIT_SCAN=m 321CONFIG_SCSI_MVSAS=y
799 322# CONFIG_SCSI_MVSAS_DEBUG is not set
800# 323CONFIG_SCSI_MVSAS_TASKLET=y
801# SCSI Transports 324CONFIG_ATA=y
802# 325CONFIG_SATA_SIL24=y
803# CONFIG_SCSI_SPI_ATTRS is not set 326# CONFIG_ATA_SFF is not set
804# CONFIG_SCSI_FC_ATTRS is not set
805# CONFIG_SCSI_ISCSI_ATTRS is not set
806CONFIG_SCSI_SAS_ATTRS=m
807# CONFIG_SCSI_SAS_LIBSAS is not set
808# CONFIG_SCSI_SRP_ATTRS is not set
809CONFIG_SCSI_LOWLEVEL=y
810# CONFIG_ISCSI_TCP is not set
811# CONFIG_ISCSI_BOOT_SYSFS is not set
812# CONFIG_SCSI_CXGB3_ISCSI is not set
813# CONFIG_SCSI_CXGB4_ISCSI is not set
814# CONFIG_SCSI_BNX2_ISCSI is not set
815# CONFIG_SCSI_BNX2X_FCOE is not set
816# CONFIG_BE2ISCSI is not set
817# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
818# CONFIG_SCSI_HPSA is not set
819# CONFIG_SCSI_3W_9XXX is not set
820# CONFIG_SCSI_3W_SAS is not set
821# CONFIG_SCSI_ACARD is not set
822# CONFIG_SCSI_AACRAID is not set
823# CONFIG_SCSI_AIC7XXX is not set
824# CONFIG_SCSI_AIC7XXX_OLD is not set
825# CONFIG_SCSI_AIC79XX is not set
826# CONFIG_SCSI_AIC94XX is not set
827# CONFIG_SCSI_MVSAS is not set
828# CONFIG_SCSI_DPT_I2O is not set
829# CONFIG_SCSI_ADVANSYS is not set
830# CONFIG_SCSI_ARCMSR is not set
831# CONFIG_MEGARAID_NEWGEN is not set
832# CONFIG_MEGARAID_LEGACY is not set
833# CONFIG_MEGARAID_SAS is not set
834# CONFIG_SCSI_MPT2SAS is not set
835# CONFIG_SCSI_HPTIOP is not set
836# CONFIG_LIBFC is not set
837# CONFIG_LIBFCOE is not set
838# CONFIG_FCOE is not set
839# CONFIG_SCSI_DMX3191D is not set
840# CONFIG_SCSI_FUTURE_DOMAIN is not set
841# CONFIG_SCSI_IPS is not set
842# CONFIG_SCSI_INITIO is not set
843# CONFIG_SCSI_INIA100 is not set
844# CONFIG_SCSI_STEX is not set
845# CONFIG_SCSI_SYM53C8XX_2 is not set
846# CONFIG_SCSI_IPR is not set
847# CONFIG_SCSI_QLOGIC_1280 is not set
848# CONFIG_SCSI_QLA_FC is not set
849# CONFIG_SCSI_QLA_ISCSI is not set
850# CONFIG_SCSI_LPFC is not set
851# CONFIG_SCSI_DC395x is not set
852# CONFIG_SCSI_DC390T is not set
853# CONFIG_SCSI_DEBUG is not set
854# CONFIG_SCSI_PMCRAID is not set
855# CONFIG_SCSI_PM8001 is not set
856# CONFIG_SCSI_SRP is not set
857# CONFIG_SCSI_BFA_FC is not set
858# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
859# CONFIG_SCSI_DH is not set
860# CONFIG_SCSI_OSD_INITIATOR is not set
861CONFIG_ATA=m
862# CONFIG_ATA_NONSTANDARD is not set
863CONFIG_ATA_VERBOSE_ERROR=y
864CONFIG_SATA_PMP=y
865
866#
867# Controllers with non-SFF native interface
868#
869# CONFIG_SATA_AHCI is not set
870# CONFIG_SATA_AHCI_PLATFORM is not set
871# CONFIG_SATA_INIC162X is not set
872# CONFIG_SATA_ACARD_AHCI is not set
873CONFIG_SATA_SIL24=m
874CONFIG_ATA_SFF=y
875
876#
877# SFF controllers with custom DMA interface
878#
879# CONFIG_PDC_ADMA is not set
880# CONFIG_SATA_QSTOR is not set
881# CONFIG_SATA_SX4 is not set
882CONFIG_ATA_BMDMA=y
883
884#
885# SATA SFF controllers with BMDMA
886#
887# CONFIG_ATA_PIIX is not set
888# CONFIG_SATA_MV is not set
889# CONFIG_SATA_NV is not set
890# CONFIG_SATA_PROMISE is not set
891# CONFIG_SATA_SIL is not set
892# CONFIG_SATA_SIS is not set
893# CONFIG_SATA_SVW is not set
894# CONFIG_SATA_ULI is not set
895# CONFIG_SATA_VIA is not set
896# CONFIG_SATA_VITESSE is not set
897
898#
899# PATA SFF controllers with BMDMA
900#
901# CONFIG_PATA_ALI is not set
902# CONFIG_PATA_AMD is not set
903# CONFIG_PATA_ARASAN_CF is not set
904# CONFIG_PATA_ARTOP is not set
905# CONFIG_PATA_ATIIXP is not set
906# CONFIG_PATA_ATP867X is not set
907# CONFIG_PATA_CMD64X is not set
908# CONFIG_PATA_CS5520 is not set
909# CONFIG_PATA_CS5530 is not set
910# CONFIG_PATA_CS5536 is not set
911# CONFIG_PATA_CYPRESS is not set
912# CONFIG_PATA_EFAR is not set
913# CONFIG_PATA_HPT366 is not set
914# CONFIG_PATA_HPT37X is not set
915# CONFIG_PATA_HPT3X2N is not set
916# CONFIG_PATA_HPT3X3 is not set
917# CONFIG_PATA_IT8213 is not set
918# CONFIG_PATA_IT821X is not set
919# CONFIG_PATA_JMICRON is not set
920# CONFIG_PATA_MARVELL is not set
921# CONFIG_PATA_NETCELL is not set
922# CONFIG_PATA_NINJA32 is not set
923# CONFIG_PATA_NS87415 is not set
924# CONFIG_PATA_OLDPIIX is not set
925# CONFIG_PATA_OPTIDMA is not set
926# CONFIG_PATA_PDC2027X is not set
927# CONFIG_PATA_PDC_OLD is not set
928# CONFIG_PATA_RADISYS is not set
929# CONFIG_PATA_RDC is not set
930# CONFIG_PATA_SC1200 is not set
931# CONFIG_PATA_SCH is not set
932# CONFIG_PATA_SERVERWORKS is not set
933# CONFIG_PATA_SIL680 is not set
934# CONFIG_PATA_SIS is not set
935# CONFIG_PATA_TOSHIBA is not set
936# CONFIG_PATA_TRIFLEX is not set
937# CONFIG_PATA_VIA is not set
938# CONFIG_PATA_WINBOND is not set
939
940#
941# PIO-only SFF controllers
942#
943# CONFIG_PATA_CMD640_PCI is not set
944# CONFIG_PATA_MPIIX is not set
945# CONFIG_PATA_NS87410 is not set
946# CONFIG_PATA_OPTI is not set
947# CONFIG_PATA_PLATFORM is not set
948# CONFIG_PATA_RZ1000 is not set
949
950#
951# Generic fallback / legacy drivers
952#
953# CONFIG_ATA_GENERIC is not set
954# CONFIG_PATA_LEGACY is not set
955CONFIG_MD=y 327CONFIG_MD=y
956CONFIG_BLK_DEV_MD=y 328CONFIG_BLK_DEV_MD=y
957CONFIG_MD_AUTODETECT=y
958CONFIG_MD_LINEAR=m 329CONFIG_MD_LINEAR=m
959CONFIG_MD_RAID0=m 330CONFIG_MD_RAID0=m
960CONFIG_MD_RAID1=m 331CONFIG_MD_RAID1=m
961CONFIG_MD_RAID10=m 332CONFIG_MD_RAID10=m
962CONFIG_MD_RAID456=m 333CONFIG_MD_RAID456=m
963CONFIG_MULTICORE_RAID456=y 334CONFIG_MULTICORE_RAID456=y
964# CONFIG_MD_MULTIPATH is not set
965CONFIG_MD_FAULTY=m 335CONFIG_MD_FAULTY=m
966CONFIG_BLK_DEV_DM=m 336CONFIG_BLK_DEV_DM=m
967CONFIG_DM_DEBUG=y 337CONFIG_DM_DEBUG=y
968CONFIG_DM_CRYPT=m 338CONFIG_DM_CRYPT=m
969CONFIG_DM_SNAPSHOT=m 339CONFIG_DM_SNAPSHOT=m
970CONFIG_DM_MIRROR=m 340CONFIG_DM_MIRROR=m
971# CONFIG_DM_RAID is not set
972CONFIG_DM_LOG_USERSPACE=m 341CONFIG_DM_LOG_USERSPACE=m
973CONFIG_DM_ZERO=m 342CONFIG_DM_ZERO=m
974CONFIG_DM_MULTIPATH=m 343CONFIG_DM_MULTIPATH=m
@@ -976,558 +345,143 @@ CONFIG_DM_MULTIPATH_QL=m
976CONFIG_DM_MULTIPATH_ST=m 345CONFIG_DM_MULTIPATH_ST=m
977CONFIG_DM_DELAY=m 346CONFIG_DM_DELAY=m
978CONFIG_DM_UEVENT=y 347CONFIG_DM_UEVENT=y
979# CONFIG_DM_FLAKEY is not set 348CONFIG_FUSION=y
980# CONFIG_TARGET_CORE is not set 349CONFIG_FUSION_SAS=y
981# CONFIG_FUSION is not set
982
983#
984# IEEE 1394 (FireWire) support
985#
986# CONFIG_FIREWIRE is not set
987# CONFIG_FIREWIRE_NOSY is not set
988# CONFIG_I2O is not set
989CONFIG_NETDEVICES=y 350CONFIG_NETDEVICES=y
990CONFIG_IFB=m
991CONFIG_DUMMY=m
992CONFIG_BONDING=m 351CONFIG_BONDING=m
352CONFIG_DUMMY=m
353CONFIG_IFB=m
993CONFIG_MACVLAN=m 354CONFIG_MACVLAN=m
994CONFIG_MACVTAP=m 355CONFIG_MACVTAP=m
995# CONFIG_EQUALIZER is not set 356CONFIG_NETCONSOLE=m
357CONFIG_NETCONSOLE_DYNAMIC=y
358CONFIG_NETPOLL_TRAP=y
996CONFIG_TUN=y 359CONFIG_TUN=y
997CONFIG_VETH=m 360CONFIG_VETH=m
998# CONFIG_ARCNET is not set 361CONFIG_NET_DSA_MV88E6060=y
999# CONFIG_MII is not set 362CONFIG_NET_DSA_MV88E6131=y
1000CONFIG_PHYLIB=y 363CONFIG_NET_DSA_MV88E6123_61_65=y
1001 364# CONFIG_NET_VENDOR_3COM is not set
1002# 365# CONFIG_NET_VENDOR_ADAPTEC is not set
1003# MII PHY device drivers 366# CONFIG_NET_VENDOR_ALTEON is not set
1004# 367# CONFIG_NET_VENDOR_AMD is not set
1005# CONFIG_MARVELL_PHY is not set 368# CONFIG_NET_VENDOR_ATHEROS is not set
1006# CONFIG_DAVICOM_PHY is not set 369# CONFIG_NET_VENDOR_BROADCOM is not set
1007# CONFIG_QSEMI_PHY is not set 370# CONFIG_NET_VENDOR_BROCADE is not set
1008# CONFIG_LXT_PHY is not set 371# CONFIG_NET_VENDOR_CHELSIO is not set
1009# CONFIG_CICADA_PHY is not set 372# CONFIG_NET_VENDOR_CISCO is not set
1010# CONFIG_VITESSE_PHY is not set 373# CONFIG_NET_VENDOR_DEC is not set
1011# CONFIG_SMSC_PHY is not set 374# CONFIG_NET_VENDOR_DLINK is not set
1012# CONFIG_BROADCOM_PHY is not set 375# CONFIG_NET_VENDOR_EMULEX is not set
1013# CONFIG_BCM63XX_PHY is not set 376# CONFIG_NET_VENDOR_EXAR is not set
1014# CONFIG_ICPLUS_PHY is not set 377# CONFIG_NET_VENDOR_HP is not set
1015# CONFIG_REALTEK_PHY is not set 378# CONFIG_NET_VENDOR_INTEL is not set
1016# CONFIG_NATIONAL_PHY is not set 379# CONFIG_NET_VENDOR_MARVELL is not set
1017# CONFIG_STE10XP is not set 380# CONFIG_NET_VENDOR_MELLANOX is not set
1018# CONFIG_LSI_ET1011C_PHY is not set 381# CONFIG_NET_VENDOR_MICREL is not set
1019# CONFIG_MICREL_PHY is not set 382# CONFIG_NET_VENDOR_MYRI is not set
1020# CONFIG_FIXED_PHY is not set 383# CONFIG_NET_VENDOR_NATSEMI is not set
1021# CONFIG_MDIO_BITBANG is not set 384# CONFIG_NET_VENDOR_NVIDIA is not set
1022# CONFIG_NET_ETHERNET is not set 385# CONFIG_NET_VENDOR_OKI is not set
1023CONFIG_NETDEV_1000=y 386# CONFIG_NET_PACKET_ENGINE is not set
1024# CONFIG_ACENIC is not set 387# CONFIG_NET_VENDOR_QLOGIC is not set
1025# CONFIG_DL2K is not set 388# CONFIG_NET_VENDOR_REALTEK is not set
1026# CONFIG_E1000 is not set 389# CONFIG_NET_VENDOR_RDC is not set
1027CONFIG_E1000E=m 390# CONFIG_NET_VENDOR_SEEQ is not set
1028# CONFIG_IP1000 is not set 391# CONFIG_NET_VENDOR_SILAN is not set
1029# CONFIG_IGB is not set 392# CONFIG_NET_VENDOR_SIS is not set
1030# CONFIG_IGBVF is not set 393# CONFIG_NET_VENDOR_SMSC is not set
1031# CONFIG_NS83820 is not set 394# CONFIG_NET_VENDOR_STMICRO is not set
1032# CONFIG_HAMACHI is not set 395# CONFIG_NET_VENDOR_SUN is not set
1033# CONFIG_YELLOWFIN is not set 396# CONFIG_NET_VENDOR_TEHUTI is not set
1034# CONFIG_R8169 is not set 397# CONFIG_NET_VENDOR_TI is not set
1035# CONFIG_SIS190 is not set
1036# CONFIG_SKGE is not set
1037# CONFIG_SKY2 is not set
1038# CONFIG_VIA_VELOCITY is not set
1039# CONFIG_TIGON3 is not set
1040# CONFIG_BNX2 is not set
1041# CONFIG_CNIC is not set
1042# CONFIG_QLA3XXX is not set
1043# CONFIG_ATL1 is not set
1044# CONFIG_ATL1E is not set
1045# CONFIG_ATL1C is not set
1046# CONFIG_JME is not set
1047# CONFIG_STMMAC_ETH is not set
1048# CONFIG_PCH_GBE is not set
1049# CONFIG_NETDEV_10000 is not set
1050# CONFIG_TR is not set
1051# CONFIG_WLAN is not set
1052
1053#
1054# Enable WiMAX (Networking options) to see the WiMAX drivers
1055#
1056# CONFIG_WAN is not set
1057
1058#
1059# CAIF transport drivers
1060#
1061# CONFIG_TILE_NET is not set 398# CONFIG_TILE_NET is not set
1062# CONFIG_FDDI is not set 399# CONFIG_NET_VENDOR_VIA is not set
1063# CONFIG_HIPPI is not set 400# CONFIG_WLAN is not set
1064# CONFIG_PPP is not set
1065# CONFIG_SLIP is not set
1066# CONFIG_NET_FC is not set
1067# CONFIG_NETCONSOLE is not set
1068# CONFIG_NETPOLL is not set
1069# CONFIG_NET_POLL_CONTROLLER is not set
1070# CONFIG_VMXNET3 is not set
1071# CONFIG_ISDN is not set
1072# CONFIG_PHONE is not set
1073
1074#
1075# Input device support
1076#
1077CONFIG_INPUT=y
1078# CONFIG_INPUT_FF_MEMLESS is not set
1079# CONFIG_INPUT_POLLDEV is not set
1080# CONFIG_INPUT_SPARSEKMAP is not set
1081
1082#
1083# Userland interfaces
1084#
1085# CONFIG_INPUT_MOUSEDEV is not set 401# CONFIG_INPUT_MOUSEDEV is not set
1086# CONFIG_INPUT_JOYDEV is not set
1087# CONFIG_INPUT_EVDEV is not set
1088# CONFIG_INPUT_EVBUG is not set
1089
1090#
1091# Input Device Drivers
1092#
1093# CONFIG_INPUT_KEYBOARD is not set 402# CONFIG_INPUT_KEYBOARD is not set
1094# CONFIG_INPUT_MOUSE is not set 403# CONFIG_INPUT_MOUSE is not set
1095# CONFIG_INPUT_JOYSTICK is not set
1096# CONFIG_INPUT_TABLET is not set
1097# CONFIG_INPUT_TOUCHSCREEN is not set
1098# CONFIG_INPUT_MISC is not set
1099
1100#
1101# Hardware I/O ports
1102#
1103# CONFIG_SERIO is not set 404# CONFIG_SERIO is not set
1104# CONFIG_GAMEPORT is not set
1105
1106#
1107# Character devices
1108#
1109# CONFIG_VT is not set 405# CONFIG_VT is not set
1110CONFIG_UNIX98_PTYS=y
1111# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
1112# CONFIG_LEGACY_PTYS is not set 406# CONFIG_LEGACY_PTYS is not set
1113# CONFIG_SERIAL_NONSTANDARD is not set
1114# CONFIG_NOZOMI is not set
1115# CONFIG_N_GSM is not set
1116CONFIG_DEVKMEM=y
1117
1118#
1119# Serial drivers
1120#
1121# CONFIG_SERIAL_8250 is not set
1122
1123#
1124# Non-8250 serial port support
1125#
1126# CONFIG_SERIAL_MFD_HSU is not set
1127# CONFIG_SERIAL_JSM is not set
1128# CONFIG_SERIAL_TIMBERDALE is not set
1129# CONFIG_SERIAL_ALTERA_JTAGUART is not set
1130# CONFIG_SERIAL_ALTERA_UART is not set
1131# CONFIG_SERIAL_PCH_UART is not set
1132# CONFIG_TTY_PRINTK is not set
1133CONFIG_HVC_DRIVER=y
1134# CONFIG_IPMI_HANDLER is not set
1135CONFIG_HW_RANDOM=y 407CONFIG_HW_RANDOM=y
1136CONFIG_HW_RANDOM_TIMERIOMEM=m 408CONFIG_HW_RANDOM_TIMERIOMEM=m
1137# CONFIG_R3964 is not set
1138# CONFIG_APPLICOM is not set
1139
1140#
1141# PCMCIA character devices
1142#
1143# CONFIG_RAW_DRIVER is not set
1144# CONFIG_TCG_TPM is not set
1145CONFIG_DEVPORT=y
1146# CONFIG_RAMOOPS is not set
1147CONFIG_I2C=y 409CONFIG_I2C=y
1148CONFIG_I2C_BOARDINFO=y
1149CONFIG_I2C_COMPAT=y
1150CONFIG_I2C_CHARDEV=y 410CONFIG_I2C_CHARDEV=y
1151# CONFIG_I2C_MUX is not set
1152CONFIG_I2C_HELPER_AUTO=y
1153
1154#
1155# I2C Hardware Bus support
1156#
1157
1158#
1159# PC SMBus host controller drivers
1160#
1161# CONFIG_I2C_ALI1535 is not set
1162# CONFIG_I2C_ALI1563 is not set
1163# CONFIG_I2C_ALI15X3 is not set
1164# CONFIG_I2C_AMD756 is not set
1165# CONFIG_I2C_AMD8111 is not set
1166# CONFIG_I2C_I801 is not set
1167# CONFIG_I2C_ISCH is not set
1168# CONFIG_I2C_PIIX4 is not set
1169# CONFIG_I2C_NFORCE2 is not set
1170# CONFIG_I2C_SIS5595 is not set
1171# CONFIG_I2C_SIS630 is not set
1172# CONFIG_I2C_SIS96X is not set
1173# CONFIG_I2C_VIA is not set
1174# CONFIG_I2C_VIAPRO is not set
1175
1176#
1177# I2C system bus drivers (mostly embedded / system-on-chip)
1178#
1179# CONFIG_I2C_INTEL_MID is not set
1180# CONFIG_I2C_OCORES is not set
1181# CONFIG_I2C_PCA_PLATFORM is not set
1182# CONFIG_I2C_PXA_PCI is not set
1183# CONFIG_I2C_SIMTEC is not set
1184# CONFIG_I2C_XILINX is not set
1185# CONFIG_I2C_EG20T is not set
1186
1187#
1188# External I2C/SMBus adapter drivers
1189#
1190# CONFIG_I2C_PARPORT_LIGHT is not set
1191# CONFIG_I2C_TAOS_EVM is not set
1192
1193#
1194# Other I2C/SMBus bus drivers
1195#
1196# CONFIG_I2C_STUB is not set
1197# CONFIG_I2C_DEBUG_CORE is not set
1198# CONFIG_I2C_DEBUG_ALGO is not set
1199# CONFIG_I2C_DEBUG_BUS is not set
1200# CONFIG_SPI is not set
1201
1202#
1203# PPS support
1204#
1205# CONFIG_PPS is not set
1206
1207#
1208# PPS generators support
1209#
1210# CONFIG_W1 is not set
1211# CONFIG_POWER_SUPPLY is not set
1212# CONFIG_HWMON is not set 411# CONFIG_HWMON is not set
1213# CONFIG_THERMAL is not set 412CONFIG_WATCHDOG=y
1214# CONFIG_WATCHDOG is not set 413CONFIG_WATCHDOG_NOWAYOUT=y
1215CONFIG_SSB_POSSIBLE=y
1216
1217#
1218# Sonics Silicon Backplane
1219#
1220# CONFIG_SSB is not set
1221CONFIG_MFD_SUPPORT=y
1222# CONFIG_MFD_CORE is not set
1223# CONFIG_MFD_88PM860X is not set
1224# CONFIG_MFD_SM501 is not set
1225# CONFIG_HTC_PASIC3 is not set
1226# CONFIG_TPS6105X is not set
1227# CONFIG_TPS6507X is not set
1228# CONFIG_TWL4030_CORE is not set
1229# CONFIG_MFD_STMPE is not set
1230# CONFIG_MFD_TC3589X is not set
1231# CONFIG_MFD_TMIO is not set
1232# CONFIG_PMIC_DA903X is not set
1233# CONFIG_PMIC_ADP5520 is not set
1234# CONFIG_MFD_MAX8925 is not set
1235# CONFIG_MFD_MAX8997 is not set
1236# CONFIG_MFD_MAX8998 is not set
1237# CONFIG_MFD_WM8400 is not set
1238# CONFIG_MFD_WM831X_I2C is not set
1239# CONFIG_MFD_WM8350_I2C is not set
1240# CONFIG_MFD_WM8994 is not set
1241# CONFIG_MFD_PCF50633 is not set
1242# CONFIG_ABX500_CORE is not set
1243# CONFIG_LPC_SCH is not set
1244# CONFIG_MFD_RDC321X is not set
1245# CONFIG_MFD_JANZ_CMODIO is not set
1246# CONFIG_MFD_VX855 is not set
1247# CONFIG_MFD_WL1273_CORE is not set
1248# CONFIG_REGULATOR is not set
1249# CONFIG_MEDIA_SUPPORT is not set
1250
1251#
1252# Graphics support
1253#
1254# CONFIG_VGA_ARB is not set 414# CONFIG_VGA_ARB is not set
1255# CONFIG_DRM is not set
1256# CONFIG_STUB_POULSBO is not set
1257# CONFIG_VGASTATE is not set
1258# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1259# CONFIG_FB is not set
1260# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1261
1262#
1263# Display device support
1264#
1265# CONFIG_DISPLAY_SUPPORT is not set
1266# CONFIG_SOUND is not set
1267# CONFIG_HID_SUPPORT is not set 415# CONFIG_HID_SUPPORT is not set
1268# CONFIG_USB_SUPPORT is not set 416CONFIG_USB=y
1269# CONFIG_UWB is not set 417# CONFIG_USB_DEVICE_CLASS is not set
1270# CONFIG_MMC is not set 418CONFIG_USB_EHCI_HCD=y
1271# CONFIG_MEMSTICK is not set 419CONFIG_USB_OHCI_HCD=y
1272# CONFIG_NEW_LEDS is not set 420CONFIG_USB_STORAGE=y
1273# CONFIG_NFC_DEVICES is not set 421CONFIG_USB_LIBUSUAL=y
1274# CONFIG_ACCESSIBILITY is not set 422CONFIG_EDAC=y
1275# CONFIG_INFINIBAND is not set 423CONFIG_EDAC_MM_EDAC=y
1276# CONFIG_EDAC is not set
1277CONFIG_RTC_LIB=y
1278CONFIG_RTC_CLASS=y 424CONFIG_RTC_CLASS=y
1279CONFIG_RTC_HCTOSYS=y
1280CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1281# CONFIG_RTC_DEBUG is not set
1282
1283#
1284# RTC interfaces
1285#
1286CONFIG_RTC_INTF_SYSFS=y
1287CONFIG_RTC_INTF_PROC=y
1288CONFIG_RTC_INTF_DEV=y
1289# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1290# CONFIG_RTC_DRV_TEST is not set
1291
1292#
1293# I2C RTC drivers
1294#
1295# CONFIG_RTC_DRV_DS1307 is not set
1296# CONFIG_RTC_DRV_DS1374 is not set
1297# CONFIG_RTC_DRV_DS1672 is not set
1298# CONFIG_RTC_DRV_DS3232 is not set
1299# CONFIG_RTC_DRV_MAX6900 is not set
1300# CONFIG_RTC_DRV_RS5C372 is not set
1301# CONFIG_RTC_DRV_ISL1208 is not set
1302# CONFIG_RTC_DRV_ISL12022 is not set
1303# CONFIG_RTC_DRV_X1205 is not set
1304# CONFIG_RTC_DRV_PCF8563 is not set
1305# CONFIG_RTC_DRV_PCF8583 is not set
1306# CONFIG_RTC_DRV_M41T80 is not set
1307# CONFIG_RTC_DRV_BQ32K is not set
1308# CONFIG_RTC_DRV_S35390A is not set
1309# CONFIG_RTC_DRV_FM3130 is not set
1310# CONFIG_RTC_DRV_RX8581 is not set
1311# CONFIG_RTC_DRV_RX8025 is not set
1312
1313#
1314# SPI RTC drivers
1315#
1316
1317#
1318# Platform RTC drivers
1319#
1320# CONFIG_RTC_DRV_DS1286 is not set
1321# CONFIG_RTC_DRV_DS1511 is not set
1322# CONFIG_RTC_DRV_DS1553 is not set
1323# CONFIG_RTC_DRV_DS1742 is not set
1324# CONFIG_RTC_DRV_STK17TA8 is not set
1325# CONFIG_RTC_DRV_M48T86 is not set
1326# CONFIG_RTC_DRV_M48T35 is not set
1327# CONFIG_RTC_DRV_M48T59 is not set
1328# CONFIG_RTC_DRV_MSM6242 is not set
1329# CONFIG_RTC_DRV_BQ4802 is not set
1330# CONFIG_RTC_DRV_RP5C01 is not set
1331# CONFIG_RTC_DRV_V3020 is not set
1332
1333#
1334# on-CPU RTC drivers
1335#
1336CONFIG_RTC_DRV_TILE=y 425CONFIG_RTC_DRV_TILE=y
1337# CONFIG_DMADEVICES is not set
1338# CONFIG_AUXDISPLAY is not set
1339# CONFIG_UIO is not set
1340# CONFIG_STAGING is not set
1341
1342#
1343# File systems
1344#
1345CONFIG_EXT2_FS=y 426CONFIG_EXT2_FS=y
1346CONFIG_EXT2_FS_XATTR=y 427CONFIG_EXT2_FS_XATTR=y
1347CONFIG_EXT2_FS_POSIX_ACL=y 428CONFIG_EXT2_FS_POSIX_ACL=y
1348CONFIG_EXT2_FS_SECURITY=y 429CONFIG_EXT2_FS_SECURITY=y
1349CONFIG_EXT2_FS_XIP=y 430CONFIG_EXT2_FS_XIP=y
1350CONFIG_EXT3_FS=y 431CONFIG_EXT3_FS=y
1351CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
1352CONFIG_EXT3_FS_XATTR=y
1353CONFIG_EXT3_FS_POSIX_ACL=y 432CONFIG_EXT3_FS_POSIX_ACL=y
1354CONFIG_EXT3_FS_SECURITY=y 433CONFIG_EXT3_FS_SECURITY=y
1355CONFIG_EXT4_FS=y 434CONFIG_EXT4_FS=y
1356CONFIG_EXT4_FS_XATTR=y
1357CONFIG_EXT4_FS_POSIX_ACL=y 435CONFIG_EXT4_FS_POSIX_ACL=y
1358CONFIG_EXT4_FS_SECURITY=y 436CONFIG_EXT4_FS_SECURITY=y
1359# CONFIG_EXT4_DEBUG is not set 437CONFIG_XFS_FS=y
1360CONFIG_FS_XIP=y
1361CONFIG_JBD=y
1362# CONFIG_JBD_DEBUG is not set
1363CONFIG_JBD2=y
1364CONFIG_JBD2_DEBUG=y
1365CONFIG_FS_MBCACHE=y
1366# CONFIG_REISERFS_FS is not set
1367# CONFIG_JFS_FS is not set
1368CONFIG_XFS_FS=m
1369CONFIG_XFS_QUOTA=y 438CONFIG_XFS_QUOTA=y
1370CONFIG_XFS_POSIX_ACL=y 439CONFIG_XFS_POSIX_ACL=y
1371# CONFIG_XFS_RT is not set
1372# CONFIG_XFS_DEBUG is not set
1373CONFIG_GFS2_FS=m 440CONFIG_GFS2_FS=m
1374CONFIG_GFS2_FS_LOCKING_DLM=y 441CONFIG_GFS2_FS_LOCKING_DLM=y
1375# CONFIG_OCFS2_FS is not set
1376CONFIG_BTRFS_FS=m 442CONFIG_BTRFS_FS=m
1377CONFIG_BTRFS_FS_POSIX_ACL=y 443CONFIG_BTRFS_FS_POSIX_ACL=y
1378# CONFIG_NILFS2_FS is not set
1379CONFIG_FS_POSIX_ACL=y
1380CONFIG_EXPORTFS=y
1381CONFIG_FILE_LOCKING=y
1382CONFIG_FSNOTIFY=y
1383CONFIG_DNOTIFY=y
1384CONFIG_INOTIFY_USER=y
1385# CONFIG_FANOTIFY is not set
1386CONFIG_QUOTA=y 444CONFIG_QUOTA=y
1387CONFIG_QUOTA_NETLINK_INTERFACE=y 445CONFIG_QUOTA_NETLINK_INTERFACE=y
1388# CONFIG_PRINT_QUOTA_WARNING is not set 446# CONFIG_PRINT_QUOTA_WARNING is not set
1389# CONFIG_QUOTA_DEBUG is not set
1390CONFIG_QUOTA_TREE=y
1391# CONFIG_QFMT_V1 is not set
1392CONFIG_QFMT_V2=y 447CONFIG_QFMT_V2=y
1393CONFIG_QUOTACTL=y 448CONFIG_AUTOFS4_FS=m
1394# CONFIG_AUTOFS4_FS is not set
1395CONFIG_FUSE_FS=y 449CONFIG_FUSE_FS=y
1396CONFIG_CUSE=m 450CONFIG_CUSE=m
1397CONFIG_GENERIC_ACL=y
1398
1399#
1400# Caches
1401#
1402CONFIG_FSCACHE=m 451CONFIG_FSCACHE=m
1403CONFIG_FSCACHE_STATS=y 452CONFIG_FSCACHE_STATS=y
1404# CONFIG_FSCACHE_HISTOGRAM is not set
1405# CONFIG_FSCACHE_DEBUG is not set
1406# CONFIG_FSCACHE_OBJECT_LIST is not set
1407CONFIG_CACHEFILES=m 453CONFIG_CACHEFILES=m
1408# CONFIG_CACHEFILES_DEBUG is not set
1409# CONFIG_CACHEFILES_HISTOGRAM is not set
1410
1411#
1412# CD-ROM/DVD Filesystems
1413#
1414CONFIG_ISO9660_FS=m 454CONFIG_ISO9660_FS=m
1415CONFIG_JOLIET=y 455CONFIG_JOLIET=y
1416CONFIG_ZISOFS=y 456CONFIG_ZISOFS=y
1417CONFIG_UDF_FS=m 457CONFIG_UDF_FS=m
1418CONFIG_UDF_NLS=y
1419
1420#
1421# DOS/FAT/NT Filesystems
1422#
1423CONFIG_FAT_FS=m
1424CONFIG_MSDOS_FS=m 458CONFIG_MSDOS_FS=m
1425CONFIG_VFAT_FS=m 459CONFIG_VFAT_FS=m
1426CONFIG_FAT_DEFAULT_CODEPAGE=437
1427CONFIG_FAT_DEFAULT_IOCHARSET="ascii" 460CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
1428# CONFIG_NTFS_FS is not set
1429
1430#
1431# Pseudo filesystems
1432#
1433CONFIG_PROC_FS=y
1434CONFIG_PROC_KCORE=y 461CONFIG_PROC_KCORE=y
1435CONFIG_PROC_SYSCTL=y
1436CONFIG_PROC_PAGE_MONITOR=y
1437CONFIG_SYSFS=y
1438CONFIG_TMPFS=y 462CONFIG_TMPFS=y
1439CONFIG_TMPFS_POSIX_ACL=y 463CONFIG_TMPFS_POSIX_ACL=y
1440CONFIG_HUGETLBFS=y 464CONFIG_HUGETLBFS=y
1441CONFIG_HUGETLB_PAGE=y
1442CONFIG_CONFIGFS_FS=m
1443CONFIG_MISC_FILESYSTEMS=y
1444# CONFIG_ADFS_FS is not set
1445# CONFIG_AFFS_FS is not set
1446CONFIG_ECRYPT_FS=m 465CONFIG_ECRYPT_FS=m
1447# CONFIG_HFS_FS is not set
1448# CONFIG_HFSPLUS_FS is not set
1449# CONFIG_BEFS_FS is not set
1450# CONFIG_BFS_FS is not set
1451# CONFIG_EFS_FS is not set
1452# CONFIG_LOGFS is not set
1453CONFIG_CRAMFS=m 466CONFIG_CRAMFS=m
1454CONFIG_SQUASHFS=m 467CONFIG_SQUASHFS=m
1455# CONFIG_SQUASHFS_XATTR is not set
1456# CONFIG_SQUASHFS_LZO is not set
1457# CONFIG_SQUASHFS_XZ is not set
1458# CONFIG_SQUASHFS_EMBEDDED is not set
1459CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
1460# CONFIG_VXFS_FS is not set
1461# CONFIG_MINIX_FS is not set
1462# CONFIG_OMFS_FS is not set
1463# CONFIG_HPFS_FS is not set
1464# CONFIG_QNX4FS_FS is not set
1465# CONFIG_ROMFS_FS is not set
1466# CONFIG_PSTORE is not set
1467# CONFIG_SYSV_FS is not set
1468# CONFIG_UFS_FS is not set
1469CONFIG_NETWORK_FILESYSTEMS=y
1470CONFIG_NFS_FS=m 468CONFIG_NFS_FS=m
1471CONFIG_NFS_V3=y 469CONFIG_NFS_V3=y
1472CONFIG_NFS_V3_ACL=y 470CONFIG_NFS_V3_ACL=y
1473CONFIG_NFS_V4=y 471CONFIG_NFS_V4=y
1474CONFIG_NFS_V4_1=y 472CONFIG_NFS_V4_1=y
1475CONFIG_PNFS_FILE_LAYOUT=m
1476CONFIG_NFS_FSCACHE=y 473CONFIG_NFS_FSCACHE=y
1477# CONFIG_NFS_USE_LEGACY_DNS is not set
1478CONFIG_NFS_USE_KERNEL_DNS=y
1479# CONFIG_NFS_USE_NEW_IDMAPPER is not set
1480CONFIG_NFSD=m 474CONFIG_NFSD=m
1481CONFIG_NFSD_V2_ACL=y
1482CONFIG_NFSD_V3=y
1483CONFIG_NFSD_V3_ACL=y 475CONFIG_NFSD_V3_ACL=y
1484CONFIG_NFSD_V4=y 476CONFIG_NFSD_V4=y
1485CONFIG_LOCKD=m
1486CONFIG_LOCKD_V4=y
1487CONFIG_NFS_ACL_SUPPORT=m
1488CONFIG_NFS_COMMON=y
1489CONFIG_SUNRPC=m
1490CONFIG_SUNRPC_GSS=m
1491CONFIG_RPCSEC_GSS_KRB5=m
1492# CONFIG_CEPH_FS is not set
1493CONFIG_CIFS=m 477CONFIG_CIFS=m
1494CONFIG_CIFS_STATS=y 478CONFIG_CIFS_STATS=y
1495# CONFIG_CIFS_STATS2 is not set
1496CONFIG_CIFS_WEAK_PW_HASH=y 479CONFIG_CIFS_WEAK_PW_HASH=y
1497CONFIG_CIFS_UPCALL=y 480CONFIG_CIFS_UPCALL=y
1498CONFIG_CIFS_XATTR=y 481CONFIG_CIFS_XATTR=y
1499CONFIG_CIFS_POSIX=y 482CONFIG_CIFS_POSIX=y
1500# CONFIG_CIFS_DEBUG2 is not set
1501CONFIG_CIFS_DFS_UPCALL=y 483CONFIG_CIFS_DFS_UPCALL=y
1502CONFIG_CIFS_FSCACHE=y 484CONFIG_CIFS_FSCACHE=y
1503# CONFIG_CIFS_ACL is not set
1504CONFIG_CIFS_EXPERIMENTAL=y
1505# CONFIG_NCP_FS is not set
1506# CONFIG_CODA_FS is not set
1507# CONFIG_AFS_FS is not set
1508
1509#
1510# Partition Types
1511#
1512CONFIG_PARTITION_ADVANCED=y
1513# CONFIG_ACORN_PARTITION is not set
1514CONFIG_OSF_PARTITION=y
1515CONFIG_AMIGA_PARTITION=y
1516# CONFIG_ATARI_PARTITION is not set
1517CONFIG_MAC_PARTITION=y
1518CONFIG_MSDOS_PARTITION=y
1519CONFIG_BSD_DISKLABEL=y
1520CONFIG_MINIX_SUBPARTITION=y
1521CONFIG_SOLARIS_X86_PARTITION=y
1522CONFIG_UNIXWARE_DISKLABEL=y
1523# CONFIG_LDM_PARTITION is not set
1524CONFIG_SGI_PARTITION=y
1525# CONFIG_ULTRIX_PARTITION is not set
1526CONFIG_SUN_PARTITION=y
1527CONFIG_KARMA_PARTITION=y
1528CONFIG_EFI_PARTITION=y
1529# CONFIG_SYSV68_PARTITION is not set
1530CONFIG_NLS=y
1531CONFIG_NLS_DEFAULT="utf8" 485CONFIG_NLS_DEFAULT="utf8"
1532CONFIG_NLS_CODEPAGE_437=y 486CONFIG_NLS_CODEPAGE_437=y
1533CONFIG_NLS_CODEPAGE_737=m 487CONFIG_NLS_CODEPAGE_737=m
@@ -1567,185 +521,47 @@ CONFIG_NLS_ISO8859_15=m
1567CONFIG_NLS_KOI8_R=m 521CONFIG_NLS_KOI8_R=m
1568CONFIG_NLS_KOI8_U=m 522CONFIG_NLS_KOI8_U=m
1569CONFIG_NLS_UTF8=m 523CONFIG_NLS_UTF8=m
1570CONFIG_DLM=m
1571CONFIG_DLM_DEBUG=y 524CONFIG_DLM_DEBUG=y
1572
1573#
1574# Kernel hacking
1575#
1576# CONFIG_PRINTK_TIME is not set
1577CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
1578# CONFIG_ENABLE_WARN_DEPRECATED is not set 525# CONFIG_ENABLE_WARN_DEPRECATED is not set
1579CONFIG_ENABLE_MUST_CHECK=y
1580CONFIG_FRAME_WARN=2048
1581CONFIG_MAGIC_SYSRQ=y 526CONFIG_MAGIC_SYSRQ=y
1582CONFIG_STRIP_ASM_SYMS=y 527CONFIG_STRIP_ASM_SYMS=y
1583# CONFIG_UNUSED_SYMBOLS is not set
1584CONFIG_DEBUG_FS=y 528CONFIG_DEBUG_FS=y
1585CONFIG_HEADERS_CHECK=y 529CONFIG_HEADERS_CHECK=y
1586# CONFIG_DEBUG_SECTION_MISMATCH is not set
1587CONFIG_DEBUG_KERNEL=y
1588CONFIG_DEBUG_SHIRQ=y
1589CONFIG_LOCKUP_DETECTOR=y 530CONFIG_LOCKUP_DETECTOR=y
1590# CONFIG_HARDLOCKUP_DETECTOR is not set
1591# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
1592CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
1593# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1594CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1595CONFIG_DETECT_HUNG_TASK=y
1596# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1597CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1598CONFIG_SCHED_DEBUG=y
1599CONFIG_SCHEDSTATS=y 531CONFIG_SCHEDSTATS=y
1600CONFIG_TIMER_STATS=y 532CONFIG_TIMER_STATS=y
1601# CONFIG_DEBUG_OBJECTS is not set
1602# CONFIG_SLUB_DEBUG_ON is not set
1603# CONFIG_SLUB_STATS is not set
1604# CONFIG_DEBUG_KMEMLEAK is not set
1605# CONFIG_DEBUG_RT_MUTEXES is not set
1606# CONFIG_RT_MUTEX_TESTER is not set
1607# CONFIG_DEBUG_SPINLOCK is not set
1608# CONFIG_DEBUG_MUTEXES is not set
1609# CONFIG_DEBUG_LOCK_ALLOC is not set
1610# CONFIG_PROVE_LOCKING is not set
1611# CONFIG_SPARSE_RCU_POINTER is not set
1612# CONFIG_LOCK_STAT is not set
1613CONFIG_DEBUG_SPINLOCK_SLEEP=y
1614# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1615CONFIG_STACKTRACE=y
1616# CONFIG_DEBUG_KOBJECT is not set
1617CONFIG_DEBUG_INFO=y 533CONFIG_DEBUG_INFO=y
1618CONFIG_DEBUG_INFO_REDUCED=y 534CONFIG_DEBUG_INFO_REDUCED=y
1619CONFIG_DEBUG_VM=y 535CONFIG_DEBUG_VM=y
1620# CONFIG_DEBUG_WRITECOUNT is not set
1621CONFIG_DEBUG_MEMORY_INIT=y 536CONFIG_DEBUG_MEMORY_INIT=y
1622CONFIG_DEBUG_LIST=y 537CONFIG_DEBUG_LIST=y
1623# CONFIG_TEST_LIST_SORT is not set
1624# CONFIG_DEBUG_SG is not set
1625# CONFIG_DEBUG_NOTIFIERS is not set
1626CONFIG_DEBUG_CREDENTIALS=y 538CONFIG_DEBUG_CREDENTIALS=y
1627# CONFIG_RCU_TORTURE_TEST is not set
1628# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1629# CONFIG_BACKTRACE_SELF_TEST is not set
1630# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1631CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y 539CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
1632# CONFIG_LKDTM is not set
1633# CONFIG_FAULT_INJECTION is not set
1634# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1635# CONFIG_DEBUG_PAGEALLOC is not set
1636CONFIG_TRACING_SUPPORT=y
1637CONFIG_FTRACE=y
1638# CONFIG_IRQSOFF_TRACER is not set
1639# CONFIG_SCHED_TRACER is not set
1640# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1641CONFIG_BRANCH_PROFILE_NONE=y
1642# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1643# CONFIG_PROFILE_ALL_BRANCHES is not set
1644# CONFIG_BLK_DEV_IO_TRACE is not set
1645# CONFIG_BUILD_DOCSRC is not set
1646CONFIG_DYNAMIC_DEBUG=y 540CONFIG_DYNAMIC_DEBUG=y
1647# CONFIG_ATOMIC64_SELFTEST is not set
1648CONFIG_ASYNC_RAID6_TEST=m 541CONFIG_ASYNC_RAID6_TEST=m
1649# CONFIG_SAMPLES is not set
1650# CONFIG_TEST_KSTRTOX is not set
1651CONFIG_EARLY_PRINTK=y
1652CONFIG_DEBUG_STACKOVERFLOW=y 542CONFIG_DEBUG_STACKOVERFLOW=y
1653# CONFIG_DEBUG_STACK_USAGE is not set
1654CONFIG_DEBUG_EXTRA_FLAGS=""
1655
1656#
1657# Security options
1658#
1659CONFIG_KEYS=y
1660CONFIG_KEYS_DEBUG_PROC_KEYS=y 543CONFIG_KEYS_DEBUG_PROC_KEYS=y
1661# CONFIG_SECURITY_DMESG_RESTRICT is not set
1662CONFIG_SECURITY=y 544CONFIG_SECURITY=y
1663CONFIG_SECURITYFS=y 545CONFIG_SECURITYFS=y
1664CONFIG_SECURITY_NETWORK=y 546CONFIG_SECURITY_NETWORK=y
1665CONFIG_SECURITY_NETWORK_XFRM=y 547CONFIG_SECURITY_NETWORK_XFRM=y
1666# CONFIG_SECURITY_PATH is not set
1667CONFIG_LSM_MMAP_MIN_ADDR=65536
1668CONFIG_SECURITY_SELINUX=y 548CONFIG_SECURITY_SELINUX=y
1669CONFIG_SECURITY_SELINUX_BOOTPARAM=y 549CONFIG_SECURITY_SELINUX_BOOTPARAM=y
1670CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
1671CONFIG_SECURITY_SELINUX_DISABLE=y 550CONFIG_SECURITY_SELINUX_DISABLE=y
1672CONFIG_SECURITY_SELINUX_DEVELOP=y
1673CONFIG_SECURITY_SELINUX_AVC_STATS=y
1674CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
1675# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
1676# CONFIG_SECURITY_SMACK is not set
1677# CONFIG_SECURITY_TOMOYO is not set
1678# CONFIG_SECURITY_APPARMOR is not set
1679# CONFIG_IMA is not set
1680CONFIG_DEFAULT_SECURITY_SELINUX=y
1681# CONFIG_DEFAULT_SECURITY_DAC is not set
1682CONFIG_DEFAULT_SECURITY="selinux"
1683CONFIG_XOR_BLOCKS=m
1684CONFIG_ASYNC_CORE=m
1685CONFIG_ASYNC_MEMCPY=m
1686CONFIG_ASYNC_XOR=m
1687CONFIG_ASYNC_PQ=m
1688CONFIG_ASYNC_RAID6_RECOV=m
1689CONFIG_CRYPTO=y
1690
1691#
1692# Crypto core or helper
1693#
1694CONFIG_CRYPTO_ALGAPI=y
1695CONFIG_CRYPTO_ALGAPI2=y
1696CONFIG_CRYPTO_AEAD=m
1697CONFIG_CRYPTO_AEAD2=y
1698CONFIG_CRYPTO_BLKCIPHER=m
1699CONFIG_CRYPTO_BLKCIPHER2=y
1700CONFIG_CRYPTO_HASH=y
1701CONFIG_CRYPTO_HASH2=y
1702CONFIG_CRYPTO_RNG=m
1703CONFIG_CRYPTO_RNG2=y
1704CONFIG_CRYPTO_PCOMP=m
1705CONFIG_CRYPTO_PCOMP2=y
1706CONFIG_CRYPTO_MANAGER=y
1707CONFIG_CRYPTO_MANAGER2=y
1708CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
1709CONFIG_CRYPTO_GF128MUL=m
1710CONFIG_CRYPTO_NULL=m 551CONFIG_CRYPTO_NULL=m
1711CONFIG_CRYPTO_PCRYPT=m 552CONFIG_CRYPTO_PCRYPT=m
1712CONFIG_CRYPTO_WORKQUEUE=y
1713CONFIG_CRYPTO_CRYPTD=m 553CONFIG_CRYPTO_CRYPTD=m
1714CONFIG_CRYPTO_AUTHENC=m
1715CONFIG_CRYPTO_TEST=m 554CONFIG_CRYPTO_TEST=m
1716
1717#
1718# Authenticated Encryption with Associated Data
1719#
1720CONFIG_CRYPTO_CCM=m 555CONFIG_CRYPTO_CCM=m
1721CONFIG_CRYPTO_GCM=m 556CONFIG_CRYPTO_GCM=m
1722CONFIG_CRYPTO_SEQIV=m
1723
1724#
1725# Block modes
1726#
1727CONFIG_CRYPTO_CBC=m
1728CONFIG_CRYPTO_CTR=m
1729CONFIG_CRYPTO_CTS=m 557CONFIG_CRYPTO_CTS=m
1730CONFIG_CRYPTO_ECB=m
1731CONFIG_CRYPTO_LRW=m 558CONFIG_CRYPTO_LRW=m
1732CONFIG_CRYPTO_PCBC=m 559CONFIG_CRYPTO_PCBC=m
1733CONFIG_CRYPTO_XTS=m 560CONFIG_CRYPTO_XTS=m
1734
1735#
1736# Hash modes
1737#
1738CONFIG_CRYPTO_HMAC=y 561CONFIG_CRYPTO_HMAC=y
1739CONFIG_CRYPTO_XCBC=m 562CONFIG_CRYPTO_XCBC=m
1740CONFIG_CRYPTO_VMAC=m 563CONFIG_CRYPTO_VMAC=m
1741
1742#
1743# Digest
1744#
1745CONFIG_CRYPTO_CRC32C=y 564CONFIG_CRYPTO_CRC32C=y
1746CONFIG_CRYPTO_GHASH=m
1747CONFIG_CRYPTO_MD4=m
1748CONFIG_CRYPTO_MD5=y
1749CONFIG_CRYPTO_MICHAEL_MIC=m 565CONFIG_CRYPTO_MICHAEL_MIC=m
1750CONFIG_CRYPTO_RMD128=m 566CONFIG_CRYPTO_RMD128=m
1751CONFIG_CRYPTO_RMD160=m 567CONFIG_CRYPTO_RMD160=m
@@ -1756,76 +572,16 @@ CONFIG_CRYPTO_SHA256=m
1756CONFIG_CRYPTO_SHA512=m 572CONFIG_CRYPTO_SHA512=m
1757CONFIG_CRYPTO_TGR192=m 573CONFIG_CRYPTO_TGR192=m
1758CONFIG_CRYPTO_WP512=m 574CONFIG_CRYPTO_WP512=m
1759
1760#
1761# Ciphers
1762#
1763CONFIG_CRYPTO_AES=m
1764CONFIG_CRYPTO_ANUBIS=m 575CONFIG_CRYPTO_ANUBIS=m
1765CONFIG_CRYPTO_ARC4=m
1766CONFIG_CRYPTO_BLOWFISH=m 576CONFIG_CRYPTO_BLOWFISH=m
1767CONFIG_CRYPTO_CAMELLIA=m 577CONFIG_CRYPTO_CAMELLIA=m
1768CONFIG_CRYPTO_CAST5=m 578CONFIG_CRYPTO_CAST5=m
1769CONFIG_CRYPTO_CAST6=m 579CONFIG_CRYPTO_CAST6=m
1770CONFIG_CRYPTO_DES=m
1771CONFIG_CRYPTO_FCRYPT=m 580CONFIG_CRYPTO_FCRYPT=m
1772CONFIG_CRYPTO_KHAZAD=m 581CONFIG_CRYPTO_KHAZAD=m
1773# CONFIG_CRYPTO_SALSA20 is not set
1774CONFIG_CRYPTO_SEED=m 582CONFIG_CRYPTO_SEED=m
1775CONFIG_CRYPTO_SERPENT=m 583CONFIG_CRYPTO_SERPENT=m
1776CONFIG_CRYPTO_TEA=m 584CONFIG_CRYPTO_TEA=m
1777CONFIG_CRYPTO_TWOFISH=m 585CONFIG_CRYPTO_TWOFISH=m
1778CONFIG_CRYPTO_TWOFISH_COMMON=m
1779
1780#
1781# Compression
1782#
1783CONFIG_CRYPTO_DEFLATE=m
1784CONFIG_CRYPTO_ZLIB=m 586CONFIG_CRYPTO_ZLIB=m
1785CONFIG_CRYPTO_LZO=m 587CONFIG_CRYPTO_LZO=m
1786
1787#
1788# Random Number Generation
1789#
1790CONFIG_CRYPTO_ANSI_CPRNG=m
1791# CONFIG_CRYPTO_USER_API_HASH is not set
1792# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
1793CONFIG_CRYPTO_HW=y
1794CONFIG_CRYPTO_DEV_HIFN_795X=m
1795CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
1796# CONFIG_BINARY_PRINTF is not set
1797
1798#
1799# Library routines
1800#
1801CONFIG_RAID6_PQ=m
1802CONFIG_BITREVERSE=y
1803CONFIG_GENERIC_FIND_FIRST_BIT=y
1804CONFIG_GENERIC_FIND_NEXT_BIT=y
1805CONFIG_GENERIC_FIND_LAST_BIT=y
1806# CONFIG_CRC_CCITT is not set
1807CONFIG_CRC16=y
1808CONFIG_CRC_T10DIF=y
1809CONFIG_CRC_ITU_T=m
1810CONFIG_CRC32=y
1811# CONFIG_CRC7 is not set
1812CONFIG_LIBCRC32C=m
1813CONFIG_AUDIT_GENERIC=y
1814CONFIG_ZLIB_INFLATE=y
1815CONFIG_ZLIB_DEFLATE=m
1816CONFIG_LZO_COMPRESS=m
1817CONFIG_LZO_DECOMPRESS=m
1818# CONFIG_XZ_DEC is not set
1819# CONFIG_XZ_DEC_BCJ is not set
1820CONFIG_DECOMPRESS_GZIP=y
1821CONFIG_TEXTSEARCH=y
1822CONFIG_TEXTSEARCH_KMP=m
1823CONFIG_TEXTSEARCH_BM=m
1824CONFIG_TEXTSEARCH_FSM=m
1825CONFIG_HAS_IOMEM=y
1826CONFIG_HAS_IOPORT=y
1827CONFIG_HAS_DMA=y
1828CONFIG_CPU_RMAP=y
1829CONFIG_NLATTR=y
1830# CONFIG_AVERAGE is not set
1831# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/tile/configs/tilepro_defconfig b/arch/tile/configs/tilepro_defconfig
index 6f05f969b564..2b1fd31894f1 100644
--- a/arch/tile/configs/tilepro_defconfig
+++ b/arch/tile/configs/tilepro_defconfig
@@ -1,1162 +1,579 @@
1#
2# Automatically generated make config: don't edit
3# Linux/tile 2.6.39-rc5 Kernel Configuration
4# Tue May 3 09:15:02 2011
5#
6CONFIG_TILE=y
7CONFIG_MMU=y
8CONFIG_GENERIC_CSUM=y
9CONFIG_SEMAPHORE_SLEEPERS=y
10CONFIG_HAVE_ARCH_ALLOC_REMAP=y
11CONFIG_HAVE_SETUP_PER_CPU_AREA=y
12CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
13CONFIG_SYS_SUPPORTS_HUGETLBFS=y
14CONFIG_GENERIC_CLOCKEVENTS=y
15CONFIG_RWSEM_GENERIC_SPINLOCK=y
16CONFIG_DEFAULT_MIGRATION_COST=10000000
17CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
18CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
19CONFIG_ARCH_DMA_ADDR_T_64BIT=y
20CONFIG_LOCKDEP_SUPPORT=y
21CONFIG_STACKTRACE_SUPPORT=y
22CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
23CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
25CONFIG_STRICT_DEVMEM=y
26CONFIG_SMP=y
27# CONFIG_DEBUG_COPY_FROM_USER is not set
28CONFIG_HVC_TILE=y
29# CONFIG_TILEGX is not set
30CONFIG_ARCH_DEFCONFIG="arch/tile/configs/tile_defconfig"
31CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
32CONFIG_CONSTRUCTORS=y
33
34#
35# General setup
36#
37CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
38CONFIG_INIT_ENV_ARG_LIMIT=32 2# CONFIG_LOCALVERSION_AUTO is not set
39CONFIG_CROSS_COMPILE=""
40CONFIG_LOCALVERSION=""
41CONFIG_LOCALVERSION_AUTO=y
42# CONFIG_SWAP is not set
43CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
44CONFIG_SYSVIPC_SYSCTL=y 4CONFIG_POSIX_MQUEUE=y
45# CONFIG_POSIX_MQUEUE is not set 5CONFIG_BSD_PROCESS_ACCT=y
46# CONFIG_BSD_PROCESS_ACCT is not set 6CONFIG_BSD_PROCESS_ACCT_V3=y
47CONFIG_FHANDLE=y 7CONFIG_FHANDLE=y
48# CONFIG_TASKSTATS is not set 8CONFIG_TASKSTATS=y
49# CONFIG_AUDIT is not set 9CONFIG_TASK_DELAY_ACCT=y
50CONFIG_HAVE_GENERIC_HARDIRQS=y 10CONFIG_TASK_XACCT=y
51 11CONFIG_TASK_IO_ACCOUNTING=y
52# 12CONFIG_AUDIT=y
53# IRQ subsystem 13CONFIG_LOG_BUF_SHIFT=19
54# 14CONFIG_CGROUPS=y
55CONFIG_GENERIC_HARDIRQS=y 15CONFIG_CGROUP_DEBUG=y
56CONFIG_GENERIC_IRQ_PROBE=y 16CONFIG_CGROUP_DEVICE=y
57CONFIG_GENERIC_IRQ_SHOW=y 17CONFIG_CPUSETS=y
58CONFIG_GENERIC_PENDING_IRQ=y 18CONFIG_CGROUP_CPUACCT=y
59 19CONFIG_RESOURCE_COUNTERS=y
60# 20CONFIG_CGROUP_MEM_RES_CTLR=y
61# RCU Subsystem 21CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
62# 22CONFIG_CGROUP_SCHED=y
63CONFIG_TREE_RCU=y 23CONFIG_RT_GROUP_SCHED=y
64# CONFIG_PREEMPT_RCU is not set 24CONFIG_BLK_CGROUP=y
65# CONFIG_RCU_TRACE is not set 25CONFIG_NAMESPACES=y
66CONFIG_RCU_FANOUT=32 26CONFIG_RELAY=y
67# CONFIG_RCU_FANOUT_EXACT is not set
68# CONFIG_RCU_FAST_NO_HZ is not set
69# CONFIG_TREE_RCU_TRACE is not set
70# CONFIG_IKCONFIG is not set
71CONFIG_LOG_BUF_SHIFT=17
72# CONFIG_CGROUPS is not set
73# CONFIG_NAMESPACES is not set
74# CONFIG_SCHED_AUTOGROUP is not set
75# CONFIG_SYSFS_DEPRECATED is not set
76# CONFIG_RELAY is not set
77CONFIG_BLK_DEV_INITRD=y 27CONFIG_BLK_DEV_INITRD=y
78CONFIG_INITRAMFS_SOURCE="usr/contents.txt"
79CONFIG_INITRAMFS_ROOT_UID=0
80CONFIG_INITRAMFS_ROOT_GID=0
81CONFIG_RD_GZIP=y
82# CONFIG_RD_BZIP2 is not set
83# CONFIG_RD_LZMA is not set
84# CONFIG_RD_XZ is not set
85# CONFIG_RD_LZO is not set
86CONFIG_INITRAMFS_COMPRESSION_NONE=y
87# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
88CONFIG_CC_OPTIMIZE_FOR_SIZE=y
89CONFIG_SYSCTL=y
90CONFIG_ANON_INODES=y
91CONFIG_EXPERT=y
92CONFIG_SYSCTL_SYSCALL=y 28CONFIG_SYSCTL_SYSCALL=y
93CONFIG_KALLSYMS=y
94# CONFIG_KALLSYMS_ALL is not set
95# CONFIG_KALLSYMS_EXTRA_PASS is not set
96CONFIG_HOTPLUG=y
97CONFIG_PRINTK=y
98CONFIG_BUG=y
99CONFIG_ELF_CORE=y
100CONFIG_BASE_FULL=y
101CONFIG_FUTEX=y
102CONFIG_EPOLL=y
103CONFIG_SIGNALFD=y
104CONFIG_TIMERFD=y
105CONFIG_EVENTFD=y
106CONFIG_SHMEM=y
107CONFIG_AIO=y
108CONFIG_EMBEDDED=y 29CONFIG_EMBEDDED=y
109
110#
111# Kernel Performance Events And Counters
112#
113CONFIG_VM_EVENT_COUNTERS=y
114CONFIG_PCI_QUIRKS=y
115CONFIG_SLUB_DEBUG=y
116# CONFIG_COMPAT_BRK is not set 30# CONFIG_COMPAT_BRK is not set
117# CONFIG_SLAB is not set
118CONFIG_SLUB=y
119# CONFIG_SLOB is not set
120CONFIG_PROFILING=y 31CONFIG_PROFILING=y
121CONFIG_USE_GENERIC_SMP_HELPERS=y
122
123#
124# GCOV-based kernel profiling
125#
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
127CONFIG_SLABINFO=y
128CONFIG_RT_MUTEXES=y
129CONFIG_BASE_SMALL=0
130CONFIG_MODULES=y 32CONFIG_MODULES=y
131# CONFIG_MODULE_FORCE_LOAD is not set 33CONFIG_MODULE_FORCE_LOAD=y
132CONFIG_MODULE_UNLOAD=y 34CONFIG_MODULE_UNLOAD=y
133# CONFIG_MODULE_FORCE_UNLOAD is not set 35CONFIG_BLK_DEV_INTEGRITY=y
134# CONFIG_MODVERSIONS is not set 36CONFIG_PARTITION_ADVANCED=y
135# CONFIG_MODULE_SRCVERSION_ALL is not set 37CONFIG_OSF_PARTITION=y
136CONFIG_STOP_MACHINE=y 38CONFIG_AMIGA_PARTITION=y
137CONFIG_BLOCK=y 39CONFIG_MAC_PARTITION=y
138CONFIG_LBDAF=y 40CONFIG_BSD_DISKLABEL=y
139# CONFIG_BLK_DEV_BSG is not set 41CONFIG_MINIX_SUBPARTITION=y
140# CONFIG_BLK_DEV_INTEGRITY is not set 42CONFIG_SOLARIS_X86_PARTITION=y
141 43CONFIG_UNIXWARE_DISKLABEL=y
142# 44CONFIG_SGI_PARTITION=y
143# IO Schedulers 45CONFIG_SUN_PARTITION=y
144# 46CONFIG_KARMA_PARTITION=y
145CONFIG_IOSCHED_NOOP=y 47CONFIG_EFI_PARTITION=y
146# CONFIG_IOSCHED_DEADLINE is not set 48CONFIG_CFQ_GROUP_IOSCHED=y
147# CONFIG_IOSCHED_CFQ is not set
148CONFIG_DEFAULT_NOOP=y
149CONFIG_DEFAULT_IOSCHED="noop"
150# CONFIG_INLINE_SPIN_TRYLOCK is not set
151# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
152# CONFIG_INLINE_SPIN_LOCK is not set
153# CONFIG_INLINE_SPIN_LOCK_BH is not set
154# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
155# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
156CONFIG_INLINE_SPIN_UNLOCK=y
157# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
158CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
159# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
160# CONFIG_INLINE_READ_TRYLOCK is not set
161# CONFIG_INLINE_READ_LOCK is not set
162# CONFIG_INLINE_READ_LOCK_BH is not set
163# CONFIG_INLINE_READ_LOCK_IRQ is not set
164# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
165CONFIG_INLINE_READ_UNLOCK=y
166# CONFIG_INLINE_READ_UNLOCK_BH is not set
167CONFIG_INLINE_READ_UNLOCK_IRQ=y
168# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
169# CONFIG_INLINE_WRITE_TRYLOCK is not set
170# CONFIG_INLINE_WRITE_LOCK is not set
171# CONFIG_INLINE_WRITE_LOCK_BH is not set
172# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
173# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
174CONFIG_INLINE_WRITE_UNLOCK=y
175# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
176CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
177# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
178CONFIG_MUTEX_SPIN_ON_OWNER=y
179
180#
181# Tilera-specific configuration
182#
183CONFIG_NR_CPUS=64
184CONFIG_TICK_ONESHOT=y
185CONFIG_NO_HZ=y 49CONFIG_NO_HZ=y
186CONFIG_HIGH_RES_TIMERS=y 50CONFIG_HIGH_RES_TIMERS=y
187CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
188CONFIG_HZ_100=y 51CONFIG_HZ_100=y
189# CONFIG_HZ_250 is not set 52CONFIG_PCI_DEBUG=y
190# CONFIG_HZ_300 is not set
191# CONFIG_HZ_1000 is not set
192CONFIG_HZ=100
193CONFIG_SCHED_HRTICK=y
194# CONFIG_KEXEC is not set
195CONFIG_HIGHMEM=y
196CONFIG_NUMA=y
197CONFIG_NODES_SHIFT=2
198# CONFIG_VMSPLIT_3_75G is not set
199# CONFIG_VMSPLIT_3_5G is not set
200CONFIG_VMSPLIT_3G=y
201# CONFIG_VMSPLIT_2_75G is not set
202# CONFIG_VMSPLIT_2_5G is not set
203# CONFIG_VMSPLIT_2_25G is not set
204# CONFIG_VMSPLIT_2G is not set
205# CONFIG_VMSPLIT_1G is not set
206CONFIG_PAGE_OFFSET=0xC0000000
207CONFIG_SELECT_MEMORY_MODEL=y
208CONFIG_DISCONTIGMEM_MANUAL=y
209CONFIG_DISCONTIGMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y
211CONFIG_NEED_MULTIPLE_NODES=y
212CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_COMPACTION is not set
215CONFIG_MIGRATION=y
216CONFIG_PHYS_ADDR_T_64BIT=y
217CONFIG_ZONE_DMA_FLAG=0
218CONFIG_BOUNCE=y
219CONFIG_VIRT_TO_BUS=y
220# CONFIG_KSM is not set
221CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
222# CONFIG_CMDLINE_BOOL is not set
223CONFIG_VMALLOC_RESERVE=0x1000000
224CONFIG_HARDWALL=y
225CONFIG_KERNEL_PL=1
226
227#
228# Bus options
229#
230CONFIG_PCI=y
231CONFIG_PCI_DOMAINS=y
232# CONFIG_NO_IOMEM is not set
233# CONFIG_NO_IOPORT is not set
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCI_STUB is not set
237# CONFIG_PCI_IOV is not set
238# CONFIG_HOTPLUG_PCI is not set
239
240#
241# Executable file formats
242#
243CONFIG_KCORE_ELF=y
244CONFIG_BINFMT_ELF=y
245# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 53# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
246# CONFIG_HAVE_AOUT is not set 54CONFIG_BINFMT_MISC=y
247# CONFIG_BINFMT_MISC is not set
248CONFIG_NET=y 55CONFIG_NET=y
249
250#
251# Networking options
252#
253CONFIG_PACKET=y 56CONFIG_PACKET=y
254CONFIG_UNIX=y 57CONFIG_UNIX=y
255CONFIG_XFRM=y 58CONFIG_XFRM_USER=y
256# CONFIG_XFRM_USER is not set 59CONFIG_XFRM_SUB_POLICY=y
257# CONFIG_XFRM_SUB_POLICY is not set 60CONFIG_XFRM_STATISTICS=y
258# CONFIG_XFRM_MIGRATE is not set 61CONFIG_NET_KEY=m
259# CONFIG_XFRM_STATISTICS is not set 62CONFIG_NET_KEY_MIGRATE=y
260# CONFIG_NET_KEY is not set
261CONFIG_INET=y 63CONFIG_INET=y
262CONFIG_IP_MULTICAST=y 64CONFIG_IP_MULTICAST=y
263# CONFIG_IP_ADVANCED_ROUTER is not set 65CONFIG_IP_ADVANCED_ROUTER=y
264# CONFIG_IP_PNP is not set 66CONFIG_IP_MULTIPLE_TABLES=y
265# CONFIG_NET_IPIP is not set 67CONFIG_IP_ROUTE_MULTIPATH=y
266# CONFIG_NET_IPGRE_DEMUX is not set 68CONFIG_IP_ROUTE_VERBOSE=y
267# CONFIG_IP_MROUTE is not set 69CONFIG_NET_IPIP=m
268# CONFIG_ARPD is not set 70CONFIG_IP_MROUTE=y
269# CONFIG_SYN_COOKIES is not set 71CONFIG_IP_PIMSM_V1=y
270# CONFIG_INET_AH is not set 72CONFIG_IP_PIMSM_V2=y
271# CONFIG_INET_ESP is not set 73CONFIG_SYN_COOKIES=y
272# CONFIG_INET_IPCOMP is not set 74CONFIG_INET_AH=m
273# CONFIG_INET_XFRM_TUNNEL is not set 75CONFIG_INET_ESP=m
274CONFIG_INET_TUNNEL=y 76CONFIG_INET_IPCOMP=m
275# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 77CONFIG_INET_XFRM_MODE_TRANSPORT=m
276# CONFIG_INET_XFRM_MODE_TUNNEL is not set 78CONFIG_INET_XFRM_MODE_TUNNEL=m
277CONFIG_INET_XFRM_MODE_BEET=y 79CONFIG_INET_XFRM_MODE_BEET=m
278# CONFIG_INET_LRO is not set 80CONFIG_INET_DIAG=m
279# CONFIG_INET_DIAG is not set 81CONFIG_TCP_CONG_ADVANCED=y
280# CONFIG_TCP_CONG_ADVANCED is not set 82CONFIG_TCP_CONG_HSTCP=m
281CONFIG_TCP_CONG_CUBIC=y 83CONFIG_TCP_CONG_HYBLA=m
282CONFIG_DEFAULT_TCP_CONG="cubic" 84CONFIG_TCP_CONG_SCALABLE=m
283# CONFIG_TCP_MD5SIG is not set 85CONFIG_TCP_CONG_LP=m
86CONFIG_TCP_CONG_VENO=m
87CONFIG_TCP_CONG_YEAH=m
88CONFIG_TCP_CONG_ILLINOIS=m
89CONFIG_TCP_MD5SIG=y
284CONFIG_IPV6=y 90CONFIG_IPV6=y
285# CONFIG_IPV6_PRIVACY is not set 91CONFIG_IPV6_PRIVACY=y
286# CONFIG_IPV6_ROUTER_PREF is not set 92CONFIG_IPV6_ROUTER_PREF=y
287# CONFIG_IPV6_OPTIMISTIC_DAD is not set 93CONFIG_IPV6_ROUTE_INFO=y
288# CONFIG_INET6_AH is not set 94CONFIG_IPV6_OPTIMISTIC_DAD=y
289# CONFIG_INET6_ESP is not set 95CONFIG_INET6_AH=m
290# CONFIG_INET6_IPCOMP is not set 96CONFIG_INET6_ESP=m
291# CONFIG_IPV6_MIP6 is not set 97CONFIG_INET6_IPCOMP=m
292# CONFIG_INET6_XFRM_TUNNEL is not set 98CONFIG_IPV6_MIP6=m
293# CONFIG_INET6_TUNNEL is not set 99CONFIG_INET6_XFRM_MODE_TRANSPORT=m
294CONFIG_INET6_XFRM_MODE_TRANSPORT=y 100CONFIG_INET6_XFRM_MODE_TUNNEL=m
295CONFIG_INET6_XFRM_MODE_TUNNEL=y 101CONFIG_INET6_XFRM_MODE_BEET=m
296CONFIG_INET6_XFRM_MODE_BEET=y 102CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
297# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 103CONFIG_IPV6_SIT=m
298CONFIG_IPV6_SIT=y 104CONFIG_IPV6_TUNNEL=m
299# CONFIG_IPV6_SIT_6RD is not set 105CONFIG_IPV6_MULTIPLE_TABLES=y
300CONFIG_IPV6_NDISC_NODETYPE=y 106CONFIG_IPV6_MROUTE=y
301# CONFIG_IPV6_TUNNEL is not set 107CONFIG_IPV6_PIMSM_V2=y
302# CONFIG_IPV6_MULTIPLE_TABLES is not set 108CONFIG_NETLABEL=y
303# CONFIG_IPV6_MROUTE is not set 109CONFIG_NETFILTER=y
304# CONFIG_NETWORK_SECMARK is not set 110CONFIG_NF_CONNTRACK=m
305# CONFIG_NETWORK_PHY_TIMESTAMPING is not set 111CONFIG_NF_CONNTRACK_SECMARK=y
306# CONFIG_NETFILTER is not set 112CONFIG_NF_CONNTRACK_ZONES=y
307# CONFIG_IP_DCCP is not set 113CONFIG_NF_CONNTRACK_EVENTS=y
308# CONFIG_IP_SCTP is not set 114CONFIG_NF_CT_PROTO_DCCP=m
309# CONFIG_RDS is not set 115CONFIG_NF_CT_PROTO_UDPLITE=m
310# CONFIG_TIPC is not set 116CONFIG_NF_CONNTRACK_AMANDA=m
311# CONFIG_ATM is not set 117CONFIG_NF_CONNTRACK_FTP=m
312# CONFIG_L2TP is not set 118CONFIG_NF_CONNTRACK_H323=m
313# CONFIG_BRIDGE is not set 119CONFIG_NF_CONNTRACK_IRC=m
314# CONFIG_NET_DSA is not set 120CONFIG_NF_CONNTRACK_NETBIOS_NS=m
315# CONFIG_VLAN_8021Q is not set 121CONFIG_NF_CONNTRACK_PPTP=m
316# CONFIG_DECNET is not set 122CONFIG_NF_CONNTRACK_SANE=m
317# CONFIG_LLC2 is not set 123CONFIG_NF_CONNTRACK_SIP=m
318# CONFIG_IPX is not set 124CONFIG_NF_CONNTRACK_TFTP=m
319# CONFIG_ATALK is not set 125CONFIG_NETFILTER_TPROXY=m
320# CONFIG_X25 is not set 126CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
321# CONFIG_LAPB is not set 127CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
322# CONFIG_ECONET is not set 128CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
323# CONFIG_WAN_ROUTER is not set 129CONFIG_NETFILTER_XT_TARGET_CT=m
324# CONFIG_PHONET is not set 130CONFIG_NETFILTER_XT_TARGET_DSCP=m
325# CONFIG_IEEE802154 is not set 131CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
326# CONFIG_NET_SCHED is not set 132CONFIG_NETFILTER_XT_TARGET_MARK=m
327# CONFIG_DCB is not set 133CONFIG_NETFILTER_XT_TARGET_NFLOG=m
328# CONFIG_BATMAN_ADV is not set 134CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
329CONFIG_RPS=y 135CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
330CONFIG_RFS_ACCEL=y 136CONFIG_NETFILTER_XT_TARGET_TEE=m
331CONFIG_XPS=y 137CONFIG_NETFILTER_XT_TARGET_TPROXY=m
332 138CONFIG_NETFILTER_XT_TARGET_TRACE=m
333# 139CONFIG_NETFILTER_XT_TARGET_SECMARK=m
334# Network testing 140CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
335# 141CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
336# CONFIG_NET_PKTGEN is not set 142CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
337# CONFIG_HAMRADIO is not set 143CONFIG_NETFILTER_XT_MATCH_COMMENT=m
338# CONFIG_CAN is not set 144CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
339# CONFIG_IRDA is not set 145CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
340# CONFIG_BT is not set 146CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
341# CONFIG_AF_RXRPC is not set 147CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
148CONFIG_NETFILTER_XT_MATCH_DCCP=m
149CONFIG_NETFILTER_XT_MATCH_DSCP=m
150CONFIG_NETFILTER_XT_MATCH_ESP=m
151CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
152CONFIG_NETFILTER_XT_MATCH_HELPER=m
153CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
154CONFIG_NETFILTER_XT_MATCH_IPVS=m
155CONFIG_NETFILTER_XT_MATCH_LENGTH=m
156CONFIG_NETFILTER_XT_MATCH_LIMIT=m
157CONFIG_NETFILTER_XT_MATCH_MAC=m
158CONFIG_NETFILTER_XT_MATCH_MARK=m
159CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
160CONFIG_NETFILTER_XT_MATCH_OSF=m
161CONFIG_NETFILTER_XT_MATCH_OWNER=m
162CONFIG_NETFILTER_XT_MATCH_POLICY=m
163CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
164CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
165CONFIG_NETFILTER_XT_MATCH_QUOTA=m
166CONFIG_NETFILTER_XT_MATCH_RATEEST=m
167CONFIG_NETFILTER_XT_MATCH_REALM=m
168CONFIG_NETFILTER_XT_MATCH_RECENT=m
169CONFIG_NETFILTER_XT_MATCH_SOCKET=m
170CONFIG_NETFILTER_XT_MATCH_STATE=m
171CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
172CONFIG_NETFILTER_XT_MATCH_STRING=m
173CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
174CONFIG_NETFILTER_XT_MATCH_TIME=m
175CONFIG_NETFILTER_XT_MATCH_U32=m
176CONFIG_IP_VS=m
177CONFIG_IP_VS_IPV6=y
178CONFIG_IP_VS_PROTO_TCP=y
179CONFIG_IP_VS_PROTO_UDP=y
180CONFIG_IP_VS_PROTO_ESP=y
181CONFIG_IP_VS_PROTO_AH=y
182CONFIG_IP_VS_PROTO_SCTP=y
183CONFIG_IP_VS_RR=m
184CONFIG_IP_VS_WRR=m
185CONFIG_IP_VS_LC=m
186CONFIG_IP_VS_WLC=m
187CONFIG_IP_VS_LBLC=m
188CONFIG_IP_VS_LBLCR=m
189CONFIG_IP_VS_SED=m
190CONFIG_IP_VS_NQ=m
191CONFIG_NF_CONNTRACK_IPV4=m
192# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
193CONFIG_IP_NF_QUEUE=m
194CONFIG_IP_NF_IPTABLES=y
195CONFIG_IP_NF_MATCH_AH=m
196CONFIG_IP_NF_MATCH_ECN=m
197CONFIG_IP_NF_MATCH_TTL=m
198CONFIG_IP_NF_FILTER=y
199CONFIG_IP_NF_TARGET_REJECT=y
200CONFIG_IP_NF_TARGET_LOG=m
201CONFIG_IP_NF_TARGET_ULOG=m
202CONFIG_IP_NF_MANGLE=m
203CONFIG_IP_NF_TARGET_ECN=m
204CONFIG_IP_NF_TARGET_TTL=m
205CONFIG_IP_NF_RAW=m
206CONFIG_IP_NF_SECURITY=m
207CONFIG_IP_NF_ARPTABLES=m
208CONFIG_IP_NF_ARPFILTER=m
209CONFIG_IP_NF_ARP_MANGLE=m
210CONFIG_NF_CONNTRACK_IPV6=m
211CONFIG_IP6_NF_QUEUE=m
212CONFIG_IP6_NF_IPTABLES=m
213CONFIG_IP6_NF_MATCH_AH=m
214CONFIG_IP6_NF_MATCH_EUI64=m
215CONFIG_IP6_NF_MATCH_FRAG=m
216CONFIG_IP6_NF_MATCH_OPTS=m
217CONFIG_IP6_NF_MATCH_HL=m
218CONFIG_IP6_NF_MATCH_IPV6HEADER=m
219CONFIG_IP6_NF_MATCH_MH=m
220CONFIG_IP6_NF_MATCH_RT=m
221CONFIG_IP6_NF_TARGET_HL=m
222CONFIG_IP6_NF_TARGET_LOG=m
223CONFIG_IP6_NF_FILTER=m
224CONFIG_IP6_NF_TARGET_REJECT=m
225CONFIG_IP6_NF_MANGLE=m
226CONFIG_IP6_NF_RAW=m
227CONFIG_IP6_NF_SECURITY=m
228CONFIG_BRIDGE_NF_EBTABLES=m
229CONFIG_BRIDGE_EBT_BROUTE=m
230CONFIG_BRIDGE_EBT_T_FILTER=m
231CONFIG_BRIDGE_EBT_T_NAT=m
232CONFIG_BRIDGE_EBT_802_3=m
233CONFIG_BRIDGE_EBT_AMONG=m
234CONFIG_BRIDGE_EBT_ARP=m
235CONFIG_BRIDGE_EBT_IP=m
236CONFIG_BRIDGE_EBT_IP6=m
237CONFIG_BRIDGE_EBT_LIMIT=m
238CONFIG_BRIDGE_EBT_MARK=m
239CONFIG_BRIDGE_EBT_PKTTYPE=m
240CONFIG_BRIDGE_EBT_STP=m
241CONFIG_BRIDGE_EBT_VLAN=m
242CONFIG_BRIDGE_EBT_ARPREPLY=m
243CONFIG_BRIDGE_EBT_DNAT=m
244CONFIG_BRIDGE_EBT_MARK_T=m
245CONFIG_BRIDGE_EBT_REDIRECT=m
246CONFIG_BRIDGE_EBT_SNAT=m
247CONFIG_BRIDGE_EBT_LOG=m
248CONFIG_BRIDGE_EBT_ULOG=m
249CONFIG_BRIDGE_EBT_NFLOG=m
250CONFIG_RDS=m
251CONFIG_RDS_TCP=m
252CONFIG_BRIDGE=m
253CONFIG_NET_DSA=y
254CONFIG_VLAN_8021Q=m
255CONFIG_VLAN_8021Q_GVRP=y
256CONFIG_PHONET=m
257CONFIG_NET_SCHED=y
258CONFIG_NET_SCH_CBQ=m
259CONFIG_NET_SCH_HTB=m
260CONFIG_NET_SCH_HFSC=m
261CONFIG_NET_SCH_PRIO=m
262CONFIG_NET_SCH_MULTIQ=m
263CONFIG_NET_SCH_RED=m
264CONFIG_NET_SCH_SFQ=m
265CONFIG_NET_SCH_TEQL=m
266CONFIG_NET_SCH_TBF=m
267CONFIG_NET_SCH_GRED=m
268CONFIG_NET_SCH_DSMARK=m
269CONFIG_NET_SCH_NETEM=m
270CONFIG_NET_SCH_DRR=m
271CONFIG_NET_SCH_INGRESS=m
272CONFIG_NET_CLS_BASIC=m
273CONFIG_NET_CLS_TCINDEX=m
274CONFIG_NET_CLS_ROUTE4=m
275CONFIG_NET_CLS_FW=m
276CONFIG_NET_CLS_U32=m
277CONFIG_CLS_U32_PERF=y
278CONFIG_CLS_U32_MARK=y
279CONFIG_NET_CLS_RSVP=m
280CONFIG_NET_CLS_RSVP6=m
281CONFIG_NET_CLS_FLOW=m
282CONFIG_NET_CLS_CGROUP=y
283CONFIG_NET_EMATCH=y
284CONFIG_NET_EMATCH_CMP=m
285CONFIG_NET_EMATCH_NBYTE=m
286CONFIG_NET_EMATCH_U32=m
287CONFIG_NET_EMATCH_META=m
288CONFIG_NET_EMATCH_TEXT=m
289CONFIG_NET_CLS_ACT=y
290CONFIG_NET_ACT_POLICE=m
291CONFIG_NET_ACT_GACT=m
292CONFIG_GACT_PROB=y
293CONFIG_NET_ACT_MIRRED=m
294CONFIG_NET_ACT_IPT=m
295CONFIG_NET_ACT_NAT=m
296CONFIG_NET_ACT_PEDIT=m
297CONFIG_NET_ACT_SIMP=m
298CONFIG_NET_ACT_SKBEDIT=m
299CONFIG_NET_CLS_IND=y
300CONFIG_DCB=y
342# CONFIG_WIRELESS is not set 301# CONFIG_WIRELESS is not set
343# CONFIG_WIMAX is not set
344# CONFIG_RFKILL is not set
345# CONFIG_NET_9P is not set
346# CONFIG_CAIF is not set
347# CONFIG_CEPH_LIB is not set
348
349#
350# Device Drivers
351#
352
353#
354# Generic Driver Options
355#
356CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 302CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
357# CONFIG_DEVTMPFS is not set 303CONFIG_DEVTMPFS=y
358CONFIG_STANDALONE=y 304CONFIG_DEVTMPFS_MOUNT=y
359CONFIG_PREVENT_FIRMWARE_BUILD=y 305# CONFIG_FIRMWARE_IN_KERNEL is not set
360CONFIG_FW_LOADER=y 306CONFIG_CONNECTOR=y
361CONFIG_FIRMWARE_IN_KERNEL=y 307CONFIG_BLK_DEV_LOOP=y
362CONFIG_EXTRA_FIRMWARE="" 308CONFIG_BLK_DEV_CRYPTOLOOP=m
363# CONFIG_DEBUG_DRIVER is not set 309CONFIG_BLK_DEV_SX8=m
364# CONFIG_DEBUG_DEVRES is not set 310CONFIG_BLK_DEV_RAM=y
365# CONFIG_SYS_HYPERVISOR is not set 311CONFIG_BLK_DEV_RAM_SIZE=16384
366# CONFIG_CONNECTOR is not set 312CONFIG_ATA_OVER_ETH=m
367# CONFIG_MTD is not set 313CONFIG_RAID_ATTRS=m
368# CONFIG_PARPORT is not set 314CONFIG_SCSI_TGT=m
369CONFIG_BLK_DEV=y
370# CONFIG_BLK_CPQ_DA is not set
371# CONFIG_BLK_CPQ_CISS_DA is not set
372# CONFIG_BLK_DEV_DAC960 is not set
373# CONFIG_BLK_DEV_UMEM is not set
374# CONFIG_BLK_DEV_COW_COMMON is not set
375# CONFIG_BLK_DEV_LOOP is not set
376
377#
378# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
379#
380# CONFIG_BLK_DEV_NBD is not set
381# CONFIG_BLK_DEV_SX8 is not set
382# CONFIG_BLK_DEV_RAM is not set
383# CONFIG_CDROM_PKTCDVD is not set
384# CONFIG_ATA_OVER_ETH is not set
385# CONFIG_BLK_DEV_RBD is not set
386# CONFIG_SENSORS_LIS3LV02D is not set
387CONFIG_MISC_DEVICES=y
388# CONFIG_PHANTOM is not set
389# CONFIG_SGI_IOC4 is not set
390# CONFIG_TIFM_CORE is not set
391# CONFIG_ENCLOSURE_SERVICES is not set
392# CONFIG_HP_ILO is not set
393# CONFIG_PCH_PHUB is not set
394# CONFIG_C2PORT is not set
395
396#
397# EEPROM support
398#
399# CONFIG_EEPROM_93CX6 is not set
400# CONFIG_CB710_CORE is not set
401
402#
403# Texas Instruments shared transport line discipline
404#
405
406#
407# SCSI device support
408#
409CONFIG_SCSI_MOD=y
410# CONFIG_RAID_ATTRS is not set
411CONFIG_SCSI=y
412CONFIG_SCSI_DMA=y
413# CONFIG_SCSI_TGT is not set
414# CONFIG_SCSI_NETLINK is not set
415CONFIG_SCSI_PROC_FS=y
416
417#
418# SCSI support type (disk, tape, CD-ROM)
419#
420CONFIG_BLK_DEV_SD=y 315CONFIG_BLK_DEV_SD=y
421# CONFIG_CHR_DEV_ST is not set
422# CONFIG_CHR_DEV_OSST is not set
423# CONFIG_BLK_DEV_SR is not set
424# CONFIG_CHR_DEV_SG is not set
425# CONFIG_CHR_DEV_SCH is not set
426# CONFIG_SCSI_MULTI_LUN is not set
427CONFIG_SCSI_CONSTANTS=y 316CONFIG_SCSI_CONSTANTS=y
428CONFIG_SCSI_LOGGING=y 317CONFIG_SCSI_LOGGING=y
429# CONFIG_SCSI_SCAN_ASYNC is not set 318CONFIG_ATA=y
430CONFIG_SCSI_WAIT_SCAN=m 319CONFIG_SATA_SIL24=y
431 320# CONFIG_ATA_SFF is not set
432# 321CONFIG_MD=y
433# SCSI Transports 322CONFIG_BLK_DEV_MD=y
434# 323CONFIG_MD_LINEAR=m
435# CONFIG_SCSI_SPI_ATTRS is not set 324CONFIG_MD_RAID0=m
436# CONFIG_SCSI_FC_ATTRS is not set 325CONFIG_MD_RAID1=m
437# CONFIG_SCSI_ISCSI_ATTRS is not set 326CONFIG_MD_RAID10=m
438# CONFIG_SCSI_SAS_ATTRS is not set 327CONFIG_MD_RAID456=m
439# CONFIG_SCSI_SAS_LIBSAS is not set 328CONFIG_MULTICORE_RAID456=y
440# CONFIG_SCSI_SRP_ATTRS is not set 329CONFIG_MD_FAULTY=m
441CONFIG_SCSI_LOWLEVEL=y 330CONFIG_BLK_DEV_DM=m
442# CONFIG_ISCSI_TCP is not set 331CONFIG_DM_DEBUG=y
443# CONFIG_ISCSI_BOOT_SYSFS is not set 332CONFIG_DM_CRYPT=m
444# CONFIG_SCSI_CXGB3_ISCSI is not set 333CONFIG_DM_SNAPSHOT=m
445# CONFIG_SCSI_CXGB4_ISCSI is not set 334CONFIG_DM_MIRROR=m
446# CONFIG_SCSI_BNX2_ISCSI is not set 335CONFIG_DM_LOG_USERSPACE=m
447# CONFIG_SCSI_BNX2X_FCOE is not set 336CONFIG_DM_ZERO=m
448# CONFIG_BE2ISCSI is not set 337CONFIG_DM_MULTIPATH=m
449# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 338CONFIG_DM_MULTIPATH_QL=m
450# CONFIG_SCSI_HPSA is not set 339CONFIG_DM_MULTIPATH_ST=m
451# CONFIG_SCSI_3W_9XXX is not set 340CONFIG_DM_DELAY=m
452# CONFIG_SCSI_3W_SAS is not set 341CONFIG_DM_UEVENT=y
453# CONFIG_SCSI_ACARD is not set 342CONFIG_FUSION=y
454# CONFIG_SCSI_AACRAID is not set 343CONFIG_FUSION_SAS=y
455# CONFIG_SCSI_AIC7XXX is not set
456# CONFIG_SCSI_AIC7XXX_OLD is not set
457# CONFIG_SCSI_AIC79XX is not set
458# CONFIG_SCSI_AIC94XX is not set
459# CONFIG_SCSI_MVSAS is not set
460# CONFIG_SCSI_DPT_I2O is not set
461# CONFIG_SCSI_ADVANSYS is not set
462# CONFIG_SCSI_ARCMSR is not set
463# CONFIG_MEGARAID_NEWGEN is not set
464# CONFIG_MEGARAID_LEGACY is not set
465# CONFIG_MEGARAID_SAS is not set
466# CONFIG_SCSI_MPT2SAS is not set
467# CONFIG_SCSI_HPTIOP is not set
468# CONFIG_LIBFC is not set
469# CONFIG_LIBFCOE is not set
470# CONFIG_FCOE is not set
471# CONFIG_SCSI_DMX3191D is not set
472# CONFIG_SCSI_FUTURE_DOMAIN is not set
473# CONFIG_SCSI_IPS is not set
474# CONFIG_SCSI_INITIO is not set
475# CONFIG_SCSI_INIA100 is not set
476# CONFIG_SCSI_STEX is not set
477# CONFIG_SCSI_SYM53C8XX_2 is not set
478# CONFIG_SCSI_QLOGIC_1280 is not set
479# CONFIG_SCSI_QLA_FC is not set
480# CONFIG_SCSI_QLA_ISCSI is not set
481# CONFIG_SCSI_LPFC is not set
482# CONFIG_SCSI_DC395x is not set
483# CONFIG_SCSI_DC390T is not set
484# CONFIG_SCSI_NSP32 is not set
485# CONFIG_SCSI_DEBUG is not set
486# CONFIG_SCSI_PMCRAID is not set
487# CONFIG_SCSI_PM8001 is not set
488# CONFIG_SCSI_SRP is not set
489# CONFIG_SCSI_BFA_FC is not set
490# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
491# CONFIG_SCSI_DH is not set
492# CONFIG_SCSI_OSD_INITIATOR is not set
493# CONFIG_ATA is not set
494# CONFIG_MD is not set
495# CONFIG_TARGET_CORE is not set
496# CONFIG_FUSION is not set
497
498#
499# IEEE 1394 (FireWire) support
500#
501# CONFIG_FIREWIRE is not set
502# CONFIG_FIREWIRE_NOSY is not set
503# CONFIG_I2O is not set
504CONFIG_NETDEVICES=y 344CONFIG_NETDEVICES=y
505# CONFIG_DUMMY is not set 345CONFIG_BONDING=m
506# CONFIG_BONDING is not set 346CONFIG_DUMMY=m
507# CONFIG_MACVLAN is not set 347CONFIG_IFB=m
508# CONFIG_EQUALIZER is not set 348CONFIG_MACVLAN=m
349CONFIG_MACVTAP=m
350CONFIG_NETCONSOLE=m
351CONFIG_NETCONSOLE_DYNAMIC=y
352CONFIG_NETPOLL_TRAP=y
509CONFIG_TUN=y 353CONFIG_TUN=y
510# CONFIG_VETH is not set 354CONFIG_VETH=m
511# CONFIG_ARCNET is not set 355CONFIG_NET_DSA_MV88E6060=y
512# CONFIG_MII is not set 356CONFIG_NET_DSA_MV88E6131=y
513# CONFIG_PHYLIB is not set 357CONFIG_NET_DSA_MV88E6123_61_65=y
514# CONFIG_NET_ETHERNET is not set 358# CONFIG_NET_VENDOR_3COM is not set
515CONFIG_NETDEV_1000=y 359# CONFIG_NET_VENDOR_ADAPTEC is not set
516# CONFIG_ACENIC is not set 360# CONFIG_NET_VENDOR_ALTEON is not set
517# CONFIG_DL2K is not set 361# CONFIG_NET_VENDOR_AMD is not set
518# CONFIG_E1000 is not set 362# CONFIG_NET_VENDOR_ATHEROS is not set
519# CONFIG_E1000E is not set 363# CONFIG_NET_VENDOR_BROADCOM is not set
520# CONFIG_IP1000 is not set 364# CONFIG_NET_VENDOR_BROCADE is not set
521# CONFIG_IGB is not set 365# CONFIG_NET_VENDOR_CHELSIO is not set
522# CONFIG_IGBVF is not set 366# CONFIG_NET_VENDOR_CISCO is not set
523# CONFIG_NS83820 is not set 367# CONFIG_NET_VENDOR_DEC is not set
524# CONFIG_HAMACHI is not set 368# CONFIG_NET_VENDOR_DLINK is not set
525# CONFIG_YELLOWFIN is not set 369# CONFIG_NET_VENDOR_EMULEX is not set
526# CONFIG_R8169 is not set 370# CONFIG_NET_VENDOR_EXAR is not set
527# CONFIG_SIS190 is not set 371# CONFIG_NET_VENDOR_HP is not set
528# CONFIG_SKGE is not set 372# CONFIG_NET_VENDOR_INTEL is not set
529# CONFIG_SKY2 is not set 373# CONFIG_NET_VENDOR_MARVELL is not set
530# CONFIG_VIA_VELOCITY is not set 374# CONFIG_NET_VENDOR_MELLANOX is not set
531# CONFIG_TIGON3 is not set 375# CONFIG_NET_VENDOR_MICREL is not set
532# CONFIG_BNX2 is not set 376# CONFIG_NET_VENDOR_MYRI is not set
533# CONFIG_CNIC is not set 377# CONFIG_NET_VENDOR_NATSEMI is not set
534# CONFIG_QLA3XXX is not set 378# CONFIG_NET_VENDOR_NVIDIA is not set
535# CONFIG_ATL1 is not set 379# CONFIG_NET_VENDOR_OKI is not set
536# CONFIG_ATL1E is not set 380# CONFIG_NET_PACKET_ENGINE is not set
537# CONFIG_ATL1C is not set 381# CONFIG_NET_VENDOR_QLOGIC is not set
538# CONFIG_JME is not set 382# CONFIG_NET_VENDOR_REALTEK is not set
539# CONFIG_STMMAC_ETH is not set 383# CONFIG_NET_VENDOR_RDC is not set
540# CONFIG_PCH_GBE is not set 384# CONFIG_NET_VENDOR_SEEQ is not set
541# CONFIG_NETDEV_10000 is not set 385# CONFIG_NET_VENDOR_SILAN is not set
542# CONFIG_TR is not set 386# CONFIG_NET_VENDOR_SIS is not set
387# CONFIG_NET_VENDOR_SMSC is not set
388# CONFIG_NET_VENDOR_STMICRO is not set
389# CONFIG_NET_VENDOR_SUN is not set
390# CONFIG_NET_VENDOR_TEHUTI is not set
391# CONFIG_NET_VENDOR_TI is not set
392# CONFIG_NET_VENDOR_VIA is not set
543# CONFIG_WLAN is not set 393# CONFIG_WLAN is not set
544
545#
546# Enable WiMAX (Networking options) to see the WiMAX drivers
547#
548# CONFIG_WAN is not set
549
550#
551# CAIF transport drivers
552#
553CONFIG_TILE_NET=y
554# CONFIG_FDDI is not set
555# CONFIG_HIPPI is not set
556# CONFIG_PPP is not set
557# CONFIG_SLIP is not set
558# CONFIG_NET_FC is not set
559# CONFIG_NETCONSOLE is not set
560# CONFIG_NETPOLL is not set
561# CONFIG_NET_POLL_CONTROLLER is not set
562# CONFIG_VMXNET3 is not set
563# CONFIG_ISDN is not set
564# CONFIG_PHONE is not set
565
566#
567# Input device support
568#
569CONFIG_INPUT=y
570# CONFIG_INPUT_FF_MEMLESS is not set
571# CONFIG_INPUT_POLLDEV is not set
572# CONFIG_INPUT_SPARSEKMAP is not set
573
574#
575# Userland interfaces
576#
577# CONFIG_INPUT_MOUSEDEV is not set 394# CONFIG_INPUT_MOUSEDEV is not set
578# CONFIG_INPUT_JOYDEV is not set
579# CONFIG_INPUT_EVDEV is not set
580# CONFIG_INPUT_EVBUG is not set
581
582#
583# Input Device Drivers
584#
585# CONFIG_INPUT_KEYBOARD is not set 395# CONFIG_INPUT_KEYBOARD is not set
586# CONFIG_INPUT_MOUSE is not set 396# CONFIG_INPUT_MOUSE is not set
587# CONFIG_INPUT_JOYSTICK is not set
588# CONFIG_INPUT_TABLET is not set
589# CONFIG_INPUT_TOUCHSCREEN is not set
590# CONFIG_INPUT_MISC is not set
591
592#
593# Hardware I/O ports
594#
595# CONFIG_SERIO is not set 397# CONFIG_SERIO is not set
596# CONFIG_GAMEPORT is not set
597
598#
599# Character devices
600#
601# CONFIG_VT is not set 398# CONFIG_VT is not set
602CONFIG_UNIX98_PTYS=y
603# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
604# CONFIG_LEGACY_PTYS is not set 399# CONFIG_LEGACY_PTYS is not set
605# CONFIG_SERIAL_NONSTANDARD is not set 400CONFIG_HW_RANDOM=y
606# CONFIG_NOZOMI is not set 401CONFIG_HW_RANDOM_TIMERIOMEM=m
607# CONFIG_N_GSM is not set 402CONFIG_I2C=y
608CONFIG_DEVKMEM=y 403CONFIG_I2C_CHARDEV=y
609 404# CONFIG_HWMON is not set
610#
611# Serial drivers
612#
613# CONFIG_SERIAL_8250 is not set
614
615#
616# Non-8250 serial port support
617#
618# CONFIG_SERIAL_MFD_HSU is not set
619# CONFIG_SERIAL_JSM is not set
620# CONFIG_SERIAL_TIMBERDALE is not set
621# CONFIG_SERIAL_ALTERA_JTAGUART is not set
622# CONFIG_SERIAL_ALTERA_UART is not set
623# CONFIG_SERIAL_PCH_UART is not set
624# CONFIG_TTY_PRINTK is not set
625CONFIG_HVC_DRIVER=y
626# CONFIG_IPMI_HANDLER is not set
627# CONFIG_HW_RANDOM is not set
628# CONFIG_R3964 is not set
629# CONFIG_APPLICOM is not set
630
631#
632# PCMCIA character devices
633#
634# CONFIG_RAW_DRIVER is not set
635# CONFIG_TCG_TPM is not set
636CONFIG_DEVPORT=y
637# CONFIG_RAMOOPS is not set
638# CONFIG_I2C is not set
639# CONFIG_SPI is not set
640
641#
642# PPS support
643#
644# CONFIG_PPS is not set
645
646#
647# PPS generators support
648#
649# CONFIG_W1 is not set
650# CONFIG_POWER_SUPPLY is not set
651CONFIG_HWMON=y
652# CONFIG_HWMON_VID is not set
653# CONFIG_HWMON_DEBUG_CHIP is not set
654
655#
656# Native drivers
657#
658# CONFIG_SENSORS_I5K_AMB is not set
659# CONFIG_SENSORS_F71805F is not set
660# CONFIG_SENSORS_F71882FG is not set
661# CONFIG_SENSORS_IT87 is not set
662# CONFIG_SENSORS_PC87360 is not set
663# CONFIG_SENSORS_PC87427 is not set
664# CONFIG_SENSORS_SIS5595 is not set
665# CONFIG_SENSORS_SMSC47M1 is not set
666# CONFIG_SENSORS_SMSC47B397 is not set
667# CONFIG_SENSORS_SCH5627 is not set
668# CONFIG_SENSORS_VIA686A is not set
669# CONFIG_SENSORS_VT1211 is not set
670# CONFIG_SENSORS_VT8231 is not set
671# CONFIG_SENSORS_W83627HF is not set
672# CONFIG_SENSORS_W83627EHF is not set
673# CONFIG_THERMAL is not set
674CONFIG_WATCHDOG=y 405CONFIG_WATCHDOG=y
675CONFIG_WATCHDOG_NOWAYOUT=y 406CONFIG_WATCHDOG_NOWAYOUT=y
676 407# CONFIG_VGA_ARB is not set
677#
678# Watchdog Device Drivers
679#
680# CONFIG_SOFT_WATCHDOG is not set
681# CONFIG_ALIM7101_WDT is not set
682
683#
684# PCI-based Watchdog Cards
685#
686# CONFIG_PCIPCWATCHDOG is not set
687# CONFIG_WDTPCI is not set
688CONFIG_SSB_POSSIBLE=y
689
690#
691# Sonics Silicon Backplane
692#
693# CONFIG_SSB is not set
694CONFIG_MFD_SUPPORT=y
695# CONFIG_MFD_CORE is not set
696# CONFIG_MFD_SM501 is not set
697# CONFIG_HTC_PASIC3 is not set
698# CONFIG_MFD_TMIO is not set
699# CONFIG_ABX500_CORE is not set
700# CONFIG_LPC_SCH is not set
701# CONFIG_MFD_RDC321X is not set
702# CONFIG_MFD_JANZ_CMODIO is not set
703# CONFIG_MFD_VX855 is not set
704# CONFIG_REGULATOR is not set
705# CONFIG_MEDIA_SUPPORT is not set
706
707#
708# Graphics support
709#
710CONFIG_VGA_ARB=y
711CONFIG_VGA_ARB_MAX_GPUS=16
712# CONFIG_DRM is not set
713# CONFIG_STUB_POULSBO is not set
714# CONFIG_VGASTATE is not set
715# CONFIG_VIDEO_OUTPUT_CONTROL is not set
716# CONFIG_FB is not set
717# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
718
719#
720# Display device support
721#
722# CONFIG_DISPLAY_SUPPORT is not set
723# CONFIG_SOUND is not set
724# CONFIG_HID_SUPPORT is not set 408# CONFIG_HID_SUPPORT is not set
725CONFIG_USB_SUPPORT=y 409# CONFIG_USB_SUPPORT is not set
726CONFIG_USB_ARCH_HAS_HCD=y
727CONFIG_USB_ARCH_HAS_OHCI=y
728CONFIG_USB_ARCH_HAS_EHCI=y
729# CONFIG_USB is not set
730# CONFIG_USB_OTG_WHITELIST is not set
731# CONFIG_USB_OTG_BLACKLIST_HUB is not set
732
733#
734# Enable Host or Gadget support to see Inventra options
735#
736
737#
738# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
739#
740# CONFIG_USB_GADGET is not set
741
742#
743# OTG and related infrastructure
744#
745# CONFIG_UWB is not set
746# CONFIG_MMC is not set
747# CONFIG_MEMSTICK is not set
748# CONFIG_NEW_LEDS is not set
749# CONFIG_NFC_DEVICES is not set
750# CONFIG_ACCESSIBILITY is not set
751# CONFIG_INFINIBAND is not set
752CONFIG_EDAC=y 410CONFIG_EDAC=y
753
754#
755# Reporting subsystems
756#
757# CONFIG_EDAC_DEBUG is not set
758CONFIG_EDAC_MM_EDAC=y 411CONFIG_EDAC_MM_EDAC=y
759CONFIG_EDAC_TILE=y
760CONFIG_RTC_LIB=y
761CONFIG_RTC_CLASS=y 412CONFIG_RTC_CLASS=y
762CONFIG_RTC_HCTOSYS=y
763CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
764# CONFIG_RTC_DEBUG is not set
765
766#
767# RTC interfaces
768#
769# CONFIG_RTC_INTF_SYSFS is not set
770# CONFIG_RTC_INTF_PROC is not set
771CONFIG_RTC_INTF_DEV=y
772# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
773# CONFIG_RTC_DRV_TEST is not set
774
775#
776# SPI RTC drivers
777#
778
779#
780# Platform RTC drivers
781#
782# CONFIG_RTC_DRV_DS1286 is not set
783# CONFIG_RTC_DRV_DS1511 is not set
784# CONFIG_RTC_DRV_DS1553 is not set
785# CONFIG_RTC_DRV_DS1742 is not set
786# CONFIG_RTC_DRV_STK17TA8 is not set
787# CONFIG_RTC_DRV_M48T86 is not set
788# CONFIG_RTC_DRV_M48T35 is not set
789# CONFIG_RTC_DRV_M48T59 is not set
790# CONFIG_RTC_DRV_MSM6242 is not set
791# CONFIG_RTC_DRV_BQ4802 is not set
792# CONFIG_RTC_DRV_RP5C01 is not set
793# CONFIG_RTC_DRV_V3020 is not set
794
795#
796# on-CPU RTC drivers
797#
798CONFIG_RTC_DRV_TILE=y 413CONFIG_RTC_DRV_TILE=y
799# CONFIG_DMADEVICES is not set
800# CONFIG_AUXDISPLAY is not set
801# CONFIG_UIO is not set
802# CONFIG_STAGING is not set
803
804#
805# File systems
806#
807CONFIG_EXT2_FS=y 414CONFIG_EXT2_FS=y
808# CONFIG_EXT2_FS_XATTR is not set 415CONFIG_EXT2_FS_XATTR=y
809# CONFIG_EXT2_FS_XIP is not set 416CONFIG_EXT2_FS_POSIX_ACL=y
417CONFIG_EXT2_FS_SECURITY=y
418CONFIG_EXT2_FS_XIP=y
810CONFIG_EXT3_FS=y 419CONFIG_EXT3_FS=y
811# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 420CONFIG_EXT3_FS_POSIX_ACL=y
812CONFIG_EXT3_FS_XATTR=y 421CONFIG_EXT3_FS_SECURITY=y
813# CONFIG_EXT3_FS_POSIX_ACL is not set 422CONFIG_EXT4_FS=y
814# CONFIG_EXT3_FS_SECURITY is not set 423CONFIG_EXT4_FS_POSIX_ACL=y
815# CONFIG_EXT4_FS is not set 424CONFIG_EXT4_FS_SECURITY=y
816CONFIG_JBD=y 425CONFIG_XFS_FS=y
817CONFIG_FS_MBCACHE=y 426CONFIG_XFS_QUOTA=y
818# CONFIG_REISERFS_FS is not set 427CONFIG_XFS_POSIX_ACL=y
819# CONFIG_JFS_FS is not set 428CONFIG_GFS2_FS=m
820# CONFIG_XFS_FS is not set 429CONFIG_GFS2_FS_LOCKING_DLM=y
821# CONFIG_GFS2_FS is not set 430CONFIG_BTRFS_FS=m
822# CONFIG_BTRFS_FS is not set 431CONFIG_BTRFS_FS_POSIX_ACL=y
823# CONFIG_NILFS2_FS is not set 432CONFIG_QUOTA=y
824# CONFIG_FS_POSIX_ACL is not set 433CONFIG_QUOTA_NETLINK_INTERFACE=y
825CONFIG_EXPORTFS=y 434# CONFIG_PRINT_QUOTA_WARNING is not set
826CONFIG_FILE_LOCKING=y 435CONFIG_QFMT_V2=y
827CONFIG_FSNOTIFY=y 436CONFIG_AUTOFS4_FS=m
828CONFIG_DNOTIFY=y
829CONFIG_INOTIFY_USER=y
830# CONFIG_FANOTIFY is not set
831# CONFIG_QUOTA is not set
832# CONFIG_QUOTACTL is not set
833# CONFIG_AUTOFS4_FS is not set
834CONFIG_FUSE_FS=y 437CONFIG_FUSE_FS=y
835# CONFIG_CUSE is not set 438CONFIG_CUSE=m
836 439CONFIG_FSCACHE=m
837# 440CONFIG_FSCACHE_STATS=y
838# Caches 441CONFIG_CACHEFILES=m
839# 442CONFIG_ISO9660_FS=m
840# CONFIG_FSCACHE is not set 443CONFIG_JOLIET=y
841 444CONFIG_ZISOFS=y
842# 445CONFIG_UDF_FS=m
843# CD-ROM/DVD Filesystems 446CONFIG_MSDOS_FS=m
844#
845# CONFIG_ISO9660_FS is not set
846# CONFIG_UDF_FS is not set
847
848#
849# DOS/FAT/NT Filesystems
850#
851CONFIG_FAT_FS=y
852CONFIG_MSDOS_FS=y
853CONFIG_VFAT_FS=m 447CONFIG_VFAT_FS=m
854CONFIG_FAT_DEFAULT_CODEPAGE=437 448CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
855CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 449CONFIG_PROC_KCORE=y
856# CONFIG_NTFS_FS is not set
857
858#
859# Pseudo filesystems
860#
861CONFIG_PROC_FS=y
862# CONFIG_PROC_KCORE is not set
863CONFIG_PROC_SYSCTL=y
864CONFIG_PROC_PAGE_MONITOR=y
865CONFIG_SYSFS=y
866CONFIG_TMPFS=y 450CONFIG_TMPFS=y
867# CONFIG_TMPFS_POSIX_ACL is not set 451CONFIG_TMPFS_POSIX_ACL=y
868CONFIG_HUGETLBFS=y 452CONFIG_HUGETLBFS=y
869CONFIG_HUGETLB_PAGE=y 453CONFIG_ECRYPT_FS=m
870# CONFIG_CONFIGFS_FS is not set 454CONFIG_CRAMFS=m
871CONFIG_MISC_FILESYSTEMS=y 455CONFIG_SQUASHFS=m
872# CONFIG_ADFS_FS is not set
873# CONFIG_AFFS_FS is not set
874# CONFIG_HFS_FS is not set
875# CONFIG_HFSPLUS_FS is not set
876# CONFIG_BEFS_FS is not set
877# CONFIG_BFS_FS is not set
878# CONFIG_EFS_FS is not set
879# CONFIG_LOGFS is not set
880# CONFIG_CRAMFS is not set
881# CONFIG_SQUASHFS is not set
882# CONFIG_VXFS_FS is not set
883# CONFIG_MINIX_FS is not set
884# CONFIG_OMFS_FS is not set
885# CONFIG_HPFS_FS is not set
886# CONFIG_QNX4FS_FS is not set
887# CONFIG_ROMFS_FS is not set
888# CONFIG_PSTORE is not set
889# CONFIG_SYSV_FS is not set
890# CONFIG_UFS_FS is not set
891CONFIG_NETWORK_FILESYSTEMS=y
892CONFIG_NFS_FS=m 456CONFIG_NFS_FS=m
893CONFIG_NFS_V3=y 457CONFIG_NFS_V3=y
894# CONFIG_NFS_V3_ACL is not set 458CONFIG_NFS_V3_ACL=y
895# CONFIG_NFS_V4 is not set 459CONFIG_NFS_V4=y
896# CONFIG_NFSD is not set 460CONFIG_NFS_V4_1=y
897CONFIG_LOCKD=m 461CONFIG_NFS_FSCACHE=y
898CONFIG_LOCKD_V4=y 462CONFIG_NFSD=m
899CONFIG_NFS_COMMON=y 463CONFIG_NFSD_V3_ACL=y
900CONFIG_SUNRPC=m 464CONFIG_NFSD_V4=y
901# CONFIG_RPCSEC_GSS_KRB5 is not set 465CONFIG_CIFS=m
902# CONFIG_CEPH_FS is not set 466CONFIG_CIFS_STATS=y
903# CONFIG_CIFS is not set 467CONFIG_CIFS_WEAK_PW_HASH=y
904# CONFIG_NCP_FS is not set 468CONFIG_CIFS_UPCALL=y
905# CONFIG_CODA_FS is not set 469CONFIG_CIFS_XATTR=y
906# CONFIG_AFS_FS is not set 470CONFIG_CIFS_POSIX=y
907 471CONFIG_CIFS_DFS_UPCALL=y
908# 472CONFIG_CIFS_FSCACHE=y
909# Partition Types
910#
911# CONFIG_PARTITION_ADVANCED is not set
912CONFIG_MSDOS_PARTITION=y
913CONFIG_NLS=y 473CONFIG_NLS=y
914CONFIG_NLS_DEFAULT="iso8859-1" 474CONFIG_NLS_DEFAULT="utf8"
915CONFIG_NLS_CODEPAGE_437=y 475CONFIG_NLS_CODEPAGE_437=y
916# CONFIG_NLS_CODEPAGE_737 is not set 476CONFIG_NLS_CODEPAGE_737=m
917# CONFIG_NLS_CODEPAGE_775 is not set 477CONFIG_NLS_CODEPAGE_775=m
918# CONFIG_NLS_CODEPAGE_850 is not set 478CONFIG_NLS_CODEPAGE_850=m
919# CONFIG_NLS_CODEPAGE_852 is not set 479CONFIG_NLS_CODEPAGE_852=m
920# CONFIG_NLS_CODEPAGE_855 is not set 480CONFIG_NLS_CODEPAGE_855=m
921# CONFIG_NLS_CODEPAGE_857 is not set 481CONFIG_NLS_CODEPAGE_857=m
922# CONFIG_NLS_CODEPAGE_860 is not set 482CONFIG_NLS_CODEPAGE_860=m
923# CONFIG_NLS_CODEPAGE_861 is not set 483CONFIG_NLS_CODEPAGE_861=m
924# CONFIG_NLS_CODEPAGE_862 is not set 484CONFIG_NLS_CODEPAGE_862=m
925# CONFIG_NLS_CODEPAGE_863 is not set 485CONFIG_NLS_CODEPAGE_863=m
926# CONFIG_NLS_CODEPAGE_864 is not set 486CONFIG_NLS_CODEPAGE_864=m
927# CONFIG_NLS_CODEPAGE_865 is not set 487CONFIG_NLS_CODEPAGE_865=m
928# CONFIG_NLS_CODEPAGE_866 is not set 488CONFIG_NLS_CODEPAGE_866=m
929# CONFIG_NLS_CODEPAGE_869 is not set 489CONFIG_NLS_CODEPAGE_869=m
930# CONFIG_NLS_CODEPAGE_936 is not set 490CONFIG_NLS_CODEPAGE_936=m
931# CONFIG_NLS_CODEPAGE_950 is not set 491CONFIG_NLS_CODEPAGE_950=m
932# CONFIG_NLS_CODEPAGE_932 is not set 492CONFIG_NLS_CODEPAGE_932=m
933# CONFIG_NLS_CODEPAGE_949 is not set 493CONFIG_NLS_CODEPAGE_949=m
934# CONFIG_NLS_CODEPAGE_874 is not set 494CONFIG_NLS_CODEPAGE_874=m
935# CONFIG_NLS_ISO8859_8 is not set 495CONFIG_NLS_ISO8859_8=m
936# CONFIG_NLS_CODEPAGE_1250 is not set 496CONFIG_NLS_CODEPAGE_1250=m
937# CONFIG_NLS_CODEPAGE_1251 is not set 497CONFIG_NLS_CODEPAGE_1251=m
938# CONFIG_NLS_ASCII is not set 498CONFIG_NLS_ASCII=y
939CONFIG_NLS_ISO8859_1=y 499CONFIG_NLS_ISO8859_1=m
940# CONFIG_NLS_ISO8859_2 is not set 500CONFIG_NLS_ISO8859_2=m
941# CONFIG_NLS_ISO8859_3 is not set 501CONFIG_NLS_ISO8859_3=m
942# CONFIG_NLS_ISO8859_4 is not set 502CONFIG_NLS_ISO8859_4=m
943# CONFIG_NLS_ISO8859_5 is not set 503CONFIG_NLS_ISO8859_5=m
944# CONFIG_NLS_ISO8859_6 is not set 504CONFIG_NLS_ISO8859_6=m
945# CONFIG_NLS_ISO8859_7 is not set 505CONFIG_NLS_ISO8859_7=m
946# CONFIG_NLS_ISO8859_9 is not set 506CONFIG_NLS_ISO8859_9=m
947# CONFIG_NLS_ISO8859_13 is not set 507CONFIG_NLS_ISO8859_13=m
948# CONFIG_NLS_ISO8859_14 is not set 508CONFIG_NLS_ISO8859_14=m
949# CONFIG_NLS_ISO8859_15 is not set 509CONFIG_NLS_ISO8859_15=m
950# CONFIG_NLS_KOI8_R is not set 510CONFIG_NLS_KOI8_R=m
951# CONFIG_NLS_KOI8_U is not set 511CONFIG_NLS_KOI8_U=m
952# CONFIG_NLS_UTF8 is not set 512CONFIG_NLS_UTF8=m
953 513CONFIG_DLM_DEBUG=y
954# 514# CONFIG_ENABLE_WARN_DEPRECATED is not set
955# Kernel hacking
956#
957# CONFIG_PRINTK_TIME is not set
958CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
959CONFIG_ENABLE_WARN_DEPRECATED=y
960CONFIG_ENABLE_MUST_CHECK=y
961CONFIG_FRAME_WARN=2048 515CONFIG_FRAME_WARN=2048
962CONFIG_MAGIC_SYSRQ=y 516CONFIG_MAGIC_SYSRQ=y
963# CONFIG_STRIP_ASM_SYMS is not set 517CONFIG_STRIP_ASM_SYMS=y
964# CONFIG_UNUSED_SYMBOLS is not set 518CONFIG_DEBUG_FS=y
965# CONFIG_DEBUG_FS is not set 519CONFIG_HEADERS_CHECK=y
966# CONFIG_HEADERS_CHECK is not set 520CONFIG_LOCKUP_DETECTOR=y
967# CONFIG_DEBUG_SECTION_MISMATCH is not set 521CONFIG_SCHEDSTATS=y
968CONFIG_DEBUG_KERNEL=y 522CONFIG_TIMER_STATS=y
969# CONFIG_DEBUG_SHIRQ is not set
970# CONFIG_LOCKUP_DETECTOR is not set
971# CONFIG_HARDLOCKUP_DETECTOR is not set
972CONFIG_DETECT_HUNG_TASK=y
973# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
974CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
975CONFIG_SCHED_DEBUG=y
976# CONFIG_SCHEDSTATS is not set
977# CONFIG_TIMER_STATS is not set
978# CONFIG_DEBUG_OBJECTS is not set
979# CONFIG_SLUB_DEBUG_ON is not set
980# CONFIG_SLUB_STATS is not set
981# CONFIG_DEBUG_KMEMLEAK is not set
982# CONFIG_DEBUG_RT_MUTEXES is not set
983# CONFIG_RT_MUTEX_TESTER is not set
984# CONFIG_DEBUG_SPINLOCK is not set
985# CONFIG_DEBUG_MUTEXES is not set
986# CONFIG_DEBUG_LOCK_ALLOC is not set
987# CONFIG_PROVE_LOCKING is not set
988# CONFIG_SPARSE_RCU_POINTER is not set
989# CONFIG_LOCK_STAT is not set
990CONFIG_DEBUG_SPINLOCK_SLEEP=y
991# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
992CONFIG_STACKTRACE=y
993# CONFIG_DEBUG_KOBJECT is not set
994# CONFIG_DEBUG_HIGHMEM is not set
995CONFIG_DEBUG_INFO=y 523CONFIG_DEBUG_INFO=y
996# CONFIG_DEBUG_INFO_REDUCED is not set 524CONFIG_DEBUG_INFO_REDUCED=y
997CONFIG_DEBUG_VM=y 525CONFIG_DEBUG_VM=y
998# CONFIG_DEBUG_WRITECOUNT is not set 526CONFIG_DEBUG_MEMORY_INIT=y
999# CONFIG_DEBUG_MEMORY_INIT is not set 527CONFIG_DEBUG_LIST=y
1000# CONFIG_DEBUG_LIST is not set 528CONFIG_DEBUG_CREDENTIALS=y
1001# CONFIG_TEST_LIST_SORT is not set 529CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
1002# CONFIG_DEBUG_SG is not set 530CONFIG_DYNAMIC_DEBUG=y
1003# CONFIG_DEBUG_NOTIFIERS is not set 531CONFIG_ASYNC_RAID6_TEST=m
1004# CONFIG_DEBUG_CREDENTIALS is not set
1005# CONFIG_RCU_TORTURE_TEST is not set
1006# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1007# CONFIG_BACKTRACE_SELF_TEST is not set
1008# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1009# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1010# CONFIG_FAULT_INJECTION is not set
1011# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1012# CONFIG_DEBUG_PAGEALLOC is not set
1013CONFIG_TRACING_SUPPORT=y
1014CONFIG_FTRACE=y
1015# CONFIG_IRQSOFF_TRACER is not set
1016# CONFIG_SCHED_TRACER is not set
1017# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1018CONFIG_BRANCH_PROFILE_NONE=y
1019# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1020# CONFIG_PROFILE_ALL_BRANCHES is not set
1021# CONFIG_BLK_DEV_IO_TRACE is not set
1022# CONFIG_ATOMIC64_SELFTEST is not set
1023# CONFIG_SAMPLES is not set
1024# CONFIG_TEST_KSTRTOX is not set
1025CONFIG_EARLY_PRINTK=y
1026CONFIG_DEBUG_STACKOVERFLOW=y 532CONFIG_DEBUG_STACKOVERFLOW=y
1027# CONFIG_DEBUG_STACK_USAGE is not set 533CONFIG_KEYS_DEBUG_PROC_KEYS=y
1028CONFIG_DEBUG_EXTRA_FLAGS="-femit-struct-debug-baseonly" 534CONFIG_SECURITY=y
1029 535CONFIG_SECURITYFS=y
1030# 536CONFIG_SECURITY_NETWORK=y
1031# Security options 537CONFIG_SECURITY_NETWORK_XFRM=y
1032# 538CONFIG_SECURITY_SELINUX=y
1033# CONFIG_KEYS is not set 539CONFIG_SECURITY_SELINUX_BOOTPARAM=y
1034# CONFIG_SECURITY_DMESG_RESTRICT is not set 540CONFIG_SECURITY_SELINUX_DISABLE=y
1035# CONFIG_SECURITY is not set 541CONFIG_CRYPTO_NULL=m
1036# CONFIG_SECURITYFS is not set 542CONFIG_CRYPTO_PCRYPT=m
1037CONFIG_DEFAULT_SECURITY_DAC=y 543CONFIG_CRYPTO_CRYPTD=m
1038CONFIG_DEFAULT_SECURITY="" 544CONFIG_CRYPTO_TEST=m
1039CONFIG_CRYPTO=y 545CONFIG_CRYPTO_CCM=m
1040 546CONFIG_CRYPTO_GCM=m
1041# 547CONFIG_CRYPTO_CTS=m
1042# Crypto core or helper 548CONFIG_CRYPTO_LRW=m
1043# 549CONFIG_CRYPTO_PCBC=m
1044# CONFIG_CRYPTO_FIPS is not set 550CONFIG_CRYPTO_XTS=m
1045CONFIG_CRYPTO_ALGAPI=m 551CONFIG_CRYPTO_HMAC=y
1046CONFIG_CRYPTO_ALGAPI2=m 552CONFIG_CRYPTO_XCBC=m
1047CONFIG_CRYPTO_RNG=m 553CONFIG_CRYPTO_VMAC=m
1048CONFIG_CRYPTO_RNG2=m 554CONFIG_CRYPTO_CRC32C=y
1049# CONFIG_CRYPTO_MANAGER is not set 555CONFIG_CRYPTO_MICHAEL_MIC=m
1050# CONFIG_CRYPTO_MANAGER2 is not set 556CONFIG_CRYPTO_RMD128=m
1051# CONFIG_CRYPTO_GF128MUL is not set 557CONFIG_CRYPTO_RMD160=m
1052# CONFIG_CRYPTO_NULL is not set 558CONFIG_CRYPTO_RMD256=m
1053# CONFIG_CRYPTO_PCRYPT is not set 559CONFIG_CRYPTO_RMD320=m
1054# CONFIG_CRYPTO_CRYPTD is not set 560CONFIG_CRYPTO_SHA1=y
1055# CONFIG_CRYPTO_AUTHENC is not set 561CONFIG_CRYPTO_SHA256=m
1056# CONFIG_CRYPTO_TEST is not set 562CONFIG_CRYPTO_SHA512=m
1057 563CONFIG_CRYPTO_TGR192=m
1058# 564CONFIG_CRYPTO_WP512=m
1059# Authenticated Encryption with Associated Data 565CONFIG_CRYPTO_ANUBIS=m
1060# 566CONFIG_CRYPTO_BLOWFISH=m
1061# CONFIG_CRYPTO_CCM is not set 567CONFIG_CRYPTO_CAMELLIA=m
1062# CONFIG_CRYPTO_GCM is not set 568CONFIG_CRYPTO_CAST5=m
1063# CONFIG_CRYPTO_SEQIV is not set 569CONFIG_CRYPTO_CAST6=m
1064 570CONFIG_CRYPTO_FCRYPT=m
1065# 571CONFIG_CRYPTO_KHAZAD=m
1066# Block modes 572CONFIG_CRYPTO_SEED=m
1067# 573CONFIG_CRYPTO_SERPENT=m
1068# CONFIG_CRYPTO_CBC is not set 574CONFIG_CRYPTO_TEA=m
1069# CONFIG_CRYPTO_CTR is not set 575CONFIG_CRYPTO_TWOFISH=m
1070# CONFIG_CRYPTO_CTS is not set 576CONFIG_CRYPTO_ZLIB=m
1071# CONFIG_CRYPTO_ECB is not set 577CONFIG_CRYPTO_LZO=m
1072# CONFIG_CRYPTO_LRW is not set 578CONFIG_CRC_CCITT=m
1073# CONFIG_CRYPTO_PCBC is not set 579CONFIG_CRC7=m
1074# CONFIG_CRYPTO_XTS is not set
1075
1076#
1077# Hash modes
1078#
1079# CONFIG_CRYPTO_HMAC is not set
1080# CONFIG_CRYPTO_XCBC is not set
1081# CONFIG_CRYPTO_VMAC is not set
1082
1083#
1084# Digest
1085#
1086# CONFIG_CRYPTO_CRC32C is not set
1087# CONFIG_CRYPTO_GHASH is not set
1088# CONFIG_CRYPTO_MD4 is not set
1089# CONFIG_CRYPTO_MD5 is not set
1090# CONFIG_CRYPTO_MICHAEL_MIC is not set
1091# CONFIG_CRYPTO_RMD128 is not set
1092# CONFIG_CRYPTO_RMD160 is not set
1093# CONFIG_CRYPTO_RMD256 is not set
1094# CONFIG_CRYPTO_RMD320 is not set
1095# CONFIG_CRYPTO_SHA1 is not set
1096# CONFIG_CRYPTO_SHA256 is not set
1097# CONFIG_CRYPTO_SHA512 is not set
1098# CONFIG_CRYPTO_TGR192 is not set
1099# CONFIG_CRYPTO_WP512 is not set
1100
1101#
1102# Ciphers
1103#
1104CONFIG_CRYPTO_AES=m
1105# CONFIG_CRYPTO_ANUBIS is not set
1106# CONFIG_CRYPTO_ARC4 is not set
1107# CONFIG_CRYPTO_BLOWFISH is not set
1108# CONFIG_CRYPTO_CAMELLIA is not set
1109# CONFIG_CRYPTO_CAST5 is not set
1110# CONFIG_CRYPTO_CAST6 is not set
1111# CONFIG_CRYPTO_DES is not set
1112# CONFIG_CRYPTO_FCRYPT is not set
1113# CONFIG_CRYPTO_KHAZAD is not set
1114# CONFIG_CRYPTO_SALSA20 is not set
1115# CONFIG_CRYPTO_SEED is not set
1116# CONFIG_CRYPTO_SERPENT is not set
1117# CONFIG_CRYPTO_TEA is not set
1118# CONFIG_CRYPTO_TWOFISH is not set
1119
1120#
1121# Compression
1122#
1123# CONFIG_CRYPTO_DEFLATE is not set
1124# CONFIG_CRYPTO_ZLIB is not set
1125# CONFIG_CRYPTO_LZO is not set
1126
1127#
1128# Random Number Generation
1129#
1130CONFIG_CRYPTO_ANSI_CPRNG=m
1131# CONFIG_CRYPTO_USER_API_HASH is not set
1132# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
1133CONFIG_CRYPTO_HW=y
1134# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1135# CONFIG_BINARY_PRINTF is not set
1136
1137#
1138# Library routines
1139#
1140CONFIG_BITREVERSE=y
1141CONFIG_GENERIC_FIND_FIRST_BIT=y
1142CONFIG_GENERIC_FIND_NEXT_BIT=y
1143CONFIG_GENERIC_FIND_LAST_BIT=y
1144# CONFIG_CRC_CCITT is not set
1145# CONFIG_CRC16 is not set
1146# CONFIG_CRC_T10DIF is not set
1147# CONFIG_CRC_ITU_T is not set
1148CONFIG_CRC32=y
1149# CONFIG_CRC7 is not set
1150# CONFIG_LIBCRC32C is not set
1151CONFIG_ZLIB_INFLATE=y
1152# CONFIG_XZ_DEC is not set
1153# CONFIG_XZ_DEC_BCJ is not set
1154CONFIG_DECOMPRESS_GZIP=y
1155CONFIG_HAS_IOMEM=y
1156CONFIG_HAS_IOPORT=y
1157CONFIG_HAS_DMA=y
1158CONFIG_CPU_RMAP=y
1159CONFIG_NLATTR=y
1160# CONFIG_AVERAGE is not set
1161CONFIG_HAVE_KVM=y
1162# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c
index a7869ad62776..77763ccd5a7d 100644
--- a/arch/tile/kernel/compat_signal.c
+++ b/arch/tile/kernel/compat_signal.c
@@ -303,10 +303,7 @@ long compat_sys_rt_sigreturn(struct pt_regs *regs)
303 goto badframe; 303 goto badframe;
304 304
305 sigdelsetmask(&set, ~_BLOCKABLE); 305 sigdelsetmask(&set, ~_BLOCKABLE);
306 spin_lock_irq(&current->sighand->siglock); 306 set_current_blocked(&set);
307 current->blocked = set;
308 recalc_sigpending();
309 spin_unlock_irq(&current->sighand->siglock);
310 307
311 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 308 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
312 goto badframe; 309 goto badframe;
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c
index bedaf4e9f3a7..f79d4b88c747 100644
--- a/arch/tile/kernel/signal.c
+++ b/arch/tile/kernel/signal.c
@@ -97,10 +97,7 @@ SYSCALL_DEFINE1(rt_sigreturn, struct pt_regs *, regs)
97 goto badframe; 97 goto badframe;
98 98
99 sigdelsetmask(&set, ~_BLOCKABLE); 99 sigdelsetmask(&set, ~_BLOCKABLE);
100 spin_lock_irq(&current->sighand->siglock); 100 set_current_blocked(&set);
101 current->blocked = set;
102 recalc_sigpending();
103 spin_unlock_irq(&current->sighand->siglock);
104 101
105 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 102 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
106 goto badframe; 103 goto badframe;
@@ -286,13 +283,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
286 * the work_pending path in the return-to-user code, and 283 * the work_pending path in the return-to-user code, and
287 * either way we can re-enable interrupts unconditionally. 284 * either way we can re-enable interrupts unconditionally.
288 */ 285 */
289 spin_lock_irq(&current->sighand->siglock); 286 block_sigmask(ka, sig);
290 sigorsets(&current->blocked,
291 &current->blocked, &ka->sa.sa_mask);
292 if (!(ka->sa.sa_flags & SA_NODEFER))
293 sigaddset(&current->blocked, sig);
294 recalc_sigpending();
295 spin_unlock_irq(&current->sighand->siglock);
296 } 287 }
297 288
298 return ret; 289 return ret;
diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c
index f862b005eb73..71ae728e9d0b 100644
--- a/arch/tile/kernel/sysfs.c
+++ b/arch/tile/kernel/sysfs.c
@@ -163,7 +163,7 @@ static int __init create_sysfs_entries(void)
163 163
164#define create_hv_attr(name) \ 164#define create_hv_attr(name) \
165 if (!err) \ 165 if (!err) \
166 err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name); 166 err = sysfs_create_file(hypervisor_kobj, &dev_attr_##name.attr);
167 create_hv_attr(type); 167 create_hv_attr(type);
168 create_hv_attr(version); 168 create_hv_attr(version);
169 create_hv_attr(config_version); 169 create_hv_attr(config_version);
diff --git a/arch/tile/lib/spinlock_32.c b/arch/tile/lib/spinlock_32.c
index cb0999fb64b4..b16ac49a968e 100644
--- a/arch/tile/lib/spinlock_32.c
+++ b/arch/tile/lib/spinlock_32.c
@@ -144,7 +144,7 @@ void arch_read_unlock(arch_rwlock_t *rwlock)
144 for (;;) { 144 for (;;) {
145 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1); 145 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 1);
146 val = __insn_tns((int *)&rwlock->lock); 146 val = __insn_tns((int *)&rwlock->lock);
147 if (likely(val & 1) == 0) { 147 if (likely((val & 1) == 0)) {
148 rwlock->lock = val - (1 << _RD_COUNT_SHIFT); 148 rwlock->lock = val - (1 << _RD_COUNT_SHIFT);
149 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0); 149 __insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0);
150 break; 150 break;
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
index fd843877e841..39e49091f648 100644
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -315,6 +315,13 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
315 current->mm->free_area_cache = TASK_UNMAPPED_BASE; 315 current->mm->free_area_cache = TASK_UNMAPPED_BASE;
316 current->mm->cached_hole_size = 0; 316 current->mm->cached_hole_size = 0;
317 317
318 retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
319 if (retval < 0) {
320 /* Someone check-me: is this error path enough? */
321 send_sig(SIGKILL, current, 0);
322 return retval;
323 }
324
318 install_exec_creds(bprm); 325 install_exec_creds(bprm);
319 current->flags &= ~PF_FORKNOEXEC; 326 current->flags &= ~PF_FORKNOEXEC;
320 327
@@ -410,13 +417,6 @@ beyond_if:
410 417
411 set_brk(current->mm->start_brk, current->mm->brk); 418 set_brk(current->mm->start_brk, current->mm->brk);
412 419
413 retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
414 if (retval < 0) {
415 /* Someone check-me: is this error path enough? */
416 send_sig(SIGKILL, current, 0);
417 return retval;
418 }
419
420 current->mm->start_stack = 420 current->mm->start_stack =
421 (unsigned long)create_aout_tables((char __user *)bprm->p, bprm); 421 (unsigned long)create_aout_tables((char __user *)bprm->p, bprm);
422 /* start thread */ 422 /* start thread */
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 3bd37bdf1b8e..61d4f79a550e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -385,14 +385,15 @@ static __initconst const u64 westmere_hw_cache_event_ids
385#define NHM_LOCAL_DRAM (1 << 14) 385#define NHM_LOCAL_DRAM (1 << 14)
386#define NHM_NON_DRAM (1 << 15) 386#define NHM_NON_DRAM (1 << 15)
387 387
388#define NHM_ALL_DRAM (NHM_REMOTE_DRAM|NHM_LOCAL_DRAM) 388#define NHM_LOCAL (NHM_LOCAL_DRAM|NHM_REMOTE_CACHE_FWD)
389#define NHM_REMOTE (NHM_REMOTE_DRAM)
389 390
390#define NHM_DMND_READ (NHM_DMND_DATA_RD) 391#define NHM_DMND_READ (NHM_DMND_DATA_RD)
391#define NHM_DMND_WRITE (NHM_DMND_RFO|NHM_DMND_WB) 392#define NHM_DMND_WRITE (NHM_DMND_RFO|NHM_DMND_WB)
392#define NHM_DMND_PREFETCH (NHM_PF_DATA_RD|NHM_PF_DATA_RFO) 393#define NHM_DMND_PREFETCH (NHM_PF_DATA_RD|NHM_PF_DATA_RFO)
393 394
394#define NHM_L3_HIT (NHM_UNCORE_HIT|NHM_OTHER_CORE_HIT_SNP|NHM_OTHER_CORE_HITM) 395#define NHM_L3_HIT (NHM_UNCORE_HIT|NHM_OTHER_CORE_HIT_SNP|NHM_OTHER_CORE_HITM)
395#define NHM_L3_MISS (NHM_NON_DRAM|NHM_ALL_DRAM|NHM_REMOTE_CACHE_FWD) 396#define NHM_L3_MISS (NHM_NON_DRAM|NHM_LOCAL_DRAM|NHM_REMOTE_DRAM|NHM_REMOTE_CACHE_FWD)
396#define NHM_L3_ACCESS (NHM_L3_HIT|NHM_L3_MISS) 397#define NHM_L3_ACCESS (NHM_L3_HIT|NHM_L3_MISS)
397 398
398static __initconst const u64 nehalem_hw_cache_extra_regs 399static __initconst const u64 nehalem_hw_cache_extra_regs
@@ -416,16 +417,16 @@ static __initconst const u64 nehalem_hw_cache_extra_regs
416 }, 417 },
417 [ C(NODE) ] = { 418 [ C(NODE) ] = {
418 [ C(OP_READ) ] = { 419 [ C(OP_READ) ] = {
419 [ C(RESULT_ACCESS) ] = NHM_DMND_READ|NHM_ALL_DRAM, 420 [ C(RESULT_ACCESS) ] = NHM_DMND_READ|NHM_LOCAL|NHM_REMOTE,
420 [ C(RESULT_MISS) ] = NHM_DMND_READ|NHM_REMOTE_DRAM, 421 [ C(RESULT_MISS) ] = NHM_DMND_READ|NHM_REMOTE,
421 }, 422 },
422 [ C(OP_WRITE) ] = { 423 [ C(OP_WRITE) ] = {
423 [ C(RESULT_ACCESS) ] = NHM_DMND_WRITE|NHM_ALL_DRAM, 424 [ C(RESULT_ACCESS) ] = NHM_DMND_WRITE|NHM_LOCAL|NHM_REMOTE,
424 [ C(RESULT_MISS) ] = NHM_DMND_WRITE|NHM_REMOTE_DRAM, 425 [ C(RESULT_MISS) ] = NHM_DMND_WRITE|NHM_REMOTE,
425 }, 426 },
426 [ C(OP_PREFETCH) ] = { 427 [ C(OP_PREFETCH) ] = {
427 [ C(RESULT_ACCESS) ] = NHM_DMND_PREFETCH|NHM_ALL_DRAM, 428 [ C(RESULT_ACCESS) ] = NHM_DMND_PREFETCH|NHM_LOCAL|NHM_REMOTE,
428 [ C(RESULT_MISS) ] = NHM_DMND_PREFETCH|NHM_REMOTE_DRAM, 429 [ C(RESULT_MISS) ] = NHM_DMND_PREFETCH|NHM_REMOTE,
429 }, 430 },
430 }, 431 },
431}; 432};
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
index fc45ba887d05..e395693abdb1 100644
--- a/arch/x86/lib/delay.c
+++ b/arch/x86/lib/delay.c
@@ -48,9 +48,9 @@ static void delay_loop(unsigned long loops)
48} 48}
49 49
50/* TSC based delay: */ 50/* TSC based delay: */
51static void delay_tsc(unsigned long loops) 51static void delay_tsc(unsigned long __loops)
52{ 52{
53 unsigned long bclock, now; 53 u32 bclock, now, loops = __loops;
54 int cpu; 54 int cpu;
55 55
56 preempt_disable(); 56 preempt_disable();
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
index f581a18c0d4d..8ecbb4bba4b3 100644
--- a/arch/x86/mm/hugetlbpage.c
+++ b/arch/x86/mm/hugetlbpage.c
@@ -333,13 +333,15 @@ try_again:
333 * Lookup failure means no vma is above this address, 333 * Lookup failure means no vma is above this address,
334 * i.e. return with success: 334 * i.e. return with success:
335 */ 335 */
336 if (!(vma = find_vma_prev(mm, addr, &prev_vma))) 336 vma = find_vma(mm, addr);
337 if (!vma)
337 return addr; 338 return addr;
338 339
339 /* 340 /*
340 * new region fits between prev_vma->vm_end and 341 * new region fits between prev_vma->vm_end and
341 * vma->vm_start, use it: 342 * vma->vm_start, use it:
342 */ 343 */
344 prev_vma = vma->vm_prev;
343 if (addr + len <= vma->vm_start && 345 if (addr + len <= vma->vm_start &&
344 (!prev_vma || (addr >= prev_vma->vm_end))) { 346 (!prev_vma || (addr >= prev_vma->vm_end))) {
345 /* remember the address as a hint for next time */ 347 /* remember the address as a hint for next time */
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index a312e76063a7..49a5cb55429b 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -60,6 +60,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = {
60 DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), 60 DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
61 }, 61 },
62 }, 62 },
63 /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */
64 {
65 .callback = set_use_crs,
66 .ident = "MSI MS-7253",
67 .matches = {
68 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
69 DMI_MATCH(DMI_BOARD_NAME, "MS-7253"),
70 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
71 },
72 },
63 73
64 /* Now for the blacklist.. */ 74 /* Now for the blacklist.. */
65 75
@@ -282,9 +292,6 @@ static void add_resources(struct pci_root_info *info)
282 int i; 292 int i;
283 struct resource *res, *root, *conflict; 293 struct resource *res, *root, *conflict;
284 294
285 if (!pci_use_crs)
286 return;
287
288 coalesce_windows(info, IORESOURCE_MEM); 295 coalesce_windows(info, IORESOURCE_MEM);
289 coalesce_windows(info, IORESOURCE_IO); 296 coalesce_windows(info, IORESOURCE_IO);
290 297
@@ -336,8 +343,13 @@ get_current_resources(struct acpi_device *device, int busnum,
336 acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, 343 acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
337 &info); 344 &info);
338 345
339 add_resources(&info); 346 if (pci_use_crs) {
340 return; 347 add_resources(&info);
348
349 return;
350 }
351
352 kfree(info.name);
341 353
342name_alloc_fail: 354name_alloc_fail:
343 kfree(info.res); 355 kfree(info.res);
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 8b782a63c297..fb95dd2f889a 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -36,11 +36,23 @@ static void icq_free_icq_rcu(struct rcu_head *head)
36 kmem_cache_free(icq->__rcu_icq_cache, icq); 36 kmem_cache_free(icq->__rcu_icq_cache, icq);
37} 37}
38 38
39/* 39/* Exit an icq. Called with both ioc and q locked. */
40 * Exit and free an icq. Called with both ioc and q locked.
41 */
42static void ioc_exit_icq(struct io_cq *icq) 40static void ioc_exit_icq(struct io_cq *icq)
43{ 41{
42 struct elevator_type *et = icq->q->elevator->type;
43
44 if (icq->flags & ICQ_EXITED)
45 return;
46
47 if (et->ops.elevator_exit_icq_fn)
48 et->ops.elevator_exit_icq_fn(icq);
49
50 icq->flags |= ICQ_EXITED;
51}
52
53/* Release an icq. Called with both ioc and q locked. */
54static void ioc_destroy_icq(struct io_cq *icq)
55{
44 struct io_context *ioc = icq->ioc; 56 struct io_context *ioc = icq->ioc;
45 struct request_queue *q = icq->q; 57 struct request_queue *q = icq->q;
46 struct elevator_type *et = q->elevator->type; 58 struct elevator_type *et = q->elevator->type;
@@ -60,8 +72,7 @@ static void ioc_exit_icq(struct io_cq *icq)
60 if (rcu_dereference_raw(ioc->icq_hint) == icq) 72 if (rcu_dereference_raw(ioc->icq_hint) == icq)
61 rcu_assign_pointer(ioc->icq_hint, NULL); 73 rcu_assign_pointer(ioc->icq_hint, NULL);
62 74
63 if (et->ops.elevator_exit_icq_fn) 75 ioc_exit_icq(icq);
64 et->ops.elevator_exit_icq_fn(icq);
65 76
66 /* 77 /*
67 * @icq->q might have gone away by the time RCU callback runs 78 * @icq->q might have gone away by the time RCU callback runs
@@ -79,7 +90,6 @@ static void ioc_release_fn(struct work_struct *work)
79{ 90{
80 struct io_context *ioc = container_of(work, struct io_context, 91 struct io_context *ioc = container_of(work, struct io_context,
81 release_work); 92 release_work);
82 struct request_queue *last_q = NULL;
83 unsigned long flags; 93 unsigned long flags;
84 94
85 /* 95 /*
@@ -93,44 +103,19 @@ static void ioc_release_fn(struct work_struct *work)
93 while (!hlist_empty(&ioc->icq_list)) { 103 while (!hlist_empty(&ioc->icq_list)) {
94 struct io_cq *icq = hlist_entry(ioc->icq_list.first, 104 struct io_cq *icq = hlist_entry(ioc->icq_list.first,
95 struct io_cq, ioc_node); 105 struct io_cq, ioc_node);
96 struct request_queue *this_q = icq->q; 106 struct request_queue *q = icq->q;
97 107
98 if (this_q != last_q) { 108 if (spin_trylock(q->queue_lock)) {
99 /* 109 ioc_destroy_icq(icq);
100 * Need to switch to @this_q. Once we release 110 spin_unlock(q->queue_lock);
101 * @ioc->lock, it can go away along with @cic. 111 } else {
102 * Hold on to it. 112 spin_unlock_irqrestore(&ioc->lock, flags);
103 */ 113 cpu_relax();
104 __blk_get_queue(this_q); 114 spin_lock_irqsave_nested(&ioc->lock, flags, 1);
105
106 /*
107 * blk_put_queue() might sleep thanks to kobject
108 * idiocy. Always release both locks, put and
109 * restart.
110 */
111 if (last_q) {
112 spin_unlock(last_q->queue_lock);
113 spin_unlock_irqrestore(&ioc->lock, flags);
114 blk_put_queue(last_q);
115 } else {
116 spin_unlock_irqrestore(&ioc->lock, flags);
117 }
118
119 last_q = this_q;
120 spin_lock_irqsave(this_q->queue_lock, flags);
121 spin_lock_nested(&ioc->lock, 1);
122 continue;
123 } 115 }
124 ioc_exit_icq(icq);
125 } 116 }
126 117
127 if (last_q) { 118 spin_unlock_irqrestore(&ioc->lock, flags);
128 spin_unlock(last_q->queue_lock);
129 spin_unlock_irqrestore(&ioc->lock, flags);
130 blk_put_queue(last_q);
131 } else {
132 spin_unlock_irqrestore(&ioc->lock, flags);
133 }
134 119
135 kmem_cache_free(iocontext_cachep, ioc); 120 kmem_cache_free(iocontext_cachep, ioc);
136} 121}
@@ -145,6 +130,7 @@ static void ioc_release_fn(struct work_struct *work)
145void put_io_context(struct io_context *ioc) 130void put_io_context(struct io_context *ioc)
146{ 131{
147 unsigned long flags; 132 unsigned long flags;
133 bool free_ioc = false;
148 134
149 if (ioc == NULL) 135 if (ioc == NULL)
150 return; 136 return;
@@ -159,8 +145,13 @@ void put_io_context(struct io_context *ioc)
159 spin_lock_irqsave(&ioc->lock, flags); 145 spin_lock_irqsave(&ioc->lock, flags);
160 if (!hlist_empty(&ioc->icq_list)) 146 if (!hlist_empty(&ioc->icq_list))
161 schedule_work(&ioc->release_work); 147 schedule_work(&ioc->release_work);
148 else
149 free_ioc = true;
162 spin_unlock_irqrestore(&ioc->lock, flags); 150 spin_unlock_irqrestore(&ioc->lock, flags);
163 } 151 }
152
153 if (free_ioc)
154 kmem_cache_free(iocontext_cachep, ioc);
164} 155}
165EXPORT_SYMBOL(put_io_context); 156EXPORT_SYMBOL(put_io_context);
166 157
@@ -168,13 +159,41 @@ EXPORT_SYMBOL(put_io_context);
168void exit_io_context(struct task_struct *task) 159void exit_io_context(struct task_struct *task)
169{ 160{
170 struct io_context *ioc; 161 struct io_context *ioc;
162 struct io_cq *icq;
163 struct hlist_node *n;
164 unsigned long flags;
171 165
172 task_lock(task); 166 task_lock(task);
173 ioc = task->io_context; 167 ioc = task->io_context;
174 task->io_context = NULL; 168 task->io_context = NULL;
175 task_unlock(task); 169 task_unlock(task);
176 170
177 atomic_dec(&ioc->nr_tasks); 171 if (!atomic_dec_and_test(&ioc->nr_tasks)) {
172 put_io_context(ioc);
173 return;
174 }
175
176 /*
177 * Need ioc lock to walk icq_list and q lock to exit icq. Perform
178 * reverse double locking. Read comment in ioc_release_fn() for
179 * explanation on the nested locking annotation.
180 */
181retry:
182 spin_lock_irqsave_nested(&ioc->lock, flags, 1);
183 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node) {
184 if (icq->flags & ICQ_EXITED)
185 continue;
186 if (spin_trylock(icq->q->queue_lock)) {
187 ioc_exit_icq(icq);
188 spin_unlock(icq->q->queue_lock);
189 } else {
190 spin_unlock_irqrestore(&ioc->lock, flags);
191 cpu_relax();
192 goto retry;
193 }
194 }
195 spin_unlock_irqrestore(&ioc->lock, flags);
196
178 put_io_context(ioc); 197 put_io_context(ioc);
179} 198}
180 199
@@ -194,7 +213,7 @@ void ioc_clear_queue(struct request_queue *q)
194 struct io_context *ioc = icq->ioc; 213 struct io_context *ioc = icq->ioc;
195 214
196 spin_lock(&ioc->lock); 215 spin_lock(&ioc->lock);
197 ioc_exit_icq(icq); 216 ioc_destroy_icq(icq);
198 spin_unlock(&ioc->lock); 217 spin_unlock(&ioc->lock);
199 } 218 }
200} 219}
@@ -363,13 +382,13 @@ struct io_cq *ioc_create_icq(struct request_queue *q, gfp_t gfp_mask)
363 return icq; 382 return icq;
364} 383}
365 384
366void ioc_set_changed(struct io_context *ioc, int which) 385void ioc_set_icq_flags(struct io_context *ioc, unsigned int flags)
367{ 386{
368 struct io_cq *icq; 387 struct io_cq *icq;
369 struct hlist_node *n; 388 struct hlist_node *n;
370 389
371 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node) 390 hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node)
372 set_bit(which, &icq->changed); 391 icq->flags |= flags;
373} 392}
374 393
375/** 394/**
@@ -387,7 +406,7 @@ void ioc_ioprio_changed(struct io_context *ioc, int ioprio)
387 406
388 spin_lock_irqsave(&ioc->lock, flags); 407 spin_lock_irqsave(&ioc->lock, flags);
389 ioc->ioprio = ioprio; 408 ioc->ioprio = ioprio;
390 ioc_set_changed(ioc, ICQ_IOPRIO_CHANGED); 409 ioc_set_icq_flags(ioc, ICQ_IOPRIO_CHANGED);
391 spin_unlock_irqrestore(&ioc->lock, flags); 410 spin_unlock_irqrestore(&ioc->lock, flags);
392} 411}
393 412
@@ -404,11 +423,33 @@ void ioc_cgroup_changed(struct io_context *ioc)
404 unsigned long flags; 423 unsigned long flags;
405 424
406 spin_lock_irqsave(&ioc->lock, flags); 425 spin_lock_irqsave(&ioc->lock, flags);
407 ioc_set_changed(ioc, ICQ_CGROUP_CHANGED); 426 ioc_set_icq_flags(ioc, ICQ_CGROUP_CHANGED);
408 spin_unlock_irqrestore(&ioc->lock, flags); 427 spin_unlock_irqrestore(&ioc->lock, flags);
409} 428}
410EXPORT_SYMBOL(ioc_cgroup_changed); 429EXPORT_SYMBOL(ioc_cgroup_changed);
411 430
431/**
432 * icq_get_changed - fetch and clear icq changed mask
433 * @icq: icq of interest
434 *
435 * Fetch and clear ICQ_*_CHANGED bits from @icq. Grabs and releases
436 * @icq->ioc->lock.
437 */
438unsigned icq_get_changed(struct io_cq *icq)
439{
440 unsigned int changed = 0;
441 unsigned long flags;
442
443 if (unlikely(icq->flags & ICQ_CHANGED_MASK)) {
444 spin_lock_irqsave(&icq->ioc->lock, flags);
445 changed = icq->flags & ICQ_CHANGED_MASK;
446 icq->flags &= ~ICQ_CHANGED_MASK;
447 spin_unlock_irqrestore(&icq->ioc->lock, flags);
448 }
449 return changed;
450}
451EXPORT_SYMBOL(icq_get_changed);
452
412static int __init blk_ioc_init(void) 453static int __init blk_ioc_init(void)
413{ 454{
414 iocontext_cachep = kmem_cache_create("blkdev_ioc", 455 iocontext_cachep = kmem_cache_create("blkdev_ioc",
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d0ba50533668..457295253566 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3470,20 +3470,20 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
3470 const int rw = rq_data_dir(rq); 3470 const int rw = rq_data_dir(rq);
3471 const bool is_sync = rq_is_sync(rq); 3471 const bool is_sync = rq_is_sync(rq);
3472 struct cfq_queue *cfqq; 3472 struct cfq_queue *cfqq;
3473 unsigned int changed;
3473 3474
3474 might_sleep_if(gfp_mask & __GFP_WAIT); 3475 might_sleep_if(gfp_mask & __GFP_WAIT);
3475 3476
3476 spin_lock_irq(q->queue_lock); 3477 spin_lock_irq(q->queue_lock);
3477 3478
3478 /* handle changed notifications */ 3479 /* handle changed notifications */
3479 if (unlikely(cic->icq.changed)) { 3480 changed = icq_get_changed(&cic->icq);
3480 if (test_and_clear_bit(ICQ_IOPRIO_CHANGED, &cic->icq.changed)) 3481 if (unlikely(changed & ICQ_IOPRIO_CHANGED))
3481 changed_ioprio(cic); 3482 changed_ioprio(cic);
3482#ifdef CONFIG_CFQ_GROUP_IOSCHED 3483#ifdef CONFIG_CFQ_GROUP_IOSCHED
3483 if (test_and_clear_bit(ICQ_CGROUP_CHANGED, &cic->icq.changed)) 3484 if (unlikely(changed & ICQ_CGROUP_CHANGED))
3484 changed_cgroup(cic); 3485 changed_cgroup(cic);
3485#endif 3486#endif
3486 }
3487 3487
3488new_queue: 3488new_queue:
3489 cfqq = cic_to_cfqq(cic, is_sync); 3489 cfqq = cic_to_cfqq(cic, is_sync);
diff --git a/block/genhd.c b/block/genhd.c
index 23b4f7063322..df9816ede75b 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -35,6 +35,7 @@ static DEFINE_IDR(ext_devt_idr);
35 35
36static struct device_type disk_type; 36static struct device_type disk_type;
37 37
38static void disk_alloc_events(struct gendisk *disk);
38static void disk_add_events(struct gendisk *disk); 39static void disk_add_events(struct gendisk *disk);
39static void disk_del_events(struct gendisk *disk); 40static void disk_del_events(struct gendisk *disk);
40static void disk_release_events(struct gendisk *disk); 41static void disk_release_events(struct gendisk *disk);
@@ -601,6 +602,8 @@ void add_disk(struct gendisk *disk)
601 disk->major = MAJOR(devt); 602 disk->major = MAJOR(devt);
602 disk->first_minor = MINOR(devt); 603 disk->first_minor = MINOR(devt);
603 604
605 disk_alloc_events(disk);
606
604 /* Register BDI before referencing it from bdev */ 607 /* Register BDI before referencing it from bdev */
605 bdi = &disk->queue->backing_dev_info; 608 bdi = &disk->queue->backing_dev_info;
606 bdi_register_dev(bdi, disk_devt(disk)); 609 bdi_register_dev(bdi, disk_devt(disk));
@@ -1475,9 +1478,9 @@ static void __disk_unblock_events(struct gendisk *disk, bool check_now)
1475 intv = disk_events_poll_jiffies(disk); 1478 intv = disk_events_poll_jiffies(disk);
1476 set_timer_slack(&ev->dwork.timer, intv / 4); 1479 set_timer_slack(&ev->dwork.timer, intv / 4);
1477 if (check_now) 1480 if (check_now)
1478 queue_delayed_work(system_nrt_wq, &ev->dwork, 0); 1481 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
1479 else if (intv) 1482 else if (intv)
1480 queue_delayed_work(system_nrt_wq, &ev->dwork, intv); 1483 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, intv);
1481out_unlock: 1484out_unlock:
1482 spin_unlock_irqrestore(&ev->lock, flags); 1485 spin_unlock_irqrestore(&ev->lock, flags);
1483} 1486}
@@ -1521,7 +1524,7 @@ void disk_flush_events(struct gendisk *disk, unsigned int mask)
1521 ev->clearing |= mask; 1524 ev->clearing |= mask;
1522 if (!ev->block) { 1525 if (!ev->block) {
1523 cancel_delayed_work(&ev->dwork); 1526 cancel_delayed_work(&ev->dwork);
1524 queue_delayed_work(system_nrt_wq, &ev->dwork, 0); 1527 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
1525 } 1528 }
1526 spin_unlock_irq(&ev->lock); 1529 spin_unlock_irq(&ev->lock);
1527} 1530}
@@ -1558,7 +1561,7 @@ unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)
1558 1561
1559 /* uncondtionally schedule event check and wait for it to finish */ 1562 /* uncondtionally schedule event check and wait for it to finish */
1560 disk_block_events(disk); 1563 disk_block_events(disk);
1561 queue_delayed_work(system_nrt_wq, &ev->dwork, 0); 1564 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
1562 flush_delayed_work(&ev->dwork); 1565 flush_delayed_work(&ev->dwork);
1563 __disk_unblock_events(disk, false); 1566 __disk_unblock_events(disk, false);
1564 1567
@@ -1595,7 +1598,7 @@ static void disk_events_workfn(struct work_struct *work)
1595 1598
1596 intv = disk_events_poll_jiffies(disk); 1599 intv = disk_events_poll_jiffies(disk);
1597 if (!ev->block && intv) 1600 if (!ev->block && intv)
1598 queue_delayed_work(system_nrt_wq, &ev->dwork, intv); 1601 queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, intv);
1599 1602
1600 spin_unlock_irq(&ev->lock); 1603 spin_unlock_irq(&ev->lock);
1601 1604
@@ -1733,9 +1736,9 @@ module_param_cb(events_dfl_poll_msecs, &disk_events_dfl_poll_msecs_param_ops,
1733 &disk_events_dfl_poll_msecs, 0644); 1736 &disk_events_dfl_poll_msecs, 0644);
1734 1737
1735/* 1738/*
1736 * disk_{add|del|release}_events - initialize and destroy disk_events. 1739 * disk_{alloc|add|del|release}_events - initialize and destroy disk_events.
1737 */ 1740 */
1738static void disk_add_events(struct gendisk *disk) 1741static void disk_alloc_events(struct gendisk *disk)
1739{ 1742{
1740 struct disk_events *ev; 1743 struct disk_events *ev;
1741 1744
@@ -1748,16 +1751,6 @@ static void disk_add_events(struct gendisk *disk)
1748 return; 1751 return;
1749 } 1752 }
1750 1753
1751 if (sysfs_create_files(&disk_to_dev(disk)->kobj,
1752 disk_events_attrs) < 0) {
1753 pr_warn("%s: failed to create sysfs files for events\n",
1754 disk->disk_name);
1755 kfree(ev);
1756 return;
1757 }
1758
1759 disk->ev = ev;
1760
1761 INIT_LIST_HEAD(&ev->node); 1754 INIT_LIST_HEAD(&ev->node);
1762 ev->disk = disk; 1755 ev->disk = disk;
1763 spin_lock_init(&ev->lock); 1756 spin_lock_init(&ev->lock);
@@ -1766,8 +1759,21 @@ static void disk_add_events(struct gendisk *disk)
1766 ev->poll_msecs = -1; 1759 ev->poll_msecs = -1;
1767 INIT_DELAYED_WORK(&ev->dwork, disk_events_workfn); 1760 INIT_DELAYED_WORK(&ev->dwork, disk_events_workfn);
1768 1761
1762 disk->ev = ev;
1763}
1764
1765static void disk_add_events(struct gendisk *disk)
1766{
1767 if (!disk->ev)
1768 return;
1769
1770 /* FIXME: error handling */
1771 if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0)
1772 pr_warn("%s: failed to create sysfs files for events\n",
1773 disk->disk_name);
1774
1769 mutex_lock(&disk_events_mutex); 1775 mutex_lock(&disk_events_mutex);
1770 list_add_tail(&ev->node, &disk_events); 1776 list_add_tail(&disk->ev->node, &disk_events);
1771 mutex_unlock(&disk_events_mutex); 1777 mutex_unlock(&disk_events_mutex);
1772 1778
1773 /* 1779 /*
diff --git a/block/partition-generic.c b/block/partition-generic.c
index d06ec1c829c2..6df5d6928a44 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -389,17 +389,11 @@ static bool disk_unlock_native_capacity(struct gendisk *disk)
389 } 389 }
390} 390}
391 391
392int rescan_partitions(struct gendisk *disk, struct block_device *bdev) 392static int drop_partitions(struct gendisk *disk, struct block_device *bdev)
393{ 393{
394 struct parsed_partitions *state = NULL;
395 struct disk_part_iter piter; 394 struct disk_part_iter piter;
396 struct hd_struct *part; 395 struct hd_struct *part;
397 int p, highest, res; 396 int res;
398rescan:
399 if (state && !IS_ERR(state)) {
400 kfree(state);
401 state = NULL;
402 }
403 397
404 if (bdev->bd_part_count) 398 if (bdev->bd_part_count)
405 return -EBUSY; 399 return -EBUSY;
@@ -412,6 +406,24 @@ rescan:
412 delete_partition(disk, part->partno); 406 delete_partition(disk, part->partno);
413 disk_part_iter_exit(&piter); 407 disk_part_iter_exit(&piter);
414 408
409 return 0;
410}
411
412int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
413{
414 struct parsed_partitions *state = NULL;
415 struct hd_struct *part;
416 int p, highest, res;
417rescan:
418 if (state && !IS_ERR(state)) {
419 kfree(state);
420 state = NULL;
421 }
422
423 res = drop_partitions(disk, bdev);
424 if (res)
425 return res;
426
415 if (disk->fops->revalidate_disk) 427 if (disk->fops->revalidate_disk)
416 disk->fops->revalidate_disk(disk); 428 disk->fops->revalidate_disk(disk);
417 check_disk_size_change(disk, bdev); 429 check_disk_size_change(disk, bdev);
@@ -515,6 +527,26 @@ rescan:
515 return 0; 527 return 0;
516} 528}
517 529
530int invalidate_partitions(struct gendisk *disk, struct block_device *bdev)
531{
532 int res;
533
534 if (!bdev->bd_invalidated)
535 return 0;
536
537 res = drop_partitions(disk, bdev);
538 if (res)
539 return res;
540
541 set_capacity(disk, 0);
542 check_disk_size_change(disk, bdev);
543 bdev->bd_invalidated = 0;
544 /* tell userspace that the media / partition table may have changed */
545 kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE);
546
547 return 0;
548}
549
518unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p) 550unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
519{ 551{
520 struct address_space *mapping = bdev->bd_inode->i_mapping; 552 struct address_space *mapping = bdev->bd_inode->i_mapping;
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index e086fbbbe853..8db9089127c5 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
1177 int TimeoutCounter; 1177 int TimeoutCounter;
1178 int i; 1178 int i;
1179 1179
1180 1180 memset(&CommandMailbox, 0, sizeof(DAC960_V1_CommandMailbox_T));
1181
1181 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32))) 1182 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
1182 return DAC960_Failure(Controller, "DMA mask out of range"); 1183 return DAC960_Failure(Controller, "DMA mask out of range");
1183 Controller->BounceBufferLimit = DMA_BIT_MASK(32); 1184 Controller->BounceBufferLimit = DMA_BIT_MASK(32);
@@ -4627,7 +4628,8 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4627 DAC960_Controller_T *Controller = Command->Controller; 4628 DAC960_Controller_T *Controller = Command->Controller;
4628 DAC960_CommandType_T CommandType = Command->CommandType; 4629 DAC960_CommandType_T CommandType = Command->CommandType;
4629 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; 4630 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
4630 DAC960_V2_IOCTL_Opcode_T CommandOpcode = CommandMailbox->Common.IOCTL_Opcode; 4631 DAC960_V2_IOCTL_Opcode_T IOCTLOpcode = CommandMailbox->Common.IOCTL_Opcode;
4632 DAC960_V2_CommandOpcode_T CommandOpcode = CommandMailbox->SCSI_10.CommandOpcode;
4631 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus; 4633 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus;
4632 4634
4633 if (CommandType == DAC960_ReadCommand || 4635 if (CommandType == DAC960_ReadCommand ||
@@ -4699,7 +4701,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4699 { 4701 {
4700 if (Controller->ShutdownMonitoringTimer) 4702 if (Controller->ShutdownMonitoringTimer)
4701 return; 4703 return;
4702 if (CommandOpcode == DAC960_V2_GetControllerInfo) 4704 if (IOCTLOpcode == DAC960_V2_GetControllerInfo)
4703 { 4705 {
4704 DAC960_V2_ControllerInfo_T *NewControllerInfo = 4706 DAC960_V2_ControllerInfo_T *NewControllerInfo =
4705 Controller->V2.NewControllerInformation; 4707 Controller->V2.NewControllerInformation;
@@ -4719,14 +4721,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4719 memcpy(ControllerInfo, NewControllerInfo, 4721 memcpy(ControllerInfo, NewControllerInfo,
4720 sizeof(DAC960_V2_ControllerInfo_T)); 4722 sizeof(DAC960_V2_ControllerInfo_T));
4721 } 4723 }
4722 else if (CommandOpcode == DAC960_V2_GetEvent) 4724 else if (IOCTLOpcode == DAC960_V2_GetEvent)
4723 { 4725 {
4724 if (CommandStatus == DAC960_V2_NormalCompletion) { 4726 if (CommandStatus == DAC960_V2_NormalCompletion) {
4725 DAC960_V2_ReportEvent(Controller, Controller->V2.Event); 4727 DAC960_V2_ReportEvent(Controller, Controller->V2.Event);
4726 } 4728 }
4727 Controller->V2.NextEventSequenceNumber++; 4729 Controller->V2.NextEventSequenceNumber++;
4728 } 4730 }
4729 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid && 4731 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid &&
4730 CommandStatus == DAC960_V2_NormalCompletion) 4732 CommandStatus == DAC960_V2_NormalCompletion)
4731 { 4733 {
4732 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo = 4734 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo =
@@ -4915,7 +4917,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4915 NewPhysicalDeviceInfo->LogicalUnit++; 4917 NewPhysicalDeviceInfo->LogicalUnit++;
4916 Controller->V2.PhysicalDeviceIndex++; 4918 Controller->V2.PhysicalDeviceIndex++;
4917 } 4919 }
4918 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid) 4920 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid)
4919 { 4921 {
4920 unsigned int DeviceIndex; 4922 unsigned int DeviceIndex;
4921 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex; 4923 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex;
@@ -4938,7 +4940,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4938 } 4940 }
4939 Controller->V2.NeedPhysicalDeviceInformation = false; 4941 Controller->V2.NeedPhysicalDeviceInformation = false;
4940 } 4942 }
4941 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid && 4943 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid &&
4942 CommandStatus == DAC960_V2_NormalCompletion) 4944 CommandStatus == DAC960_V2_NormalCompletion)
4943 { 4945 {
4944 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo = 4946 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo =
@@ -5065,7 +5067,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
5065 [LogicalDeviceNumber] = true; 5067 [LogicalDeviceNumber] = true;
5066 NewLogicalDeviceInfo->LogicalDeviceNumber++; 5068 NewLogicalDeviceInfo->LogicalDeviceNumber++;
5067 } 5069 }
5068 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid) 5070 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid)
5069 { 5071 {
5070 int LogicalDriveNumber; 5072 int LogicalDriveNumber;
5071 for (LogicalDriveNumber = 0; 5073 for (LogicalDriveNumber = 0;
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 9baf11e86362..744f078f4dd8 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3832,7 +3832,7 @@ static int __floppy_read_block_0(struct block_device *bdev)
3832 bio.bi_size = size; 3832 bio.bi_size = size;
3833 bio.bi_bdev = bdev; 3833 bio.bi_bdev = bdev;
3834 bio.bi_sector = 0; 3834 bio.bi_sector = 0;
3835 bio.bi_flags = BIO_QUIET; 3835 bio.bi_flags = (1 << BIO_QUIET);
3836 init_completion(&complete); 3836 init_completion(&complete);
3837 bio.bi_private = &complete; 3837 bio.bi_private = &complete;
3838 bio.bi_end_io = floppy_rb0_complete; 3838 bio.bi_end_io = floppy_rb0_complete;
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index e7472f567c9d..3fb6ab4c8b4e 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1120,7 +1120,7 @@ static inline void carm_handle_resp(struct carm_host *host,
1120 break; 1120 break;
1121 case MISC_GET_FW_VER: { 1121 case MISC_GET_FW_VER: {
1122 struct carm_fw_ver *ver = (struct carm_fw_ver *) 1122 struct carm_fw_ver *ver = (struct carm_fw_ver *)
1123 mem + sizeof(struct carm_msg_get_fw_ver); 1123 (mem + sizeof(struct carm_msg_get_fw_ver));
1124 if (!error) { 1124 if (!error) {
1125 host->fw_ver = le32_to_cpu(ver->version); 1125 host->fw_ver = le32_to_cpu(ver->version);
1126 host->flags |= (ver->features & FL_FW_VER_MASK); 1126 host->flags |= (ver->features & FL_FW_VER_MASK);
diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
index 4a5b099c3bc5..53404af2e748 100644
--- a/drivers/gpu/drm/gma500/cdv_device.c
+++ b/drivers/gpu/drm/gma500/cdv_device.c
@@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev)
321 cdv_get_core_freq(dev); 321 cdv_get_core_freq(dev);
322 gma_intel_opregion_init(dev); 322 gma_intel_opregion_init(dev);
323 psb_intel_init_bios(dev); 323 psb_intel_init_bios(dev);
324 REG_WRITE(PORT_HOTPLUG_EN, 0);
325 REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
324 return 0; 326 return 0;
325} 327}
326 328
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 830dfdd6bf15..be616735ec91 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -247,7 +247,6 @@ static struct fb_ops psbfb_roll_ops = {
247 .fb_imageblit = cfb_imageblit, 247 .fb_imageblit = cfb_imageblit,
248 .fb_pan_display = psbfb_pan, 248 .fb_pan_display = psbfb_pan,
249 .fb_mmap = psbfb_mmap, 249 .fb_mmap = psbfb_mmap,
250 .fb_sync = psbfb_sync,
251 .fb_ioctl = psbfb_ioctl, 250 .fb_ioctl = psbfb_ioctl,
252}; 251};
253 252
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index 5d5330f667f1..aff194fbe9f3 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -446,10 +446,9 @@ int psb_gtt_init(struct drm_device *dev, int resume)
446 pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE); 446 pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);
447 gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE) 447 gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)
448 >> PAGE_SHIFT; 448 >> PAGE_SHIFT;
449 /* Some CDV firmware doesn't report this currently. In which case the 449 /* CDV doesn't report this. In which case the system has 64 gtt pages */
450 system has 64 gtt pages */
451 if (pg->gtt_start == 0 || gtt_pages == 0) { 450 if (pg->gtt_start == 0 || gtt_pages == 0) {
452 dev_err(dev->dev, "GTT PCI BAR not initialized.\n"); 451 dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n");
453 gtt_pages = 64; 452 gtt_pages = 64;
454 pg->gtt_start = dev_priv->pge_ctl; 453 pg->gtt_start = dev_priv->pge_ctl;
455 } 454 }
@@ -461,10 +460,10 @@ int psb_gtt_init(struct drm_device *dev, int resume)
461 460
462 if (pg->gatt_pages == 0 || pg->gatt_start == 0) { 461 if (pg->gatt_pages == 0 || pg->gatt_start == 0) {
463 static struct resource fudge; /* Preferably peppermint */ 462 static struct resource fudge; /* Preferably peppermint */
464 /* This can occur on CDV SDV systems. Fudge it in this case. 463 /* This can occur on CDV systems. Fudge it in this case.
465 We really don't care what imaginary space is being allocated 464 We really don't care what imaginary space is being allocated
466 at this point */ 465 at this point */
467 dev_err(dev->dev, "GATT PCI BAR not initialized.\n"); 466 dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n");
468 pg->gatt_start = 0x40000000; 467 pg->gatt_start = 0x40000000;
469 pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT; 468 pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT;
470 /* This is a little confusing but in fact the GTT is providing 469 /* This is a little confusing but in fact the GTT is providing
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index fbcd84803b60..17ca72ce3027 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -2362,6 +2362,9 @@ void r600_semaphore_ring_emit(struct radeon_device *rdev,
2362 uint64_t addr = semaphore->gpu_addr; 2362 uint64_t addr = semaphore->gpu_addr;
2363 unsigned sel = emit_wait ? PACKET3_SEM_SEL_WAIT : PACKET3_SEM_SEL_SIGNAL; 2363 unsigned sel = emit_wait ? PACKET3_SEM_SEL_WAIT : PACKET3_SEM_SEL_SIGNAL;
2364 2364
2365 if (rdev->family < CHIP_CAYMAN)
2366 sel |= PACKET3_SEM_WAIT_ON_SIGNAL;
2367
2365 radeon_ring_write(ring, PACKET3(PACKET3_MEM_SEMAPHORE, 1)); 2368 radeon_ring_write(ring, PACKET3(PACKET3_MEM_SEMAPHORE, 1));
2366 radeon_ring_write(ring, addr & 0xffffffff); 2369 radeon_ring_write(ring, addr & 0xffffffff);
2367 radeon_ring_write(ring, (upper_32_bits(addr) & 0xff) | sel); 2370 radeon_ring_write(ring, (upper_32_bits(addr) & 0xff) | sel);
diff --git a/drivers/gpu/drm/radeon/r600_blit_shaders.c b/drivers/gpu/drm/radeon/r600_blit_shaders.c
index 2d1f6c5ee2a7..73e2c7c6edbc 100644
--- a/drivers/gpu/drm/radeon/r600_blit_shaders.c
+++ b/drivers/gpu/drm/radeon/r600_blit_shaders.c
@@ -314,6 +314,10 @@ const u32 r6xx_default_state[] =
314 0x00000000, /* VGT_VTX_CNT_EN */ 314 0x00000000, /* VGT_VTX_CNT_EN */
315 315
316 0xc0016900, 316 0xc0016900,
317 0x000000d4,
318 0x00000000, /* SX_MISC */
319
320 0xc0016900,
317 0x000002c8, 321 0x000002c8,
318 0x00000000, /* VGT_STRMOUT_BUFFER_EN */ 322 0x00000000, /* VGT_STRMOUT_BUFFER_EN */
319 323
@@ -626,6 +630,10 @@ const u32 r7xx_default_state[] =
626 0x00000000, /* VGT_VTX_CNT_EN */ 630 0x00000000, /* VGT_VTX_CNT_EN */
627 631
628 0xc0016900, 632 0xc0016900,
633 0x000000d4,
634 0x00000000, /* SX_MISC */
635
636 0xc0016900,
629 0x000002c8, 637 0x000002c8,
630 0x00000000, /* VGT_STRMOUT_BUFFER_EN */ 638 0x00000000, /* VGT_STRMOUT_BUFFER_EN */
631 639
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h
index 3ee1fd7ef394..9b23670716f1 100644
--- a/drivers/gpu/drm/radeon/r600d.h
+++ b/drivers/gpu/drm/radeon/r600d.h
@@ -831,6 +831,7 @@
831#define PACKET3_STRMOUT_BUFFER_UPDATE 0x34 831#define PACKET3_STRMOUT_BUFFER_UPDATE 0x34
832#define PACKET3_INDIRECT_BUFFER_MP 0x38 832#define PACKET3_INDIRECT_BUFFER_MP 0x38
833#define PACKET3_MEM_SEMAPHORE 0x39 833#define PACKET3_MEM_SEMAPHORE 0x39
834# define PACKET3_SEM_WAIT_ON_SIGNAL (0x1 << 12)
834# define PACKET3_SEM_SEL_SIGNAL (0x6 << 29) 835# define PACKET3_SEM_SEL_SIGNAL (0x6 << 29)
835# define PACKET3_SEM_SEL_WAIT (0x7 << 29) 836# define PACKET3_SEM_SEL_WAIT (0x7 << 29)
836#define PACKET3_MPEG_INDEX 0x3A 837#define PACKET3_MPEG_INDEX 0x3A
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 8b3d8ed52ff6..8c9a8115b632 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1057,7 +1057,7 @@ static int radeon_dvi_mode_valid(struct drm_connector *connector,
1057 (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B)) 1057 (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B))
1058 return MODE_OK; 1058 return MODE_OK;
1059 else if (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_A) { 1059 else if (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_A) {
1060 if (ASIC_IS_DCE3(rdev)) { 1060 if (0) {
1061 /* HDMI 1.3+ supports max clock of 340 Mhz */ 1061 /* HDMI 1.3+ supports max clock of 340 Mhz */
1062 if (mode->clock > 340000) 1062 if (mode->clock > 340000)
1063 return MODE_CLOCK_HIGH; 1063 return MODE_CLOCK_HIGH;
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 8c49fef1ce78..3d314338d843 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1078,15 +1078,21 @@ static const struct drm_framebuffer_funcs radeon_fb_funcs = {
1078 .create_handle = radeon_user_framebuffer_create_handle, 1078 .create_handle = radeon_user_framebuffer_create_handle,
1079}; 1079};
1080 1080
1081void 1081int
1082radeon_framebuffer_init(struct drm_device *dev, 1082radeon_framebuffer_init(struct drm_device *dev,
1083 struct radeon_framebuffer *rfb, 1083 struct radeon_framebuffer *rfb,
1084 struct drm_mode_fb_cmd2 *mode_cmd, 1084 struct drm_mode_fb_cmd2 *mode_cmd,
1085 struct drm_gem_object *obj) 1085 struct drm_gem_object *obj)
1086{ 1086{
1087 int ret;
1087 rfb->obj = obj; 1088 rfb->obj = obj;
1088 drm_framebuffer_init(dev, &rfb->base, &radeon_fb_funcs); 1089 ret = drm_framebuffer_init(dev, &rfb->base, &radeon_fb_funcs);
1090 if (ret) {
1091 rfb->obj = NULL;
1092 return ret;
1093 }
1089 drm_helper_mode_fill_fb_struct(&rfb->base, mode_cmd); 1094 drm_helper_mode_fill_fb_struct(&rfb->base, mode_cmd);
1095 return 0;
1090} 1096}
1091 1097
1092static struct drm_framebuffer * 1098static struct drm_framebuffer *
@@ -1096,6 +1102,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,
1096{ 1102{
1097 struct drm_gem_object *obj; 1103 struct drm_gem_object *obj;
1098 struct radeon_framebuffer *radeon_fb; 1104 struct radeon_framebuffer *radeon_fb;
1105 int ret;
1099 1106
1100 obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]); 1107 obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
1101 if (obj == NULL) { 1108 if (obj == NULL) {
@@ -1108,7 +1115,12 @@ radeon_user_framebuffer_create(struct drm_device *dev,
1108 if (radeon_fb == NULL) 1115 if (radeon_fb == NULL)
1109 return ERR_PTR(-ENOMEM); 1116 return ERR_PTR(-ENOMEM);
1110 1117
1111 radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj); 1118 ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
1119 if (ret) {
1120 kfree(radeon_fb);
1121 drm_gem_object_unreference_unlocked(obj);
1122 return NULL;
1123 }
1112 1124
1113 return &radeon_fb->base; 1125 return &radeon_fb->base;
1114} 1126}
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 9419c51bcf50..26e92708d114 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -307,8 +307,6 @@ void radeon_panel_mode_fixup(struct drm_encoder *encoder,
307bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder, 307bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder,
308 u32 pixel_clock) 308 u32 pixel_clock)
309{ 309{
310 struct drm_device *dev = encoder->dev;
311 struct radeon_device *rdev = dev->dev_private;
312 struct drm_connector *connector; 310 struct drm_connector *connector;
313 struct radeon_connector *radeon_connector; 311 struct radeon_connector *radeon_connector;
314 struct radeon_connector_atom_dig *dig_connector; 312 struct radeon_connector_atom_dig *dig_connector;
@@ -326,7 +324,7 @@ bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder,
326 case DRM_MODE_CONNECTOR_HDMIB: 324 case DRM_MODE_CONNECTOR_HDMIB:
327 if (radeon_connector->use_digital) { 325 if (radeon_connector->use_digital) {
328 /* HDMI 1.3 supports up to 340 Mhz over single link */ 326 /* HDMI 1.3 supports up to 340 Mhz over single link */
329 if (ASIC_IS_DCE3(rdev) && drm_detect_hdmi_monitor(radeon_connector->edid)) { 327 if (0 && drm_detect_hdmi_monitor(radeon_connector->edid)) {
330 if (pixel_clock > 340000) 328 if (pixel_clock > 340000)
331 return true; 329 return true;
332 else 330 else
@@ -348,7 +346,7 @@ bool radeon_dig_monitor_is_duallink(struct drm_encoder *encoder,
348 return false; 346 return false;
349 else { 347 else {
350 /* HDMI 1.3 supports up to 340 Mhz over single link */ 348 /* HDMI 1.3 supports up to 340 Mhz over single link */
351 if (ASIC_IS_DCE3(rdev) && drm_detect_hdmi_monitor(radeon_connector->edid)) { 349 if (0 && drm_detect_hdmi_monitor(radeon_connector->edid)) {
352 if (pixel_clock > 340000) 350 if (pixel_clock > 340000)
353 return true; 351 return true;
354 else 352 else
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index cf2bf35b56b8..195471cf65d3 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -209,6 +209,11 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
209 sizes->surface_depth); 209 sizes->surface_depth);
210 210
211 ret = radeonfb_create_pinned_object(rfbdev, &mode_cmd, &gobj); 211 ret = radeonfb_create_pinned_object(rfbdev, &mode_cmd, &gobj);
212 if (ret) {
213 DRM_ERROR("failed to create fbcon object %d\n", ret);
214 return ret;
215 }
216
212 rbo = gem_to_radeon_bo(gobj); 217 rbo = gem_to_radeon_bo(gobj);
213 218
214 /* okay we have an object now allocate the framebuffer */ 219 /* okay we have an object now allocate the framebuffer */
@@ -220,7 +225,11 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
220 225
221 info->par = rfbdev; 226 info->par = rfbdev;
222 227
223 radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj); 228 ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
229 if (ret) {
230 DRM_ERROR("failed to initalise framebuffer %d\n", ret);
231 goto out_unref;
232 }
224 233
225 fb = &rfbdev->rfb.base; 234 fb = &rfbdev->rfb.base;
226 235
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 4330e3253573..8a85598fb242 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -649,7 +649,7 @@ extern void radeon_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
649 u16 blue, int regno); 649 u16 blue, int regno);
650extern void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, 650extern void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
651 u16 *blue, int regno); 651 u16 *blue, int regno);
652void radeon_framebuffer_init(struct drm_device *dev, 652int radeon_framebuffer_init(struct drm_device *dev,
653 struct radeon_framebuffer *rfb, 653 struct radeon_framebuffer *rfb,
654 struct drm_mode_fb_cmd2 *mode_cmd, 654 struct drm_mode_fb_cmd2 *mode_cmd,
655 struct drm_gem_object *obj); 655 struct drm_gem_object *obj);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index b8574cddd953..63552e30d0c3 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -59,6 +59,9 @@
59#define USB_VENDOR_ID_AIRCABLE 0x16CA 59#define USB_VENDOR_ID_AIRCABLE 0x16CA
60#define USB_DEVICE_ID_AIRCABLE1 0x1502 60#define USB_DEVICE_ID_AIRCABLE1 0x1502
61 61
62#define USB_VENDOR_ID_AIREN 0x1a2c
63#define USB_DEVICE_ID_AIREN_SLIMPLUS 0x0002
64
62#define USB_VENDOR_ID_ALCOR 0x058f 65#define USB_VENDOR_ID_ALCOR 0x058f
63#define USB_DEVICE_ID_ALCOR_USBRS232 0x9720 66#define USB_DEVICE_ID_ALCOR_USBRS232 0x9720
64 67
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9333d692a786..627850a54d34 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -986,8 +986,13 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
986 return; 986 return;
987 } 987 }
988 988
989 /* Ignore out-of-range values as per HID specification, section 5.10 */ 989 /*
990 if (value < field->logical_minimum || value > field->logical_maximum) { 990 * Ignore out-of-range values as per HID specification,
991 * section 5.10 and 6.2.25
992 */
993 if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
994 (value < field->logical_minimum ||
995 value > field->logical_maximum)) {
991 dbg_hid("Ignoring out-of-range value %x\n", value); 996 dbg_hid("Ignoring out-of-range value %x\n", value);
992 return; 997 return;
993 } 998 }
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index c831af937481..57d4e1e1df48 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -54,6 +54,7 @@ static const struct hid_blacklist {
54 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT }, 54 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT },
55 { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT }, 55 { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT },
56 56
57 { USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS, HID_QUIRK_NOGET },
57 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, 58 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
58 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, 59 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
59 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, 60 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 02260406b9e4..dad895fec62a 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -497,8 +497,9 @@ config SENSORS_JC42
497 If you say yes here, you get support for JEDEC JC42.4 compliant 497 If you say yes here, you get support for JEDEC JC42.4 compliant
498 temperature sensors, which are used on many DDR3 memory modules for 498 temperature sensors, which are used on many DDR3 memory modules for
499 mobile devices and servers. Support will include, but not be limited 499 mobile devices and servers. Support will include, but not be limited
500 to, ADT7408, CAT34TS02, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243, 500 to, ADT7408, AT30TS00, CAT34TS02, CAT6095, MAX6604, MCP9804, MCP9805,
501 MCP9843, SE97, SE98, STTS424(E), TSE2002B3, and TS3000B3. 501 MCP98242, MCP98243, MCP9843, SE97, SE98, STTS424(E), STTS2002,
502 STTS3000, TSE2002B3, TSE2002GB2, TS3000B3, and TS3000GB2.
502 503
503 This driver can also be built as a module. If so, the module 504 This driver can also be built as a module. If so, the module
504 will be called jc42. 505 will be called jc42.
diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
index 28c09eead36b..b927ee5ccdd7 100644
--- a/drivers/hwmon/jc42.c
+++ b/drivers/hwmon/jc42.c
@@ -64,6 +64,7 @@ static const unsigned short normal_i2c[] = {
64 64
65/* Manufacturer IDs */ 65/* Manufacturer IDs */
66#define ADT_MANID 0x11d4 /* Analog Devices */ 66#define ADT_MANID 0x11d4 /* Analog Devices */
67#define ATMEL_MANID 0x001f /* Atmel */
67#define MAX_MANID 0x004d /* Maxim */ 68#define MAX_MANID 0x004d /* Maxim */
68#define IDT_MANID 0x00b3 /* IDT */ 69#define IDT_MANID 0x00b3 /* IDT */
69#define MCP_MANID 0x0054 /* Microchip */ 70#define MCP_MANID 0x0054 /* Microchip */
@@ -77,15 +78,25 @@ static const unsigned short normal_i2c[] = {
77#define ADT7408_DEVID 0x0801 78#define ADT7408_DEVID 0x0801
78#define ADT7408_DEVID_MASK 0xffff 79#define ADT7408_DEVID_MASK 0xffff
79 80
81/* Atmel */
82#define AT30TS00_DEVID 0x8201
83#define AT30TS00_DEVID_MASK 0xffff
84
80/* IDT */ 85/* IDT */
81#define TS3000B3_DEVID 0x2903 /* Also matches TSE2002B3 */ 86#define TS3000B3_DEVID 0x2903 /* Also matches TSE2002B3 */
82#define TS3000B3_DEVID_MASK 0xffff 87#define TS3000B3_DEVID_MASK 0xffff
83 88
89#define TS3000GB2_DEVID 0x2912 /* Also matches TSE2002GB2 */
90#define TS3000GB2_DEVID_MASK 0xffff
91
84/* Maxim */ 92/* Maxim */
85#define MAX6604_DEVID 0x3e00 93#define MAX6604_DEVID 0x3e00
86#define MAX6604_DEVID_MASK 0xffff 94#define MAX6604_DEVID_MASK 0xffff
87 95
88/* Microchip */ 96/* Microchip */
97#define MCP9804_DEVID 0x0200
98#define MCP9804_DEVID_MASK 0xfffc
99
89#define MCP98242_DEVID 0x2000 100#define MCP98242_DEVID 0x2000
90#define MCP98242_DEVID_MASK 0xfffc 101#define MCP98242_DEVID_MASK 0xfffc
91 102
@@ -113,6 +124,12 @@ static const unsigned short normal_i2c[] = {
113#define STTS424E_DEVID 0x0000 124#define STTS424E_DEVID 0x0000
114#define STTS424E_DEVID_MASK 0xfffe 125#define STTS424E_DEVID_MASK 0xfffe
115 126
127#define STTS2002_DEVID 0x0300
128#define STTS2002_DEVID_MASK 0xffff
129
130#define STTS3000_DEVID 0x0200
131#define STTS3000_DEVID_MASK 0xffff
132
116static u16 jc42_hysteresis[] = { 0, 1500, 3000, 6000 }; 133static u16 jc42_hysteresis[] = { 0, 1500, 3000, 6000 };
117 134
118struct jc42_chips { 135struct jc42_chips {
@@ -123,8 +140,11 @@ struct jc42_chips {
123 140
124static struct jc42_chips jc42_chips[] = { 141static struct jc42_chips jc42_chips[] = {
125 { ADT_MANID, ADT7408_DEVID, ADT7408_DEVID_MASK }, 142 { ADT_MANID, ADT7408_DEVID, ADT7408_DEVID_MASK },
143 { ATMEL_MANID, AT30TS00_DEVID, AT30TS00_DEVID_MASK },
126 { IDT_MANID, TS3000B3_DEVID, TS3000B3_DEVID_MASK }, 144 { IDT_MANID, TS3000B3_DEVID, TS3000B3_DEVID_MASK },
145 { IDT_MANID, TS3000GB2_DEVID, TS3000GB2_DEVID_MASK },
127 { MAX_MANID, MAX6604_DEVID, MAX6604_DEVID_MASK }, 146 { MAX_MANID, MAX6604_DEVID, MAX6604_DEVID_MASK },
147 { MCP_MANID, MCP9804_DEVID, MCP9804_DEVID_MASK },
128 { MCP_MANID, MCP98242_DEVID, MCP98242_DEVID_MASK }, 148 { MCP_MANID, MCP98242_DEVID, MCP98242_DEVID_MASK },
129 { MCP_MANID, MCP98243_DEVID, MCP98243_DEVID_MASK }, 149 { MCP_MANID, MCP98243_DEVID, MCP98243_DEVID_MASK },
130 { MCP_MANID, MCP9843_DEVID, MCP9843_DEVID_MASK }, 150 { MCP_MANID, MCP9843_DEVID, MCP9843_DEVID_MASK },
@@ -133,6 +153,8 @@ static struct jc42_chips jc42_chips[] = {
133 { NXP_MANID, SE98_DEVID, SE98_DEVID_MASK }, 153 { NXP_MANID, SE98_DEVID, SE98_DEVID_MASK },
134 { STM_MANID, STTS424_DEVID, STTS424_DEVID_MASK }, 154 { STM_MANID, STTS424_DEVID, STTS424_DEVID_MASK },
135 { STM_MANID, STTS424E_DEVID, STTS424E_DEVID_MASK }, 155 { STM_MANID, STTS424E_DEVID, STTS424E_DEVID_MASK },
156 { STM_MANID, STTS2002_DEVID, STTS2002_DEVID_MASK },
157 { STM_MANID, STTS3000_DEVID, STTS3000_DEVID_MASK },
136}; 158};
137 159
138/* Each client has this additional data */ 160/* Each client has this additional data */
@@ -159,10 +181,12 @@ static struct jc42_data *jc42_update_device(struct device *dev);
159 181
160static const struct i2c_device_id jc42_id[] = { 182static const struct i2c_device_id jc42_id[] = {
161 { "adt7408", 0 }, 183 { "adt7408", 0 },
184 { "at30ts00", 0 },
162 { "cat94ts02", 0 }, 185 { "cat94ts02", 0 },
163 { "cat6095", 0 }, 186 { "cat6095", 0 },
164 { "jc42", 0 }, 187 { "jc42", 0 },
165 { "max6604", 0 }, 188 { "max6604", 0 },
189 { "mcp9804", 0 },
166 { "mcp9805", 0 }, 190 { "mcp9805", 0 },
167 { "mcp98242", 0 }, 191 { "mcp98242", 0 },
168 { "mcp98243", 0 }, 192 { "mcp98243", 0 },
@@ -171,8 +195,10 @@ static const struct i2c_device_id jc42_id[] = {
171 { "se97b", 0 }, 195 { "se97b", 0 },
172 { "se98", 0 }, 196 { "se98", 0 },
173 { "stts424", 0 }, 197 { "stts424", 0 },
174 { "tse2002b3", 0 }, 198 { "stts2002", 0 },
175 { "ts3000b3", 0 }, 199 { "stts3000", 0 },
200 { "tse2002", 0 },
201 { "ts3000", 0 },
176 { } 202 { }
177}; 203};
178MODULE_DEVICE_TABLE(i2c, jc42_id); 204MODULE_DEVICE_TABLE(i2c, jc42_id);
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 00460d8d8423..d89b33967a85 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -54,7 +54,8 @@
54 lcrit_alarm, crit_alarm */ 54 lcrit_alarm, crit_alarm */
55#define PMBUS_IOUT_BOOLEANS_PER_PAGE 3 /* alarm, lcrit_alarm, 55#define PMBUS_IOUT_BOOLEANS_PER_PAGE 3 /* alarm, lcrit_alarm,
56 crit_alarm */ 56 crit_alarm */
57#define PMBUS_POUT_BOOLEANS_PER_PAGE 2 /* alarm, crit_alarm */ 57#define PMBUS_POUT_BOOLEANS_PER_PAGE 3 /* cap_alarm, alarm, crit_alarm
58 */
58#define PMBUS_MAX_BOOLEANS_PER_FAN 2 /* alarm, fault */ 59#define PMBUS_MAX_BOOLEANS_PER_FAN 2 /* alarm, fault */
59#define PMBUS_MAX_BOOLEANS_PER_TEMP 4 /* min_alarm, max_alarm, 60#define PMBUS_MAX_BOOLEANS_PER_TEMP 4 /* min_alarm, max_alarm,
60 lcrit_alarm, crit_alarm */ 61 lcrit_alarm, crit_alarm */
diff --git a/drivers/hwmon/pmbus/zl6100.c b/drivers/hwmon/pmbus/zl6100.c
index 48c7b4a716ae..880b90cf4d32 100644
--- a/drivers/hwmon/pmbus/zl6100.c
+++ b/drivers/hwmon/pmbus/zl6100.c
@@ -33,6 +33,7 @@ enum chips { zl2004, zl2005, zl2006, zl2008, zl2105, zl2106, zl6100, zl6105 };
33struct zl6100_data { 33struct zl6100_data {
34 int id; 34 int id;
35 ktime_t access; /* chip access time */ 35 ktime_t access; /* chip access time */
36 int delay; /* Delay between chip accesses in uS */
36 struct pmbus_driver_info info; 37 struct pmbus_driver_info info;
37}; 38};
38 39
@@ -52,10 +53,10 @@ MODULE_PARM_DESC(delay, "Delay between chip accesses in uS");
52/* Some chips need a delay between accesses */ 53/* Some chips need a delay between accesses */
53static inline void zl6100_wait(const struct zl6100_data *data) 54static inline void zl6100_wait(const struct zl6100_data *data)
54{ 55{
55 if (delay) { 56 if (data->delay) {
56 s64 delta = ktime_us_delta(ktime_get(), data->access); 57 s64 delta = ktime_us_delta(ktime_get(), data->access);
57 if (delta < delay) 58 if (delta < data->delay)
58 udelay(delay - delta); 59 udelay(data->delay - delta);
59 } 60 }
60} 61}
61 62
@@ -207,8 +208,9 @@ static int zl6100_probe(struct i2c_client *client,
207 * can be cleared later for additional chips if tests show that it 208 * can be cleared later for additional chips if tests show that it
208 * is not needed (in other words, better be safe than sorry). 209 * is not needed (in other words, better be safe than sorry).
209 */ 210 */
211 data->delay = delay;
210 if (data->id == zl2004 || data->id == zl6105) 212 if (data->id == zl2004 || data->id == zl6105)
211 delay = 0; 213 data->delay = 0;
212 214
213 /* 215 /*
214 * Since there was a direct I2C device access above, wait before 216 * Since there was a direct I2C device access above, wait before
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index afc166fcc3d9..7df5bfef2624 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
332 struct evdev_client *client = file->private_data; 332 struct evdev_client *client = file->private_data;
333 struct evdev *evdev = client->evdev; 333 struct evdev *evdev = client->evdev;
334 struct input_event event; 334 struct input_event event;
335 int retval; 335 int retval = 0;
336 336
337 if (count < input_event_size()) 337 if (count < input_event_size())
338 return -EINVAL; 338 return -EINVAL;
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c
index 37651373a95b..f3bc4189a7ba 100644
--- a/drivers/input/misc/twl4030-vibra.c
+++ b/drivers/input/misc/twl4030-vibra.c
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
172} 172}
173 173
174/*** Module ***/ 174/*** Module ***/
175#if CONFIG_PM 175#if CONFIG_PM_SLEEP
176static int twl4030_vibra_suspend(struct device *dev) 176static int twl4030_vibra_suspend(struct device *dev)
177{ 177{
178 struct platform_device *pdev = to_platform_device(dev); 178 struct platform_device *pdev = to_platform_device(dev);
@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev)
189 vibra_disable_leds(); 189 vibra_disable_leds();
190 return 0; 190 return 0;
191} 191}
192#endif
192 193
193static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, 194static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
194 twl4030_vibra_suspend, twl4030_vibra_resume); 195 twl4030_vibra_suspend, twl4030_vibra_resume);
195#endif
196 196
197static int __devinit twl4030_vibra_probe(struct platform_device *pdev) 197static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
198{ 198{
@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
273 .driver = { 273 .driver = {
274 .name = "twl4030-vibra", 274 .name = "twl4030-vibra",
275 .owner = THIS_MODULE, 275 .owner = THIS_MODULE,
276#ifdef CONFIG_PM
277 .pm = &twl4030_vibra_pm_ops, 276 .pm = &twl4030_vibra_pm_ops,
278#endif
279 }, 277 },
280}; 278};
281module_platform_driver(twl4030_vibra_driver); 279module_platform_driver(twl4030_vibra_driver);
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index bd87380bd879..4c6a72d3d48c 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
952 952
953 /* 953 /*
954 * First try "E6 report". 954 * First try "E6 report".
955 * ALPS should return 0,0,10 or 0,0,100 955 * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
956 * The bits 0-2 of the first byte will be 1s if some buttons are
957 * pressed.
956 */ 958 */
957 param[0] = 0; 959 param[0] = 0;
958 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || 960 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
968 psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", 970 psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
969 param[0], param[1], param[2]); 971 param[0], param[1], param[2]);
970 972
971 if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100)) 973 if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
974 (param[2] != 10 && param[2] != 100))
972 return NULL; 975 return NULL;
973 976
974 /* 977 /*
diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig
index 58a87755b936..e53f4081a586 100644
--- a/drivers/input/tablet/Kconfig
+++ b/drivers/input/tablet/Kconfig
@@ -77,6 +77,8 @@ config TABLET_USB_WACOM
77 tristate "Wacom Intuos/Graphire tablet support (USB)" 77 tristate "Wacom Intuos/Graphire tablet support (USB)"
78 depends on USB_ARCH_HAS_HCD 78 depends on USB_ARCH_HAS_HCD
79 select USB 79 select USB
80 select NEW_LEDS
81 select LEDS_CLASS
80 help 82 help
81 Say Y here if you want to use the USB version of the Wacom Intuos 83 Say Y here if you want to use the USB version of the Wacom Intuos
82 or Graphire tablet. Make sure to say Y to "Mouse support" 84 or Graphire tablet. Make sure to say Y to "Mouse support"
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 88672ec296c1..cd3ed29e0801 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -926,7 +926,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
926{ 926{
927 struct input_dev *input = wacom->input; 927 struct input_dev *input = wacom->input;
928 unsigned char *data = wacom->data; 928 unsigned char *data = wacom->data;
929 int count = data[1] & 0x03; 929 int count = data[1] & 0x07;
930 int i; 930 int i;
931 931
932 if (data[0] != 0x02) 932 if (data[0] != 0x02)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index bdea288dc185..a35e98ad9725 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -275,7 +275,7 @@ static void iommu_set_exclusion_range(struct amd_iommu *iommu)
275} 275}
276 276
277/* Programs the physical address of the device table into the IOMMU hardware */ 277/* Programs the physical address of the device table into the IOMMU hardware */
278static void __init iommu_set_device_table(struct amd_iommu *iommu) 278static void iommu_set_device_table(struct amd_iommu *iommu)
279{ 279{
280 u64 entry; 280 u64 entry;
281 281
diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c
index 9fb18c147825..b280c433e4a0 100644
--- a/drivers/md/dm-flakey.c
+++ b/drivers/md/dm-flakey.c
@@ -323,7 +323,7 @@ static int flakey_end_io(struct dm_target *ti, struct bio *bio,
323 * Corrupt successful READs while in down state. 323 * Corrupt successful READs while in down state.
324 * If flags were specified, only corrupt those that match. 324 * If flags were specified, only corrupt those that match.
325 */ 325 */
326 if (!error && bio_submitted_while_down && 326 if (fc->corrupt_bio_byte && !error && bio_submitted_while_down &&
327 (bio_data_dir(bio) == READ) && (fc->corrupt_bio_rw == READ) && 327 (bio_data_dir(bio) == READ) && (fc->corrupt_bio_rw == READ) &&
328 all_corrupt_bio_flags_match(bio, fc)) 328 all_corrupt_bio_flags_match(bio, fc))
329 corrupt_bio_data(bio, fc); 329 corrupt_bio_data(bio, fc);
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index ad2eba40e319..ea5dd289fe2a 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -296,6 +296,8 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
296 unsigned offset; 296 unsigned offset;
297 unsigned num_bvecs; 297 unsigned num_bvecs;
298 sector_t remaining = where->count; 298 sector_t remaining = where->count;
299 struct request_queue *q = bdev_get_queue(where->bdev);
300 sector_t discard_sectors;
299 301
300 /* 302 /*
301 * where->count may be zero if rw holds a flush and we need to 303 * where->count may be zero if rw holds a flush and we need to
@@ -305,9 +307,12 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
305 /* 307 /*
306 * Allocate a suitably sized-bio. 308 * Allocate a suitably sized-bio.
307 */ 309 */
308 num_bvecs = dm_sector_div_up(remaining, 310 if (rw & REQ_DISCARD)
309 (PAGE_SIZE >> SECTOR_SHIFT)); 311 num_bvecs = 1;
310 num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev), num_bvecs); 312 else
313 num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev),
314 dm_sector_div_up(remaining, (PAGE_SIZE >> SECTOR_SHIFT)));
315
311 bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); 316 bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios);
312 bio->bi_sector = where->sector + (where->count - remaining); 317 bio->bi_sector = where->sector + (where->count - remaining);
313 bio->bi_bdev = where->bdev; 318 bio->bi_bdev = where->bdev;
@@ -315,10 +320,14 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
315 bio->bi_destructor = dm_bio_destructor; 320 bio->bi_destructor = dm_bio_destructor;
316 store_io_and_region_in_bio(bio, io, region); 321 store_io_and_region_in_bio(bio, io, region);
317 322
318 /* 323 if (rw & REQ_DISCARD) {
319 * Try and add as many pages as possible. 324 discard_sectors = min_t(sector_t, q->limits.max_discard_sectors, remaining);
320 */ 325 bio->bi_size = discard_sectors << SECTOR_SHIFT;
321 while (remaining) { 326 remaining -= discard_sectors;
327 } else while (remaining) {
328 /*
329 * Try and add as many pages as possible.
330 */
322 dp->get_page(dp, &page, &len, &offset); 331 dp->get_page(dp, &page, &len, &offset);
323 len = min(len, to_bytes(remaining)); 332 len = min(len, to_bytes(remaining));
324 if (!bio_add_page(bio, page, len, offset)) 333 if (!bio_add_page(bio, page, len, offset))
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 31c2dc25886d..1ce84ed0b765 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1437,7 +1437,7 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
1437 1437
1438 if (!argc) { 1438 if (!argc) {
1439 DMWARN("Empty message received."); 1439 DMWARN("Empty message received.");
1440 goto out; 1440 goto out_argv;
1441 } 1441 }
1442 1442
1443 table = dm_get_live_table(md); 1443 table = dm_get_live_table(md);
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 86cb7e5d83d5..787022c18187 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -668,7 +668,14 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev)
668 return ret; 668 return ret;
669 669
670 sb = page_address(rdev->sb_page); 670 sb = page_address(rdev->sb_page);
671 if (sb->magic != cpu_to_le32(DM_RAID_MAGIC)) { 671
672 /*
673 * Two cases that we want to write new superblocks and rebuild:
674 * 1) New device (no matching magic number)
675 * 2) Device specified for rebuild (!In_sync w/ offset == 0)
676 */
677 if ((sb->magic != cpu_to_le32(DM_RAID_MAGIC)) ||
678 (!test_bit(In_sync, &rdev->flags) && !rdev->recovery_offset)) {
672 super_sync(rdev->mddev, rdev); 679 super_sync(rdev->mddev, rdev);
673 680
674 set_bit(FirstUse, &rdev->flags); 681 set_bit(FirstUse, &rdev->flags);
@@ -745,11 +752,8 @@ static int super_init_validation(struct mddev *mddev, struct md_rdev *rdev)
745 */ 752 */
746 rdev_for_each(r, t, mddev) { 753 rdev_for_each(r, t, mddev) {
747 if (!test_bit(In_sync, &r->flags)) { 754 if (!test_bit(In_sync, &r->flags)) {
748 if (!test_bit(FirstUse, &r->flags)) 755 DMINFO("Device %d specified for rebuild: "
749 DMERR("Superblock area of " 756 "Clearing superblock", r->raid_disk);
750 "rebuild device %d should have been "
751 "cleared.", r->raid_disk);
752 set_bit(FirstUse, &r->flags);
753 rebuilds++; 757 rebuilds++;
754 } else if (test_bit(FirstUse, &r->flags)) 758 } else if (test_bit(FirstUse, &r->flags))
755 new_devs++; 759 new_devs++;
@@ -971,6 +975,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
971 975
972 INIT_WORK(&rs->md.event_work, do_table_event); 976 INIT_WORK(&rs->md.event_work, do_table_event);
973 ti->private = rs; 977 ti->private = rs;
978 ti->num_flush_requests = 1;
974 979
975 mutex_lock(&rs->md.reconfig_mutex); 980 mutex_lock(&rs->md.reconfig_mutex);
976 ret = md_run(&rs->md); 981 ret = md_run(&rs->md);
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index 59c4f0446ffa..237571af77fd 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
385 data_sm = dm_sm_disk_create(tm, nr_blocks); 385 data_sm = dm_sm_disk_create(tm, nr_blocks);
386 if (IS_ERR(data_sm)) { 386 if (IS_ERR(data_sm)) {
387 DMERR("sm_disk_create failed"); 387 DMERR("sm_disk_create failed");
388 dm_tm_unlock(tm, sblock);
388 r = PTR_ERR(data_sm); 389 r = PTR_ERR(data_sm);
389 goto bad; 390 goto bad;
390 } 391 }
@@ -789,6 +790,11 @@ int dm_pool_metadata_close(struct dm_pool_metadata *pmd)
789 return 0; 790 return 0;
790} 791}
791 792
793/*
794 * __open_device: Returns @td corresponding to device with id @dev,
795 * creating it if @create is set and incrementing @td->open_count.
796 * On failure, @td is undefined.
797 */
792static int __open_device(struct dm_pool_metadata *pmd, 798static int __open_device(struct dm_pool_metadata *pmd,
793 dm_thin_id dev, int create, 799 dm_thin_id dev, int create,
794 struct dm_thin_device **td) 800 struct dm_thin_device **td)
@@ -799,10 +805,16 @@ static int __open_device(struct dm_pool_metadata *pmd,
799 struct disk_device_details details_le; 805 struct disk_device_details details_le;
800 806
801 /* 807 /*
802 * Check the device isn't already open. 808 * If the device is already open, return it.
803 */ 809 */
804 list_for_each_entry(td2, &pmd->thin_devices, list) 810 list_for_each_entry(td2, &pmd->thin_devices, list)
805 if (td2->id == dev) { 811 if (td2->id == dev) {
812 /*
813 * May not create an already-open device.
814 */
815 if (create)
816 return -EEXIST;
817
806 td2->open_count++; 818 td2->open_count++;
807 *td = td2; 819 *td = td2;
808 return 0; 820 return 0;
@@ -817,6 +829,9 @@ static int __open_device(struct dm_pool_metadata *pmd,
817 if (r != -ENODATA || !create) 829 if (r != -ENODATA || !create)
818 return r; 830 return r;
819 831
832 /*
833 * Create new device.
834 */
820 changed = 1; 835 changed = 1;
821 details_le.mapped_blocks = 0; 836 details_le.mapped_blocks = 0;
822 details_le.transaction_id = cpu_to_le64(pmd->trans_id); 837 details_le.transaction_id = cpu_to_le64(pmd->trans_id);
@@ -882,12 +897,10 @@ static int __create_thin(struct dm_pool_metadata *pmd,
882 897
883 r = __open_device(pmd, dev, 1, &td); 898 r = __open_device(pmd, dev, 1, &td);
884 if (r) { 899 if (r) {
885 __close_device(td);
886 dm_btree_remove(&pmd->tl_info, pmd->root, &key, &pmd->root); 900 dm_btree_remove(&pmd->tl_info, pmd->root, &key, &pmd->root);
887 dm_btree_del(&pmd->bl_info, dev_root); 901 dm_btree_del(&pmd->bl_info, dev_root);
888 return r; 902 return r;
889 } 903 }
890 td->changed = 1;
891 __close_device(td); 904 __close_device(td);
892 905
893 return r; 906 return r;
@@ -967,14 +980,14 @@ static int __create_snap(struct dm_pool_metadata *pmd,
967 goto bad; 980 goto bad;
968 981
969 r = __set_snapshot_details(pmd, td, origin, pmd->time); 982 r = __set_snapshot_details(pmd, td, origin, pmd->time);
983 __close_device(td);
984
970 if (r) 985 if (r)
971 goto bad; 986 goto bad;
972 987
973 __close_device(td);
974 return 0; 988 return 0;
975 989
976bad: 990bad:
977 __close_device(td);
978 dm_btree_remove(&pmd->tl_info, pmd->root, &key, &pmd->root); 991 dm_btree_remove(&pmd->tl_info, pmd->root, &key, &pmd->root);
979 dm_btree_remove(&pmd->details_info, pmd->details_root, 992 dm_btree_remove(&pmd->details_info, pmd->details_root,
980 &key, &pmd->details_root); 993 &key, &pmd->details_root);
@@ -1211,6 +1224,8 @@ static int __remove(struct dm_thin_device *td, dm_block_t block)
1211 if (r) 1224 if (r)
1212 return r; 1225 return r;
1213 1226
1227 td->mapped_blocks--;
1228 td->changed = 1;
1214 pmd->need_commit = 1; 1229 pmd->need_commit = 1;
1215 1230
1216 return 0; 1231 return 0;
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a368db2431a5..a0b225eb4ac4 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -624,7 +624,7 @@ int md_raid1_congested(struct mddev *mddev, int bits)
624 return 1; 624 return 1;
625 625
626 rcu_read_lock(); 626 rcu_read_lock();
627 for (i = 0; i < conf->raid_disks; i++) { 627 for (i = 0; i < conf->raid_disks * 2; i++) {
628 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); 628 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
629 if (rdev && !test_bit(Faulty, &rdev->flags)) { 629 if (rdev && !test_bit(Faulty, &rdev->flags)) {
630 struct request_queue *q = bdev_get_queue(rdev->bdev); 630 struct request_queue *q = bdev_get_queue(rdev->bdev);
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 6e8aa213f0d5..58c44d6453a0 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -67,6 +67,7 @@ static int max_queued_requests = 1024;
67 67
68static void allow_barrier(struct r10conf *conf); 68static void allow_barrier(struct r10conf *conf);
69static void lower_barrier(struct r10conf *conf); 69static void lower_barrier(struct r10conf *conf);
70static int enough(struct r10conf *conf, int ignore);
70 71
71static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data) 72static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data)
72{ 73{
@@ -347,6 +348,19 @@ static void raid10_end_read_request(struct bio *bio, int error)
347 * wait for the 'master' bio. 348 * wait for the 'master' bio.
348 */ 349 */
349 set_bit(R10BIO_Uptodate, &r10_bio->state); 350 set_bit(R10BIO_Uptodate, &r10_bio->state);
351 } else {
352 /* If all other devices that store this block have
353 * failed, we want to return the error upwards rather
354 * than fail the last device. Here we redefine
355 * "uptodate" to mean "Don't want to retry"
356 */
357 unsigned long flags;
358 spin_lock_irqsave(&conf->device_lock, flags);
359 if (!enough(conf, rdev->raid_disk))
360 uptodate = 1;
361 spin_unlock_irqrestore(&conf->device_lock, flags);
362 }
363 if (uptodate) {
350 raid_end_bio_io(r10_bio); 364 raid_end_bio_io(r10_bio);
351 rdev_dec_pending(rdev, conf->mddev); 365 rdev_dec_pending(rdev, conf->mddev);
352 } else { 366 } else {
@@ -2052,6 +2066,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
2052 "md/raid10:%s: %s: Failing raid device\n", 2066 "md/raid10:%s: %s: Failing raid device\n",
2053 mdname(mddev), b); 2067 mdname(mddev), b);
2054 md_error(mddev, conf->mirrors[d].rdev); 2068 md_error(mddev, conf->mirrors[d].rdev);
2069 r10_bio->devs[r10_bio->read_slot].bio = IO_BLOCKED;
2055 return; 2070 return;
2056 } 2071 }
2057 2072
@@ -2105,8 +2120,11 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
2105 rdev, 2120 rdev,
2106 r10_bio->devs[r10_bio->read_slot].addr 2121 r10_bio->devs[r10_bio->read_slot].addr
2107 + sect, 2122 + sect,
2108 s, 0)) 2123 s, 0)) {
2109 md_error(mddev, rdev); 2124 md_error(mddev, rdev);
2125 r10_bio->devs[r10_bio->read_slot].bio
2126 = IO_BLOCKED;
2127 }
2110 break; 2128 break;
2111 } 2129 }
2112 2130
@@ -2299,17 +2317,20 @@ static void handle_read_error(struct mddev *mddev, struct r10bio *r10_bio)
2299 * This is all done synchronously while the array is 2317 * This is all done synchronously while the array is
2300 * frozen. 2318 * frozen.
2301 */ 2319 */
2320 bio = r10_bio->devs[slot].bio;
2321 bdevname(bio->bi_bdev, b);
2322 bio_put(bio);
2323 r10_bio->devs[slot].bio = NULL;
2324
2302 if (mddev->ro == 0) { 2325 if (mddev->ro == 0) {
2303 freeze_array(conf); 2326 freeze_array(conf);
2304 fix_read_error(conf, mddev, r10_bio); 2327 fix_read_error(conf, mddev, r10_bio);
2305 unfreeze_array(conf); 2328 unfreeze_array(conf);
2306 } 2329 } else
2330 r10_bio->devs[slot].bio = IO_BLOCKED;
2331
2307 rdev_dec_pending(rdev, mddev); 2332 rdev_dec_pending(rdev, mddev);
2308 2333
2309 bio = r10_bio->devs[slot].bio;
2310 bdevname(bio->bi_bdev, b);
2311 r10_bio->devs[slot].bio =
2312 mddev->ro ? IO_BLOCKED : NULL;
2313read_more: 2334read_more:
2314 rdev = read_balance(conf, r10_bio, &max_sectors); 2335 rdev = read_balance(conf, r10_bio, &max_sectors);
2315 if (rdev == NULL) { 2336 if (rdev == NULL) {
@@ -2318,13 +2339,10 @@ read_more:
2318 mdname(mddev), b, 2339 mdname(mddev), b,
2319 (unsigned long long)r10_bio->sector); 2340 (unsigned long long)r10_bio->sector);
2320 raid_end_bio_io(r10_bio); 2341 raid_end_bio_io(r10_bio);
2321 bio_put(bio);
2322 return; 2342 return;
2323 } 2343 }
2324 2344
2325 do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC); 2345 do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
2326 if (bio)
2327 bio_put(bio);
2328 slot = r10_bio->read_slot; 2346 slot = r10_bio->read_slot;
2329 printk_ratelimited( 2347 printk_ratelimited(
2330 KERN_ERR 2348 KERN_ERR
@@ -2360,7 +2378,6 @@ read_more:
2360 mbio->bi_phys_segments++; 2378 mbio->bi_phys_segments++;
2361 spin_unlock_irq(&conf->device_lock); 2379 spin_unlock_irq(&conf->device_lock);
2362 generic_make_request(bio); 2380 generic_make_request(bio);
2363 bio = NULL;
2364 2381
2365 r10_bio = mempool_alloc(conf->r10bio_pool, 2382 r10_bio = mempool_alloc(conf->r10bio_pool,
2366 GFP_NOIO); 2383 GFP_NOIO);
@@ -3243,7 +3260,6 @@ static int run(struct mddev *mddev)
3243 disk->rdev = rdev; 3260 disk->rdev = rdev;
3244 } 3261 }
3245 3262
3246 disk->rdev = rdev;
3247 disk_stack_limits(mddev->gendisk, rdev->bdev, 3263 disk_stack_limits(mddev->gendisk, rdev->bdev,
3248 rdev->data_offset << 9); 3264 rdev->data_offset << 9);
3249 /* as we don't honour merge_bvec_fn, we must never risk 3265 /* as we don't honour merge_bvec_fn, we must never risk
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 53e2a80f42fa..d295941c9a3d 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -956,11 +956,12 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
956 return ret; 956 return ret;
957 957
958out_freeirq: 958out_freeirq:
959 if (ab8500->irq_base) { 959 if (ab8500->irq_base)
960 free_irq(ab8500->irq, ab8500); 960 free_irq(ab8500->irq, ab8500);
961out_removeirq: 961out_removeirq:
962 if (ab8500->irq_base)
962 ab8500_irq_remove(ab8500); 963 ab8500_irq_remove(ab8500);
963 } 964
964 return ret; 965 return ret;
965} 966}
966 967
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 0f5922812bff..411f523d4878 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -123,7 +123,7 @@ static int mfd_add_device(struct device *parent, int id,
123 } 123 }
124 124
125 if (!cell->ignore_resource_conflicts) { 125 if (!cell->ignore_resource_conflicts) {
126 ret = acpi_check_resource_conflict(res); 126 ret = acpi_check_resource_conflict(&res[r]);
127 if (ret) 127 if (ret)
128 goto fail_res; 128 goto fail_res;
129 } 129 }
diff --git a/drivers/mfd/s5m-core.c b/drivers/mfd/s5m-core.c
index e075c113eec6..caadabeed8e9 100644
--- a/drivers/mfd/s5m-core.c
+++ b/drivers/mfd/s5m-core.c
@@ -105,7 +105,7 @@ static int s5m87xx_i2c_probe(struct i2c_client *i2c,
105 s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); 105 s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR);
106 i2c_set_clientdata(s5m87xx->rtc, s5m87xx); 106 i2c_set_clientdata(s5m87xx->rtc, s5m87xx);
107 107
108 if (pdata->cfg_pmic_irq) 108 if (pdata && pdata->cfg_pmic_irq)
109 pdata->cfg_pmic_irq(); 109 pdata->cfg_pmic_irq();
110 110
111 s5m_irq_init(s5m87xx); 111 s5m_irq_init(s5m87xx);
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 01cf5012a08f..4392f6bca156 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -168,7 +168,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
168 goto err; 168 goto err;
169 169
170 init_data->irq = pmic_plat_data->irq; 170 init_data->irq = pmic_plat_data->irq;
171 init_data->irq_base = pmic_plat_data->irq; 171 init_data->irq_base = pmic_plat_data->irq_base;
172 172
173 tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base); 173 tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base);
174 174
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
index 5fec23a9ac03..74fd8cb5f372 100644
--- a/drivers/mfd/tps65912-core.c
+++ b/drivers/mfd/tps65912-core.c
@@ -151,7 +151,7 @@ int tps65912_device_init(struct tps65912 *tps65912)
151 goto err; 151 goto err;
152 152
153 init_data->irq = pmic_plat_data->irq; 153 init_data->irq = pmic_plat_data->irq;
154 init_data->irq_base = pmic_plat_data->irq; 154 init_data->irq_base = pmic_plat_data->irq_base;
155 ret = tps65912_irq_init(tps65912, init_data->irq, init_data); 155 ret = tps65912_irq_init(tps65912, init_data->irq, init_data);
156 if (ret < 0) 156 if (ret < 0)
157 goto err; 157 goto err;
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
index 8a1fafd0bf7d..9fd01bf63c51 100644
--- a/drivers/mfd/wm8350-irq.c
+++ b/drivers/mfd/wm8350-irq.c
@@ -496,7 +496,6 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
496 496
497 mutex_init(&wm8350->irq_lock); 497 mutex_init(&wm8350->irq_lock);
498 wm8350->chip_irq = irq; 498 wm8350->chip_irq = irq;
499 wm8350->irq_base = pdata->irq_base;
500 499
501 if (pdata && pdata->irq_base > 0) 500 if (pdata && pdata->irq_base > 0)
502 irq_base = pdata->irq_base; 501 irq_base = pdata->irq_base;
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index f117e7fb9321..a04b3c108c8c 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -256,6 +256,20 @@ static int wm8994_suspend(struct device *dev)
256 break; 256 break;
257 } 257 }
258 258
259 switch (wm8994->type) {
260 case WM1811:
261 ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2);
262 if (ret < 0) {
263 dev_err(dev, "Failed to read jackdet: %d\n", ret);
264 } else if (ret & WM1811_JACKDET_MODE_MASK) {
265 dev_dbg(dev, "CODEC still active, ignoring suspend\n");
266 return 0;
267 }
268 break;
269 default:
270 break;
271 }
272
259 /* Disable LDO pulldowns while the device is suspended if we 273 /* Disable LDO pulldowns while the device is suspended if we
260 * don't know that something will be driving them. */ 274 * don't know that something will be driving them. */
261 if (!wm8994->ldo_ena_always_driven) 275 if (!wm8994->ldo_ena_always_driven)
diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c
index c598ae69b8ff..bc0c5096539a 100644
--- a/drivers/mfd/wm8994-regmap.c
+++ b/drivers/mfd/wm8994-regmap.c
@@ -806,6 +806,7 @@ static bool wm1811_readable_register(struct device *dev, unsigned int reg)
806 case WM8994_DC_SERVO_2: 806 case WM8994_DC_SERVO_2:
807 case WM8994_DC_SERVO_READBACK: 807 case WM8994_DC_SERVO_READBACK:
808 case WM8994_DC_SERVO_4: 808 case WM8994_DC_SERVO_4:
809 case WM8994_DC_SERVO_4E:
809 case WM8994_ANALOGUE_HP_1: 810 case WM8994_ANALOGUE_HP_1:
810 case WM8958_MIC_DETECT_1: 811 case WM8958_MIC_DETECT_1:
811 case WM8958_MIC_DETECT_2: 812 case WM8958_MIC_DETECT_2:
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
index 19fc7c1cb428..f428d86bfc10 100644
--- a/drivers/misc/c2port/core.c
+++ b/drivers/misc/c2port/core.c
@@ -984,9 +984,9 @@ static int __init c2port_init(void)
984 " - (C) 2007 Rodolfo Giometti\n"); 984 " - (C) 2007 Rodolfo Giometti\n");
985 985
986 c2port_class = class_create(THIS_MODULE, "c2port"); 986 c2port_class = class_create(THIS_MODULE, "c2port");
987 if (!c2port_class) { 987 if (IS_ERR(c2port_class)) {
988 printk(KERN_ERR "c2port: failed to allocate class\n"); 988 printk(KERN_ERR "c2port: failed to allocate class\n");
989 return -ENOMEM; 989 return PTR_ERR(c2port_class);
990 } 990 }
991 c2port_class->dev_attrs = c2port_attrs; 991 c2port_class->dev_attrs = c2port_attrs;
992 992
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 690255c7d4dc..132378b89d76 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2068,6 +2068,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
2068 */ 2068 */
2069 mmc_hw_reset_for_init(host); 2069 mmc_hw_reset_for_init(host);
2070 2070
2071 /* Initialization should be done at 3.3 V I/O voltage. */
2072 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
2073
2071 /* 2074 /*
2072 * sdio_reset sends CMD52 to reset card. Since we do not know 2075 * sdio_reset sends CMD52 to reset card. Since we do not know
2073 * if the card is being re-initialized, just send it. CMD52 2076 * if the card is being re-initialized, just send it. CMD52
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 30055f2b0d44..c3704e293a7b 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -238,10 +238,10 @@ static inline void mmc_host_clk_init(struct mmc_host *host)
238 /* Hold MCI clock for 8 cycles by default */ 238 /* Hold MCI clock for 8 cycles by default */
239 host->clk_delay = 8; 239 host->clk_delay = 8;
240 /* 240 /*
241 * Default clock gating delay is 200ms. 241 * Default clock gating delay is 0ms to avoid wasting power.
242 * This value can be tuned by writing into sysfs entry. 242 * This value can be tuned by writing into sysfs entry.
243 */ 243 */
244 host->clkgate_delay = 200; 244 host->clkgate_delay = 0;
245 host->clk_gated = false; 245 host->clk_gated = false;
246 INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work); 246 INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work);
247 spin_lock_init(&host->clk_lock); 247 spin_lock_init(&host->clk_lock);
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index a48066344fa8..2b9ed1401dc4 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -816,6 +816,9 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
816 if (!mmc_host_is_spi(host)) 816 if (!mmc_host_is_spi(host))
817 mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); 817 mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN);
818 818
819 /* Initialization should be done at 3.3 V I/O voltage. */
820 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
821
819 /* 822 /*
820 * Since we're changing the OCR value, we seem to 823 * Since we're changing the OCR value, we seem to
821 * need to tell some cards to go back to the idle 824 * need to tell some cards to go back to the idle
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 5017f9354ce2..c272c6868ecf 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -911,6 +911,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
911 BUG_ON(!host); 911 BUG_ON(!host);
912 WARN_ON(!host->claimed); 912 WARN_ON(!host->claimed);
913 913
914 /* The initialization should be done at 3.3 V I/O voltage. */
915 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
916
914 err = mmc_sd_get_cid(host, ocr, cid, &rocr); 917 err = mmc_sd_get_cid(host, ocr, cid, &rocr);
915 if (err) 918 if (err)
916 return err; 919 return err;
@@ -1156,11 +1159,6 @@ int mmc_attach_sd(struct mmc_host *host)
1156 BUG_ON(!host); 1159 BUG_ON(!host);
1157 WARN_ON(!host->claimed); 1160 WARN_ON(!host->claimed);
1158 1161
1159 /* Make sure we are at 3.3V signalling voltage */
1160 err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false);
1161 if (err)
1162 return err;
1163
1164 /* Disable preset value enable if already set since last time */ 1162 /* Disable preset value enable if already set since last time */
1165 if (host->ops->enable_preset_value) { 1163 if (host->ops->enable_preset_value) {
1166 mmc_host_clk_hold(host); 1164 mmc_host_clk_hold(host);
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 12cde6ee17f5..2c7c83f832d2 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -585,6 +585,9 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
585 * Inform the card of the voltage 585 * Inform the card of the voltage
586 */ 586 */
587 if (!powered_resume) { 587 if (!powered_resume) {
588 /* The initialization should be done at 3.3 V I/O voltage. */
589 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
590
588 err = mmc_send_io_op_cond(host, host->ocr, &ocr); 591 err = mmc_send_io_op_cond(host, host->ocr, &ocr);
589 if (err) 592 if (err)
590 goto err; 593 goto err;
@@ -996,6 +999,11 @@ static int mmc_sdio_power_restore(struct mmc_host *host)
996 * With these steps taken, mmc_select_voltage() is also required to 999 * With these steps taken, mmc_select_voltage() is also required to
997 * restore the correct voltage setting of the card. 1000 * restore the correct voltage setting of the card.
998 */ 1001 */
1002
1003 /* The initialization should be done at 3.3 V I/O voltage. */
1004 if (!mmc_card_keep_power(host))
1005 mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);
1006
999 sdio_reset(host); 1007 sdio_reset(host);
1000 mmc_go_idle(host); 1008 mmc_go_idle(host);
1001 mmc_send_if_cond(host, host->ocr_avail); 1009 mmc_send_if_cond(host, host->ocr_avail);
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 6985cdb0bb26..e4449a54ae8f 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1948,12 +1948,12 @@ static bool atmci_filter(struct dma_chan *chan, void *slave)
1948 } 1948 }
1949} 1949}
1950 1950
1951static void atmci_configure_dma(struct atmel_mci *host) 1951static bool atmci_configure_dma(struct atmel_mci *host)
1952{ 1952{
1953 struct mci_platform_data *pdata; 1953 struct mci_platform_data *pdata;
1954 1954
1955 if (host == NULL) 1955 if (host == NULL)
1956 return; 1956 return false;
1957 1957
1958 pdata = host->pdev->dev.platform_data; 1958 pdata = host->pdev->dev.platform_data;
1959 1959
@@ -1970,12 +1970,15 @@ static void atmci_configure_dma(struct atmel_mci *host)
1970 host->dma.chan = 1970 host->dma.chan =
1971 dma_request_channel(mask, atmci_filter, pdata->dma_slave); 1971 dma_request_channel(mask, atmci_filter, pdata->dma_slave);
1972 } 1972 }
1973 if (!host->dma.chan) 1973 if (!host->dma.chan) {
1974 dev_notice(&host->pdev->dev, "DMA not available, using PIO\n"); 1974 dev_warn(&host->pdev->dev, "no DMA channel available\n");
1975 else 1975 return false;
1976 } else {
1976 dev_info(&host->pdev->dev, 1977 dev_info(&host->pdev->dev,
1977 "Using %s for DMA transfers\n", 1978 "Using %s for DMA transfers\n",
1978 dma_chan_name(host->dma.chan)); 1979 dma_chan_name(host->dma.chan));
1980 return true;
1981 }
1979} 1982}
1980 1983
1981static inline unsigned int atmci_get_version(struct atmel_mci *host) 1984static inline unsigned int atmci_get_version(struct atmel_mci *host)
@@ -2085,8 +2088,7 @@ static int __init atmci_probe(struct platform_device *pdev)
2085 2088
2086 /* Get MCI capabilities and set operations according to it */ 2089 /* Get MCI capabilities and set operations according to it */
2087 atmci_get_cap(host); 2090 atmci_get_cap(host);
2088 if (host->caps.has_dma) { 2091 if (host->caps.has_dma && atmci_configure_dma(host)) {
2089 dev_info(&pdev->dev, "using DMA\n");
2090 host->prepare_data = &atmci_prepare_data_dma; 2092 host->prepare_data = &atmci_prepare_data_dma;
2091 host->submit_data = &atmci_submit_data_dma; 2093 host->submit_data = &atmci_submit_data_dma;
2092 host->stop_transfer = &atmci_stop_transfer_dma; 2094 host->stop_transfer = &atmci_stop_transfer_dma;
@@ -2096,15 +2098,12 @@ static int __init atmci_probe(struct platform_device *pdev)
2096 host->submit_data = &atmci_submit_data_pdc; 2098 host->submit_data = &atmci_submit_data_pdc;
2097 host->stop_transfer = &atmci_stop_transfer_pdc; 2099 host->stop_transfer = &atmci_stop_transfer_pdc;
2098 } else { 2100 } else {
2099 dev_info(&pdev->dev, "no DMA, no PDC\n"); 2101 dev_info(&pdev->dev, "using PIO\n");
2100 host->prepare_data = &atmci_prepare_data; 2102 host->prepare_data = &atmci_prepare_data;
2101 host->submit_data = &atmci_submit_data; 2103 host->submit_data = &atmci_submit_data;
2102 host->stop_transfer = &atmci_stop_transfer; 2104 host->stop_transfer = &atmci_stop_transfer;
2103 } 2105 }
2104 2106
2105 if (host->caps.has_dma)
2106 atmci_configure_dma(host);
2107
2108 platform_set_drvdata(pdev, host); 2107 platform_set_drvdata(pdev, host);
2109 2108
2110 /* We need at least one slot to succeed */ 2109 /* We need at least one slot to succeed */
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 304f2f98b680..bdfd05517dd5 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1271,12 +1271,13 @@ static int __devinit mmci_probe(struct amba_device *dev,
1271 /* 1271 /*
1272 * Block size can be up to 2048 bytes, but must be a power of two. 1272 * Block size can be up to 2048 bytes, but must be a power of two.
1273 */ 1273 */
1274 mmc->max_blk_size = 2048; 1274 mmc->max_blk_size = 1 << 11;
1275 1275
1276 /* 1276 /*
1277 * No limit on the number of blocks transferred. 1277 * Limit the number of blocks transferred so that we don't overflow
1278 * the maximum request size.
1278 */ 1279 */
1279 mmc->max_blk_count = mmc->max_req_size; 1280 mmc->max_blk_count = mmc->max_req_size >> 11;
1280 1281
1281 spin_lock_init(&host->lock); 1282 spin_lock_init(&host->lock);
1282 1283
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index d601e41af282..0be4e2013632 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -269,8 +269,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
269 imx_data->scratchpad = val; 269 imx_data->scratchpad = val;
270 return; 270 return;
271 case SDHCI_COMMAND: 271 case SDHCI_COMMAND:
272 if ((host->cmd->opcode == MMC_STOP_TRANSMISSION) 272 if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||
273 && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) 273 host->cmd->opcode == MMC_SET_BLOCK_COUNT) &&
274 (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
274 val |= SDHCI_CMD_ABORTCMD; 275 val |= SDHCI_CMD_ABORTCMD;
275 276
276 if (is_imx6q_usdhc(imx_data)) { 277 if (is_imx6q_usdhc(imx_data)) {
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 0a4fc62a381d..c998e1afebc6 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -978,7 +978,7 @@ static void cfhsi_setup(struct net_device *dev)
978 dev->netdev_ops = &cfhsi_ops; 978 dev->netdev_ops = &cfhsi_ops;
979 dev->type = ARPHRD_CAIF; 979 dev->type = ARPHRD_CAIF;
980 dev->flags = IFF_POINTOPOINT | IFF_NOARP; 980 dev->flags = IFF_POINTOPOINT | IFF_NOARP;
981 dev->mtu = CFHSI_MAX_PAYLOAD_SZ; 981 dev->mtu = CFHSI_MAX_CAIF_FRAME_SZ;
982 dev->tx_queue_len = 0; 982 dev->tx_queue_len = 0;
983 dev->destructor = free_netdev; 983 dev->destructor = free_netdev;
984 skb_queue_head_init(&cfhsi->qhead); 984 skb_queue_head_init(&cfhsi->qhead);
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 1ff3c6df35a2..47a9bb2c813c 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1710,7 +1710,7 @@ static irqreturn_t atl1c_intr(int irq, void *data)
1710 "atl1c hardware error (status = 0x%x)\n", 1710 "atl1c hardware error (status = 0x%x)\n",
1711 status & ISR_ERROR); 1711 status & ISR_ERROR);
1712 /* reset MAC */ 1712 /* reset MAC */
1713 adapter->work_event |= ATL1C_WORK_EVENT_RESET; 1713 set_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event);
1714 schedule_work(&adapter->common_task); 1714 schedule_work(&adapter->common_task);
1715 return IRQ_HANDLED; 1715 return IRQ_HANDLED;
1716 } 1716 }
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 7aee46983be4..99389c8dda21 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -1934,7 +1934,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
1934 } 1934 }
1935 1935
1936 if (bp->port.pmf) 1936 if (bp->port.pmf)
1937 bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0); 1937 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
1938 else 1938 else
1939 bnx2x__link_status_update(bp); 1939 bnx2x__link_status_update(bp);
1940 1940
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index bf27c54ff2e0..4f40f7d7d8c6 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1179,10 +1179,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,
1179 */ 1179 */
1180static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) 1180static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp)
1181{ 1181{
1182 if (!CHIP_IS_E1x(fp->bp)) 1182 struct bnx2x *bp = fp->bp;
1183 if (!CHIP_IS_E1x(bp)) {
1184#ifdef BCM_CNIC
1185 /* there are special statistics counters for FCoE 136..140 */
1186 if (IS_FCOE_FP(fp))
1187 return bp->cnic_base_cl_id + (bp->pf_num >> 1);
1188#endif
1183 return fp->cl_id; 1189 return fp->cl_id;
1184 else 1190 }
1185 return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x; 1191 return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x;
1186} 1192}
1187 1193
1188static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, 1194static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
index 5051cf3deb20..6d82ade4c31c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
@@ -735,7 +735,9 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
735 bp->dcbx_error); 735 bp->dcbx_error);
736 736
737 /* mark DCBX result for PMF migration */ 737 /* mark DCBX result for PMF migration */
738 bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 1); 738 bnx2x_update_drv_flags(bp,
739 1 << DRV_FLAGS_DCB_CONFIGURED,
740 1);
739#ifdef BCM_DCBNL 741#ifdef BCM_DCBNL
740 /* 742 /*
741 * Add new app tlvs to dcbnl 743 * Add new app tlvs to dcbnl
@@ -1020,7 +1022,7 @@ void bnx2x_dcbx_init(struct bnx2x *bp)
1020 DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n", 1022 DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n",
1021 dcbx_lldp_params_offset); 1023 dcbx_lldp_params_offset);
1022 1024
1023 bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0); 1025 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
1024 1026
1025 if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) { 1027 if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) {
1026 bnx2x_dcbx_admin_mib_updated_params(bp, 1028 bnx2x_dcbx_admin_mib_updated_params(bp,
@@ -1857,7 +1859,7 @@ void bnx2x_dcbx_pmf_update(struct bnx2x *bp)
1857 * read it from shmem and update bp and netdev accordingly 1859 * read it from shmem and update bp and netdev accordingly
1858 */ 1860 */
1859 if (SHMEM2_HAS(bp, drv_flags) && 1861 if (SHMEM2_HAS(bp, drv_flags) &&
1860 GET_FLAGS(SHMEM2_RD(bp, drv_flags), DRV_FLAGS_DCB_CONFIGURED)) { 1862 GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) {
1861 /* Read neg results if dcbx is in the FW */ 1863 /* Read neg results if dcbx is in the FW */
1862 if (bnx2x_dcbx_read_shmem_neg_results(bp)) 1864 if (bnx2x_dcbx_read_shmem_neg_results(bp))
1863 return; 1865 return;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index cb6339c35571..94110e9ce51d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -5601,7 +5601,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp,
5601 5601
5602 /* Fill the ramrod data with provided parameters */ 5602 /* Fill the ramrod data with provided parameters */
5603 rdata->function_mode = cpu_to_le16(start_params->mf_mode); 5603 rdata->function_mode = cpu_to_le16(start_params->mf_mode);
5604 rdata->sd_vlan_tag = start_params->sd_vlan_tag; 5604 rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag);
5605 rdata->path_id = BP_PATH(bp); 5605 rdata->path_id = BP_PATH(bp);
5606 rdata->network_cos_mode = start_params->network_cos_mode; 5606 rdata->network_cos_mode = start_params->network_cos_mode;
5607 5607
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 1adef266fcd5..a766b25eec5f 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -554,23 +554,11 @@ static void bnx2x_bmac_stats_update(struct bnx2x *bp)
554 UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl); 554 UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl);
555 555
556 /* collect PFC stats */ 556 /* collect PFC stats */
557 DIFF_64(diff.hi, new->tx_stat_gtpp_hi,
558 pstats->pfc_frames_tx_hi,
559 diff.lo, new->tx_stat_gtpp_lo,
560 pstats->pfc_frames_tx_lo);
561 pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi; 557 pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi;
562 pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo; 558 pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo;
563 ADD_64(pstats->pfc_frames_tx_hi, diff.hi,
564 pstats->pfc_frames_tx_lo, diff.lo);
565 559
566 DIFF_64(diff.hi, new->rx_stat_grpp_hi,
567 pstats->pfc_frames_rx_hi,
568 diff.lo, new->rx_stat_grpp_lo,
569 pstats->pfc_frames_rx_lo);
570 pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi; 560 pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi;
571 pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo; 561 pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo;
572 ADD_64(pstats->pfc_frames_rx_hi, diff.hi,
573 pstats->pfc_frames_rx_lo, diff.lo);
574 } 562 }
575 563
576 estats->pause_frames_received_hi = 564 estats->pause_frames_received_hi =
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index a1f2e0fed78b..35c2a202d67a 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -5352,7 +5352,7 @@ static void tg3_tx(struct tg3_napi *tnapi)
5352 } 5352 }
5353 } 5353 }
5354 5354
5355 netdev_completed_queue(tp->dev, pkts_compl, bytes_compl); 5355 netdev_tx_completed_queue(txq, pkts_compl, bytes_compl);
5356 5356
5357 tnapi->tx_cons = sw_idx; 5357 tnapi->tx_cons = sw_idx;
5358 5358
@@ -6793,7 +6793,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
6793 } 6793 }
6794 6794
6795 skb_tx_timestamp(skb); 6795 skb_tx_timestamp(skb);
6796 netdev_sent_queue(tp->dev, skb->len); 6796 netdev_tx_sent_queue(txq, skb->len);
6797 6797
6798 /* Packets are ready, update Tx producer idx local and on card. */ 6798 /* Packets are ready, update Tx producer idx local and on card. */
6799 tw32_tx_mbox(tnapi->prodmbox, entry); 6799 tw32_tx_mbox(tnapi->prodmbox, entry);
@@ -7275,8 +7275,8 @@ static void tg3_free_rings(struct tg3 *tp)
7275 7275
7276 dev_kfree_skb_any(skb); 7276 dev_kfree_skb_any(skb);
7277 } 7277 }
7278 netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j));
7278 } 7279 }
7279 netdev_reset_queue(tp->dev);
7280} 7280}
7281 7281
7282/* Initialize tx/rx rings for packet processing. 7282/* Initialize tx/rx rings for packet processing.
@@ -7886,10 +7886,8 @@ static int tg3_chip_reset(struct tg3 *tp)
7886 return 0; 7886 return 0;
7887} 7887}
7888 7888
7889static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *, 7889static void tg3_get_nstats(struct tg3 *, struct rtnl_link_stats64 *);
7890 struct rtnl_link_stats64 *); 7890static void tg3_get_estats(struct tg3 *, struct tg3_ethtool_stats *);
7891static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *,
7892 struct tg3_ethtool_stats *);
7893 7891
7894/* tp->lock is held. */ 7892/* tp->lock is held. */
7895static int tg3_halt(struct tg3 *tp, int kind, int silent) 7893static int tg3_halt(struct tg3 *tp, int kind, int silent)
@@ -7910,7 +7908,7 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent)
7910 7908
7911 if (tp->hw_stats) { 7909 if (tp->hw_stats) {
7912 /* Save the stats across chip resets... */ 7910 /* Save the stats across chip resets... */
7913 tg3_get_stats64(tp->dev, &tp->net_stats_prev), 7911 tg3_get_nstats(tp, &tp->net_stats_prev),
7914 tg3_get_estats(tp, &tp->estats_prev); 7912 tg3_get_estats(tp, &tp->estats_prev);
7915 7913
7916 /* And make sure the next sample is new data */ 7914 /* And make sure the next sample is new data */
@@ -9847,7 +9845,7 @@ static inline u64 get_stat64(tg3_stat64_t *val)
9847 return ((u64)val->high << 32) | ((u64)val->low); 9845 return ((u64)val->high << 32) | ((u64)val->low);
9848} 9846}
9849 9847
9850static u64 calc_crc_errors(struct tg3 *tp) 9848static u64 tg3_calc_crc_errors(struct tg3 *tp)
9851{ 9849{
9852 struct tg3_hw_stats *hw_stats = tp->hw_stats; 9850 struct tg3_hw_stats *hw_stats = tp->hw_stats;
9853 9851
@@ -9856,14 +9854,12 @@ static u64 calc_crc_errors(struct tg3 *tp)
9856 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { 9854 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
9857 u32 val; 9855 u32 val;
9858 9856
9859 spin_lock_bh(&tp->lock);
9860 if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) { 9857 if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) {
9861 tg3_writephy(tp, MII_TG3_TEST1, 9858 tg3_writephy(tp, MII_TG3_TEST1,
9862 val | MII_TG3_TEST1_CRC_EN); 9859 val | MII_TG3_TEST1_CRC_EN);
9863 tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val); 9860 tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val);
9864 } else 9861 } else
9865 val = 0; 9862 val = 0;
9866 spin_unlock_bh(&tp->lock);
9867 9863
9868 tp->phy_crc_errors += val; 9864 tp->phy_crc_errors += val;
9869 9865
@@ -9877,14 +9873,13 @@ static u64 calc_crc_errors(struct tg3 *tp)
9877 estats->member = old_estats->member + \ 9873 estats->member = old_estats->member + \
9878 get_stat64(&hw_stats->member) 9874 get_stat64(&hw_stats->member)
9879 9875
9880static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp, 9876static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats)
9881 struct tg3_ethtool_stats *estats)
9882{ 9877{
9883 struct tg3_ethtool_stats *old_estats = &tp->estats_prev; 9878 struct tg3_ethtool_stats *old_estats = &tp->estats_prev;
9884 struct tg3_hw_stats *hw_stats = tp->hw_stats; 9879 struct tg3_hw_stats *hw_stats = tp->hw_stats;
9885 9880
9886 if (!hw_stats) 9881 if (!hw_stats)
9887 return old_estats; 9882 return;
9888 9883
9889 ESTAT_ADD(rx_octets); 9884 ESTAT_ADD(rx_octets);
9890 ESTAT_ADD(rx_fragments); 9885 ESTAT_ADD(rx_fragments);
@@ -9963,20 +9958,13 @@ static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp,
9963 ESTAT_ADD(nic_tx_threshold_hit); 9958 ESTAT_ADD(nic_tx_threshold_hit);
9964 9959
9965 ESTAT_ADD(mbuf_lwm_thresh_hit); 9960 ESTAT_ADD(mbuf_lwm_thresh_hit);
9966
9967 return estats;
9968} 9961}
9969 9962
9970static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev, 9963static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
9971 struct rtnl_link_stats64 *stats)
9972{ 9964{
9973 struct tg3 *tp = netdev_priv(dev);
9974 struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev; 9965 struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
9975 struct tg3_hw_stats *hw_stats = tp->hw_stats; 9966 struct tg3_hw_stats *hw_stats = tp->hw_stats;
9976 9967
9977 if (!hw_stats)
9978 return old_stats;
9979
9980 stats->rx_packets = old_stats->rx_packets + 9968 stats->rx_packets = old_stats->rx_packets +
9981 get_stat64(&hw_stats->rx_ucast_packets) + 9969 get_stat64(&hw_stats->rx_ucast_packets) +
9982 get_stat64(&hw_stats->rx_mcast_packets) + 9970 get_stat64(&hw_stats->rx_mcast_packets) +
@@ -10019,15 +10007,13 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
10019 get_stat64(&hw_stats->tx_carrier_sense_errors); 10007 get_stat64(&hw_stats->tx_carrier_sense_errors);
10020 10008
10021 stats->rx_crc_errors = old_stats->rx_crc_errors + 10009 stats->rx_crc_errors = old_stats->rx_crc_errors +
10022 calc_crc_errors(tp); 10010 tg3_calc_crc_errors(tp);
10023 10011
10024 stats->rx_missed_errors = old_stats->rx_missed_errors + 10012 stats->rx_missed_errors = old_stats->rx_missed_errors +
10025 get_stat64(&hw_stats->rx_discards); 10013 get_stat64(&hw_stats->rx_discards);
10026 10014
10027 stats->rx_dropped = tp->rx_dropped; 10015 stats->rx_dropped = tp->rx_dropped;
10028 stats->tx_dropped = tp->tx_dropped; 10016 stats->tx_dropped = tp->tx_dropped;
10029
10030 return stats;
10031} 10017}
10032 10018
10033static inline u32 calc_crc(unsigned char *buf, int len) 10019static inline u32 calc_crc(unsigned char *buf, int len)
@@ -15409,6 +15395,21 @@ static void __devinit tg3_init_coal(struct tg3 *tp)
15409 } 15395 }
15410} 15396}
15411 15397
15398static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
15399 struct rtnl_link_stats64 *stats)
15400{
15401 struct tg3 *tp = netdev_priv(dev);
15402
15403 if (!tp->hw_stats)
15404 return &tp->net_stats_prev;
15405
15406 spin_lock_bh(&tp->lock);
15407 tg3_get_nstats(tp, stats);
15408 spin_unlock_bh(&tp->lock);
15409
15410 return stats;
15411}
15412
15412static const struct net_device_ops tg3_netdev_ops = { 15413static const struct net_device_ops tg3_netdev_ops = {
15413 .ndo_open = tg3_open, 15414 .ndo_open = tg3_open,
15414 .ndo_stop = tg3_close, 15415 .ndo_stop = tg3_close,
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index e83d12c7bf20..9d76e59d9526 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -196,6 +196,8 @@ static DEFINE_PCI_DEVICE_TABLE(cxgb4_pci_tbl) = {
196 CH_DEVICE(0x4408, 4), 196 CH_DEVICE(0x4408, 4),
197 CH_DEVICE(0x4409, 4), 197 CH_DEVICE(0x4409, 4),
198 CH_DEVICE(0x440a, 4), 198 CH_DEVICE(0x440a, 4),
199 CH_DEVICE(0x440d, 4),
200 CH_DEVICE(0x440e, 4),
199 { 0, } 201 { 0, }
200}; 202};
201 203
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index e53365a71484..d963c1d57f71 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2892,6 +2892,8 @@ static struct pci_device_id cxgb4vf_pci_tbl[] = {
2892 CH_DEVICE(0x4808, 0), /* T420-cx */ 2892 CH_DEVICE(0x4808, 0), /* T420-cx */
2893 CH_DEVICE(0x4809, 0), /* T420-bt */ 2893 CH_DEVICE(0x4809, 0), /* T420-bt */
2894 CH_DEVICE(0x480a, 0), /* T404-bt */ 2894 CH_DEVICE(0x480a, 0), /* T404-bt */
2895 CH_DEVICE(0x480d, 0), /* T480-cr */
2896 CH_DEVICE(0x480e, 0), /* T440-lp-cr */
2895 { 0, } 2897 { 0, }
2896}; 2898};
2897 2899
diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h
index ee93a2087fe6..c52295cd05ef 100644
--- a/drivers/net/ethernet/cisco/enic/enic.h
+++ b/drivers/net/ethernet/cisco/enic/enic.h
@@ -94,7 +94,7 @@ struct enic {
94 u32 rx_coalesce_usecs; 94 u32 rx_coalesce_usecs;
95 u32 tx_coalesce_usecs; 95 u32 tx_coalesce_usecs;
96#ifdef CONFIG_PCI_IOV 96#ifdef CONFIG_PCI_IOV
97 u32 num_vfs; 97 u16 num_vfs;
98#endif 98#endif
99 struct enic_port_profile *pp; 99 struct enic_port_profile *pp;
100 100
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index ab3f67f980d8..0e4edd3b6bee 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2370,7 +2370,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
2370 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV); 2370 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
2371 if (pos) { 2371 if (pos) {
2372 pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF, 2372 pci_read_config_word(pdev, pos + PCI_SRIOV_TOTAL_VF,
2373 (u16 *)&enic->num_vfs); 2373 &enic->num_vfs);
2374 if (enic->num_vfs) { 2374 if (enic->num_vfs) {
2375 err = pci_enable_sriov(pdev, enic->num_vfs); 2375 err = pci_enable_sriov(pdev, enic->num_vfs);
2376 if (err) { 2376 if (err) {
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 5d5fb2627184..e6893cdfd13b 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -336,7 +336,9 @@ static struct rtnl_link_stats64 *ehea_get_stats64(struct net_device *dev,
336 stats->tx_bytes = tx_bytes; 336 stats->tx_bytes = tx_bytes;
337 stats->rx_packets = rx_packets; 337 stats->rx_packets = rx_packets;
338 338
339 return &port->stats; 339 stats->multicast = port->stats.multicast;
340 stats->rx_errors = port->stats.rx_errors;
341 return stats;
340} 342}
341 343
342static void ehea_update_stats(struct work_struct *work) 344static void ehea_update_stats(struct work_struct *work)
diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
index 738f950a1ce5..fb2b36759cbf 100644
--- a/drivers/net/ethernet/mellanox/mlx4/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
@@ -151,11 +151,6 @@ static int __mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
151 context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; 151 context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT;
152 } 152 }
153 153
154 port = ((context->pri_path.sched_queue >> 6) & 1) + 1;
155 if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
156 context->pri_path.sched_queue = (context->pri_path.sched_queue &
157 0xc3);
158
159 *(__be32 *) mailbox->buf = cpu_to_be32(optpar); 154 *(__be32 *) mailbox->buf = cpu_to_be32(optpar);
160 memcpy(mailbox->buf + 8, context, sizeof *context); 155 memcpy(mailbox->buf + 8, context, sizeof *context);
161 156
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index bfdb7af19e49..8752e6e08169 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2255,8 +2255,7 @@ int mlx4_MODIFY_CQ_wrapper(struct mlx4_dev *dev, int slave,
2255 2255
2256 if (vhcr->op_modifier == 0) { 2256 if (vhcr->op_modifier == 0) {
2257 err = handle_resize(dev, slave, vhcr, inbox, outbox, cmd, cq); 2257 err = handle_resize(dev, slave, vhcr, inbox, outbox, cmd, cq);
2258 if (err) 2258 goto ex_put;
2259 goto ex_put;
2260 } 2259 }
2261 2260
2262 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd); 2261 err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd);
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c
index 9cb5f912e489..29e23bec809c 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c
@@ -321,10 +321,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
321 pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n"); 321 pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n");
322 hw->phy.autoneg_advertised = opt.def; 322 hw->phy.autoneg_advertised = opt.def;
323 } else { 323 } else {
324 hw->phy.autoneg_advertised = AutoNeg; 324 int tmp = AutoNeg;
325 pch_gbe_validate_option( 325
326 (int *)(&hw->phy.autoneg_advertised), 326 pch_gbe_validate_option(&tmp, &opt, adapter);
327 &opt, adapter); 327 hw->phy.autoneg_advertised = tmp;
328 } 328 }
329 } 329 }
330 330
@@ -495,9 +495,10 @@ void pch_gbe_check_options(struct pch_gbe_adapter *adapter)
495 .arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list), 495 .arg = { .l = { .nr = (int)ARRAY_SIZE(fc_list),
496 .p = fc_list } } 496 .p = fc_list } }
497 }; 497 };
498 hw->mac.fc = FlowControl; 498 int tmp = FlowControl;
499 pch_gbe_validate_option((int *)(&hw->mac.fc), 499
500 &opt, adapter); 500 pch_gbe_validate_option(&tmp, &opt, adapter);
501 hw->mac.fc = tmp;
501 } 502 }
502 503
503 pch_gbe_check_copper_options(adapter); 504 pch_gbe_check_copper_options(adapter);
diff --git a/drivers/net/ethernet/packetengines/Kconfig b/drivers/net/ethernet/packetengines/Kconfig
index b97132d9dff0..8f29feb35548 100644
--- a/drivers/net/ethernet/packetengines/Kconfig
+++ b/drivers/net/ethernet/packetengines/Kconfig
@@ -4,6 +4,7 @@
4 4
5config NET_PACKET_ENGINE 5config NET_PACKET_ENGINE
6 bool "Packet Engine devices" 6 bool "Packet Engine devices"
7 default y
7 depends on PCI 8 depends on PCI
8 ---help--- 9 ---help---
9 If you have a network (Ethernet) card belonging to this class, say Y 10 If you have a network (Ethernet) card belonging to this class, say Y
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index 7931531c3a40..e61560e16385 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -3017,7 +3017,6 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
3017 (void __iomem *)port_regs; 3017 (void __iomem *)port_regs;
3018 u32 delay = 10; 3018 u32 delay = 10;
3019 int status = 0; 3019 int status = 0;
3020 unsigned long hw_flags = 0;
3021 3020
3022 if (ql_mii_setup(qdev)) 3021 if (ql_mii_setup(qdev))
3023 return -1; 3022 return -1;
@@ -3228,9 +3227,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
3228 value = ql_read_page0_reg(qdev, &port_regs->portStatus); 3227 value = ql_read_page0_reg(qdev, &port_regs->portStatus);
3229 if (value & PORT_STATUS_IC) 3228 if (value & PORT_STATUS_IC)
3230 break; 3229 break;
3231 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 3230 spin_unlock_irq(&qdev->hw_lock);
3232 msleep(500); 3231 msleep(500);
3233 spin_lock_irqsave(&qdev->hw_lock, hw_flags); 3232 spin_lock_irq(&qdev->hw_lock);
3234 } while (--delay); 3233 } while (--delay);
3235 3234
3236 if (delay == 0) { 3235 if (delay == 0) {
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 7a0c800b50ad..bbacb3741ec0 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -3781,12 +3781,20 @@ static void rtl8169_init_ring_indexes(struct rtl8169_private *tp)
3781 3781
3782static void rtl_hw_jumbo_enable(struct rtl8169_private *tp) 3782static void rtl_hw_jumbo_enable(struct rtl8169_private *tp)
3783{ 3783{
3784 void __iomem *ioaddr = tp->mmio_addr;
3785
3786 RTL_W8(Cfg9346, Cfg9346_Unlock);
3784 rtl_generic_op(tp, tp->jumbo_ops.enable); 3787 rtl_generic_op(tp, tp->jumbo_ops.enable);
3788 RTL_W8(Cfg9346, Cfg9346_Lock);
3785} 3789}
3786 3790
3787static void rtl_hw_jumbo_disable(struct rtl8169_private *tp) 3791static void rtl_hw_jumbo_disable(struct rtl8169_private *tp)
3788{ 3792{
3793 void __iomem *ioaddr = tp->mmio_addr;
3794
3795 RTL_W8(Cfg9346, Cfg9346_Unlock);
3789 rtl_generic_op(tp, tp->jumbo_ops.disable); 3796 rtl_generic_op(tp, tp->jumbo_ops.disable);
3797 RTL_W8(Cfg9346, Cfg9346_Lock);
3790} 3798}
3791 3799
3792static void r8168c_hw_jumbo_enable(struct rtl8169_private *tp) 3800static void r8168c_hw_jumbo_enable(struct rtl8169_private *tp)
@@ -6186,6 +6194,9 @@ static void rtl_shutdown(struct pci_dev *pdev)
6186{ 6194{
6187 struct net_device *dev = pci_get_drvdata(pdev); 6195 struct net_device *dev = pci_get_drvdata(pdev);
6188 struct rtl8169_private *tp = netdev_priv(dev); 6196 struct rtl8169_private *tp = netdev_priv(dev);
6197 struct device *d = &pdev->dev;
6198
6199 pm_runtime_get_sync(d);
6189 6200
6190 rtl8169_net_suspend(dev); 6201 rtl8169_net_suspend(dev);
6191 6202
@@ -6207,6 +6218,8 @@ static void rtl_shutdown(struct pci_dev *pdev)
6207 pci_wake_from_d3(pdev, true); 6218 pci_wake_from_d3(pdev, true);
6208 pci_set_power_state(pdev, PCI_D3hot); 6219 pci_set_power_state(pdev, PCI_D3hot);
6209 } 6220 }
6221
6222 pm_runtime_put_noidle(d);
6210} 6223}
6211 6224
6212static struct pci_driver rtl8169_pci_driver = { 6225static struct pci_driver rtl8169_pci_driver = {
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 466c58a7353d..bf01841bda5b 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -313,7 +313,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
313static void netvsc_get_drvinfo(struct net_device *net, 313static void netvsc_get_drvinfo(struct net_device *net,
314 struct ethtool_drvinfo *info) 314 struct ethtool_drvinfo *info)
315{ 315{
316 strcpy(info->driver, "hv_netvsc"); 316 strcpy(info->driver, KBUILD_MODNAME);
317 strcpy(info->version, HV_DRV_VERSION); 317 strcpy(info->version, HV_DRV_VERSION);
318 strcpy(info->fw_version, "N/A"); 318 strcpy(info->fw_version, "N/A");
319} 319}
@@ -485,7 +485,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
485 485
486/* The one and only one */ 486/* The one and only one */
487static struct hv_driver netvsc_drv = { 487static struct hv_driver netvsc_drv = {
488 .name = "netvsc", 488 .name = KBUILD_MODNAME,
489 .id_table = id_table, 489 .id_table = id_table,
490 .probe = netvsc_probe, 490 .probe = netvsc_probe,
491 .remove = netvsc_remove, 491 .remove = netvsc_remove,
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 93c5d72711b0..2d7601dd6660 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -359,7 +359,7 @@ static void tun_free_netdev(struct net_device *dev)
359{ 359{
360 struct tun_struct *tun = netdev_priv(dev); 360 struct tun_struct *tun = netdev_priv(dev);
361 361
362 sock_put(tun->socket.sk); 362 sk_release_kernel(tun->socket.sk);
363} 363}
364 364
365/* Net device open. */ 365/* Net device open. */
@@ -980,10 +980,18 @@ static int tun_recvmsg(struct kiocb *iocb, struct socket *sock,
980 return ret; 980 return ret;
981} 981}
982 982
983static int tun_release(struct socket *sock)
984{
985 if (sock->sk)
986 sock_put(sock->sk);
987 return 0;
988}
989
983/* Ops structure to mimic raw sockets with tun */ 990/* Ops structure to mimic raw sockets with tun */
984static const struct proto_ops tun_socket_ops = { 991static const struct proto_ops tun_socket_ops = {
985 .sendmsg = tun_sendmsg, 992 .sendmsg = tun_sendmsg,
986 .recvmsg = tun_recvmsg, 993 .recvmsg = tun_recvmsg,
994 .release = tun_release,
987}; 995};
988 996
989static struct proto tun_proto = { 997static struct proto tun_proto = {
@@ -1110,10 +1118,11 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
1110 tun->vnet_hdr_sz = sizeof(struct virtio_net_hdr); 1118 tun->vnet_hdr_sz = sizeof(struct virtio_net_hdr);
1111 1119
1112 err = -ENOMEM; 1120 err = -ENOMEM;
1113 sk = sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto); 1121 sk = sk_alloc(&init_net, AF_UNSPEC, GFP_KERNEL, &tun_proto);
1114 if (!sk) 1122 if (!sk)
1115 goto err_free_dev; 1123 goto err_free_dev;
1116 1124
1125 sk_change_net(sk, net);
1117 tun->socket.wq = &tun->wq; 1126 tun->socket.wq = &tun->wq;
1118 init_waitqueue_head(&tun->wq.wait); 1127 init_waitqueue_head(&tun->wq.wait);
1119 tun->socket.ops = &tun_socket_ops; 1128 tun->socket.ops = &tun_socket_ops;
@@ -1174,7 +1183,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
1174 return 0; 1183 return 0;
1175 1184
1176 err_free_sk: 1185 err_free_sk:
1177 sock_put(sk); 1186 tun_free_netdev(dev);
1178 err_free_dev: 1187 err_free_dev:
1179 free_netdev(dev); 1188 free_netdev(dev);
1180 failed: 1189 failed:
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 8e84f5bdd6ca..d6da5eed5453 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1599,6 +1599,10 @@ static const struct usb_device_id products [] = {
1599 USB_DEVICE (0x6189, 0x182d), 1599 USB_DEVICE (0x6189, 0x182d),
1600 .driver_info = (unsigned long) &ax8817x_info, 1600 .driver_info = (unsigned long) &ax8817x_info,
1601}, { 1601}, {
1602 // Sitecom LN-031 "USB 2.0 10/100/1000 Ethernet adapter"
1603 USB_DEVICE (0x0df6, 0x0056),
1604 .driver_info = (unsigned long) &ax88178_info,
1605}, {
1602 // corega FEther USB2-TX 1606 // corega FEther USB2-TX
1603 USB_DEVICE (0x07aa, 0x0017), 1607 USB_DEVICE (0x07aa, 0x0017),
1604 .driver_info = (unsigned long) &ax8817x_info, 1608 .driver_info = (unsigned long) &ax8817x_info,
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index fae0fbd8bc88..81b96e303757 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -589,6 +589,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
589 entry = (struct skb_data *) skb->cb; 589 entry = (struct skb_data *) skb->cb;
590 urb = entry->urb; 590 urb = entry->urb;
591 591
592 spin_unlock_irqrestore(&q->lock, flags);
592 // during some PM-driven resume scenarios, 593 // during some PM-driven resume scenarios,
593 // these (async) unlinks complete immediately 594 // these (async) unlinks complete immediately
594 retval = usb_unlink_urb (urb); 595 retval = usb_unlink_urb (urb);
@@ -596,6 +597,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
596 netdev_dbg(dev->net, "unlink urb err, %d\n", retval); 597 netdev_dbg(dev->net, "unlink urb err, %d\n", retval);
597 else 598 else
598 count++; 599 count++;
600 spin_lock_irqsave(&q->lock, flags);
599 } 601 }
600 spin_unlock_irqrestore (&q->lock, flags); 602 spin_unlock_irqrestore (&q->lock, flags);
601 return count; 603 return count;
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 3dcd3857a36c..756c0f5565a5 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -830,13 +830,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
830 ctx->l4_hdr_size = ((struct tcphdr *) 830 ctx->l4_hdr_size = ((struct tcphdr *)
831 skb_transport_header(skb))->doff * 4; 831 skb_transport_header(skb))->doff * 4;
832 else if (iph->protocol == IPPROTO_UDP) 832 else if (iph->protocol == IPPROTO_UDP)
833 /*
834 * Use tcp header size so that bytes to
835 * be copied are more than required by
836 * the device.
837 */
838 ctx->l4_hdr_size = 833 ctx->l4_hdr_size =
839 sizeof(struct tcphdr); 834 sizeof(struct udphdr);
840 else 835 else
841 ctx->l4_hdr_size = 0; 836 ctx->l4_hdr_size = 0;
842 } else { 837 } else {
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index ed54797db191..fc46a81ad538 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -70,10 +70,10 @@
70/* 70/*
71 * Version numbers 71 * Version numbers
72 */ 72 */
73#define VMXNET3_DRIVER_VERSION_STRING "1.1.18.0-k" 73#define VMXNET3_DRIVER_VERSION_STRING "1.1.29.0-k"
74 74
75/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ 75/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
76#define VMXNET3_DRIVER_VERSION_NUM 0x01011200 76#define VMXNET3_DRIVER_VERSION_NUM 0x01011D00
77 77
78#if defined(CONFIG_PCI_MSI) 78#if defined(CONFIG_PCI_MSI)
79 /* RSS only makes sense if MSI-X is supported. */ 79 /* RSS only makes sense if MSI-X is supported. */
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index f901a17f76ba..86a891f93fc9 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -489,8 +489,6 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah)
489 ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows); 489 ATH_ALLOC_BANK(ah->analogBank6Data, ah->iniBank6.ia_rows);
490 ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows); 490 ATH_ALLOC_BANK(ah->analogBank6TPCData, ah->iniBank6TPC.ia_rows);
491 ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows); 491 ATH_ALLOC_BANK(ah->analogBank7Data, ah->iniBank7.ia_rows);
492 ATH_ALLOC_BANK(ah->addac5416_21,
493 ah->iniAddac.ia_rows * ah->iniAddac.ia_columns);
494 ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows); 492 ATH_ALLOC_BANK(ah->bank6Temp, ah->iniBank6.ia_rows);
495 493
496 return 0; 494 return 0;
@@ -519,7 +517,6 @@ static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah)
519 ATH_FREE_BANK(ah->analogBank6Data); 517 ATH_FREE_BANK(ah->analogBank6Data);
520 ATH_FREE_BANK(ah->analogBank6TPCData); 518 ATH_FREE_BANK(ah->analogBank6TPCData);
521 ATH_FREE_BANK(ah->analogBank7Data); 519 ATH_FREE_BANK(ah->analogBank7Data);
522 ATH_FREE_BANK(ah->addac5416_21);
523 ATH_FREE_BANK(ah->bank6Temp); 520 ATH_FREE_BANK(ah->bank6Temp);
524 521
525#undef ATH_FREE_BANK 522#undef ATH_FREE_BANK
@@ -805,27 +802,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
805 if (ah->eep_ops->set_addac) 802 if (ah->eep_ops->set_addac)
806 ah->eep_ops->set_addac(ah, chan); 803 ah->eep_ops->set_addac(ah, chan);
807 804
808 if (AR_SREV_5416_22_OR_LATER(ah)) { 805 REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites);
809 REG_WRITE_ARRAY(&ah->iniAddac, 1, regWrites);
810 } else {
811 struct ar5416IniArray temp;
812 u32 addacSize =
813 sizeof(u32) * ah->iniAddac.ia_rows *
814 ah->iniAddac.ia_columns;
815
816 /* For AR5416 2.0/2.1 */
817 memcpy(ah->addac5416_21,
818 ah->iniAddac.ia_array, addacSize);
819
820 /* override CLKDRV value at [row, column] = [31, 1] */
821 (ah->addac5416_21)[31 * ah->iniAddac.ia_columns + 1] = 0;
822
823 temp.ia_array = ah->addac5416_21;
824 temp.ia_columns = ah->iniAddac.ia_columns;
825 temp.ia_rows = ah->iniAddac.ia_rows;
826 REG_WRITE_ARRAY(&temp, 1, regWrites);
827 }
828
829 REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC); 806 REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC);
830 807
831 ENABLE_REGWRITE_BUFFER(ah); 808 ENABLE_REGWRITE_BUFFER(ah);
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
index 11f192a1ceb7..d190411ac8f5 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
@@ -180,6 +180,25 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
180 INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac, 180 INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac,
181 ARRAY_SIZE(ar5416Addac), 2); 181 ARRAY_SIZE(ar5416Addac), 2);
182 } 182 }
183
184 /* iniAddac needs to be modified for these chips */
185 if (AR_SREV_9160(ah) || !AR_SREV_5416_22_OR_LATER(ah)) {
186 struct ar5416IniArray *addac = &ah->iniAddac;
187 u32 size = sizeof(u32) * addac->ia_rows * addac->ia_columns;
188 u32 *data;
189
190 data = kmalloc(size, GFP_KERNEL);
191 if (!data)
192 return;
193
194 memcpy(data, addac->ia_array, size);
195 addac->ia_array = data;
196
197 if (!AR_SREV_5416_22_OR_LATER(ah)) {
198 /* override CLKDRV value */
199 INI_RA(addac, 31,1) = 0;
200 }
201 }
183} 202}
184 203
185/* Support for Japan ch.14 (2484) spread */ 204/* Support for Japan ch.14 (2484) spread */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 6a29004a71b0..c8261d4fc780 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -940,7 +940,6 @@ struct ath_hw {
940 u32 *analogBank6Data; 940 u32 *analogBank6Data;
941 u32 *analogBank6TPCData; 941 u32 *analogBank6TPCData;
942 u32 *analogBank7Data; 942 u32 *analogBank7Data;
943 u32 *addac5416_21;
944 u32 *bank6Temp; 943 u32 *bank6Temp;
945 944
946 u8 txpower_limit; 945 u8 txpower_limit;
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index d19a9ee9d057..bbc813dee983 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -1234,6 +1234,7 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb)
1234{ 1234{
1235 struct ieee80211_sta *sta; 1235 struct ieee80211_sta *sta;
1236 struct carl9170_sta_info *sta_info; 1236 struct carl9170_sta_info *sta_info;
1237 struct ieee80211_tx_info *tx_info;
1237 1238
1238 rcu_read_lock(); 1239 rcu_read_lock();
1239 sta = __carl9170_get_tx_sta(ar, skb); 1240 sta = __carl9170_get_tx_sta(ar, skb);
@@ -1241,16 +1242,18 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb)
1241 goto out_rcu; 1242 goto out_rcu;
1242 1243
1243 sta_info = (void *) sta->drv_priv; 1244 sta_info = (void *) sta->drv_priv;
1244 if (unlikely(sta_info->sleeping)) { 1245 tx_info = IEEE80211_SKB_CB(skb);
1245 struct ieee80211_tx_info *tx_info;
1246 1246
1247 if (unlikely(sta_info->sleeping) &&
1248 !(tx_info->flags & (IEEE80211_TX_CTL_POLL_RESPONSE |
1249 IEEE80211_TX_CTL_CLEAR_PS_FILT))) {
1247 rcu_read_unlock(); 1250 rcu_read_unlock();
1248 1251
1249 tx_info = IEEE80211_SKB_CB(skb);
1250 if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) 1252 if (tx_info->flags & IEEE80211_TX_CTL_AMPDU)
1251 atomic_dec(&ar->tx_ampdu_upload); 1253 atomic_dec(&ar->tx_ampdu_upload);
1252 1254
1253 tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; 1255 tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
1256 carl9170_release_dev_space(ar, skb);
1254 carl9170_tx_status(ar, skb, false); 1257 carl9170_tx_status(ar, skb, false);
1255 return true; 1258 return true;
1256 } 1259 }
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index 90911eec0cf5..30b58870b1b6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
1051 } 1051 }
1052 /* either retransmit or send bar if ack not recd */ 1052 /* either retransmit or send bar if ack not recd */
1053 if (!ack_recd) { 1053 if (!ack_recd) {
1054 struct ieee80211_tx_rate *txrate = 1054 if (retry && (ini->txretry[index] < (int)retry_limit)) {
1055 tx_info->status.rates;
1056 if (retry && (txrate[0].count < (int)retry_limit)) {
1057 ini->txretry[index]++; 1055 ini->txretry[index]++;
1058 ini->tx_in_transit--; 1056 ini->tx_in_transit--;
1059 /* 1057 /*
1060 * Use high prededence for retransmit to 1058 * Use high prededence for retransmit to
1061 * give some punch 1059 * give some punch
1062 */ 1060 */
1063 /* brcms_c_txq_enq(wlc, scb, p,
1064 * BRCMS_PRIO_TO_PREC(tid)); */
1065 brcms_c_txq_enq(wlc, scb, p, 1061 brcms_c_txq_enq(wlc, scb, p,
1066 BRCMS_PRIO_TO_HI_PREC(tid)); 1062 BRCMS_PRIO_TO_HI_PREC(tid));
1067 } else { 1063 } else {
@@ -1074,9 +1070,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
1074 IEEE80211_TX_STAT_AMPDU_NO_BACK; 1070 IEEE80211_TX_STAT_AMPDU_NO_BACK;
1075 skb_pull(p, D11_PHY_HDR_LEN); 1071 skb_pull(p, D11_PHY_HDR_LEN);
1076 skb_pull(p, D11_TXH_LEN); 1072 skb_pull(p, D11_TXH_LEN);
1077 wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_" 1073 BCMMSG(wiphy,
1078 "transit %d\n", "AMPDU status", seq, 1074 "BA Timeout, seq %d, in_transit %d\n",
1079 ini->tx_in_transit); 1075 seq, ini->tx_in_transit);
1080 ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, 1076 ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
1081 p); 1077 p);
1082 } 1078 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 54b2d391e91a..a7dfba8d164e 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2475,7 +2475,7 @@ il3945_bg_alive_start(struct work_struct *data)
2475 container_of(data, struct il_priv, alive_start.work); 2475 container_of(data, struct il_priv, alive_start.work);
2476 2476
2477 mutex_lock(&il->mutex); 2477 mutex_lock(&il->mutex);
2478 if (test_bit(S_EXIT_PENDING, &il->status)) 2478 if (test_bit(S_EXIT_PENDING, &il->status) || il->txq == NULL)
2479 goto out; 2479 goto out;
2480 2480
2481 il3945_alive_start(il); 2481 il3945_alive_start(il);
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 1489b1573a6a..c80eb9b31551 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1870,11 +1870,12 @@ il3945_bg_reg_txpower_periodic(struct work_struct *work)
1870 struct il_priv *il = container_of(work, struct il_priv, 1870 struct il_priv *il = container_of(work, struct il_priv,
1871 _3945.thermal_periodic.work); 1871 _3945.thermal_periodic.work);
1872 1872
1873 if (test_bit(S_EXIT_PENDING, &il->status))
1874 return;
1875
1876 mutex_lock(&il->mutex); 1873 mutex_lock(&il->mutex);
1874 if (test_bit(S_EXIT_PENDING, &il->status) || il->txq == NULL)
1875 goto out;
1876
1877 il3945_reg_txpower_periodic(il); 1877 il3945_reg_txpower_periodic(il);
1878out:
1878 mutex_unlock(&il->mutex); 1879 mutex_unlock(&il->mutex);
1879} 1880}
1880 1881
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 64cf439035c3..ca78e91de86c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1240,7 +1240,7 @@ int iwlagn_suspend(struct iwl_priv *priv,
1240 .flags = CMD_SYNC, 1240 .flags = CMD_SYNC,
1241 .data[0] = key_data.rsc_tsc, 1241 .data[0] = key_data.rsc_tsc,
1242 .dataflags[0] = IWL_HCMD_DFL_NOCOPY, 1242 .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
1243 .len[0] = sizeof(key_data.rsc_tsc), 1243 .len[0] = sizeof(*key_data.rsc_tsc),
1244 }; 1244 };
1245 1245
1246 ret = iwl_trans_send_cmd(trans(priv), &rsc_tsc_cmd); 1246 ret = iwl_trans_send_cmd(trans(priv), &rsc_tsc_cmd);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 7353826095f1..e483cfa8d14e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -1187,6 +1187,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
1187 unsigned long flags; 1187 unsigned long flags;
1188 struct iwl_addsta_cmd sta_cmd; 1188 struct iwl_addsta_cmd sta_cmd;
1189 u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta); 1189 u8 sta_id = iwlagn_key_sta_id(priv, ctx->vif, sta);
1190 __le16 key_flags;
1190 1191
1191 /* if station isn't there, neither is the key */ 1192 /* if station isn't there, neither is the key */
1192 if (sta_id == IWL_INVALID_STATION) 1193 if (sta_id == IWL_INVALID_STATION)
@@ -1212,7 +1213,14 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
1212 IWL_ERR(priv, "offset %d not used in uCode key table.\n", 1213 IWL_ERR(priv, "offset %d not used in uCode key table.\n",
1213 keyconf->hw_key_idx); 1214 keyconf->hw_key_idx);
1214 1215
1215 sta_cmd.key.key_flags = STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID; 1216 key_flags = cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
1217 key_flags |= STA_KEY_FLG_MAP_KEY_MSK | STA_KEY_FLG_NO_ENC |
1218 STA_KEY_FLG_INVALID;
1219
1220 if (!(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE))
1221 key_flags |= STA_KEY_MULTICAST_MSK;
1222
1223 sta_cmd.key.key_flags = key_flags;
1216 sta_cmd.key.key_offset = WEP_INVALID_OFFSET; 1224 sta_cmd.key.key_offset = WEP_INVALID_OFFSET;
1217 sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK; 1225 sta_cmd.sta.modify_mask = STA_MODIFY_KEY_MASK;
1218 sta_cmd.mode = STA_CONTROL_MODIFY_MSK; 1226 sta_cmd.mode = STA_CONTROL_MODIFY_MSK;
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 5b2972b43b0e..2210a0f9af2d 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -846,6 +846,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
846 priv->sec_info.wpa_enabled = false; 846 priv->sec_info.wpa_enabled = false;
847 priv->sec_info.wpa2_enabled = false; 847 priv->sec_info.wpa2_enabled = false;
848 priv->wep_key_curr_index = 0; 848 priv->wep_key_curr_index = 0;
849 priv->sec_info.encryption_mode = 0;
849 ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); 850 ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
850 851
851 if (mode == NL80211_IFTYPE_ADHOC) { 852 if (mode == NL80211_IFTYPE_ADHOC) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index c3e1aa7c1a80..fd356b7c0476 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -426,10 +426,14 @@ void rt2x00lib_txdone(struct queue_entry *entry,
426 /* 426 /*
427 * If the data queue was below the threshold before the txdone 427 * If the data queue was below the threshold before the txdone
428 * handler we must make sure the packet queue in the mac80211 stack 428 * handler we must make sure the packet queue in the mac80211 stack
429 * is reenabled when the txdone handler has finished. 429 * is reenabled when the txdone handler has finished. This has to be
430 * serialized with rt2x00mac_tx(), otherwise we can wake up queue
431 * before it was stopped.
430 */ 432 */
433 spin_lock_bh(&entry->queue->tx_lock);
431 if (!rt2x00queue_threshold(entry->queue)) 434 if (!rt2x00queue_threshold(entry->queue))
432 rt2x00queue_unpause_queue(entry->queue); 435 rt2x00queue_unpause_queue(entry->queue);
436 spin_unlock_bh(&entry->queue->tx_lock);
433} 437}
434EXPORT_SYMBOL_GPL(rt2x00lib_txdone); 438EXPORT_SYMBOL_GPL(rt2x00lib_txdone);
435 439
@@ -1220,7 +1224,8 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
1220 cancel_work_sync(&rt2x00dev->rxdone_work); 1224 cancel_work_sync(&rt2x00dev->rxdone_work);
1221 cancel_work_sync(&rt2x00dev->txdone_work); 1225 cancel_work_sync(&rt2x00dev->txdone_work);
1222 } 1226 }
1223 destroy_workqueue(rt2x00dev->workqueue); 1227 if (rt2x00dev->workqueue)
1228 destroy_workqueue(rt2x00dev->workqueue);
1224 1229
1225 /* 1230 /*
1226 * Free the tx status fifo. 1231 * Free the tx status fifo.
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index ede3c58e6783..2df2eb6d3e06 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -152,13 +152,22 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
152 if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false))) 152 if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false)))
153 goto exit_fail; 153 goto exit_fail;
154 154
155 /*
156 * Pausing queue has to be serialized with rt2x00lib_txdone(). Note
157 * we should not use spin_lock_bh variant as bottom halve was already
158 * disabled before ieee80211_xmit() call.
159 */
160 spin_lock(&queue->tx_lock);
155 if (rt2x00queue_threshold(queue)) 161 if (rt2x00queue_threshold(queue))
156 rt2x00queue_pause_queue(queue); 162 rt2x00queue_pause_queue(queue);
163 spin_unlock(&queue->tx_lock);
157 164
158 return; 165 return;
159 166
160 exit_fail: 167 exit_fail:
168 spin_lock(&queue->tx_lock);
161 rt2x00queue_pause_queue(queue); 169 rt2x00queue_pause_queue(queue);
170 spin_unlock(&queue->tx_lock);
162 exit_free_skb: 171 exit_free_skb:
163 ieee80211_free_txskb(hw, skb); 172 ieee80211_free_txskb(hw, skb);
164} 173}
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 5adfb3eab9cd..9b1b2b7a7807 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -619,6 +619,9 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
619 else if (test_bit(REQUIRE_DMA, &queue->rt2x00dev->cap_flags)) 619 else if (test_bit(REQUIRE_DMA, &queue->rt2x00dev->cap_flags))
620 rt2x00queue_align_frame(skb); 620 rt2x00queue_align_frame(skb);
621 621
622 /*
623 * That function must be called with bh disabled.
624 */
622 spin_lock(&queue->tx_lock); 625 spin_lock(&queue->tx_lock);
623 626
624 if (unlikely(rt2x00queue_full(queue))) { 627 if (unlikely(rt2x00queue_full(queue))) {
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ea2bd1be2640..91a375fb6ae6 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -23,7 +23,6 @@
23#include <asm/machdep.h> 23#include <asm/machdep.h>
24#endif /* CONFIG_PPC */ 24#endif /* CONFIG_PPC */
25 25
26#include <asm/setup.h>
27#include <asm/page.h> 26#include <asm/page.h>
28 27
29char *of_fdt_get_string(struct boot_param_header *blob, u32 offset) 28char *of_fdt_get_string(struct boot_param_header *blob, u32 offset)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 980c079e4443..483c0adcad87 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -182,7 +182,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
182 if (!phy_id || sz < sizeof(*phy_id)) 182 if (!phy_id || sz < sizeof(*phy_id))
183 return NULL; 183 return NULL;
184 184
185 sprintf(bus_id, PHY_ID_FMT, "0", be32_to_cpu(phy_id[0])); 185 sprintf(bus_id, PHY_ID_FMT, "fixed-0", be32_to_cpu(phy_id[0]));
186 186
187 phy = phy_connect(dev, bus_id, hndlr, 0, iface); 187 phy = phy_connect(dev, bus_id, hndlr, 0, iface);
188 return IS_ERR(phy) ? NULL : phy; 188 return IS_ERR(phy) ? NULL : phy;
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 1cfbf228fbb1..24f049e73952 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -500,6 +500,9 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
500 int pos; 500 int pos;
501 u32 reg32; 501 u32 reg32;
502 502
503 if (aspm_disabled)
504 return 0;
505
503 /* 506 /*
504 * Some functions in a slot might not all be PCIe functions, 507 * Some functions in a slot might not all be PCIe functions,
505 * very strange. Disable ASPM for the whole slot 508 * very strange. Disable ASPM for the whole slot
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f995e6e2f78c..15dbd8cc445f 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -143,6 +143,30 @@ config FUJITSU_LAPTOP_DEBUG
143 143
144 If you are not sure, say N here. 144 If you are not sure, say N here.
145 145
146config FUJITSU_TABLET
147 tristate "Fujitsu Tablet Extras"
148 depends on ACPI
149 depends on INPUT
150 ---help---
151 This is a driver for tablets built by Fujitsu:
152
153 * Lifebook P1510/P1610/P1620/Txxxx
154 * Stylistic ST5xxx
155 * Possibly other Fujitsu tablet models
156
157 It adds support for the panel buttons, docking station detection,
158 tablet/notebook mode detection for convertible and
159 orientation detection for docked slates.
160
161 If you have a Fujitsu convertible or slate, say Y or M here.
162
163config AMILO_RFKILL
164 tristate "Fujitsu-Siemens Amilo rfkill support"
165 depends on RFKILL
166 ---help---
167 This is a driver for enabling wifi on some Fujitsu-Siemens Amilo
168 laptops.
169
146config TC1100_WMI 170config TC1100_WMI
147 tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)" 171 tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)"
148 depends on !X86_64 172 depends on !X86_64
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 293a320d9faa..d328f21e9fdd 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -17,12 +17,14 @@ obj-$(CONFIG_ACER_WMI) += acer-wmi.o
17obj-$(CONFIG_ACERHDF) += acerhdf.o 17obj-$(CONFIG_ACERHDF) += acerhdf.o
18obj-$(CONFIG_HP_ACCEL) += hp_accel.o 18obj-$(CONFIG_HP_ACCEL) += hp_accel.o
19obj-$(CONFIG_HP_WMI) += hp-wmi.o 19obj-$(CONFIG_HP_WMI) += hp-wmi.o
20obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o
20obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o 21obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
21obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o 22obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
22obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o 23obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
23obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o 24obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
24obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o 25obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
25obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o 26obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o
27obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o
26obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o 28obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o
27obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o 29obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
28obj-$(CONFIG_ACPI_WMI) += wmi.o 30obj-$(CONFIG_ACPI_WMI) += wmi.o
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b848277171a4..1e5290b5396d 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
679 return AE_OK; 679 return AE_OK;
680} 680}
681 681
682static int AMW0_set_cap_acpi_check_device_found;
683
684static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
685 u32 level, void *context, void **retval)
686{
687 AMW0_set_cap_acpi_check_device_found = 1;
688 return AE_OK;
689}
690
691static const struct acpi_device_id norfkill_ids[] = {
692 { "VPC2004", 0},
693 { "IBM0068", 0},
694 { "LEN0068", 0},
695 { "", 0},
696};
697
698static int AMW0_set_cap_acpi_check_device(void)
699{
700 const struct acpi_device_id *id;
701
702 for (id = norfkill_ids; id->id[0]; id++)
703 acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
704 NULL, NULL);
705 return AMW0_set_cap_acpi_check_device_found;
706}
707
682static acpi_status AMW0_set_capabilities(void) 708static acpi_status AMW0_set_capabilities(void)
683{ 709{
684 struct wmab_args args; 710 struct wmab_args args;
@@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
692 * work. 718 * work.
693 */ 719 */
694 if (wmi_has_guid(AMW0_GUID2)) { 720 if (wmi_has_guid(AMW0_GUID2)) {
695 interface->capability |= ACER_CAP_WIRELESS; 721 if ((quirks != &quirk_unknown) ||
722 !AMW0_set_cap_acpi_check_device())
723 interface->capability |= ACER_CAP_WIRELESS;
696 return AE_OK; 724 return AE_OK;
697 } 725 }
698 726
diff --git a/drivers/platform/x86/amilo-rfkill.c b/drivers/platform/x86/amilo-rfkill.c
new file mode 100644
index 000000000000..19170bb7700b
--- /dev/null
+++ b/drivers/platform/x86/amilo-rfkill.c
@@ -0,0 +1,173 @@
1/*
2 * Support for rfkill on some Fujitsu-Siemens Amilo laptops.
3 * Copyright 2011 Ben Hutchings.
4 *
5 * Based in part on the fsam7440 driver, which is:
6 * Copyright 2005 Alejandro Vidal Mata & Javier Vidal Mata.
7 * and on the fsaa1655g driver, which is:
8 * Copyright 2006 Martin Večeřa.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#include <linux/module.h>
17#include <linux/dmi.h>
18#include <linux/i8042.h>
19#include <linux/io.h>
20#include <linux/moduleparam.h>
21#include <linux/platform_device.h>
22#include <linux/rfkill.h>
23
24/*
25 * These values were obtained from disassembling and debugging the
26 * PM.exe program installed in the Fujitsu-Siemens AMILO A1655G
27 */
28#define A1655_WIFI_COMMAND 0x10C5
29#define A1655_WIFI_ON 0x25
30#define A1655_WIFI_OFF 0x45
31
32static int amilo_a1655_rfkill_set_block(void *data, bool blocked)
33{
34 u8 param = blocked ? A1655_WIFI_OFF : A1655_WIFI_ON;
35 int rc;
36
37 i8042_lock_chip();
38 rc = i8042_command(&param, A1655_WIFI_COMMAND);
39 i8042_unlock_chip();
40 return rc;
41}
42
43static const struct rfkill_ops amilo_a1655_rfkill_ops = {
44 .set_block = amilo_a1655_rfkill_set_block
45};
46
47/*
48 * These values were obtained from disassembling the PM.exe program
49 * installed in the Fujitsu-Siemens AMILO M 7440
50 */
51#define M7440_PORT1 0x118f
52#define M7440_PORT2 0x118e
53#define M7440_RADIO_ON1 0x12
54#define M7440_RADIO_ON2 0x80
55#define M7440_RADIO_OFF1 0x10
56#define M7440_RADIO_OFF2 0x00
57
58static int amilo_m7440_rfkill_set_block(void *data, bool blocked)
59{
60 u8 val1 = blocked ? M7440_RADIO_OFF1 : M7440_RADIO_ON1;
61 u8 val2 = blocked ? M7440_RADIO_OFF2 : M7440_RADIO_ON2;
62
63 outb(val1, M7440_PORT1);
64 outb(val2, M7440_PORT2);
65
66 /* Check whether the state has changed correctly */
67 if (inb(M7440_PORT1) != val1 || inb(M7440_PORT2) != val2)
68 return -EIO;
69
70 return 0;
71}
72
73static const struct rfkill_ops amilo_m7440_rfkill_ops = {
74 .set_block = amilo_m7440_rfkill_set_block
75};
76
77static const struct dmi_system_id __devinitdata amilo_rfkill_id_table[] = {
78 {
79 .matches = {
80 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
81 DMI_MATCH(DMI_BOARD_NAME, "AMILO A1655"),
82 },
83 .driver_data = (void *)&amilo_a1655_rfkill_ops
84 },
85 {
86 .matches = {
87 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
88 DMI_MATCH(DMI_BOARD_NAME, "AMILO M7440"),
89 },
90 .driver_data = (void *)&amilo_m7440_rfkill_ops
91 },
92 {}
93};
94
95static struct platform_device *amilo_rfkill_pdev;
96static struct rfkill *amilo_rfkill_dev;
97
98static int __devinit amilo_rfkill_probe(struct platform_device *device)
99{
100 const struct dmi_system_id *system_id =
101 dmi_first_match(amilo_rfkill_id_table);
102 int rc;
103
104 amilo_rfkill_dev = rfkill_alloc(KBUILD_MODNAME, &device->dev,
105 RFKILL_TYPE_WLAN,
106 system_id->driver_data, NULL);
107 if (!amilo_rfkill_dev)
108 return -ENOMEM;
109
110 rc = rfkill_register(amilo_rfkill_dev);
111 if (rc)
112 goto fail;
113
114 return 0;
115
116fail:
117 rfkill_destroy(amilo_rfkill_dev);
118 return rc;
119}
120
121static int amilo_rfkill_remove(struct platform_device *device)
122{
123 rfkill_unregister(amilo_rfkill_dev);
124 rfkill_destroy(amilo_rfkill_dev);
125 return 0;
126}
127
128static struct platform_driver amilo_rfkill_driver = {
129 .driver = {
130 .name = KBUILD_MODNAME,
131 .owner = THIS_MODULE,
132 },
133 .probe = amilo_rfkill_probe,
134 .remove = amilo_rfkill_remove,
135};
136
137static int __init amilo_rfkill_init(void)
138{
139 int rc;
140
141 if (dmi_first_match(amilo_rfkill_id_table) == NULL)
142 return -ENODEV;
143
144 rc = platform_driver_register(&amilo_rfkill_driver);
145 if (rc)
146 return rc;
147
148 amilo_rfkill_pdev = platform_device_register_simple(KBUILD_MODNAME, -1,
149 NULL, 0);
150 if (IS_ERR(amilo_rfkill_pdev)) {
151 rc = PTR_ERR(amilo_rfkill_pdev);
152 goto fail;
153 }
154
155 return 0;
156
157fail:
158 platform_driver_unregister(&amilo_rfkill_driver);
159 return rc;
160}
161
162static void __exit amilo_rfkill_exit(void)
163{
164 platform_device_unregister(amilo_rfkill_pdev);
165 platform_driver_unregister(&amilo_rfkill_driver);
166}
167
168MODULE_AUTHOR("Ben Hutchings <ben@decadent.org.uk>");
169MODULE_LICENSE("GPL");
170MODULE_DEVICE_TABLE(dmi, amilo_rfkill_id_table);
171
172module_init(amilo_rfkill_init);
173module_exit(amilo_rfkill_exit);
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
new file mode 100644
index 000000000000..580d80a73c3a
--- /dev/null
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -0,0 +1,478 @@
1/*
2 * Copyright (C) 2006-2012 Robert Gerlach <khnz@gmx.de>
3 * Copyright (C) 2005-2006 Jan Rychter <jan@rychter.com>
4 *
5 * You can redistribute and/or modify this program under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
12 * Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#include <linux/kernel.h>
20#include <linux/module.h>
21#include <linux/init.h>
22#include <linux/bitops.h>
23#include <linux/io.h>
24#include <linux/ioport.h>
25#include <linux/acpi.h>
26#include <linux/device.h>
27#include <linux/interrupt.h>
28#include <linux/input.h>
29#include <linux/delay.h>
30#include <linux/dmi.h>
31
32#define MODULENAME "fujitsu-tablet"
33
34#define ACPI_FUJITSU_CLASS "fujitsu"
35
36#define INVERT_TABLET_MODE_BIT 0x01
37#define FORCE_TABLET_MODE_IF_UNDOCK 0x02
38
39#define KEYMAP_LEN 16
40
41static const struct acpi_device_id fujitsu_ids[] = {
42 { .id = "FUJ02BD" },
43 { .id = "FUJ02BF" },
44 { .id = "" }
45};
46
47struct fujitsu_config {
48 unsigned short keymap[KEYMAP_LEN];
49 unsigned int quirks;
50};
51
52static unsigned short keymap_Lifebook_Tseries[KEYMAP_LEN] __initconst = {
53 KEY_RESERVED,
54 KEY_RESERVED,
55 KEY_RESERVED,
56 KEY_RESERVED,
57 KEY_SCROLLDOWN,
58 KEY_SCROLLUP,
59 KEY_DIRECTION,
60 KEY_LEFTCTRL,
61 KEY_BRIGHTNESSUP,
62 KEY_BRIGHTNESSDOWN,
63 KEY_BRIGHTNESS_ZERO,
64 KEY_RESERVED,
65 KEY_RESERVED,
66 KEY_RESERVED,
67 KEY_RESERVED,
68 KEY_LEFTALT
69};
70
71static unsigned short keymap_Lifebook_U810[KEYMAP_LEN] __initconst = {
72 KEY_RESERVED,
73 KEY_RESERVED,
74 KEY_RESERVED,
75 KEY_RESERVED,
76 KEY_PROG1,
77 KEY_PROG2,
78 KEY_DIRECTION,
79 KEY_RESERVED,
80 KEY_RESERVED,
81 KEY_RESERVED,
82 KEY_UP,
83 KEY_DOWN,
84 KEY_RESERVED,
85 KEY_RESERVED,
86 KEY_LEFTCTRL,
87 KEY_LEFTALT
88};
89
90static unsigned short keymap_Stylistic_Tseries[KEYMAP_LEN] __initconst = {
91 KEY_RESERVED,
92 KEY_RESERVED,
93 KEY_RESERVED,
94 KEY_RESERVED,
95 KEY_PRINT,
96 KEY_BACKSPACE,
97 KEY_SPACE,
98 KEY_ENTER,
99 KEY_BRIGHTNESSUP,
100 KEY_BRIGHTNESSDOWN,
101 KEY_DOWN,
102 KEY_UP,
103 KEY_SCROLLUP,
104 KEY_SCROLLDOWN,
105 KEY_LEFTCTRL,
106 KEY_LEFTALT
107};
108
109static unsigned short keymap_Stylistic_ST5xxx[KEYMAP_LEN] __initconst = {
110 KEY_RESERVED,
111 KEY_RESERVED,
112 KEY_RESERVED,
113 KEY_RESERVED,
114 KEY_MAIL,
115 KEY_DIRECTION,
116 KEY_ESC,
117 KEY_ENTER,
118 KEY_BRIGHTNESSUP,
119 KEY_BRIGHTNESSDOWN,
120 KEY_DOWN,
121 KEY_UP,
122 KEY_SCROLLUP,
123 KEY_SCROLLDOWN,
124 KEY_LEFTCTRL,
125 KEY_LEFTALT
126};
127
128static struct {
129 struct input_dev *idev;
130 struct fujitsu_config config;
131 unsigned long prev_keymask;
132
133 char phys[21];
134
135 int irq;
136 int io_base;
137 int io_length;
138} fujitsu;
139
140static u8 fujitsu_ack(void)
141{
142 return inb(fujitsu.io_base + 2);
143}
144
145static u8 fujitsu_status(void)
146{
147 return inb(fujitsu.io_base + 6);
148}
149
150static u8 fujitsu_read_register(const u8 addr)
151{
152 outb(addr, fujitsu.io_base);
153 return inb(fujitsu.io_base + 4);
154}
155
156static void fujitsu_send_state(void)
157{
158 int state;
159 int dock, tablet_mode;
160
161 state = fujitsu_read_register(0xdd);
162
163 dock = state & 0x02;
164
165 if ((fujitsu.config.quirks & FORCE_TABLET_MODE_IF_UNDOCK) && (!dock)) {
166 tablet_mode = 1;
167 } else{
168 tablet_mode = state & 0x01;
169 if (fujitsu.config.quirks & INVERT_TABLET_MODE_BIT)
170 tablet_mode = !tablet_mode;
171 }
172
173 input_report_switch(fujitsu.idev, SW_DOCK, dock);
174 input_report_switch(fujitsu.idev, SW_TABLET_MODE, tablet_mode);
175 input_sync(fujitsu.idev);
176}
177
178static void fujitsu_reset(void)
179{
180 int timeout = 50;
181
182 fujitsu_ack();
183
184 while ((fujitsu_status() & 0x02) && (--timeout))
185 msleep(20);
186
187 fujitsu_send_state();
188}
189
190static int __devinit input_fujitsu_setup(struct device *parent,
191 const char *name, const char *phys)
192{
193 struct input_dev *idev;
194 int error;
195 int i;
196
197 idev = input_allocate_device();
198 if (!idev)
199 return -ENOMEM;
200
201 idev->dev.parent = parent;
202 idev->phys = phys;
203 idev->name = name;
204 idev->id.bustype = BUS_HOST;
205 idev->id.vendor = 0x1734; /* Fujitsu Siemens Computer GmbH */
206 idev->id.product = 0x0001;
207 idev->id.version = 0x0101;
208
209 idev->keycode = fujitsu.config.keymap;
210 idev->keycodesize = sizeof(fujitsu.config.keymap[0]);
211 idev->keycodemax = ARRAY_SIZE(fujitsu.config.keymap);
212
213 __set_bit(EV_REP, idev->evbit);
214
215 for (i = 0; i < ARRAY_SIZE(fujitsu.config.keymap); i++)
216 if (fujitsu.config.keymap[i])
217 input_set_capability(idev, EV_KEY, fujitsu.config.keymap[i]);
218
219 input_set_capability(idev, EV_MSC, MSC_SCAN);
220
221 input_set_capability(idev, EV_SW, SW_DOCK);
222 input_set_capability(idev, EV_SW, SW_TABLET_MODE);
223
224 input_set_capability(idev, EV_SW, SW_DOCK);
225 input_set_capability(idev, EV_SW, SW_TABLET_MODE);
226
227 error = input_register_device(idev);
228 if (error) {
229 input_free_device(idev);
230 return error;
231 }
232
233 fujitsu.idev = idev;
234 return 0;
235}
236
237static void input_fujitsu_remove(void)
238{
239 input_unregister_device(fujitsu.idev);
240}
241
242static irqreturn_t fujitsu_interrupt(int irq, void *dev_id)
243{
244 unsigned long keymask, changed;
245 unsigned int keycode;
246 int pressed;
247 int i;
248
249 if (unlikely(!(fujitsu_status() & 0x01)))
250 return IRQ_NONE;
251
252 fujitsu_send_state();
253
254 keymask = fujitsu_read_register(0xde);
255 keymask |= fujitsu_read_register(0xdf) << 8;
256 keymask ^= 0xffff;
257
258 changed = keymask ^ fujitsu.prev_keymask;
259 if (changed) {
260 fujitsu.prev_keymask = keymask;
261
262 for_each_set_bit(i, &changed, KEYMAP_LEN) {
263 keycode = fujitsu.config.keymap[i];
264 pressed = keymask & changed & BIT(i);
265
266 if (pressed)
267 input_event(fujitsu.idev, EV_MSC, MSC_SCAN, i);
268
269 input_report_key(fujitsu.idev, keycode, pressed);
270 input_sync(fujitsu.idev);
271 }
272 }
273
274 fujitsu_ack();
275 return IRQ_HANDLED;
276}
277
278static int __devinit fujitsu_dmi_default(const struct dmi_system_id *dmi)
279{
280 printk(KERN_INFO MODULENAME ": %s\n", dmi->ident);
281 memcpy(fujitsu.config.keymap, dmi->driver_data,
282 sizeof(fujitsu.config.keymap));
283 return 1;
284}
285
286static int __devinit fujitsu_dmi_stylistic(const struct dmi_system_id *dmi)
287{
288 fujitsu_dmi_default(dmi);
289 fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK;
290 fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT;
291 return 1;
292}
293
294static struct dmi_system_id dmi_ids[] __initconst = {
295 {
296 .callback = fujitsu_dmi_default,
297 .ident = "Fujitsu Siemens P/T Series",
298 .matches = {
299 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
300 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK")
301 },
302 .driver_data = keymap_Lifebook_Tseries
303 },
304 {
305 .callback = fujitsu_dmi_default,
306 .ident = "Fujitsu Lifebook T Series",
307 .matches = {
308 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
309 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook T")
310 },
311 .driver_data = keymap_Lifebook_Tseries
312 },
313 {
314 .callback = fujitsu_dmi_stylistic,
315 .ident = "Fujitsu Siemens Stylistic T Series",
316 .matches = {
317 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
318 DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic T")
319 },
320 .driver_data = keymap_Stylistic_Tseries
321 },
322 {
323 .callback = fujitsu_dmi_default,
324 .ident = "Fujitsu LifeBook U810",
325 .matches = {
326 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
327 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook U810")
328 },
329 .driver_data = keymap_Lifebook_U810
330 },
331 {
332 .callback = fujitsu_dmi_stylistic,
333 .ident = "Fujitsu Siemens Stylistic ST5xxx Series",
334 .matches = {
335 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
336 DMI_MATCH(DMI_PRODUCT_NAME, "STYLISTIC ST5")
337 },
338 .driver_data = keymap_Stylistic_ST5xxx
339 },
340 {
341 .callback = fujitsu_dmi_stylistic,
342 .ident = "Fujitsu Siemens Stylistic ST5xxx Series",
343 .matches = {
344 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
345 DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic ST5")
346 },
347 .driver_data = keymap_Stylistic_ST5xxx
348 },
349 {
350 .callback = fujitsu_dmi_default,
351 .ident = "Unknown (using defaults)",
352 .matches = {
353 DMI_MATCH(DMI_SYS_VENDOR, ""),
354 DMI_MATCH(DMI_PRODUCT_NAME, "")
355 },
356 .driver_data = keymap_Lifebook_Tseries
357 },
358 { NULL }
359};
360
361static acpi_status __devinit
362fujitsu_walk_resources(struct acpi_resource *res, void *data)
363{
364 switch (res->type) {
365 case ACPI_RESOURCE_TYPE_IRQ:
366 fujitsu.irq = res->data.irq.interrupts[0];
367 return AE_OK;
368
369 case ACPI_RESOURCE_TYPE_IO:
370 fujitsu.io_base = res->data.io.minimum;
371 fujitsu.io_length = res->data.io.address_length;
372 return AE_OK;
373
374 case ACPI_RESOURCE_TYPE_END_TAG:
375 if (fujitsu.irq && fujitsu.io_base)
376 return AE_OK;
377 else
378 return AE_NOT_FOUND;
379
380 default:
381 return AE_ERROR;
382 }
383}
384
385static int __devinit acpi_fujitsu_add(struct acpi_device *adev)
386{
387 acpi_status status;
388 int error;
389
390 if (!adev)
391 return -EINVAL;
392
393 status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
394 fujitsu_walk_resources, NULL);
395 if (ACPI_FAILURE(status) || !fujitsu.irq || !fujitsu.io_base)
396 return -ENODEV;
397
398 sprintf(acpi_device_name(adev), "Fujitsu %s", acpi_device_hid(adev));
399 sprintf(acpi_device_class(adev), "%s", ACPI_FUJITSU_CLASS);
400
401 snprintf(fujitsu.phys, sizeof(fujitsu.phys),
402 "%s/input0", acpi_device_hid(adev));
403
404 error = input_fujitsu_setup(&adev->dev,
405 acpi_device_name(adev), fujitsu.phys);
406 if (error)
407 return error;
408
409 if (!request_region(fujitsu.io_base, fujitsu.io_length, MODULENAME)) {
410 input_fujitsu_remove();
411 return -EBUSY;
412 }
413
414 fujitsu_reset();
415
416 error = request_irq(fujitsu.irq, fujitsu_interrupt,
417 IRQF_SHARED, MODULENAME, fujitsu_interrupt);
418 if (error) {
419 release_region(fujitsu.io_base, fujitsu.io_length);
420 input_fujitsu_remove();
421 return error;
422 }
423
424 return 0;
425}
426
427static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type)
428{
429 free_irq(fujitsu.irq, fujitsu_interrupt);
430 release_region(fujitsu.io_base, fujitsu.io_length);
431 input_fujitsu_remove();
432 return 0;
433}
434
435static int acpi_fujitsu_resume(struct acpi_device *adev)
436{
437 fujitsu_reset();
438 return 0;
439}
440
441static struct acpi_driver acpi_fujitsu_driver = {
442 .name = MODULENAME,
443 .class = "hotkey",
444 .ids = fujitsu_ids,
445 .ops = {
446 .add = acpi_fujitsu_add,
447 .remove = acpi_fujitsu_remove,
448 .resume = acpi_fujitsu_resume,
449 }
450};
451
452static int __init fujitsu_module_init(void)
453{
454 int error;
455
456 dmi_check_system(dmi_ids);
457
458 error = acpi_bus_register_driver(&acpi_fujitsu_driver);
459 if (error)
460 return error;
461
462 return 0;
463}
464
465static void __exit fujitsu_module_exit(void)
466{
467 acpi_bus_unregister_driver(&acpi_fujitsu_driver);
468}
469
470module_init(fujitsu_module_init);
471module_exit(fujitsu_module_exit);
472
473MODULE_AUTHOR("Robert Gerlach <khnz@gmx.de>");
474MODULE_DESCRIPTION("Fujitsu tablet pc extras driver");
475MODULE_LICENSE("GPL");
476MODULE_VERSION("2.4");
477
478MODULE_DEVICE_TABLE(acpi, fujitsu_ids);
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index 05be30ee158b..ffff8b4b4949 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -562,8 +562,8 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
562 562
563 num_sifr = acpi_pcc_get_sqty(device); 563 num_sifr = acpi_pcc_get_sqty(device);
564 564
565 if (num_sifr > 255) { 565 if (num_sifr < 0 || num_sifr > 255) {
566 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "num_sifr too large")); 566 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "num_sifr out of range"));
567 return -ENODEV; 567 return -ENODEV;
568 } 568 }
569 569
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
index 2baadd21b7a6..98fbe62694d4 100644
--- a/drivers/pps/pps.c
+++ b/drivers/pps/pps.c
@@ -369,9 +369,9 @@ static int __init pps_init(void)
369 int err; 369 int err;
370 370
371 pps_class = class_create(THIS_MODULE, "pps"); 371 pps_class = class_create(THIS_MODULE, "pps");
372 if (!pps_class) { 372 if (IS_ERR(pps_class)) {
373 pr_err("failed to allocate class\n"); 373 pr_err("failed to allocate class\n");
374 return -ENOMEM; 374 return PTR_ERR(pps_class);
375 } 375 }
376 pps_class->dev_attrs = pps_attrs; 376 pps_class->dev_attrs = pps_attrs;
377 377
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index 691b1ab1a3d0..30d2072f480b 100644
--- a/drivers/rapidio/devices/tsi721.c
+++ b/drivers/rapidio/devices/tsi721.c
@@ -410,13 +410,14 @@ static void tsi721_db_dpc(struct work_struct *work)
410 */ 410 */
411 mport = priv->mport; 411 mport = priv->mport;
412 412
413 wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE)); 413 wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE)) % IDB_QSIZE;
414 rd_ptr = ioread32(priv->regs + TSI721_IDQ_RP(IDB_QUEUE)); 414 rd_ptr = ioread32(priv->regs + TSI721_IDQ_RP(IDB_QUEUE)) % IDB_QSIZE;
415 415
416 while (wr_ptr != rd_ptr) { 416 while (wr_ptr != rd_ptr) {
417 idb_entry = (u64 *)(priv->idb_base + 417 idb_entry = (u64 *)(priv->idb_base +
418 (TSI721_IDB_ENTRY_SIZE * rd_ptr)); 418 (TSI721_IDB_ENTRY_SIZE * rd_ptr));
419 rd_ptr++; 419 rd_ptr++;
420 rd_ptr %= IDB_QSIZE;
420 idb.msg = *idb_entry; 421 idb.msg = *idb_entry;
421 *idb_entry = 0; 422 *idb_entry = 0;
422 423
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 3767364452fd..09915e89705d 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -226,7 +226,7 @@ static int da9052_regulator_set_voltage_int(struct regulator_dev *rdev,
226 if (min_uV < info->min_uV) 226 if (min_uV < info->min_uV)
227 min_uV = info->min_uV; 227 min_uV = info->min_uV;
228 228
229 *selector = (min_uV - info->min_uV) / info->step_uV; 229 *selector = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);
230 230
231 ret = da9052_list_voltage(rdev, *selector); 231 ret = da9052_list_voltage(rdev, *selector);
232 if (ret < 0) 232 if (ret < 0)
@@ -260,8 +260,8 @@ static int da9052_set_ldo5_6_voltage(struct regulator_dev *rdev,
260 * the LDO activate bit to implment the changes on the 260 * the LDO activate bit to implment the changes on the
261 * LDO output. 261 * LDO output.
262 */ 262 */
263 return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0, 263 return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,
264 info->activate_bit); 264 info->activate_bit, info->activate_bit);
265} 265}
266 266
267static int da9052_set_dcdc_voltage(struct regulator_dev *rdev, 267static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,
@@ -280,8 +280,8 @@ static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,
280 * the DCDC activate bit to implment the changes on the 280 * the DCDC activate bit to implment the changes on the
281 * DCDC output. 281 * DCDC output.
282 */ 282 */
283 return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0, 283 return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,
284 info->activate_bit); 284 info->activate_bit, info->activate_bit);
285} 285}
286 286
287static int da9052_get_regulator_voltage_sel(struct regulator_dev *rdev) 287static int da9052_get_regulator_voltage_sel(struct regulator_dev *rdev)
@@ -318,10 +318,10 @@ static int da9052_set_buckperi_voltage(struct regulator_dev *rdev, int min_uV,
318 if ((regulator->da9052->chip_id == DA9052) && 318 if ((regulator->da9052->chip_id == DA9052) &&
319 (min_uV >= DA9052_CONST_3uV)) 319 (min_uV >= DA9052_CONST_3uV))
320 *selector = DA9052_BUCK_PERI_REG_MAP_UPTO_3uV + 320 *selector = DA9052_BUCK_PERI_REG_MAP_UPTO_3uV +
321 ((min_uV - DA9052_CONST_3uV) / 321 DIV_ROUND_UP(min_uV - DA9052_CONST_3uV,
322 (DA9052_BUCK_PERI_3uV_STEP)); 322 DA9052_BUCK_PERI_3uV_STEP);
323 else 323 else
324 *selector = (min_uV - info->min_uV) / info->step_uV; 324 *selector = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV);
325 325
326 ret = da9052_list_buckperi_voltage(rdev, *selector); 326 ret = da9052_list_buckperi_voltage(rdev, *selector);
327 if (ret < 0) 327 if (ret < 0)
@@ -400,6 +400,7 @@ static struct regulator_ops da9052_ldo_ops = {
400 .ops = &da9052_ldo5_6_ops,\ 400 .ops = &da9052_ldo5_6_ops,\
401 .type = REGULATOR_VOLTAGE,\ 401 .type = REGULATOR_VOLTAGE,\
402 .id = _id,\ 402 .id = _id,\
403 .n_voltages = (max - min) / step + 1, \
403 .owner = THIS_MODULE,\ 404 .owner = THIS_MODULE,\
404 },\ 405 },\
405 .min_uV = (min) * 1000,\ 406 .min_uV = (min) * 1000,\
@@ -417,6 +418,7 @@ static struct regulator_ops da9052_ldo_ops = {
417 .ops = &da9052_ldo_ops,\ 418 .ops = &da9052_ldo_ops,\
418 .type = REGULATOR_VOLTAGE,\ 419 .type = REGULATOR_VOLTAGE,\
419 .id = _id,\ 420 .id = _id,\
421 .n_voltages = (max - min) / step + 1, \
420 .owner = THIS_MODULE,\ 422 .owner = THIS_MODULE,\
421 },\ 423 },\
422 .min_uV = (min) * 1000,\ 424 .min_uV = (min) * 1000,\
@@ -434,6 +436,7 @@ static struct regulator_ops da9052_ldo_ops = {
434 .ops = &da9052_dcdc_ops,\ 436 .ops = &da9052_dcdc_ops,\
435 .type = REGULATOR_VOLTAGE,\ 437 .type = REGULATOR_VOLTAGE,\
436 .id = _id,\ 438 .id = _id,\
439 .n_voltages = (max - min) / step + 1, \
437 .owner = THIS_MODULE,\ 440 .owner = THIS_MODULE,\
438 },\ 441 },\
439 .min_uV = (min) * 1000,\ 442 .min_uV = (min) * 1000,\
@@ -451,6 +454,7 @@ static struct regulator_ops da9052_ldo_ops = {
451 .ops = &da9052_buckperi_ops,\ 454 .ops = &da9052_buckperi_ops,\
452 .type = REGULATOR_VOLTAGE,\ 455 .type = REGULATOR_VOLTAGE,\
453 .id = _id,\ 456 .id = _id,\
457 .n_voltages = (max - min) / step + 1, \
454 .owner = THIS_MODULE,\ 458 .owner = THIS_MODULE,\
455 },\ 459 },\
456 .min_uV = (min) * 1000,\ 460 .min_uV = (min) * 1000,\
diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 70b7b1f4f000..2e94686b6fe6 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV,
481 if (i >= info->n_voltages) 481 if (i >= info->n_voltages)
482 i = info->n_voltages - 1; 482 i = info->n_voltages - 1;
483 483
484 *selector = info->voltages[i]; 484 *selector = i;
485 485
486 return write_field(hw, &info->voltage, i); 486 return write_field(hw, &info->voltage, i);
487} 487}
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 5c15ba01e9c7..40ecf5165899 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -662,7 +662,7 @@ static int tps65910_set_voltage_dcdc(struct regulator_dev *dev,
662 tps65910_reg_write(pmic, TPS65910_VDD2_OP, vsel); 662 tps65910_reg_write(pmic, TPS65910_VDD2_OP, vsel);
663 break; 663 break;
664 case TPS65911_REG_VDDCTRL: 664 case TPS65911_REG_VDDCTRL:
665 vsel = selector; 665 vsel = selector + 3;
666 tps65910_reg_write(pmic, TPS65911_VDDCTRL_OP, vsel); 666 tps65910_reg_write(pmic, TPS65911_VDDCTRL_OP, vsel);
667 } 667 }
668 668
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index 9beba49c3c5b..2853c2a6f10f 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -125,6 +125,13 @@ static int __devinit r9701_probe(struct spi_device *spi)
125 unsigned char tmp; 125 unsigned char tmp;
126 int res; 126 int res;
127 127
128 tmp = R100CNT;
129 res = read_regs(&spi->dev, &tmp, 1);
130 if (res || tmp != 0x20) {
131 dev_err(&spi->dev, "cannot read RTC register\n");
132 return -ENODEV;
133 }
134
128 rtc = rtc_device_register("r9701", 135 rtc = rtc_device_register("r9701",
129 &spi->dev, &r9701_rtc_ops, THIS_MODULE); 136 &spi->dev, &r9701_rtc_ops, THIS_MODULE);
130 if (IS_ERR(rtc)) 137 if (IS_ERR(rtc))
@@ -132,13 +139,6 @@ static int __devinit r9701_probe(struct spi_device *spi)
132 139
133 dev_set_drvdata(&spi->dev, rtc); 140 dev_set_drvdata(&spi->dev, rtc);
134 141
135 tmp = R100CNT;
136 res = read_regs(&spi->dev, &tmp, 1);
137 if (res || tmp != 0x20) {
138 rtc_device_unregister(rtc);
139 return res;
140 }
141
142 return 0; 142 return 0;
143} 143}
144 144
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 3ef8d071c64a..770a740a393c 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -167,7 +167,7 @@ again:
167 DBF_ERROR("%4x EQBS ERROR", SCH_NO(q)); 167 DBF_ERROR("%4x EQBS ERROR", SCH_NO(q));
168 DBF_ERROR("%3d%3d%2d", count, tmp_count, nr); 168 DBF_ERROR("%3d%3d%2d", count, tmp_count, nr);
169 q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION, 169 q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
170 0, -1, -1, q->irq_ptr->int_parm); 170 q->nr, q->first_to_kick, count, q->irq_ptr->int_parm);
171 return 0; 171 return 0;
172} 172}
173 173
@@ -215,7 +215,7 @@ again:
215 DBF_ERROR("%4x SQBS ERROR", SCH_NO(q)); 215 DBF_ERROR("%4x SQBS ERROR", SCH_NO(q));
216 DBF_ERROR("%3d%3d%2d", count, tmp_count, nr); 216 DBF_ERROR("%3d%3d%2d", count, tmp_count, nr);
217 q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION, 217 q->handler(q->irq_ptr->cdev, QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
218 0, -1, -1, q->irq_ptr->int_parm); 218 q->nr, q->first_to_kick, count, q->irq_ptr->int_parm);
219 return 0; 219 return 0;
220} 220}
221 221
diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c
index 0cb39ff21171..f8fb2d691c0a 100644
--- a/drivers/scsi/sd_dif.c
+++ b/drivers/scsi/sd_dif.c
@@ -408,7 +408,7 @@ int sd_dif_prepare(struct request *rq, sector_t hw_sector, unsigned int sector_s
408 kunmap_atomic(sdt, KM_USER0); 408 kunmap_atomic(sdt, KM_USER0);
409 } 409 }
410 410
411 bio->bi_flags |= BIO_MAPPED_INTEGRITY; 411 bio->bi_flags |= (1 << BIO_MAPPED_INTEGRITY);
412 } 412 }
413 413
414 return 0; 414 return 0;
diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
index 92d314a73f69..91b6d52f74eb 100644
--- a/drivers/sh/clk/cpg.c
+++ b/drivers/sh/clk/cpg.c
@@ -26,7 +26,7 @@ static void sh_clk_mstp32_disable(struct clk *clk)
26 clk->mapped_reg); 26 clk->mapped_reg);
27} 27}
28 28
29static struct clk_ops sh_clk_mstp32_clk_ops = { 29static struct sh_clk_ops sh_clk_mstp32_clk_ops = {
30 .enable = sh_clk_mstp32_enable, 30 .enable = sh_clk_mstp32_enable,
31 .disable = sh_clk_mstp32_disable, 31 .disable = sh_clk_mstp32_disable,
32 .recalc = followparent_recalc, 32 .recalc = followparent_recalc,
@@ -150,7 +150,7 @@ static void sh_clk_div6_disable(struct clk *clk)
150 iowrite32(value, clk->mapped_reg); 150 iowrite32(value, clk->mapped_reg);
151} 151}
152 152
153static struct clk_ops sh_clk_div6_clk_ops = { 153static struct sh_clk_ops sh_clk_div6_clk_ops = {
154 .recalc = sh_clk_div6_recalc, 154 .recalc = sh_clk_div6_recalc,
155 .round_rate = sh_clk_div_round_rate, 155 .round_rate = sh_clk_div_round_rate,
156 .set_rate = sh_clk_div6_set_rate, 156 .set_rate = sh_clk_div6_set_rate,
@@ -158,7 +158,7 @@ static struct clk_ops sh_clk_div6_clk_ops = {
158 .disable = sh_clk_div6_disable, 158 .disable = sh_clk_div6_disable,
159}; 159};
160 160
161static struct clk_ops sh_clk_div6_reparent_clk_ops = { 161static struct sh_clk_ops sh_clk_div6_reparent_clk_ops = {
162 .recalc = sh_clk_div6_recalc, 162 .recalc = sh_clk_div6_recalc,
163 .round_rate = sh_clk_div_round_rate, 163 .round_rate = sh_clk_div_round_rate,
164 .set_rate = sh_clk_div6_set_rate, 164 .set_rate = sh_clk_div6_set_rate,
@@ -200,7 +200,7 @@ static int __init sh_clk_init_parent(struct clk *clk)
200} 200}
201 201
202static int __init sh_clk_div6_register_ops(struct clk *clks, int nr, 202static int __init sh_clk_div6_register_ops(struct clk *clks, int nr,
203 struct clk_ops *ops) 203 struct sh_clk_ops *ops)
204{ 204{
205 struct clk *clkp; 205 struct clk *clkp;
206 void *freq_table; 206 void *freq_table;
@@ -317,13 +317,13 @@ static void sh_clk_div4_disable(struct clk *clk)
317 iowrite32(ioread32(clk->mapped_reg) | (1 << 8), clk->mapped_reg); 317 iowrite32(ioread32(clk->mapped_reg) | (1 << 8), clk->mapped_reg);
318} 318}
319 319
320static struct clk_ops sh_clk_div4_clk_ops = { 320static struct sh_clk_ops sh_clk_div4_clk_ops = {
321 .recalc = sh_clk_div4_recalc, 321 .recalc = sh_clk_div4_recalc,
322 .set_rate = sh_clk_div4_set_rate, 322 .set_rate = sh_clk_div4_set_rate,
323 .round_rate = sh_clk_div_round_rate, 323 .round_rate = sh_clk_div_round_rate,
324}; 324};
325 325
326static struct clk_ops sh_clk_div4_enable_clk_ops = { 326static struct sh_clk_ops sh_clk_div4_enable_clk_ops = {
327 .recalc = sh_clk_div4_recalc, 327 .recalc = sh_clk_div4_recalc,
328 .set_rate = sh_clk_div4_set_rate, 328 .set_rate = sh_clk_div4_set_rate,
329 .round_rate = sh_clk_div_round_rate, 329 .round_rate = sh_clk_div_round_rate,
@@ -331,7 +331,7 @@ static struct clk_ops sh_clk_div4_enable_clk_ops = {
331 .disable = sh_clk_div4_disable, 331 .disable = sh_clk_div4_disable,
332}; 332};
333 333
334static struct clk_ops sh_clk_div4_reparent_clk_ops = { 334static struct sh_clk_ops sh_clk_div4_reparent_clk_ops = {
335 .recalc = sh_clk_div4_recalc, 335 .recalc = sh_clk_div4_recalc,
336 .set_rate = sh_clk_div4_set_rate, 336 .set_rate = sh_clk_div4_set_rate,
337 .round_rate = sh_clk_div_round_rate, 337 .round_rate = sh_clk_div_round_rate,
@@ -341,7 +341,7 @@ static struct clk_ops sh_clk_div4_reparent_clk_ops = {
341}; 341};
342 342
343static int __init sh_clk_div4_register_ops(struct clk *clks, int nr, 343static int __init sh_clk_div4_register_ops(struct clk *clks, int nr,
344 struct clk_div4_table *table, struct clk_ops *ops) 344 struct clk_div4_table *table, struct sh_clk_ops *ops)
345{ 345{
346 struct clk *clkp; 346 struct clk *clkp;
347 void *freq_table; 347 void *freq_table;
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 2f9cb43a2398..f37ad2271ad5 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1083,7 +1083,7 @@ err_alloc_rx_sg:
1083 return -ENOMEM; 1083 return -ENOMEM;
1084} 1084}
1085 1085
1086static int __init pl022_dma_probe(struct pl022 *pl022) 1086static int __devinit pl022_dma_probe(struct pl022 *pl022)
1087{ 1087{
1088 dma_cap_mask_t mask; 1088 dma_cap_mask_t mask;
1089 1089
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index b3d17416d86a..830cd62d8492 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -365,7 +365,7 @@ config PPC_EPAPR_HV_BYTECHAN
365 365
366config PPC_EARLY_DEBUG_EHV_BC 366config PPC_EARLY_DEBUG_EHV_BC
367 bool "Early console (udbg) support for ePAPR hypervisors" 367 bool "Early console (udbg) support for ePAPR hypervisors"
368 depends on PPC_EPAPR_HV_BYTECHAN 368 depends on PPC_EPAPR_HV_BYTECHAN=y
369 help 369 help
370 Select this option to enable early console (a.k.a. "udbg") support 370 Select this option to enable early console (a.k.a. "udbg") support
371 via an ePAPR byte channel. You also need to choose the byte channel 371 via an ePAPR byte channel. You also need to choose the byte channel
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 75085795528e..61b7fd2729cd 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1710,6 +1710,8 @@ static int sci_startup(struct uart_port *port)
1710 1710
1711 dev_dbg(port->dev, "%s(%d)\n", __func__, port->line); 1711 dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);
1712 1712
1713 pm_runtime_put_noidle(port->dev);
1714
1713 sci_port_enable(s); 1715 sci_port_enable(s);
1714 1716
1715 ret = sci_request_irq(s); 1717 ret = sci_request_irq(s);
@@ -1737,6 +1739,8 @@ static void sci_shutdown(struct uart_port *port)
1737 sci_free_irq(s); 1739 sci_free_irq(s);
1738 1740
1739 sci_port_disable(s); 1741 sci_port_disable(s);
1742
1743 pm_runtime_get_noresume(port->dev);
1740} 1744}
1741 1745
1742static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps, 1746static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps,
@@ -2075,6 +2079,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
2075 sci_init_gpios(sci_port); 2079 sci_init_gpios(sci_port);
2076 2080
2077 pm_runtime_irq_safe(&dev->dev); 2081 pm_runtime_irq_safe(&dev->dev);
2082 pm_runtime_get_noresume(&dev->dev);
2078 pm_runtime_enable(&dev->dev); 2083 pm_runtime_enable(&dev->dev);
2079 } 2084 }
2080 2085
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index c26a82e83f6e..b556a72264d1 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -239,7 +239,7 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
239 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); 239 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]);
240} 240}
241 241
242static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) 242static void ehci_fsl_usb_setup(struct ehci_hcd *ehci)
243{ 243{
244 struct usb_hcd *hcd = ehci_to_hcd(ehci); 244 struct usb_hcd *hcd = ehci_to_hcd(ehci);
245 struct fsl_usb2_platform_data *pdata; 245 struct fsl_usb2_platform_data *pdata;
@@ -299,19 +299,12 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
299#endif 299#endif
300 out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001); 300 out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001);
301 } 301 }
302
303 if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) {
304 printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n");
305 return -ENODEV;
306 }
307 return 0;
308} 302}
309 303
310/* called after powerup, by probe or system-pm "wakeup" */ 304/* called after powerup, by probe or system-pm "wakeup" */
311static int ehci_fsl_reinit(struct ehci_hcd *ehci) 305static int ehci_fsl_reinit(struct ehci_hcd *ehci)
312{ 306{
313 if (ehci_fsl_usb_setup(ehci)) 307 ehci_fsl_usb_setup(ehci);
314 return -ENODEV;
315 ehci_port_power(ehci, 0); 308 ehci_port_power(ehci, 0);
316 309
317 return 0; 310 return 0;
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
index bdf43e2adc51..491806221165 100644
--- a/drivers/usb/host/ehci-fsl.h
+++ b/drivers/usb/host/ehci-fsl.h
@@ -45,6 +45,5 @@
45#define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ 45#define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */
46#define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ 46#define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */
47#define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ 47#define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */
48#define CTRL_PHY_CLK_VALID (1 << 17)
49#define SNOOP_SIZE_2GB 0x1e 48#define SNOOP_SIZE_2GB 0x1e
50#endif /* _EHCI_FSL_H */ 49#endif /* _EHCI_FSL_H */
diff --git a/fs/aio.c b/fs/aio.c
index 969beb0e2231..b9d64d89a043 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -228,12 +228,6 @@ static void __put_ioctx(struct kioctx *ctx)
228 call_rcu(&ctx->rcu_head, ctx_rcu_free); 228 call_rcu(&ctx->rcu_head, ctx_rcu_free);
229} 229}
230 230
231static inline void get_ioctx(struct kioctx *kioctx)
232{
233 BUG_ON(atomic_read(&kioctx->users) <= 0);
234 atomic_inc(&kioctx->users);
235}
236
237static inline int try_get_ioctx(struct kioctx *kioctx) 231static inline int try_get_ioctx(struct kioctx *kioctx)
238{ 232{
239 return atomic_inc_not_zero(&kioctx->users); 233 return atomic_inc_not_zero(&kioctx->users);
@@ -273,7 +267,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
273 mm = ctx->mm = current->mm; 267 mm = ctx->mm = current->mm;
274 atomic_inc(&mm->mm_count); 268 atomic_inc(&mm->mm_count);
275 269
276 atomic_set(&ctx->users, 1); 270 atomic_set(&ctx->users, 2);
277 spin_lock_init(&ctx->ctx_lock); 271 spin_lock_init(&ctx->ctx_lock);
278 spin_lock_init(&ctx->ring_info.ring_lock); 272 spin_lock_init(&ctx->ring_info.ring_lock);
279 init_waitqueue_head(&ctx->wait); 273 init_waitqueue_head(&ctx->wait);
@@ -490,6 +484,8 @@ static void kiocb_batch_free(struct kioctx *ctx, struct kiocb_batch *batch)
490 kmem_cache_free(kiocb_cachep, req); 484 kmem_cache_free(kiocb_cachep, req);
491 ctx->reqs_active--; 485 ctx->reqs_active--;
492 } 486 }
487 if (unlikely(!ctx->reqs_active && ctx->dead))
488 wake_up_all(&ctx->wait);
493 spin_unlock_irq(&ctx->ctx_lock); 489 spin_unlock_irq(&ctx->ctx_lock);
494} 490}
495 491
@@ -607,11 +603,16 @@ static void aio_fput_routine(struct work_struct *data)
607 fput(req->ki_filp); 603 fput(req->ki_filp);
608 604
609 /* Link the iocb into the context's free list */ 605 /* Link the iocb into the context's free list */
606 rcu_read_lock();
610 spin_lock_irq(&ctx->ctx_lock); 607 spin_lock_irq(&ctx->ctx_lock);
611 really_put_req(ctx, req); 608 really_put_req(ctx, req);
609 /*
610 * at that point ctx might've been killed, but actual
611 * freeing is RCU'd
612 */
612 spin_unlock_irq(&ctx->ctx_lock); 613 spin_unlock_irq(&ctx->ctx_lock);
614 rcu_read_unlock();
613 615
614 put_ioctx(ctx);
615 spin_lock_irq(&fput_lock); 616 spin_lock_irq(&fput_lock);
616 } 617 }
617 spin_unlock_irq(&fput_lock); 618 spin_unlock_irq(&fput_lock);
@@ -642,7 +643,6 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req)
642 * this function will be executed w/out any aio kthread wakeup. 643 * this function will be executed w/out any aio kthread wakeup.
643 */ 644 */
644 if (unlikely(!fput_atomic(req->ki_filp))) { 645 if (unlikely(!fput_atomic(req->ki_filp))) {
645 get_ioctx(ctx);
646 spin_lock(&fput_lock); 646 spin_lock(&fput_lock);
647 list_add(&req->ki_list, &fput_head); 647 list_add(&req->ki_list, &fput_head);
648 spin_unlock(&fput_lock); 648 spin_unlock(&fput_lock);
@@ -1336,10 +1336,10 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
1336 ret = PTR_ERR(ioctx); 1336 ret = PTR_ERR(ioctx);
1337 if (!IS_ERR(ioctx)) { 1337 if (!IS_ERR(ioctx)) {
1338 ret = put_user(ioctx->user_id, ctxp); 1338 ret = put_user(ioctx->user_id, ctxp);
1339 if (!ret) 1339 if (!ret) {
1340 put_ioctx(ioctx);
1340 return 0; 1341 return 0;
1341 1342 }
1342 get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
1343 io_destroy(ioctx); 1343 io_destroy(ioctx);
1344 } 1344 }
1345 1345
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index a6395bdb26ae..1ff94054d35a 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -259,6 +259,13 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
259 current->mm->free_area_cache = current->mm->mmap_base; 259 current->mm->free_area_cache = current->mm->mmap_base;
260 current->mm->cached_hole_size = 0; 260 current->mm->cached_hole_size = 0;
261 261
262 retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
263 if (retval < 0) {
264 /* Someone check-me: is this error path enough? */
265 send_sig(SIGKILL, current, 0);
266 return retval;
267 }
268
262 install_exec_creds(bprm); 269 install_exec_creds(bprm);
263 current->flags &= ~PF_FORKNOEXEC; 270 current->flags &= ~PF_FORKNOEXEC;
264 271
@@ -352,13 +359,6 @@ beyond_if:
352 return retval; 359 return retval;
353 } 360 }
354 361
355 retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
356 if (retval < 0) {
357 /* Someone check-me: is this error path enough? */
358 send_sig(SIGKILL, current, 0);
359 return retval;
360 }
361
362 current->mm->start_stack = 362 current->mm->start_stack =
363 (unsigned long) create_aout_tables((char __user *) bprm->p, bprm); 363 (unsigned long) create_aout_tables((char __user *) bprm->p, bprm);
364#ifdef __alpha__ 364#ifdef __alpha__
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 0e575d1304b4..5e9f198f7712 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1183,8 +1183,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
1183 * The latter is necessary to prevent ghost 1183 * The latter is necessary to prevent ghost
1184 * partitions on a removed medium. 1184 * partitions on a removed medium.
1185 */ 1185 */
1186 if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM)) 1186 if (bdev->bd_invalidated) {
1187 rescan_partitions(disk, bdev); 1187 if (!ret)
1188 rescan_partitions(disk, bdev);
1189 else if (ret == -ENOMEDIUM)
1190 invalidate_partitions(disk, bdev);
1191 }
1188 if (ret) 1192 if (ret)
1189 goto out_clear; 1193 goto out_clear;
1190 } else { 1194 } else {
@@ -1214,8 +1218,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
1214 if (bdev->bd_disk->fops->open) 1218 if (bdev->bd_disk->fops->open)
1215 ret = bdev->bd_disk->fops->open(bdev, mode); 1219 ret = bdev->bd_disk->fops->open(bdev, mode);
1216 /* the same as first opener case, read comment there */ 1220 /* the same as first opener case, read comment there */
1217 if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM)) 1221 if (bdev->bd_invalidated) {
1218 rescan_partitions(bdev->bd_disk, bdev); 1222 if (!ret)
1223 rescan_partitions(bdev->bd_disk, bdev);
1224 else if (ret == -ENOMEDIUM)
1225 invalidate_partitions(bdev->bd_disk, bdev);
1226 }
1219 if (ret) 1227 if (ret)
1220 goto out_unlock_bdev; 1228 goto out_unlock_bdev;
1221 } 1229 }
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 98f6bf10bbd4..0436c12da8c2 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -583,7 +583,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
583 struct btrfs_path *path; 583 struct btrfs_path *path;
584 struct btrfs_key info_key = { 0 }; 584 struct btrfs_key info_key = { 0 };
585 struct btrfs_delayed_ref_root *delayed_refs = NULL; 585 struct btrfs_delayed_ref_root *delayed_refs = NULL;
586 struct btrfs_delayed_ref_head *head = NULL; 586 struct btrfs_delayed_ref_head *head;
587 int info_level = 0; 587 int info_level = 0;
588 int ret; 588 int ret;
589 struct list_head prefs_delayed; 589 struct list_head prefs_delayed;
@@ -607,6 +607,8 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
607 * at a specified point in time 607 * at a specified point in time
608 */ 608 */
609again: 609again:
610 head = NULL;
611
610 ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0); 612 ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0);
611 if (ret < 0) 613 if (ret < 0)
612 goto out; 614 goto out;
@@ -635,8 +637,10 @@ again:
635 goto again; 637 goto again;
636 } 638 }
637 ret = __add_delayed_refs(head, seq, &info_key, &prefs_delayed); 639 ret = __add_delayed_refs(head, seq, &info_key, &prefs_delayed);
638 if (ret) 640 if (ret) {
641 spin_unlock(&delayed_refs->lock);
639 goto out; 642 goto out;
643 }
640 } 644 }
641 spin_unlock(&delayed_refs->lock); 645 spin_unlock(&delayed_refs->lock);
642 646
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 2373b39a132b..22db04550f6a 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -305,7 +305,7 @@ again:
305 305
306 spin_lock(&fs_info->reada_lock); 306 spin_lock(&fs_info->reada_lock);
307 ret = radix_tree_insert(&dev->reada_zones, 307 ret = radix_tree_insert(&dev->reada_zones,
308 (unsigned long)zone->end >> PAGE_CACHE_SHIFT, 308 (unsigned long)(zone->end >> PAGE_CACHE_SHIFT),
309 zone); 309 zone);
310 spin_unlock(&fs_info->reada_lock); 310 spin_unlock(&fs_info->reada_lock);
311 311
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 63a196b97d50..bc7e24420ac0 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -584,10 +584,26 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
584 * If either that or op not supported returned, follow 584 * If either that or op not supported returned, follow
585 * the normal lookup. 585 * the normal lookup.
586 */ 586 */
587 if ((rc == 0) || (rc == -ENOENT)) 587 switch (rc) {
588 case 0:
589 /*
590 * The server may allow us to open things like
591 * FIFOs, but the client isn't set up to deal
592 * with that. If it's not a regular file, just
593 * close it and proceed as if it were a normal
594 * lookup.
595 */
596 if (newInode && !S_ISREG(newInode->i_mode)) {
597 CIFSSMBClose(xid, pTcon, fileHandle);
598 break;
599 }
600 case -ENOENT:
588 posix_open = true; 601 posix_open = true;
589 else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP)) 602 case -EOPNOTSUPP:
603 break;
604 default:
590 pTcon->broken_posix_open = true; 605 pTcon->broken_posix_open = true;
606 }
591 } 607 }
592 if (!posix_open) 608 if (!posix_open)
593 rc = cifs_get_inode_info_unix(&newInode, full_path, 609 rc = cifs_get_inode_info_unix(&newInode, full_path,
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 4dd9283885e7..5e64748a2917 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -920,16 +920,26 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
920 for (lockp = &inode->i_flock; *lockp != NULL; \ 920 for (lockp = &inode->i_flock; *lockp != NULL; \
921 lockp = &(*lockp)->fl_next) 921 lockp = &(*lockp)->fl_next)
922 922
923struct lock_to_push {
924 struct list_head llist;
925 __u64 offset;
926 __u64 length;
927 __u32 pid;
928 __u16 netfid;
929 __u8 type;
930};
931
923static int 932static int
924cifs_push_posix_locks(struct cifsFileInfo *cfile) 933cifs_push_posix_locks(struct cifsFileInfo *cfile)
925{ 934{
926 struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode); 935 struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
927 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); 936 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
928 struct file_lock *flock, **before; 937 struct file_lock *flock, **before;
929 struct cifsLockInfo *lck, *tmp; 938 unsigned int count = 0, i = 0;
930 int rc = 0, xid, type; 939 int rc = 0, xid, type;
940 struct list_head locks_to_send, *el;
941 struct lock_to_push *lck, *tmp;
931 __u64 length; 942 __u64 length;
932 struct list_head locks_to_send;
933 943
934 xid = GetXid(); 944 xid = GetXid();
935 945
@@ -940,29 +950,55 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
940 return rc; 950 return rc;
941 } 951 }
942 952
953 lock_flocks();
954 cifs_for_each_lock(cfile->dentry->d_inode, before) {
955 if ((*before)->fl_flags & FL_POSIX)
956 count++;
957 }
958 unlock_flocks();
959
943 INIT_LIST_HEAD(&locks_to_send); 960 INIT_LIST_HEAD(&locks_to_send);
944 961
962 /*
963 * Allocating count locks is enough because no locks can be added to
964 * the list while we are holding cinode->lock_mutex that protects
965 * locking operations of this inode.
966 */
967 for (; i < count; i++) {
968 lck = kmalloc(sizeof(struct lock_to_push), GFP_KERNEL);
969 if (!lck) {
970 rc = -ENOMEM;
971 goto err_out;
972 }
973 list_add_tail(&lck->llist, &locks_to_send);
974 }
975
976 i = 0;
977 el = locks_to_send.next;
945 lock_flocks(); 978 lock_flocks();
946 cifs_for_each_lock(cfile->dentry->d_inode, before) { 979 cifs_for_each_lock(cfile->dentry->d_inode, before) {
980 if (el == &locks_to_send) {
981 /* something is really wrong */
982 cERROR(1, "Can't push all brlocks!");
983 break;
984 }
947 flock = *before; 985 flock = *before;
986 if ((flock->fl_flags & FL_POSIX) == 0)
987 continue;
948 length = 1 + flock->fl_end - flock->fl_start; 988 length = 1 + flock->fl_end - flock->fl_start;
949 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK) 989 if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK)
950 type = CIFS_RDLCK; 990 type = CIFS_RDLCK;
951 else 991 else
952 type = CIFS_WRLCK; 992 type = CIFS_WRLCK;
953 993 lck = list_entry(el, struct lock_to_push, llist);
954 lck = cifs_lock_init(flock->fl_start, length, type,
955 cfile->netfid);
956 if (!lck) {
957 rc = -ENOMEM;
958 goto send_locks;
959 }
960 lck->pid = flock->fl_pid; 994 lck->pid = flock->fl_pid;
961 995 lck->netfid = cfile->netfid;
962 list_add_tail(&lck->llist, &locks_to_send); 996 lck->length = length;
997 lck->type = type;
998 lck->offset = flock->fl_start;
999 i++;
1000 el = el->next;
963 } 1001 }
964
965send_locks:
966 unlock_flocks(); 1002 unlock_flocks();
967 1003
968 list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) { 1004 list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
@@ -979,11 +1015,18 @@ send_locks:
979 kfree(lck); 1015 kfree(lck);
980 } 1016 }
981 1017
1018out:
982 cinode->can_cache_brlcks = false; 1019 cinode->can_cache_brlcks = false;
983 mutex_unlock(&cinode->lock_mutex); 1020 mutex_unlock(&cinode->lock_mutex);
984 1021
985 FreeXid(xid); 1022 FreeXid(xid);
986 return rc; 1023 return rc;
1024err_out:
1025 list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
1026 list_del(&lck->llist);
1027 kfree(lck);
1028 }
1029 goto out;
987} 1030}
988 1031
989static int 1032static int
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index a5f54b7d9822..745da3d0653e 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -534,6 +534,11 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
534 if (fattr->cf_cifsattrs & ATTR_DIRECTORY) { 534 if (fattr->cf_cifsattrs & ATTR_DIRECTORY) {
535 fattr->cf_mode = S_IFDIR | cifs_sb->mnt_dir_mode; 535 fattr->cf_mode = S_IFDIR | cifs_sb->mnt_dir_mode;
536 fattr->cf_dtype = DT_DIR; 536 fattr->cf_dtype = DT_DIR;
537 /*
538 * Server can return wrong NumberOfLinks value for directories
539 * when Unix extensions are disabled - fake it.
540 */
541 fattr->cf_nlink = 2;
537 } else { 542 } else {
538 fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode; 543 fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode;
539 fattr->cf_dtype = DT_REG; 544 fattr->cf_dtype = DT_REG;
@@ -541,9 +546,9 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
541 /* clear write bits if ATTR_READONLY is set */ 546 /* clear write bits if ATTR_READONLY is set */
542 if (fattr->cf_cifsattrs & ATTR_READONLY) 547 if (fattr->cf_cifsattrs & ATTR_READONLY)
543 fattr->cf_mode &= ~(S_IWUGO); 548 fattr->cf_mode &= ~(S_IWUGO);
544 }
545 549
546 fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks); 550 fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks);
551 }
547 552
548 fattr->cf_uid = cifs_sb->mnt_uid; 553 fattr->cf_uid = cifs_sb->mnt_uid;
549 fattr->cf_gid = cifs_sb->mnt_gid; 554 fattr->cf_gid = cifs_sb->mnt_gid;
@@ -1322,7 +1327,6 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode)
1322 } 1327 }
1323/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need 1328/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need
1324 to set uid/gid */ 1329 to set uid/gid */
1325 inc_nlink(inode);
1326 1330
1327 cifs_unix_basic_to_fattr(&fattr, pInfo, cifs_sb); 1331 cifs_unix_basic_to_fattr(&fattr, pInfo, cifs_sb);
1328 cifs_fill_uniqueid(inode->i_sb, &fattr); 1332 cifs_fill_uniqueid(inode->i_sb, &fattr);
@@ -1355,7 +1359,6 @@ mkdir_retry_old:
1355 d_drop(direntry); 1359 d_drop(direntry);
1356 } else { 1360 } else {
1357mkdir_get_info: 1361mkdir_get_info:
1358 inc_nlink(inode);
1359 if (pTcon->unix_ext) 1362 if (pTcon->unix_ext)
1360 rc = cifs_get_inode_info_unix(&newinode, full_path, 1363 rc = cifs_get_inode_info_unix(&newinode, full_path,
1361 inode->i_sb, xid); 1364 inode->i_sb, xid);
@@ -1436,6 +1439,11 @@ mkdir_get_info:
1436 } 1439 }
1437 } 1440 }
1438mkdir_out: 1441mkdir_out:
1442 /*
1443 * Force revalidate to get parent dir info when needed since cached
1444 * attributes are invalid now.
1445 */
1446 CIFS_I(inode)->time = 0;
1439 kfree(full_path); 1447 kfree(full_path);
1440 FreeXid(xid); 1448 FreeXid(xid);
1441 cifs_put_tlink(tlink); 1449 cifs_put_tlink(tlink);
@@ -1475,7 +1483,6 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
1475 cifs_put_tlink(tlink); 1483 cifs_put_tlink(tlink);
1476 1484
1477 if (!rc) { 1485 if (!rc) {
1478 drop_nlink(inode);
1479 spin_lock(&direntry->d_inode->i_lock); 1486 spin_lock(&direntry->d_inode->i_lock);
1480 i_size_write(direntry->d_inode, 0); 1487 i_size_write(direntry->d_inode, 0);
1481 clear_nlink(direntry->d_inode); 1488 clear_nlink(direntry->d_inode);
@@ -1483,12 +1490,15 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
1483 } 1490 }
1484 1491
1485 cifsInode = CIFS_I(direntry->d_inode); 1492 cifsInode = CIFS_I(direntry->d_inode);
1486 cifsInode->time = 0; /* force revalidate to go get info when 1493 /* force revalidate to go get info when needed */
1487 needed */ 1494 cifsInode->time = 0;
1488 1495
1489 cifsInode = CIFS_I(inode); 1496 cifsInode = CIFS_I(inode);
1490 cifsInode->time = 0; /* force revalidate to get parent dir info 1497 /*
1491 since cached search results now invalid */ 1498 * Force revalidate to get parent dir info when needed since cached
1499 * attributes are invalid now.
1500 */
1501 cifsInode->time = 0;
1492 1502
1493 direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = 1503 direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime =
1494 current_fs_time(inode->i_sb); 1504 current_fs_time(inode->i_sb);
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 45f07c46f3ed..10d92cf57ab6 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -105,7 +105,6 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
105 struct cifs_tcon *pTcon; 105 struct cifs_tcon *pTcon;
106 struct super_block *sb; 106 struct super_block *sb;
107 char *full_path; 107 char *full_path;
108 struct cifs_ntsd *pacl;
109 108
110 if (direntry == NULL) 109 if (direntry == NULL)
111 return -EIO; 110 return -EIO;
@@ -164,23 +163,24 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
164 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 163 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
165 } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL, 164 } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL,
166 strlen(CIFS_XATTR_CIFS_ACL)) == 0) { 165 strlen(CIFS_XATTR_CIFS_ACL)) == 0) {
166#ifdef CONFIG_CIFS_ACL
167 struct cifs_ntsd *pacl;
167 pacl = kmalloc(value_size, GFP_KERNEL); 168 pacl = kmalloc(value_size, GFP_KERNEL);
168 if (!pacl) { 169 if (!pacl) {
169 cFYI(1, "%s: Can't allocate memory for ACL", 170 cFYI(1, "%s: Can't allocate memory for ACL",
170 __func__); 171 __func__);
171 rc = -ENOMEM; 172 rc = -ENOMEM;
172 } else { 173 } else {
173#ifdef CONFIG_CIFS_ACL
174 memcpy(pacl, ea_value, value_size); 174 memcpy(pacl, ea_value, value_size);
175 rc = set_cifs_acl(pacl, value_size, 175 rc = set_cifs_acl(pacl, value_size,
176 direntry->d_inode, full_path, CIFS_ACL_DACL); 176 direntry->d_inode, full_path, CIFS_ACL_DACL);
177 if (rc == 0) /* force revalidate of the inode */ 177 if (rc == 0) /* force revalidate of the inode */
178 CIFS_I(direntry->d_inode)->time = 0; 178 CIFS_I(direntry->d_inode)->time = 0;
179 kfree(pacl); 179 kfree(pacl);
180 }
180#else 181#else
181 cFYI(1, "Set CIFS ACL not supported yet"); 182 cFYI(1, "Set CIFS ACL not supported yet");
182#endif /* CONFIG_CIFS_ACL */ 183#endif /* CONFIG_CIFS_ACL */
183 }
184 } else { 184 } else {
185 int temp; 185 int temp;
186 temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, 186 temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS,
diff --git a/fs/dcache.c b/fs/dcache.c
index 138be96e25b6..bcbdb33fcc20 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -137,6 +137,26 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
137} 137}
138#endif 138#endif
139 139
140/*
141 * Compare 2 name strings, return 0 if they match, otherwise non-zero.
142 * The strings are both count bytes long, and count is non-zero.
143 */
144static inline int dentry_cmp(const unsigned char *cs, size_t scount,
145 const unsigned char *ct, size_t tcount)
146{
147 if (scount != tcount)
148 return 1;
149
150 do {
151 if (*cs != *ct)
152 return 1;
153 cs++;
154 ct++;
155 tcount--;
156 } while (tcount);
157 return 0;
158}
159
140static void __d_free(struct rcu_head *head) 160static void __d_free(struct rcu_head *head)
141{ 161{
142 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); 162 struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu);
diff --git a/fs/exec.c b/fs/exec.c
index 92ce83a11e90..153dee14fe55 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1915,7 +1915,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1915{ 1915{
1916 struct task_struct *tsk = current; 1916 struct task_struct *tsk = current;
1917 struct mm_struct *mm = tsk->mm; 1917 struct mm_struct *mm = tsk->mm;
1918 struct completion *vfork_done;
1919 int core_waiters = -EBUSY; 1918 int core_waiters = -EBUSY;
1920 1919
1921 init_completion(&core_state->startup); 1920 init_completion(&core_state->startup);
@@ -1927,22 +1926,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1927 core_waiters = zap_threads(tsk, mm, core_state, exit_code); 1926 core_waiters = zap_threads(tsk, mm, core_state, exit_code);
1928 up_write(&mm->mmap_sem); 1927 up_write(&mm->mmap_sem);
1929 1928
1930 if (unlikely(core_waiters < 0)) 1929 if (core_waiters > 0)
1931 goto fail;
1932
1933 /*
1934 * Make sure nobody is waiting for us to release the VM,
1935 * otherwise we can deadlock when we wait on each other
1936 */
1937 vfork_done = tsk->vfork_done;
1938 if (vfork_done) {
1939 tsk->vfork_done = NULL;
1940 complete(vfork_done);
1941 }
1942
1943 if (core_waiters)
1944 wait_for_completion(&core_state->startup); 1930 wait_for_completion(&core_state->startup);
1945fail: 1931
1946 return core_waiters; 1932 return core_waiters;
1947} 1933}
1948 1934
diff --git a/fs/inode.c b/fs/inode.c
index d3ebdbe723d0..83ab215baab1 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -938,8 +938,7 @@ void lockdep_annotate_inode_mutex_key(struct inode *inode)
938 struct file_system_type *type = inode->i_sb->s_type; 938 struct file_system_type *type = inode->i_sb->s_type;
939 939
940 /* Set new key only if filesystem hasn't already changed it */ 940 /* Set new key only if filesystem hasn't already changed it */
941 if (!lockdep_match_class(&inode->i_mutex, 941 if (lockdep_match_class(&inode->i_mutex, &type->i_mutex_key)) {
942 &type->i_mutex_key)) {
943 /* 942 /*
944 * ensure nobody is actually holding i_mutex 943 * ensure nobody is actually holding i_mutex
945 */ 944 */
@@ -966,6 +965,7 @@ void unlock_new_inode(struct inode *inode)
966 spin_lock(&inode->i_lock); 965 spin_lock(&inode->i_lock);
967 WARN_ON(!(inode->i_state & I_NEW)); 966 WARN_ON(!(inode->i_state & I_NEW));
968 inode->i_state &= ~I_NEW; 967 inode->i_state &= ~I_NEW;
968 smp_mb();
969 wake_up_bit(&inode->i_state, __I_NEW); 969 wake_up_bit(&inode->i_state, __I_NEW);
970 spin_unlock(&inode->i_lock); 970 spin_unlock(&inode->i_lock);
971} 971}
diff --git a/fs/namei.c b/fs/namei.c
index e2ba62820a0f..46ea9cc16647 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2162,7 +2162,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
2162 /* sayonara */ 2162 /* sayonara */
2163 error = complete_walk(nd); 2163 error = complete_walk(nd);
2164 if (error) 2164 if (error)
2165 return ERR_PTR(-ECHILD); 2165 return ERR_PTR(error);
2166 2166
2167 error = -ENOTDIR; 2167 error = -ENOTDIR;
2168 if (nd->flags & LOOKUP_DIRECTORY) { 2168 if (nd->flags & LOOKUP_DIRECTORY) {
@@ -2261,7 +2261,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
2261 /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ 2261 /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
2262 error = complete_walk(nd); 2262 error = complete_walk(nd);
2263 if (error) 2263 if (error)
2264 goto exit; 2264 return ERR_PTR(error);
2265 error = -EISDIR; 2265 error = -EISDIR;
2266 if (S_ISDIR(nd->inode->i_mode)) 2266 if (S_ISDIR(nd->inode->i_mode))
2267 goto exit; 2267 goto exit;
diff --git a/fs/udf/file.c b/fs/udf/file.c
index dca0c3881e82..d567b8448dfc 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -201,12 +201,10 @@ out:
201static int udf_release_file(struct inode *inode, struct file *filp) 201static int udf_release_file(struct inode *inode, struct file *filp)
202{ 202{
203 if (filp->f_mode & FMODE_WRITE) { 203 if (filp->f_mode & FMODE_WRITE) {
204 mutex_lock(&inode->i_mutex);
205 down_write(&UDF_I(inode)->i_data_sem); 204 down_write(&UDF_I(inode)->i_data_sem);
206 udf_discard_prealloc(inode); 205 udf_discard_prealloc(inode);
207 udf_truncate_tail_extent(inode); 206 udf_truncate_tail_extent(inode);
208 up_write(&UDF_I(inode)->i_data_sem); 207 up_write(&UDF_I(inode)->i_data_sem);
209 mutex_unlock(&inode->i_mutex);
210 } 208 }
211 return 0; 209 return 0;
212} 210}
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h
index 514ed45c462e..d117b29d1062 100644
--- a/include/linux/amba/serial.h
+++ b/include/linux/amba/serial.h
@@ -23,6 +23,8 @@
23#ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H 23#ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H
24#define ASM_ARM_HARDWARE_SERIAL_AMBA_H 24#define ASM_ARM_HARDWARE_SERIAL_AMBA_H
25 25
26#include <linux/types.h>
27
26/* ------------------------------------------------------------------------------- 28/* -------------------------------------------------------------------------------
27 * From AMBA UART (PL010) Block Specification 29 * From AMBA UART (PL010) Block Specification
28 * ------------------------------------------------------------------------------- 30 * -------------------------------------------------------------------------------
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 4270bedd2308..ff5f5256d175 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -47,26 +47,6 @@ struct dentry_stat_t {
47}; 47};
48extern struct dentry_stat_t dentry_stat; 48extern struct dentry_stat_t dentry_stat;
49 49
50/*
51 * Compare 2 name strings, return 0 if they match, otherwise non-zero.
52 * The strings are both count bytes long, and count is non-zero.
53 */
54static inline int dentry_cmp(const unsigned char *cs, size_t scount,
55 const unsigned char *ct, size_t tcount)
56{
57 if (scount != tcount)
58 return 1;
59
60 do {
61 if (*cs != *ct)
62 return 1;
63 cs++;
64 ct++;
65 tcount--;
66 } while (tcount);
67 return 0;
68}
69
70/* Name hashing routines. Initial hash value */ 50/* Name hashing routines. Initial hash value */
71/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */ 51/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */
72#define init_name_hash() 0 52#define init_name_hash() 0
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index fe23ee768589..e61d3192448e 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -596,6 +596,7 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
596 596
597extern int disk_expand_part_tbl(struct gendisk *disk, int target); 597extern int disk_expand_part_tbl(struct gendisk *disk, int target);
598extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 598extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
599extern int invalidate_partitions(struct gendisk *disk, struct block_device *bdev);
599extern struct hd_struct * __must_check add_partition(struct gendisk *disk, 600extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
600 int partno, sector_t start, 601 int partno, sector_t start,
601 sector_t len, int flags, 602 sector_t len, int flags,
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index 119773eebe31..1a3018063034 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -6,8 +6,11 @@
6#include <linux/workqueue.h> 6#include <linux/workqueue.h>
7 7
8enum { 8enum {
9 ICQ_IOPRIO_CHANGED, 9 ICQ_IOPRIO_CHANGED = 1 << 0,
10 ICQ_CGROUP_CHANGED, 10 ICQ_CGROUP_CHANGED = 1 << 1,
11 ICQ_EXITED = 1 << 2,
12
13 ICQ_CHANGED_MASK = ICQ_IOPRIO_CHANGED | ICQ_CGROUP_CHANGED,
11}; 14};
12 15
13/* 16/*
@@ -88,7 +91,7 @@ struct io_cq {
88 struct rcu_head __rcu_head; 91 struct rcu_head __rcu_head;
89 }; 92 };
90 93
91 unsigned long changed; 94 unsigned int flags;
92}; 95};
93 96
94/* 97/*
@@ -139,6 +142,7 @@ struct io_context *get_task_io_context(struct task_struct *task,
139 gfp_t gfp_flags, int node); 142 gfp_t gfp_flags, int node);
140void ioc_ioprio_changed(struct io_context *ioc, int ioprio); 143void ioc_ioprio_changed(struct io_context *ioc, int ioprio);
141void ioc_cgroup_changed(struct io_context *ioc); 144void ioc_cgroup_changed(struct io_context *ioc);
145unsigned int icq_get_changed(struct io_cq *icq);
142#else 146#else
143struct io_context; 147struct io_context;
144static inline void put_io_context(struct io_context *ioc) { } 148static inline void put_io_context(struct io_context *ioc) { }
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h
index fee66317e071..35f7237ec972 100644
--- a/include/linux/kmsg_dump.h
+++ b/include/linux/kmsg_dump.h
@@ -15,13 +15,18 @@
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/list.h> 16#include <linux/list.h>
17 17
18/*
19 * Keep this list arranged in rough order of priority. Anything listed after
20 * KMSG_DUMP_OOPS will not be logged by default unless printk.always_kmsg_dump
21 * is passed to the kernel.
22 */
18enum kmsg_dump_reason { 23enum kmsg_dump_reason {
19 KMSG_DUMP_OOPS,
20 KMSG_DUMP_PANIC, 24 KMSG_DUMP_PANIC,
25 KMSG_DUMP_OOPS,
26 KMSG_DUMP_EMERG,
21 KMSG_DUMP_RESTART, 27 KMSG_DUMP_RESTART,
22 KMSG_DUMP_HALT, 28 KMSG_DUMP_HALT,
23 KMSG_DUMP_POWEROFF, 29 KMSG_DUMP_POWEROFF,
24 KMSG_DUMP_EMERG,
25}; 30};
26 31
27/** 32/**
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 4d34356fe644..b80de520670b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -129,7 +129,6 @@ extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
129extern void mem_cgroup_replace_page_cache(struct page *oldpage, 129extern void mem_cgroup_replace_page_cache(struct page *oldpage,
130 struct page *newpage); 130 struct page *newpage);
131 131
132extern void mem_cgroup_reset_owner(struct page *page);
133#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 132#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
134extern int do_swap_account; 133extern int do_swap_account;
135#endif 134#endif
@@ -392,10 +391,6 @@ static inline void mem_cgroup_replace_page_cache(struct page *oldpage,
392 struct page *newpage) 391 struct page *newpage)
393{ 392{
394} 393}
395
396static inline void mem_cgroup_reset_owner(struct page *page)
397{
398}
399#endif /* CONFIG_CGROUP_MEM_CONT */ 394#endif /* CONFIG_CGROUP_MEM_CONT */
400 395
401#if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) 396#if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM)
diff --git a/include/linux/of.h b/include/linux/of.h
index a75a831e2057..92cf6ad35e0e 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -281,6 +281,14 @@ static inline struct property *of_find_property(const struct device_node *np,
281 return NULL; 281 return NULL;
282} 282}
283 283
284static inline struct device_node *of_find_compatible_node(
285 struct device_node *from,
286 const char *type,
287 const char *compat)
288{
289 return NULL;
290}
291
284static inline int of_property_read_u32_array(const struct device_node *np, 292static inline int of_property_read_u32_array(const struct device_node *np,
285 const char *propname, 293 const char *propname,
286 u32 *out_values, size_t sz) 294 u32 *out_values, size_t sz)
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 32cd1f67462e..21638ae14e07 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -348,9 +348,9 @@ do { \
348#define _this_cpu_generic_to_op(pcp, val, op) \ 348#define _this_cpu_generic_to_op(pcp, val, op) \
349do { \ 349do { \
350 unsigned long flags; \ 350 unsigned long flags; \
351 local_irq_save(flags); \ 351 raw_local_irq_save(flags); \
352 *__this_cpu_ptr(&(pcp)) op val; \ 352 *__this_cpu_ptr(&(pcp)) op val; \
353 local_irq_restore(flags); \ 353 raw_local_irq_restore(flags); \
354} while (0) 354} while (0)
355 355
356#ifndef this_cpu_write 356#ifndef this_cpu_write
@@ -449,10 +449,10 @@ do { \
449({ \ 449({ \
450 typeof(pcp) ret__; \ 450 typeof(pcp) ret__; \
451 unsigned long flags; \ 451 unsigned long flags; \
452 local_irq_save(flags); \ 452 raw_local_irq_save(flags); \
453 __this_cpu_add(pcp, val); \ 453 __this_cpu_add(pcp, val); \
454 ret__ = __this_cpu_read(pcp); \ 454 ret__ = __this_cpu_read(pcp); \
455 local_irq_restore(flags); \ 455 raw_local_irq_restore(flags); \
456 ret__; \ 456 ret__; \
457}) 457})
458 458
@@ -479,10 +479,10 @@ do { \
479#define _this_cpu_generic_xchg(pcp, nval) \ 479#define _this_cpu_generic_xchg(pcp, nval) \
480({ typeof(pcp) ret__; \ 480({ typeof(pcp) ret__; \
481 unsigned long flags; \ 481 unsigned long flags; \
482 local_irq_save(flags); \ 482 raw_local_irq_save(flags); \
483 ret__ = __this_cpu_read(pcp); \ 483 ret__ = __this_cpu_read(pcp); \
484 __this_cpu_write(pcp, nval); \ 484 __this_cpu_write(pcp, nval); \
485 local_irq_restore(flags); \ 485 raw_local_irq_restore(flags); \
486 ret__; \ 486 ret__; \
487}) 487})
488 488
@@ -507,11 +507,11 @@ do { \
507({ \ 507({ \
508 typeof(pcp) ret__; \ 508 typeof(pcp) ret__; \
509 unsigned long flags; \ 509 unsigned long flags; \
510 local_irq_save(flags); \ 510 raw_local_irq_save(flags); \
511 ret__ = __this_cpu_read(pcp); \ 511 ret__ = __this_cpu_read(pcp); \
512 if (ret__ == (oval)) \ 512 if (ret__ == (oval)) \
513 __this_cpu_write(pcp, nval); \ 513 __this_cpu_write(pcp, nval); \
514 local_irq_restore(flags); \ 514 raw_local_irq_restore(flags); \
515 ret__; \ 515 ret__; \
516}) 516})
517 517
@@ -544,10 +544,10 @@ do { \
544({ \ 544({ \
545 int ret__; \ 545 int ret__; \
546 unsigned long flags; \ 546 unsigned long flags; \
547 local_irq_save(flags); \ 547 raw_local_irq_save(flags); \
548 ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2, \ 548 ret__ = __this_cpu_generic_cmpxchg_double(pcp1, pcp2, \
549 oval1, oval2, nval1, nval2); \ 549 oval1, oval2, nval1, nval2); \
550 local_irq_restore(flags); \ 550 raw_local_irq_restore(flags); \
551 ret__; \ 551 ret__; \
552}) 552})
553 553
@@ -718,12 +718,13 @@ do { \
718# ifndef __this_cpu_add_return_8 718# ifndef __this_cpu_add_return_8
719# define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val) 719# define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val)
720# endif 720# endif
721# define __this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) 721# define __this_cpu_add_return(pcp, val) \
722 __pcpu_size_call_return2(__this_cpu_add_return_, pcp, val)
722#endif 723#endif
723 724
724#define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) 725#define __this_cpu_sub_return(pcp, val) __this_cpu_add_return(pcp, -(val))
725#define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) 726#define __this_cpu_inc_return(pcp) __this_cpu_add_return(pcp, 1)
726#define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) 727#define __this_cpu_dec_return(pcp) __this_cpu_add_return(pcp, -1)
727 728
728#define __this_cpu_generic_xchg(pcp, nval) \ 729#define __this_cpu_generic_xchg(pcp, nval) \
729({ typeof(pcp) ret__; \ 730({ typeof(pcp) ret__; \
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7d379a6bfd88..0657368bd78f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1777,7 +1777,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1777/* 1777/*
1778 * Per process flags 1778 * Per process flags
1779 */ 1779 */
1780#define PF_STARTING 0x00000002 /* being created */
1781#define PF_EXITING 0x00000004 /* getting shut down */ 1780#define PF_EXITING 0x00000004 /* getting shut down */
1782#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ 1781#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */
1783#define PF_VCPU 0x00000010 /* I'm a virtual CPU */ 1782#define PF_VCPU 0x00000010 /* I'm a virtual CPU */
@@ -2371,7 +2370,7 @@ static inline int thread_group_empty(struct task_struct *p)
2371 * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring 2370 * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
2372 * subscriptions and synchronises with wait4(). Also used in procfs. Also 2371 * subscriptions and synchronises with wait4(). Also used in procfs. Also
2373 * pins the final release of task.io_context. Also protects ->cpuset and 2372 * pins the final release of task.io_context. Also protects ->cpuset and
2374 * ->cgroup.subsys[]. 2373 * ->cgroup.subsys[]. And ->vfork_done.
2375 * 2374 *
2376 * Nests both inside and outside of read_lock(&tasklist_lock). 2375 * Nests both inside and outside of read_lock(&tasklist_lock).
2377 * It must not be nested with write_lock_irq(&tasklist_lock), 2376 * It must not be nested with write_lock_irq(&tasklist_lock),
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h
index 54341d811685..0a9d8f2ac519 100644
--- a/include/linux/sh_clk.h
+++ b/include/linux/sh_clk.h
@@ -18,7 +18,8 @@ struct clk_mapping {
18 struct kref ref; 18 struct kref ref;
19}; 19};
20 20
21struct clk_ops { 21
22struct sh_clk_ops {
22#ifdef CONFIG_SH_CLK_CPG_LEGACY 23#ifdef CONFIG_SH_CLK_CPG_LEGACY
23 void (*init)(struct clk *clk); 24 void (*init)(struct clk *clk);
24#endif 25#endif
@@ -37,7 +38,7 @@ struct clk {
37 unsigned short parent_num; /* choose between */ 38 unsigned short parent_num; /* choose between */
38 unsigned char src_shift; /* source clock field in the */ 39 unsigned char src_shift; /* source clock field in the */
39 unsigned char src_width; /* configuration register */ 40 unsigned char src_width; /* configuration register */
40 struct clk_ops *ops; 41 struct sh_clk_ops *ops;
41 42
42 struct list_head children; 43 struct list_head children;
43 struct list_head sibling; /* node for children */ 44 struct list_head sibling; /* node for children */
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 46a85c9e1f25..3c7ffdb40dc6 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -412,7 +412,8 @@ struct tcp_sock {
412 412
413 struct tcp_sack_block recv_sack_cache[4]; 413 struct tcp_sack_block recv_sack_cache[4];
414 414
415 struct sk_buff *highest_sack; /* highest skb with SACK received 415 struct sk_buff *highest_sack; /* skb just after the highest
416 * skb with SACKed bit set
416 * (validity guaranteed only if 417 * (validity guaranteed only if
417 * sacked_out > 0) 418 * sacked_out > 0)
418 */ 419 */
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index eb8b9f15f2e0..af155450cabb 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -289,12 +289,16 @@ enum {
289 * 289 *
290 * system_freezable_wq is equivalent to system_wq except that it's 290 * system_freezable_wq is equivalent to system_wq except that it's
291 * freezable. 291 * freezable.
292 *
293 * system_nrt_freezable_wq is equivalent to system_nrt_wq except that
294 * it's freezable.
292 */ 295 */
293extern struct workqueue_struct *system_wq; 296extern struct workqueue_struct *system_wq;
294extern struct workqueue_struct *system_long_wq; 297extern struct workqueue_struct *system_long_wq;
295extern struct workqueue_struct *system_nrt_wq; 298extern struct workqueue_struct *system_nrt_wq;
296extern struct workqueue_struct *system_unbound_wq; 299extern struct workqueue_struct *system_unbound_wq;
297extern struct workqueue_struct *system_freezable_wq; 300extern struct workqueue_struct *system_freezable_wq;
301extern struct workqueue_struct *system_nrt_freezable_wq;
298 302
299extern struct workqueue_struct * 303extern struct workqueue_struct *
300__alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, 304__alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 06b795dd5906..b94765e38e80 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -35,12 +35,12 @@ struct inet_peer {
35 35
36 u32 metrics[RTAX_MAX]; 36 u32 metrics[RTAX_MAX];
37 u32 rate_tokens; /* rate limiting for ICMP */ 37 u32 rate_tokens; /* rate limiting for ICMP */
38 int redirect_genid;
39 unsigned long rate_last; 38 unsigned long rate_last;
40 unsigned long pmtu_expires; 39 unsigned long pmtu_expires;
41 u32 pmtu_orig; 40 u32 pmtu_orig;
42 u32 pmtu_learned; 41 u32 pmtu_learned;
43 struct inetpeer_addr_base redirect_learned; 42 struct inetpeer_addr_base redirect_learned;
43 struct list_head gc_list;
44 /* 44 /*
45 * Once inet_peer is queued for deletion (refcnt == -1), following fields 45 * Once inet_peer is queued for deletion (refcnt == -1), following fields
46 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp 46 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp
@@ -96,6 +96,8 @@ static inline struct inet_peer *inet_getpeer_v6(const struct in6_addr *v6daddr,
96extern void inet_putpeer(struct inet_peer *p); 96extern void inet_putpeer(struct inet_peer *p);
97extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); 97extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);
98 98
99extern void inetpeer_invalidate_tree(int family);
100
99/* 101/*
100 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, 102 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts,
101 * tcp_ts_stamp if no refcount is taken on inet_peer 103 * tcp_ts_stamp if no refcount is taken on inet_peer
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 42c29bfbcee3..2d80c291fffb 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1364,8 +1364,9 @@ static inline void tcp_push_pending_frames(struct sock *sk)
1364 } 1364 }
1365} 1365}
1366 1366
1367/* Start sequence of the highest skb with SACKed bit, valid only if 1367/* Start sequence of the skb just after the highest skb with SACKed
1368 * sacked > 0 or when the caller has ensured validity by itself. 1368 * bit, valid only if sacked_out > 0 or when the caller has ensured
1369 * validity by itself.
1369 */ 1370 */
1370static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) 1371static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp)
1371{ 1372{
diff --git a/kernel/fork.c b/kernel/fork.c
index e2cd3e2a5ae8..26a7a6707fa7 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -668,6 +668,38 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
668 return mm; 668 return mm;
669} 669}
670 670
671static void complete_vfork_done(struct task_struct *tsk)
672{
673 struct completion *vfork;
674
675 task_lock(tsk);
676 vfork = tsk->vfork_done;
677 if (likely(vfork)) {
678 tsk->vfork_done = NULL;
679 complete(vfork);
680 }
681 task_unlock(tsk);
682}
683
684static int wait_for_vfork_done(struct task_struct *child,
685 struct completion *vfork)
686{
687 int killed;
688
689 freezer_do_not_count();
690 killed = wait_for_completion_killable(vfork);
691 freezer_count();
692
693 if (killed) {
694 task_lock(child);
695 child->vfork_done = NULL;
696 task_unlock(child);
697 }
698
699 put_task_struct(child);
700 return killed;
701}
702
671/* Please note the differences between mmput and mm_release. 703/* Please note the differences between mmput and mm_release.
672 * mmput is called whenever we stop holding onto a mm_struct, 704 * mmput is called whenever we stop holding onto a mm_struct,
673 * error success whatever. 705 * error success whatever.
@@ -683,8 +715,6 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
683 */ 715 */
684void mm_release(struct task_struct *tsk, struct mm_struct *mm) 716void mm_release(struct task_struct *tsk, struct mm_struct *mm)
685{ 717{
686 struct completion *vfork_done = tsk->vfork_done;
687
688 /* Get rid of any futexes when releasing the mm */ 718 /* Get rid of any futexes when releasing the mm */
689#ifdef CONFIG_FUTEX 719#ifdef CONFIG_FUTEX
690 if (unlikely(tsk->robust_list)) { 720 if (unlikely(tsk->robust_list)) {
@@ -704,17 +734,15 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
704 /* Get rid of any cached register state */ 734 /* Get rid of any cached register state */
705 deactivate_mm(tsk, mm); 735 deactivate_mm(tsk, mm);
706 736
707 /* notify parent sleeping on vfork() */ 737 if (tsk->vfork_done)
708 if (vfork_done) { 738 complete_vfork_done(tsk);
709 tsk->vfork_done = NULL;
710 complete(vfork_done);
711 }
712 739
713 /* 740 /*
714 * If we're exiting normally, clear a user-space tid field if 741 * If we're exiting normally, clear a user-space tid field if
715 * requested. We leave this alone when dying by signal, to leave 742 * requested. We leave this alone when dying by signal, to leave
716 * the value intact in a core dump, and to save the unnecessary 743 * the value intact in a core dump, and to save the unnecessary
717 * trouble otherwise. Userland only wants this done for a sys_exit. 744 * trouble, say, a killed vfork parent shouldn't touch this mm.
745 * Userland only wants this done for a sys_exit.
718 */ 746 */
719 if (tsk->clear_child_tid) { 747 if (tsk->clear_child_tid) {
720 if (!(tsk->flags & PF_SIGNALED) && 748 if (!(tsk->flags & PF_SIGNALED) &&
@@ -1018,7 +1046,6 @@ static void copy_flags(unsigned long clone_flags, struct task_struct *p)
1018 1046
1019 new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER); 1047 new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
1020 new_flags |= PF_FORKNOEXEC; 1048 new_flags |= PF_FORKNOEXEC;
1021 new_flags |= PF_STARTING;
1022 p->flags = new_flags; 1049 p->flags = new_flags;
1023} 1050}
1024 1051
@@ -1548,16 +1575,9 @@ long do_fork(unsigned long clone_flags,
1548 if (clone_flags & CLONE_VFORK) { 1575 if (clone_flags & CLONE_VFORK) {
1549 p->vfork_done = &vfork; 1576 p->vfork_done = &vfork;
1550 init_completion(&vfork); 1577 init_completion(&vfork);
1578 get_task_struct(p);
1551 } 1579 }
1552 1580
1553 /*
1554 * We set PF_STARTING at creation in case tracing wants to
1555 * use this to distinguish a fully live task from one that
1556 * hasn't finished SIGSTOP raising yet. Now we clear it
1557 * and set the child going.
1558 */
1559 p->flags &= ~PF_STARTING;
1560
1561 wake_up_new_task(p); 1581 wake_up_new_task(p);
1562 1582
1563 /* forking complete and child started to run, tell ptracer */ 1583 /* forking complete and child started to run, tell ptracer */
@@ -1565,10 +1585,8 @@ long do_fork(unsigned long clone_flags,
1565 ptrace_event(trace, nr); 1585 ptrace_event(trace, nr);
1566 1586
1567 if (clone_flags & CLONE_VFORK) { 1587 if (clone_flags & CLONE_VFORK) {
1568 freezer_do_not_count(); 1588 if (!wait_for_vfork_done(p, &vfork))
1569 wait_for_completion(&vfork); 1589 ptrace_event(PTRACE_EVENT_VFORK_DONE, nr);
1570 freezer_count();
1571 ptrace_event(PTRACE_EVENT_VFORK_DONE, nr);
1572 } 1590 }
1573 } else { 1591 } else {
1574 nr = PTR_ERR(p); 1592 nr = PTR_ERR(p);
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 2e48ec0c2e91..c21449f85a2a 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -119,15 +119,20 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
119 * For preemptible RCU it is sufficient to call rcu_read_unlock in order 119 * For preemptible RCU it is sufficient to call rcu_read_unlock in order
120 * to exit the grace period. For classic RCU, a reschedule is required. 120 * to exit the grace period. For classic RCU, a reschedule is required.
121 */ 121 */
122static void rcu_lock_break(struct task_struct *g, struct task_struct *t) 122static bool rcu_lock_break(struct task_struct *g, struct task_struct *t)
123{ 123{
124 bool can_cont;
125
124 get_task_struct(g); 126 get_task_struct(g);
125 get_task_struct(t); 127 get_task_struct(t);
126 rcu_read_unlock(); 128 rcu_read_unlock();
127 cond_resched(); 129 cond_resched();
128 rcu_read_lock(); 130 rcu_read_lock();
131 can_cont = pid_alive(g) && pid_alive(t);
129 put_task_struct(t); 132 put_task_struct(t);
130 put_task_struct(g); 133 put_task_struct(g);
134
135 return can_cont;
131} 136}
132 137
133/* 138/*
@@ -154,9 +159,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
154 goto unlock; 159 goto unlock;
155 if (!--batch_count) { 160 if (!--batch_count) {
156 batch_count = HUNG_TASK_BATCHING; 161 batch_count = HUNG_TASK_BATCHING;
157 rcu_lock_break(g, t); 162 if (!rcu_lock_break(g, t))
158 /* Exit if t or g was unhashed during refresh. */
159 if (t->state == TASK_DEAD || g->state == TASK_DEAD)
160 goto unlock; 163 goto unlock;
161 } 164 }
162 /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ 165 /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 32313c084442..0f0d4704ddd8 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -985,6 +985,11 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
985 985
986 /* add new interrupt at end of irq queue */ 986 /* add new interrupt at end of irq queue */
987 do { 987 do {
988 /*
989 * Or all existing action->thread_mask bits,
990 * so we can find the next zero bit for this
991 * new action.
992 */
988 thread_mask |= old->thread_mask; 993 thread_mask |= old->thread_mask;
989 old_ptr = &old->next; 994 old_ptr = &old->next;
990 old = *old_ptr; 995 old = *old_ptr;
@@ -993,14 +998,41 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
993 } 998 }
994 999
995 /* 1000 /*
996 * Setup the thread mask for this irqaction. Unlikely to have 1001 * Setup the thread mask for this irqaction for ONESHOT. For
997 * 32 resp 64 irqs sharing one line, but who knows. 1002 * !ONESHOT irqs the thread mask is 0 so we can avoid a
1003 * conditional in irq_wake_thread().
998 */ 1004 */
999 if (new->flags & IRQF_ONESHOT && thread_mask == ~0UL) { 1005 if (new->flags & IRQF_ONESHOT) {
1000 ret = -EBUSY; 1006 /*
1001 goto out_mask; 1007 * Unlikely to have 32 resp 64 irqs sharing one line,
1008 * but who knows.
1009 */
1010 if (thread_mask == ~0UL) {
1011 ret = -EBUSY;
1012 goto out_mask;
1013 }
1014 /*
1015 * The thread_mask for the action is or'ed to
1016 * desc->thread_active to indicate that the
1017 * IRQF_ONESHOT thread handler has been woken, but not
1018 * yet finished. The bit is cleared when a thread
1019 * completes. When all threads of a shared interrupt
1020 * line have completed desc->threads_active becomes
1021 * zero and the interrupt line is unmasked. See
1022 * handle.c:irq_wake_thread() for further information.
1023 *
1024 * If no thread is woken by primary (hard irq context)
1025 * interrupt handlers, then desc->threads_active is
1026 * also checked for zero to unmask the irq line in the
1027 * affected hard irq flow handlers
1028 * (handle_[fasteoi|level]_irq).
1029 *
1030 * The new action gets the first zero bit of
1031 * thread_mask assigned. See the loop above which or's
1032 * all existing action->thread_mask bits.
1033 */
1034 new->thread_mask = 1 << ffz(thread_mask);
1002 } 1035 }
1003 new->thread_mask = 1 << ffz(thread_mask);
1004 1036
1005 if (!shared) { 1037 if (!shared) {
1006 init_waitqueue_head(&desc->wait_for_threads); 1038 init_waitqueue_head(&desc->wait_for_threads);
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9788c0ec6f43..c62b8546cc90 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1334,8 +1334,10 @@ int __kprobes register_kprobe(struct kprobe *p)
1334 if (!kernel_text_address((unsigned long) p->addr) || 1334 if (!kernel_text_address((unsigned long) p->addr) ||
1335 in_kprobes_functions((unsigned long) p->addr) || 1335 in_kprobes_functions((unsigned long) p->addr) ||
1336 ftrace_text_reserved(p->addr, p->addr) || 1336 ftrace_text_reserved(p->addr, p->addr) ||
1337 jump_label_text_reserved(p->addr, p->addr)) 1337 jump_label_text_reserved(p->addr, p->addr)) {
1338 goto fail_with_jump_label; 1338 ret = -EINVAL;
1339 goto cannot_probe;
1340 }
1339 1341
1340 /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */ 1342 /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */
1341 p->flags &= KPROBE_FLAG_DISABLED; 1343 p->flags &= KPROBE_FLAG_DISABLED;
@@ -1352,7 +1354,7 @@ int __kprobes register_kprobe(struct kprobe *p)
1352 * its code to prohibit unexpected unloading. 1354 * its code to prohibit unexpected unloading.
1353 */ 1355 */
1354 if (unlikely(!try_module_get(probed_mod))) 1356 if (unlikely(!try_module_get(probed_mod)))
1355 goto fail_with_jump_label; 1357 goto cannot_probe;
1356 1358
1357 /* 1359 /*
1358 * If the module freed .init.text, we couldn't insert 1360 * If the module freed .init.text, we couldn't insert
@@ -1361,7 +1363,7 @@ int __kprobes register_kprobe(struct kprobe *p)
1361 if (within_module_init((unsigned long)p->addr, probed_mod) && 1363 if (within_module_init((unsigned long)p->addr, probed_mod) &&
1362 probed_mod->state != MODULE_STATE_COMING) { 1364 probed_mod->state != MODULE_STATE_COMING) {
1363 module_put(probed_mod); 1365 module_put(probed_mod);
1364 goto fail_with_jump_label; 1366 goto cannot_probe;
1365 } 1367 }
1366 /* ret will be updated by following code */ 1368 /* ret will be updated by following code */
1367 } 1369 }
@@ -1409,7 +1411,7 @@ out:
1409 1411
1410 return ret; 1412 return ret;
1411 1413
1412fail_with_jump_label: 1414cannot_probe:
1413 preempt_enable(); 1415 preempt_enable();
1414 jump_label_unlock(); 1416 jump_label_unlock();
1415 return ret; 1417 return ret;
diff --git a/kernel/printk.c b/kernel/printk.c
index 13c0a1143f49..32690a0b7a18 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -702,6 +702,9 @@ static bool printk_time = 0;
702#endif 702#endif
703module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); 703module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
704 704
705static bool always_kmsg_dump;
706module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR);
707
705/* Check if we have any console registered that can be called early in boot. */ 708/* Check if we have any console registered that can be called early in boot. */
706static int have_callable_console(void) 709static int have_callable_console(void)
707{ 710{
@@ -1732,6 +1735,9 @@ void kmsg_dump(enum kmsg_dump_reason reason)
1732 unsigned long l1, l2; 1735 unsigned long l1, l2;
1733 unsigned long flags; 1736 unsigned long flags;
1734 1737
1738 if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump)
1739 return;
1740
1735 /* Theoretically, the log could move on after we do this, but 1741 /* Theoretically, the log could move on after we do this, but
1736 there's not a lot we can do about that. The new messages 1742 there's not a lot we can do about that. The new messages
1737 will overwrite the start of what we dump. */ 1743 will overwrite the start of what we dump. */
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 33a0676ea744..b342f57879e6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6728,7 +6728,7 @@ int __init sched_create_sysfs_power_savings_entries(struct device *dev)
6728static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action, 6728static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
6729 void *hcpu) 6729 void *hcpu)
6730{ 6730{
6731 switch (action) { 6731 switch (action & ~CPU_TASKS_FROZEN) {
6732 case CPU_ONLINE: 6732 case CPU_ONLINE:
6733 case CPU_DOWN_FAILED: 6733 case CPU_DOWN_FAILED:
6734 cpuset_update_active_cpus(); 6734 cpuset_update_active_cpus();
@@ -6741,7 +6741,7 @@ static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
6741static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action, 6741static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action,
6742 void *hcpu) 6742 void *hcpu)
6743{ 6743{
6744 switch (action) { 6744 switch (action & ~CPU_TASKS_FROZEN) {
6745 case CPU_DOWN_PREPARE: 6745 case CPU_DOWN_PREPARE:
6746 cpuset_update_active_cpus(); 6746 cpuset_update_active_cpus();
6747 return NOTIFY_OK; 6747 return NOTIFY_OK;
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index bec7b5b53e03..f2c5638bb5ab 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -253,11 +253,13 @@ struct workqueue_struct *system_long_wq __read_mostly;
253struct workqueue_struct *system_nrt_wq __read_mostly; 253struct workqueue_struct *system_nrt_wq __read_mostly;
254struct workqueue_struct *system_unbound_wq __read_mostly; 254struct workqueue_struct *system_unbound_wq __read_mostly;
255struct workqueue_struct *system_freezable_wq __read_mostly; 255struct workqueue_struct *system_freezable_wq __read_mostly;
256struct workqueue_struct *system_nrt_freezable_wq __read_mostly;
256EXPORT_SYMBOL_GPL(system_wq); 257EXPORT_SYMBOL_GPL(system_wq);
257EXPORT_SYMBOL_GPL(system_long_wq); 258EXPORT_SYMBOL_GPL(system_long_wq);
258EXPORT_SYMBOL_GPL(system_nrt_wq); 259EXPORT_SYMBOL_GPL(system_nrt_wq);
259EXPORT_SYMBOL_GPL(system_unbound_wq); 260EXPORT_SYMBOL_GPL(system_unbound_wq);
260EXPORT_SYMBOL_GPL(system_freezable_wq); 261EXPORT_SYMBOL_GPL(system_freezable_wq);
262EXPORT_SYMBOL_GPL(system_nrt_freezable_wq);
261 263
262#define CREATE_TRACE_POINTS 264#define CREATE_TRACE_POINTS
263#include <trace/events/workqueue.h> 265#include <trace/events/workqueue.h>
@@ -3833,8 +3835,11 @@ static int __init init_workqueues(void)
3833 WQ_UNBOUND_MAX_ACTIVE); 3835 WQ_UNBOUND_MAX_ACTIVE);
3834 system_freezable_wq = alloc_workqueue("events_freezable", 3836 system_freezable_wq = alloc_workqueue("events_freezable",
3835 WQ_FREEZABLE, 0); 3837 WQ_FREEZABLE, 0);
3838 system_nrt_freezable_wq = alloc_workqueue("events_nrt_freezable",
3839 WQ_NON_REENTRANT | WQ_FREEZABLE, 0);
3836 BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq || 3840 BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq ||
3837 !system_unbound_wq || !system_freezable_wq); 3841 !system_unbound_wq || !system_freezable_wq ||
3842 !system_nrt_freezable_wq);
3838 return 0; 3843 return 0;
3839} 3844}
3840early_initcall(init_workqueues); 3845early_initcall(init_workqueues);
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 77cb245f8e7b..0ab9ae8057f0 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -818,17 +818,9 @@ static int __init fixup_activate(void *addr, enum debug_obj_state state)
818 if (obj->static_init == 1) { 818 if (obj->static_init == 1) {
819 debug_object_init(obj, &descr_type_test); 819 debug_object_init(obj, &descr_type_test);
820 debug_object_activate(obj, &descr_type_test); 820 debug_object_activate(obj, &descr_type_test);
821 /* 821 return 0;
822 * Real code should return 0 here ! This is
823 * not a fixup of some bad behaviour. We
824 * merily call the debug_init function to keep
825 * track of the object.
826 */
827 return 1;
828 } else {
829 /* Real code needs to emit a warning here */
830 } 822 }
831 return 0; 823 return 1;
832 824
833 case ODEBUG_STATE_ACTIVE: 825 case ODEBUG_STATE_ACTIVE:
834 debug_object_deactivate(obj, &descr_type_test); 826 debug_object_deactivate(obj, &descr_type_test);
@@ -967,7 +959,7 @@ static void __init debug_objects_selftest(void)
967 959
968 obj.static_init = 1; 960 obj.static_init = 1;
969 debug_object_activate(&obj, &descr_type_test); 961 debug_object_activate(&obj, &descr_type_test);
970 if (check_results(&obj, ODEBUG_STATE_ACTIVE, ++fixups, warnings)) 962 if (check_results(&obj, ODEBUG_STATE_ACTIVE, fixups, warnings))
971 goto out; 963 goto out;
972 debug_object_init(&obj, &descr_type_test); 964 debug_object_init(&obj, &descr_type_test);
973 if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings)) 965 if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings))
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index 3d1bdcdd7db4..6ab4587d052b 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -7,6 +7,7 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/ctype.h> 8#include <linux/ctype.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/jiffies.h>
10#include <linux/dynamic_queue_limits.h> 11#include <linux/dynamic_queue_limits.h>
11 12
12#define POSDIFF(A, B) ((A) > (B) ? (A) - (B) : 0) 13#define POSDIFF(A, B) ((A) > (B) ? (A) - (B) : 0)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 8e75003d62f6..38e612e66da5 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -891,9 +891,15 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
891 case 'U': 891 case 'U':
892 return uuid_string(buf, end, ptr, spec, fmt); 892 return uuid_string(buf, end, ptr, spec, fmt);
893 case 'V': 893 case 'V':
894 return buf + vsnprintf(buf, end > buf ? end - buf : 0, 894 {
895 ((struct va_format *)ptr)->fmt, 895 va_list va;
896 *(((struct va_format *)ptr)->va)); 896
897 va_copy(va, *((struct va_format *)ptr)->va);
898 buf += vsnprintf(buf, end > buf ? end - buf : 0,
899 ((struct va_format *)ptr)->fmt, va);
900 va_end(va);
901 return buf;
902 }
897 case 'K': 903 case 'K':
898 /* 904 /*
899 * %pK cannot be used in IRQ context because its test 905 * %pK cannot be used in IRQ context because its test
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 91d3efb25d15..8f7fc394f636 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -671,6 +671,7 @@ static int __do_huge_pmd_anonymous_page(struct mm_struct *mm,
671 set_pmd_at(mm, haddr, pmd, entry); 671 set_pmd_at(mm, haddr, pmd, entry);
672 prepare_pmd_huge_pte(pgtable, mm); 672 prepare_pmd_huge_pte(pgtable, mm);
673 add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR); 673 add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR);
674 mm->nr_ptes++;
674 spin_unlock(&mm->page_table_lock); 675 spin_unlock(&mm->page_table_lock);
675 } 676 }
676 677
@@ -789,6 +790,7 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
789 pmd = pmd_mkold(pmd_wrprotect(pmd)); 790 pmd = pmd_mkold(pmd_wrprotect(pmd));
790 set_pmd_at(dst_mm, addr, dst_pmd, pmd); 791 set_pmd_at(dst_mm, addr, dst_pmd, pmd);
791 prepare_pmd_huge_pte(pgtable, dst_mm); 792 prepare_pmd_huge_pte(pgtable, dst_mm);
793 dst_mm->nr_ptes++;
792 794
793 ret = 0; 795 ret = 0;
794out_unlock: 796out_unlock:
@@ -887,7 +889,6 @@ static int do_huge_pmd_wp_page_fallback(struct mm_struct *mm,
887 } 889 }
888 kfree(pages); 890 kfree(pages);
889 891
890 mm->nr_ptes++;
891 smp_wmb(); /* make pte visible before pmd */ 892 smp_wmb(); /* make pte visible before pmd */
892 pmd_populate(mm, pmd, pgtable); 893 pmd_populate(mm, pmd, pgtable);
893 page_remove_rmap(page); 894 page_remove_rmap(page);
@@ -1047,6 +1048,7 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
1047 VM_BUG_ON(page_mapcount(page) < 0); 1048 VM_BUG_ON(page_mapcount(page) < 0);
1048 add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR); 1049 add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR);
1049 VM_BUG_ON(!PageHead(page)); 1050 VM_BUG_ON(!PageHead(page));
1051 tlb->mm->nr_ptes--;
1050 spin_unlock(&tlb->mm->page_table_lock); 1052 spin_unlock(&tlb->mm->page_table_lock);
1051 tlb_remove_page(tlb, page); 1053 tlb_remove_page(tlb, page);
1052 pte_free(tlb->mm, pgtable); 1054 pte_free(tlb->mm, pgtable);
@@ -1375,7 +1377,6 @@ static int __split_huge_page_map(struct page *page,
1375 pte_unmap(pte); 1377 pte_unmap(pte);
1376 } 1378 }
1377 1379
1378 mm->nr_ptes++;
1379 smp_wmb(); /* make pte visible before pmd */ 1380 smp_wmb(); /* make pte visible before pmd */
1380 /* 1381 /*
1381 * Up to this point the pmd is present and huge and 1382 * Up to this point the pmd is present and huge and
@@ -1988,7 +1989,6 @@ static void collapse_huge_page(struct mm_struct *mm,
1988 set_pmd_at(mm, address, pmd, _pmd); 1989 set_pmd_at(mm, address, pmd, _pmd);
1989 update_mmu_cache(vma, address, _pmd); 1990 update_mmu_cache(vma, address, _pmd);
1990 prepare_pmd_huge_pte(pgtable, mm); 1991 prepare_pmd_huge_pte(pgtable, mm);
1991 mm->nr_ptes--;
1992 spin_unlock(&mm->page_table_lock); 1992 spin_unlock(&mm->page_table_lock);
1993 1993
1994#ifndef CONFIG_NUMA 1994#ifndef CONFIG_NUMA
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 5f34bd8dda34..a876871f6be5 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2277,8 +2277,8 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
2277 set_page_dirty(page); 2277 set_page_dirty(page);
2278 list_add(&page->lru, &page_list); 2278 list_add(&page->lru, &page_list);
2279 } 2279 }
2280 spin_unlock(&mm->page_table_lock);
2281 flush_tlb_range(vma, start, end); 2280 flush_tlb_range(vma, start, end);
2281 spin_unlock(&mm->page_table_lock);
2282 mmu_notifier_invalidate_range_end(mm, start, end); 2282 mmu_notifier_invalidate_range_end(mm, start, end);
2283 list_for_each_entry_safe(page, tmp, &page_list, lru) { 2283 list_for_each_entry_safe(page, tmp, &page_list, lru) {
2284 page_remove_rmap(page); 2284 page_remove_rmap(page);
diff --git a/mm/ksm.c b/mm/ksm.c
index 1925ffbfb27f..310544a379ae 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -28,7 +28,6 @@
28#include <linux/kthread.h> 28#include <linux/kthread.h>
29#include <linux/wait.h> 29#include <linux/wait.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/memcontrol.h>
32#include <linux/rbtree.h> 31#include <linux/rbtree.h>
33#include <linux/memory.h> 32#include <linux/memory.h>
34#include <linux/mmu_notifier.h> 33#include <linux/mmu_notifier.h>
@@ -1572,16 +1571,6 @@ struct page *ksm_does_need_to_copy(struct page *page,
1572 1571
1573 new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address); 1572 new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address);
1574 if (new_page) { 1573 if (new_page) {
1575 /*
1576 * The memcg-specific accounting when moving
1577 * pages around the LRU lists relies on the
1578 * page's owner (memcg) to be valid. Usually,
1579 * pages are assigned to a new owner before
1580 * being put on the LRU list, but since this
1581 * is not the case here, the stale owner from
1582 * a previous allocation cycle must be reset.
1583 */
1584 mem_cgroup_reset_owner(new_page);
1585 copy_user_highpage(new_page, page, address, vma); 1574 copy_user_highpage(new_page, page, address, vma);
1586 1575
1587 SetPageDirty(new_page); 1576 SetPageDirty(new_page);
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 228d6461c12a..d0e57a3cda18 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1042,6 +1042,19 @@ struct lruvec *mem_cgroup_lru_add_list(struct zone *zone, struct page *page,
1042 1042
1043 pc = lookup_page_cgroup(page); 1043 pc = lookup_page_cgroup(page);
1044 memcg = pc->mem_cgroup; 1044 memcg = pc->mem_cgroup;
1045
1046 /*
1047 * Surreptitiously switch any uncharged page to root:
1048 * an uncharged page off lru does nothing to secure
1049 * its former mem_cgroup from sudden removal.
1050 *
1051 * Our caller holds lru_lock, and PageCgroupUsed is updated
1052 * under page_cgroup lock: between them, they make all uses
1053 * of pc->mem_cgroup safe.
1054 */
1055 if (!PageCgroupUsed(pc) && memcg != root_mem_cgroup)
1056 pc->mem_cgroup = memcg = root_mem_cgroup;
1057
1045 mz = page_cgroup_zoneinfo(memcg, page); 1058 mz = page_cgroup_zoneinfo(memcg, page);
1046 /* compound_order() is stabilized through lru_lock */ 1059 /* compound_order() is stabilized through lru_lock */
1047 MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page); 1060 MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page);
@@ -2408,8 +2421,12 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
2408 struct page *page, 2421 struct page *page,
2409 unsigned int nr_pages, 2422 unsigned int nr_pages,
2410 struct page_cgroup *pc, 2423 struct page_cgroup *pc,
2411 enum charge_type ctype) 2424 enum charge_type ctype,
2425 bool lrucare)
2412{ 2426{
2427 struct zone *uninitialized_var(zone);
2428 bool was_on_lru = false;
2429
2413 lock_page_cgroup(pc); 2430 lock_page_cgroup(pc);
2414 if (unlikely(PageCgroupUsed(pc))) { 2431 if (unlikely(PageCgroupUsed(pc))) {
2415 unlock_page_cgroup(pc); 2432 unlock_page_cgroup(pc);
@@ -2420,6 +2437,21 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
2420 * we don't need page_cgroup_lock about tail pages, becase they are not 2437 * we don't need page_cgroup_lock about tail pages, becase they are not
2421 * accessed by any other context at this point. 2438 * accessed by any other context at this point.
2422 */ 2439 */
2440
2441 /*
2442 * In some cases, SwapCache and FUSE(splice_buf->radixtree), the page
2443 * may already be on some other mem_cgroup's LRU. Take care of it.
2444 */
2445 if (lrucare) {
2446 zone = page_zone(page);
2447 spin_lock_irq(&zone->lru_lock);
2448 if (PageLRU(page)) {
2449 ClearPageLRU(page);
2450 del_page_from_lru_list(zone, page, page_lru(page));
2451 was_on_lru = true;
2452 }
2453 }
2454
2423 pc->mem_cgroup = memcg; 2455 pc->mem_cgroup = memcg;
2424 /* 2456 /*
2425 * We access a page_cgroup asynchronously without lock_page_cgroup(). 2457 * We access a page_cgroup asynchronously without lock_page_cgroup().
@@ -2443,9 +2475,18 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
2443 break; 2475 break;
2444 } 2476 }
2445 2477
2478 if (lrucare) {
2479 if (was_on_lru) {
2480 VM_BUG_ON(PageLRU(page));
2481 SetPageLRU(page);
2482 add_page_to_lru_list(zone, page, page_lru(page));
2483 }
2484 spin_unlock_irq(&zone->lru_lock);
2485 }
2486
2446 mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), nr_pages); 2487 mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), nr_pages);
2447 unlock_page_cgroup(pc); 2488 unlock_page_cgroup(pc);
2448 WARN_ON_ONCE(PageLRU(page)); 2489
2449 /* 2490 /*
2450 * "charge_statistics" updated event counter. Then, check it. 2491 * "charge_statistics" updated event counter. Then, check it.
2451 * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree. 2492 * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree.
@@ -2643,7 +2684,7 @@ static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
2643 ret = __mem_cgroup_try_charge(mm, gfp_mask, nr_pages, &memcg, oom); 2684 ret = __mem_cgroup_try_charge(mm, gfp_mask, nr_pages, &memcg, oom);
2644 if (ret == -ENOMEM) 2685 if (ret == -ENOMEM)
2645 return ret; 2686 return ret;
2646 __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype); 2687 __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype, false);
2647 return 0; 2688 return 0;
2648} 2689}
2649 2690
@@ -2663,35 +2704,6 @@ static void
2663__mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr, 2704__mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr,
2664 enum charge_type ctype); 2705 enum charge_type ctype);
2665 2706
2666static void
2667__mem_cgroup_commit_charge_lrucare(struct page *page, struct mem_cgroup *memcg,
2668 enum charge_type ctype)
2669{
2670 struct page_cgroup *pc = lookup_page_cgroup(page);
2671 struct zone *zone = page_zone(page);
2672 unsigned long flags;
2673 bool removed = false;
2674
2675 /*
2676 * In some case, SwapCache, FUSE(splice_buf->radixtree), the page
2677 * is already on LRU. It means the page may on some other page_cgroup's
2678 * LRU. Take care of it.
2679 */
2680 spin_lock_irqsave(&zone->lru_lock, flags);
2681 if (PageLRU(page)) {
2682 del_page_from_lru_list(zone, page, page_lru(page));
2683 ClearPageLRU(page);
2684 removed = true;
2685 }
2686 __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype);
2687 if (removed) {
2688 add_page_to_lru_list(zone, page, page_lru(page));
2689 SetPageLRU(page);
2690 }
2691 spin_unlock_irqrestore(&zone->lru_lock, flags);
2692 return;
2693}
2694
2695int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, 2707int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
2696 gfp_t gfp_mask) 2708 gfp_t gfp_mask)
2697{ 2709{
@@ -2769,13 +2781,16 @@ static void
2769__mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *memcg, 2781__mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *memcg,
2770 enum charge_type ctype) 2782 enum charge_type ctype)
2771{ 2783{
2784 struct page_cgroup *pc;
2785
2772 if (mem_cgroup_disabled()) 2786 if (mem_cgroup_disabled())
2773 return; 2787 return;
2774 if (!memcg) 2788 if (!memcg)
2775 return; 2789 return;
2776 cgroup_exclude_rmdir(&memcg->css); 2790 cgroup_exclude_rmdir(&memcg->css);
2777 2791
2778 __mem_cgroup_commit_charge_lrucare(page, memcg, ctype); 2792 pc = lookup_page_cgroup(page);
2793 __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype, true);
2779 /* 2794 /*
2780 * Now swap is on-memory. This means this page may be 2795 * Now swap is on-memory. This means this page may be
2781 * counted both as mem and swap....double count. 2796 * counted both as mem and swap....double count.
@@ -3027,23 +3042,6 @@ void mem_cgroup_uncharge_end(void)
3027 batch->memcg = NULL; 3042 batch->memcg = NULL;
3028} 3043}
3029 3044
3030/*
3031 * A function for resetting pc->mem_cgroup for newly allocated pages.
3032 * This function should be called if the newpage will be added to LRU
3033 * before start accounting.
3034 */
3035void mem_cgroup_reset_owner(struct page *newpage)
3036{
3037 struct page_cgroup *pc;
3038
3039 if (mem_cgroup_disabled())
3040 return;
3041
3042 pc = lookup_page_cgroup(newpage);
3043 VM_BUG_ON(PageCgroupUsed(pc));
3044 pc->mem_cgroup = root_mem_cgroup;
3045}
3046
3047#ifdef CONFIG_SWAP 3045#ifdef CONFIG_SWAP
3048/* 3046/*
3049 * called after __delete_from_swap_cache() and drop "page" account. 3047 * called after __delete_from_swap_cache() and drop "page" account.
@@ -3248,7 +3246,7 @@ int mem_cgroup_prepare_migration(struct page *page,
3248 ctype = MEM_CGROUP_CHARGE_TYPE_CACHE; 3246 ctype = MEM_CGROUP_CHARGE_TYPE_CACHE;
3249 else 3247 else
3250 ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM; 3248 ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM;
3251 __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype); 3249 __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype, false);
3252 return ret; 3250 return ret;
3253} 3251}
3254 3252
@@ -3332,7 +3330,7 @@ void mem_cgroup_replace_page_cache(struct page *oldpage,
3332 * the newpage may be on LRU(or pagevec for LRU) already. We lock 3330 * the newpage may be on LRU(or pagevec for LRU) already. We lock
3333 * LRU while we overwrite pc->mem_cgroup. 3331 * LRU while we overwrite pc->mem_cgroup.
3334 */ 3332 */
3335 __mem_cgroup_commit_charge_lrucare(newpage, memcg, type); 3333 __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true);
3336} 3334}
3337 3335
3338#ifdef CONFIG_DEBUG_VM 3336#ifdef CONFIG_DEBUG_VM
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 06b145fb64ab..47296fee23db 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -640,10 +640,11 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
640 unsigned long vmstart; 640 unsigned long vmstart;
641 unsigned long vmend; 641 unsigned long vmend;
642 642
643 vma = find_vma_prev(mm, start, &prev); 643 vma = find_vma(mm, start);
644 if (!vma || vma->vm_start > start) 644 if (!vma || vma->vm_start > start)
645 return -EFAULT; 645 return -EFAULT;
646 646
647 prev = vma->vm_prev;
647 if (start > vma->vm_start) 648 if (start > vma->vm_start)
648 prev = vma; 649 prev = vma;
649 650
diff --git a/mm/migrate.c b/mm/migrate.c
index df141f60289e..1503b6b54ecb 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -839,8 +839,6 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
839 if (!newpage) 839 if (!newpage)
840 return -ENOMEM; 840 return -ENOMEM;
841 841
842 mem_cgroup_reset_owner(newpage);
843
844 if (page_count(page) == 1) { 842 if (page_count(page) == 1) {
845 /* page was freed from under us. So we are done. */ 843 /* page was freed from under us. So we are done. */
846 goto out; 844 goto out;
diff --git a/mm/mlock.c b/mm/mlock.c
index 4f4f53bdc65d..ef726e8aa8e9 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -385,10 +385,11 @@ static int do_mlock(unsigned long start, size_t len, int on)
385 return -EINVAL; 385 return -EINVAL;
386 if (end == start) 386 if (end == start)
387 return 0; 387 return 0;
388 vma = find_vma_prev(current->mm, start, &prev); 388 vma = find_vma(current->mm, start);
389 if (!vma || vma->vm_start > start) 389 if (!vma || vma->vm_start > start)
390 return -ENOMEM; 390 return -ENOMEM;
391 391
392 prev = vma->vm_prev;
392 if (start > vma->vm_start) 393 if (start > vma->vm_start)
393 prev = vma; 394 prev = vma;
394 395
diff --git a/mm/mmap.c b/mm/mmap.c
index 3f758c7f4c81..da15a79b1441 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1266,8 +1266,9 @@ munmap_back:
1266 vma->vm_pgoff = pgoff; 1266 vma->vm_pgoff = pgoff;
1267 INIT_LIST_HEAD(&vma->anon_vma_chain); 1267 INIT_LIST_HEAD(&vma->anon_vma_chain);
1268 1268
1269 error = -EINVAL; /* when rejecting VM_GROWSDOWN|VM_GROWSUP */
1270
1269 if (file) { 1271 if (file) {
1270 error = -EINVAL;
1271 if (vm_flags & (VM_GROWSDOWN|VM_GROWSUP)) 1272 if (vm_flags & (VM_GROWSDOWN|VM_GROWSUP))
1272 goto free_vma; 1273 goto free_vma;
1273 if (vm_flags & VM_DENYWRITE) { 1274 if (vm_flags & VM_DENYWRITE) {
@@ -1293,6 +1294,8 @@ munmap_back:
1293 pgoff = vma->vm_pgoff; 1294 pgoff = vma->vm_pgoff;
1294 vm_flags = vma->vm_flags; 1295 vm_flags = vma->vm_flags;
1295 } else if (vm_flags & VM_SHARED) { 1296 } else if (vm_flags & VM_SHARED) {
1297 if (unlikely(vm_flags & (VM_GROWSDOWN|VM_GROWSUP)))
1298 goto free_vma;
1296 error = shmem_zero_setup(vma); 1299 error = shmem_zero_setup(vma);
1297 if (error) 1300 if (error)
1298 goto free_vma; 1301 goto free_vma;
@@ -1605,7 +1608,6 @@ EXPORT_SYMBOL(find_vma);
1605 1608
1606/* 1609/*
1607 * Same as find_vma, but also return a pointer to the previous VMA in *pprev. 1610 * Same as find_vma, but also return a pointer to the previous VMA in *pprev.
1608 * Note: pprev is set to NULL when return value is NULL.
1609 */ 1611 */
1610struct vm_area_struct * 1612struct vm_area_struct *
1611find_vma_prev(struct mm_struct *mm, unsigned long addr, 1613find_vma_prev(struct mm_struct *mm, unsigned long addr,
@@ -1614,7 +1616,16 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
1614 struct vm_area_struct *vma; 1616 struct vm_area_struct *vma;
1615 1617
1616 vma = find_vma(mm, addr); 1618 vma = find_vma(mm, addr);
1617 *pprev = vma ? vma->vm_prev : NULL; 1619 if (vma) {
1620 *pprev = vma->vm_prev;
1621 } else {
1622 struct rb_node *rb_node = mm->mm_rb.rb_node;
1623 *pprev = NULL;
1624 while (rb_node) {
1625 *pprev = rb_entry(rb_node, struct vm_area_struct, vm_rb);
1626 rb_node = rb_node->rb_right;
1627 }
1628 }
1618 return vma; 1629 return vma;
1619} 1630}
1620 1631
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 5a688a2756be..f437d054c3bf 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -262,10 +262,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
262 262
263 down_write(&current->mm->mmap_sem); 263 down_write(&current->mm->mmap_sem);
264 264
265 vma = find_vma_prev(current->mm, start, &prev); 265 vma = find_vma(current->mm, start);
266 error = -ENOMEM; 266 error = -ENOMEM;
267 if (!vma) 267 if (!vma)
268 goto out; 268 goto out;
269 prev = vma->vm_prev;
269 if (unlikely(grows & PROT_GROWSDOWN)) { 270 if (unlikely(grows & PROT_GROWSDOWN)) {
270 if (vma->vm_start >= end) 271 if (vma->vm_start >= end)
271 goto out; 272 goto out;
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index de1616aa9b1e..1ccbd714059c 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -379,13 +379,15 @@ static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t ent,
379 pgoff_t offset = swp_offset(ent); 379 pgoff_t offset = swp_offset(ent);
380 struct swap_cgroup_ctrl *ctrl; 380 struct swap_cgroup_ctrl *ctrl;
381 struct page *mappage; 381 struct page *mappage;
382 struct swap_cgroup *sc;
382 383
383 ctrl = &swap_cgroup_ctrl[swp_type(ent)]; 384 ctrl = &swap_cgroup_ctrl[swp_type(ent)];
384 if (ctrlp) 385 if (ctrlp)
385 *ctrlp = ctrl; 386 *ctrlp = ctrl;
386 387
387 mappage = ctrl->map[offset / SC_PER_PAGE]; 388 mappage = ctrl->map[offset / SC_PER_PAGE];
388 return page_address(mappage) + offset % SC_PER_PAGE; 389 sc = page_address(mappage);
390 return sc + offset % SC_PER_PAGE;
389} 391}
390 392
391/** 393/**
diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c
index 12a48a88c0d8..405d331804c3 100644
--- a/mm/percpu-vm.c
+++ b/mm/percpu-vm.c
@@ -184,8 +184,7 @@ static void pcpu_unmap_pages(struct pcpu_chunk *chunk,
184 page_end - page_start); 184 page_end - page_start);
185 } 185 }
186 186
187 for (i = page_start; i < page_end; i++) 187 bitmap_clear(populated, page_start, page_end - page_start);
188 __clear_bit(i, populated);
189} 188}
190 189
191/** 190/**
diff --git a/mm/swap.c b/mm/swap.c
index fff1ff7fb9ad..14380e9fbe33 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -652,7 +652,7 @@ EXPORT_SYMBOL(__pagevec_release);
652void lru_add_page_tail(struct zone* zone, 652void lru_add_page_tail(struct zone* zone,
653 struct page *page, struct page *page_tail) 653 struct page *page, struct page *page_tail)
654{ 654{
655 int active; 655 int uninitialized_var(active);
656 enum lru_list lru; 656 enum lru_list lru;
657 const int file = 0; 657 const int file = 0;
658 658
@@ -672,7 +672,6 @@ void lru_add_page_tail(struct zone* zone,
672 active = 0; 672 active = 0;
673 lru = LRU_INACTIVE_ANON; 673 lru = LRU_INACTIVE_ANON;
674 } 674 }
675 update_page_reclaim_stat(zone, page_tail, file, active);
676 } else { 675 } else {
677 SetPageUnevictable(page_tail); 676 SetPageUnevictable(page_tail);
678 lru = LRU_UNEVICTABLE; 677 lru = LRU_UNEVICTABLE;
@@ -693,6 +692,9 @@ void lru_add_page_tail(struct zone* zone,
693 list_head = page_tail->lru.prev; 692 list_head = page_tail->lru.prev;
694 list_move_tail(&page_tail->lru, list_head); 693 list_move_tail(&page_tail->lru, list_head);
695 } 694 }
695
696 if (!PageUnevictable(page))
697 update_page_reclaim_stat(zone, page_tail, file, active);
696} 698}
697#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 699#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
698 700
@@ -710,8 +712,8 @@ static void __pagevec_lru_add_fn(struct page *page, void *arg)
710 SetPageLRU(page); 712 SetPageLRU(page);
711 if (active) 713 if (active)
712 SetPageActive(page); 714 SetPageActive(page);
713 update_page_reclaim_stat(zone, page, file, active);
714 add_page_to_lru_list(zone, page, lru); 715 add_page_to_lru_list(zone, page, lru);
716 update_page_reclaim_stat(zone, page, file, active);
715} 717}
716 718
717/* 719/*
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 470038a91873..ea6b32d61873 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -300,16 +300,6 @@ struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
300 new_page = alloc_page_vma(gfp_mask, vma, addr); 300 new_page = alloc_page_vma(gfp_mask, vma, addr);
301 if (!new_page) 301 if (!new_page)
302 break; /* Out of memory */ 302 break; /* Out of memory */
303 /*
304 * The memcg-specific accounting when moving
305 * pages around the LRU lists relies on the
306 * page's owner (memcg) to be valid. Usually,
307 * pages are assigned to a new owner before
308 * being put on the LRU list, but since this
309 * is not the case here, the stale owner from
310 * a previous allocation cycle must be reset.
311 */
312 mem_cgroup_reset_owner(new_page);
313 } 303 }
314 304
315 /* 305 /*
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 568d5bf17534..702a1ae9220b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -446,8 +446,11 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
446 ip6h->nexthdr = IPPROTO_HOPOPTS; 446 ip6h->nexthdr = IPPROTO_HOPOPTS;
447 ip6h->hop_limit = 1; 447 ip6h->hop_limit = 1;
448 ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1)); 448 ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1));
449 ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, 449 if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0,
450 &ip6h->saddr); 450 &ip6h->saddr)) {
451 kfree_skb(skb);
452 return NULL;
453 }
451 ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest); 454 ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest);
452 455
453 hopopt = (u8 *)(ip6h + 1); 456 hopopt = (u8 *)(ip6h + 1);
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 84122472656c..dec4f3817133 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -62,6 +62,15 @@ static int brnf_filter_pppoe_tagged __read_mostly = 0;
62#define brnf_filter_pppoe_tagged 0 62#define brnf_filter_pppoe_tagged 0
63#endif 63#endif
64 64
65#define IS_IP(skb) \
66 (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
67
68#define IS_IPV6(skb) \
69 (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
70
71#define IS_ARP(skb) \
72 (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
73
65static inline __be16 vlan_proto(const struct sk_buff *skb) 74static inline __be16 vlan_proto(const struct sk_buff *skb)
66{ 75{
67 if (vlan_tx_tag_present(skb)) 76 if (vlan_tx_tag_present(skb))
@@ -639,8 +648,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
639 return NF_DROP; 648 return NF_DROP;
640 br = p->br; 649 br = p->br;
641 650
642 if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) || 651 if (IS_IPV6(skb) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb)) {
643 IS_PPPOE_IPV6(skb)) {
644 if (!brnf_call_ip6tables && !br->nf_call_ip6tables) 652 if (!brnf_call_ip6tables && !br->nf_call_ip6tables)
645 return NF_ACCEPT; 653 return NF_ACCEPT;
646 654
@@ -651,8 +659,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
651 if (!brnf_call_iptables && !br->nf_call_iptables) 659 if (!brnf_call_iptables && !br->nf_call_iptables)
652 return NF_ACCEPT; 660 return NF_ACCEPT;
653 661
654 if (skb->protocol != htons(ETH_P_IP) && !IS_VLAN_IP(skb) && 662 if (!IS_IP(skb) && !IS_VLAN_IP(skb) && !IS_PPPOE_IP(skb))
655 !IS_PPPOE_IP(skb))
656 return NF_ACCEPT; 663 return NF_ACCEPT;
657 664
658 nf_bridge_pull_encap_header_rcsum(skb); 665 nf_bridge_pull_encap_header_rcsum(skb);
@@ -701,7 +708,7 @@ static int br_nf_forward_finish(struct sk_buff *skb)
701 struct nf_bridge_info *nf_bridge = skb->nf_bridge; 708 struct nf_bridge_info *nf_bridge = skb->nf_bridge;
702 struct net_device *in; 709 struct net_device *in;
703 710
704 if (skb->protocol != htons(ETH_P_ARP) && !IS_VLAN_ARP(skb)) { 711 if (!IS_ARP(skb) && !IS_VLAN_ARP(skb)) {
705 in = nf_bridge->physindev; 712 in = nf_bridge->physindev;
706 if (nf_bridge->mask & BRNF_PKT_TYPE) { 713 if (nf_bridge->mask & BRNF_PKT_TYPE) {
707 skb->pkt_type = PACKET_OTHERHOST; 714 skb->pkt_type = PACKET_OTHERHOST;
@@ -718,6 +725,7 @@ static int br_nf_forward_finish(struct sk_buff *skb)
718 return 0; 725 return 0;
719} 726}
720 727
728
721/* This is the 'purely bridged' case. For IP, we pass the packet to 729/* This is the 'purely bridged' case. For IP, we pass the packet to
722 * netfilter with indev and outdev set to the bridge device, 730 * netfilter with indev and outdev set to the bridge device,
723 * but we are still able to filter on the 'real' indev/outdev 731 * but we are still able to filter on the 'real' indev/outdev
@@ -744,11 +752,9 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb,
744 if (!parent) 752 if (!parent)
745 return NF_DROP; 753 return NF_DROP;
746 754
747 if (skb->protocol == htons(ETH_P_IP) || IS_VLAN_IP(skb) || 755 if (IS_IP(skb) || IS_VLAN_IP(skb) || IS_PPPOE_IP(skb))
748 IS_PPPOE_IP(skb))
749 pf = PF_INET; 756 pf = PF_INET;
750 else if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) || 757 else if (IS_IPV6(skb) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb))
751 IS_PPPOE_IPV6(skb))
752 pf = PF_INET6; 758 pf = PF_INET6;
753 else 759 else
754 return NF_ACCEPT; 760 return NF_ACCEPT;
@@ -795,7 +801,7 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff *skb,
795 if (!brnf_call_arptables && !br->nf_call_arptables) 801 if (!brnf_call_arptables && !br->nf_call_arptables)
796 return NF_ACCEPT; 802 return NF_ACCEPT;
797 803
798 if (skb->protocol != htons(ETH_P_ARP)) { 804 if (!IS_ARP(skb)) {
799 if (!IS_VLAN_ARP(skb)) 805 if (!IS_VLAN_ARP(skb))
800 return NF_ACCEPT; 806 return NF_ACCEPT;
801 nf_bridge_pull_encap_header(skb); 807 nf_bridge_pull_encap_header(skb);
@@ -853,11 +859,9 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
853 if (!realoutdev) 859 if (!realoutdev)
854 return NF_DROP; 860 return NF_DROP;
855 861
856 if (skb->protocol == htons(ETH_P_IP) || IS_VLAN_IP(skb) || 862 if (IS_IP(skb) || IS_VLAN_IP(skb) || IS_PPPOE_IP(skb))
857 IS_PPPOE_IP(skb))
858 pf = PF_INET; 863 pf = PF_INET;
859 else if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) || 864 else if (IS_IPV6(skb) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb))
860 IS_PPPOE_IPV6(skb))
861 pf = PF_INET6; 865 pf = PF_INET6;
862 else 866 else
863 return NF_ACCEPT; 867 return NF_ACCEPT;
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index dd147d78a588..8c836d96ba76 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -17,9 +17,9 @@
17#include "br_private_stp.h" 17#include "br_private_stp.h"
18 18
19/* since time values in bpdu are in jiffies and then scaled (1/256) 19/* since time values in bpdu are in jiffies and then scaled (1/256)
20 * before sending, make sure that is at least one. 20 * before sending, make sure that is at least one STP tick.
21 */ 21 */
22#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) 22#define MESSAGE_AGE_INCR ((HZ / 256) + 1)
23 23
24static const char *const br_port_state_names[] = { 24static const char *const br_port_state_names[] = {
25 [BR_STATE_DISABLED] = "disabled", 25 [BR_STATE_DISABLED] = "disabled",
@@ -31,7 +31,7 @@ static const char *const br_port_state_names[] = {
31 31
32void br_log_state(const struct net_bridge_port *p) 32void br_log_state(const struct net_bridge_port *p)
33{ 33{
34 br_info(p->br, "port %u(%s) entering %s state\n", 34 br_info(p->br, "port %u(%s) entered %s state\n",
35 (unsigned) p->port_no, p->dev->name, 35 (unsigned) p->port_no, p->dev->name,
36 br_port_state_names[p->state]); 36 br_port_state_names[p->state]);
37} 37}
@@ -186,7 +186,7 @@ static void br_record_config_information(struct net_bridge_port *p,
186 p->designated_cost = bpdu->root_path_cost; 186 p->designated_cost = bpdu->root_path_cost;
187 p->designated_bridge = bpdu->bridge_id; 187 p->designated_bridge = bpdu->bridge_id;
188 p->designated_port = bpdu->port_id; 188 p->designated_port = bpdu->port_id;
189 p->designated_age = jiffies + bpdu->message_age; 189 p->designated_age = jiffies - bpdu->message_age;
190 190
191 mod_timer(&p->message_age_timer, jiffies 191 mod_timer(&p->message_age_timer, jiffies
192 + (p->br->max_age - bpdu->message_age)); 192 + (p->br->max_age - bpdu->message_age));
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 19308e305d85..f494496373d6 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -98,14 +98,13 @@ void br_stp_disable_port(struct net_bridge_port *p)
98 struct net_bridge *br = p->br; 98 struct net_bridge *br = p->br;
99 int wasroot; 99 int wasroot;
100 100
101 br_log_state(p);
102
103 wasroot = br_is_root_bridge(br); 101 wasroot = br_is_root_bridge(br);
104 br_become_designated_port(p); 102 br_become_designated_port(p);
105 p->state = BR_STATE_DISABLED; 103 p->state = BR_STATE_DISABLED;
106 p->topology_change_ack = 0; 104 p->topology_change_ack = 0;
107 p->config_pending = 0; 105 p->config_pending = 0;
108 106
107 br_log_state(p);
109 br_ifinfo_notify(RTM_NEWLINK, p); 108 br_ifinfo_notify(RTM_NEWLINK, p);
110 109
111 del_timer(&p->message_age_timer); 110 del_timer(&p->message_age_timer);
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 5864cc491369..5fe2ff3b01ef 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1335,7 +1335,12 @@ static inline int ebt_make_matchname(const struct ebt_entry_match *m,
1335 const char *base, char __user *ubase) 1335 const char *base, char __user *ubase)
1336{ 1336{
1337 char __user *hlp = ubase + ((char *)m - base); 1337 char __user *hlp = ubase + ((char *)m - base);
1338 if (copy_to_user(hlp, m->u.match->name, EBT_FUNCTION_MAXNAMELEN)) 1338 char name[EBT_FUNCTION_MAXNAMELEN] = {};
1339
1340 /* ebtables expects 32 bytes long names but xt_match names are 29 bytes
1341 long. Copy 29 bytes and fill remaining bytes with zeroes. */
1342 strncpy(name, m->u.match->name, sizeof(name));
1343 if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))
1339 return -EFAULT; 1344 return -EFAULT;
1340 return 0; 1345 return 0;
1341} 1346}
@@ -1344,7 +1349,10 @@ static inline int ebt_make_watchername(const struct ebt_entry_watcher *w,
1344 const char *base, char __user *ubase) 1349 const char *base, char __user *ubase)
1345{ 1350{
1346 char __user *hlp = ubase + ((char *)w - base); 1351 char __user *hlp = ubase + ((char *)w - base);
1347 if (copy_to_user(hlp , w->u.watcher->name, EBT_FUNCTION_MAXNAMELEN)) 1352 char name[EBT_FUNCTION_MAXNAMELEN] = {};
1353
1354 strncpy(name, w->u.watcher->name, sizeof(name));
1355 if (copy_to_user(hlp , name, EBT_FUNCTION_MAXNAMELEN))
1348 return -EFAULT; 1356 return -EFAULT;
1349 return 0; 1357 return 0;
1350} 1358}
@@ -1355,6 +1363,7 @@ ebt_make_names(struct ebt_entry *e, const char *base, char __user *ubase)
1355 int ret; 1363 int ret;
1356 char __user *hlp; 1364 char __user *hlp;
1357 const struct ebt_entry_target *t; 1365 const struct ebt_entry_target *t;
1366 char name[EBT_FUNCTION_MAXNAMELEN] = {};
1358 1367
1359 if (e->bitmask == 0) 1368 if (e->bitmask == 0)
1360 return 0; 1369 return 0;
@@ -1368,7 +1377,8 @@ ebt_make_names(struct ebt_entry *e, const char *base, char __user *ubase)
1368 ret = EBT_WATCHER_ITERATE(e, ebt_make_watchername, base, ubase); 1377 ret = EBT_WATCHER_ITERATE(e, ebt_make_watchername, base, ubase);
1369 if (ret != 0) 1378 if (ret != 0)
1370 return ret; 1379 return ret;
1371 if (copy_to_user(hlp, t->u.target->name, EBT_FUNCTION_MAXNAMELEN)) 1380 strncpy(name, t->u.target->name, sizeof(name));
1381 if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))
1372 return -EFAULT; 1382 return -EFAULT;
1373 return 0; 1383 return 0;
1374} 1384}
@@ -1893,10 +1903,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
1893 1903
1894 switch (compat_mwt) { 1904 switch (compat_mwt) {
1895 case EBT_COMPAT_MATCH: 1905 case EBT_COMPAT_MATCH:
1896 match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE, 1906 match = xt_request_find_match(NFPROTO_BRIDGE, name, 0);
1897 name, 0), "ebt_%s", name);
1898 if (match == NULL)
1899 return -ENOENT;
1900 if (IS_ERR(match)) 1907 if (IS_ERR(match))
1901 return PTR_ERR(match); 1908 return PTR_ERR(match);
1902 1909
@@ -1915,10 +1922,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
1915 break; 1922 break;
1916 case EBT_COMPAT_WATCHER: /* fallthrough */ 1923 case EBT_COMPAT_WATCHER: /* fallthrough */
1917 case EBT_COMPAT_TARGET: 1924 case EBT_COMPAT_TARGET:
1918 wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE, 1925 wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0);
1919 name, 0), "ebt_%s", name);
1920 if (wt == NULL)
1921 return -ENOENT;
1922 if (IS_ERR(wt)) 1926 if (IS_ERR(wt))
1923 return PTR_ERR(wt); 1927 return PTR_ERR(wt);
1924 off = xt_compat_target_offset(wt); 1928 off = xt_compat_target_offset(wt);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 606a6e8f3671..f965dce6f20f 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1060,11 +1060,12 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
1060 rcu_read_lock(); 1060 rcu_read_lock();
1061 cb->seq = net->dev_base_seq; 1061 cb->seq = net->dev_base_seq;
1062 1062
1063 nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, 1063 if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
1064 ifla_policy); 1064 ifla_policy) >= 0) {
1065 1065
1066 if (tb[IFLA_EXT_MASK]) 1066 if (tb[IFLA_EXT_MASK])
1067 ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); 1067 ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
1068 }
1068 1069
1069 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) { 1070 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
1070 idx = 0; 1071 idx = 0;
@@ -1900,10 +1901,11 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
1900 u32 ext_filter_mask = 0; 1901 u32 ext_filter_mask = 0;
1901 u16 min_ifinfo_dump_size = 0; 1902 u16 min_ifinfo_dump_size = 0;
1902 1903
1903 nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, ifla_policy); 1904 if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
1904 1905 ifla_policy) >= 0) {
1905 if (tb[IFLA_EXT_MASK]) 1906 if (tb[IFLA_EXT_MASK])
1906 ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); 1907 ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
1908 }
1907 1909
1908 if (!ext_filter_mask) 1910 if (!ext_filter_mask)
1909 return NLMSG_GOODSIZE; 1911 return NLMSG_GOODSIZE;
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index bf4a9c4808e1..d4d61b694fab 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -17,6 +17,7 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/net.h> 19#include <linux/net.h>
20#include <linux/workqueue.h>
20#include <net/ip.h> 21#include <net/ip.h>
21#include <net/inetpeer.h> 22#include <net/inetpeer.h>
22#include <net/secure_seq.h> 23#include <net/secure_seq.h>
@@ -66,6 +67,11 @@
66 67
67static struct kmem_cache *peer_cachep __read_mostly; 68static struct kmem_cache *peer_cachep __read_mostly;
68 69
70static LIST_HEAD(gc_list);
71static const int gc_delay = 60 * HZ;
72static struct delayed_work gc_work;
73static DEFINE_SPINLOCK(gc_lock);
74
69#define node_height(x) x->avl_height 75#define node_height(x) x->avl_height
70 76
71#define peer_avl_empty ((struct inet_peer *)&peer_fake_node) 77#define peer_avl_empty ((struct inet_peer *)&peer_fake_node)
@@ -102,6 +108,50 @@ int inet_peer_threshold __read_mostly = 65536 + 128; /* start to throw entries m
102int inet_peer_minttl __read_mostly = 120 * HZ; /* TTL under high load: 120 sec */ 108int inet_peer_minttl __read_mostly = 120 * HZ; /* TTL under high load: 120 sec */
103int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min */ 109int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min */
104 110
111static void inetpeer_gc_worker(struct work_struct *work)
112{
113 struct inet_peer *p, *n;
114 LIST_HEAD(list);
115
116 spin_lock_bh(&gc_lock);
117 list_replace_init(&gc_list, &list);
118 spin_unlock_bh(&gc_lock);
119
120 if (list_empty(&list))
121 return;
122
123 list_for_each_entry_safe(p, n, &list, gc_list) {
124
125 if(need_resched())
126 cond_resched();
127
128 if (p->avl_left != peer_avl_empty) {
129 list_add_tail(&p->avl_left->gc_list, &list);
130 p->avl_left = peer_avl_empty;
131 }
132
133 if (p->avl_right != peer_avl_empty) {
134 list_add_tail(&p->avl_right->gc_list, &list);
135 p->avl_right = peer_avl_empty;
136 }
137
138 n = list_entry(p->gc_list.next, struct inet_peer, gc_list);
139
140 if (!atomic_read(&p->refcnt)) {
141 list_del(&p->gc_list);
142 kmem_cache_free(peer_cachep, p);
143 }
144 }
145
146 if (list_empty(&list))
147 return;
148
149 spin_lock_bh(&gc_lock);
150 list_splice(&list, &gc_list);
151 spin_unlock_bh(&gc_lock);
152
153 schedule_delayed_work(&gc_work, gc_delay);
154}
105 155
106/* Called from ip_output.c:ip_init */ 156/* Called from ip_output.c:ip_init */
107void __init inet_initpeers(void) 157void __init inet_initpeers(void)
@@ -126,6 +176,7 @@ void __init inet_initpeers(void)
126 0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, 176 0, SLAB_HWCACHE_ALIGN | SLAB_PANIC,
127 NULL); 177 NULL);
128 178
179 INIT_DELAYED_WORK_DEFERRABLE(&gc_work, inetpeer_gc_worker);
129} 180}
130 181
131static int addr_compare(const struct inetpeer_addr *a, 182static int addr_compare(const struct inetpeer_addr *a,
@@ -447,9 +498,8 @@ relookup:
447 p->rate_last = 0; 498 p->rate_last = 0;
448 p->pmtu_expires = 0; 499 p->pmtu_expires = 0;
449 p->pmtu_orig = 0; 500 p->pmtu_orig = 0;
450 p->redirect_genid = 0;
451 memset(&p->redirect_learned, 0, sizeof(p->redirect_learned)); 501 memset(&p->redirect_learned, 0, sizeof(p->redirect_learned));
452 502 INIT_LIST_HEAD(&p->gc_list);
453 503
454 /* Link the node. */ 504 /* Link the node. */
455 link_to_pool(p, base); 505 link_to_pool(p, base);
@@ -509,3 +559,30 @@ bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout)
509 return rc; 559 return rc;
510} 560}
511EXPORT_SYMBOL(inet_peer_xrlim_allow); 561EXPORT_SYMBOL(inet_peer_xrlim_allow);
562
563void inetpeer_invalidate_tree(int family)
564{
565 struct inet_peer *old, *new, *prev;
566 struct inet_peer_base *base = family_to_base(family);
567
568 write_seqlock_bh(&base->lock);
569
570 old = base->root;
571 if (old == peer_avl_empty_rcu)
572 goto out;
573
574 new = peer_avl_empty_rcu;
575
576 prev = cmpxchg(&base->root, old, new);
577 if (prev == old) {
578 base->total = 0;
579 spin_lock(&gc_lock);
580 list_add_tail(&prev->gc_list, &gc_list);
581 spin_unlock(&gc_lock);
582 schedule_delayed_work(&gc_work, gc_delay);
583 }
584
585out:
586 write_sequnlock_bh(&base->lock);
587}
588EXPORT_SYMBOL(inetpeer_invalidate_tree);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index bcacf54e5418..019774796174 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -132,7 +132,6 @@ static int ip_rt_mtu_expires __read_mostly = 10 * 60 * HZ;
132static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20; 132static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20;
133static int ip_rt_min_advmss __read_mostly = 256; 133static int ip_rt_min_advmss __read_mostly = 256;
134static int rt_chain_length_max __read_mostly = 20; 134static int rt_chain_length_max __read_mostly = 20;
135static int redirect_genid;
136 135
137static struct delayed_work expires_work; 136static struct delayed_work expires_work;
138static unsigned long expires_ljiffies; 137static unsigned long expires_ljiffies;
@@ -937,7 +936,7 @@ static void rt_cache_invalidate(struct net *net)
937 936
938 get_random_bytes(&shuffle, sizeof(shuffle)); 937 get_random_bytes(&shuffle, sizeof(shuffle));
939 atomic_add(shuffle + 1U, &net->ipv4.rt_genid); 938 atomic_add(shuffle + 1U, &net->ipv4.rt_genid);
940 redirect_genid++; 939 inetpeer_invalidate_tree(AF_INET);
941} 940}
942 941
943/* 942/*
@@ -1485,10 +1484,8 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
1485 1484
1486 peer = rt->peer; 1485 peer = rt->peer;
1487 if (peer) { 1486 if (peer) {
1488 if (peer->redirect_learned.a4 != new_gw || 1487 if (peer->redirect_learned.a4 != new_gw) {
1489 peer->redirect_genid != redirect_genid) {
1490 peer->redirect_learned.a4 = new_gw; 1488 peer->redirect_learned.a4 = new_gw;
1491 peer->redirect_genid = redirect_genid;
1492 atomic_inc(&__rt_peer_genid); 1489 atomic_inc(&__rt_peer_genid);
1493 } 1490 }
1494 check_peer_redir(&rt->dst, peer); 1491 check_peer_redir(&rt->dst, peer);
@@ -1793,8 +1790,6 @@ static void ipv4_validate_peer(struct rtable *rt)
1793 if (peer) { 1790 if (peer) {
1794 check_peer_pmtu(&rt->dst, peer); 1791 check_peer_pmtu(&rt->dst, peer);
1795 1792
1796 if (peer->redirect_genid != redirect_genid)
1797 peer->redirect_learned.a4 = 0;
1798 if (peer->redirect_learned.a4 && 1793 if (peer->redirect_learned.a4 &&
1799 peer->redirect_learned.a4 != rt->rt_gateway) 1794 peer->redirect_learned.a4 != rt->rt_gateway)
1800 check_peer_redir(&rt->dst, peer); 1795 check_peer_redir(&rt->dst, peer);
@@ -1958,8 +1953,7 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
1958 dst_init_metrics(&rt->dst, peer->metrics, false); 1953 dst_init_metrics(&rt->dst, peer->metrics, false);
1959 1954
1960 check_peer_pmtu(&rt->dst, peer); 1955 check_peer_pmtu(&rt->dst, peer);
1961 if (peer->redirect_genid != redirect_genid) 1956
1962 peer->redirect_learned.a4 = 0;
1963 if (peer->redirect_learned.a4 && 1957 if (peer->redirect_learned.a4 &&
1964 peer->redirect_learned.a4 != rt->rt_gateway) { 1958 peer->redirect_learned.a4 != rt->rt_gateway) {
1965 rt->rt_gateway = peer->redirect_learned.a4; 1959 rt->rt_gateway = peer->redirect_learned.a4;
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 51fdbb490437..eab2a7fb15d1 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -278,6 +278,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
278 struct rtable *rt; 278 struct rtable *rt;
279 __u8 rcv_wscale; 279 __u8 rcv_wscale;
280 bool ecn_ok = false; 280 bool ecn_ok = false;
281 struct flowi4 fl4;
281 282
282 if (!sysctl_tcp_syncookies || !th->ack || th->rst) 283 if (!sysctl_tcp_syncookies || !th->ack || th->rst)
283 goto out; 284 goto out;
@@ -346,20 +347,16 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
346 * hasn't changed since we received the original syn, but I see 347 * hasn't changed since we received the original syn, but I see
347 * no easy way to do this. 348 * no easy way to do this.
348 */ 349 */
349 { 350 flowi4_init_output(&fl4, 0, sk->sk_mark, RT_CONN_FLAGS(sk),
350 struct flowi4 fl4; 351 RT_SCOPE_UNIVERSE, IPPROTO_TCP,
351 352 inet_sk_flowi_flags(sk),
352 flowi4_init_output(&fl4, 0, sk->sk_mark, RT_CONN_FLAGS(sk), 353 (opt && opt->srr) ? opt->faddr : ireq->rmt_addr,
353 RT_SCOPE_UNIVERSE, IPPROTO_TCP, 354 ireq->loc_addr, th->source, th->dest);
354 inet_sk_flowi_flags(sk), 355 security_req_classify_flow(req, flowi4_to_flowi(&fl4));
355 (opt && opt->srr) ? opt->faddr : ireq->rmt_addr, 356 rt = ip_route_output_key(sock_net(sk), &fl4);
356 ireq->loc_addr, th->source, th->dest); 357 if (IS_ERR(rt)) {
357 security_req_classify_flow(req, flowi4_to_flowi(&fl4)); 358 reqsk_free(req);
358 rt = ip_route_output_key(sock_net(sk), &fl4); 359 goto out;
359 if (IS_ERR(rt)) {
360 reqsk_free(req);
361 goto out;
362 }
363 } 360 }
364 361
365 /* Try to redo what tcp_v4_send_synack did. */ 362 /* Try to redo what tcp_v4_send_synack did. */
@@ -373,5 +370,10 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
373 ireq->rcv_wscale = rcv_wscale; 370 ireq->rcv_wscale = rcv_wscale;
374 371
375 ret = get_cookie_sock(sk, skb, req, &rt->dst); 372 ret = get_cookie_sock(sk, skb, req, &rt->dst);
373 /* ip_queue_xmit() depends on our flow being setup
374 * Normal sockets get it right from inet_csk_route_child_sock()
375 */
376 if (ret)
377 inet_sk(ret)->cork.fl.u.ip4 = fl4;
376out: return ret; 378out: return ret;
377} 379}
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 53c8ce4046b2..b5e315f13641 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1403,8 +1403,16 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
1403 1403
1404 BUG_ON(!pcount); 1404 BUG_ON(!pcount);
1405 1405
1406 /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */ 1406 /* Adjust counters and hints for the newly sacked sequence
1407 if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint)) 1407 * range but discard the return value since prev is already
1408 * marked. We must tag the range first because the seq
1409 * advancement below implicitly advances
1410 * tcp_highest_sack_seq() when skb is highest_sack.
1411 */
1412 tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
1413 start_seq, end_seq, dup_sack, pcount);
1414
1415 if (skb == tp->lost_skb_hint)
1408 tp->lost_cnt_hint += pcount; 1416 tp->lost_cnt_hint += pcount;
1409 1417
1410 TCP_SKB_CB(prev)->end_seq += shifted; 1418 TCP_SKB_CB(prev)->end_seq += shifted;
@@ -1430,12 +1438,6 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
1430 skb_shinfo(skb)->gso_type = 0; 1438 skb_shinfo(skb)->gso_type = 0;
1431 } 1439 }
1432 1440
1433 /* Adjust counters and hints for the newly sacked sequence range but
1434 * discard the return value since prev is already marked.
1435 */
1436 tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
1437 start_seq, end_seq, dup_sack, pcount);
1438
1439 /* Difference in this won't matter, both ACKed by the same cumul. ACK */ 1441 /* Difference in this won't matter, both ACKed by the same cumul. ACK */
1440 TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); 1442 TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS);
1441 1443
@@ -1583,6 +1585,10 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
1583 } 1585 }
1584 } 1586 }
1585 1587
1588 /* tcp_sacktag_one() won't SACK-tag ranges below snd_una */
1589 if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una))
1590 goto fallback;
1591
1586 if (!skb_shift(prev, skb, len)) 1592 if (!skb_shift(prev, skb, len))
1587 goto fallback; 1593 goto fallback;
1588 if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack)) 1594 if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack))
@@ -2567,6 +2573,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int mark_head)
2567 2573
2568 if (cnt > packets) { 2574 if (cnt > packets) {
2569 if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) || 2575 if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) ||
2576 (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) ||
2570 (oldcnt >= packets)) 2577 (oldcnt >= packets))
2571 break; 2578 break;
2572 2579
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 94d683a61cba..fd54c5f8a255 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1466,9 +1466,13 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1466 inet_csk(newsk)->icsk_ext_hdr_len = inet_opt->opt.optlen; 1466 inet_csk(newsk)->icsk_ext_hdr_len = inet_opt->opt.optlen;
1467 newinet->inet_id = newtp->write_seq ^ jiffies; 1467 newinet->inet_id = newtp->write_seq ^ jiffies;
1468 1468
1469 if (!dst && (dst = inet_csk_route_child_sock(sk, newsk, req)) == NULL) 1469 if (!dst) {
1470 goto put_and_exit; 1470 dst = inet_csk_route_child_sock(sk, newsk, req);
1471 1471 if (!dst)
1472 goto put_and_exit;
1473 } else {
1474 /* syncookie case : see end of cookie_v4_check() */
1475 }
1472 sk_setup_caps(newsk, dst); 1476 sk_setup_caps(newsk, dst);
1473 1477
1474 tcp_mtup_init(newsk); 1478 tcp_mtup_init(newsk);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c02280a4d126..6b8ebc5da0e1 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -434,6 +434,10 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
434 /* Join all-node multicast group */ 434 /* Join all-node multicast group */
435 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes); 435 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
436 436
437 /* Join all-router multicast group if forwarding is set */
438 if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
439 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
440
437 return ndev; 441 return ndev;
438} 442}
439 443
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 01a21c2f6ab3..8e2137bd87e2 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1332,6 +1332,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1332 hw_roc = true; 1332 hw_roc = true;
1333 1333
1334 list_for_each_entry(sdata, &local->interfaces, list) { 1334 list_for_each_entry(sdata, &local->interfaces, list) {
1335 if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
1336 sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
1337 continue;
1335 if (sdata->old_idle == sdata->vif.bss_conf.idle) 1338 if (sdata->old_idle == sdata->vif.bss_conf.idle)
1336 continue; 1339 continue;
1337 if (!ieee80211_sdata_running(sdata)) 1340 if (!ieee80211_sdata_running(sdata))
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index ad64f4d5271a..f9b8e819ca63 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -344,7 +344,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
344 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { 344 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
345 info->control.rates[i].idx = -1; 345 info->control.rates[i].idx = -1;
346 info->control.rates[i].flags = 0; 346 info->control.rates[i].flags = 0;
347 info->control.rates[i].count = 1; 347 info->control.rates[i].count = 0;
348 } 348 }
349 349
350 if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) 350 if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index ed86a3be678e..fa4b82c8ae80 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -635,8 +635,12 @@ static noinline int early_drop(struct net *net, unsigned int hash)
635 635
636 if (del_timer(&ct->timeout)) { 636 if (del_timer(&ct->timeout)) {
637 death_by_timeout((unsigned long)ct); 637 death_by_timeout((unsigned long)ct);
638 dropped = 1; 638 /* Check if we indeed killed this entry. Reliable event
639 NF_CT_STAT_INC_ATOMIC(net, early_drop); 639 delivery may have inserted it into the dying list. */
640 if (test_bit(IPS_DYING_BIT, &ct->status)) {
641 dropped = 1;
642 NF_CT_STAT_INC_ATOMIC(net, early_drop);
643 }
640 } 644 }
641 nf_ct_put(ct); 645 nf_ct_put(ct);
642 return dropped; 646 return dropped;
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 30c9d4ca0218..10687692831e 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1041,16 +1041,13 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct,
1041 if (!parse_nat_setup) { 1041 if (!parse_nat_setup) {
1042#ifdef CONFIG_MODULES 1042#ifdef CONFIG_MODULES
1043 rcu_read_unlock(); 1043 rcu_read_unlock();
1044 spin_unlock_bh(&nf_conntrack_lock);
1045 nfnl_unlock(); 1044 nfnl_unlock();
1046 if (request_module("nf-nat-ipv4") < 0) { 1045 if (request_module("nf-nat-ipv4") < 0) {
1047 nfnl_lock(); 1046 nfnl_lock();
1048 spin_lock_bh(&nf_conntrack_lock);
1049 rcu_read_lock(); 1047 rcu_read_lock();
1050 return -EOPNOTSUPP; 1048 return -EOPNOTSUPP;
1051 } 1049 }
1052 nfnl_lock(); 1050 nfnl_lock();
1053 spin_lock_bh(&nf_conntrack_lock);
1054 rcu_read_lock(); 1051 rcu_read_lock();
1055 if (nfnetlink_parse_nat_setup_hook) 1052 if (nfnetlink_parse_nat_setup_hook)
1056 return -EAGAIN; 1053 return -EAGAIN;
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 2725d1bdf291..48badffaafc1 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2007-2011 Nicira Networks. 2 * Copyright (c) 2007-2012 Nicira Networks.
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public 5 * modify it under the terms of version 2 of the GNU General Public
@@ -145,9 +145,16 @@ static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh,
145 inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb, 145 inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb,
146 *addr, new_addr, 1); 146 *addr, new_addr, 1);
147 } else if (nh->protocol == IPPROTO_UDP) { 147 } else if (nh->protocol == IPPROTO_UDP) {
148 if (likely(transport_len >= sizeof(struct udphdr))) 148 if (likely(transport_len >= sizeof(struct udphdr))) {
149 inet_proto_csum_replace4(&udp_hdr(skb)->check, skb, 149 struct udphdr *uh = udp_hdr(skb);
150 *addr, new_addr, 1); 150
151 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) {
152 inet_proto_csum_replace4(&uh->check, skb,
153 *addr, new_addr, 1);
154 if (!uh->check)
155 uh->check = CSUM_MANGLED_0;
156 }
157 }
151 } 158 }
152 159
153 csum_replace4(&nh->check, *addr, new_addr); 160 csum_replace4(&nh->check, *addr, new_addr);
@@ -197,8 +204,22 @@ static void set_tp_port(struct sk_buff *skb, __be16 *port,
197 skb->rxhash = 0; 204 skb->rxhash = 0;
198} 205}
199 206
200static int set_udp_port(struct sk_buff *skb, 207static void set_udp_port(struct sk_buff *skb, __be16 *port, __be16 new_port)
201 const struct ovs_key_udp *udp_port_key) 208{
209 struct udphdr *uh = udp_hdr(skb);
210
211 if (uh->check && skb->ip_summed != CHECKSUM_PARTIAL) {
212 set_tp_port(skb, port, new_port, &uh->check);
213
214 if (!uh->check)
215 uh->check = CSUM_MANGLED_0;
216 } else {
217 *port = new_port;
218 skb->rxhash = 0;
219 }
220}
221
222static int set_udp(struct sk_buff *skb, const struct ovs_key_udp *udp_port_key)
202{ 223{
203 struct udphdr *uh; 224 struct udphdr *uh;
204 int err; 225 int err;
@@ -210,16 +231,15 @@ static int set_udp_port(struct sk_buff *skb,
210 231
211 uh = udp_hdr(skb); 232 uh = udp_hdr(skb);
212 if (udp_port_key->udp_src != uh->source) 233 if (udp_port_key->udp_src != uh->source)
213 set_tp_port(skb, &uh->source, udp_port_key->udp_src, &uh->check); 234 set_udp_port(skb, &uh->source, udp_port_key->udp_src);
214 235
215 if (udp_port_key->udp_dst != uh->dest) 236 if (udp_port_key->udp_dst != uh->dest)
216 set_tp_port(skb, &uh->dest, udp_port_key->udp_dst, &uh->check); 237 set_udp_port(skb, &uh->dest, udp_port_key->udp_dst);
217 238
218 return 0; 239 return 0;
219} 240}
220 241
221static int set_tcp_port(struct sk_buff *skb, 242static int set_tcp(struct sk_buff *skb, const struct ovs_key_tcp *tcp_port_key)
222 const struct ovs_key_tcp *tcp_port_key)
223{ 243{
224 struct tcphdr *th; 244 struct tcphdr *th;
225 int err; 245 int err;
@@ -328,11 +348,11 @@ static int execute_set_action(struct sk_buff *skb,
328 break; 348 break;
329 349
330 case OVS_KEY_ATTR_TCP: 350 case OVS_KEY_ATTR_TCP:
331 err = set_tcp_port(skb, nla_data(nested_attr)); 351 err = set_tcp(skb, nla_data(nested_attr));
332 break; 352 break;
333 353
334 case OVS_KEY_ATTR_UDP: 354 case OVS_KEY_ATTR_UDP:
335 err = set_udp_port(skb, nla_data(nested_attr)); 355 err = set_udp(skb, nla_data(nested_attr));
336 break; 356 break;
337 } 357 }
338 358
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index ce64c18b8c79..2c030505b335 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1521,6 +1521,9 @@ static struct vport *lookup_vport(struct ovs_header *ovs_header,
1521 vport = ovs_vport_locate(nla_data(a[OVS_VPORT_ATTR_NAME])); 1521 vport = ovs_vport_locate(nla_data(a[OVS_VPORT_ATTR_NAME]));
1522 if (!vport) 1522 if (!vport)
1523 return ERR_PTR(-ENODEV); 1523 return ERR_PTR(-ENODEV);
1524 if (ovs_header->dp_ifindex &&
1525 ovs_header->dp_ifindex != get_dpifindex(vport->dp))
1526 return ERR_PTR(-ENODEV);
1524 return vport; 1527 return vport;
1525 } else if (a[OVS_VPORT_ATTR_PORT_NO]) { 1528 } else if (a[OVS_VPORT_ATTR_PORT_NO]) {
1526 u32 port_no = nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]); 1529 u32 port_no = nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f286bb8fda13..22c73b78ac6f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2068,12 +2068,16 @@ static int alc_build_controls(struct hda_codec *codec)
2068 */ 2068 */
2069 2069
2070static void alc_init_special_input_src(struct hda_codec *codec); 2070static void alc_init_special_input_src(struct hda_codec *codec);
2071static int alc269_fill_coef(struct hda_codec *codec);
2071 2072
2072static int alc_init(struct hda_codec *codec) 2073static int alc_init(struct hda_codec *codec)
2073{ 2074{
2074 struct alc_spec *spec = codec->spec; 2075 struct alc_spec *spec = codec->spec;
2075 unsigned int i; 2076 unsigned int i;
2076 2077
2078 if (codec->vendor_id == 0x10ec0269)
2079 alc269_fill_coef(codec);
2080
2077 alc_fix_pll(codec); 2081 alc_fix_pll(codec);
2078 alc_auto_init_amp(codec, spec->init_amp); 2082 alc_auto_init_amp(codec, spec->init_amp);
2079 2083
@@ -4367,6 +4371,7 @@ enum {
4367 ALC882_FIXUP_PB_M5210, 4371 ALC882_FIXUP_PB_M5210,
4368 ALC882_FIXUP_ACER_ASPIRE_7736, 4372 ALC882_FIXUP_ACER_ASPIRE_7736,
4369 ALC882_FIXUP_ASUS_W90V, 4373 ALC882_FIXUP_ASUS_W90V,
4374 ALC889_FIXUP_CD,
4370 ALC889_FIXUP_VAIO_TT, 4375 ALC889_FIXUP_VAIO_TT,
4371 ALC888_FIXUP_EEE1601, 4376 ALC888_FIXUP_EEE1601,
4372 ALC882_FIXUP_EAPD, 4377 ALC882_FIXUP_EAPD,
@@ -4494,6 +4499,13 @@ static const struct alc_fixup alc882_fixups[] = {
4494 { } 4499 { }
4495 } 4500 }
4496 }, 4501 },
4502 [ALC889_FIXUP_CD] = {
4503 .type = ALC_FIXUP_PINS,
4504 .v.pins = (const struct alc_pincfg[]) {
4505 { 0x1c, 0x993301f0 }, /* CD */
4506 { }
4507 }
4508 },
4497 [ALC889_FIXUP_VAIO_TT] = { 4509 [ALC889_FIXUP_VAIO_TT] = {
4498 .type = ALC_FIXUP_PINS, 4510 .type = ALC_FIXUP_PINS,
4499 .v.pins = (const struct alc_pincfg[]) { 4511 .v.pins = (const struct alc_pincfg[]) {
@@ -4650,6 +4662,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
4650 4662
4651 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 4663 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
4652 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 4664 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
4665 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD),
4653 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 4666 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
4654 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 4667 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
4655 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 4668 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
@@ -5467,8 +5480,12 @@ static const struct alc_model_fixup alc269_fixup_models[] = {
5467 5480
5468static int alc269_fill_coef(struct hda_codec *codec) 5481static int alc269_fill_coef(struct hda_codec *codec)
5469{ 5482{
5483 struct alc_spec *spec = codec->spec;
5470 int val; 5484 int val;
5471 5485
5486 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
5487 return 0;
5488
5472 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) { 5489 if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
5473 alc_write_coef_idx(codec, 0xf, 0x960b); 5490 alc_write_coef_idx(codec, 0xf, 0x960b);
5474 alc_write_coef_idx(codec, 0xe, 0x8817); 5491 alc_write_coef_idx(codec, 0xe, 0x8817);
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index cc9f6c83d661..bc030a2088da 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -6333,6 +6333,7 @@ static int __devinit snd_hdspm_create_hwdep(struct snd_card *card,
6333 6333
6334 hw->ops.open = snd_hdspm_hwdep_dummy_op; 6334 hw->ops.open = snd_hdspm_hwdep_dummy_op;
6335 hw->ops.ioctl = snd_hdspm_hwdep_ioctl; 6335 hw->ops.ioctl = snd_hdspm_hwdep_ioctl;
6336 hw->ops.ioctl_compat = snd_hdspm_hwdep_ioctl;
6336 hw->ops.release = snd_hdspm_hwdep_dummy_op; 6337 hw->ops.release = snd_hdspm_hwdep_dummy_op;
6337 6338
6338 return 0; 6339 return 0;
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index c6012ff5bd3e..d23b19a59d83 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -367,7 +367,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
367 .platform_name = "samsung-audio", 367 .platform_name = "samsung-audio",
368 .cpu_dai_name = "s3c24xx-iis", 368 .cpu_dai_name = "s3c24xx-iis",
369 .codec_dai_name = "wm8753-hifi", 369 .codec_dai_name = "wm8753-hifi",
370 .codec_name = "wm8753-codec.0-001a", 370 .codec_name = "wm8753.0-001a",
371 .init = neo1973_wm8753_init, 371 .init = neo1973_wm8753_init,
372 .ops = &neo1973_hifi_ops, 372 .ops = &neo1973_hifi_ops,
373}, 373},
@@ -376,7 +376,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
376 .stream_name = "Voice", 376 .stream_name = "Voice",
377 .cpu_dai_name = "dfbmcs320-pcm", 377 .cpu_dai_name = "dfbmcs320-pcm",
378 .codec_dai_name = "wm8753-voice", 378 .codec_dai_name = "wm8753-voice",
379 .codec_name = "wm8753-codec.0-001a", 379 .codec_name = "wm8753.0-001a",
380 .ops = &neo1973_voice_ops, 380 .ops = &neo1973_voice_ops,
381}, 381},
382}; 382};
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0abfb18b911f..227b6ae99785 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -204,6 +204,9 @@ static void perf_record__open(struct perf_record *rec)
204 204
205 if (opts->group && pos != first) 205 if (opts->group && pos != first)
206 group_fd = first->fd; 206 group_fd = first->fd;
207fallback_missing_features:
208 if (opts->exclude_guest_missing)
209 attr->exclude_guest = attr->exclude_host = 0;
207retry_sample_id: 210retry_sample_id:
208 attr->sample_id_all = opts->sample_id_all_avail ? 1 : 0; 211 attr->sample_id_all = opts->sample_id_all_avail ? 1 : 0;
209try_again: 212try_again:
@@ -217,15 +220,23 @@ try_again:
217 } else if (err == ENODEV && opts->cpu_list) { 220 } else if (err == ENODEV && opts->cpu_list) {
218 die("No such device - did you specify" 221 die("No such device - did you specify"
219 " an out-of-range profile CPU?\n"); 222 " an out-of-range profile CPU?\n");
220 } else if (err == EINVAL && opts->sample_id_all_avail) { 223 } else if (err == EINVAL) {
221 /* 224 if (!opts->exclude_guest_missing &&
222 * Old kernel, no attr->sample_id_type_all field 225 (attr->exclude_guest || attr->exclude_host)) {
223 */ 226 pr_debug("Old kernel, cannot exclude "
224 opts->sample_id_all_avail = false; 227 "guest or host samples.\n");
225 if (!opts->sample_time && !opts->raw_samples && !time_needed) 228 opts->exclude_guest_missing = true;
226 attr->sample_type &= ~PERF_SAMPLE_TIME; 229 goto fallback_missing_features;
227 230 } else if (opts->sample_id_all_avail) {
228 goto retry_sample_id; 231 /*
232 * Old kernel, no attr->sample_id_type_all field
233 */
234 opts->sample_id_all_avail = false;
235 if (!opts->sample_time && !opts->raw_samples && !time_needed)
236 attr->sample_type &= ~PERF_SAMPLE_TIME;
237
238 goto retry_sample_id;
239 }
229 } 240 }
230 241
231 /* 242 /*
@@ -503,9 +514,9 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
503 return err; 514 return err;
504 } 515 }
505 516
506 if (!!rec->no_buildid 517 if (!rec->no_buildid
507 && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) { 518 && !perf_header__has_feat(&session->header, HEADER_BUILD_ID)) {
508 pr_err("Couldn't generating buildids. " 519 pr_err("Couldn't generate buildids. "
509 "Use --no-buildid to profile anyway.\n"); 520 "Use --no-buildid to profile anyway.\n");
510 return -1; 521 return -1;
511 } 522 }
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index dd162aa24baa..ecff31257eb3 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -857,6 +857,9 @@ static void perf_top__start_counters(struct perf_top *top)
857 attr->mmap = 1; 857 attr->mmap = 1;
858 attr->comm = 1; 858 attr->comm = 1;
859 attr->inherit = top->inherit; 859 attr->inherit = top->inherit;
860fallback_missing_features:
861 if (top->exclude_guest_missing)
862 attr->exclude_guest = attr->exclude_host = 0;
860retry_sample_id: 863retry_sample_id:
861 attr->sample_id_all = top->sample_id_all_avail ? 1 : 0; 864 attr->sample_id_all = top->sample_id_all_avail ? 1 : 0;
862try_again: 865try_again:
@@ -868,12 +871,20 @@ try_again:
868 if (err == EPERM || err == EACCES) { 871 if (err == EPERM || err == EACCES) {
869 ui__error_paranoid(); 872 ui__error_paranoid();
870 goto out_err; 873 goto out_err;
871 } else if (err == EINVAL && top->sample_id_all_avail) { 874 } else if (err == EINVAL) {
872 /* 875 if (!top->exclude_guest_missing &&
873 * Old kernel, no attr->sample_id_type_all field 876 (attr->exclude_guest || attr->exclude_host)) {
874 */ 877 pr_debug("Old kernel, cannot exclude "
875 top->sample_id_all_avail = false; 878 "guest or host samples.\n");
876 goto retry_sample_id; 879 top->exclude_guest_missing = true;
880 goto fallback_missing_features;
881 } else if (top->sample_id_all_avail) {
882 /*
883 * Old kernel, no attr->sample_id_type_all field
884 */
885 top->sample_id_all_avail = false;
886 goto retry_sample_id;
887 }
877 } 888 }
878 /* 889 /*
879 * If it's cycles then fall back to hrtimer 890 * If it's cycles then fall back to hrtimer
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 64f8bee31ced..16e7d20eee83 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -199,6 +199,7 @@ struct perf_record_opts {
199 bool sample_address; 199 bool sample_address;
200 bool sample_time; 200 bool sample_time;
201 bool sample_id_all_avail; 201 bool sample_id_all_avail;
202 bool exclude_guest_missing;
202 bool system_wide; 203 bool system_wide;
203 bool period; 204 bool period;
204 unsigned int freq; 205 unsigned int freq;
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index b029296d20d9..c7a6f6faf91e 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -165,7 +165,7 @@ struct tracepoint_path *tracepoint_id_to_path(u64 config)
165 struct tracepoint_path *path = NULL; 165 struct tracepoint_path *path = NULL;
166 DIR *sys_dir, *evt_dir; 166 DIR *sys_dir, *evt_dir;
167 struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent; 167 struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;
168 char id_buf[4]; 168 char id_buf[24];
169 int fd; 169 int fd;
170 u64 id; 170 u64 id;
171 char evt_path[MAXPATHLEN]; 171 char evt_path[MAXPATHLEN];
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index a248f3c2c60d..f2eab81435ae 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -34,6 +34,7 @@ struct perf_top {
34 bool inherit; 34 bool inherit;
35 bool group; 35 bool group;
36 bool sample_id_all_avail; 36 bool sample_id_all_avail;
37 bool exclude_guest_missing;
37 bool dump_symtab; 38 bool dump_symtab;
38 const char *cpu_list; 39 const char *cpu_list;
39 struct hist_entry *sym_filter_entry; 40 struct hist_entry *sym_filter_entry;
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 813141047fc2..fb25d1329218 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -6,7 +6,7 @@
6 * XXX We need to find a better place for these things... 6 * XXX We need to find a better place for these things...
7 */ 7 */
8bool perf_host = true; 8bool perf_host = true;
9bool perf_guest = true; 9bool perf_guest = false;
10 10
11void event_attr_init(struct perf_event_attr *attr) 11void event_attr_init(struct perf_event_attr *attr)
12{ 12{