platform/adaptation/renesas_rcar/renesas_kernel.git
11 years agoMerge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Wed, 10 Oct 2012 01:48:32 +0000 (10:48 +0900)]
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French.

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: reinstate the forcegid option
  Convert properly UTF-8 to UTF-16
  [CIFS] WARN_ON_ONCE if kernel_sendmsg() returns -ENOSPC

11 years ago[media] stk1160: Add support for S-Video input
Ezequiel Garcia [Tue, 9 Oct 2012 21:01:03 +0000 (18:01 -0300)]
[media] stk1160: Add support for S-Video input

In order to fully replace easycap driver with stk1160,
it's also necessary to add S-Video support.
A similar patch backported for v3.2 kernel has been
tested by three different users.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoRevert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
Mauro Carvalho Chehab [Tue, 9 Oct 2012 22:28:00 +0000 (19:28 -0300)]
Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"

Reverted, as requested by Laurent:

I don't consider it as being ready yet, as Sakari pointed out we need
to investigate whether the right fix shouldn't be at the OMAP3 clocks
level instead.

This reverts commit 947c48086623d9ca2207dd0434bd58458af4ba86.

Requested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMerge tag 'omap-for-v3.7-rc1/fixes-asoc-regression-signed' of git://git.kernel.org...
Olof Johansson [Tue, 9 Oct 2012 21:06:10 +0000 (14:06 -0700)]
Merge tag 'omap-for-v3.7-rc1/fixes-asoc-regression-signed' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

This branch contains regression fixes for omap4/5 ASoC
audio that were caused by the fact that u-boot stopped
muxing non essential pins.

As omap audio and dmaengine development happens on
these platforms, let's make sure they are usable.

Of course this should have been fixed earlier and
not during the -rc cycle.

* tag 'omap-for-v3.7-rc1/fixes-asoc-regression-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM/dts: omap5-evm: pinmux configuration for audio
  ARM/dts: Add pinctrl driver entries for omap5
  ARM/dts: omap4-panda: pinmux configuration for audio
  ARM/dts: omap4-sdp: pinmux configuration for audio
  ARM/dts: omap5-evm: Disable unused McBSP3
  ARM/dts: omap4-sdp: Disable unused McBSP3
  ARM/dts: omap4-panda: Disable unused audio IPs
  ARM: OMAP: board-omap4panda: Pin mux configuration for audio needs
  ARM: OMAP: board-4430-sdp: Pin mux configuration for audio needs

11 years agoMerge tag 'omap-for-v3.7-rc1/fixes-cpufreq-signed' of git://git.kernel.org/pub/scm...
Olof Johansson [Tue, 9 Oct 2012 21:05:38 +0000 (14:05 -0700)]
Merge tag 'omap-for-v3.7-rc1/fixes-cpufreq-signed' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

These were agreed to be merged via arm soc tree as Rafael
is on vacation.

From Kevin Hilman <khilman@deeprootsystems.com>:

This series a couple bug fixes and a couple fixes that make this
driver support recently added OMAP-based SoCs.

The 'get_cpu_device' patch is needed due to a change in the OMAP
OMAP PM core code which enforces use of get_cpu_device() instead of
a deprecated OMAP-specific API.

The usage of plat/*.h headers breaks single zImage, so platforms are
cleaning up and/or removing plat/*.h so the driver needs to be fixed
accordingly.

This series is based on the merge of Rafael's pm-for-3.7-rc1 tag into
Linus' master branch: commit 16642a2e7be23bbda013fc32d8f6c68982eab603.

* tag 'omap-for-v3.7-rc1/fixes-cpufreq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: PM: MPU DVFS: use generic CPU device for MPU-SS
  cpufreq: OMAP: use get_cpu_device() instead of omap_device API
  cpufreq: OMAP: fix clock usage to be SoC independent, remove plat/ includes
  cpufreq: OMAP: remove unused <plat/omap-pm.h>
  cpufreq: OMAP: ensure valid clock rate before scaling

11 years agoMerge tag 'omap-for-v3.7-rc1/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux...
Olof Johansson [Tue, 9 Oct 2012 21:05:11 +0000 (14:05 -0700)]
Merge tag 'omap-for-v3.7-rc1/fixes-pm-signed' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

From Kevin Hilman <khilman@deeprootsystems.com> via Tony Lindgren:

OMAP PM related fixes for v3.7-rc

* tag 'omap-for-v3.7-rc1/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: SmartReflex: fix error path in init function
  ARM: OMAP: SmartReflex: select CONFIG_POWER_SUPPLY in Kconfig
  ARM: OMAP2+: PM: fix return value check in omap2_set_init_voltage()
  ARM: OMAP2+: SmartReflex: fix return value check in sr_dev_init()
  ARM: OMAP: omap_device: fix return value check in omap_device_build_ss()
  ARM: OMAP: fix return value check in beagle_opp_init()

11 years agoMerge tag 'omap-for-v3.7-rc1/fixes-hwmod-clock-signed-v3' of git://git.kernel.org...
Olof Johansson [Tue, 9 Oct 2012 21:04:35 +0000 (14:04 -0700)]
Merge tag 'omap-for-v3.7-rc1/fixes-hwmod-clock-signed-v3' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

From Paul Walmsley <paul@pwsan.com> via Tony Lindgren:

Some OMAP fixes for the 3.7 merge window, fixing mismerges, branch
integration issues, and bugs after the arm-soc merges.

* tag 'omap-for-v3.7-rc1/fixes-hwmod-clock-signed-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4/AM335x: hwmod: fix disable_module regression in hardreset handling
  ARM: OMAP3: fix workaround for EMU clockdomain
  ARM: OMAP: omap3evm: fix new sparse warning
  ARM: OMAP2+: hwmod data: Fix PMU interrupt definitions
  ARM: am33xx: clk: Update clkdev table to add mcasp alias

11 years agoMerge tag 'omap-for-v3.7-rc1/fixes-signed' of git://git.kernel.org/pub/scm/linux...
Olof Johansson [Tue, 9 Oct 2012 21:02:14 +0000 (14:02 -0700)]
Merge tag 'omap-for-v3.7-rc1/fixes-signed' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

This branch contains one counter locking fix and an
alignment fix. Other fixes are warning fixes, fixes
for return value checks.

I've also included removal of some extra semicolons,
dropping of some duplicate includes, and an a change
for wl12xx enumeration that are not strictly fixes
but would be good to get out of the way for -rc1.

* tag 'omap-for-v3.7-rc1/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  arm/omap: Replace board_ref_clock with enum values
  ARM: OMAP2+: remove duplicated include from board-omap3stalker.c
  arch/arm/plat-omap/omap-pm-noop.c: Remove unecessary semicolon
  arch/arm/mach-omap2: Remove unecessary semicolon
  arch/arm/mach-omap1/devices.c: Remove unecessary semicolon
  AM35xx: Add missing hwmod entry for the HDQ/1-Wire present in AM3505/3517 CPUs.
  ARM: OMAP2+: gpmc: annotate exit sections properly
  ARM: OMAP: fix return value check in realtime_counter_init()
  ARM: OMAP: hsmmc: fix return value check in omap_hsmmc_init_one()
  OMAPDSS: fix return value check in create_dss_pdev()
  ARM: OMAP2+: Add am335x evm and bone targets to common Makefile
  arm: increase FORCE_MAX_ZONEORDER for TI AM33XX
  ARM: OMAP: OMAP_DEBUG_LEDS needs to select LEDS_CLASS
  ARM: OMAP: rx51: Fix a section mismatch warn
  ARM: OMAP2+: Round of the carve out memory requested to section_size
  ARM: OMAP: counter: add locking to read_persistent_clock

11 years agotypo in UserModeLinux-HOWTO
Richard Genoud [Thu, 27 Sep 2012 07:34:16 +0000 (09:34 +0200)]
typo in UserModeLinux-HOWTO

[it seems that I sent it to the wrong maintainer at first... sorry for that]
copy_from_user was meant instead of copy_to_user.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agohppfs: fix the return value of get_inode()
Wei Yongjun [Fri, 21 Sep 2012 04:55:02 +0000 (12:55 +0800)]
hppfs: fix the return value of get_inode()

In case of error, the function get_inode() returns ERR_PTR().
But the users hppfs_lookup() and hppfs_fill_super() use NULL
test for check the return value, not IS_ERR(), so we'd better
change the return value of get_inode() to NULL instead of
ERR_PTR().

dpatch engine is used to generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agohostfs: drop vmtruncate
Marco Stornelli [Sat, 6 Oct 2012 08:31:13 +0000 (10:31 +0200)]
hostfs: drop vmtruncate

Removed vmtruncate.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agoum: get rid of pointless include "..." where include <...> will do
Al Viro [Mon, 8 Oct 2012 02:27:32 +0000 (03:27 +0100)]
um: get rid of pointless include "..." where include <...> will do

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agoum: move sysrq.h out of include/shared
Al Viro [Mon, 8 Oct 2012 02:26:54 +0000 (03:26 +0100)]
um: move sysrq.h out of include/shared

never used by userland-side objects

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agoum/x86: merge 32 and 64 bit variants of ptrace.h
Al Viro [Mon, 8 Oct 2012 02:26:17 +0000 (03:26 +0100)]
um/x86: merge 32 and 64 bit variants of ptrace.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agoum/x86: merge 32 and 64bit variants of checksum.h
Al Viro [Mon, 8 Oct 2012 02:25:00 +0000 (03:25 +0100)]
um/x86: merge 32 and 64bit variants of checksum.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
11 years agoARM: pxa: armcore: fix PCI PIO warnings
Arnd Bergmann [Mon, 30 Apr 2012 13:34:13 +0000 (13:34 +0000)]
ARM: pxa: armcore: fix PCI PIO warnings

The it8152 PCI host used on the pxa/cm_x2xx machines
uses the old-style I/O window registration. This should
eventually get converted to pci_ioremap_io() but for
now, let's cast the IT8152_IO_BASE constant to an integer
type to get rid of the warnings.

Without this patch, building cm_x2xx_defconfig results in:

arch/arm/common/it8152.c: In function 'it8152_pci_setup':
arch/arm/common/it8152.c:287:18: warning: assignment makes integer from pointer without a cast [enabled by default]
arch/arm/common/it8152.c:288:16: warning: assignment makes integer from pointer without a cast [enabled by default]
arch/arm/common/it8152.c:291:17: warning: assignment makes integer from pointer without a cast [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
11 years agoMerge tag 'omap-fixes-a-for-pre3.7' of git://git.kernel.org/pub/scm/linux/kernel...
Tony Lindgren [Tue, 9 Oct 2012 18:07:29 +0000 (11:07 -0700)]
Merge tag 'omap-fixes-a-for-pre3.7' of git://git./linux/kernel/git/pjw/omap-pending into omap-for-v3.7-rc1/fixes-hwmod-clock

Some OMAP fixes for the 3.7 merge window, fixing mismerges, branch
integration issues, and bugs after the arm-soc merges.

Basic test logs are available here:

   http://www.pwsan.com/omap/testlogs/devel_late_fixes_3.7/20121009084003/

N800 isn't booting; this is a problem present in the base commit and
is due to serial driver breakage:

   http://www.spinics.net/lists/arm-kernel/msg196034.html

11 years agoRDS: fix rds-ping spinlock recursion
jeff.liu [Mon, 8 Oct 2012 18:57:27 +0000 (18:57 +0000)]
RDS: fix rds-ping spinlock recursion

This is the revised patch for fixing rds-ping spinlock recursion
according to Venkat's suggestions.

RDS ping/pong over TCP feature has been broken for years(2.6.39 to
3.6.0) since we have to set TCP cork and call kernel_sendmsg() between
ping/pong which both need to lock "struct sock *sk". However, this
lock has already been hold before rds_tcp_data_ready() callback is
triggerred. As a result, we always facing spinlock resursion which
would resulting in system panic.

Given that RDS ping is only used to test the connectivity and not for
serious performance measurements, we can queue the pong transmit to
rds_wq as a delayed response.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
CC: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
CC: David S. Miller <davem@davemloft.net>
CC: James Morris <james.l.morris@oracle.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetdev/phy: Prototype of_mdio_find_bus()
Mark Brown [Mon, 8 Oct 2012 22:55:43 +0000 (22:55 +0000)]
netdev/phy: Prototype of_mdio_find_bus()

Ensure that of_mdio_find_bus() matches the prototype in the header (and
stop sparse complaining) by including the header with the prototype.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofarsync: fix support for over 30 cards
Dan Carpenter [Mon, 8 Oct 2012 21:20:48 +0000 (21:20 +0000)]
farsync: fix support for over 30 cards

We're trying to fill a 64 bit bitmap but only the lower 30 shifts work
because the shift wraps around.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Remove code that stops further access to BE NIC based on UE bits
Ajit Khaparde [Mon, 8 Oct 2012 18:18:21 +0000 (18:18 +0000)]
be2net: Remove code that stops further access to BE NIC based on UE bits

On certain platforms, BE hardware could  falsely indicate UE.
For BE family of NICs, do not set hw_error based on the UE bits.
If there was a real fatal error, the corresponding h/w block will
automatically go offline and stop traffic.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agopch_gbe: Fix build error by selecting all the possible dependencies.
Haicheng Li [Mon, 8 Oct 2012 23:43:12 +0000 (23:43 +0000)]
pch_gbe: Fix build error by selecting all the possible dependencies.

Fengguang reported a kernel build failure as following:
drivers/built-in.o: In function `pch_gbe_ioctl':
pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write'
pch_gbe_main.c:(.text+0x510393): undefined reference to `pch_ch_control_write'
pch_gbe_main.c:(.text+0x5103b3): undefined reference to `pch_ch_control_write'
...

It's a regression by commit da1586461. The root cause is that
the CONFIG_PPS is not set there, consequently CONFIG_PTP_1588_CLOCK
can not be set anyway, which finally causes ptp_pch and pch_gbe_main
build failures.

As David prefers to use *select* to fix such module co-dependency issues,
this patch explicitly selects all the possible dependencies of PCH_PTP.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Haicheng Li <haicheng.lee@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'disintegrate-isdn-20121009' of git://git.infradead.org/users/dhowells...
David S. Miller [Tue, 9 Oct 2012 17:16:33 +0000 (13:16 -0400)]
Merge tag 'disintegrate-isdn-20121009' of git://git.infradead.org/users/dhowells/linux-headers

UAPI Disintegration 2012-10-09

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'disintegrate-net-20121009' of git://git.infradead.org/users/dhowells/linux...
David S. Miller [Tue, 9 Oct 2012 17:15:29 +0000 (13:15 -0400)]
Merge tag 'disintegrate-net-20121009' of git://git.infradead.org/users/dhowells/linux-headers

UAPI Disintegration 2012-10-09

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
David S. Miller [Tue, 9 Oct 2012 17:14:32 +0000 (13:14 -0400)]
Merge git://git./linux/kernel/git/torvalds/linux

Pulled mainline in order to get the UAPI infrastructure already
merged before I pull in David Howells's UAPI trees for networking.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'disintegrate-sparc-20121009' of git://git.infradead.org/users/dhowells...
David S. Miller [Tue, 9 Oct 2012 16:54:30 +0000 (09:54 -0700)]
Merge tag 'disintegrate-sparc-20121009' of git://git.infradead.org/users/dhowells/linux-headers

UAPI Disintegration 2012-10-09

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofirewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)
Stefan Richter [Sat, 6 Oct 2012 12:12:56 +0000 (14:12 +0200)]
firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)

Fix two bugs of the /dev/fw* character device concerning the
FW_CDEV_IOC_GET_INFO ioctl with nonzero fw_cdev_get_info.bus_reset.
(Practically all /dev/fw* clients issue this ioctl right after opening
the device.)

Both bugs are caused by sizeof(struct fw_cdev_event_bus_reset) being 36
without natural alignment and 40 with natural alignment.

 1) Memory corruption, affecting i386 userland on amd64 kernel:
    Userland reserves a 36 bytes large buffer, kernel writes 40 bytes.
    This has been first found and reported against libraw1394 if
    compiled with gcc 4.7 which happens to order libraw1394's stack such
    that the bug became visible as data corruption.

 2) Information leak, affecting all kernel architectures except i386:
    4 bytes of random kernel stack data were leaked to userspace.

Hence limit the respective copy_to_user() to the 32-bit aligned size of
struct fw_cdev_event_bus_reset.

Reported-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: stable@kernel.org
11 years agoMerge branch 'fixes2' into fixes
Olof Johansson [Tue, 9 Oct 2012 15:48:51 +0000 (08:48 -0700)]
Merge branch 'fixes2' into fixes

Three more warnings fixes from Arnd Bergmann:

* fixes2:
  ARM: integrator: use __iomem pointers for MMIO, part 2
  ARM: assabet: fix bogus warning in get_assabet_scr (again)
  ARM: shmobile: mark shmobile_init_late as __init

11 years agoARM: integrator: use __iomem pointers for MMIO, part 2
Arnd Bergmann [Mon, 24 Sep 2012 07:22:02 +0000 (07:22 +0000)]
ARM: integrator: use __iomem pointers for MMIO, part 2

Due to some interesting merges in the integrator code, not
all users of mmio pointers were converted before, this
fixes all warnings that got introduced as a consequence.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: assabet: fix bogus warning in get_assabet_scr (again)
Arnd Bergmann [Mon, 30 Apr 2012 12:41:21 +0000 (12:41 +0000)]
ARM: assabet: fix bogus warning in get_assabet_scr (again)

Russell fixed this bogus warning before in 2f3eca8b4f "Shut up gcc
warning in assabet.c", but apparently gcc has become smarter (or dumber)
since 2005, and the same warning came up again.

This uses the uninitialized_var() macro to convince gcc that the
variable is actually being initialized. 100 times in fact.

Without this patch, building assabet_defconfig results in:

arch/arm/mach-sa1100/assabet.c: In function 'fixup_assabet':
arch/arm/mach-sa1100/assabet.c:397:6: warning: 'scr' may be used uninitialized in this function [-Wuninitialized]
arch/arm/mach-sa1100/assabet.c:389:16: note: 'scr' was declared here

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: shmobile: mark shmobile_init_late as __init
Arnd Bergmann [Sun, 23 Sep 2012 22:36:35 +0000 (22:36 +0000)]
ARM: shmobile: mark shmobile_init_late as __init

Patch 35f2b0bd59 "ARM: shmobile: Move definition of shmobile_init_late()
to header" moved the definition of the shmobile_init_late function, but
dropped the __init annotation, which is now causing warnings because
the function calls shmobile_suspend_init, which is also marked init.

Without this patch, building kota2_defconfig results in:

WARNING: vmlinux.o(.text+0xb7c8): Section mismatch in reference from the function shmobile_init_late() to the function .init.text:shmobile_suspend_init()
The function shmobile_init_late() references
the function __init shmobile_suspend_init().
This is often because shmobile_init_late lacks a __init
annotation or the annotation of shmobile_suspend_init is wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Magnus Damm <damm@opensource.se>
Cc: Simon Horman <horms@verge.net.au>
11 years agoARM: integrator_cp: fix build failure
Olof Johansson [Sun, 7 Oct 2012 17:42:40 +0000 (10:42 -0700)]
ARM: integrator_cp: fix build failure

arch/arm/mach-integrator/integrator_cp.c:272:32: error: 'of_aliases'
undeclared (first use in this function)

Move the OF-only timer init under #ifdef CONFIG_OF, just like
integrator_ap has it.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agobtrfs: init ref_index to zero in add_inode_ref
Chris Mason [Tue, 9 Oct 2012 15:17:20 +0000 (11:17 -0400)]
btrfs: init ref_index to zero in add_inode_ref

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agomtd: Disable mtdchar mmap on MMU systems
David Woodhouse [Tue, 9 Oct 2012 14:08:10 +0000 (15:08 +0100)]
mtd: Disable mtdchar mmap on MMU systems

This code was broken because it assumed that all MTD devices were map-based.
Disable it for now, until it can be fixed properly for the next merge window.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
11 years agoMerge tag 'disintegrate-mtd-20121009' of git://git.infradead.org/users/dhowells/linux...
David Woodhouse [Tue, 9 Oct 2012 14:03:21 +0000 (15:03 +0100)]
Merge tag 'disintegrate-mtd-20121009' of git://git.infradead.org/users/dhowells/linux-headers

UAPI Disintegration 2012-10-09

Conflicts:
MAINTAINERS
arch/arm/configs/bcmring_defconfig
arch/arm/mach-imx/clk-imx51-imx53.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/nand_bcm_umi.h
drivers/mtd/nand/orion_nand.c

11 years agoBtrfs: remove repeated eb->pages check in, disk-io.c/csum_dirty_buffer
Wang Sheng-Hui [Mon, 8 Oct 2012 13:26:15 +0000 (07:26 -0600)]
Btrfs: remove repeated eb->pages check in, disk-io.c/csum_dirty_buffer

In csum_dirty_buffer, we first get eb from page->private.
Then we check if the page is the first page of eb. Later
we check it again. Remove the repeated check here.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
11 years agoBtrfs: fix page leakage
Josef Bacik [Fri, 5 Oct 2012 20:53:34 +0000 (16:53 -0400)]
Btrfs: fix page leakage

Alloc_dummy_extent_buffer will not free the first page in the eb array if we
fail to allocate a page, fix this.  Thanks,

Reported-by: David Sterba <dave@jikos.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: do not warn_on when we cannot alloc a page for an extent buffer
Josef Bacik [Fri, 5 Oct 2012 20:43:45 +0000 (16:43 -0400)]
Btrfs: do not warn_on when we cannot alloc a page for an extent buffer

It's just annoying and the user will have gotten a nice OOM killer message
so they are already fully aware they are screwed :).  Thanks,

Reported-by: Jérôme Poulin <jeromepoulin@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: don't bug on enomem in readpage
Josef Bacik [Fri, 5 Oct 2012 20:40:32 +0000 (16:40 -0400)]
Btrfs: don't bug on enomem in readpage

Get rid of the BUG_ON(ret == -ENOMEM) in __extent_read_full_page.  Thanks,

Reported-by: Jérôme Poulin <jeromepoulin@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: cleanup pages properly when ENOMEM in compression
Josef Bacik [Fri, 5 Oct 2012 17:39:50 +0000 (13:39 -0400)]
Btrfs: cleanup pages properly when ENOMEM in compression

We were freeing non-existent pages which was causing a panic for a user who
was suffering from ENOMEM.  This patch fixes the problem.  Thanks,

Reported-by: Jérôme Poulin <jeromepoulin@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: make filesystem read-only when submitting barrier fails
Stefan Behrens [Wed, 1 Aug 2012 16:56:49 +0000 (18:56 +0200)]
Btrfs: make filesystem read-only when submitting barrier fails

So far the return code of barrier_all_devices() is ignored, which
means that errors are ignored. The result can be a corrupt
filesystem which is not consistent.
This commit adds code to evaluate the return code of
barrier_all_devices(). The normal btrfs_error() mechanism is used to
switch the filesystem into read-only mode when errors are detected.

In order to decide whether barrier_all_devices() should return
error or success, the number of disks that are allowed to fail the
barrier submission is calculated. This calculation accounts for the
worst RAID level of metadata, system and data. If single, dup or
RAID0 is in use, a single disk error is already considered to be
fatal. Otherwise a single disk error is tolerated.

The calculation of the number of disks that are tolerated to fail
the barrier operation is performed when the filesystem gets mounted,
when a balance operation is started and finished, and when devices
are added or removed.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
11 years agoBtrfs: detect corrupted filesystem after write I/O errors
Stefan Behrens [Tue, 31 Jul 2012 17:09:44 +0000 (11:09 -0600)]
Btrfs: detect corrupted filesystem after write I/O errors

In check-integrity, detect when a superblock is written that points
to blocks that have not been written to disk due to I/O write errors.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
11 years agoBtrfs: make compress and nodatacow mount options mutually exclusive
Andrei Popa [Thu, 20 Sep 2012 14:42:11 +0000 (08:42 -0600)]
Btrfs: make compress and nodatacow mount options mutually exclusive

If a filesystem is mounted with compression and then remounted by adding nodatacow,
the compression is disabled but the compress flag is still visible.
Also, if a filesystem is mounted with nodatacow and then remounted with compression,
nodatacow flag is still present but it's not active.
This patch:
- removes compress flags and notifies that the compression has been disabled if the
  filesystem is mounted with nodatacow
- removes nodatacow and nodatasum flags if mounted with compress.

Signed-off-by: Andrei Popa <andrei.popa@i-neo.ro>
11 years agobtrfs: fix message printing
Daniel J Blueman [Mon, 7 May 2012 12:35:38 +0000 (06:35 -0600)]
btrfs: fix message printing

Fix various messages to include newline and module prefix.

Signed-off-by: Daniel J Blueman <daniel@quora.org>
11 years agoBtrfs: don't bother committing delayed inode updates when fsyncing
Josef Bacik [Tue, 25 Sep 2012 18:56:25 +0000 (14:56 -0400)]
Btrfs: don't bother committing delayed inode updates when fsyncing

We can just copy the in memory inode into the tree log directly, no sense in
updating the fs tree so we can copy it into the tree log tree.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agobtrfs: move inline function code to header file
Robin Dong [Sat, 29 Sep 2012 08:07:47 +0000 (02:07 -0600)]
btrfs: move inline function code to header file

When building btrfs from kernel code, it will report:

fs/btrfs/extent_io.h:281: warning: 'extent_buffer_page' declared inline after being called
fs/btrfs/extent_io.h:281: warning: previous declaration of 'extent_buffer_page' was here
fs/btrfs/extent_io.h:280: warning: 'num_extent_pages' declared inline after being called
fs/btrfs/extent_io.h:280: warning: previous declaration of 'num_extent_pages' was here

because of the wrong declaration of inline functions.

Signed-off-by: Robin Dong <sanbai@taobao.com>
11 years agoBtrfs: remove unnecessary IS_ERR in bio_readpage_error()
Tsutomu Itoh [Mon, 1 Oct 2012 09:07:15 +0000 (03:07 -0600)]
Btrfs: remove unnecessary IS_ERR in bio_readpage_error()

Because the value of extent_map is only a correct value or NULL,
so IS_ERR is unnecessary.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
11 years agobtrfs: remove unused function btrfs_insert_some_items()
Robin Dong [Sat, 29 Sep 2012 08:07:46 +0000 (02:07 -0600)]
btrfs: remove unused function btrfs_insert_some_items()

The function btrfs_insert_some_items() would not be called by any other functions,
so remove it.

Signed-off-by: Robin Dong <sanbai@taobao.com>
11 years agoBtrfs: don't commit instead of overcommitting
Josef Bacik [Fri, 28 Sep 2012 20:04:19 +0000 (16:04 -0400)]
Btrfs: don't commit instead of overcommitting

I don't think we have the same problem that this was supposed to fix
originally since we can allocate chunks in the enospc path now.  This code
is causing us to constantly commit the transaction as we get close to using
all of our available space in our currently allocated chunks, instead of
allocating another chunk and carrying on with life, which is not nice for
performance.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: confirmation of value is added before trace_btrfs_get_extent() is called
Tsutomu Itoh [Mon, 1 Oct 2012 09:08:37 +0000 (03:08 -0600)]
Btrfs: confirmation of value is added before trace_btrfs_get_extent() is called

We should confirm the value of extent_map before calling
trace_btrfs_get_extent() because the value of extent_map has the
possibility of NULL.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
11 years agoBtrfs: be smarter about dropping things from the tree log
Josef Bacik [Fri, 28 Sep 2012 15:56:28 +0000 (11:56 -0400)]
Btrfs: be smarter about dropping things from the tree log

When we truncate existing items in the tree log we've been searching for
each individual item and removing them.  This is unnecessary churn and
searching, just keep track of the slot we are on and how many items we need
to delete and delete them all at once.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: don't lookup csums for prealloc extents
Josef Bacik [Wed, 26 Sep 2012 15:07:06 +0000 (11:07 -0400)]
Btrfs: don't lookup csums for prealloc extents

The tree logging stuff was looking up csums to copy over for prealloc
extents which is just work we don't need to be doing.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: cache extent state when writing out dirty metadata pages
Josef Bacik [Thu, 27 Sep 2012 21:07:30 +0000 (17:07 -0400)]
Btrfs: cache extent state when writing out dirty metadata pages

Everytime we write out dirty pages we search for an offset in the tree,
convert the bits in the state, and then when we wait we search for the
offset again and clear the bits.  So for every dirty range in the io tree we
are doing 4 rb searches, which is suboptimal.  With this patch we are only
doing 2 searches for every cycle (modulo weird things happening).  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: do not hold the file extent leaf locked when adding extent item
Josef Bacik [Tue, 25 Sep 2012 19:26:16 +0000 (15:26 -0400)]
Btrfs: do not hold the file extent leaf locked when adding extent item

For some reason we unlock everything except the leaf we are on, set the path
blocking and then add the extent item for the extent we just finished
writing.  I can't for the life of me figure out why we would want to do
this, and the history doesn't really indicate that there was a real reason
for it, so just remove it.  This will reduce our tree lock contention on
heavy writes.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: do not async metadata csumming in certain situations
Josef Bacik [Tue, 25 Sep 2012 18:25:58 +0000 (14:25 -0400)]
Btrfs: do not async metadata csumming in certain situations

There are a coule scenarios where farming metadata csumming off to an async
thread doesn't help.  The first is if our processor supports crc32c, in
which case the csumming will be fast and so the overhead of the async model
is not worth the cost.  The other case is for our tree log.  We will be
making that stuff dirty and writing it out and waiting for it immediately.
Even with software crc32c this gives me a ~15% increase in speed with O_SYNC
workloads.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agobtrfs: fix min csum item size warnings in 32bit
Zach Brown [Thu, 20 Sep 2012 20:33:00 +0000 (14:33 -0600)]
btrfs: fix min csum item size warnings in 32bit

commit 7ca4be45a0255ac8f08c05491c6add2dd87dd4f8 limited csum items to
PAGE_CACHE_SIZE.  It used min() with incompatible types in 32bit which
generates warnings:

fs/btrfs/file-item.c: In function â€˜btrfs_csum_file_blocks’:
fs/btrfs/file-item.c:717: warning: comparison of distinct pointer types lacks a cast

This uses min_t(u32,) to fix the warnings.  u32 seemed reasonable
because btrfs_root->leafsize is u32 and PAGE_CACHE_SIZE is unsigned
long.

Signed-off-by: Zach Brown <zab@zabbo.net>
11 years agoBtrfs: run delayed refs first when out of space
Josef Bacik [Mon, 24 Sep 2012 17:42:00 +0000 (13:42 -0400)]
Btrfs: run delayed refs first when out of space

Running delayed refs is faster than running delalloc, so lets do that first
to try and reclaim space.  This makes my fs_mark test about 20% faster.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
11 years agoBtrfs: fix orphan transaction on the freezed filesystem
Miao Xie [Thu, 20 Sep 2012 07:54:00 +0000 (01:54 -0600)]
Btrfs: fix orphan transaction on the freezed filesystem

With the following debug patch:

 static int btrfs_freeze(struct super_block *sb)
 {
+  struct btrfs_fs_info *fs_info = btrfs_sb(sb);
+ struct btrfs_transaction *trans;
+
+ spin_lock(&fs_info->trans_lock);
+ trans = fs_info->running_transaction;
+ if (trans) {
+ printk("Transid %llu, use_count %d, num_writer %d\n",
+ trans->transid, atomic_read(&trans->use_count),
+ atomic_read(&trans->num_writers));
+ }
+ spin_unlock(&fs_info->trans_lock);
  return 0;
 }

I found there was a orphan transaction after the freeze operation was done.

It is because the transaction may not be committed when the transaction handle
end even though it is the last handle of the current transaction. This design
avoid committing the transaction frequently, but also introduce the above
problem.

So I add btrfs_attach_transaction() which can catch the current transaction
and commit it. If there is no transaction, it will return ENOENT, and do not
anything.

This function also can be used to instead of btrfs_join_transaction_freeze()
because it don't increase the writer counter and don't start a new transaction,
so it also can fix the deadlock between sync and freeze.

Besides that, it is used to instead of btrfs_join_transaction() in
transaction_kthread(), because if there is no transaction, the transaction
kthread needn't anything.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
11 years agoBtrfs: add a type field for the transaction handle
Miao Xie [Thu, 20 Sep 2012 07:51:59 +0000 (01:51 -0600)]
Btrfs: add a type field for the transaction handle

This patch add a type field into the transaction handle structure,
in this way, we needn't implement various end-transaction functions
and can make the code more simple and readable.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
11 years agoBtrfs: fix memory leak in start_transaction()
Miao Xie [Thu, 20 Sep 2012 04:14:29 +0000 (22:14 -0600)]
Btrfs: fix memory leak in start_transaction()

This patch fixes memory leak of the transaction handle which happened
when starting transaction failed on a freezed fs.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
11 years agobtrfs: extended inode ref iteration
Mark Fasheh [Wed, 8 Aug 2012 18:33:54 +0000 (11:33 -0700)]
btrfs: extended inode ref iteration

The iterate_irefs in backref.c is used to build path components from inode
refs. This patch adds code to iterate extended refs as well.

I had modify the callback function signature to abstract out some of the
differences between ref structures. iref_to_path() also needed similar
changes.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
11 years agobtrfs: extended inode refs
Mark Fasheh [Wed, 8 Aug 2012 18:32:27 +0000 (11:32 -0700)]
btrfs: extended inode refs

This patch adds basic support for extended inode refs. This includes support
for link and unlink of the refs, which basically gets us support for rename
as well.

Inode creation does not need changing - extended refs are only added after
the ref array is full.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
11 years agoALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)
David Henningsson [Tue, 9 Oct 2012 10:48:40 +0000 (12:48 +0200)]
ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)

Dell Latitude 5x30 and 6x30 series of machines all have
a single 4-pin headset jack. Enabling line in mode for such jack
is very confusing (you would only get mono input, and would have to
use non-standard adapters), so remove the option by default.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoMerge tag 'disintegrate-s390-20121009' of
Martin Schwidefsky [Tue, 9 Oct 2012 12:18:10 +0000 (14:18 +0200)]
Merge tag 'disintegrate-s390-20121009' of
git://git.infradead.org/users/dhowells/linux-headers

Pull UAPI patchset from David Howells:
 "Can you merge the following branch into the s390 tree please.
  This is to complete part of the UAPI disintegration for which the
  preparatory patches were pulled recently."

Conflicts:
arch/s390/include/asm/chpid.h

11 years agos390/entry: fix svc number for TIF_SYSCALL system call restart
Martin Schwidefsky [Tue, 9 Oct 2012 11:33:53 +0000 (13:33 +0200)]
s390/entry: fix svc number for TIF_SYSCALL system call restart

The load of the svc number in the TIF_SYSCALL restart path needs to be
done with an instruction that loads all 64 bits of %r1, 'lh' only loads
32 bits. If the upper half of %r1 is not zero and has the msb set,
entry64.S will try to execute an svc with a really large number.
What will be in the upper half of %r1 depends on the code generated by
gcc for the functions on the do_signal() callchain.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm,vmem: fix vmem_add_mem()/vmem_remove_range()
Heiko Carstens [Mon, 8 Oct 2012 05:54:32 +0000 (07:54 +0200)]
s390/mm,vmem: fix vmem_add_mem()/vmem_remove_range()

vmem_add_mem() should only then insert a large page if pmd_none() is true
for the specific entry. We might have a leftover from a previous mapping.
In addition make vmem_remove_range()'s page table walk code more complete
and fix a couple of potential endless loops (which can never happen :).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/vmalloc: have separate modules area
Heiko Carstens [Fri, 5 Oct 2012 14:52:18 +0000 (16:52 +0200)]
s390/vmalloc: have separate modules area

Add a special module area on top of the vmalloc area, which may be only
used for modules and bpf jit generated code.
This makes sure that inter module branches will always happen without a
trampoline and in addition having all the code within a 2GB frame is
branch prediction unit friendly.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/zcrypt: remove duplicated include from zcrypt_pcixcc.c
Wei Yongjun [Sun, 7 Oct 2012 13:28:49 +0000 (21:28 +0800)]
s390/zcrypt: remove duplicated include from zcrypt_pcixcc.c

Remove duplicated include.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
11 years agos390/css_chars: remove superfluous ifdef
Sebastian Ott [Fri, 5 Oct 2012 08:44:39 +0000 (10:44 +0200)]
s390/css_chars: remove superfluous ifdef

No need for an ifdef __KERNEL__ since css_chars.h is not exported.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/chsc: make headers usable
Sebastian Ott [Fri, 5 Oct 2012 08:43:31 +0000 (10:43 +0200)]
s390/chsc: make headers usable

Make sure that exported headers are save to be included by userspace
exploiting /dev/chsc.

Reported-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: let kernel text section always begin at 1MB
Heiko Carstens [Thu, 4 Oct 2012 15:13:44 +0000 (17:13 +0200)]
s390/mm: let kernel text section always begin at 1MB

Let the kernel text section always begin at 1MB. This allows to always have
a large frame in the identity mapping of the kernel image for beginning of
the text section, if the machine has EDAT1 support.
Moving the beginning from 64K to 1MB doesn't cost any memory, since we make
the memory between 64K and 1MB available for the page allocator.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: fix mapping of read-only kernel text section
Heiko Carstens [Thu, 4 Oct 2012 15:02:02 +0000 (17:02 +0200)]
s390/mm: fix mapping of read-only kernel text section

Within the identity mapping the kernel text section is mapped read-only.
However when mapping the first and last page of the text section we must
round upwards and downwards respectively, if only parts of a page belong
to the section.
Otherwise potential rw data can be mapped read-only. So the rounding must
be done just the other way we have it right now.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: add page table dumper
Heiko Carstens [Thu, 4 Oct 2012 12:46:12 +0000 (14:46 +0200)]
s390/mm: add page table dumper

This is more or less the same as the x86 page table dumper which was
merged four years ago: 926e5392 "x86: add code to dump the (kernel)
page tables for visual inspection by kernel developers".

We add a file at /sys/kernel/debug/kernel_page_tables for debugging
purposes so it's quite easy to see the kernel page table layout and
possible odd mappings:

---[ Identity Mapping ]---
0x0000000000000000-0x0000000000100000        1M PTE RW
---[ Kernel Image Start ]---
0x0000000000100000-0x0000000000800000        7M PMD RO
0x0000000000800000-0x00000000008a9000      676K PTE RO
0x00000000008a9000-0x0000000000900000      348K PTE RW
0x0000000000900000-0x0000000001500000       12M PMD RW
---[ Kernel Image End ]---
0x0000000001500000-0x0000000280000000    10219M PMD RW
0x0000000280000000-0x000003d280000000     3904G PUD I
---[ vmemmap Area ]---
0x000003d280000000-0x000003d288c00000      140M PTE RW
0x000003d288c00000-0x000003d300000000     1908M PMD I
0x000003d300000000-0x000003e000000000       52G PUD I
---[ vmalloc Area ]---
0x000003e000000000-0x000003e000009000       36K PTE RW
0x000003e000009000-0x000003e0000ee000      916K PTE I
0x000003e0000ee000-0x000003e000146000      352K PTE RW
0x000003e000146000-0x000003e000200000      744K PTE I
0x000003e000200000-0x000003e080000000     2046M PMD I
0x000003e080000000-0x0000040000000000      126G PUD I

This usually makes only sense for kernel developers. The output
with CONFIG_DEBUG_PAGEALLOC is not very helpful, because of the
huge number of mapped out pages, however I decided for the time
being to not add a !DEBUG_PAGEALLOC dependency.
Maybe it's helpful for somebody even with that option.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390: add support to start the kernel in 64 bit mode.
Martin Schwidefsky [Thu, 23 Aug 2012 14:18:09 +0000 (16:18 +0200)]
s390: add support to start the kernel in 64 bit mode.

Do the switch to z/Architecture (alias 64 bit) mode early in head.S.
If the machine is already running in 64 bit mode the sigp turns into
a nop. With this change it doesn't matter in which mode the kernel
is started.

Reviewd-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm,pageattr: remove superfluous EXPORT_SYMBOLs
Heiko Carstens [Mon, 1 Oct 2012 14:46:12 +0000 (16:46 +0200)]
s390/mm,pageattr: remove superfluous EXPORT_SYMBOLs

Remove some EXPORT_SYMBOLs. There is no module code anywhere
which calls these pageattr functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm,pageattr: add more page table walk sanity checks
Heiko Carstens [Mon, 1 Oct 2012 14:18:46 +0000 (16:18 +0200)]
s390/mm,pageattr: add more page table walk sanity checks

The current page table walk code in pageattr.c only checks for large pages
while walking the kernel page table, but happily assumes that everything
else is just fine.
Add more checks so we never access invalid memory regions.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: fix pmd_huge() usage for kernel mapping
Heiko Carstens [Mon, 1 Oct 2012 10:58:34 +0000 (12:58 +0200)]
s390/mm: fix pmd_huge() usage for kernel mapping

pmd_huge() will always return 0 on !HUGETLBFS, however we use that helper
function when walking the kernel page tables to decide if we have a
1MB page frame or not.
Since we create 1MB frames for the kernel 1:1 mapping independently of
HUGETLBFS this can lead to incorrect storage accesses since the code
can assume that we have a pointer to a page table instead of a pointer
to a 1MB frame.

Fix this by adding a pmd_large() primitive like other architectures have
it already and remove all references to HUGETLBFS/HUGETLBPAGE from the
code that walks kernel page tables.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/dcssblk: cleanup device attribute usage
Sebastian Ott [Mon, 1 Oct 2012 07:12:01 +0000 (09:12 +0200)]
s390/dcssblk: cleanup device attribute usage

Let the driver core handle device attribute creation and removal. This
will simplify the code and eliminates races between attribute
availability and userspace notification via uevents.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/mm: use pfmf instruction to initialize storage keys
Heiko Carstens [Thu, 27 Sep 2012 08:45:06 +0000 (10:45 +0200)]
s390/mm: use pfmf instruction to initialize storage keys

Make use of the pfmf instruction, if available, to initialize storage keys
of whole 1MB or 2GB frames instead of initializing every single page with
the sske instruction.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agos390/facilities: cleanup PFMF and HPAGE machine facility detection
Heiko Carstens [Fri, 28 Sep 2012 13:06:41 +0000 (15:06 +0200)]
s390/facilities: cleanup PFMF and HPAGE machine facility detection

MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE actually have the same semantics:
the cpu has the EDAT1 facility installed in zArch mode. So remove one
of the feature flags in machine_flags and rename the other one to EDAT1.

The two old macros simply get mapped to MACHINE_HAS_EDAT1.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 years agoFix staging driver use of VM_RESERVED
Linus Torvalds [Tue, 9 Oct 2012 12:06:41 +0000 (21:06 +0900)]
Fix staging driver use of VM_RESERVED

The VM_RESERVED flag was killed off in commit 314e51b9851b ("mm: kill
vma flag VM_RESERVED and mm->reserved_vm counter"), and replaced by the
proper semantic flags (eg "don't core-dump" etc).  But there was a new
use of VM_RESERVED that got missed by the merge.

Fix the remaining use of VM_RESERVED in the vfio_pci driver, replacing
the VM_RESERVED flag with VM_DONTEXPAND | VM_DONTDUMP.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation,org>
11 years agoARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels
Russell King [Tue, 9 Oct 2012 10:13:26 +0000 (11:13 +0100)]
ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels

Michael Olbrich reported that his test program fails when built with
-O2 -mcpu=cortex-a8 -mfpu=neon, and a kernel which supports v6 and v7
CPUs:

volatile int x = 2;
volatile int64_t y = 2;

int main() {
volatile int a = 0;
volatile int64_t b = 0;
while (1) {
a = (a + x) % (1 << 30);
b = (b + y) % (1 << 30);
assert(a == b);
}
}

and two instances are run.  When built for just v7 CPUs, this program
works fine.  It uses the "vadd.i64 d19, d18, d16" VFP instruction.

It appears that we do not save the high-16 double VFP registers across
context switches when the kernel is built for v6 CPUs.  Fix that.

Cc: <stable@vger.kernel.org>
Tested-By: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7549/1: HYP: fix boot on some ARM1136 cores
Marc Zyngier [Sat, 6 Oct 2012 16:03:17 +0000 (17:03 +0100)]
ARM: 7549/1: HYP: fix boot on some ARM1136 cores

It appears that performing a "movs pc, lr" to force the kernel into
SVC mode on the OMAP2420 (ARM1136) prevents the platform from booting
correctly (change introduced in 80c59da [ARM: virt: allow the kernel
to be entered in HYP mode]).

While the reason it fails is not understood yet (the same code runs
fine on the OMAP2430, ARM1136 as well), partially revert that change
for platforms that do not enter in HYP mode, preserving the new
feature and restoring a working kernel on the OMAP2420.

Reported-by: Tony Lindgren <tony@atomide.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoe1000e: add device IDs for i218
Bruce Allan [Tue, 9 Oct 2012 01:11:26 +0000 (01:11 +0000)]
e1000e: add device IDs for i218

i218 is the next-generation LOM that will be available on systems with the
Lynx Point LP Platform Controller Hub (PCH) chipset from Intel.  This patch
provides the initial support of those devices.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbe/ixgbevf: Limit maximum jumbo frame size to 9.5K to avoid Tx hangs
Alexander Duyck [Wed, 22 Aug 2012 02:04:37 +0000 (02:04 +0000)]
ixgbe/ixgbevf: Limit maximum jumbo frame size to 9.5K to avoid Tx hangs

This change limits the PF/VF driver to 9.5K max jumbo frame size in order
prevent a possible Tx hang in the adapter when sending frames between
pools.

All of the parts in ixgbe support a maximum frame of 15.5K for standard
traffic, however with SR-IOV or DCB enabled they should be limiting the
MTU size to 9.5K.  Instead of adding extra checks which would have to
change the MTU when we go into or out of these modes it is preferred to
just use a standard 9.5K MTU limit for all modes so that this extra
overhead can be avoided.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Set the netdev number of Tx queues
Greg Rose [Wed, 3 Oct 2012 00:57:23 +0000 (00:57 +0000)]
ixgbevf: Set the netdev number of Tx queues

The driver was not setting the number of real Tx queues in the net_device
structure.  This caused some serious issues such as Tx hangs and extremely
poor performance with some usages of the driver.

The issue is best observed by running:

iperf -c <host> -P <n>

Where n is greater than one.  The greater the value of n the more likely
the problem is to show up.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoUAPI: (Scripted) Disintegrate include/mtd
David Howells [Tue, 9 Oct 2012 08:49:09 +0000 (09:49 +0100)]
UAPI: (Scripted) Disintegrate include/mtd

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/tc_ematch
David Howells [Tue, 9 Oct 2012 08:49:06 +0000 (09:49 +0100)]
UAPI: (Scripted) Disintegrate include/linux/tc_ematch

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/tc_act
David Howells [Tue, 9 Oct 2012 08:49:05 +0000 (09:49 +0100)]
UAPI: (Scripted) Disintegrate include/linux/tc_act

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/netfilter_ipv6
David Howells [Tue, 9 Oct 2012 08:49:01 +0000 (09:49 +0100)]
UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv6

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/netfilter_ipv4
David Howells [Tue, 9 Oct 2012 08:48:59 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv4

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/netfilter_bridge
David Howells [Tue, 9 Oct 2012 08:48:58 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/netfilter_bridge

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/netfilter_arp
David Howells [Tue, 9 Oct 2012 08:48:56 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/netfilter_arp

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/netfilter/ipset
David Howells [Tue, 9 Oct 2012 08:48:55 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/netfilter/ipset

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/netfilter
David Howells [Tue, 9 Oct 2012 08:48:54 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/netfilter

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/isdn
David Howells [Tue, 9 Oct 2012 08:48:45 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/isdn

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate include/linux/caif
David Howells [Tue, 9 Oct 2012 08:48:40 +0000 (09:48 +0100)]
UAPI: (Scripted) Disintegrate include/linux/caif

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate arch/sparc/include/asm
David Howells [Tue, 9 Oct 2012 08:47:43 +0000 (09:47 +0100)]
UAPI: (Scripted) Disintegrate arch/sparc/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoUAPI: (Scripted) Disintegrate arch/s390/include/asm
David Howells [Tue, 9 Oct 2012 08:47:31 +0000 (09:47 +0100)]
UAPI: (Scripted) Disintegrate arch/s390/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
11 years agoMerge branch 'akpm' (Andrew's patch-bomb)
Linus Torvalds [Tue, 9 Oct 2012 07:23:15 +0000 (16:23 +0900)]
Merge branch 'akpm' (Andrew's patch-bomb)

Merge patches from Andrew Morton:
 "A few misc things and very nearly all of the MM tree.  A tremendous
  amount of stuff (again), including a significant rbtree library
  rework."

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (160 commits)
  sparc64: Support transparent huge pages.
  mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd().
  mm: Add and use update_mmu_cache_pmd() in transparent huge page code.
  sparc64: Document PGD and PMD layout.
  sparc64: Eliminate PTE table memory wastage.
  sparc64: Halve the size of PTE tables
  sparc64: Only support 4MB huge pages and 8KB base pages.
  memory-hotplug: suppress "Trying to free nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning
  mm: memcg: clean up mm_match_cgroup() signature
  mm: document PageHuge somewhat
  mm: use %pK for /proc/vmallocinfo
  mm, thp: fix mlock statistics
  mm, thp: fix mapped pages avoiding unevictable list on mlock
  memory-hotplug: update memory block's state and notify userspace
  memory-hotplug: preparation to notify memory block's state at memory hot remove
  mm: avoid section mismatch warning for memblock_type_name
  make GFP_NOTRACK definition unconditional
  cma: decrease cc.nr_migratepages after reclaiming pagelist
  CMA: migrate mlocked pages
  kpageflags: fix wrong KPF_THP on non-huge compound pages
  ...