]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Thu, 19 Sep 2013 01:06:04 +0000 (11:06 +1000)]
Merge remote-tracking branch 'vfs/for-next'

Conflicts:
fs/nfs/direct.c
fs/nfs/file.c

11 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Thu, 19 Sep 2013 01:03:33 +0000 (11:03 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

11 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Thu, 19 Sep 2013 01:01:49 +0000 (11:01 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

11 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Thu, 19 Sep 2013 00:59:41 +0000 (10:59 +1000)]
Merge remote-tracking branch 'logfs/master'

11 years agoMerge remote-tracking branch 'jfs/jfs-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:58:01 +0000 (10:58 +1000)]
Merge remote-tracking branch 'jfs/jfs-next'

11 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Thu, 19 Sep 2013 00:56:20 +0000 (10:56 +1000)]
Merge remote-tracking branch 'gfs2/master'

11 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:54:40 +0000 (10:54 +1000)]
Merge remote-tracking branch 'fuse/for-next'

11 years agoMerge remote-tracking branch 'fscache/fscache'
Stephen Rothwell [Thu, 19 Sep 2013 00:54:36 +0000 (10:54 +1000)]
Merge remote-tracking branch 'fscache/fscache'

11 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:52:44 +0000 (10:52 +1000)]
Merge remote-tracking branch 'cifs/for-next'

11 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Thu, 19 Sep 2013 00:51:02 +0000 (10:51 +1000)]
Merge remote-tracking branch 'ceph/master'

11 years agoMerge remote-tracking branch 'aio-direct/for-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:42:30 +0000 (10:42 +1000)]
Merge remote-tracking branch 'aio-direct/for-next'

11 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Thu, 19 Sep 2013 00:40:42 +0000 (10:40 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

Conflicts:
arch/sh/kernel/cpu/sh2a/Makefile
drivers/tty/serial/sh-sci.c
include/linux/serial_sci.h

11 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Thu, 19 Sep 2013 00:38:59 +0000 (10:38 +1000)]
Merge remote-tracking branch 's390/features'

11 years agoMerge remote-tracking branch 'parisc-hd/for-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:37:18 +0000 (10:37 +1000)]
Merge remote-tracking branch 'parisc-hd/for-next'

11 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:35:36 +0000 (10:35 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

11 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Thu, 19 Sep 2013 00:35:33 +0000 (10:35 +1000)]
Merge remote-tracking branch 'ia64/next'

11 years agoMerge remote-tracking branch 'h8300-remove/h8300-remove'
Stephen Rothwell [Thu, 19 Sep 2013 00:28:28 +0000 (10:28 +1000)]
Merge remote-tracking branch 'h8300-remove/h8300-remove'

11 years agoMerge remote-tracking branch 'c6x/for-linux-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:26:50 +0000 (10:26 +1000)]
Merge remote-tracking branch 'c6x/for-linux-next'

11 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Thu, 19 Sep 2013 00:25:11 +0000 (10:25 +1000)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Thu, 19 Sep 2013 00:23:31 +0000 (10:23 +1000)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:43 +0000 (10:18 +1000)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

11 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:28 +0000 (10:18 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

11 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:25 +0000 (10:18 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

11 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:24 +0000 (10:18 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

11 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:23 +0000 (10:18 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

11 years agoMerge remote-tracking branch 'ipsec/master'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:19 +0000 (10:18 +1000)]
Merge remote-tracking branch 'ipsec/master'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:18 +0000 (10:18 +1000)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:15 +0000 (10:18 +1000)]
Merge remote-tracking branch 'm68k-current/for-linus'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Thu, 19 Sep 2013 00:18:13 +0000 (10:18 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge branch '3.12-fixes' into mips-for-linux-next
Ralf Baechle [Wed, 18 Sep 2013 22:16:46 +0000 (00:16 +0200)]
Merge branch '3.12-fixes' into mips-for-linux-next

11 years agoMIPS: PCI: Use pci_resource_to_user to map pci memory space properly
Wolfgang Grandegger [Mon, 13 Dec 2010 20:48:10 +0000 (21:48 +0100)]
MIPS: PCI: Use pci_resource_to_user to map pci memory space properly

This only matter to Alchemy platforms.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Fix start of free memory when using initrd
Greg Ungerer [Wed, 8 Sep 2010 05:50:43 +0000 (15:50 +1000)]
MIPS: Fix start of free memory when using initrd

Currently when using an initrd on a MIPS system the start of the bootmem region of
memory is set to the larger of the end of the kernel bss region (_end) or the end
of the initrd. In a typical memory layout where the initrd is at some address above
the kernel image this means that the start of the bootmem region will be the end of
the initrd. But when we are done processing/loading the initrd we have no way to
reclaim the memory region it occupied, and we lose a large chunk of now otherwise
empty RAM from our final running system.

The bootmem code is designed to allow this initrd to be reserved (and the code in
finalize_initrd() currently does this). When the initrd is finally processed/loaded
its reserved memory is freed.

Fix the setting of the start of the bootmem map to be the end of the kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1574/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Quiet the building output of vmlinux.32 and vmlinux.64
Wu Zhangjin [Tue, 9 Nov 2010 16:26:34 +0000 (00:26 +0800)]
MIPS: Quiet the building output of vmlinux.32 and vmlinux.64

Based on quiet_cmd_X and cmd_X, this patch quiets the building output of
vmlinux.32 and vmlinux.64.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Sam Ravnborg <sam@ravnborg.org>
Patchwork: https://patchwork.linux-mips.org/patch/1766/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Panic messages should not end in \n.
Ralf Baechle [Wed, 18 Sep 2013 14:05:26 +0000 (16:05 +0200)]
MIPS: Panic messages should not end in \n.

Panic() is going to add a \n itself and it's annoying if a panic message rolls
of the screen on a device with no scrollback.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Use NUMA_NO_NODE instead of -1 for node ID.
Ralf Baechle [Wed, 18 Sep 2013 12:54:37 +0000 (14:54 +0200)]
MIPS: Use NUMA_NO_NODE instead of -1 for node ID.

Original patch by Jianguo Wu <wujianguo@huawei.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: of/pci: Use of_pci_range_parser
Andrew Murray [Thu, 25 Jul 2013 16:14:25 +0000 (17:14 +0100)]
MIPS: of/pci: Use of_pci_range_parser

This patch converts the pci_load_of_ranges function to use the new common
of_pci_range_parser.

Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: jason@lakedaemon.net
Patchwork: https://patchwork.linux-mips.org/patch/5625/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: BCM47XX: Fix detected clock on Asus WL520GC and WL520GU
Hauke Mehrtens [Wed, 18 Sep 2013 11:33:00 +0000 (13:33 +0200)]
MIPS: BCM47XX: Fix detected clock on Asus WL520GC and WL520GU

The Asus WL520GC and WL520GU are based on the BCM5354 and clocked at
200MHz, but they do not have a clkfreq nvram variable set to the
correct value. This adds a workaround for these devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5843/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: BCM47XX: Fix clock detection for BCM5354 with 200MHz clock
Hauke Mehrtens [Wed, 18 Sep 2013 11:32:59 +0000 (13:32 +0200)]
MIPS: BCM47XX: Fix clock detection for BCM5354 with 200MHz clock

Some BCM5354 SoCs are running at 200MHz, but it is not possible to read
the clock from a register like it is done on some other SoC in ssb and
bcma. These devices should have a clkfreq nvram configuration value set
to 200, read it and set the clock to the correct value.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5842/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: BCM47XX: Get GPIO pin from nvram configuration
Hauke Mehrtens [Wed, 18 Sep 2013 11:31:15 +0000 (13:31 +0200)]
MIPS: BCM47XX: Get GPIO pin from nvram configuration

The nvram contains some gpio configuration for boards. It is stored in
a gpio<number>=name format e.g.
gpio8=wps_button
gpio4=robo_reset

This patches adds a function to parse these entries, so other driver
can use it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5841/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: BCM47XX: Print board name in /proc/cpuinfo
Hauke Mehrtens [Wed, 18 Sep 2013 11:29:58 +0000 (13:29 +0200)]
MIPS: BCM47XX: Print board name in /proc/cpuinfo

Do not print the constant system type "Broadcom BCM47XX" but print the
name of the actual SoC in use and the detected board.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5839/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoInput: i8042 - i8042_flush fix for a full 8042 buffer
Andrey Moiseev [Mon, 16 Sep 2013 22:17:31 +0000 (15:17 -0700)]
Input: i8042 - i8042_flush fix for a full 8042 buffer

When 8042 internal data buffer is full, the driver
erroneously decides that the controller is not present.

i8042_flush returns the number of flushed bytes, which is
in 0 - I8042_BUFFER_SIZE range inclusive. Therefore, i8042_flush
has no way to indicate an error. Moreover i8042_controller_check
takes initially full buffer (i8042_flush returned
I8042_BUFFER_SIZE) as a sign of absence of the controller.

Let's change i8042 to return success/error instead and make sure
we do not return error prematurely.

Signed-off-by: Andrey Moiseev <o2g.org.ru@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoMIPS: BCM47XX: Add board detection
Hauke Mehrtens [Wed, 18 Sep 2013 11:29:57 +0000 (13:29 +0200)]
MIPS: BCM47XX: Add board detection

Detect on which board this code is running based on some nvram
settings. This is needed to start board specific workarounds and
configure the leds and buttons which are on different gpios on every board.

This patches add some boards we have seen, but there are many more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5840
Patchwork: https://patchwork.linux-mips.org/patch/5855/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Kconfig: CMP support needs to select SMP as well
Markos Chandras [Fri, 6 Sep 2013 09:47:26 +0000 (10:47 +0100)]
MIPS: Kconfig: CMP support needs to select SMP as well

The CMP code is only designed to work with SMP configurations.
Fixes multiple build problems on certain randconfigs:

In file included from arch/mips/kernel/smp-cmp.c:34:0:
arch/mips/include/asm/smp.h:28:0:
error: "raw_smp_processor_id" redefined [-Werror]

In file included from include/linux/sched.h:30:0,
from arch/mips/kernel/smp-cmp.c:22:
include/linux/smp.h:135:0: note: this is the location of the
previous definition

In file included from arch/mips/kernel/smp-cmp.c:34:0:
arch/mips/include/asm/smp.h:57:20:
error: redefinition of 'smp_send_reschedule'

In file included from include/linux/sched.h:30:0,
from arch/mips/kernel/smp-cmp.c:22:
include/linux/smp.h:179:20: note: previous
definition of 'smp_send_reschedule' was here

In file included from arch/mips/kernel/smp-cmp.c:34:0:
arch/mips/include/asm/smp.h: In function 'smp_send_reschedule':
arch/mips/include/asm/smp.h:61:8:
error: dereferencing pointer to incomplete type
[...]

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/5812/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT
Jayachandran C [Sun, 11 Aug 2013 11:40:17 +0000 (17:10 +0530)]
MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT

Allow usage of scratch register for current pgd even when
MIPS_PGD_C0_CONTEXT is not configured. MIPS_PGD_C0_CONTEXT is set
for 64r2 platforms to indicate availability of Xcontext for saving
cpuid, thus freeing Context to be used for saving PGD. This option
was also tied to using a scratch register for storing PGD.

This commit will allow usage of scratch register to store the current
pgd if one can be allocated for the platform, even when
MIPS_PGD_C0_CONTEXT is not set. The cpuid will be kept in the CP0
Context register in this case.

The code to store the current pgd for the TLB miss handler is now
generated in all cases. When scratch register is available, the PGD
is also stored in the scratch register.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5709/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoRevert "MIPS: tlbex: Guard tlbmiss_handler_setup_pgd"
Ralf Baechle [Wed, 18 Sep 2013 10:54:24 +0000 (12:54 +0200)]
Revert "MIPS: tlbex: Guard tlbmiss_handler_setup_pgd"

This reverts commit 774b6175f8f6547e2e7d4cf8b5fa60a01f39b03e.

This is would cause build errors with the next patch that I'm about to
apply.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: 74K/1074K: Correct erratum workaround.
Maciej W. Rozycki [Wed, 18 Sep 2013 18:08:15 +0000 (19:08 +0100)]
MIPS: 74K/1074K: Correct erratum workaround.

Make sure 74K revision numbers are not applied to the 1074K.  Also catch
invalid usage.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5857/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Cleanup CP0 PRId and CP1 FPIR register access masks
Maciej W. Rozycki [Tue, 17 Sep 2013 15:58:10 +0000 (16:58 +0100)]
MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks

Replace hardcoded CP0 PRId and CP1 FPIR register access masks throughout.
The change does not touch places that use shifted or partial masks.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5838/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMerge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl...
Linus Torvalds [Wed, 18 Sep 2013 17:39:40 +0000 (12:39 -0500)]
Merge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

Pull pstore/compression fixes from Tony Luck:
 "Three pstore fixes related to compression:
   1) Better adjustment of size of compression buffer (was too big for
      EFIVARS backend resulting in compression failure
   2) Use zlib_inflateInit2 instead of zlib_inflateInit
   3) Don't print messages about compression failure.  They will waste
      space that may better be used to log console output leading to the
      crash"

* tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  pstore: Remove the messages related to compression failure
  pstore: Use zlib_inflateInit2 instead of zlib_inflateInit
  pstore: Adjust buffer size for compression for smaller registered buffers

11 years agoMIPS: Remove useless comment about kprobe from arch/mips/Makefile
Wu Zhangjin [Tue, 9 Nov 2010 16:25:53 +0000 (00:25 +0800)]
MIPS: Remove useless comment about kprobe from arch/mips/Makefile

The commit c1bf207d6ee1eb72e9c10365edbdc7c9ff7fb9b0 (kernel.org) rsp.
58e9ad32a48dce37ffeea912f55bd1c94b85ad7f (lmo) [MIPS: kprobe: Add support]
introduced a useless comment.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <ddaney@caviumnetworks.com>
Patchwork: https://patchwork.linux-mips.org/patch/1765/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agonet:dccp: do not report ICMP redirects to user space
Duan Jiong [Wed, 18 Sep 2013 12:03:27 +0000 (20:03 +0800)]
net:dccp: do not report ICMP redirects to user space

DCCP shouldn't be setting sk_err on redirects as it
isn't an error condition. it should be doing exactly
what tcp is doing and leaving the error handler without
touching the socket.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:26:17 +0000 (11:26 -0500)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/intel/lpss: Add pin control support to Intel low power subsystem
  perf/x86/intel: Mark MEM_LOAD_UOPS_MISS_RETIRED as precise on SNB
  x86: Remove now-unused save_rest()
  x86/smpboot: Fix announce_cpu() to printk() the last "OK" properly

11 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:24:49 +0000 (11:24 -0500)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "An NTP related lockup fix"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Fix HRTICK related deadlock from ntp lock changes

11 years agocnic: Fix crash in cnic_bnx2x_service_kcq()
Michael Chan [Wed, 18 Sep 2013 08:50:39 +0000 (01:50 -0700)]
cnic: Fix crash in cnic_bnx2x_service_kcq()

commit 104a43edb264321a4d41850e98153b4fa8a9ef42
    cnic: Use CHIP_NUM macros from bnx2x.h

changed the code to use the bnx2x macro NO_FCOE() to determine if FCoE
is supported or not.  There is another place in cnic that is still using
the old method to determine if FCoE is supported or not.  The 2 methods
may not yield the same result after the network interface is brought down
and up.  This will cause the crash as cnic_bnx2x_service_kcq() will access
the uninitialized cp->kcq2.

The fix is to consistently use the same macro CNIC_SUPPORTS_FCOE() which
uses the bnx2x NO_FCOE() macro.  As a follow-up, we can clean up the code
to remove the old method as it is no longer needed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions.
Michael Chan [Wed, 18 Sep 2013 08:50:38 +0000 (01:50 -0700)]
bnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions.

commit b9871bcfd211d316adee317608dab44c58d6ea2d
    bnx2x: VF RSS support - PF side

changed the configuration of the doorbell HW and it broke iSCSI and FCoE.
We fix this by making compatible changes to the doorbell address in bnx2i
and bnx2fc.  For the userspace driver, we need to pass a modified CID
so that the existing userspace driver will calculate the correct doorbell
address and continue to work.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:23:32 +0000 (11:23 -0500)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Misc fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix comment for sched_info_depart
  sched/Documentation: Update sched-design-CFS.txt documentation
  sched/debug: Take PID namespace into account
  sched/fair: Fix small race where child->se.parent,cfs_rq might point to invalid ones

11 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:22:53 +0000 (11:22 -0500)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Two small fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix UAPI export of PERF_EVENT_IOC_ID
  perf/x86/intel: Fix Silvermont offcore masks

11 years agoMerge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Wed, 18 Sep 2013 16:22:17 +0000 (12:22 -0400)]
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge

Included change:
- fix the Bridge Loop Avoidance component by marking the variables containing
  the VLAN ID with the HAS_TAG flag when needed.

11 years agoc6x: remove unused parameter in Kconfig
Michael Opdenacker [Tue, 17 Sep 2013 03:21:29 +0000 (05:21 +0200)]
c6x: remove unused parameter in Kconfig

This patch proposes to remove the TMS320C6X_CACHES_ON kernel configuration
parameter defined in arch/c6x/Kconfig, but used nowhere
in the makefiles and source code.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Acked by: Mark Salter <msalter@redhat.com>

11 years agocifs: stop trying to use virtual circuits
Jeff Layton [Mon, 16 Sep 2013 15:23:45 +0000 (11:23 -0400)]
cifs: stop trying to use virtual circuits

Currently, we try to ensure that we use vcnum of 0 on the first
established session on a connection and then try to use a different
vcnum on each session after that.

This is a little odd, since there's no real reason to use a different
vcnum for each SMB session. I can only assume there was some confusion
between SMB sessions and VCs. That's somewhat understandable since they
both get created during SESSION_SETUP, but the documentation indicates
that they are really orthogonal. The comment on max_vcs in particular
looks quite misguided. An SMB session is already uniquely identified
by the SMB UID value -- there's no need to again uniquely ID with a
VC.

Furthermore, a vcnum of 0 is a cue to the server that it should release
any resources that were previously held by the client. This sounds like
a good thing, until you consider that:

a) it totally ignores the fact that other programs on the box (e.g.
smbclient) might have connections established to the server. Using a
vcnum of 0 causes them to get kicked off.

b) it causes problems with NAT. If several clients are connected to the
same server via the same NAT'ed address, whenever one connects to the
server it kicks off all the others, which then reconnect and kick off
the first one...ad nauseum.

I don't see any reason to ignore the advice in "Implementing CIFS" which
has a comprehensive treatment of virtual circuits. In there, it states
"...and contrary to the specs the client should always use a VcNumber of
one, never zero."

Have the client just use a hardcoded vcnum of 1, and stop abusing the
special behavior of vcnum 0.

Reported-by: Sauron99@gmx.de <sauron99@gmx.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
11 years agoRPCSEC_GSS: fix crash on destroying gss auth
J. Bruce Fields [Wed, 18 Sep 2013 15:16:03 +0000 (11:16 -0400)]
RPCSEC_GSS: fix crash on destroying gss auth

This fixes a regression since  eb6dc19d8e72ce3a957af5511d20c0db0a8bd007
"RPCSEC_GSS: Share all credential caches on a per-transport basis" which
could cause an occasional oops in the nfsd code (see below).

The problem was that an auth was left referencing a client that had been
freed.  To avoid this we need to ensure that auths are shared only
between descendants of a common client; the fact that a clone of an
rpc_client takes a reference on its parent then ensures that the parent
client will last as long as the auth.

Also add a comment explaining what I think was the intention of this
code.

  general protection fault: 0000 [#1] PREEMPT SMP
  Modules linked in: rpcsec_gss_krb5 nfsd auth_rpcgss oid_registry nfs_acl lockd sunrpc
  CPU: 3 PID: 4071 Comm: kworker/u8:2 Not tainted 3.11.0-rc2-00182-g025145f #1665
  Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
  Workqueue: nfsd4_callbacks nfsd4_do_callback_rpc [nfsd]
  task: ffff88003e206080 ti: ffff88003c384000 task.ti: ffff88003c384000
  RIP: 0010:[<ffffffffa00001f3>]  [<ffffffffa00001f3>] rpc_net_ns+0x53/0x70 [sunrpc]
  RSP: 0000:ffff88003c385ab8  EFLAGS: 00010246
  RAX: 6b6b6b6b6b6b6b6b RBX: ffff88003af9a800 RCX: 0000000000000002
  RDX: ffffffffa00001a5 RSI: 0000000000000001 RDI: ffffffff81e284e0
  RBP: ffff88003c385ad8 R08: 0000000000000001 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000015 R12: ffff88003c990840
  R13: ffff88003c990878 R14: ffff88003c385ba8 R15: ffff88003e206080
  FS:  0000000000000000(0000) GS:ffff88003fd80000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 00007fcdf737e000 CR3: 000000003ad2b000 CR4: 00000000000006e0
  Stack:
   ffffffffa00001a5 0000000000000006 0000000000000006 ffff88003af9a800
   ffff88003c385b08 ffffffffa00d52a4 ffff88003c385ba8 ffff88003c751bd8
   ffff88003c751bc0 ffff88003e113600 ffff88003c385b18 ffffffffa00d530c
  Call Trace:
   [<ffffffffa00001a5>] ? rpc_net_ns+0x5/0x70 [sunrpc]
   [<ffffffffa00d52a4>] __gss_pipe_release+0x54/0x90 [auth_rpcgss]
   [<ffffffffa00d530c>] gss_pipe_free+0x2c/0x30 [auth_rpcgss]
   [<ffffffffa00d678b>] gss_destroy+0x9b/0xf0 [auth_rpcgss]
   [<ffffffffa000de63>] rpcauth_release+0x23/0x30 [sunrpc]
   [<ffffffffa0001e81>] rpc_release_client+0x51/0xb0 [sunrpc]
   [<ffffffffa00020d5>] rpc_shutdown_client+0xe5/0x170 [sunrpc]
   [<ffffffff81098a14>] ? cpuacct_charge+0xa4/0xb0
   [<ffffffff81098975>] ? cpuacct_charge+0x5/0xb0
   [<ffffffffa019556f>] nfsd4_process_cb_update.isra.17+0x2f/0x210 [nfsd]
   [<ffffffff819a4ac0>] ? _raw_spin_unlock_irq+0x30/0x60
   [<ffffffff819a4acb>] ? _raw_spin_unlock_irq+0x3b/0x60
   [<ffffffff810703ab>] ? process_one_work+0x15b/0x510
   [<ffffffffa01957dd>] nfsd4_do_callback_rpc+0x8d/0xa0 [nfsd]
   [<ffffffff8107041e>] process_one_work+0x1ce/0x510
   [<ffffffff810703ab>] ? process_one_work+0x15b/0x510
   [<ffffffff810712ab>] worker_thread+0x11b/0x370
   [<ffffffff81071190>] ? manage_workers.isra.24+0x2b0/0x2b0
   [<ffffffff8107854b>] kthread+0xdb/0xe0
   [<ffffffff819a4ac0>] ? _raw_spin_unlock_irq+0x30/0x60
   [<ffffffff81078470>] ? __init_kthread_worker+0x70/0x70
   [<ffffffff819ac7dc>] ret_from_fork+0x7c/0xb0
   [<ffffffff81078470>] ? __init_kthread_worker+0x70/0x70
  Code: a5 01 00 a0 31 d2 31 f6 48 c7 c7 e0 84 e2 81 e8 f4 91 0a e1 48 8b 43 60 48 c7 c2 a5 01 00 a0 be 01 00 00 00 48 c7 c7 e0 84 e2 81 <48> 8b 98 10 07 00 00 e8 91 8f 0a e1 e8
  +3c 4e 07 e1 48 83 c4 18
  RIP  [<ffffffffa00001f3>] rpc_net_ns+0x53/0x70 [sunrpc]
   RSP <ffff88003c385ab8>

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoCIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them
David Howells [Wed, 4 Sep 2013 17:10:39 +0000 (17:10 +0000)]
CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them

In cifs_readpages(), we may decide we don't want to read a page after all -
but the page may already have passed through fscache_read_or_alloc_pages() and
thus have marks and reservations set.  Thus we have to call
fscache_readpages_cancel() or fscache_uncache_page() on the pages we're
returning to clear the marks.

NFS, AFS and 9P should be unaffected by this as they call read_cache_pages()
which does the cleanup for you.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
11 years agotmpfs: add support for read_iter and write_iter
Hugh Dickins [Fri, 14 Jun 2013 20:54:30 +0000 (15:54 -0500)]
tmpfs: add support for read_iter and write_iter

Convert tmpfs do_shmem_file_read() to shmem_file_read_iter().
Make file_read_iter_actor() global so tmpfs can use it too: delete
file_read_actor(), which was made global in 2.4.4 for use by tmpfs.
Replace tmpfs generic_file_aio_write() by generic_file_write_iter().

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
11 years agoubifs: convert file ops from aio_read/write to read/write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:29 +0000 (15:54 -0500)]
ubifs: convert file ops from aio_read/write to read/write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mtd@lists.infradead.org
11 years agoecrpytfs: Convert aio_read/write ops to read/write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:29 +0000 (15:54 -0500)]
ecrpytfs: Convert aio_read/write ops to read/write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Dustin Kirkland <dustin.kirkland@gazzang.com>
Cc: ecryptfs@vger.kernel.org
11 years agoafs: add support for read_iter and write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:28 +0000 (15:54 -0500)]
afs: add support for read_iter and write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org
11 years agoudf: convert file ops from aio_read/write to read/write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:27 +0000 (15:54 -0500)]
udf: convert file ops from aio_read/write to read/write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Jan Kara <jack@suse.cz>
11 years agogfs2: Convert aio_read/write ops to read/write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:27 +0000 (15:54 -0500)]
gfs2: Convert aio_read/write ops to read/write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: cluster-devel@redhat.com
11 years agoxfs: add support for read_iter and write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:26 +0000 (15:54 -0500)]
xfs: add support for read_iter and write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Cc: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>
Cc: xfs@oss.sgi.com
11 years agoblock_dev: add support for read_iter, write_iter
Asias He [Fri, 14 Jun 2013 20:54:26 +0000 (15:54 -0500)]
block_dev: add support for read_iter, write_iter

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
11 years agobtrfs: add support for read_iter and write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:25 +0000 (15:54 -0500)]
btrfs: add support for read_iter and write_iter

btrfs can use generic_file_read_iter(). Base btrfs_file_write_iter()
on btrfs_file_aio_write(), then have the latter call the former.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
11 years agonfs: simplify swap
Dave Kleikamp [Fri, 14 Jun 2013 20:54:24 +0000 (15:54 -0500)]
nfs: simplify swap

swap_writepage can now call nfs's write_iter f_op, eliminating the need to
implement for the special-case direct_IO a_op. There is no longer a need to
pass the uio flag through the direct write path.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
11 years agonfs: add support for read_iter, write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:23 +0000 (15:54 -0500)]
nfs: add support for read_iter, write_iter

This patch implements the read_iter and write_iter file operations which
allow kernel code to initiate directIO. This allows the loop device to
read and write directly to the server, bypassing the page cache.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
11 years agoext4: add support for read_iter and write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:22 +0000 (15:54 -0500)]
ext4: add support for read_iter and write_iter

use the generic_file_read_iter(), create ext4_file_write_iter() based on
ext4_file_write(), and make ext4_file_write() a wrapper around
ext4_file_write_iter().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-ext4@vger.kernel.org
11 years agoocfs2: add support for read_iter and write_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:22 +0000 (15:54 -0500)]
ocfs2: add support for read_iter and write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Zach Brown <zab@zabbo.net>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: ocfs2-devel@oss.oracle.com
11 years agofs: add read_iter and write_iter to several file systems
Dave Kleikamp [Fri, 14 Jun 2013 20:54:21 +0000 (15:54 -0500)]
fs: add read_iter and write_iter to several file systems

These are the simple ones.

File systems that use generic_file_aio_read() and generic_file_aio_write()
can trivially support generic_file_read_iter() and generic_file_write_iter().

This patch adds those file_operations for 9p, adfs, affs, bfs, exofs, ext2,
ext3, fat, f2fs, hfs, hfsplus, hostfs, hpfs, jfs, jffs2, logfs, minix, nilfs2,
omfs, ramfs, reiserfs, romfs, sysv, and ufs.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Zach Brown <zab@zabbo.net>
11 years agofs: use read_iter and write_iter rather than aio_read and aio_write
Dave Kleikamp [Fri, 14 Jun 2013 20:54:21 +0000 (15:54 -0500)]
fs: use read_iter and write_iter rather than aio_read and aio_write

File systems implementing read_iter & write_iter should not be required
to keep aio_read and aio_write as well. The vfs should always call
read/write_iter if they exist. This will make it easier to remove the
aio_read/write operation in the future.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
11 years agofs: create file_readable() and file_writable() functions
Dave Kleikamp [Fri, 14 Jun 2013 20:54:20 +0000 (15:54 -0500)]
fs: create file_readable() and file_writable() functions

Create functions to simplify if file_ops contain either a read
or aio_read op, or likewise write or aio_write. We will be adding
read_iter and write_iter and don't need to be complicating the code
in multiple places.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoloop: use aio to perform io on the underlying file
Zach Brown [Fri, 14 Jun 2013 20:54:19 +0000 (15:54 -0500)]
loop: use aio to perform io on the underlying file

This uses the new kernel aio interface to process loopback IO by
submitting concurrent direct aio.  Previously loop's IO was serialized
by synchronous processing in a thread.

The aio operations specify the memory for the IO with the bio_vec arrays
directly instead of mappings of the pages.

The use of aio operations is enabled when the backing file supports the
read_iter, write_iter and direct_IO methods.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agobio: add bvec_length(), like iov_length()
Zach Brown [Fri, 14 Jun 2013 20:54:19 +0000 (15:54 -0500)]
bio: add bvec_length(), like iov_length()

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoaio: add aio support for iov_iter arguments
Dave Kleikamp [Fri, 14 Jun 2013 20:54:18 +0000 (15:54 -0500)]
aio: add aio support for iov_iter arguments

This adds iocb cmds which specify that memory is held in iov_iter
structures.  This lets kernel callers specify memory that can be
expressed in an iov_iter, which includes pages in bio_vec arrays.

Only kernel callers can provide an iov_iter so it doesn't make a lot of
sense to expose the IOCB_CMD values for this as part of the user space
ABI.

But kernel callers should also be able to perform the usual aio
operations which suggests using the the existing operation namespace and
support code.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
11 years agoaio: add aio_kernel_() interface
Dave Kleikamp [Fri, 14 Jun 2013 20:54:17 +0000 (15:54 -0500)]
aio: add aio_kernel_() interface

This adds an interface that lets kernel callers submit aio iocbs without
going through the user space syscalls.  This lets kernel callers avoid
the management limits and overhead of the context.  It will also let us
integrate aio operations with other kernel apis that the user space
interface doesn't have access to.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
11 years agofs: pull iov_iter use higher up the stack
Zach Brown [Fri, 14 Jun 2013 20:54:17 +0000 (15:54 -0500)]
fs: pull iov_iter use higher up the stack

Right now only callers of generic_perform_write() pack their iovec
arguments into an iov_iter structure.  All the callers higher up in the
stack work on raw iovec arguments.

This patch introduces the use of the iov_iter abstraction higher up the
stack.  Private generic path functions are changed to operation on
iov_iter instead of on raw iovecs.  Exported interfaces that take iovecs
immediately pack their arguments into an iov_iter and call into the
shared functions.

File operation struct functions are added with iov_iter as an argument
so that callers to the generic file system functions can specify
abstract memory rather than iovec arrays only.

Almost all of this patch only transforms arguments and shouldn't change
functionality.  The buffered read path is the exception.  We add a
read_actor function which uses the iov_iter helper functions instead of
operating on each individual iovec element.  This may improve
performance as the iov_iter helper can copy multiple iovec elements from
one mapped page cache page.

As always, the direct IO path is special.  Sadly, it may still be
cleanest to have it work on the underlying memory structures directly
instead of working through the iov_iter abstraction.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agodio: add bio_vec support to __blockdev_direct_IO()
Dave Kleikamp [Fri, 14 Jun 2013 20:54:16 +0000 (15:54 -0500)]
dio: add bio_vec support to __blockdev_direct_IO()

The trick here is to initialize the dio state so that do_direct_IO()
consumes the pages we provide and never tries to map user pages.  This
is done by making sure that final_block_in_request covers the page that
we set in the dio.  do_direct_IO() will return before running out of
pages.

The caller is responsible for dirtying these pages, if needed.  We add
an option to the dio struct that makes sure we only dirty pages when
we're operating on iovecs of user addresses.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Zach Brown <zab@zabbo.net>
11 years agodio: Convert direct_IO to use iov_iter
Dave Kleikamp [Fri, 14 Jun 2013 20:54:15 +0000 (15:54 -0500)]
dio: Convert direct_IO to use iov_iter

Change the direct_IO aop to take an iov_iter argument rather than an iovec.
This will get passed down through most filesystems so that only the
__blockdev_direct_IO helper need be aware of whether user or kernel memory
is being passed to the function.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: let callers extract iovecs and bio_vecs
Zach Brown [Fri, 14 Jun 2013 20:54:14 +0000 (15:54 -0500)]
iov_iter: let callers extract iovecs and bio_vecs

direct IO treats memory from user iovecs and memory from arrays of
kernel pages very differently.  User memory is pinned and worked with in
batches while kernel pages are always pinned and don't require
additional processing.

Rather than try and provide an abstraction that includes these
different behaviours we let direct IO extract the memory structs and
hand them to the existing code.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: add a shorten call
Zach Brown [Fri, 14 Jun 2013 20:54:14 +0000 (15:54 -0500)]
iov_iter: add a shorten call

The generic direct write path wants to shorten its memory vector.  It
does this when it finds that it has to perform a partial write due to
LIMIT_FSIZE.  .direct_IO() always performs IO on all of the referenced
memory because it doesn't have an argument to specify the length of the
IO.

We add an iov_iter operation for this so that the generic path can ask
to shorten the memory vector without having to know what kind it is.
We're happy to shorten the kernel copy of the iovec array, but we refuse
to shorten the bio_vec array and return an error in this case.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: add bvec support
Zach Brown [Fri, 14 Jun 2013 20:54:13 +0000 (15:54 -0500)]
iov_iter: add bvec support

This adds a set of iov_iter_ops calls which work with memory which is
specified by an array of bio_vec structs instead of an array of iovec
structs.

The big difference is that the pages referenced by the bio_vec elements
are pinned.  They don't need to be faulted in and we can always use
kmap_atomic() to map them one at a time.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: ii_iovec_copy_to_user should pre-fault user pages
Dave Kleikamp [Fri, 14 Jun 2013 20:54:12 +0000 (15:54 -0500)]
iov_iter: ii_iovec_copy_to_user should pre-fault user pages

This duplicates the optimization in file_read_actor as a later patch
will replace it with a call to __iov_iter_copy_to_user().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: hide iovec details behind ops function pointers
Zach Brown [Fri, 14 Jun 2013 20:54:12 +0000 (15:54 -0500)]
iov_iter: hide iovec details behind ops function pointers

This moves the current iov_iter functions behind an ops struct of
function pointers.  The current iov_iter functions all work with memory
which is specified by iovec arrays of user space pointers.

This patch is part of a series that lets us specify memory with bio_vec
arrays of page pointers.  By moving to an iov_iter operation struct we
can add that support in later patches in this series by adding another
set of function pointers.

I only came to this after having initialy tried to teach the current
iov_iter functions about bio_vecs by introducing conditional branches
that dealt with bio_vecs in all the functions.  It wasn't pretty.  This
approach seems to be the lesser evil.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agofuse: convert fuse to use iov_iter_copy_[to|from]_user
Dave Kleikamp [Fri, 14 Jun 2013 20:54:11 +0000 (15:54 -0500)]
fuse: convert fuse to use iov_iter_copy_[to|from]_user

A future patch hides the internals of struct iov_iter, so fuse should
be using the supported interface.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: fuse-devel@lists.sourceforge.net
11 years agoiov_iter: add __iovec_copy_to_user()
Dave Kleikamp [Fri, 14 Jun 2013 20:54:11 +0000 (15:54 -0500)]
iov_iter: add __iovec_copy_to_user()

This patch adds __iovec_copy_to_user() which doesn't verify write access
to the user memory to be called from code where that verification has
already been done.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: add copy_to_user support
Zach Brown [Fri, 14 Jun 2013 20:54:10 +0000 (15:54 -0500)]
iov_iter: add copy_to_user support

This adds iov_iter wrappers around copy_to_user() to match the existing
wrappers around copy_from_user().

This will be used by the generic file system buffered read path.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: iov_iter_copy_from_user() should use non-atomic copy
Dave Kleikamp [Fri, 14 Jun 2013 20:54:09 +0000 (15:54 -0500)]
iov_iter: iov_iter_copy_from_user() should use non-atomic copy

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoiov_iter: move into its own file
Zach Brown [Fri, 14 Jun 2013 20:54:09 +0000 (15:54 -0500)]
iov_iter: move into its own file

This moves the iov_iter functions in to their own file.  We're going to
be working on them in upcoming patches.  They become sufficiently large,
and remain self-contained, to justify seperating them from the rest of
the huge mm/filemap.c.

Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
11 years agoMIPS: Fix VGA_MAP_MEM macro.
Leonid Yegoshin [Wed, 11 Sep 2013 00:36:04 +0000 (19:36 -0500)]
MIPS: Fix VGA_MAP_MEM macro.

Use the CKSEG1ADDR macro when calculating VGA_MAP_MEM.

[ralf@linux-mips.org: Include <asm/addrspace.h for CKSEG1ADDR.]

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5814/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoInput: pxa27x_keypad - fix NULL pointer dereference
Mike Dunn [Wed, 18 Sep 2013 15:07:41 +0000 (08:07 -0700)]
Input: pxa27x_keypad - fix NULL pointer dereference

A NULL pointer dereference exception occurs in the driver probe function when
device tree is used.  The pdata pointer will be NULL in this case, but the code
dereferences it in all cases.  When device tree is used, a platform data
structure is allocated and initialized, and in all cases this pointer is copied
to the driver's private data, so the variable being tested should be accessed
through the driver's private data structure.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoMIPS: Reimplement get_cycles().
Ralf Baechle [Thu, 12 Sep 2013 11:47:32 +0000 (13:47 +0200)]
MIPS: Reimplement get_cycles().

This essentially reverts commit efb9ca08b5a2374b29938cdcab417ce4feb14b54
(kernel.org) / 58020a106879a8b372068741c81f0015c9b0b96dbv [[MIPS] Change
get_cycles to always return 0.]

Most users of get_cycles() invoke it as a timing interface.  That's why
in modern kernels it was never very much missed for.  /dev/random however
uses get_cycles() in the how the jitter in the interrupt timing contains
some useful entropy.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMerge branches 'devel-stable' and 'fixes' into for-next
Russell King [Wed, 18 Sep 2013 10:02:43 +0000 (11:02 +0100)]
Merge branches 'devel-stable' and 'fixes' into for-next

11 years agoARM: 7836/1: add __get_user_unaligned/__put_user_unaligned
Nicolas Pitre [Tue, 17 Sep 2013 18:16:38 +0000 (19:16 +0100)]
ARM: 7836/1: add __get_user_unaligned/__put_user_unaligned

BTRFS is now relying on those since v3.12-rc1.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoGFS2: new function gfs2_rbm_incr
Bob Peterson [Tue, 17 Sep 2013 17:14:35 +0000 (13:14 -0400)]
GFS2: new function gfs2_rbm_incr

Since the previous patch eliminated bi in favor of bii, this follow-on
patch needed to be adjusted accordingly. Here is the revised version.

This patch adds a new function, gfs2_rbm_incr, which increments
an rbm structure. This is more efficient than calling gfs2_rbm_to_block,
incrementing, then calling gfs2_rbm_from_block.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>