Petr Mladek
d5d8d3d0d4
kdb: properly synchronize vkdb_printf() calls with other CPUs
...
kdb_printf_lock does not prevent other CPUs from entering the critical
section because it is ignored when KDB_STATE_PRINTF_LOCK is set.
The problematic situation might look like:
CPU0 CPU1
vkdb_printf()
if (!KDB_STATE(PRINTF_LOCK))
KDB_STATE_SET(PRINTF_LOCK);
spin_lock_irqsave(&kdb_printf_lock, flags);
vkdb_printf()
if (!KDB_STATE(PRINTF_LOCK))
BANG: The PRINTF_LOCK state is set and CPU1 is entering the critical
section without spinning on the lock.
The problem is that the code tries to implement locking using two state
variables that are not handled atomically. Well, we need a custom
locking because we want to allow reentering the critical section on the
very same CPU.
Let's use solution from Petr Zijlstra that was proposed for a similar
scenario, see
https://lkml.kernel.org/r/20161018171513.734367391@infradead.org
This patch uses the same trick with cmpxchg(). The only difference is
that we want to handle only recursion from the same context and
therefore we disable interrupts.
In addition, KDB_STATE_PRINTF_LOCK is removed. In fact, we are not able
to set it a non-racy way.
Link: http://lkml.kernel.org/r/1480412276-16690-3-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com >
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org >
Cc: Jason Wessel <jason.wessel@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Petr Mladek
d1bd8ead12
kdb: remove unused kdb_event handling
...
kdb_event state variable is only set but never checked in the kernel
code.
http://www.spinics.net/lists/kdb/msg01733.html suggests that this
variable affected WARN_CONSOLE_UNLOCKED() in the original
implementation. But this check never went upstream.
The semantic is unclear and racy. The value is updated after the
kdb_printf_lock is acquired and after it is released. It should be
symmetric at minimum. The value should be manipulated either inside or
outside the locked area.
Fortunately, it seems that the original function is gone and we could
simply remove the state variable.
Link: http://lkml.kernel.org/r/1480412276-16690-2-git-send-email-pmladek@suse.com
Signed-off-by: Petr Mladek <pmladek@suse.com >
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org >
Cc: Jason Wessel <jason.wessel@windriver.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Douglas Anderson
2d13bb6494
kernel/debug/debug_core.c: more properly delay for secondary CPUs
...
We've got a delay loop waiting for secondary CPUs. That loop uses
loops_per_jiffy. However, loops_per_jiffy doesn't actually mean how
many tight loops make up a jiffy on all architectures. It is quite
common to see things like this in the boot log:
Calibrating delay loop (skipped), value calculated using timer
frequency.. 48.00 BogoMIPS (lpj=24000)
In my case I was seeing lots of cases where other CPUs timed out
entering the debugger only to print their stack crawls shortly after the
kdb> prompt was written.
Elsewhere in kgdb we already use udelay(), so that should be safe enough
to use to implement our timeout. We'll delay 1 ms for 1000 times, which
should give us a full second of delay (just like the old code wanted)
but allow us to notice that we're done every 1 ms.
[akpm@linux-foundation.org: simplifications, per Daniel]
Link: http://lkml.kernel.org/r/1477091361-2039-1-git-send-email-dianders@chromium.org
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org >
Cc: Jason Wessel <jason.wessel@windriver.com >
Cc: Brian Norris <briannorris@chromium.org >
Cc: <stable@vger.kernel.org > [4.0+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Kefeng Wang
db862358a4
kcov: add more missing includes
...
It is fragile that some definitions acquired via transitive
dependencies, as shown in below:
atomic_* (<linux/atomic.h>)
ENOMEM/EN* (<linux/errno.h>)
EXPORT_SYMBOL (<linux/export.h>)
device_initcall (<linux/init.h>)
preempt_* (<linux/preempt.h>)
Include them to prevent possible issues.
Link: http://lkml.kernel.org/r/1481163221-40170-1-git-send-email-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com >
Suggested-by: Mark Rutland <mark.rutland@arm.com >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: James Morse <james.morse@arm.com >
Cc: Kefeng Wang <wangkefeng.wang@huawei.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Andreas Platschek
0462554707
Kconfig: lib/Kconfig.ubsan fix reference to ubsan documentation
...
Documenation/ubsan.txt was moved to Documentation/dev-tools/ubsan.rst,
this fixes the reference.
Link: http://lkml.kernel.org/r/1476698152-29340-3-git-send-email-andreas.platschek@opentech.at
Signed-off-by: Andreas Platschek <andreas.platschek@opentech.at >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Andreas Platschek
700199b0c1
Kconfig: lib/Kconfig.debug: fix references to Documenation
...
Documentation on development tools was moved to Documentation/devl-tools
and sphinxified (renamed from .txt to .rst).
References in lib/Kconfig.debug need to be updated to the new location.
Link: http://lkml.kernel.org/r/1476698152-29340-2-git-send-email-andreas.platschek@opentech.at
Signed-off-by: Andreas Platschek <andreas.platschek@opentech.at >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Dan Carpenter
9a29d0fbc2
relay: check array offset before using it
...
Smatch complains that we started using the array offset before we
checked that it was valid.
Fixes: 017c59c042 ('relay: Use per CPU constructs for the relay channel buffer pointers')
Link: http://lkml.kernel.org/r/20161013084947.GC16198@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
bd4171a5d4
igb: update code to better handle incrementing page count
...
Update the driver code so that we do bulk updates of the page reference
count instead of just incrementing it by one reference at a time. The
advantage to doing this is that we cut down on atomic operations and
this in turn should give us a slight improvement in cycles per packet.
In addition if we eventually move this over to using build_skb the gains
will be more noticeable.
Link: http://lkml.kernel.org/r/20161110113616.76501.17072.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Chris Metcalf <cmetcalf@mellanox.com >
Cc: David Howells <dhowells@redhat.com >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no >
Cc: Helge Deller <deller@gmx.de >
Cc: James Hogan <james.hogan@imgtec.com >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Keguang Zhang <keguang.zhang@gmail.com >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Mark Salter <msalter@redhat.com >
Cc: Max Filippov <jcmvbkbc@gmail.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Rich Felker <dalias@libc.org >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Steven Miao <realmz6@gmail.com >
Cc: Tobias Klauser <tklauser@distanz.ch >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
5be5955425
igb: update driver to make use of DMA_ATTR_SKIP_CPU_SYNC
...
The ARM architecture provides a mechanism for deferring cache line
invalidation in the case of map/unmap. This patch makes use of this
mechanism to avoid unnecessary synchronization.
A secondary effect of this change is that the portion of the page that
has been synchronized for use by the CPU should be writable and could be
passed up the stack (at least on ARM).
The last bit that occurred to me is that on architectures where the
sync_for_cpu call invalidates cache lines we were prefetching and then
invalidating the first 128 bytes of the packet. To avoid that I have
moved the sync up to before we perform the prefetch and allocate the
skbuff so that we can actually make use of it.
Link: http://lkml.kernel.org/r/20161110113611.76501.98897.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Chris Metcalf <cmetcalf@mellanox.com >
Cc: David Howells <dhowells@redhat.com >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no >
Cc: Helge Deller <deller@gmx.de >
Cc: James Hogan <james.hogan@imgtec.com >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Keguang Zhang <keguang.zhang@gmail.com >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Mark Salter <msalter@redhat.com >
Cc: Max Filippov <jcmvbkbc@gmail.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Rich Felker <dalias@libc.org >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Steven Miao <realmz6@gmail.com >
Cc: Tobias Klauser <tklauser@distanz.ch >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
44fdffd705
mm: add support for releasing multiple instances of a page
...
Add a function that allows us to batch free a page that has multiple
references outstanding. Specifically this function can be used to drop
a page being used in the page frag alloc cache. With this drivers can
make use of functionality similar to the page frag alloc cache without
having to do any workarounds for the fact that there is no function that
frees multiple references.
Link: http://lkml.kernel.org/r/20161110113606.76501.70752.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Chris Metcalf <cmetcalf@mellanox.com >
Cc: David Howells <dhowells@redhat.com >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no >
Cc: Helge Deller <deller@gmx.de >
Cc: James Hogan <james.hogan@imgtec.com >
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Keguang Zhang <keguang.zhang@gmail.com >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Mark Salter <msalter@redhat.com >
Cc: Max Filippov <jcmvbkbc@gmail.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Rich Felker <dalias@libc.org >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Steven Miao <realmz6@gmail.com >
Cc: Tobias Klauser <tklauser@distanz.ch >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
0495c3d367
dma: add calls for dma_map_page_attrs and dma_unmap_page_attrs
...
Add support for mapping and unmapping a page with attributes.
The primary use for this is currently to allow for us to pass the
DMA_ATTR_SKIP_CPU_SYNC attribute when mapping and unmapping a page. On
some architectures such as ARM the synchronization has significant
overhead and if we are already taking care of the sync_for_cpu and
sync_for_device from the driver there isn't much need to handle this in
the map/unmap calls as well.
Link: http://lkml.kernel.org/r/20161110113601.76501.46095.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
4bfa135abe
arch/xtensa: add option to skip DMA sync as a part of mapping
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113555.76501.52536.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Max Filippov <jcmvbkbc@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
33c77e53d8
arch/tile: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113550.76501.73060.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Chris Metcalf <cmetcalf@mellanox.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:08 -08:00
Alexander Duyck
68bbc28f61
arch/sparc: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113544.76501.40008.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: "David S. Miller" <davem@davemloft.net >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
a08120017d
arch/sh: add option to skip DMA sync as a part of mapping
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113539.76501.6539.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Cc: Rich Felker <dalias@libc.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
6f77480961
arch/powerpc: add option to skip DMA sync as a part of mapping
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113534.76501.86492.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Acked-by: Michael Ellerman <mpe@ellerman.id.au >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
f50a2bd298
arch/parisc: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113529.76501.44762.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Helge Deller <deller@gmx.de >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
043b42bcbb
arch/openrisc: add option to skip DMA sync as a part of mapping
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113524.76501.87966.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Jonas Bonn <jonas@southpole.se >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
abdf4799da
arch/nios2: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113518.76501.52225.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Reviewed-by: Tobias Klauser <tklauser@distanz.ch >
Cc: Ley Foon Tan <lftan@altera.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
9f318d470e
arch/mips: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113513.76501.32321.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Keguang Zhang <keguang.zhang@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
98ac2fc274
arch/microblaze: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113508.76501.77583.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Michal Simek <monstr@monstr.eu >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
38bdbdc7e3
arch/metag: add option to skip DMA sync as a part of map and unmap
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113503.76501.80809.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: James Hogan <james.hogan@imgtec.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
5140d2344f
arch/m68k: add option to skip DMA sync as a part of mapping
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
later via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113457.76501.77603.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
b8a346dd47
arch/hexagon: Add option to skip DMA sync as a part of mapping
...
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
avoid invoking cache line invalidation if the driver will just handle it
later via a sync_for_cpu or sync_for_device call.
Link: http://lkml.kernel.org/r/20161110113452.76501.45864.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: Richard Kuo <rkuo@codeaurora.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00
Alexander Duyck
34f8be79a7
arch/frv: add option to skip sync on DMA map
...
The use of DMA_ATTR_SKIP_CPU_SYNC was not consistent across all of the
DMA APIs in the arch/arm folder. This change is meant to correct that
so that we get consistent behavior.
Link: http://lkml.kernel.org/r/20161110113447.76501.93160.stgit@ahduyck-blue-test.jf.intel.com
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com >
Cc: David Howells <dhowells@redhat.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-12-14 16:04:07 -08:00