MAINTAINERS: Add nios2 maintainer

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Documentation: Add documentation for Nios2 architecture

Signed-off-by: Ley Foon Tan <lftan@altera.com>
nios2: Build infrastructure

This patch adds Makefile and Kconfig files required for building a
nios2 kernel.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
nios2: Use IS_ENABLED instead of #ifdefs to check config symbols

Make the checking for div/mul/mulx instruction config symbols easier to
read by using IS_ENABLED instead of #ifdefs.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
nios2: fix error handling of irq_of_parse_and_map

Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
nios2: remove unnecessary space before define

Remove extra space between # and define.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
nios2: remove include asm-generic/iomap.h from io.h

Don't need asm-generic/iomap.h and asm-generic/io.h added
default ioread8/16/32 iowrite8/16/32 implementation.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
nios2: move include asm-generic/io.h to end of file

Move asm-generic/io.h to end of file to override functions like
phys_to_virt, virt_to_phys in asm-generic/io.h.
This is due to recent commit 9216efaf introduced new way to
override functions by checking for the existence of a macro with the
same of the function.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
nios2: include linux/type.h in io.h

This is require for __iomem definition.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
nios2: Remove unused extern declaration of shm_align_mask

shm_align_mask is not defined/used on nios2, thus there is no need to
declare it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
nios2: Remove write-only struct member from nios2_timer

The irq member of struct nios2_timer is only written to but
never read, thus it can be removed.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
nios2: asm-offsets: Remove unused definition TI_TASK

TI_TASK is not used in nios2 assembly code, so remove it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
nios2: Add missing NR_CPUS to Kconfig

kernel/time/Kconfig expects that NR_CPUS is defined.

This fixes the following config warning:
"kernel/time/Kconfig:163:warning: range is invalid"

Follow 4cbbbb43d666 ("microblaze: Fix missing NR_CPUS in menuconfig")

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
nios2: Make NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL

If NIOS2_CMDLINE_IGNORE_DTB is selected but CMDLINE_BOOL isn't and thus
CONFIG_CMDLINE is not defined, the build fails with the following error:

arch/nios2/kernel/setup.c: In function 'nios2_boot_init':
arch/nios2/kernel/setup.c:131:30: error: 'CONFIG_CMDLINE' undeclared
(first use in this function)
   strncpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);

This can be reproduced using randconfig with KCONFIG_SEED=0xE5B8749E, i.e.
'make KCONFIG_SEED=0xE5B8749E ARCH=nios2 randconfig'.

Fix this by letting NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL, so we
actually have a default kernel command string to fall back to.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
Set UID in sess_auth_rawntlmssp_authenticate too

A user complained that they were unable to login to their cifs share
after a kernel update. From the wiretrace we can see that the server
returns different UIDs as response to NTLMSSP_NEGOTIATE and NTLMSSP_AUTH
phases.

With changes in the authentication code, we no longer set the
cifs_sess->Suid returned in response to the NTLM_AUTH phase and continue
to use the UID sent in response to the NTLMSSP_NEGOTIATE phase. This
results in the server denying access to the user when the user attempts
to do a tcon connect.

See https://bugzilla.redhat.com/show_bug.cgi?id=1163927

A test kernel containing patch was tested successfully by the user.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <steve.french@primarydata.com>
cifs: remove unneeded condition check

file->private_data can never be null after calling initiate_cifs_search.
So private null check condition is not needed.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Steve French <steve.french@primarydata.com>
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

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

User visible changes:

  - Callchain improvements from Andi Kleen including:
    * Enable printing the srcline in the history
    * Make get_srcline fall back to sym+offset

  - Allow to force redirect pr_debug to stderr. (Andi Kleen)

  - TUI hist_entry browser fixes, including showing missing overhead
    value for first level callchain. Detected comparing the output of
    --stdio/--gui (that matched) with --tui, that had this problem. (Namhyung Kim)

  - Fix segfault due to invalid kernel dso access (Namhyung Kim)

Infrastructure changes:

  - Move bfd_demangle stubbing to its only user (Arnaldo Carvalho de Melo)

  - 'perf stat' refactorings, moving stuff from it to evsel.c to use in
    per-pkg/snapshot format changes (Jiri Olsa)

  - Add per-pkg format file parsing (Matt Fleming)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Pull perf/core improvements from Arnaldo Carvalho de Melo:

User visible changes:

  - Support handling complete branch stacks as histograms (Andi Kleen)

Infrastructure changes:

  - Prep work for supporting per-pkg and snapshot counters in 'perf stat' (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Merge branches '3.19/omapdss' and '3.19/simplefb' into fbdev

Merge fbdev topic branches.
mmc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter

To be able to use mmc_send_tuning() prior the struct mmc_card has been
allocated, let's convert it to take the struct mmc_host* as parameter
instead.

Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Dong Aisheng <b29396@freescale.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>