aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-24MIPS: Use EXCCODE_ constants with set_except_vector()James Hogan2-30/+30
The first argument to set_except_vector is the ExcCode, which we now have definitions for. Lets make use of them. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11894/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Update trap codesJames Hogan1-2/+10
Add a few missing trap codes. [[email protected]: Drop removal of exception codes. I don't care what the incomplete architecture spec says; it can't change existing hardware and VCEI is supported indeed.] Signed-off-by: James Hogan <[email protected]> Cc: [email protected] Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11890/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Move Cause.ExcCode trap codes to mipsregs.hJames Hogan5-83/+80
Move the Cause.ExcCode trap code definitions from kvm_host.h to mipsregs.h, since they describe architectural bits rather than KVM specific constants, and change the prefix from T_ to EXCCODE_. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11891/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: KVM: Make kvm_mips_{init,exit}() staticJames Hogan1-2/+2
The module init and exit functions have no need to be global, so make them static. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11889/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: KVM: Refactor added offsetof()sJames Hogan1-7/+3
When calculating the offsets into the commpage for dynamically translated mtc0/mfc0 guest instructions, multiple offsetof()s are added together to find the offset of the specific register in the mips_coproc, within the commpage. Simplify each of these cases to a single offsetof() to find the offset of the specific register within the commpage. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11888/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: KVM: Convert EXPORT_SYMBOL to _GPLJames Hogan2-19/+19
Export symbols only to GPL modules to match other KVM symbols in virt/kvm/ and arch/*/kvm/. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11887/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: KVM: Drop unused kvm_mips_host_tlb_inv_index()James Hogan2-38/+0
The function kvm_mips_host_tlb_inv_index() is unused, so drop it completely. Signed-off-by: James Hogan <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11886/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Move definition of DC bit to mipsregs.hJames Hogan2-3/+2
The CAUSEB_DC and CAUSEF_DC definitions used by KVM are defined in asm/kvm_host.h, but all the other Cause register field definitions are found in asm/mipsregs.h. Lets reunite the DC bit definitions with its friends in mipsregs.h. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11885/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: KVM: Drop some unused definitions from kvm_host.hJames Hogan1-5/+0
Some definitions in the MIPS asm/kvm_host.h are completely unused, so lets drop them. MS_TO_NS is no longer used since commit e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation"). The others don't appear ever to have been used. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11884/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: KVM: Trivial whitespace and style fixesJames Hogan5-15/+14
A bunch of misc whitespace and style fixes within arch/mips/kvm/. Signed-off-by: James Hogan <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11883/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: pic32mzda: Add initial PIC32MZDA Starter Kit defconfigJoshua Henderson1-0/+89
This adds an initial default config that enables all available PIC32 drivers and is enough for booting a PIC32MZDA Starter Kit. Signed-off-by: Joshua Henderson <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12105/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: dts: Add initial DTS for the PIC32MZDA Starter KitJoshua Henderson6-0/+697
This adds basic DTS configuration for the PIC32MZDA chip and in turn the PIC32MZDA Starter Kit. Signed-off-by: Joshua Henderson <[email protected]> Cc: Rob Herring <[email protected]> Cc: Pawel Moll <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Andrew Bresticker <[email protected]> Cc: Paul Burton <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12104/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Add support for PIC32MZDA platformJoshua Henderson22-0/+1476
This adds support for the Microchip PIC32 MIPS microcontroller with the specific variant PIC32MZDA. PIC32MZDA is based on the MIPS m14KEc core and boots using device tree. This includes an early pin setup and early clock setup needed prior to device tree being initialized. In additon, an interface is provided to synchronize access to registers shared across several peripherals. Signed-off-by: Joshua Henderson <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12097/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24dt/bindings: Add bindings for PIC32/MZDA platformsJoshua Henderson1-0/+31
This adds support for the Microchip PIC32 platform along with the specific variant PIC32MZDA on a PIC32MZDA Starter Kit. Signed-off-by: Joshua Henderson <[email protected]> Acked-by: Rob Herring <[email protected]> Cc: Pawel Moll <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Kumar Gala <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12096/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24IRQCHIP: irq-pic32-evic: Add support for PIC32 interrupt controllerCristian Birsan3-0/+330
This adds support for the interrupt controller present on PIC32 class devices. It handles all internal and external interrupts. This controller exists outside of the CPU core and is the arbitrator of all interrupts (including interrupts from the CPU itself) before they are presented to the CPU. The following features are supported: - DT properties for EVIC and for devices/peripherals that use interrupt lines - Persistent and non-persistent interrupt handling - irqdomain and generic chip support - Configuration of external interrupt edge polarity Signed-off-by: Cristian Birsan <[email protected]> Signed-off-by: Joshua Henderson <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12092/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24dt/bindings: Add bindings for PIC32 interrupt controllerCristian Birsan1-0/+67
Document the devicetree bindings for the interrupt controller on Microchip PIC32 class devices. Signed-off-by: Cristian Birsan <[email protected]> Signed-off-by: Joshua Henderson <[email protected]> Acked-by: Rob Herring <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Rob Herring <[email protected]> Cc: Pawel Moll <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Kumar Gala <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12093/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: bmips: Improve BCM6368 device treeÁlvaro Fernández Rojas1-0/+22
Add brcm,bcm6358-leds node to bcm6368.dtsi Add reboot support (syscon-reboot as defined in BCM6328) Signed-off-by: Álvaro Fernández Rojas <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Álvaro Fernández Rojas <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/12117/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: bmips: Improve BCM6328 device treeÁlvaro Fernández Rojas1-0/+9
Adds bcm6328-leds node to bcm6328.dtsi Signed-off-by: Álvaro Fernández Rojas <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Álvaro Fernández Rojas <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/12116/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: ptrace: Drop cp0_tcstatus from regoffset_table[]James Hogan1-3/+0
The cp0_tcstatus member of struct pt_regs was removed along with the rest of SMTC in v3.16, commit b633648c5ad3 ("MIPS: MT: Remove SMTC support"), however recent uprobes support in v4.3 added back a reference to it in the regoffset_table[] in ptrace.c. Remove it. Signed-off-by: James Hogan <[email protected]> Fixes: 40e084a506eb ("MIPS: Add uprobes support.") Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11920/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: TXx9: iocled: Be sure to clamp return valueLinus Walleij1-1/+1
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11925/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: RB532: Be sure to clamp return valueLinus Walleij1-1/+1
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11924/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: TXx9: Be sure to clamp return valueLinus Walleij1-1/+1
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11923/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: ar7: Be sure to clamp return valueLinus Walleij1-1/+1
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Florian Fainelli <[email protected]> Cc: Alban Bedel <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11922/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Alchemy: Be sure to clamp return valueLinus Walleij1-3/+3
As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11921/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Fix macro typoJaedon Shin1-1/+1
Change the CONFIG_MIPS_CMDLINE_EXTEND to CONFIG_MIPS_CMDLINE_DTB_EXTEND to resolve the EXTEND_WITH_PROM macro. Signed-off-by: Jaedon Shin <[email protected]> Fixes: 2024972ef533 ("MIPS: Make the kernel arguments from dtb available") Reviewed-by: Alexander Sverdlin <[email protected]> Cc: Jonas Gorski <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Paul Burton <[email protected]> Cc: Aaro Koskinen <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11909/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: smp-cps: Ensure secondary cores start with EVA disabledMatt Redfearn2-0/+7
The kernel currently assumes that a core will start up in legacy mode using the exception base provided through the CM GCR registers. If a core has been configured in hardware to start in EVA mode, these assumptions will fail. This patch ensures that secondary cores are initialized to meet these assumptions. Signed-off-by: Matt Redfearn <[email protected]> Reviewed-by: Paul Burton <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11907/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: io.h: Define `ioremap_cache'Maciej W. Rozycki1-0/+1
Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Brian Norris <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12040/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: math-emu: dsemul: Reduce `get_isa16_mode' clutterMaciej W. Rozycki1-8/+9
Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12178/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: inst.h: Fix some instruction descriptionsMaciej W. Rozycki1-2/+2
Fix the description of the microMIPS NOP16 encoding or MM_NOP16, which is not equivalent to the MIPS16 NOP instruction. This is 0x0c00 and represents the microMIPS `MOVE16 $0, $0' operation, whereas MIPS16 NOP is encoded as 0x6500, representing `MOVE $0, $16'. Also fix a typo in `mm_fp0_format' description. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12177/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: math-emu: dsemul: Correct description of the emulation frameMaciej W. Rozycki1-7/+2
Remove irrelevant content from the description of the emulation frame in `mips_dsemul', referring to bare-metal configurations. Update the text, reflecting the change made with commit ba3049ed4086 ("MIPS: Switch FPU emulator trap to BREAK instruction."), where we switched from using an address error exception on an unaligned access to the use of a BREAK 514 instruction causing a breakpoint exception instead. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12176/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: math-emu: Correct the emulation of microMIPS ADDIUPC instructionMaciej W. Rozycki2-2/+30
Emulate the microMIPS ADDIUPC instruction directly in `mips_dsemul'. If executed in the emulation frame, this instruction produces an incorrect result, because the value of the PC there is not the same as where the instruction originated. Reshape code so as to handle all microMIPS cases together. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12175/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: math-emu: Make microMIPS branch delay slot emulation workMaciej W. Rozycki3-6/+9
Complement commit 102cedc32a6e ("MIPS: microMIPS: Floating point support.") which introduced microMIPS FPU emulation, but did not adjust the encoding of the BREAK instruction used to terminate the branch delay slot emulation frame. Consequently the execution of any such frame is indeterminate and, depending on CPU configuration, will result in random code execution or an offending program being terminated with SIGILL. This is because the regular MIPS BREAK instruction is encoded with the 0 major and the 0xd minor opcode, however in the microMIPS instruction set this major/minor opcode pair denotes an encoding reserved for the DSP ASE. Instead the microMIPS BREAK instruction is encoded with the 0 major and the 0x7 minor opcode. Use the correct BREAK encoding for microMIPS FPU emulation then. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12174/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: math-emu: dsemul: Fix ill formatting of microMIPS partMaciej W. Rozycki1-6/+12
Correct formatting breakage introduced with commit 102cedc32a6e ("MIPS: microMIPS: Floating point support."), so that further changes to this code can be consistent. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12173/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: math-emu: Correctly handle NOP emulationMaciej W. Rozycki2-6/+12
Fix an issue introduced with commit 9ab4471c9f1b ("MIPS: math-emu: Correct delay-slot exception propagation") where the emulation of a NOP instruction signals the need to terminate the emulation loop. This in turn, if the PC has not changed from the entry to the loop, will cause the kernel to terminate the program with SIGILL. Consider this program: static double div(double d) { do d /= 2.0; while (d > .5); return d; } int main(int argc, char **argv) { return div(argc); } which gets compiled to the following binary code: 00400490 <main>: 400490: 44840000 mtc1 a0,$f0 400494: 3c020040 lui v0,0x40 400498: d44207f8 ldc1 $f2,2040(v0) 40049c: 46800021 cvt.d.w $f0,$f0 4004a0: 46220002 mul.d $f0,$f0,$f2 4004a4: 4620103c c.lt.d $f2,$f0 4004a8: 4501fffd bc1t 4004a0 <main+0x10> 4004ac: 00000000 nop 4004b0: 4620000d trunc.w.d $f0,$f0 4004b4: 03e00008 jr ra 4004b8: 44020000 mfc1 v0,$f0 4004bc: 00000000 nop Where the FPU emulator is used, depending on the number of command-line arguments this code will either run to completion or terminate with SIGILL. If no arguments are specified, then BC1T will not be taken, NOP will not be emulated and code will complete successfully. If one argument is specified, then BC1T will be taken once and NOP will be emulated. At this point the entry PC value will be 0x400498 and the new PC value, set by `mips_dsemul' will be 0x4004a0, the target of BC1T. The emulation loop will terminate, but SIGILL will not be issued, because the PC has changed. The FPU emulator will be entered again and on the second execution BC1T will not be taken, NOP will not be emulated and code will complete successfully. If two or more arguments are specified, then the first execution of BC1T will proceed as above. Upon reentering the FPU emulator the emulation loop will continue to BC1T, at which point the branch will be taken and NOP emulated again. At this point however the entry PC value will be 0x4004a0, the same as the target of BC1T. This will make the emulator conclude that execution has not advanced and therefore an unsupported FPU instruction has been encountered, and SIGILL will be sent to the process. Fix the problem by extending the internal API of `mips_dsemul', making it return -1 if no delay slot emulation frame has been made, the instruction has been handled and execution of the emulation loop needs to continue as if nothing happened. Remove code from `mips_dsemul' to reproduce steps made by the emulation loop at the conclusion of each iteration, as those will be reached normally now. Adjust call sites accordingly. Document the API. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12172/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: Fix some missing CONFIG_CPU_MIPSR6 #ifdefsHuacai Chen2-3/+3
Commit be0c37c985eddc4 (MIPS: Rearrange PTE bits into fixed positions.) defines fixed PTE bits for MIPS R2. Then, commit d7b631419b3d230a4d383 (MIPS: pgtable-bits: Fix XPA damage to R6 definitions.) adds the MIPS R6 definitions in the same way as MIPS R2. But some R6 #ifdefs in the later commit are missing, so in this patch I fix that. Signed-off-by: Huacai Chen <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: Steven J. Hill <[email protected]> Cc: Fuxin Zhang <[email protected]> Cc: Zhangjin Wu <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/12164/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-24MIPS: sync-r4k: reduce skew while synchronizationHuacai Chen1-24/+8
While synchronization, count register will go backwards for the master. If synchronise_count_master() runs before synchronise_count_slave(), skew becomes even more. The skew is very harmful for CPU hotplug (CPU0 do synchronization with CPU1, then CPU0 do synchronization with CPU2 and CPU0's count goes backwards, so it will be out of sync with CPU1). After the commit cf9bfe55f24973a8f40e2 (MIPS: Synchronize MIPS count one CPU at a time), we needn't evaluate count_reference at the beginning of synchronise_count_master() any more. Thus, we evaluate the initcount (It seems like count_reference is redundant) in the 2nd loop. Since we write the count register in the last loop, we don't need additional barriers (the existing memory barriers are enough). Moreover, I think we loop 3 times is enough to get a primed instruction cache, this can also get less skew than looping 5 times. Comments are also updated in this patch. Signed-off-by: Huacai Chen <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: Steven J. Hill <[email protected]> Cc: [email protected] Cc: Fuxin Zhang <[email protected]> Cc: Zhangjin Wu <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/12163/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-23Merge tag 'ntb-4.5' of git://github.com/jonmason/ntbLinus Torvalds13-12/+2183
Pull NTB updates from Jon Mason: "A new driver to support AMD NTB, a NTB performance test driver, NTB bugs fixes, and the ability to recover from running out of DMA descriptors" * tag 'ntb-4.5' of git://github.com/jonmason/ntb: NTB: Fix macro parameter conflict with field name NTB: Add support for AMD PCI-Express Non-Transparent Bridge ntb: ntb perf tool NTB: Address out of DMA descriptor issue with NTB NTB: Clear property bits in BAR value NTB: ntb_process_tx error path bug
2016-01-23Merge branch 'for-linus' of ↵Linus Torvalds179-894/+916
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull final vfs updates from Al Viro: - The ->i_mutex wrappers (with small prereq in lustre) - a fix for too early freeing of symlink bodies on shmem (they need to be RCU-delayed) (-stable fodder) - followup to dedupe stuff merged this cycle * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: abort dedupe loop if fatal signals are pending make sure that freeing shmem fast symlinks is RCU-delayed wrappers for ->i_mutex access lustre: remove unused declaration
2016-01-23Merge tag 'nfs-for-4.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfsLinus Torvalds5-69/+47
Pull NFS client bugfixes and cleanups from Trond Myklebust: "Bugfixes: - pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn - pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN Cleanups: - NFS: Simplify nfs_request_add_commit_list() arguments" * tag 'nfs-for-4.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn NFS: Simplify nfs_request_add_commit_list() arguments pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN
2016-01-23Merge branch 'akpm' (patches from Andrew)Linus Torvalds34-171/+493
Merge small final update from Andrew Morton: - DAX feature work: add fsync/msync support - kfree cleanup, MAINTAINERS update * emailed patches from Andrew Morton <[email protected]>: MAINTAINERS: return arch/sh to maintained state, with new maintainers tree wide: use kvfree() than conditional kfree()/vfree() dax: never rely on bh.b_dev being set by get_block() xfs: call dax_pfn_mkwrite() for DAX fsync/msync ext4: call dax_pfn_mkwrite() for DAX fsync/msync ext2: call dax_pfn_mkwrite() for DAX fsync/msync dax: add support for fsync/sync mm: add find_get_entries_tag() dax: support dirty DAX entries in radix tree pmem: add wb_cache_pmem() to the PMEM API dax: fix conversion of holes to PMDs dax: fix NULL pointer dereference in __dax_dbg()
2016-01-23Merge branches 'thermal-intel', 'thermal-suspend-fix' and 'thermal-soc' into ↵Zhang Rui7-38/+293
next
2016-01-22Merge tag 'please-pull-copy_file_range' of ↵Linus Torvalds3-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 copy_file_range syscall update from Tony Luck: "Another release, another new syscall to wire up" * tag 'please-pull-copy_file_range' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: [IA64] Enable copy_file_range syscall for ia64
2016-01-22Merge tag 'armsoc-tegra' of ↵Linus Torvalds20-65/+6983
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC support for Tegra platforms from Olof Johansson: "Here's a single-SoC topic branch that we've staged separately. Mainly because it was hard to sort the branch contents in a way that fit our existing branches due to some refactorings. The code has been in -next for quite a while, but we staged it in arm-soc a bit late, which is why we've kept it separate from the other updates and are sending it separately here" * tag 'armsoc-tegra' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: tegra: Add NVIDIA Jetson TX1 Developer Kit support arm64: tegra: Add NVIDIA P2597 I/O board support arm64: tegra: Add NVIDIA Jetson TX1 support arm64: tegra: Add NVIDIA P2571 board support arm64: tegra: Add NVIDIA P2371 board support arm64: tegra: Add NVIDIA P2595 I/O board support arm64: tegra: Add NVIDIA P2530 main board support arm64: tegra: Add Tegra210 support arm64: tegra: Add NVIDIA Tegra132 Norrin support arm64: tegra: Add Tegra132 support ARM: tegra: select USB_ULPI from EHCI rather than platform ARM: tegra: Ensure entire dcache is flushed on entering LP0/1 amba: Hide TEGRA_AHB symbol soc/tegra: Add Tegra210 support soc/tegra: Provide per-SoC Kconfig symbols
2016-01-22vfs: abort dedupe loop if fatal signals are pendingDarrick J. Wong1-0/+3
If the program running dedupe receives a fatal signal during the dedupe loop, we should bail out to avoid tying up the system. Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Al Viro <[email protected]>
2016-01-22Merge tag 'armsoc-fixes' of ↵Linus Torvalds4-15/+9
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A few fixes for fallout that we didn't catch in time in -next, or smaller warning fixes that have been discovered since" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: soc: qcom/spm: shut up uninitialized variable warning ARM: realview: fix device tree build ARM: debug-ll: fix BCM63xx entry for multiplatform ARM: dts: armadillo800eva Correct extal1 frequency to 24 MHz
2016-01-22Merge branch 'for-linus' of ↵Linus Torvalds4-210/+456
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: "The second round of updates for the input subsystem, mainly changes to xpad driver to better hanlde Xbox One controllers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: gpio-keys - allow disabling individual buttons in DT Input: gpio-keys - allow setting input device name in DT Input: xpad - correct xbox one pad device name Input: atmel_mxt_ts - improve touchscreen size/orientation handling Input: xpad - use LED API when identifying wireless controllers Input: xpad - workaround dead irq_out after suspend/ resume Input: xpad - update Xbox One Force Feedback Support Input: xpad - correctly handle concurrent LED and FF requests Input: xpad - handle "present" and "gone" correctly Input: xpad - remove spurious events of wireless xpad 360 controller
2016-01-22Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds26-3718/+3009
Pull more SCSI updates from James Bottomley: "This is mostly stuff which missed the first pull request because it needed to incubate longer. It's mainly made up of the ncr 5380 rework but also has a few assorted bug fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (88 commits) imm: Use new parport device model megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl storvsc: Fix typo in MODULE_PARM_DESC cxgbi: Typo in MODULE_PARM_DESC 3w-xxxx: Pass through compat mode ioctls hisi_sas: Use u64 for qw0 in free_device_v1_hw() hisi_sas: Fix typo in setup_itct_v1_hw() hisi_sas: Fix v1 itct masks ipr: Fix out-of-bounds null overwrite scsi: add Synology to 1024 sector blacklist ncr5380: Add support for HP C2502 ncr5380: Fix wait for 53C80 registers registers after PDMA ncr5380: Enable PDMA for DTC chips ncr5380: Enable PDMA for NCR53C400A ncr5380: Use runtime register mapping ncr5380: Fix pseudo DMA transfers on 53C400 ncr5380: Cleanup whitespace and parentheses atari_NCR5380: Merge changes from NCR5380.c ncr5380: Merge changes from atari_NCR5380.c ncr5380: Fix whitespace in comments using regexp ...
2016-01-22MAINTAINERS: return arch/sh to maintained state, with new maintainersRich Felker1-1/+3
Add Yoshinori Sato and Rich Felker as maintainers for arch/sh (SUPERH). Signed-off-by: Rich Felker <[email protected]> Signed-off-by: Yoshinori Sato <[email protected]> Acked-by: D. Jeff Dionne <[email protected]> Acked-by: Rob Landley <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-01-22tree wide: use kvfree() than conditional kfree()/vfree()Tetsuo Handa17-103/+36
There are many locations that do if (memory_was_allocated_by_vmalloc) vfree(ptr); else kfree(ptr); but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory using is_vmalloc_addr(). Unless callers have special reasons, we can replace this branch with kvfree(). Please check and reply if you found problems. Signed-off-by: Tetsuo Handa <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Jan Kara <[email protected]> Acked-by: Russell King <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Acked-by: "Rafael J. Wysocki" <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Oleg Drokin <[email protected]> Cc: Boris Petkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-01-22dax: never rely on bh.b_dev being set by get_block()Ross Zwisler1-0/+3
Previously in DAX we assumed that calls to get_block() would set bh.b_bdev, and we would then use that value even in error cases for debugging. This caused a NULL pointer dereference in __dax_dbg() which was fixed by a previous commit, but that commit only changed the one place where we were hitting an error. Instead, update dax.c so that we always initialize bh.b_bdev as best we can based on the information that DAX has. get_block() may or may not update to a new value, but this at least lets us get something helpful from bh.b_bdev for error messages and not have to worry about whether it was set by get_block() or not. Signed-off-by: Ross Zwisler <[email protected]> Reported-by: Jan Kara <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>