MIPS: Add linux/mm_types.h to pgtable.h

With the addition of transparent huge pages, pgtable.h uses struct page.
However, it is possible to include pgtable.h without anything defining
struct page.  So add the include to get it.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Use inline function to access current thread pointer.

With LTE this fixes this issue:

  LDFINAL vmlinux.o
arch/mips/built-in.o (symbol from plugin): In function `sgimc_init':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
kernel/built-in.o (symbol from plugin): In function `get_task_mm':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
mm/built-in.o (symbol from plugin): In function `iov_iter_single_seg_count':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
fs/built-in.o (symbol from plugin): In function `finish_no_open':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
ipc/built-in.o (symbol from plugin): In function `ipc_init_ids':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
security/built-in.o (symbol from plugin): In function `key_schedule_gc':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
crypto/built-in.o (symbol from plugin): In function `crypto_find_alg':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
block/built-in.o (symbol from plugin): In function `elv_rb_find':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
argv_split.o (symbol from plugin): In function `argv_free':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
dec_and_lock.o (symbol from plugin): In function `_atomic_dec_and_lock':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
extable.o (symbol from plugin): In function `sort_extable':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
flex_proportions.o (symbol from plugin): In function `fprop_global_init':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
idr.o (symbol from plugin): In function `idr_for_each':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
is_single_threaded.o (symbol from plugin): In function `current_is_single_threaded':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
kobject.o (symbol from plugin): In function `kobject_get':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
kobject_uevent.o (symbol from plugin): In function `add_uevent_var':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
plist.o (symbol from plugin): In function `plist_add':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
radix-tree.o (symbol from plugin): In function `radix_tree_lookup_slot':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
ratelimit.o (symbol from plugin): In function `___ratelimit':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
rwsem-spinlock.o (symbol from plugin): In function `__init_rwsem':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
show_mem.o (symbol from plugin): In function `show_mem':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
timerqueue.o (symbol from plugin): In function `timerqueue_iterate_next':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
vsprintf.o (symbol from plugin): In function `simple_strtoull':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
delay.o (symbol from plugin): In function `__delay':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
mips-atomic.o (symbol from plugin): In function `arch_local_irq_disable':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
uncached.o (symbol from plugin): In function `run_uncached':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
lib/built-in.o (symbol from plugin): In function `_bcd2bin':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
arch/mips/lib/built-in.o (symbol from plugin): In function `ioread8':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
drivers/built-in.o (symbol from plugin): In function `fb_notifier_call_chain':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
net/built-in.o (symbol from plugin): In function `sock_from_file':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here
klist.o (symbol from plugin): In function `klist_init':
(.text+0x0): multiple definition of `$28'
init/built-in.o (symbol from plugin):(.text+0x0): first defined here

It also makes the code a little more readable, so let's merge it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Make tlb exception handler definitions and declarations match.

The code was written as it is because it's more expressive, a bit easier.
But it's always been dirty, if not a bug.  But we can't cheat with LTO
compilers, so this results in:

[...]
  LDFINAL vmlinux.o
In file included from arch/mips/kernel/topology.c:604:0,
                 from arch/mips/kernel/time.c:212,
                 from arch/mips/kernel/syscall.c:300,
                 from arch/mips/kernel/signal.c:853,
                 from arch/mips/kernel/setup.c:1030,
                 from arch/mips/kernel/reset.c:354,
                 from arch/mips/kernel/ptrace.c:562,
                 from arch/mips/kernel/process.c:770,
                 from arch/mips/kernel/irq.c:350,
                 from arch/mips/kernel/branch.c:321,
                 from arch/mips/kernel/cpu-probe.c:1370,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:345,
                 from arch/mips/sgi-ip22/ip22-gio.c:660,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/sgialib.h:219,
                 from arch/mips/sgi-ip22/ip22-reset.c:224,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/paccess.h:116,
                 from arch/mips/sgi-ip22/ip22-nvram.c:334,
                 from include/linux/kernel_stat.h:79,
                 from arch/mips/sgi-ip22/ip22-int.c:592,
                 from arch/mips/sgi-ip22/ip22-hpc.c:470,
                 from arch/mips/sgi-ip22/ip22-mc.c:135,
                 from init/init_task.c:54,
                 from init/calibrate.c:744,
                 from init/noinitramfs.c:62,
                 from init/do_mounts.c:573,
                 from init/version.c:1009,
                 from init/main.c:777,
                 from :729:
arch/mips/kernel/traps.c:63:49: error: variable ‘handle_tlbl’ redeclared as function
In file included from arch/mips/mm/page.c:310:0,
                 from arch/mips/mm/mmap.c:208,
                 from arch/mips/mm/init.c:641,
                 from arch/mips/mm/gup.c:811,
                 from arch/mips/mm/fault.c:659,
                 from include/linux/module.h:682,
                 from arch/mips/mm/dma-default.c:161,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:397,
                 from arch/mips/kernel/i8253.c:538,
                 from arch/mips/kernel/proc.c:145,
                 from arch/mips/kernel/irq_cpu.c:129,
                 from arch/mips/kernel/i8259.c:229,
                 from include/uapi/linux/elf.h:251,
                 from arch/mips/kernel/mips_ksyms.c:129,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/time.h:50,
                 from arch/mips/kernel/cevt-r4k.c:90,
                 from arch/mips/kernel/vdso.c:136,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:351,
                 from arch/mips/kernel/unaligned.c:809,
                 from arch/mips/kernel/traps.c:1720,
                 from arch/mips/kernel/topology.c:684,
                 from arch/mips/kernel/time.c:212,
                 from arch/mips/kernel/syscall.c:300,
                 from arch/mips/kernel/signal.c:853,
                 from arch/mips/kernel/setup.c:1030,
                 from arch/mips/kernel/reset.c:354,
                 from arch/mips/kernel/ptrace.c:562,
                 from arch/mips/kernel/process.c:770,
                 from arch/mips/kernel/irq.c:350,
                 from arch/mips/kernel/branch.c:321,
                 from arch/mips/kernel/cpu-probe.c:1370,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:345,
                 from arch/mips/sgi-ip22/ip22-gio.c:660,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/sgialib.h:219,
                 from arch/mips/sgi-ip22/ip22-reset.c:224,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/paccess.h:116,
                 from arch/mips/sgi-ip22/ip22-nvram.c:334,
                 from include/linux/kernel_stat.h:79,
                 from arch/mips/sgi-ip22/ip22-int.c:592,
                 from arch/mips/sgi-ip22/ip22-hpc.c:470,
                 from arch/mips/sgi-ip22/ip22-mc.c:135,
                 from init/init_task.c:54,
                 from init/calibrate.c:744,
                 from init/noinitramfs.c:62,
                 from init/do_mounts.c:573,
                 from init/version.c:1009,
                 from init/main.c:777,
                 from :729:
arch/mips/mm/tlbex.c:1448:5: note: previously declared here
In file included from arch/mips/kernel/topology.c:604:0,
                 from arch/mips/kernel/time.c:212,
                 from arch/mips/kernel/syscall.c:300,
                 from arch/mips/kernel/signal.c:853,
                 from arch/mips/kernel/setup.c:1030,
                 from arch/mips/kernel/reset.c:354,
                 from arch/mips/kernel/ptrace.c:562,
                 from arch/mips/kernel/process.c:770,
                 from arch/mips/kernel/irq.c:350,
                 from arch/mips/kernel/branch.c:321,
                 from arch/mips/kernel/cpu-probe.c:1370,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:345,
                 from arch/mips/sgi-ip22/ip22-gio.c:660,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/sgialib.h:219,
                 from arch/mips/sgi-ip22/ip22-reset.c:224,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/paccess.h:116,
                 from arch/mips/sgi-ip22/ip22-nvram.c:334,
                 from include/linux/kernel_stat.h:79,
                 from arch/mips/sgi-ip22/ip22-int.c:592,
                 from arch/mips/sgi-ip22/ip22-hpc.c:470,
                 from arch/mips/sgi-ip22/ip22-mc.c:135,
                 from init/init_task.c:54,
                 from init/calibrate.c:744,
                 from init/noinitramfs.c:62,
                 from init/do_mounts.c:573,
                 from init/version.c:1009,
                 from init/main.c:777,
                 from :729:
arch/mips/kernel/traps.c:62:49: error: variable ‘handle_tlbm’ redeclared as function
In file included from arch/mips/mm/page.c:310:0,
                 from arch/mips/mm/mmap.c:208,
                 from arch/mips/mm/init.c:641,
                 from arch/mips/mm/gup.c:811,
                 from arch/mips/mm/fault.c:659,
                 from include/linux/module.h:682,
                 from arch/mips/mm/dma-default.c:161,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:397,
                 from arch/mips/kernel/i8253.c:538,
                 from arch/mips/kernel/proc.c:145,
                 from arch/mips/kernel/irq_cpu.c:129,
                 from arch/mips/kernel/i8259.c:229,
                 from include/uapi/linux/elf.h:251,
                 from arch/mips/kernel/mips_ksyms.c:129,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/time.h:50,
                 from arch/mips/kernel/cevt-r4k.c:90,
                 from arch/mips/kernel/vdso.c:136,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:351,
                 from arch/mips/kernel/unaligned.c:809,
                 from arch/mips/kernel/traps.c:1720,
                 from arch/mips/kernel/topology.c:684,
                 from arch/mips/kernel/time.c:212,
                 from arch/mips/kernel/syscall.c:300,
                 from arch/mips/kernel/signal.c:853,
                 from arch/mips/kernel/setup.c:1030,
                 from arch/mips/kernel/reset.c:354,
                 from arch/mips/kernel/ptrace.c:562,
                 from arch/mips/kernel/process.c:770,
                 from arch/mips/kernel/irq.c:350,
                 from arch/mips/kernel/branch.c:321,
                 from arch/mips/kernel/cpu-probe.c:1370,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:345,
                 from arch/mips/sgi-ip22/ip22-gio.c:660,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/sgialib.h:219,
                 from arch/mips/sgi-ip22/ip22-reset.c:224,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/paccess.h:116,
                 from arch/mips/sgi-ip22/ip22-nvram.c:334,
                 from include/linux/kernel_stat.h:79,
                 from arch/mips/sgi-ip22/ip22-int.c:592,
                 from arch/mips/sgi-ip22/ip22-hpc.c:470,
                 from arch/mips/sgi-ip22/ip22-mc.c:135,
                 from init/init_task.c:54,
                 from init/calibrate.c:744,
                 from init/noinitramfs.c:62,
                 from init/do_mounts.c:573,
                 from init/version.c:1009,
                 from init/main.c:777,
                 from :729:
arch/mips/mm/tlbex.c:1450:5: note: previously declared here
In file included from arch/mips/kernel/topology.c:604:0,
                 from arch/mips/kernel/time.c:212,
                 from arch/mips/kernel/syscall.c:300,
                 from arch/mips/kernel/signal.c:853,
                 from arch/mips/kernel/setup.c:1030,
                 from arch/mips/kernel/reset.c:354,
                 from arch/mips/kernel/ptrace.c:562,
                 from arch/mips/kernel/process.c:770,
                 from arch/mips/kernel/irq.c:350,
                 from arch/mips/kernel/branch.c:321,
                 from arch/mips/kernel/cpu-probe.c:1370,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:345,
                 from arch/mips/sgi-ip22/ip22-gio.c:660,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/sgialib.h:219,
                 from arch/mips/sgi-ip22/ip22-reset.c:224,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/paccess.h:116,
                 from arch/mips/sgi-ip22/ip22-nvram.c:334,
                 from include/linux/kernel_stat.h:79,
                 from arch/mips/sgi-ip22/ip22-int.c:592,
                 from arch/mips/sgi-ip22/ip22-hpc.c:470,
                 from arch/mips/sgi-ip22/ip22-mc.c:135,
                 from init/init_task.c:54,
                 from init/calibrate.c:744,
                 from init/noinitramfs.c:62,
                 from init/do_mounts.c:573,
                 from init/version.c:1009,
                 from init/main.c:777,
                 from :729:
arch/mips/kernel/traps.c:64:49: error: variable ‘handle_tlbs’ redeclared as function
In file included from arch/mips/mm/page.c:310:0,
                 from arch/mips/mm/mmap.c:208,
                 from arch/mips/mm/init.c:641,
                 from arch/mips/mm/gup.c:811,
                 from arch/mips/mm/fault.c:659,
                 from include/linux/module.h:682,
                 from arch/mips/mm/dma-default.c:161,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:397,
                 from arch/mips/kernel/i8253.c:538,
                 from arch/mips/kernel/proc.c:145,
                 from arch/mips/kernel/irq_cpu.c:129,
                 from arch/mips/kernel/i8259.c:229,
                 from include/uapi/linux/elf.h:251,
                 from arch/mips/kernel/mips_ksyms.c:129,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/time.h:50,
                 from arch/mips/kernel/cevt-r4k.c:90,
                 from arch/mips/kernel/vdso.c:136,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:351,
                 from arch/mips/kernel/unaligned.c:809,
                 from arch/mips/kernel/traps.c:1720,
                 from arch/mips/kernel/topology.c:684,
                 from arch/mips/kernel/time.c:212,
                 from arch/mips/kernel/syscall.c:300,
                 from arch/mips/kernel/signal.c:853,
                 from arch/mips/kernel/setup.c:1030,
                 from arch/mips/kernel/reset.c:354,
                 from arch/mips/kernel/ptrace.c:562,
                 from arch/mips/kernel/process.c:770,
                 from arch/mips/kernel/irq.c:350,
                 from arch/mips/kernel/branch.c:321,
                 from arch/mips/kernel/cpu-probe.c:1370,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/thread_info.h:345,
                 from arch/mips/sgi-ip22/ip22-gio.c:660,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/sgialib.h:219,
                 from arch/mips/sgi-ip22/ip22-reset.c:224,
                 from /fluff/home/ralf/src/linux/lto/linux-misc/arch/mips/include/asm/paccess.h:116,
                 from arch/mips/sgi-ip22/ip22-nvram.c:334,
                 from include/linux/kernel_stat.h:79,
                 from arch/mips/sgi-ip22/ip22-int.c:592,
                 from arch/mips/sgi-ip22/ip22-hpc.c:470,
                 from arch/mips/sgi-ip22/ip22-mc.c:135,
                 from init/init_task.c:54,
                 from init/calibrate.c:744,
                 from init/noinitramfs.c:62,
                 from init/do_mounts.c:573,
                 from init/version.c:1009,
                 from init/main.c:777,
                 from :729:
arch/mips/mm/tlbex.c:1449:5: note: previously declared here
lto1: fatal error: errors during merging of translation units
compilation terminated.
lto-wrapper: /usr/bin/mips-linux-gcc returned 1 exit status
/usr/lib64/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [vmlinux] Error 1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Make declarations and definitions of tlbmiss_handler_setup_pgd match.

tlbmiss_handler_setup_pgd is run-time generated code and it was convenient
to pretend the symbol was an array in the generator but a function for
the users.  LTO gcc won't tolerate this kind of lie anymore so solve the
problem through a cast and function pointer instead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Get rid of the use of .macro in C code.

It fails with LTO and probably has always been a fragile.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Avoid overoptimization by GCC.

Without this, it's possible that LTO will discard the calls to
set_except_vector() in the probe for the DADDI overflow bug resulting in a
kernel crash like this:

 [...]
 Mount-cache hash table entries: 256
 Checking for the daddi bug... Integer overflow[#1]:
 Cpu 0
 $ 0   : 0000000000000000 0000000010008ce1 0000000000000001 0000000000000000
 $ 4   : 7fffffffffffedcd ffffffff81410000 0000000000000030 000000000000003f
 [...]

There are other similar places in the kernel so we've just been lucky
that GCC's been tolerant.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
IP27: Make declaration and definition of rt_timer_irq match.

Without, the LTO compiler will complain:

[...]
  LD      init/built-in.o
  LDFINAL vmlinux.o
arch/mips/sgi-ip27/ip27-irq.c:379:22: warning: type of ‘rt_timer_irq’ does not match original declaration [enabled by default]
  extern unsigned int rt_timer_irq;
                      ^
arch/mips/sgi-ip27/ip27-timer.c:72:5: note: previously declared here
 int rt_timer_irq;
     ^
  MODPOST vmlinux.o
[...]

And without LTO, it's still good stile to things match.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Remove further use of .subsection

7837314d141c661c70bc13c5050694413ecfe14a [MIPS: Get rid of branches to
.subsections] removed most uses of .subsection] removed most uses of
.subsection in inline assembler code.

It left the instances in spinlock.h alone because we knew their use was
in fairly small files where .subsection use was fine but of course this
was a fragile assumption.  LTO breaks this assumption resulting in build
errors due to exceeded branch range, so remove further instances of
.subsection.

The two functions that still use .macro don't currently cause issues
however this use is still fragile.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS: Remove redundant instructions from arch_spin_{,try}lock.

We were doing:
   SRL  $r,$?,16
   ANDI $r,$r,0xffff

The logical right shift by 16 leaves the upper 16 bits clear, so the
subsequent masking out of those bits is redundant, and can safely be
removed.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
ASoC: dapm: use clk_prepare_enable and clk_disable_unprepare

Update dapm_clock_event to use clk_prepare_enable and
clk_disable_unprepare.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: McASP: Add pins output direction for rx clocks when configured in CBS_CFS format

When McASP is bit clock and frame clock master enable pin output for rx clocks.

Signed-off-by: Marek Belisko <marek.belisko@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: wm8994: missing break in wm8994_aif3_hw_params()

The missing break here means that we always return early and the
function is a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
MIPS: microMIPS: Add instruction formats.

Add structures for all the microMIPS instructions. Also add the
enumerations for all the bit fields for opcodes, functions, etc.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: kevink@paralogos.com
Cc: ddaney.cavm@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/4921/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit d7f19e43a4337d4d40ff5e241172912130d06a4c)
MIPS: microMIPS: uasm: Split 'uasm.c' into two files.

Split 'uasm.c' into two files. The new file 'uasm-mips.c' has the
functions specific to the classic MIPS ISA. The 'uasm.c' file
contains common code that can be used by classic or other ISAs
that could be supported by the kernel.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: kevink@paralogos.com
Cc: ddaney.cavm@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/4922/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 0961103562ab958fa74f35043bf4f72e51ed6155)
MIPS: microMIPS: uasm: Add microMIPS micro assembler support.

Add new file 'uasm-micromips.c' that allows the micro assembler
to generate microMIPS ISA code. It can be included in the kernel
alongside the classic ISA as long as the platform supports the
microMIPS ISA.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: kevink@paralogos.com
Cc: ddaney.cavm@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/4923/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 5f011a866afbd03a5379f67f4e70e5efbdfc16e9)
MIPS: microMIPS: Add instruction utility macros.

Add two new macros for microMIPS. One checks if an exception was
taken in either microMIPS or classic MIPS mode. The other checks
if a microMIPS instruction is 16-bit or 32-bit in length.

[ralf@linux-mips.org: Removed unnecessary parenthesis as noted by
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>]

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: kevink@paralogos.com
Cc: ddaney.cavm@gmail.com
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Patchwork: https://patchwork.linux-mips.org/patch/4924/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 49df26472338b935fd5781bf94a77a88b148a716)
MIPS: malta: Add new Malta config files.

Add in new Malta config files for SMVP, SMTC, and APRP. Also update
the original 'malta_defconfig' config file.

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
MIPS: Add option to disable software I/O coherency.

Some MIPS controllers have hardware I/O coherency. This patch
detects those and turns off software coherency. A new kernel
command line option also allows the user to manually turn
software coherency on or off.

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode.

According documentation bit ACLKRPOL is set to 0 (receiver samples data
on falling edge) and when set to 1 (receiver samples data on rising edge).

I2S data are always sampled on falling edge and valid during rising edge
of bit clock. So in case of capture data transmitter sample data on falling
edge and macsp must read then on rising edge.

Signed-off-by: Marek Belisko <marek.belisko@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Merge remote-tracking branch 'asoc/fix/davinci' into asoc-linus