]> Git Repo - linux.git/log
linux.git
9 years agofs/affs/inode.c: remove unneeded initialization
Fabian Frederick [Tue, 30 Jun 2015 21:57:55 +0000 (14:57 -0700)]
fs/affs/inode.c: remove unneeded initialization

bh is initialized unconditionally in affs_add_entry()

Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agofs/adfs: remove unneeded cast
Firo Yang [Tue, 30 Jun 2015 21:57:52 +0000 (14:57 -0700)]
fs/adfs: remove unneeded cast

kmem_cache_alloc() returns void*.

Signed-off-by: Firo Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agogcov: add support for GCC 5.1
Lorenzo Stoakes [Tue, 30 Jun 2015 21:57:49 +0000 (14:57 -0700)]
gcov: add support for GCC 5.1

Fix kernel gcov support for GCC 5.1.  Similar to commit a992bf836f9
("gcov: add support for GCC 4.9"), this patch takes into account the
existence of a new gcov counter (see gcc's gcc/gcov-counter.def.)

Firstly, it increments GCOV_COUNTERS (to 10), which makes the data
structure struct gcov_info compatible with GCC 5.1.

Secondly, a corresponding counter function __gcov_merge_icall_topn (Top N
value tracking for indirect calls) is included in base.c with the other
gcov counters unused for kernel profiling.

Signed-off-by: Lorenzo Stoakes <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Yuan Pengfei <[email protected]>
Tested-by: Peter Oberparleiter <[email protected]>
Reviewed-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agokernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path
HATAYAMA Daisuke [Tue, 30 Jun 2015 21:57:46 +0000 (14:57 -0700)]
kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

Commit f06e5153f4ae2e ("kernel/panic.c: add "crash_kexec_post_notifiers"
option for kdump after panic_notifers") introduced
"crash_kexec_post_notifiers" kernel boot option, which toggles wheather
panic() calls crash_kexec() before panic_notifiers and dump kmsg or after.

The problem is that the commit overlooks panic_on_oops kernel boot option.
 If it is enabled, crash_kexec() is called directly without going through
panic() in oops path.

To fix this issue, this patch adds a check to "crash_kexec_post_notifiers"
in the condition of kexec_should_crash().

Also, put a comment in kexec_should_crash() to explain not obvious things
on this patch.

Signed-off-by: HATAYAMA Daisuke <[email protected]>
Acked-by: Baoquan He <[email protected]>
Tested-by: Hidehiro Kawai <[email protected]>
Reviewed-by: Masami Hiramatsu <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Hidehiro Kawai <[email protected]>
Cc: Baoquan He <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agokernel/panic: call the 2nd crash_kexec() only if crash_kexec_post_notifiers is enabled
HATAYAMA Daisuke [Tue, 30 Jun 2015 21:57:43 +0000 (14:57 -0700)]
kernel/panic: call the 2nd crash_kexec() only if crash_kexec_post_notifiers is enabled

For compatibility with the behaviour before the commit f06e5153f4ae2e
("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after
panic_notifers"), the 2nd crash_kexec() should be called only if
crash_kexec_post_notifiers is enabled.

Note that crash_kexec() returns immediately if kdump crash kernel is not
loaded, so in this case, this patch makes no functionality change, but the
point is to make it explicit, from the caller panic() side, that the 2nd
crash_kexec() does nothing.

Signed-off-by: HATAYAMA Daisuke <[email protected]>
Suggested-by: Ingo Molnar <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Hidehiro Kawai <[email protected]>
Cc: Baoquan He <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agox86/kexec: prepend elfcorehdr instead of appending it to the crash-kernel command...
KarimAllah Ahmed [Tue, 30 Jun 2015 21:57:39 +0000 (14:57 -0700)]
x86/kexec: prepend elfcorehdr instead of appending it to the crash-kernel command-line.

Any parameter passed after '--' in the kernel command-line will not be
parsed by the kernel at all, instead it will be passed directly to init
process.

Currently the kernel appends elfcorehdr=<paddr> to the cmdline passed from
kexec load, and if this command-line is used to pass parameters to init
process this means that 'elfcorehdr' will not be parsed as a kernel
parameter at all which will be a problem for vmcore subsystem since it
will know nothing about the location of the ELF structure!

Prepending 'elfcorehdr' instead of appending it fixes this problem since
it ensures that it always comes before '--' and so it's always parsed as a
kernel command-line parameter.

Even with this patch things can still go wrong if 'CONFIG_CMDLINE' was
also used to embedd a command-line to the crash dump kernel and this
command-line contains '--' since the current behavior of the kernel is to
actually append the boot loader command-line to the embedded command-line.

Signed-off-by: KarimAllah Ahmed <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Acked-by: Vivek Goyal <[email protected]>
Cc: Haren Myneni <[email protected]>
Cc: Eric Biederman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agofs: document seq_open()'s usage of file->private_data
Yann Droneaud [Tue, 30 Jun 2015 21:57:36 +0000 (14:57 -0700)]
fs: document seq_open()'s usage of file->private_data

seq_open() stores its struct seq_file in file->private_data, thus it must
not be modified by user of seq_file.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Yann Droneaud <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agofs: allocate structure unconditionally in seq_open()
Yann Droneaud [Tue, 30 Jun 2015 21:57:33 +0000 (14:57 -0700)]
fs: allocate structure unconditionally in seq_open()

Since patch described below, from v2.6.15-rc1, seq_open() could use a
struct seq_file already allocated by the caller if the pointer to the
structure is stored in file->private_data before calling the function.

    Commit 1abe77b0fc4b485927f1f798ae81a752677e1d05
    Author: Al Viro <[email protected]>
    Date:   Mon Nov 7 17:15:34 2005 -0500

        [PATCH] allow callers of seq_open do allocation themselves

        Allow caller of seq_open() to kmalloc() seq_file + whatever else they
        want and set ->private_data to it.  seq_open() will then abstain from
        doing allocation itself.

As there's no more use for such feature, as it could be easily replaced by
calls to seq_open_private() (see commit 39699037a5c9 ("[FS] seq_file:
Introduce the seq_open_private()")) and seq_release_private() (see
v2.6.0-test3), support for this uncommon feature can be removed from
seq_open().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Yann Droneaud <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agofs: use seq_open_private() for proc_mounts
Yann Droneaud [Tue, 30 Jun 2015 21:57:30 +0000 (14:57 -0700)]
fs: use seq_open_private() for proc_mounts

A patchset to remove support for passing pre-allocated struct seq_file to
seq_open().  Such feature is undocumented and prone to error.

In particular, if seq_release() is used in release handler, it will
kfree() a pointer which was not allocated by seq_open().

So this patchset drops support for pre-allocated struct seq_file: it's
only of use in proc_namespace.c and can be easily replaced by using
seq_open_private()/seq_release_private().

Additionally, it documents the use of file->private_data to hold pointer
to struct seq_file by seq_open().

This patch (of 3):

Since patch described below, from v2.6.15-rc1, seq_open() could use a
struct seq_file already allocated by the caller if the pointer to the
structure is stored in file->private_data before calling the function.

    Commit 1abe77b0fc4b485927f1f798ae81a752677e1d05
    Author: Al Viro <[email protected]>
    Date:   Mon Nov 7 17:15:34 2005 -0500

        [PATCH] allow callers of seq_open do allocation themselves

        Allow caller of seq_open() to kmalloc() seq_file + whatever else they
        want and set ->private_data to it.  seq_open() will then abstain from
        doing allocation itself.

Such behavior is only used by mounts_open_common().

In order to drop support for such uncommon feature, proc_mounts is
converted to use seq_open_private(), which take care of allocating the
proc_mounts structure, making it available through ->private in struct
seq_file.

Conversely, proc_mounts is converted to use seq_release_private(), in
order to release the private structure allocated by seq_open_private().

Then, ->private is used directly instead of proc_mounts() macro to access
to the proc_mounts structure.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Yann Droneaud <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: finish initialisation of struct pages before basic setup
Mel Gorman [Tue, 30 Jun 2015 21:57:27 +0000 (14:57 -0700)]
mm: meminit: finish initialisation of struct pages before basic setup

Waiman Long reported that 24TB machines hit OOM during basic setup when
struct page initialisation was deferred.  One approach is to initialise
memory on demand but it interferes with page allocator paths.  This patch
creates dedicated threads to initialise memory before basic setup.  It
then blocks on a rw_semaphore until completion as a wait_queue and counter
is overkill.  This may be slower to boot but it's simplier overall and
also gets rid of a section mangling which existed so kswapd could do the
initialisation.

[[email protected]: include rwsem.h, use DECLARE_RWSEM, fix comment, remove unneeded cast]
Signed-off-by: Mel Gorman <[email protected]>
Cc: Waiman Long <[email protected]
Cc: Nathan Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Scott Norton <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: remove mminit_verify_page_links
Mel Gorman [Tue, 30 Jun 2015 21:57:23 +0000 (14:57 -0700)]
mm: meminit: remove mminit_verify_page_links

mminit_verify_page_links() is an extremely paranoid check that was
introduced when memory initialisation was being heavily reworked.
Profiles indicated that up to 10% of parallel memory initialisation was
spent on checking this for every page.  The cost could be reduced but in
practice this check only found problems very early during the
initialisation rewrite and has found nothing since.  This patch removes an
expensive unnecessary check.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: reduce number of times pageblocks are set during struct page init
Mel Gorman [Tue, 30 Jun 2015 21:57:20 +0000 (14:57 -0700)]
mm: meminit: reduce number of times pageblocks are set during struct page init

During parallel sturct page initialisation, ranges are checked for every
PFN unnecessarily which increases boot times.  This patch alters when the
ranges are checked.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: free pages in large chunks where possible
Mel Gorman [Tue, 30 Jun 2015 21:57:16 +0000 (14:57 -0700)]
mm: meminit: free pages in large chunks where possible

Parallel struct page frees pages one at a time. Try free pages as single
large pages where possible.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agox86: mm: enable deferred struct page initialisation on x86-64
Mel Gorman [Tue, 30 Jun 2015 21:57:13 +0000 (14:57 -0700)]
x86: mm: enable deferred struct page initialisation on x86-64

Subject says it all.  Other architectures may enable on a case-by-case
basis after auditing early_pfn_to_nid and testing.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: minimise number of pfn->page lookups during initialisation
Mel Gorman [Tue, 30 Jun 2015 21:57:09 +0000 (14:57 -0700)]
mm: meminit: minimise number of pfn->page lookups during initialisation

Deferred struct page initialisation is using pfn_to_page() on every PFN
unnecessarily.  This patch minimises the number of lookups and scheduler
checks.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: initialise remaining struct pages in parallel with kswapd
Mel Gorman [Tue, 30 Jun 2015 21:57:05 +0000 (14:57 -0700)]
mm: meminit: initialise remaining struct pages in parallel with kswapd

Only a subset of struct pages are initialised at the moment.  When this
patch is applied kswapd initialise the remaining struct pages in parallel.

This should boot faster by spreading the work to multiple CPUs and
initialising data that is local to the CPU.  The user-visible effect on
large machines is that free memory will appear to rapidly increase early
in the lifetime of the system until kswapd reports that all memory is
initialised in the kernel log.  Once initialised there should be no other
user-visibile effects.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT...
Mel Gorman [Tue, 30 Jun 2015 21:57:02 +0000 (14:57 -0700)]
mm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set

This patch initalises all low memory struct pages and 2G of the highest
zone on each node during memory initialisation if
CONFIG_DEFERRED_STRUCT_PAGE_INIT is set.  That config option cannot be set
but will be available in a later patch.  Parallel initialisation of struct
page depends on some features from memory hotplug and it is necessary to
alter alter section annotations.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: inline some helper functions
Mel Gorman [Tue, 30 Jun 2015 21:56:59 +0000 (14:56 -0700)]
mm: meminit: inline some helper functions

early_pfn_in_nid() and meminit_pfn_in_nid() are small functions that are
unnecessarily visible outside memory initialisation.  As well as
unnecessary visibility, it's unnecessary function call overhead when
initialising pages.  This patch moves the helpers inline.

[[email protected]: fix build]
[[email protected]: fix build]
Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: make __early_pfn_to_nid SMP-safe and introduce meminit_pfn_in_nid
Mel Gorman [Tue, 30 Jun 2015 21:56:55 +0000 (14:56 -0700)]
mm: meminit: make __early_pfn_to_nid SMP-safe and introduce meminit_pfn_in_nid

__early_pfn_to_nid() use static variables to cache recent lookups as
memblock lookups are very expensive but it assumes that memory
initialisation is single-threaded.  Parallel initialisation of struct
pages will break that assumption so this patch makes __early_pfn_to_nid()
SMP-safe by requiring the caller to cache recent search information.
early_pfn_to_nid() keeps the same interface but is only safe to use early
in boot due to the use of a global static variable.  meminit_pfn_in_nid()
is an SMP-safe version that callers must maintain their own state for.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: page_alloc: pass PFN to __free_pages_bootmem
Mel Gorman [Tue, 30 Jun 2015 21:56:52 +0000 (14:56 -0700)]
mm: page_alloc: pass PFN to __free_pages_bootmem

__free_pages_bootmem prepares a page for release to the buddy allocator
and assumes that the struct page is initialised.  Parallel initialisation
of struct pages defers initialisation and __free_pages_bootmem can be
called for struct pages that cannot yet map struct page to PFN.  This
patch passes PFN to __free_pages_bootmem with no other functional change.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: only set page reserved in the memblock region
Nathan Zimmer [Tue, 30 Jun 2015 21:56:48 +0000 (14:56 -0700)]
mm: meminit: only set page reserved in the memblock region

Currently each page struct is set as reserved upon initialization.  This
patch leaves the reserved bit clear and only sets the reserved bit when it
is known the memory was allocated by the bootmem allocator.  This makes it
easier to distinguish between uninitialised struct pages and reserved
struct pages in later patches.

Signed-off-by: Robin Holt <[email protected]>
Signed-off-by: Nathan Zimmer <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomm: meminit: move page initialization into a separate function
Robin Holt [Tue, 30 Jun 2015 21:56:45 +0000 (14:56 -0700)]
mm: meminit: move page initialization into a separate function

Currently, memmap_init_zone() has all the smarts for initializing a single
page.  A subset of this is required for parallel page initialisation and
so this patch breaks up the monolithic function in preparation.

Signed-off-by: Robin Holt <[email protected]>
Signed-off-by: Nathan Zimmer <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agomemblock: introduce a for_each_reserved_mem_region iterator
Robin Holt [Tue, 30 Jun 2015 21:56:41 +0000 (14:56 -0700)]
memblock: introduce a for_each_reserved_mem_region iterator

Struct page initialisation had been identified as one of the reasons why
large machines take a long time to boot. Patches were posted a long time ago
to defer initialisation until they were first used.  This was rejected on
the grounds it should not be necessary to hurt the fast paths. This series
reuses much of the work from that time but defers the initialisation of
memory to kswapd so that one thread per node initialises memory local to
that node.

After applying the series and setting the appropriate Kconfig variable I
see this in the boot log on a 64G machine

[    7.383764] kswapd 0 initialised deferred memory in 188ms
[    7.404253] kswapd 1 initialised deferred memory in 208ms
[    7.411044] kswapd 3 initialised deferred memory in 216ms
[    7.411551] kswapd 2 initialised deferred memory in 216ms

On a 1TB machine, I see

[    8.406511] kswapd 3 initialised deferred memory in 1116ms
[    8.428518] kswapd 1 initialised deferred memory in 1140ms
[    8.435977] kswapd 0 initialised deferred memory in 1148ms
[    8.437416] kswapd 2 initialised deferred memory in 1148ms

Once booted the machine appears to work as normal. Boot times were measured
from the time shutdown was called until ssh was available again.  In the
64G case, the boot time savings are negligible. On the 1TB machine, the
savings were 16 seconds.

Nate Zimmer said:

: On an older 8 TB box with lots and lots of cpus the boot time, as
: measure from grub to login prompt, the boot time improved from 1484
: seconds to exactly 1000 seconds.

Waiman Long said:

: I ran a bootup timing test on a 12-TB 16-socket IvyBridge-EX system.  From
: grub menu to ssh login, the bootup time was 453s before the patch and 265s
: after the patch - a saving of 188s (42%).

Daniel Blueman said:

: On a 7TB, 1728-core NumaConnect system with 108 NUMA nodes, we're seeing
: stock 4.0 boot in 7136s.  This drops to 2159s, or a 70% reduction with
: this patchset.  Non-temporal PMD init (https://lkml.org/lkml/2015/4/23/350)
: drops this to 1045s.

This patch (of 13):

As part of initializing struct page's in 2MiB chunks, we noticed that at
the end of free_all_bootmem(), there was nothing which had forced the
reserved/allocated 4KiB pages to be initialized.

This helper function will be used for that expansion.

Signed-off-by: Robin Holt <[email protected]>
Signed-off-by: Nate Zimmer <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agorbd: use GFP_NOIO in rbd_obj_request_create()
Ilya Dryomov [Wed, 24 Jun 2015 14:24:33 +0000 (17:24 +0300)]
rbd: use GFP_NOIO in rbd_obj_request_create()

rbd_obj_request_create() is called on the main I/O path, so we need to
use GFP_NOIO to make sure allocation doesn't blow back on us.  Not all
callers need this, but I'm still hardcoding the flag inside rather than
making it a parameter because a) this is going to stable, and b) those
callers shouldn't really use rbd_obj_request_create() and will be fixed
in the future.

More memory allocation fixes will follow.

Cc: [email protected] # 3.10+
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
9 years agocrush: fix a bug in tree bucket decode
Ilya Dryomov [Mon, 29 Jun 2015 16:30:23 +0000 (19:30 +0300)]
crush: fix a bug in tree bucket decode

struct crush_bucket_tree::num_nodes is u8, so ceph_decode_8_safe()
should be used.  -Wconversion catches this, but I guess it went
unnoticed in all the noise it spews.  The actual problem (at least for
common crushmaps) isn't the u32 -> u8 truncation though - it's the
advancement by 4 bytes instead of 1 in the crushmap buffer.

Fixes: http://tracker.ceph.com/issues/2759
Cc: [email protected]
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
9 years agoarm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs
Shannon Zhao [Mon, 29 Jun 2015 08:02:40 +0000 (09:02 +0100)]
arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs

Commit d795ef9aa831 ("arm64: perf: don't warn about missing
interrupt-affinity property for PPIs") added a check for PPIs so that
we avoid parsing the interrupt-affinity property for these naturally
affine interrupts.

Unfortunately, this check can trigger an early (successful) return and
we will not assign the value of cpu_pmu->plat_device. This patch fixes
the issue.

Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
9 years agoarm64: perf: Don't use of_node after putting it
Stephen Boyd [Wed, 3 Jun 2015 20:53:37 +0000 (21:53 +0100)]
arm64: perf: Don't use of_node after putting it

It's possible, albeit unlikely, that using the of_node here will
reference freed memory. Call of_node_put() after printing the
name to be safe.

Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
9 years agoarm64: fix incorrect use of pgprot_t variable
Ard Biesheuvel [Tue, 30 Jun 2015 16:04:49 +0000 (18:04 +0200)]
arm64: fix incorrect use of pgprot_t variable

This fixes a build failure under STRICT_MM_TYPECHECKS, by adding
a missing pgprot_val() around a pgport_t reference.

Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
9 years agosock_diag: don't broadcast kernel sockets
Craig Gallek [Tue, 30 Jun 2015 16:49:32 +0000 (12:49 -0400)]
sock_diag: don't broadcast kernel sockets

Kernel sockets do not hold a reference for the network namespace to
which they point.  Socket destruction broadcasting relies on the
network namespace and will cause the splat below when a kernel socket
is destroyed.

This fix simply ignores kernel sockets when they are destroyed.

Reported as:
general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
CPU: 1 PID: 9130 Comm: kworker/1:1 Not tainted 4.1.0-gelk-debug+ #1
Workqueue: sock_diag_events sock_diag_broadcast_destroy_work
Stack:
 ffff8800b9c586c0 ffff8800b9c586c0 ffff8800ac4692c0 ffff8800936d4a90
 ffff8800352efd38 ffffffff8469a93e ffff8800352efd98 ffffffffc09b9b90
 ffff8800352efd78 ffff8800ac4692c0 ffff8800b9c586c0 ffff8800831b6ab8
Call Trace:
 [<ffffffff8469a93e>] ? mutex_unlock+0xe/0x10
 [<ffffffffc09b9b90>] ? inet_diag_handler_get_info+0x110/0x1fb [inet_diag]
 [<ffffffff845c868d>] netlink_broadcast+0x1d/0x20
 [<ffffffff8469a93e>] ? mutex_unlock+0xe/0x10
 [<ffffffff845b2bf5>] sock_diag_broadcast_destroy_work+0xd5/0x160
 [<ffffffff8408ea97>] process_one_work+0x147/0x420
 [<ffffffff8408f0f9>] worker_thread+0x69/0x470
 [<ffffffff8409fda3>] ? preempt_count_sub+0xa3/0xf0
 [<ffffffff8408f090>] ? rescuer_thread+0x320/0x320
 [<ffffffff84093cd7>] kthread+0x107/0x120
 [<ffffffff84093bd0>] ? kthread_create_on_node+0x1b0/0x1b0
 [<ffffffff8469d31f>] ret_from_fork+0x3f/0x70
 [<ffffffff84093bd0>] ? kthread_create_on_node+0x1b0/0x1b0

Tested:
  Using a debug kernel while 'ss -E' is running:
  ip netns add test-ns
  ip netns delete test-ns

Fixes: eb4cb008529c sock_diag: define destruction multicast groups
Fixes: 26abe14379f8 net: Modify sk_alloc to not reference count the
  netns of kernel sockets.
Reported-by: Dave Jones <[email protected]>
Suggested-by: Eric Dumazet <[email protected]>
Signed-off-by: Craig Gallek <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'mvneta-jumbo-frames'
David S. Miller [Tue, 30 Jun 2015 16:37:10 +0000 (09:37 -0700)]
Merge branch 'mvneta-jumbo-frames'

Simon Guinot says:

====================
Fix Ethernet jumbo frames support for Armada 370 and 38x

This patch series fixes the Ethernet jumbo frames support for the SoCs
Armada 370, 380 and 385. Unlike Armada XP, the Ethernet controller for
this SoCs don't support TCP/IP checksumming with a frame size larger
than 1600 bytes.

This patches should be applied to the -stable kernels 3.8 and onwards.

Changes since v1:
- Use a new compatible string for the Ethernet IP found in Armada XP
  SoCs (instead of using an optional property).
- Fix the issue for the Armada 380 and 385 SoCs as well.

Changes since v2:
- Add Acked-by from Gregory Clement.
- Add "Fixes:" tag to each commits.

Changes since v3:
- Fix patch 3 name: replace prefix "ARM: mvebu:" with "net: mvneta:".
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agonet: mvneta: disable IP checksum with jumbo frames for Armada 370
Simon Guinot [Tue, 30 Jun 2015 14:20:22 +0000 (16:20 +0200)]
net: mvneta: disable IP checksum with jumbo frames for Armada 370

The Ethernet controller found in the Armada 370, 380 and 385 SoCs don't
support TCP/IP checksumming with frame sizes larger than 1600 bytes.

This patch fixes the issue by disabling the features NETIF_F_IP_CSUM and
NETIF_F_TSO for the Armada 370 and compatibles SoCs when the MTU is set
to a value greater than 1600 bytes.

Signed-off-by: Simon Guinot <[email protected]>
Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Cc: <[email protected]> # v3.8+
Acked-by: Thomas Petazzoni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoARM: mvebu: update Ethernet compatible string for Armada XP
Simon Guinot [Tue, 30 Jun 2015 14:20:21 +0000 (16:20 +0200)]
ARM: mvebu: update Ethernet compatible string for Armada XP

This patch updates the Ethernet DT nodes for Armada XP SoCs with the
compatible string "marvell,armada-xp-neta".

Signed-off-by: Simon Guinot <[email protected]>
Fixes: 77916519cba3 ("arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces")
Cc: <[email protected]> # v3.8+
Acked-by: Gregory CLEMENT <[email protected]>
Reviewed-by: Thomas Petazzoni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: mvneta: introduce compatible string "marvell, armada-xp-neta"
Simon Guinot [Tue, 30 Jun 2015 14:20:20 +0000 (16:20 +0200)]
net: mvneta: introduce compatible string "marvell, armada-xp-neta"

The mvneta driver supports the Ethernet IP found in the Armada 370, XP,
380 and 385 SoCs. Since at least one more hardware feature is available
for the Armada XP SoCs then a way to identify them is needed.

This patch introduces a new compatible string "marvell,armada-xp-neta".

Signed-off-by: Simon Guinot <[email protected]>
Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Cc: <[email protected]> # v3.8+
Acked-by: Gregory CLEMENT <[email protected]>
Acked-by: Thomas Petazzoni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoof/irq: Rename "intc_desc" to "of_intc_desc" to fix OF on sh
Geert Uytterhoeven [Fri, 26 Jun 2015 12:42:45 +0000 (14:42 +0200)]
of/irq: Rename "intc_desc" to "of_intc_desc" to fix OF on sh

Now CONFIG_OF can be enabled on sh:

    drivers/of/irq.c:472:8: error: redefinition of 'struct intc_desc'
    include/linux/sh_intc.h:109:8: note: originally defined here

As "intc_desc" is used all over the place in sh platform code, while
drivers/of/irq.c has a local definition used in a single function,
rename the latter by prefixing it with "of_".

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
9 years agoof/irq: Fix pSeries boot failure
Jeremy Linton [Mon, 29 Jun 2015 23:50:55 +0000 (18:50 -0500)]
of/irq: Fix pSeries boot failure

of_irq_parse_raw() needs to return the correct interrupt controller
node when an interrupt-map property doesn't exist.

It allows of_irq_parse_raw() to return the node pointer of the interrupt
controller, rather than the parent bus. This allows ics_rtas_host_match()
to detect that the controller is a legacy 8259 and avoid using xics.
This avoids an RTAS assertion/crash during early kernel bootstrapping.

Signed-off-by: Jeremy Linton <[email protected]>
Reviewed-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
9 years agodrm/i915: Clear pipe's pll hw state in hsw_dp_set_ddi_pll_sel()
Ander Conselvan de Oliveira [Tue, 30 Jun 2015 13:10:38 +0000 (16:10 +0300)]
drm/i915: Clear pipe's pll hw state in hsw_dp_set_ddi_pll_sel()

Similarly to what is done for SKL, clear the dpll_hw_state of the pipe
config in hsw_dp_set_ddi_pll_sel(), since it main contain stale values.
That can happen if a crtc that was previously driving an HDMI connector
switches to a DP connector. In that case, the wrpll field was left with
its old value, leading to warnings like the one below:

[drm:check_crtc_state [i915]] *ERROR* mismatch in dpll_hw_state.wrpll (expected 0xb035061f, found 0x00000000)
------------[ cut here ]------------
WARNING: CPU: 1 PID: 767 at drivers/gpu/drm/i915/intel_display.c:12324 check_crtc_state+0x975/0x10b0 [i915]()
pipe state doesn't match!

This regression was indroduced in

commit dd3cd74acf12723045a64f1f2c6298ac7b34a5d5
Author: Ander Conselvan de Oliveira <[email protected]>
Date:   Fri May 15 13:34:29 2015 +0300

    drm/i915: Don't overwrite (e)DP PLL selection on SKL

Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: Ander Conselvan de Oliveira <[email protected]>
Tested-by: Jani Nikula <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
9 years agodrm/radeon: only check the sink type on DP connectors
Alex Deucher [Tue, 30 Jun 2015 13:30:01 +0000 (09:30 -0400)]
drm/radeon: only check the sink type on DP connectors

Avoids a crash on pre-DP asics that support HDMI.

Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
9 years agoMerge remote-tracking branch 'robh/for-next' into devicetree/next
Grant Likely [Tue, 30 Jun 2015 13:28:52 +0000 (14:28 +0100)]
Merge remote-tracking branch 'robh/for-next' into devicetree/next

9 years agoperf/x86: Fix 'active_events' imbalance
Peter Zijlstra [Wed, 24 Jun 2015 14:47:50 +0000 (16:47 +0200)]
perf/x86: Fix 'active_events' imbalance

Commit 1b7b938f1817 ("perf/x86/intel: Fix PMI handling for Intel PT") conditionally
increments active_events in x86_add_exclusive() but unconditionally decrements in
x86_del_exclusive().

These extra decrements can lead to the situation where
active_events is zero and thus the PMI handler is 'disabled'
while we have active events on the PMU generating PMIs.

This leads to a truckload of:

  Uhhuh. NMI received for unknown reason 21 on CPU 28.
  Do you have a strange power saving mode enabled?
  Dazed and confused, but trying to continue

messages and generally messes up perf.

Remove the condition on the increment, double increment balanced
by a double decrement is perfectly fine.

Restructure the code a little bit to make the unconditional inc
a bit more natural.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Fixes: 1b7b938f1817 ("perf/x86/intel: Fix PMI handling for Intel PT")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
9 years agoMerge branch 'x86/boot' into x86/urgent
Ingo Molnar [Tue, 30 Jun 2015 05:57:04 +0000 (07:57 +0200)]
Merge branch 'x86/boot' into x86/urgent

Merge branch that got ready.

Signed-off-by: Ingo Molnar <[email protected]>
9 years agox86/fpu: Fix FPU related boot regression when CPUID masking BIOS feature is enabled
Ingo Molnar [Sat, 27 Jun 2015 08:25:14 +0000 (10:25 +0200)]
x86/fpu: Fix FPU related boot regression when CPUID masking BIOS feature is enabled

Mike Galbraith reported:

  " My i7-4790 box is having one hell of a time with this merge
    window, dead in the water.

    BIOS setting "Limit CPUID Maximum" upsets new fpu code
    mightily. "

It turns out that Linux does a double workaround here, as per:

  066941bd4eeb ("x86: unmask CPUID levels on Intel CPUs")

it undoes the BIOS workaround - but as a side effect the CPUID
state is not completely constant during early init anymore,
and the new FPU init code did not take this into account.

So what happened is that the xstate init code did not have full
CPUID available, which broke subsequent attempts to use xstate
features.

Fix this by ordering the early FPU init code to after we've
stabilized the CPUID state.

Reported-bisected-and-tested-by: Mike Galbraith <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
9 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Tue, 30 Jun 2015 04:47:32 +0000 (06:47 +0200)]
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Validate syscall list passed via -e argument to 'perf trace'. (Arnaldo Carvalho de Melo)

  - Introduce 'perf stat --per-thread'. (Jiri Olsa)

  - Check access permission for --kallsyms and --vmlinux. (Li Zhang)

Infrastructure changes:

  - Move stuff out of 'perf stat' and into the lib for further use. (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
9 years agoapi: fix compatibility of linux/in.h with netinet/in.h
Stephen Hemminger [Tue, 30 Jun 2015 00:57:48 +0000 (14:57 -1000)]
api: fix compatibility of linux/in.h with netinet/in.h

u
This fixes breakage to iproute2 build with recent kernel headers
caused by:
   commit a263653ed798216c0069922d7b5237ca49436007
   Author: Pablo Neira Ayuso <[email protected]>
   Date:   Wed Jun 17 10:28:27 2015 -0500

   netfilter: don't pull include/linux/netfilter.h from netns headers

The issue is that definitions in linux/in.h overlap with those
in netinet/in.h. This patch solves this by introducing the same
mechanism as was used to solve the same problem with linux/in6.h

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: icplus: fix typo in constant name
Nik Nyby [Mon, 29 Jun 2015 22:40:08 +0000 (18:40 -0400)]
net: icplus: fix typo in constant name

This fixes a typo in the IPG_FRAMETOOLONGERRORS constant.

Signed-off-by: Nik Nyby <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agointel_pmc_ipc: Add Intel Apollo Lake PMC IPC driver
qipeng.zha [Fri, 26 Jun 2015 16:32:15 +0000 (00:32 +0800)]
intel_pmc_ipc: Add Intel Apollo Lake PMC IPC driver

This driver provides support for PMC control on Apollo Lake platforms.
The PMC is an ARC processor which defines some IPC commands for
communication with other entities in the CPU.

Signed-off-by: qipeng.zha <[email protected]>
[[email protected]: Fix Sparse and Cocinelle warnings]
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
9 years agoiommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable...
Markus Elfring [Mon, 29 Jun 2015 16:47:43 +0000 (17:47 +0100)]
iommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable_ops"

The free_io_pgtable_ops() 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 <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
9 years agoiommu/arm-smmu: Fix broken ATOS check
Will Deacon [Mon, 29 Jun 2015 16:47:42 +0000 (17:47 +0100)]
iommu/arm-smmu: Fix broken ATOS check

Commit 83a60ed8f0b5 ("iommu/arm-smmu: fix ARM_SMMU_FEAT_TRANS_OPS
condition") accidentally negated the ID0_ATOSNS predicate in the ATOS
feature check, causing the driver to attempt ATOS requests on SMMUv2
hardware without the ATOS feature implemented.

This patch restores the predicate to the correct value.

Cc: <[email protected]> # 4.0+
Reported-by: Varun Sethi <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
9 years agoiommu: Ignore -ENODEV errors from add_device call-back
Joerg Roedel [Mon, 29 Jun 2015 08:16:08 +0000 (10:16 +0200)]
iommu: Ignore -ENODEV errors from add_device call-back

The -ENODEV error just means that the device is not
translated by an IOMMU. We shouldn't bail out of iommu
driver initialization when that happens, as this is a common
scenario on ARM.

Not returning -ENODEV in the drivers would be a bad idea, as
the IOMMU core would have no indication whether a device is
translated or not. This indication is not used at the
moment, but will probably be in the future.

Fixes: 19762d7 ("iommu: Propagate error in add_iommu_group")
Tested-by: Marek Szyprowski <[email protected]>
Tested-by: Eric Auger <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
9 years agoInput: arc_ps2 - add HAS_IOMEM dependency
Sebastian Ott [Mon, 29 Jun 2015 19:13:05 +0000 (12:13 -0700)]
Input: arc_ps2 - add HAS_IOMEM dependency

Fix this compile error:

drivers/built-in.o: In function `arc_ps2_probe':
/mnt/linux/drivers/input/serio/arc_ps2.c:206: undefined reference to `devm_ioremap_resource'

Signed-off-by: Sebastian Ott <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
9 years agoInput: wdt87xx_i2c - fix format warning
Dmitry Torokhov [Mon, 29 Jun 2015 18:56:27 +0000 (11:56 -0700)]
Input: wdt87xx_i2c - fix format warning

This fixes the following warning:

   drivers/input/touchscreen/wdt87xx_i2c.c: In function 'wdt87xx_validate_firmware':
>> drivers/input/touchscreen/wdt87xx_i2c.c:472:4: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t' [-Wformat=]
       size, fw->size);

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
9 years agodrm/amdgpu: add flag to delay VM updates
Christian König [Mon, 29 Jun 2015 15:12:20 +0000 (17:12 +0200)]
drm/amdgpu: add flag to delay VM updates

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: add optional dependencies to the CS IOCTL v2
Christian König [Fri, 19 Jun 2015 15:31:29 +0000 (17:31 +0200)]
drm/amdgpu: add optional dependencies to the CS IOCTL v2

v2: remove unrelated whitespace change, fix C comment

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: recreate fence from user seq
Christian König [Fri, 19 Jun 2015 15:00:19 +0000 (17:00 +0200)]
drm/amdgpu: recreate fence from user seq

And use common fence infrastructure for the wait.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
9 years agogpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not set
Alexander Kuleshov [Sat, 27 Jun 2015 07:16:05 +0000 (13:16 +0600)]
gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not set

If the CONFIG_DEBUG_FS is not selected, compilation of the
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c provides two warnings that
amdgpu_debugfs_regs_init and amdgpu_debugfs_regs_cleanup are used but
never defined. And as result:

ERROR: "amdgpu_debugfs_regs_cleanup" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "amdgpu_debugfs_regs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
            ^
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alexander Kuleshov <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agoRevert "drm/radeon: dont switch vt on suspend"
Alex Deucher [Mon, 29 Jun 2015 15:09:11 +0000 (11:09 -0400)]
Revert "drm/radeon: dont switch vt on suspend"

This reverts commit b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe.

This seems to break the cursor on resume for lots of systems.

Cc: [email protected]
9 years agosis900: Trivial: Fix typos in enums
Nik Nyby [Mon, 29 Jun 2015 19:49:43 +0000 (15:49 -0400)]
sis900: Trivial: Fix typos in enums

"reigster" -> "register"

Signed-off-by: Nik Nyby <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agocifs: Unset CIFS_MOUNT_POSIX_PATHS flag when following dfs mounts
Sachin Prabhu [Tue, 16 Jun 2015 15:36:17 +0000 (16:36 +0100)]
cifs: Unset CIFS_MOUNT_POSIX_PATHS flag when following dfs mounts

In a dfs setup where the client transitions from a server which supports
posix paths to a server which doesn't support posix paths, the flag
CIFS_MOUNT_POSIX_PATHS is not reset. This leads to the wrong directory
separator being used causing smb commands to fail.

Consider the following case where a dfs share on a samba server points
to a share on windows smb server.
 # mount -t cifs -o .. //vm140-31/dfsroot/testwin/
 # ls -l /mnt; touch /mnt/a
 total 0
 touch: cannot touch ‘/mnt/a’: No such file or directory

Signed-off-by: Sachin Prabhu <[email protected]>
Acked-by: Jeff Layton <[email protected]>
Signed-off-by: Steve French <[email protected]>
9 years agostmmac: Trivial: fix typo in constant name
Nik Nyby [Mon, 29 Jun 2015 19:39:27 +0000 (15:39 -0400)]
stmmac: Trivial: fix typo in constant name

This fixes a typo in the MMC_RX_CRC_ERROR constant.

Signed-off-by: Nik Nyby <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge tag 'md/4.2' of git://neil.brown.name/md
Linus Torvalds [Mon, 29 Jun 2015 18:10:56 +0000 (11:10 -0700)]
Merge tag 'md/4.2' of git://neil.brown.name/md

Pull md updates from Neil Brown:
 "A mixed bag

   - a few bug fixes
   - some performance improvement that decrease lock contention
   - some clean-up

  Nothing major"

* tag 'md/4.2' of git://neil.brown.name/md:
  md: clear Blocked flag on failed devices when array is read-only.
  md: unlock mddev_lock on an error path.
  md: clear mddev->private when it has been freed.
  md: fix a build warning
  md/raid5: ignore released_stripes check
  md/raid5: per hash value and exclusive wait_for_stripe
  md/raid5: split wait_for_stripe and introduce wait_for_quiescent
  wait: introduce wait_event_exclusive_cmd
  md: convert to kstrto*()
  md/raid10: make sync_request_write() call bio_copy_data()

9 years agoFix kmalloc slab creation sequence
Christoph Lameter [Mon, 29 Jun 2015 14:28:08 +0000 (09:28 -0500)]
Fix kmalloc slab creation sequence

This patch restores the slab creation sequence that was broken by commit
4066c33d0308f8 and also reverts the portions that introduced the
KMALLOC_LOOP_XXX macros. Those can never really work since the slab creation
is much more complex than just going from a minimum to a maximum number.

The latest upstream kernel boots cleanly on my machine with a 64 bit x86
configuration under KVM using either SLAB or SLUB.

Fixes: 4066c33d0308f8 ("support the slub_debug boot option")
Reported-by: Theodore Ts'o <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
9 years agoMerge tag 'libnvdimm-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw...
Linus Torvalds [Mon, 29 Jun 2015 17:34:42 +0000 (10:34 -0700)]
Merge tag 'libnvdimm-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm

Pull libnvdimm subsystem from Dan Williams:
 "The libnvdimm sub-system introduces, in addition to the
  libnvdimm-core, 4 drivers / enabling modules:

  NFIT:
    Instantiates an "nvdimm bus" with the core and registers memory
    devices (NVDIMMs) enumerated by the ACPI 6.0 NFIT (NVDIMM Firmware
    Interface table).

    After registering NVDIMMs the NFIT driver then registers "region"
    devices.  A libnvdimm-region defines an access mode and the
    boundaries of persistent memory media.  A region may span multiple
    NVDIMMs that are interleaved by the hardware memory controller.  In
    turn, a libnvdimm-region can be carved into a "namespace" device and
    bound to the PMEM or BLK driver which will attach a Linux block
    device (disk) interface to the memory.

  PMEM:
    Initially merged in v4.1 this driver for contiguous spans of
    persistent memory address ranges is re-worked to drive
    PMEM-namespaces emitted by the libnvdimm-core.

    In this update the PMEM driver, on x86, gains the ability to assert
    that writes to persistent memory have been flushed all the way
    through the caches and buffers in the platform to persistent media.
    See memcpy_to_pmem() and wmb_pmem().

  BLK:
    This new driver enables access to persistent memory media through
    "Block Data Windows" as defined by the NFIT.  The primary difference
    of this driver to PMEM is that only a small window of persistent
    memory is mapped into system address space at any given point in
    time.

    Per-NVDIMM windows are reprogrammed at run time, per-I/O, to access
    different portions of the media.  BLK-mode, by definition, does not
    support DAX.

  BTT:
    This is a library, optionally consumed by either PMEM or BLK, that
    converts a byte-accessible namespace into a disk with atomic sector
    update semantics (prevents sector tearing on crash or power loss).

    The sinister aspect of sector tearing is that most applications do
    not know they have a atomic sector dependency.  At least today's
    disk's rarely ever tear sectors and if they do one almost certainly
    gets a CRC error on access.  NVDIMMs will always tear and always
    silently.  Until an application is audited to be robust in the
    presence of sector-tearing the usage of BTT is recommended.

  Thanks to: Ross Zwisler, Jeff Moyer, Vishal Verma, Christoph Hellwig,
  Ingo Molnar, Neil Brown, Boaz Harrosh, Robert Elliott, Matthew Wilcox,
  Andy Rudoff, Linda Knippers, Toshi Kani, Nicholas Moulin, Rafael
  Wysocki, and Bob Moore"

* tag 'libnvdimm-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm: (33 commits)
  arch, x86: pmem api for ensuring durability of persistent memory updates
  libnvdimm: Add sysfs numa_node to NVDIMM devices
  libnvdimm: Set numa_node to NVDIMM devices
  acpi: Add acpi_map_pxm_to_online_node()
  libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only
  pmem: flag pmem block devices as non-rotational
  libnvdimm: enable iostat
  pmem: make_request cleanups
  libnvdimm, pmem: fix up max_hw_sectors
  libnvdimm, blk: add support for blk integrity
  libnvdimm, btt: add support for blk integrity
  fs/block_dev.c: skip rw_page if bdev has integrity
  libnvdimm: Non-Volatile Devices
  tools/testing/nvdimm: libnvdimm unit test infrastructure
  libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory
  nd_btt: atomic sector updates
  libnvdimm: infrastructure for btt devices
  libnvdimm: write blk label set
  libnvdimm: write pmem label set
  libnvdimm: blk labels and namespace instantiation
  ...

9 years agoleds:lp55xx: fix firmware loading error
Milo Kim [Mon, 29 Jun 2015 00:39:14 +0000 (17:39 -0700)]
leds:lp55xx: fix firmware loading error

LP55xx driver uses not firmware file but raw data to load program through
the firmware interface.(Documents/leds/leds-lp55xx.txt)

  For example, here is how to run blinking green channel pattern.
  (The second engine is seleted and MUX is mapped to 'RGB' mode)
  echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
  echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux
  echo 1 > /sys/class/firmware/lp5562/loading
  echo "4000600040FF6000" > /sys/class/firmware/lp5562/data
  echo 0 > /sys/class/firmware/lp5562/loading
  echo 1 > /sys/bus/i2c/devices/xxxx/run_engine

However, '/sys/class/firmware/<device name>' is not created after the
firmware loader user helper was introduced.
This feature is used in the case below.

  As soon as the firmware download is requested by the driver, firmware
  class subsystem tries to find the binary file.
  If it gets failed, then it just falls back to user helper to load
  raw data manually. Here, you can see the device file under
  /sys/class/firmware/.

To make it happen, LP55xx driver requires two configurations.

  1. Enable CONFIG_FW_LOADER_USER_HELPER_FALLBACK in Kconfig
  2. Set option, 'FW_OPT_USERHELPER' on requesting the firmware data.
     It means the second option should be 'false' in
     request_firmware_nowait().
     This option enables to load firmware data manually by calling
     fw_load_from_user_helper().

Cc: [email protected]
Signed-off-by: Milo Kim <[email protected]>
Acked-by: Jacek Anaszewski <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
9 years agoleds: fix max77693-led build errors
Jacek Anaszewski [Mon, 29 Jun 2015 14:45:23 +0000 (07:45 -0700)]
leds: fix max77693-led build errors

Fix build errors when LEDS_MAX77693=y and V4L2_FLASH_LED_CLASS=m
by restricting LEDS_MAX77693 to =m if V4L2_FLASH_LED_CLASS=m.

drivers/leds/leds-max77693.c:1062: undefined reference to `v4l2_flash_release'
drivers/leds/leds-max77693.c:1068: undefined reference to `v4l2_flash_release'
drivers/built-in.o: In function `max77693_register_led':
drivers/leds/leds-max77693.c:968: undefined reference to `v4l2_flash_init'
drivers/built-in.o: In function `max77693_led_probe':
drivers/leds/leds-max77693.c:1048: undefined reference to `v4l2_flash_release'

Signed-off-by: Jacek Anaszewski <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
9 years agoALSA: Fix uninintialized error return
Colin Ian King [Mon, 29 Jun 2015 16:10:22 +0000 (17:10 +0100)]
ALSA: Fix uninintialized error return

Static analysis with cppcheck found the following error:
  [sound/core/init.c:118]: (error) Uninitialized variable: err

..this was introduced by commit 2471b6c80a70e80de69f5ff4c37187c3912e5874
("ALSA: info: Register proc entries recursively, too") where the call
to snd_info_card_register was removed and no longer setting the error
return in err.  When snd_info_create_card_entry fails to allocate a
an entry, the error path exits with garbage in err.  Fix is to return
-ENOMEM if entry fails to be allocated.

Fixes: 2471b6c80a ("ALSA: info: Register proc entries recursively, too")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
9 years agoleds: fix aat1290 build errors
Randy Dunlap [Fri, 26 Jun 2015 19:00:20 +0000 (12:00 -0700)]
leds: fix aat1290 build errors

Fix build errors when LEDS_AAT1290=y and V4L2_FLASH_LED_CLASS=m
by restricting LEDS_AAT1290 to =m if V4L2_FLASH_LED_CLASS=m.

drivers/built-in.o: In function `aat1290_led_remove':
leds-aat1290.c:(.text+0xe5d77): undefined reference to `v4l2_flash_release'
drivers/built-in.o: In function `aat1290_led_probe':
leds-aat1290.c:(.text+0xe6494): undefined reference to `v4l2_flash_init'

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Richard Purdie <[email protected]>
Acked-by: Jacek Anaszewski <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
9 years agolibceph: Fix ceph_tcp_sendpage()'s more boolean usage
Benoît Canet [Thu, 25 Jun 2015 17:32:34 +0000 (20:32 +0300)]
libceph: Fix ceph_tcp_sendpage()'s more boolean usage

From struct ceph_msg_data_cursor in include/linux/ceph/messenger.h:

bool    last_piece;     /* current is last piece */

In ceph_msg_data_next():

*last_piece = cursor->last_piece;

A call to ceph_msg_data_next() is followed by:

ret = ceph_tcp_sendpage(con->sock, page, page_offset,
                        length, last_piece);

while ceph_tcp_sendpage() is:

static int ceph_tcp_sendpage(struct socket *sock, struct page *page,
                             int offset, size_t size, bool more)

The logic is inverted: correct it.

Signed-off-by: Benoît Canet <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
9 years agoMerge tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Mon, 29 Jun 2015 16:44:45 +0000 (09:44 -0700)]
Merge tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine updates from Vinod Koul:
 "This time we have support for few new devices, few new features and
  odd fixes spread thru the subsystem.

  New devices added:
   - support for CSRatlas7 dma controller
   - Allwinner H3(sun8i) controller
   - TI DMA crossbar driver on DRA7x
   - new pxa driver

  New features added:
   - memset support is bought back now that we have a user in xdmac controller
   - interleaved transfers support different source and destination strides
   - supporting DMA routers and configuration thru DT
   - support for reusing descriptors
   - xdmac memset and interleaved transfer support
   - hdmac support for interleaved transfers
   - omap-dma support for memcpy

  Others:
   - Constify platform_device_id
   - mv_xor fixes and improvements"

* tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (46 commits)
  dmaengine: xgene: fix file permission
  dmaengine: fsl-edma: clear pending interrupts on initialization
  dmaengine: xdmac: Add memset support
  Documentation: dmaengine: document DMA_CTRL_ACK
  dmaengine: virt-dma: don't always free descriptor upon completion
  dmaengine: Revert "drivers/dma: remove unused support for MEMSET operations"
  dmaengine: hdmac: Implement interleaved transfers
  dmaengine: Move icg helpers to global header
  dmaengine: mv_xor: improve descriptors list handling and reduce locking
  dmaengine: mv_xor: Enlarge descriptor pool size
  dmaengine: mv_xor: add support for a38x command in descriptor mode
  dmaengine: mv_xor: Rename function for consistent naming
  dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup
  dmaengine: pl330: fix wording in mcbufsz message
  dmaengine: sirf: add CSRatlas7 SoC support
  dmaengine: xgene-dma: Fix "incorrect type in assignement" warnings
  dmaengine: fix kernel-doc documentation
  dmaengine: pxa_dma: add support for legacy transition
  dmaengine: pxa_dma: add debug information
  dmaengine: pxa: add pxa dmaengine driver
  ...

9 years agosctp: Fix race between OOTB responce and route removal
Alexander Sverdlin [Mon, 29 Jun 2015 08:41:03 +0000 (10:41 +0200)]
sctp: Fix race between OOTB responce and route removal

There is NULL pointer dereference possible during statistics update if the route
used for OOTB responce is removed at unfortunate time. If the route exists when
we receive OOTB packet and we finally jump into sctp_packet_transmit() to send
ABORT, but in the meantime route is removed under our feet, we take "no_route"
path and try to update stats with IP_INC_STATS(sock_net(asoc->base.sk), ...).

But sctp_ootb_pkt_new() used to prepare responce packet doesn't call
sctp_transport_set_owner() and therefore there is no asoc associated with this
packet. Probably temporary asoc just for OOTB responces is overkill, so just
introduce a check like in all other places in sctp_packet_transmit(), where
"asoc" is dereferenced.

To reproduce this, one needs to
0. ensure that sctp module is loaded (otherwise ABORT is not generated)
1. remove default route on the machine
2. while true; do
     ip route del [interface-specific route]
     ip route add [interface-specific route]
   done
3. send enough OOTB packets (i.e. HB REQs) from another host to trigger ABORT
   responce

On x86_64 the crash looks like this:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
PGD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: ...
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O    4.0.5-1-ARCH #1
Hardware name: ...
task: ffffffff818124c0 ti: ffffffff81800000 task.ti: ffffffff81800000
RIP: 0010:[<ffffffffa05ec9ac>]  [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
RSP: 0018:ffff880127c037b8  EFLAGS: 00010296
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000015ff66b480
RDX: 00000015ff66b400 RSI: ffff880127c17200 RDI: ffff880123403700
RBP: ffff880127c03888 R08: 0000000000017200 R09: ffffffff814625af
R10: ffffea00047e4680 R11: 00000000ffffff80 R12: ffff8800b0d38a28
R13: ffff8800b0d38a28 R14: ffff8800b3e88000 R15: ffffffffa05f24e0
FS:  0000000000000000(0000) GS:ffff880127c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000020 CR3: 00000000c855b000 CR4: 00000000000007f0
Stack:
 ffff880127c03910 ffff8800b0d38a28 ffffffff8189d240 ffff88011f91b400
 ffff880127c03828 ffffffffa05c94c5 0000000000000000 ffff8800baa1c520
 0000000000000000 0000000000000001 0000000000000000 0000000000000000
Call Trace:
 <IRQ>
 [<ffffffffa05c94c5>] ? sctp_sf_tabort_8_4_8.isra.20+0x85/0x140 [sctp]
 [<ffffffffa05d6b42>] ? sctp_transport_put+0x52/0x80 [sctp]
 [<ffffffffa05d0bfc>] sctp_do_sm+0xb8c/0x19a0 [sctp]
 [<ffffffff810b0e00>] ? trigger_load_balance+0x90/0x210
 [<ffffffff810e0329>] ? update_process_times+0x59/0x60
 [<ffffffff812c7a40>] ? timerqueue_add+0x60/0xb0
 [<ffffffff810e0549>] ? enqueue_hrtimer+0x29/0xa0
 [<ffffffff8101f599>] ? read_tsc+0x9/0x10
 [<ffffffff8116d4b5>] ? put_page+0x55/0x60
 [<ffffffff810ee1ad>] ? clockevents_program_event+0x6d/0x100
 [<ffffffff81462b68>] ? skb_free_head+0x58/0x80
 [<ffffffffa029a10b>] ? chksum_update+0x1b/0x27 [crc32c_generic]
 [<ffffffff81283f3e>] ? crypto_shash_update+0xce/0xf0
 [<ffffffffa05d3993>] sctp_endpoint_bh_rcv+0x113/0x280 [sctp]
 [<ffffffffa05dd4e6>] sctp_inq_push+0x46/0x60 [sctp]
 [<ffffffffa05ed7a0>] sctp_rcv+0x880/0x910 [sctp]
 [<ffffffffa05ecb50>] ? sctp_packet_transmit_chunk+0xb0/0xb0 [sctp]
 [<ffffffffa05ecb70>] ? sctp_csum_update+0x20/0x20 [sctp]
 [<ffffffff814b05a5>] ? ip_route_input_noref+0x235/0xd30
 [<ffffffff81051d6b>] ? ack_ioapic_level+0x7b/0x150
 [<ffffffff814b27be>] ip_local_deliver_finish+0xae/0x210
 [<ffffffff814b2e15>] ip_local_deliver+0x35/0x90
 [<ffffffff814b2a15>] ip_rcv_finish+0xf5/0x370
 [<ffffffff814b3128>] ip_rcv+0x2b8/0x3a0
 [<ffffffff81474193>] __netif_receive_skb_core+0x763/0xa50
 [<ffffffff81476c28>] __netif_receive_skb+0x18/0x60
 [<ffffffff81476cb0>] netif_receive_skb_internal+0x40/0xd0
 [<ffffffff814776c8>] napi_gro_receive+0xe8/0x120
 [<ffffffffa03946aa>] rtl8169_poll+0x2da/0x660 [r8169]
 [<ffffffff8147896a>] net_rx_action+0x21a/0x360
 [<ffffffff81078dc1>] __do_softirq+0xe1/0x2d0
 [<ffffffff8107912d>] irq_exit+0xad/0xb0
 [<ffffffff8157d158>] do_IRQ+0x58/0xf0
 [<ffffffff8157b06d>] common_interrupt+0x6d/0x6d
 <EOI>
 [<ffffffff810e1218>] ? hrtimer_start+0x18/0x20
 [<ffffffffa05d65f9>] ? sctp_transport_destroy_rcu+0x29/0x30 [sctp]
 [<ffffffff81020c50>] ? mwait_idle+0x60/0xa0
 [<ffffffff810216ef>] arch_cpu_idle+0xf/0x20
 [<ffffffff810b731c>] cpu_startup_entry+0x3ec/0x480
 [<ffffffff8156b365>] rest_init+0x85/0x90
 [<ffffffff818eb035>] start_kernel+0x48b/0x4ac
 [<ffffffff818ea120>] ? early_idt_handlers+0x120/0x120
 [<ffffffff818ea339>] x86_64_start_reservations+0x2a/0x2c
 [<ffffffff818ea49c>] x86_64_start_kernel+0x161/0x184
Code: 90 48 8b 80 b8 00 00 00 48 89 85 70 ff ff ff 48 83 bd 70 ff ff ff 00 0f 85 cd fa ff ff 48 89 df 31 db e8 18 63 e7 e0 48 8b 45 80 <48> 8b 40 20 48 8b 40 30 48 8b 80 68 01 00 00 65 48 ff 40 78 e9
RIP  [<ffffffffa05ec9ac>] sctp_packet_transmit+0x63c/0x730 [sctp]
 RSP <ffff880127c037b8>
CR2: 0000000000000020
---[ end trace 5aec7fd2dc983574 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
drm_kms_helper: panic occurred, switching back to text console
---[ end Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Alexander Sverdlin <[email protected]>
Acked-by: Neil Horman <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Acked-by: Vlad Yasevich <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet-Liquidio: Delete unnecessary checks before the function call "vfree"
Markus Elfring [Mon, 29 Jun 2015 10:22:24 +0000 (12:22 +0200)]
net-Liquidio: Delete unnecessary checks before the function call "vfree"

The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agovmxnet3: Bump up driver version number
Shreyas Bhatewara [Mon, 29 Jun 2015 11:14:43 +0000 (04:14 -0700)]
vmxnet3: Bump up driver version number

Bump up the driver version number to reflect the changes done to
work with vmxnet3 adapter version 2

Signed-off-by: Shreyas N Bhatewara <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoamd-xgbe: Add the __GFP_NOWARN flag to Rx buffer allocation
Tom Lendacky [Mon, 29 Jun 2015 16:22:12 +0000 (11:22 -0500)]
amd-xgbe: Add the __GFP_NOWARN flag to Rx buffer allocation

When allocating Rx related buffers, alloc_pages is called using an order
number that is decreased until successful. A system under stress can
experience failures during this allocation process resulting in a warning
being issued. This message can be of concern to end users even though the
failure is not fatal. Since the failure is not fatal and can occur
multiple times, the driver should include the __GFP_NOWARN flag to
suppress the warning message from being issued.

Signed-off-by: Tom Lendacky <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge tag 'please-pull-misc-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 29 Jun 2015 16:25:14 +0000 (09:25 -0700)]
Merge tag 'please-pull-misc-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

Pull ia64 updates from Tony Luck:
 "Pair of ia64 cleanups"

* tag 'please-pull-misc-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  ia64: Use setup_timer
  ia64: export flush_icache_range for module use

9 years agoMerge tag 'linux-kselftest-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 29 Jun 2015 16:11:10 +0000 (09:11 -0700)]
Merge tag 'linux-kselftest-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest update from Shuah Khan:
 "This update adds two new test suites: futex and seccomp.

  In addition, it includes fixes for bugs in timers, other tests, and
  compile framework.  It introduces new quicktest feature to enable
  users to choose to run tests that complete in a short time"

* tag 'linux-kselftest-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: add quicktest support
  selftests: add seccomp suite
  selftest, x86: fix incorrect comment
  tools selftests: Fix 'clean' target with make 3.81
  selftests/futex: Add .gitignore
  kselftest: Add exit code defines
  selftests: Add futex tests to the top-level Makefile
  selftests/futex: Increment ksft pass and fail counters
  selftests/futex: Update Makefile to use lib.mk
  selftests: Add futex functional tests
  kselftests: timers: Check _ALARM clockids are supported before suspending
  kselftests: timers: Ease alarmtimer-suspend unreasonable latency value
  kselftests: timers: Increase delay between suspends in alarmtimer-suspend
  selftests/exec: do not install subdir as it is already created
  selftests/ftrace: install test.d
  selftests: copy TEST_DIRS to INSTALL_PATH
  Test compaction of mlocked memory
  selftests/mount: output WARN messages when mount test skipped
  selftests/timers: Make git ignore all binaries in timers test suite

9 years agonamei: make set_root_rcu() return void
Al Viro [Mon, 29 Jun 2015 16:07:04 +0000 (12:07 -0400)]
namei: make set_root_rcu() return void

The only caller that cares about its return value can just
as easily pick it from nd->root_seq itself.  We used to just
calculate it and return to caller, but these days we are
storing it in nd->root_seq in all cases.

Signed-off-by: Al Viro <[email protected]>
9 years agodrm/amdgpu: disable enable_nb_ps_policy temporarily
Sonny Jiang [Fri, 26 Jun 2015 16:31:46 +0000 (12:31 -0400)]
drm/amdgpu: disable enable_nb_ps_policy temporarily

Fixes a hang on resume.

Signed-off-by: Sonny Jiang <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOn
Sonny Jiang [Fri, 26 Jun 2015 16:26:45 +0000 (12:26 -0400)]
drm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOn

Signed-off-by: Sonny Jiang <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: allocate ip_block_enabled memory in common code
Alex Deucher [Fri, 26 Jun 2015 17:02:57 +0000 (13:02 -0400)]
drm/amdgpu: allocate ip_block_enabled memory in common code

Remove duplication across asic families and make it symmetric
with the freeing of the code in amdgpu_device.c

Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: remove unnecessary check before kfree
Maninder Singh [Fri, 26 Jun 2015 07:56:57 +0000 (13:26 +0530)]
drm/amdgpu: remove unnecessary check before kfree

kfree(NULL) is safe and this check is probably not required

Signed-off-by: Maninder Singh <[email protected]>
Reviewed-by: Vaneet Narang <[email protected]>
Reviewed-by: Christian Konig <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: use kzalloc for allocating one thing
Maninder Singh [Fri, 26 Jun 2015 07:58:50 +0000 (13:28 +0530)]
drm/amdgpu: use kzalloc for allocating one thing

Use kzalloc rather than kcalloc(1.. for allocating
one thing.

Signed-off-by: Maninder Singh <[email protected]>
Reviewed-by: Vaneet Narang <[email protected]>
Reviewed-by: Christian Konig <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/radeon: fix adding all VAs to the freed list on remove v2
Christian König [Fri, 26 Jun 2015 10:31:29 +0000 (12:31 +0200)]
drm/radeon: fix adding all VAs to the freed list on remove v2

We only should do so when the BO_VA was actually mapped.
Otherwise we get a nice error message on the next CS.

v2: It actually doesn't matter if it was invalidated or not,
    if it was mapped we need to clear the area where it was mapped.

Signed-off-by: Christian König <[email protected]>
Tested-by: Michel Dänzer <[email protected]> (v1)
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: add chunk id validity check
Christian König [Tue, 23 Jun 2015 15:07:03 +0000 (17:07 +0200)]
drm/amdgpu: add chunk id validity check

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: fix crash on invalid CS IOCTL
Christian König [Mon, 22 Jun 2015 12:54:32 +0000 (14:54 +0200)]
drm/amdgpu: fix crash on invalid CS IOCTL

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: reset wptr at cp compute resume (v2)
Sonny Jiang [Tue, 23 Jun 2015 15:59:55 +0000 (11:59 -0400)]
drm/amdgpu: reset wptr at cp compute resume (v2)

This patch is to resolve compute hang at resume time.

v2: (agd5f) squash in second fix

Signed-off-by: Sonny Jiang <[email protected]>
Reviewed-by: Christian König <[email protected]>
9 years agodrm/amdgpu: check VCE feedback and bitstream index
Christian König [Fri, 12 Jun 2015 12:16:20 +0000 (14:16 +0200)]
drm/amdgpu: check VCE feedback and bitstream index

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
9 years agodrm/amdgpu: make VCE handle check more strict
Christian König [Thu, 11 Jun 2015 19:33:55 +0000 (21:33 +0200)]
drm/amdgpu: make VCE handle check more strict

Port of radeon commit 29c63fe22a17c64e54016040cd882481bd45ee5a.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
9 years agodrm/amdgpu: check VCE relocation buffer range
Christian König [Thu, 11 Jun 2015 18:56:18 +0000 (20:56 +0200)]
drm/amdgpu: check VCE relocation buffer range

port of radeon commit 2fc5703abda201f138faf63bdca743d04dbf4b1a.

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
9 years agodrm/amdgpu: silence invalid error message
Christian König [Tue, 16 Jun 2015 12:50:02 +0000 (14:50 +0200)]
drm/amdgpu: silence invalid error message

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
9 years agodrm/amdgpu: fix wrong type
monk.liu [Mon, 8 Jun 2015 06:48:15 +0000 (14:48 +0800)]
drm/amdgpu: fix wrong type

Signed-off-by: monk.liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
9 years agodrm/amdgpu: print the bo_list in the CS trace point as well
Christian König [Wed, 10 Jun 2015 17:21:14 +0000 (19:21 +0200)]
drm/amdgpu: print the bo_list in the CS trace point as well

Signed-off-by: Christian König <[email protected]>
Acked-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: add amdgpu_bo_list_set trace point
Christian König [Wed, 10 Jun 2015 12:45:21 +0000 (14:45 +0200)]
drm/amdgpu: add amdgpu_bo_list_set trace point

Signed-off-by: Christian König <[email protected]>
Acked-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: add BO map/unmap trace point
Christian König [Tue, 9 Jun 2015 14:58:33 +0000 (16:58 +0200)]
drm/amdgpu: add BO map/unmap trace point

Signed-off-by: Christian König <[email protected]>
Acked-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: simplify fence debugfs output a bit
Christian König [Tue, 2 Jun 2015 13:47:16 +0000 (15:47 +0200)]
drm/amdgpu: simplify fence debugfs output a bit

Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
9 years agodrm/radeon: SDMA fix hibernation (CI GPU family).
Jérôme Glisse [Fri, 19 Jun 2015 14:32:16 +0000 (10:32 -0400)]
drm/radeon: SDMA fix hibernation (CI GPU family).

In order for hibernation to reliably work we need to properly turn
off the SDMA block, sadly after numerous attemps i haven't not found
proper sequence for clean and full shutdown. So simply reset both
SDMA block, this makes hibernation works reliably on sea island GPU
family (CI)

Hibernation and suspend to ram were tested (several times) on :
Bonaire
Hawaii
Mullins
Kaveri
Kabini

Cc: [email protected]
Signed-off-by: Jérôme Glisse <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/radeon: compute ring fix hibernation (CI GPU family) v2.
Jérôme Glisse [Fri, 19 Jun 2015 14:32:15 +0000 (10:32 -0400)]
drm/radeon: compute ring fix hibernation (CI GPU family) v2.

In order for hibernation to reliably work we need to cleanup more
thoroughly the compute ring. Hibernation is different from suspend
resume as when we resume from hibernation the hardware is first
fully initialize by regular kernel then freeze callback happens
(which correspond to a suspend inside the radeon kernel driver)
and turn off each of the block. It turns out we were not cleanly
shutting down the compute ring. This patch fix that.

Hibernation and suspend to ram were tested (several times) on :
Bonaire
Hawaii
Mullins
Kaveri
Kabini

Changed since v1:
  - Factor the ring stop logic into a function taking ring as arg.

Cc: [email protected]
Signed-off-by: Jérôme Glisse <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: Configure doorbell to maximum slots
Ben Goz [Fri, 12 Jun 2015 08:08:58 +0000 (11:08 +0300)]
drm/amdgpu: Configure doorbell to maximum slots

Signed-off-by: Ben Goz <[email protected]>
Acked-by: Oded Gabbay <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: Initialize compute sdma and memory from kgd
Ben Goz [Wed, 24 Jun 2015 19:39:21 +0000 (22:39 +0300)]
drm/amdgpu: Initialize compute sdma and memory from kgd

v2: add missing MTYPE_NONCACHED enum

Signed-off-by: Ben Goz <[email protected]>
Acked-by: Oded Gabbay <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/radeon: use kzalloc for allocating one thing
Maninder Singh [Fri, 19 Jun 2015 04:05:23 +0000 (09:35 +0530)]
drm/radeon: use kzalloc for allocating one thing

Use kzalloc for allocating one thing rather than
kcalloc(1...

The semantic patch that makes this change is as follows:

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Maninder Singh <[email protected]>
Reviewed-by: Vaneet Narang <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
9 years agodrm/amdgpu: fix hpd range check in dce_v8_0_hpd_irq()
Alex Deucher [Thu, 11 Jun 2015 15:26:03 +0000 (11:26 -0400)]
drm/amdgpu: fix hpd range check in dce_v8_0_hpd_irq()

Spotted by Dan Carpenter.  This is a slight variant of
his fix.

Signed-off-by: Alex Deucher <[email protected]>
9 years agoNFSv4: When returning a delegation, don't reclaim an incompatible open mode.
NeilBrown [Mon, 29 Jun 2015 04:28:54 +0000 (14:28 +1000)]
NFSv4: When returning a delegation, don't reclaim an incompatible open mode.

It is possible to have an active open with one mode, and a delegation
for the same file with a different mode.
In particular, a WR_ONLY open and an RD_ONLY delegation.
This happens if a WR_ONLY open is followed by a RD_ONLY open which
provides a delegation, but is then close.

When returning the delegation, we currently try to claim opens for
every open type (n_rdwr, n_rdonly, n_wronly).  As there is no harm
in claiming an open for a mode that we already have, this is often
simplest.

However if the delegation only provides a subset of the modes that we
currently have open, this will produce an error from the server.

So when claiming open modes prior to returning a delegation, skip the
open request if the mode is not covered by the delegation - the open_stateid
must already cover that mode, so there is nothing to do.

Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
9 years agodrm/i915: fix backlight after resume on 855gm
Jani Nikula [Fri, 26 Jun 2015 11:18:56 +0000 (14:18 +0300)]
drm/i915: fix backlight after resume on 855gm

Some 855gm models (at least ThinkPad X40) regressed because of

commit b0cd324faed23d10d66ba6ade66579c681feef6f
Author: Jani Nikula <[email protected]>
Date:   Wed Nov 12 16:25:43 2014 +0200

    drm/i915: don't save/restore backlight hist ctl registers

which tried to make our driver more robust by not blindly saving and
restoring registers, but it failed to take into account

commit 0eb96d6ed38430b72897adde58f5477a6b71757a
Author: Jesse Barnes <[email protected]>
Date:   Wed Oct 14 12:33:41 2009 -0700

    drm/i915: save/restore BLC histogram control reg across suspend/resume

Fix the regression by enabling hist ctl on gen2.

v2: Improved the comment.

v3: Improved the comment, again.

Reported-and-tested-by: Philipp Gesang <[email protected]>
References: http://mid.gmane.org/20150623222648.GD12335@acheron
Fixes: b0cd324faed2 ("drm/i915: don't save/restore backlight hist ctl registers")
Cc: Ville Syrjälä <[email protected]>
Cc: [email protected]
Acked-by: Chris Wilson <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
This page took 0.131514 seconds and 4 git commands to generate.