]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMerge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 3 Nov 2015 22:40:01 +0000 (14:40 -0800)]
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq updates from Thomas Gleixner:
 "The irq departement delivers:

   - Rework the irqdomain core infrastructure to accomodate ACPI based
     systems.  This is required to support ARM64 without creating
     artificial device tree nodes.

   - Sanitize the ACPI based ARM GIC initialization by making use of the
     new firmware independent irqdomain core

   - Further improvements to the generic MSI management

   - Generalize the irq migration on CPU hotplug

   - Improvements to the threaded interrupt infrastructure

   - Allow the migration of "chained" low level interrupt handlers

   - Allow optional force masking of interrupts in disable_irq[_nosysnc]

   - Support for two new interrupt chips - Sigh!

   - A larger set of errata fixes for ARM gicv3

   - The usual pile of fixes, updates, improvements and cleanups all
     over the place"

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
  Document that IRQ_NONE should be returned when IRQ not actually handled
  PCI/MSI: Allow the MSI domain to be device-specific
  PCI: Add per-device MSI domain hook
  of/irq: Use the msi-map property to provide device-specific MSI domain
  of/irq: Split of_msi_map_rid to reuse msi-map lookup
  irqchip/gic-v3-its: Parse new version of msi-parent property
  PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing
  of/irq: Use of_msi_get_domain instead of open-coded "msi-parent" parsing
  of/irq: Add support code for multi-parent version of "msi-parent"
  irqchip/gic-v3-its: Add handling of PCI requester id.
  PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().
  of/irq: Add new function of_msi_map_rid()
  Docs: dt: Add PCI MSI map bindings
  irqchip/gic-v2m: Add support for multiple MSI frames
  irqchip/gic-v3: Fix translation of LPIs after conversion to irq_fwspec
  irqchip/mxs: Add Alphascale ASM9260 support
  irqchip/mxs: Prepare driver for hardware with different offsets
  irqchip/mxs: Panic if ioremap or domain creation fails
  irqdomain: Documentation updates
  irqdomain/msi: Use fwnode instead of of_node
  ...

8 years agoMerge branch 'for-4.4' into for-next
Tejun Heo [Tue, 3 Nov 2015 22:28:24 +0000 (17:28 -0500)]
Merge branch 'for-4.4' into for-next

8 years agoahci: add new Intel device IDs
Alexandra Yates [Tue, 3 Nov 2015 22:14:18 +0000 (14:14 -0800)]
ahci: add new Intel device IDs

Adding Intel codename Lewisburg platform device IDs for SATA.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
8 years agoMerge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 3 Nov 2015 22:13:41 +0000 (14:13 -0800)]
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "The timer departement provides:

   - More y2038 work in the area of ntp and pps.

   - Optimization of posix cpu timers

   - New time related selftests

   - Some new clocksource drivers

   - The usual pile of fixes, cleanups and improvements"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
  timeconst: Update path in comment
  timers/x86/hpet: Type adjustments
  clocksource/drivers/armada-370-xp: Implement ARM delay timer
  clocksource/drivers/tango_xtal: Add new timer for Tango SoCs
  clocksource/drivers/imx: Allow timer irq affinity change
  clocksource/drivers/exynos_mct: Use container_of() instead of this_cpu_ptr()
  clocksource/drivers/h8300_*: Remove unneeded memset()s
  clocksource/drivers/sh_cmt: Remove unneeded memset() in sh_cmt_setup()
  clocksource/drivers/em_sti: Remove unneeded memset()s
  clocksource/drivers/mediatek: Use GPT as sched clock source
  clockevents/drivers/mtk: Fix spurious interrupt leading to crash
  posix_cpu_timer: Reduce unnecessary sighand lock contention
  posix_cpu_timer: Convert cputimer->running to bool
  posix_cpu_timer: Check thread timers only when there are active thread timers
  posix_cpu_timer: Optimize fastpath_timer_check()
  timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments
  timers: Use __fls in apply_slack()
  clocksource: Remove return statement from void functions
  net: sfc: avoid using timespec
  ntp/pps: use y2038 safe types in pps_event_time
  ...

8 years agoMerge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Tue, 3 Nov 2015 21:54:35 +0000 (13:54 -0800)]
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM updates from Russell King:
 "In this ARM merge, we remove more lines than we add.  Changes include:

   - Enable imprecise aborts early, so that bus errors aren't masked
     until later in the boot.  This has the side effect that boot
     loaders which provoke these aborts can cause the kernel to crash
     early in boot, so we install a handler to report this event around
     the site where these are enabled.

   - Remove the buggy but impossible to enable cmpxchg syscall code.

   - Add unwinding annotations to some assembly code.

   - Add support for atomic half-word exchange for ARMv6k+.

   - Reduce ioremap() alignment for SMP/LPAE cases where we don't need
     the large alignment.

   - Addition of an "optimal" 3G configuration for systems with 1G of
     RAM.

   - Increase vmalloc space by 128M.

   - Constify some SMP operations structures, which have never been
     writable.

   - Improve ARMs dma_mmap() support for mapping DMA coherent mappings
     into userspace.

   - Fix to the NMI backtrace code in the IPI case on ARM where the
     failing CPU gets stuck for 10s waiting for its own IPI to be
     delivered.

   - Removal of legacy PM support from the AMBA bus driver.

   - Another fix for the previous fix of vdsomunge"

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (23 commits)
  ARM: 8449/1: fix bug in vdsomunge swab32 macro
  arm: add missing of_node_put
  ARM: 8447/1: catch pending imprecise abort on unmask
  ARM: 8446/1: amba: Remove unused callbacks for legacy system PM
  ARM: 8443/1: Adding support for atomic half word exchange
  ARM: clean up TWD after previous patch
  ARM: 8441/2: twd: Don't set CLOCK_EVT_FEAT_C3STOP unconditionally
  ARM: 8440/1: remove obsolete documentation
  ARM: make highpte an expert option
  ARM: 8433/1: add a VMSPLIT_3G_OPT config option
  ARM: 8439/1: Fix backtrace generation when IPI is masked
  ARM: 8428/1: kgdb: Fix registers on sleeping tasks
  ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()
  ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()
  ARM: remove user cmpxchg syscall
  ARM: 8438/1: Add unwinding to __clear_user_std()
  ARM: 8436/1: hw_breakpoint: remove unnecessary header
  ARM: 8434/2: Revert "7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp"
  ARM: 8432/1: move VMALLOC_END from 0xff000000 to 0xff800000
  ARM: 8430/1: use default ioremap alignment for SMP or LPAE
  ...

8 years agotracing: Add some documentation about set_event_pid
Steven Rostedt (Red Hat) [Tue, 3 Nov 2015 21:37:15 +0000 (16:37 -0500)]
tracing: Add some documentation about set_event_pid

Update Documentation to include some comments about how to use
set_event_pid.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoMerge tag 'arc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Tue, 3 Nov 2015 21:21:09 +0000 (13:21 -0800)]
Merge tag 'arc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC updates from Vineet Gupta:

 - Support for new MM features in ARCv2 cores (THP, PAE40) Some generic
   THP bits are touched - all ACKed by Kirill

 - Platform framework updates to prepare for EZChip arrival (still in works)

 - ARC Public Mailing list setup finally (linux-snps-arc@lists.infraded.org)

* tag 'arc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (42 commits)
  ARC: mm: PAE40 support
  ARC: mm: PAE40: tlbex.S: Explicitify the size of pte_t
  ARC: mm: PAE40: switch to using phys_addr_t for physical addresses
  ARC: mm: HIGHMEM: populate high memory from DT
  ARC: mm: HIGHMEM: kmap API implementation
  ARC: mm: preps ahead of HIGHMEM support #2
  ARC: mm: preps ahead of HIGHMEM support
  ARC: mm: use generic macros _BITUL()/_AC()
  ARC: mm: Improve Duplicate PD Fault handler
  MAINTAINERS: Add public mailing list for ARC
  ARC: Ensure DT mem base is same as what kernel is built with
  ARC: boot: Non Master cpus only need to call EARLY_CPU_SETUP once
  ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_smp()
  ARC: smp: Introduce smp hook @init_irq_cpu called for all cores
  ARC: smp: Rename platform hook @init_smp -> @init_cpu_smp
  ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_early_smp()
  ARC: smp: Introduce smp hook @init_early_smp for Master core
  ARC: remove @init_time, @init_irq platform callbacks
  ARC: smp: irqchip: handle IPI as percpu irq like timer
  ARC: boot: Support Halt-on-reset and Run-on-reset SMP booting modes
  ...

8 years agoring_buffer: Remove unneeded smp_wmb() before wakeup of reader benchmark
Steven Rostedt (Red Hat) [Tue, 3 Nov 2015 21:19:02 +0000 (16:19 -0500)]
ring_buffer: Remove unneeded smp_wmb() before wakeup of reader benchmark

wake_up_process() has a memory barrier before doing anything, thus adding a
memory barrier before calling it is redundant.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoMerge tag 'cris-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper...
Linus Torvalds [Tue, 3 Nov 2015 21:15:46 +0000 (13:15 -0800)]
Merge tag 'cris-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris

Pull CRIS changes from Jesper Nilsson:
 "Mostly another batch of code removal due to move to standard
  frameworks for CRISv32, initial devicetree configuration for a couple
  of boards, and some small fixes for kgdb and time handling"

* tag 'cris-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
  cris: Drop reference to get_cmos_time()
  CRIS: Drop code related to obsolete or unused kconfigs
  cris: time: Cleanup of persistent clock stuff
  cris: re-use helpers to dump data in hex format
  CRIS v32: remove old GPIO and LEDs code
  CRIS v32: remove I2C bitbanging driver
  CRIS v32: add ARTPEC-3 and P1343 device trees
  CRIS v32: dev88: add GPIO, LEDs, RTC, temp sensor
  CRIS: add dt-bindings symlink
  CRIS v32: increase NR_IRQS
  cris: arch-v10: kgdb: Add '__used' for static variable is_dyn_brkp
  cris: arch-v10: kgdb: Use BAR instead of DTP0 for register P12
  cris: kgdb: use native hex2bin

8 years agotracing: Allow dumping traces without tracking trace started cpus
Sasha Levin [Fri, 4 Sep 2015 16:45:56 +0000 (12:45 -0400)]
tracing: Allow dumping traces without tracking trace started cpus

We don't init iter->started when dumping the ftrace buffer, and there's no
real need to do so - so allow skipping that check if the iter doesn't have
an initialized ->started cpumask.

Link: http://lkml.kernel.org/r/1441385156-27279-1-git-send-email-sasha.levin@oracle.com
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt...
Linus Torvalds [Tue, 3 Nov 2015 21:09:32 +0000 (13:09 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32

Pull avr32 update from Hans-Christian Noren Egtvedt.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
  avr32: atngw100: remove useless include

8 years agoring_buffer: Fix more races when terminating the producer in the benchmark
Petr Mladek [Mon, 7 Sep 2015 12:38:38 +0000 (14:38 +0200)]
ring_buffer: Fix more races when terminating the producer in the benchmark

The commit b44754d8262d3aab8 ("ring_buffer: Allow to exit the ring
buffer benchmark immediately") added a hack into ring_buffer_producer()
that set @kill_test when kthread_should_stop() returned true. It improved
the situation a lot. It stopped the kthread in most cases because
the producer spent most of the time in the patched while cycle.

But there are still few possible races when kthread_should_stop()
is set outside of the cycle. Then we do not set @kill_test and
some other checks pass.

This patch adds a better fix. It renames @test_kill/TEST_KILL() into
a better descriptive @test_error/TEST_ERROR(). Also it introduces
break_test() function that checks for both @test_error and
kthread_should_stop().

The new function is used in the producer when the check for @test_error
is not enough. It is not used in the consumer because its state
is manipulated by the producer via the "reader_finish" variable.

Also we add a missing check into ring_buffer_producer_thread()
between setting TASK_INTERRUPTIBLE and calling schedule_timeout().
Otherwise, we might miss a wakeup from kthread_stop().

Link: http://lkml.kernel.org/r/1441629518-32712-3-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoring_buffer: Do no not complete benchmark reader too early
Petr Mladek [Mon, 7 Sep 2015 12:38:37 +0000 (14:38 +0200)]
ring_buffer: Do no not complete benchmark reader too early

It seems that complete(&read_done) might be called too early
in some situations.

1st scenario:
-------------

CPU0 CPU1

ring_buffer_producer_thread()
  wake_up_process(consumer);
  wait_for_completion(&read_start);

ring_buffer_consumer_thread()
  complete(&read_start);

  ring_buffer_producer()
    # producing data in
    # the do-while cycle

  ring_buffer_consumer();
    # reading data
    # got error
    # set kill_test = 1;
    set_current_state(
TASK_INTERRUPTIBLE);
    if (reader_finish)  # false
    schedule();

    # producer still in the middle of
    # do-while cycle
    if (consumer && !(cnt % wakeup_interval))
      wake_up_process(consumer);

    # spurious wakeup
    while (!reader_finish &&
   !kill_test)
    # leaving because
    # kill_test == 1
    reader_finish = 0;
    complete(&read_done);

1st BANG: We might access uninitialized "read_done" if this is the
  the first round.

    # producer finally leaving
    # the do-while cycle because kill_test == 1;

    if (consumer) {
      reader_finish = 1;
      wake_up_process(consumer);
      wait_for_completion(&read_done);

2nd BANG: This will never complete because consumer already did
  the completion.

2nd scenario:
-------------

CPU0 CPU1

ring_buffer_producer_thread()
  wake_up_process(consumer);
  wait_for_completion(&read_start);

ring_buffer_consumer_thread()
  complete(&read_start);

  ring_buffer_producer()
    # CPU3 removes the module   <--- difference from
    # and stops producer          <--- the 1st scenario
    if (kthread_should_stop())
      kill_test = 1;

  ring_buffer_consumer();
    while (!reader_finish &&
   !kill_test)
    # kill_test == 1 => we never go
    # into the top level while()
    reader_finish = 0;
    complete(&read_done);

    # producer still in the middle of
    # do-while cycle
    if (consumer && !(cnt % wakeup_interval))
      wake_up_process(consumer);

    # spurious wakeup
    while (!reader_finish &&
   !kill_test)
    # leaving because kill_test == 1
    reader_finish = 0;
    complete(&read_done);

BANG: We are in the same "bang" situations as in the 1st scenario.

Root of the problem:
--------------------

ring_buffer_consumer() must complete "read_done" only when "reader_finish"
variable is set. It must not be skipped due to other conditions.

Note that we still must keep the check for "reader_finish" in a loop
because there might be spurious wakeups as described in the
above scenarios.

Solution:
----------

The top level cycle in ring_buffer_consumer() will finish only when
"reader_finish" is set. The data will be read in "while-do" cycle
so that they are not read after an error (kill_test == 1)
or a spurious wake up.

In addition, "reader_finish" is manipulated by the producer thread.
Therefore we add READ_ONCE() to make sure that the fresh value is
read in each cycle. Also we add the corresponding barrier
to synchronize the sleep check.

Next we set the state back to TASK_RUNNING for the situation where we
did not sleep.

Just from paranoid reasons, we initialize both completions statically.
This is safer, in case there are other races that we are unaware of.

As a side effect we could remove the memory barrier from
ring_buffer_producer_thread(). IMHO, this was the reason for
the barrier. ring_buffer_reset() uses spin locks that should
provide the needed memory barrier for using the buffer.

Link: http://lkml.kernel.org/r/1441629518-32712-2-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Tue, 3 Nov 2015 21:01:48 +0000 (13:01 -0800)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k update from Geert Uytterhoeven.

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k/sun3: Use %pM format specifier to print ethernet address

8 years agoSunrpc: Supports hexadecimal number for sysctl files of sunrpc debug
Kinglong Mee [Sat, 12 Sep 2015 01:37:18 +0000 (09:37 +0800)]
Sunrpc: Supports hexadecimal number for sysctl files of sunrpc debug

The sunrpc debug sysctl files only accept decimal number right now.
But all the XXXDBUG_XXX macros are defined as hexadecimal.
It is not easy to set or check an separate flag.

This patch let those files support accepting hexadecimal number,
(decimal number is also supported). Also, display it as hexadecimal.

v2,
Remove duplicate parsing of '0x...', just using simple_strtol(tmpbuf, &s, 0)
Fix a bug of isspace() checking after parsing

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoMerge tag 'leds_for_4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewsk...
Linus Torvalds [Tue, 3 Nov 2015 20:20:29 +0000 (12:20 -0800)]
Merge tag 'leds_for_4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds

Pull LED updates from Jacek Anaszewski:

 - Move the out-of-LED-tree led-sead3 driver to the LED subsystem.

 - Add 'invert' sysfs attribute to the heartbeat trigger.

 - Add Device Tree support to the leds-netxbig driver and add related DT
   nodes to the kirkwood-netxbig.dtsi and kirkwood-net5big.dts files.
   Remove static LED setup from the related board files.

 - Remove redundant brightness conversion operation from leds-netxbig.

 - Improve leds-bcm6328 driver: improve default-state handling, add more
   init configuration options, print invalid LED instead of warning only
   about maximum LED value.

 - Add a shutdown function for setting gpio-leds into off state when
   shutting down.

 - Fix DT flash timeout property naming in leds-aat1290.txt.

 - Switch to using devm prefixed version of led_classdev_register()
   (leds-cobalt-qube, leds-hp6xx, leds-ot200, leds-ipaq-micro,
   leds-netxbig, leds-locomo, leds-menf21bmc, leds-net48xx, leds-wrap).

 - Add missing of_node_put (leds-powernv, leds-bcm6358, leds-bcm6328,
   leds-88pm860x).

 - Coding style fixes and cleanups: led-class/led-core, leds-ipaq-micro.

* tag 'leds_for_4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: (27 commits)
  leds: 88pm860x: add missing of_node_put
  leds: bcm6328: add missing of_node_put
  leds: bcm6358: add missing of_node_put
  powerpc/powernv: add missing of_node_put
  leds: leds-wrap.c: Use devm_led_classdev_register
  leds: aat1290: Fix property naming of flash-timeout-us
  leds: leds-net48xx: Use devm_led_classdev_register
  leds: leds-menf21bmc.c: Use devm_led_class_register
  leds: leds-locomo.c: Use devm_led_classdev_register
  leds: leds-gpio: add shutdown function
  Documentation: leds: update DT bindings for leds-bcm6328
  leds-bcm6328: add more init configuration options
  leds-bcm6328: simplify and improve default-state handling
  leds-bcm6328: print invalid LED
  leds: netxbig: set led_classdev max_brightness
  leds: netxbig: convert to use the devm_ functions
  ARM: mvebu: remove static LED setup for netxbig boards
  ARM: Kirkwood: add LED DT entries for netxbig boards
  leds: netxbig: add device tree binding
  leds: triggers: add invert to heartbeat
  ...

8 years agotracing: Remove redundant TP_ARGS redefining
Dmitry Safonov [Tue, 3 Nov 2015 18:49:20 +0000 (21:49 +0300)]
tracing: Remove redundant TP_ARGS redefining

TP_ARGS is not used anywhere in trace.h nor trace_entries.h
Firstly, I left just #undef TP_ARGS and had no errors - remove it.

Link: http://lkml.kernel.org/r/1446576560-14085-1-git-send-email-0x7f454c46@gmail.com
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agosh_eth: use DMA barriers
Sergei Shtylyov [Tue, 3 Nov 2015 19:36:04 +0000 (22:36 +0300)]
sh_eth: use DMA barriers

Commit  7d7355f58ba4 ("sh_eth: Ensure proper ordering of descriptor active
bit write/read") did the right thing  but used too "heavy" barriers while
there were already "lighter" DMA barriers exactly  for this case...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'for-4.4/reservations' into for-next
Jens Axboe [Tue, 3 Nov 2015 19:59:11 +0000 (12:59 -0700)]
Merge branch 'for-4.4/reservations' into for-next

8 years agoNVMe: Precedence error in nvme_pr_clear()
Dan Carpenter [Tue, 3 Nov 2015 19:50:49 +0000 (22:50 +0300)]
NVMe: Precedence error in nvme_pr_clear()

The original code is equivalent to:

u32 cdw10 = (1 | key) ? 1 << 3 : 0;

But we want:

u32 cdw10 = 1 | (key ? 1 << 3 : 0);

Fixes: 1d277a637a71: ('NVMe: Add persistent reservation ops')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agovfio: Include No-IOMMU mode
Alex Williamson [Thu, 15 Oct 2015 21:08:48 +0000 (15:08 -0600)]
vfio: Include No-IOMMU mode

There is really no way to safely give a user full access to a DMA
capable device without an IOMMU to protect the host system.  There is
also no way to provide DMA translation, for use cases such as device
assignment to virtual machines.  However, there are still those users
that want userspace drivers even under those conditions.  The UIO
driver exists for this use case, but does not provide the degree of
device access and programming that VFIO has.  In an effort to avoid
code duplication, this introduces a No-IOMMU mode for VFIO.

This mode requires building VFIO with CONFIG_VFIO_NOIOMMU and enabling
the "enable_unsafe_noiommu_mode" option on the vfio driver.  This
should make it very clear that this mode is not safe.  Additionally,
CAP_SYS_RAWIO privileges are necessary to work with groups and
containers using this mode.  Groups making use of this support are
named /dev/vfio/noiommu-$GROUP and can only make use of the special
VFIO_NOIOMMU_IOMMU for the container.  Use of this mode, specifically
binding a device without a native IOMMU group to a VFIO bus driver
will taint the kernel and should therefore not be considered
supported.  This patch includes no-iommu support for the vfio-pci bus
driver only.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
8 years agoVFIO: platform: reset: AMD xgbe reset module
Eric Auger [Tue, 3 Nov 2015 18:20:57 +0000 (18:20 +0000)]
VFIO: platform: reset: AMD xgbe reset module

This patch introduces a module that registers and implements a low-level
reset function for the AMD XGBE device.

it performs the following actions:
- reset the PHY
- disable auto-negotiation
- disable & clear auto-negotiation IRQ
- soft-reset the MAC

Those tiny pieces of code are inherited from the native xgbe driver.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: reset: calxedaxgmac: fix ioaddr leak
Eric Auger [Tue, 3 Nov 2015 18:12:19 +0000 (18:12 +0000)]
vfio: platform: reset: calxedaxgmac: fix ioaddr leak

In the current code the vfio_platform_region is copied on the stack.
As a consequence the ioaddr address is not iounmapped in the vfio
platform driver (vfio_platform_regions_cleanup). The patch uses the
pointer to the region instead.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: add dev_info on device reset
Eric Auger [Tue, 3 Nov 2015 18:12:18 +0000 (18:12 +0000)]
vfio: platform: add dev_info on device reset

It might be helpful for the end-user to check the device reset
function was found by the vfio platform reset framework.

Lets store a pointer to the struct device in vfio_platform_device
and trace when the reset function is called or not found.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: use list of registered reset function
Eric Auger [Tue, 3 Nov 2015 18:12:17 +0000 (18:12 +0000)]
vfio: platform: use list of registered reset function

Remove the static lookup table and use the dynamic list of registered
reset functions instead. Also load the reset module through its alias.
The reset struct module pointer is stored in vfio_platform_device.

We also remove the useless struct device pointer parameter in
vfio_platform_get_reset.

This patch fixes the issue related to the usage of __symbol_get, which
besides from being moot, prevented compilation with CONFIG_MODULES
disabled.

Also usage of MODULE_ALIAS makes possible to add a new reset module
without needing to update the framework. This was suggested by Arnd.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: add compat in vfio_platform_device
Eric Auger [Tue, 3 Nov 2015 18:12:16 +0000 (18:12 +0000)]
vfio: platform: add compat in vfio_platform_device

Let's retrieve the compatibility string on probe and store it
in the vfio_platform_device struct

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: reset: calxedaxgmac: add reset function registration
Eric Auger [Tue, 3 Nov 2015 18:12:15 +0000 (18:12 +0000)]
vfio: platform: reset: calxedaxgmac: add reset function registration

This patch adds the reset function registration/unregistration.
This is handled through the module_vfio_reset_handler macro. This
latter also defines a MODULE_ALIAS which simplifies the load from
vfio-platform.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: introduce module_vfio_reset_handler macro
Eric Auger [Tue, 3 Nov 2015 18:12:14 +0000 (18:12 +0000)]
vfio: platform: introduce module_vfio_reset_handler macro

The module_vfio_reset_handler macro
- define a module alias
- implement module init/exit function which respectively registers
  and unregisters the reset function.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: add capability to register a reset function
Eric Auger [Tue, 3 Nov 2015 18:12:13 +0000 (18:12 +0000)]
vfio: platform: add capability to register a reset function

In preparation for subsequent changes in reset function lookup,
lets introduce a dynamic list of reset combos (compat string,
reset module, reset function). The list can be populated/voided with
vfio_platform_register/unregister_reset. Those are not yet used in
this patch.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio: platform: introduce vfio-platform-base module
Eric Auger [Tue, 3 Nov 2015 18:12:12 +0000 (18:12 +0000)]
vfio: platform: introduce vfio-platform-base module

To prepare for vfio platform reset rework let's build
vfio_platform_common.c and vfio_platform_irq.c in a separate
module from vfio-platform and vfio-amba. This makes possible
to have separate module inits and works around a race between
platform driver init and vfio reset module init: that way we
make sure symbols exported by base are available when vfio-platform
driver gets probed.

The open/release being implemented in the base module, the ref
count is applied to the parent module instead.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio/platform: store mapped memory in region, instead of an on-stack copy
James Morse [Thu, 29 Oct 2015 16:50:43 +0000 (16:50 +0000)]
vfio/platform: store mapped memory in region, instead of an on-stack copy

vfio_platform_{read,write}_mmio() call ioremap_nocache() to map
a region of io memory, which they store in struct vfio_platform_region to
be eventually re-used, or unmapped by vfio_platform_regions_cleanup().

These functions receive a copy of their struct vfio_platform_region
argument on the stack - so these mapped areas are always allocated, and
always leaked.

Pass this argument as a pointer instead.

Fixes: 6e3f26456009 "vfio/platform: read and write support for the device fd"
Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Baptiste Reynal <b.reynal@virtualopensystems.com>
Tested-by: Baptiste Reynal <b.reynal@virtualopensystems.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agovfio/type1: handle case where IOMMU does not support PAGE_SIZE size
Eric Auger [Thu, 29 Oct 2015 17:49:42 +0000 (17:49 +0000)]
vfio/type1: handle case where IOMMU does not support PAGE_SIZE size

Current vfio_pgsize_bitmap code hides the supported IOMMU page
sizes smaller than PAGE_SIZE. As a result, in case the IOMMU
does not support PAGE_SIZE page, the alignment check on map/unmap
is done with larger page sizes, if any. This can fail although
mapping could be done with pages smaller than PAGE_SIZE.

This patch modifies vfio_pgsize_bitmap implementation so that,
in case the IOMMU supports page sizes smaller than PAGE_SIZE
we pretend PAGE_SIZE is supported and hide sub-PAGE_SIZE sizes.
That way the user will be able to map/unmap buffers whose size/
start address is aligned with PAGE_SIZE. Pinning code uses that
granularity while iommu driver can use the sub-PAGE_SIZE size
to map the buffer.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
8 years agotracing: Rename max_stack_lock to stack_trace_max_lock
Steven Rostedt (Red Hat) [Tue, 3 Nov 2015 19:50:15 +0000 (14:50 -0500)]
tracing: Rename max_stack_lock to stack_trace_max_lock

Now that max_stack_lock is a global variable, it requires a naming
convention that is unlikely to collide. Rename it to the same naming
convention that the other stack_trace variables have.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agowatchdog: include: add units for timeout values in kerneldoc
Wolfram Sang [Tue, 3 Nov 2015 08:00:16 +0000 (09:00 +0100)]
watchdog: include: add units for timeout values in kerneldoc

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
8 years agowatchdog: include: fix some typos
Wolfram Sang [Tue, 3 Nov 2015 08:00:15 +0000 (09:00 +0100)]
watchdog: include: fix some typos

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
8 years agotracing: Allow arch-specific stack tracer
AKASHI Takahiro [Fri, 30 Oct 2015 05:25:39 +0000 (14:25 +0900)]
tracing: Allow arch-specific stack tracer

A stack frame may be used in a different way depending on cpu architecture.
Thus it is not always appropriate to slurp the stack contents, as current
check_stack() does, in order to calcurate a stack index (height) at a given
function call. At least not on arm64.
In addition, there is a possibility that we will mistakenly detect a stale
stack frame which has not been overwritten.

This patch makes check_stack() a weak function so as to later implement
arch-specific version.

Link: http://lkml.kernel.org/r/1446182741-31019-5-git-send-email-takahiro.akashi@linaro.org
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoMerge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fsl-sai' and 'asoc/fix...
Mark Brown [Tue, 3 Nov 2015 19:09:48 +0000 (19:09 +0000)]
Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fsl-sai' and 'asoc/fix/wm8960' into asoc-linus

8 years agoMerge tag 'asoc-v4.3-rc6' into asoc-linus
Mark Brown [Tue, 3 Nov 2015 19:09:47 +0000 (19:09 +0000)]
Merge tag 'asoc-v4.3-rc6' into asoc-linus

ASoC: Updates for v4.4

Not much core work here, a few small tweaks to interfaces but mainly the
changes here are driver ones.  Highlights include:

 - Updates to the topology userspace interface
 - Big updates to the Renesas support from Morimoto-san
 - Most of the support for Intel Sky Lake systems.
 - New drivers for Asahi Kasei Microdevices AK4613, Allwinnner A10,
   Cirrus Logic WM8998, Dialog DA7219, Nuvoton NAU8825 and Rockchip
   S/PDIF.

# gpg: Signature made Mon 26 Oct 2015 05:14:46 GMT using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: key 00000000 occurs more than once in the trustdb
# gpg: key 16005C11: no public key for trusted key - skipped
# gpg: key 16005C11 marked as ultimately trusted
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"

8 years agoMerge tag 'asoc-v4.3-rc2' into asoc-linus
Mark Brown [Tue, 3 Nov 2015 19:09:46 +0000 (19:09 +0000)]
Merge tag 'asoc-v4.3-rc2' into asoc-linus

ASoC: Updates for v4.4

A first batch of updates targetted at v4.4.  There are no substantial
core fixes here, the biggest block of changes is updates to the rcar
drivers and the addition of a CODEC driver for the AK4613.

# gpg: Signature made Thu 24 Sep 2015 21:37:06 BST using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: key 00000000 occurs more than once in the trustdb
# gpg: key 16005C11: no public key for trusted key - skipped
# gpg: key 16005C11 marked as ultimately trusted
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"

8 years agoASoC: wm8960: Fix the Input PGA Mute switch
JongHo Kim [Tue, 3 Nov 2015 02:06:32 +0000 (11:06 +0900)]
ASoC: wm8960: Fix the Input PGA Mute switch

Change the xinvert value from 0 to 1 on the "Capture Switch" control
WM8960 datasheet is shown as follows:
Bit 7 at 00h and 01h register address
1 : Enable Mute, 0 : Disable Mute

Signed-off-by: JongHo Kim <furmuwon@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoASoC: arizona: fix range of OPCLK_REF
Richard Fitzgerald [Tue, 3 Nov 2015 14:24:12 +0000 (14:24 +0000)]
ASoC: arizona: fix range of OPCLK_REF

The code was able to generate illegal OPCLK_REF values because the
reference frequency tables listed all values of SYSCLK instead of
valid values for OPCLK_REF clock. The maximum OPCLK_REF clock is
49.152MHz or 45.1584MHz.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Tue, 3 Nov 2015 18:41:45 +0000 (13:41 -0500)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Minor overlapping changes in net/ipv4/ipmr.c, in 'net' we were
fixing the "BH-ness" of the counter bumps whilst in 'net-next'
the functions were modified to take an explicit 'net' parameter.

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoswitchdev: respect SKIP_EOPNOTSUPP flag in case there is no recursion
Jiri Pirko [Tue, 3 Nov 2015 16:40:53 +0000 (17:40 +0100)]
switchdev: respect SKIP_EOPNOTSUPP flag in case there is no recursion

Caller passing down the SKIP_EOPNOTSUPP switchdev flag expects that
-EOPNOTSUPP cannot be returned. But in case of direct op call without
recurtion, this may happen. So fix this by checking it always on the
end of __switchdev_port_attr_set function.

Fixes: 464314ea6c11 ("switchdev: skip over ports returning -EOPNOTSUPP when recursing ports")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: sched: kill dead code in sch_choke.c
Phil Sutter [Tue, 3 Nov 2015 18:01:41 +0000 (19:01 +0100)]
net: sched: kill dead code in sch_choke.c

It looks like this has never been used at all.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoirda: Delete an unnecessary check before the function call "irlmp_unregister_service"
Markus Elfring [Tue, 3 Nov 2015 17:18:37 +0000 (18:18 +0100)]
irda: Delete an unnecessary check before the function call "irlmp_unregister_service"

The irlmp_unregister_service() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agothermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r
Caesar Wang [Fri, 23 Oct 2015 11:25:27 +0000 (19:25 +0800)]
thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r

When we come out of system suspend state (S3) the tsadc will have been
reset and back at its default state.  While reprogramming the tsadc
it's possible that we'll glitch the output and unintentionally cause
the "over temperature" GPIO to be asserted.  Since the over
temperature GPIO is often hooked up to something that will cause a
reboot or shutdown in hardware, this glitch can be catastrophic on
some boards.

We'll add support for selecting the "sleep" pinctrl state at suspend
time.  Boards can use this to effectively disable the tsadc at suspend
time and avoid glitches when the system is resumed.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
8 years agodt-bindings: rockchip-thermal: Add the pinctrl states in this document
Caesar Wang [Fri, 23 Oct 2015 11:25:26 +0000 (19:25 +0800)]
dt-bindings: rockchip-thermal: Add the pinctrl states in this document

The "init" pinctrl is defined we'll set
pinctrl to this state before probe and then "default" after probe.
Add the "init" and "sleep" pinctrl as the OTP gpio state, since we need
switch the pin to gpio state before the TSADC controller is reset.

AFAIK, the TSADC controller is reset, the tshut polarity will be
a *low* signal in a short period of time for some devices.

Says:
The TSADC get the temperature on rockchip thermal.

If T(current temperature) < (setting temperature), the OTP output the
*high* signal.
If T(current temperature) > (setting temperature), the OTP output the
*low* Signal.

In some cases, the OTP pin is connected to the PMIC, maybe the
PMIC can accept the reset response time to avoid this issue.

In other words, the system will be always reboot if we make the
OTP pin is connected the others IC to control the power.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
8 years agonfs: Fix GETATTR bitmap verification
Andreas Gruenbacher [Tue, 3 Nov 2015 17:25:33 +0000 (18:25 +0100)]
nfs: Fix GETATTR bitmap verification

When decoding GETATTR replies, the client checks the attribute bitmap
for which attributes the server has sent.  It misses bits at the word
boundaries, though; fix that.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agonfs: Remove unused xdr page offsets in getacl/setacl arguments
Andreas Gruenbacher [Tue, 3 Nov 2015 17:25:34 +0000 (18:25 +0100)]
nfs: Remove unused xdr page offsets in getacl/setacl arguments

The arguments passed around for getacl and setacl xdr encoding, struct
nfs_setaclargs and struct nfs_getaclargs, both contain an array of
pages, an offset into the first page, and the length of the page data.
The offset is unused as it is always zero; remove it.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agofs/nfs: remove unnecessary new_valid_dev check
Yaowei Bai [Mon, 28 Sep 2015 14:30:32 +0000 (22:30 +0800)]
fs/nfs: remove unnecessary new_valid_dev check

As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoSUNRPC: fix variable type
Andrzej Hajda [Thu, 24 Sep 2015 14:00:09 +0000 (16:00 +0200)]
SUNRPC: fix variable type

Due to incorrect len type bc_send_request returned always zero.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
8 years agoMerge branch 'for-4.4/lightnvm' into for-next
Jens Axboe [Tue, 3 Nov 2015 16:53:33 +0000 (09:53 -0700)]
Merge branch 'for-4.4/lightnvm' into for-next

8 years agolightnvm: refactor phys addrs type to u64
Matias Bjørling [Mon, 2 Nov 2015 16:12:27 +0000 (17:12 +0100)]
lightnvm: refactor phys addrs type to u64

For cases where CONFIG_LBDAF is not set. The struct ppa_addr exceeds its
type on 32 bit architectures. ppa_addr requires a 64bit integer to hold
the generic ppa format. We therefore refactor it to u64 and
replaces the sector_t usages with u64 for physical addresses.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoide: pdc202xx_new: Replace timeval with ktime_t
Amitoj Kaur Chawla [Thu, 22 Oct 2015 12:45:50 +0000 (18:15 +0530)]
ide: pdc202xx_new: Replace timeval with ktime_t

This driver uses 'struct timeval' which we are trying to remove since
32 bit time types will break in the year 2038 by replacing it with
ktime_t.

This patch changes do_gettimeofday() to ktime_get() because
ktime_get() returns a ktime_t while do_gettimeofday() returns struct
timeval.

This patch also uses ktime_us_delta() to get the elapsed time.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodlm: make posix locks interruptible
Eric Ren [Wed, 14 Oct 2015 15:28:26 +0000 (23:28 +0800)]
dlm: make posix locks interruptible

Replace wait_event_killable with wait_event_interruptible
so that a program waiting for a posix lock can be
interrupted by a signal.  With the killable version,
a program was not interruptible by a signal if it
had a signal handler set for it, overriding the default
action of terminating the process.

Signed-off-by: Eric Ren <zren@suse.com>
Signed-off-by: David Teigland <teigland@redhat.com>
8 years agoMerge tag 'mac80211-for-davem-2015-11-03' of git://git.kernel.org/pub/scm/linux/kerne...
David S. Miller [Tue, 3 Nov 2015 16:30:57 +0000 (11:30 -0500)]
Merge tag 'mac80211-for-davem-2015-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
Another set of fixes:
 * remove a warning on a check that can trigger without any
   errors having happened (Andrei)
 * correctly handle deauth request while in the process of
   associating (Andrei)
 * fix TDLS HT operation (Arik)
 * allow changing AID/listen interval during client setup (Ayala)
 * be more forgiving with WMM parameters to get HT/VHT in case of
   broken APs with bad WMM settings (Emmanuel, myself)
 * a number of other fixes (some in documentation)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: dsa: mv88e6xxx: include DSA ports in VLANs
Vivien Didelot [Tue, 3 Nov 2015 15:52:52 +0000 (10:52 -0500)]
net: dsa: mv88e6xxx: include DSA ports in VLANs

DSA ports must be members of a VLAN in order to ensure frame bridging
between chained switch chips.

Thus tag them in addition to the CPU port when adding a VLAN, and skip
them when deleting a VLAN and reporting VLAN members.

Also use the UNMODIFIED egress policy, so that frames egress on these
ports as they ingress, tagged or untagged.

Fixes: 0d3b33e60206 ("net: dsa: mv88e6xxx: add VLAN Load support")
Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports
Andrew Lunn [Tue, 3 Nov 2015 15:52:36 +0000 (10:52 -0500)]
net: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports

Frames with DSA headers passing to/from the CPU were taking place in the
MAC learning on these ports, resulting in incorrect ATU entries. Disable
learning on these ports.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/core: fix for_each_netdev_feature
Jarod Wilson [Tue, 3 Nov 2015 15:15:59 +0000 (10:15 -0500)]
net/core: fix for_each_netdev_feature

As pointed out by Nikolay and further explained by Geert, the initial
for_each_netdev_feature macro was broken, as feature would get set outside
of the block of code it was intended to run in, thus only ever working for
the first feature bit in the mask. While less pretty this way, this is
tested and confirmed functional with multiple feature bits set in
NETIF_F_UPPER_DISABLES.

[root@dell-per730-01 ~]# ethtool -K bond0 lro off
...
[  242.761394] bond0: Disabling feature 0x0000000000008000 on lower dev p5p2.
[  243.552178] bnx2x 0000:06:00.1 p5p2: using MSI-X  IRQs: sp 74  fp[0] 76 ... fp[7] 83
[  244.353978] bond0: Disabling feature 0x0000000000008000 on lower dev p5p1.
[  245.147420] bnx2x 0000:06:00.0 p5p1: using MSI-X  IRQs: sp 62  fp[0] 64 ... fp[7] 71

[root@dell-per730-01 ~]# ethtool -K bond0 gro off
...
[  251.925645] bond0: Disabling feature 0x0000000000004000 on lower dev p5p2.
[  252.713693] bnx2x 0000:06:00.1 p5p2: using MSI-X  IRQs: sp 74  fp[0] 76 ... fp[7] 83
[  253.499085] bond0: Disabling feature 0x0000000000004000 on lower dev p5p1.
[  254.290922] bnx2x 0000:06:00.0 p5p1: using MSI-X  IRQs: sp 62  fp[0] 64 ... fp[7] 71

Fixes: fd867d51f ("net/core: generic support for disabling netdev features down stack")
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <gospo@cumulusnetworks.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Nikolay Aleksandrov <razor@blackwall.org>
CC: Michal Kubecek <mkubecek@suse.cz>
CC: Alexander Duyck <alexander.duyck@gmail.com>
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agovlan: Invoke driver vlan hooks only if device is present
Padmanabh Ratnakar [Tue, 3 Nov 2015 14:55:59 +0000 (20:25 +0530)]
vlan: Invoke driver vlan hooks only if device is present

NIC drivers mark device as detached during error recovery.
It expects no manangement hooks to be invoked in this state.
Invoke driver vlan hooks only if device is present.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoarcnet/com20020: add LEDS_CLASS dependency
Arnd Bergmann [Tue, 3 Nov 2015 13:51:29 +0000 (14:51 +0100)]
arcnet/com20020: add LEDS_CLASS dependency

The newly added led trigger support in the com20020-pci driver causes
build errors when CONFIG_LEDS_CLASS is disabled:

drivers/built-in.o: In function `com20020pci_probe':
(.text+0x185dc4): undefined reference to `devm_led_classdev_register'
(.text+0x185dd8): undefined reference to `devm_led_classdev_register'

This adds a Kconfig dependency to prevent the invalid configurations.
Other drivers appear to be split 50:50 between 'select' and 'depends on'
for this symbol, I picked 'depends on' as I could not find a common
policy and it generally causes fewer problems.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8890624a4e8c ("arcnet: com20020-pci: add led trigger support")
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agobpf, verifier: annotate verbose printer with __printf
Daniel Borkmann [Tue, 3 Nov 2015 10:39:20 +0000 (11:39 +0100)]
bpf, verifier: annotate verbose printer with __printf

The verbose() printer dumps the verifier state to user space, so let gcc
take care to check calls to verbose() for (future) errors. make with W=1
correctly suggests: function might be possible candidate for 'gnu_printf'
format attribute [-Wsuggest-attribute=format].

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoARM: pxa: palm: Fix typos in PWM lookup table code
Thierry Reding [Tue, 3 Nov 2015 13:05:57 +0000 (14:05 +0100)]
ARM: pxa: palm: Fix typos in PWM lookup table code

The patches that were applied to add PWM lookup tables for legacy boards
were from v1 of the series instead of the revised v2 where the resulting
build errors had already been fixed.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoAdd resilienthandles mount parm
Steve French [Tue, 3 Nov 2015 16:08:53 +0000 (10:08 -0600)]
Add resilienthandles mount parm

Since many servers (Windows clients, and non-clustered servers) do not
support persistent handles but do support resilient handles, allow
the user to specify a mount option "resilienthandles" in order
to get more reliable connections and less chance of data loss
(at least when SMB2.1 or later).  Default resilient handle
timeout (120 seconds to recent Windows server) is used.

Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <steve.french@primarydata.com>
8 years agoMerge branch 'dp83640-fixes'
David S. Miller [Tue, 3 Nov 2015 16:08:22 +0000 (11:08 -0500)]
Merge branch 'dp83640-fixes'

Stefan Sørensen says:

====================
dp83640 driver fixes

This series fixes a number of minor bugs in the dp83640 driver.
====================

Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodp83640: Only wait for timestamps for packets with timestamping enabled.
Stefan Sørensen [Tue, 3 Nov 2015 08:34:08 +0000 (09:34 +0100)]
dp83640: Only wait for timestamps for packets with timestamping enabled.

In the packet timestamping function, check that the ptp version and
protocol of the packet matches what we have configured the hardware to
actually generate timestamps for, before looking/waiting for a timestamp.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoptp: Change ptp_class to a proper bitmask
Stefan Sørensen [Tue, 3 Nov 2015 08:34:07 +0000 (09:34 +0100)]
ptp: Change ptp_class to a proper bitmask

Change the definition of PTP_CLASS_L2 to not have any bits overlapping with
the other defined protocol values, allowing the PTP_CLASS_* definitions to
be for simple filtering on packet type.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodp83640: Prune rx timestamp list before reading from it
Stefan Sørensen [Tue, 3 Nov 2015 08:34:06 +0000 (09:34 +0100)]
dp83640: Prune rx timestamp list before reading from it

The list of rx timestamps are currently only pruned of old entries when a
new entry is inserted. If no new entries are added, old timestamps may
survive beyond their lifetime, possible causing them to be attached to
packets with the same sequence number after a rollover.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodp83640: Delay scheduled work.
Stefan Sørensen [Tue, 3 Nov 2015 08:34:05 +0000 (09:34 +0100)]
dp83640: Delay scheduled work.

Currently rx_timestamp_work reschedules itself as a regular workqueue item,
effectively causing it run constantly as long as there are packets left in
the queue. Fix by using delayed workqueue items, limiting it to run only
every two jiffies.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodp83640: Include hash in timestamp/packet matching
Stefan Sørensen [Tue, 3 Nov 2015 08:34:04 +0000 (09:34 +0100)]
dp83640: Include hash in timestamp/packet matching

Only using the message type and sequence id for matching timestamps
with packets is error prone, as multiple clients may very well be
sending packets with the same messagetype and timestamp at the same
time. Fix by extending the check to include the hash of bytes 20-29
(source id in PTPv2) that is provided with the timestamps.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoipv6: fix tunnel error handling
Michal Kubeček [Tue, 3 Nov 2015 07:51:07 +0000 (08:51 +0100)]
ipv6: fix tunnel error handling

Both tunnel6_protocol and tunnel46_protocol share the same error
handler, tunnel6_err(), which traverses through tunnel6_handlers list.
For ipip6 tunnels, we need to traverse tunnel46_handlers as we do e.g.
in tunnel46_rcv(). Current code can generate an ICMPv6 error message
with an IPv4 packet embedded in it.

Fixes: 73d605d1abbd ("[IPSEC]: changing API of xfrm6_tunnel_register")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorecordmcount: arm64: Replace the ignored mcount call into nop
Li Bin [Fri, 30 Oct 2015 08:31:04 +0000 (16:31 +0800)]
recordmcount: arm64: Replace the ignored mcount call into nop

By now, the recordmcount only records the function that in
following sections:
.text/.ref.text/.sched.text/.spinlock.text/.irqentry.text/
.kprobes.text/.text.unlikely

For the function that not in these sections, the call mcount
will be in place and not be replaced when kernel boot up. And
it will bring performance overhead, such as do_mem_abort (in
.exception.text section). This patch make the call mcount to
nop for this case in recordmcount.

Link: http://lkml.kernel.org/r/1446019445-14421-1-git-send-email-huawei.libin@huawei.com
Link: http://lkml.kernel.org/r/1446193864-24593-4-git-send-email-huawei.libin@huawei.com
Cc: <lkp@intel.com>
Cc: <catalin.marinas@arm.com>
Cc: <takahiro.akashi@linaro.org>
Cc: <stable@vger.kernel.org> # 3.18+
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agorecordmcount: Fix endianness handling bug for nop_mcount
libin [Tue, 3 Nov 2015 00:58:47 +0000 (08:58 +0800)]
recordmcount: Fix endianness handling bug for nop_mcount

In nop_mcount, shdr->sh_offset and welp->r_offset should handle
endianness properly, otherwise it will trigger Segmentation fault
if the recordmcount main and file.o have different endianness.

Link: http://lkml.kernel.org/r/563806C7.7070606@huawei.com
Cc: <stable@vger.kernel.org> # 3.0+
Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoMerge branch 'for-4.4/core' into for-next
Jens Axboe [Tue, 3 Nov 2015 15:42:28 +0000 (08:42 -0700)]
Merge branch 'for-4.4/core' into for-next

8 years agoblk-mq: avoid excessive boot delays with large lun counts
Jeff Moyer [Tue, 3 Nov 2015 15:40:06 +0000 (10:40 -0500)]
blk-mq: avoid excessive boot delays with large lun counts

Hi,

Zhangqing Luo reported long boot times on a system with thousands of
LUNs when scsi-mq was enabled.  He narrowed the problem down to
blk_mq_add_queue_tag_set, where every queue is frozen in order to set
the BLK_MQ_F_TAG_SHARED flag.  Each added device will freeze all queues
added before it in sequence, which involves waiting for an RCU grace
period for each one.  We don't need to do this.  After the second queue
is added, only new queues need to be initialized with the shared tag.
We can do that by percolating the flag up to the blk_mq_tag_set, and
updating the newly added queue's hctxs if the flag is set.

This problem was introduced by commit 0d2602ca30e41 (blk-mq: improve
support for shared tags maps).

Reported-and-tested-by: Jason Luo <zhangqing.luo@oracle.com>
Reviewed-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
8 years agoMerge branch 'mlx5-fixes'
David S. Miller [Tue, 3 Nov 2015 15:41:51 +0000 (10:41 -0500)]
Merge branch 'mlx5-fixes'

Or Gerlitz says:

====================
Mellanox mlx5e driver update, Nov 3 2015

This series contains bunch of small fixes to the mlx5e driver from Achiad.

Changes from V0:
  - removed the driver patch that dealt with IRQ affinity changes during
    NAPI poll, as this is a generic problem which needs generic solution.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5e: Fix LSO vlan insertion
Achiad Shochat [Tue, 3 Nov 2015 06:07:24 +0000 (08:07 +0200)]
net/mlx5e: Fix LSO vlan insertion

Consider vlan insertion impact on headers copy size also for LSO
packets.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5e: Re-eanble client vlan TX acceleration
Achiad Shochat [Tue, 3 Nov 2015 06:07:23 +0000 (08:07 +0200)]
net/mlx5e: Re-eanble client vlan TX acceleration

This reverts commit cd58c714acb9 "net/mlx5e: Disable client vlan TX acceleration".

Bring back client vlan insertion offload, the original
performance issue was found and fixed in the next patch.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5e: Return error in case mlx5e_set_features() fails
Achiad Shochat [Tue, 3 Nov 2015 06:07:22 +0000 (08:07 +0200)]
net/mlx5e: Return error in case mlx5e_set_features() fails

In case mlx5e_set_features() fails, return the failure status rather
than 0.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5e: Don't allow more than max supported channels
Achiad Shochat [Tue, 3 Nov 2015 06:07:21 +0000 (08:07 +0200)]
net/mlx5e: Don't allow more than max supported channels

Consider MLX5E_MAX_NUM_CHANNELS @ethtool set/get_channels

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5_core: Use the the real irqn in eq->irqn
Achiad Shochat [Tue, 3 Nov 2015 06:07:20 +0000 (08:07 +0200)]
net/mlx5_core: Use the the real irqn in eq->irqn

Instead of storing the msix array index in eq->irqn (vecidx),
store the real irq number.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5e: Wait for RX buffers initialization in a more proper manner
Achiad Shochat [Tue, 3 Nov 2015 06:07:19 +0000 (08:07 +0200)]
net/mlx5e: Wait for RX buffers initialization in a more proper manner

Use jiffies rather than wait loop with msleep().

The wait loop didn't take into consideration time when the
process was not executing.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/mlx5e: Avoid NULL pointer access in case of configuration failure
Achiad Shochat [Tue, 3 Nov 2015 06:07:18 +0000 (08:07 +0200)]
net/mlx5e: Avoid NULL pointer access in case of configuration failure

In case a configuration operation that involves closing and re-opening
resources (e.g RX/TX queue size change) fails at the re-opening stage
these resources will remain closed.
So when executing (following) configuration operations (e.g ifconfig
down) we cannot assume that these resources are available.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years ago[SMB3] Send durable handle v2 contexts when use of persistent handles required
Steve French [Tue, 3 Nov 2015 15:26:27 +0000 (09:26 -0600)]
[SMB3] Send durable handle v2 contexts when use of persistent handles required

Version 2 of the patch. Thanks to Dan Carpenter and the smatch
tool for finding a problem in the first version of this patch.

CC: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <steve.french@primarydata.com>
8 years ago[SMB3] Display persistenthandles in /proc/mounts for SMB3 shares if enabled
Steve French [Thu, 1 Oct 2015 02:07:59 +0000 (21:07 -0500)]
[SMB3] Display persistenthandles in /proc/mounts for SMB3 shares if enabled

Signed-off-by: Steve French <steve.french@primarydata.com>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
8 years ago[SMB3] Enable checking for continuous availability and persistent handle support
Steve French [Tue, 3 Nov 2015 15:15:03 +0000 (09:15 -0600)]
[SMB3] Enable checking for continuous availability and persistent handle support

Validate "persistenthandles" and "nopersistenthandles" mount options against
the support the server claims in negotiate and tree connect SMB3 responses.

Signed-off-by: Steve French <steve.french@primarydata.com>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
8 years ago[SMB3] Add parsing for new mount option controlling persistent handles
Steve French [Wed, 30 Sep 2015 02:49:28 +0000 (21:49 -0500)]
[SMB3] Add parsing for new mount option controlling persistent handles

"nopersistenthandles" and "persistenthandles" mount options added.
The former will not request persistent handles on open even when
SMB3 negotiated and Continuous Availability share.  The latter
will request persistent handles (as long as server notes the
capability in protocol negotiation) even if share is not Continuous
Availability share.

Signed-off-by: Steve French <steve.french@primarydata.com>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
8 years agoMerge branch 'pci/host-layerscape' into next
Bjorn Helgaas [Tue, 3 Nov 2015 14:39:32 +0000 (08:39 -0600)]
Merge branch 'pci/host-layerscape' into next

* pci/host-layerscape:
  PCI: layerscape: Add ls_pcie_msi_host_init()
  PCI: layerscape: Add support for LS1043a and LS2080a
  PCI: layerscape: Remove unused fields from struct ls_pcie
  PCI: layerscape: Update ls_add_pcie_port()
  PCI: layerscape: Factor out SCFG related function
  PCI: layerscape: Ignore PCIe controllers in Endpoint mode
  PCI: layerscape: Remove ls_pcie_establish_link()

8 years agoMerge branch 'pci/host-hisi' into next
Bjorn Helgaas [Tue, 3 Nov 2015 14:39:19 +0000 (08:39 -0600)]
Merge branch 'pci/host-hisi' into next

* pci/host-hisi:
  PCI: hisi: Add HiSilicon SoC Hip05 PCIe driver

8 years agoMerge branches 'pci/host-altera', 'pci/host-designware', 'pci/host-generic', 'pci...
Bjorn Helgaas [Tue, 3 Nov 2015 14:38:27 +0000 (08:38 -0600)]
Merge branches 'pci/host-altera', 'pci/host-designware', 'pci/host-generic', 'pci/host-imx6', 'pci/host-iproc', 'pci/host-mvebu', 'pci/host-rcar', 'pci/host-tegra' and 'pci/host-xgene' into next

* pci/host-altera:
  PCI: altera: Add Altera PCIe MSI driver
  PCI: altera: Add Altera PCIe host controller driver
  ARM: Add msi.h to Kbuild

* pci/host-designware:
  PCI: designware: Make "clocks" and "clock-names" optional DT properties
  PCI: designware: Make driver arch-agnostic
  ARM/PCI: Replace pci_sys_data->align_resource with global function pointer
  PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT
  Revert "PCI: designware: Program ATU with untranslated address"
  PCI: designware: Move calculation of bus addresses to DRA7xx
  PCI: designware: Make "num-lanes" an optional DT property
  PCI: designware: Require config accesses to be naturally aligned
  PCI: designware: Simplify dw_pcie_cfg_read/write() interfaces
  PCI: designware: Use exact access size in dw_pcie_cfg_read()
  PCI: spear: Fix dw_pcie_cfg_read/write() usage
  PCI: designware: Set up high part of MSI target address
  PCI: designware: Make get_msi_addr() return phys_addr_t, not u32
  PCI: designware: Implement multivector MSI IRQ setup
  PCI: designware: Factor out MSI msg setup
  PCI: Add msi_controller setup_irqs() method for special multivector setup
  PCI: designware: Fix PORT_LOGIC_LINK_WIDTH_MASK

* pci/host-generic:
  PCI: generic: Fix address window calculation for non-zero starting bus
  PCI: generic: Pass starting bus number to pci_scan_root_bus()
  PCI: generic: Allow multiple hosts with different map_bus() methods
  arm64: dts: Drop linux,pci-probe-only from the Seattle DTS
  powerpc/PCI: Fix lookup of linux,pci-probe-only property
  PCI: generic: Fix lookup of linux,pci-probe-only property
  of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

* pci/host-imx6:
  PCI: imx6: Add PCIE_PHY_RX_ASIC_OUT_VALID definition
  PCI: imx6: Return real error code from imx6_add_pcie_port()

* pci/host-iproc:
  PCI: iproc: Fix header comment "Corporation" misspelling
  PCI: iproc: Add outbound mapping support
  PCI: iproc: Update PCIe device tree bindings
  PCI: iproc: Improve link detection logic
  PCI: iproc: Fix PCIe reset logic
  PCI: iproc: Call pci_fixup_irqs() for ARM64 as well as ARM
  PCI: iproc: Remove unused struct iproc_pcie.irqs[]
  PCI: iproc: Fix code comment to match code

* pci/host-mvebu:
  PCI: mvebu: Remove code restricting accesses to slot 0
  PCI: mvebu: Add PCI Express root complex capability block
  PCI: mvebu: Improve clock/reset handling
  PCI: mvebu: Use gpio_desc to carry around gpio
  PCI: mvebu: Use devm_kcalloc() to allocate an array
  PCI: mvebu: Use gpio_set_value_cansleep()
  PCI: mvebu: Split port parsing and resource claiming from  port setup
  PCI: mvebu: Fix memory leaks and refcount leaks
  PCI: mvebu: Move port parsing and resource claiming to  separate function
  PCI: mvebu: Use port->name rather than "PCIe%d.%d"
  PCI: mvebu: Report full node name when reporting a DT error
  PCI: mvebu: Use for_each_available_child_of_node() to walk child nodes
  PCI: mvebu: Use of_get_available_child_count()
  PCI: mvebu: Use exact config access size; don't read/modify/write
  PCI: mvebu: Return zero for reserved or unimplemented config space

* pci/host-rcar:
  PCI: rcar: Fix I/O offset for multiple host bridges
  PCI: rcar: Set root bus nr to that provided in DT
  PCI: rcar: Remove dependency on ARM-specific struct hw_pci
  PCI: rcar: Make PCI aware of the I/O resources
  PCI: rcar: Build pcie-rcar.c only on ARM
  PCI: rcar: Build pci-rcar-gen2.c only on ARM

* pci/host-tegra:
  PCI: tegra: Wrap static pgprot_t initializer with __pgprot()

* pci/host-xgene:
  PCI/MSI: xgene: Remove msi_controller assignment

8 years agoPCI: altera: Add Altera PCIe MSI driver
Ley Foon Tan [Fri, 23 Oct 2015 10:27:13 +0000 (18:27 +0800)]
PCI: altera: Add Altera PCIe MSI driver

Add Altera PCIe MSI driver.  This soft IP supports a configurable number of
vectors, which is a DTS parameter.

[bhelgaas: Kconfig depend on PCIE_ALTERA, typos, whitespace]
Signed-off-by: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
8 years agos390: remove runtime instrumentation interrupts
Martin Schwidefsky [Mon, 2 Nov 2015 13:03:46 +0000 (14:03 +0100)]
s390: remove runtime instrumentation interrupts

The external interrupts for runtime instrumentation buffer-full
and runtime instrumentation halted are unused and have no current
user. Remove the support and ignore the second parameter of the
s390_runtime_instr system call from now on.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/cio: de-duplicate subchannel validation
Pierre Morel [Mon, 26 Oct 2015 10:13:18 +0000 (11:13 +0100)]
s390/cio: de-duplicate subchannel validation

cio_validate_io_subchannel() and cio_validate_msg_subchannel() are
identical, as the called functions already take care about the
differences between subchannel types.

Just inline the code into the only user,
cio_validate_subchannel(), instead.

Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/css: unneeded initialization in for_each_subchannel
Pierre Morel [Mon, 26 Oct 2015 09:45:04 +0000 (10:45 +0100)]
s390/css: unneeded initialization in for_each_subchannel

The ret variable is always set by the fn function.
There is no need to initialize it.

Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-By: Sascha Silbe <silbe@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/Kconfig: use builtin bswap
Christian Borntraeger [Thu, 29 Oct 2015 00:16:04 +0000 (01:16 +0100)]
s390/Kconfig: use builtin bswap

Depending on the gcc version we can use builtin_bswap instead of
architecture functions. Doing so is better than the inline assembly
version of load reverse for two reasons:
- the sequence of load reversed, apply constant mask, save reversed can
  be optimized to load, apply reversed mask, save
- builtins are slightly better to optimize e.g. gcc instruction
  scheduler cannot optimize grouping on inline assemblies.

To enable set we have to ARCH_USE_BUILTIN_BSWAP.
bloat-o-meter results:
add/remove: 1/1 grow/shrink: 75/533 up/down: 1711/-9394 (-7683)

Suggested-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/dasd: fix disconnected device with valid path mask
Stefan Haberland [Fri, 23 Oct 2015 10:10:51 +0000 (12:10 +0200)]
s390/dasd: fix disconnected device with valid path mask

Path verification is either done via dasd_eckd_read_conf() which is
triggered during online processing and resume or via
do_path_verification_work() which is triggered after path events.
The dasd_eckd_read_conf() version added paths unconditionally and did
not check if the path mask was empty. This led to devices having the
disconnected stop flag set but a valid path mask. So they where not
working although they had paths validated successfully. After a resume
this state could even not be solved with additional paths added.

Fix by checking for an empty path mask in dasd_eckd_read_conf() and
clearing the device stop bits for a newly added channel path.

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/dasd: fix invalid PAV assignment after suspend/resume
Stefan Haberland [Thu, 15 Oct 2015 11:54:39 +0000 (13:54 +0200)]
s390/dasd: fix invalid PAV assignment after suspend/resume

For a valid PAV assignment the DASD driver needs to notice possibly
changed configuration data. Thus the failing of read configuration
data should also fail the device restore to prevent invalid PAV
assignment. The failed device may get restored after additional paths
get available later on.
If the restore fails after the device was added to the lcu alias
handling it needs to be removed from the alias handling before exiting
the restore function.

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/dasd: fix double free in dasd_eckd_read_conf
Stefan Haberland [Thu, 15 Oct 2015 09:10:08 +0000 (11:10 +0200)]
s390/dasd: fix double free in dasd_eckd_read_conf

The configuration data is stored per path and also the first valid
configuration data per device. When dasd_eckd_read_conf is called
again after a path got lost the device configuration data is cleared
but possibly not the per path configuration data. This might lead to a
double free when the lost path gets operational again.

Fix by clearing all per path configuration data when the first valid
configuration data is received and stored.

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/kernel: fix ptrace peek/poke for floating point registers
Martin Schwidefsky [Tue, 27 Oct 2015 12:13:38 +0000 (13:13 +0100)]
s390/kernel: fix ptrace peek/poke for floating point registers

git commit 155e839a814834a3b4b31e729f4716e59d3d2dd4
"s390/kernel: dynamically allocate FP register save area"
introduced a regression in regard to ptrace.

If the vector register extension is not present or unused the
ptrace peek of a floating pointer register return incorrect data
and the ptrace poke to a floating pointer register overwrites the
task structure starting at task->thread.fpu.fprs.

Cc: stable@kernel.org # v4.3
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agoMerge branch 'for-4.4/wacom' into for-next
Jiri Kosina [Tue, 3 Nov 2015 13:37:53 +0000 (14:37 +0100)]
Merge branch 'for-4.4/wacom' into for-next