#
733b8bc1 |
| 21-Jan-2016 |
Maciej W. Rozycki <macro@imgtec.com> |
MIPS: math-emu: Make microMIPS branch delay slot emulation work
Complement commit 102cedc32a6e ("MIPS: microMIPS: Floating point support.") which introduced microMIPS FPU emulation, but did not adju
MIPS: math-emu: Make microMIPS branch delay slot emulation work
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 <macro@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12174/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
#
a87265cf |
| 21-Jan-2016 |
Maciej W. Rozycki <macro@imgtec.com> |
MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part
Correct formatting breakage introduced with commit 102cedc32a6e ("MIPS: microMIPS: Floating point support."), so that further changes to
MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part
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 <macro@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12173/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
#
e4553573 |
| 21-Jan-2016 |
Maciej W. Rozycki <macro@imgtec.com> |
MIPS: math-emu: Correctly handle NOP emulation
Fix an issue introduced with commit 9ab4471c9f1b ("MIPS: math-emu: Correct delay-slot exception propagation") where the emulation of a NOP instruction
MIPS: math-emu: Correctly handle NOP emulation
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 <macro@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12172/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
Revision tags: openbmc-20160120-1, v4.4, openbmc-20151217-1, openbmc-20151210-1, openbmc-20151202-1, openbmc-20151123-1, openbmc-20151118-1, openbmc-20151104-1 |
|
#
84a73014 |
| 03-Nov-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.3 merge window.
|
Revision tags: v4.3, openbmc-20151102-1, openbmc-20151028-1 |
|
#
c7d77a79 |
| 14-Oct-2015 |
Ingo Molnar <mingo@kernel.org> |
Merge branch 'x86/urgent' into core/efi, to pick up a pending EFI fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
#
985f2c87 |
| 13-Oct-2015 |
Johannes Berg <johannes.berg@intel.com> |
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge net-next to get some driver changes that patches depend on (in order to avoid conflicts).
Signed-off-by: Johannes Berg <johan
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge net-next to get some driver changes that patches depend on (in order to avoid conflicts).
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
show more ...
|
#
79828b4f |
| 12-Oct-2015 |
Mark Brown <broonie@kernel.org> |
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-fix-rt5645
|
#
9f30a04d |
| 02-Oct-2015 |
Stephen Boyd <sboyd@codeaurora.org> |
Merge branch 'for-4.3-rc/ti-clk-fixes' of https://github.com/t-kristo/linux-pm into clk-fixes
Pull fixes from Tero Kristo:
"A few TI clock driver fixes to pull against 4.3-rc"
* 'for-4.3-rc/ti-clk
Merge branch 'for-4.3-rc/ti-clk-fixes' of https://github.com/t-kristo/linux-pm into clk-fixes
Pull fixes from Tero Kristo:
"A few TI clock driver fixes to pull against 4.3-rc"
* 'for-4.3-rc/ti-clk-fixes' of https://github.com/t-kristo/linux-pm: (3 commits) clk: ti: dflt: fix enable_reg validity check clk: ti: fix dual-registration of uart4_ick clk: ti: clk-7xx: Remove hardwired ABE clock configuration
show more ...
|
#
44cc6c08 |
| 30-Sep-2015 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next
Backmerge to catch up with 4.3. slightly more involved conflict in the irq code, but nothing beyond adjacent changes.
Signed-off-
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next
Backmerge to catch up with 4.3. slightly more involved conflict in the irq code, but nothing beyond adjacent changes.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
#
8f697e57 |
| 29-Sep-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge tag 'v4.3-rc3' into next
Merge with Linux 4.3-rc3 to bring in MFD DA9062 changes to merge DA9062 OnKey driver.
|
#
310b7cec |
| 25-Sep-2015 |
Doug Ledford <dledford@redhat.com> |
Merge tag 'v4.3-rc2' into k.o/for-4.3-v1
Linux 4.3-rc2
|
#
646db260 |
| 22-Sep-2015 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
Merge tag 'v4.3-rc2' into topic/drm-misc
Backmerge Linux 4.3-rc2 because of conflicts in the dp helper code between bugfixes and new code. Just adjacent lines really.
On top of that there's a silen
Merge tag 'v4.3-rc2' into topic/drm-misc
Backmerge Linux 4.3-rc2 because of conflicts in the dp helper code between bugfixes and new code. Just adjacent lines really.
On top of that there's a silent conflict in the new fsl-dcu driver merged into 4.3 and
commit 844f9111f6f54f88eb2f0fac121b82ce77193866 Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Date: Wed Sep 2 10:42:40 2015 +0200
drm/atomic: Make prepare_fb/cleanup_fb only take state, v3.
which Thierry Reding spotted and provided a fixup for.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
#
db25f440 |
| 24-Sep-2015 |
Takashi Iwai <tiwai@suse.de> |
Merge branch 'for-linus' into for-next
|
#
92243b6f |
| 16-Sep-2015 |
Mark Brown <broonie@kernel.org> |
Merge tag 'v4.3-rc1' into spi-fix-doc
Linux 4.3-rc1
|
#
7168e947 |
| 14-Sep-2015 |
Tony Lindgren <tony@atomide.com> |
Merge branch 'fixes-rc1' into omap-for-v4.3/fixes
|
#
db66e32e |
| 13-Sep-2015 |
Brian Norris <computersforpeace@gmail.com> |
Merge tag 'v4.3-rc1' into MTD -next development
|
#
9ddf9071 |
| 13-Sep-2015 |
Mauro Carvalho Chehab <mchehab@osg.samsung.com> |
Merge tag 'v4.3-rc1' into patchwork
Linux 4.3-rc1
* tag 'v4.3-rc1': (11838 commits) Linux 4.3-rc1 blk: rq_data_dir() should not return a boolean writeback: plug writeback in wb_writeback() an
Merge tag 'v4.3-rc1' into patchwork
Linux 4.3-rc1
* tag 'v4.3-rc1': (11838 commits) Linux 4.3-rc1 blk: rq_data_dir() should not return a boolean writeback: plug writeback in wb_writeback() and writeback_inodes_wb() thermal: fix intel PCH thermal driver mismerge ARCv2: [axs103_smp] Reduce clk for SMP FPGA configs revert "ocfs2/dlm: use list_for_each_entry instead of list_for_each" mm/early_ioremap: add explicit #include of asm/early_ioremap.h fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void selftests: enhance membarrier syscall test selftests: add membarrier syscall test sys_membarrier(): system-wide memory barrier (generic, x86) MODSIGN: fix a compilation warning in extract-cert Revert "writeback: plug writeback at a high level" scsi_dh: fix randconfig build error target: use stringify.h instead of own definition target/user: Fix UFLAG_UNKNOWN_OP handling target: Remove no-op conditional target/user: Remove unused variable target: Fix max_cmd_sn increment w/o cmdsn mutex regressions target: Attach EXTENDED_COPY local I/O descriptors to xcopy_pt_sess ...
show more ...
|
#
d2bb1d42 |
| 13-Sep-2015 |
Ingo Molnar <mingo@kernel.org> |
Merge tag 'v4.3-rc1' into perf/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
#
c7ef92ce |
| 13-Sep-2015 |
Ingo Molnar <mingo@kernel.org> |
Merge tag 'v4.3-rc1' into locking/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
#
973759c8 |
| 13-Sep-2015 |
Ingo Molnar <mingo@kernel.org> |
Merge tag 'v4.3-rc1' into sched/core, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
Revision tags: v4.3-rc1 |
|
#
807249d3 |
| 03-Sep-2015 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "This is the main pull request for 4.3 for MIPS. Here's the summary:
Three f
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "This is the main pull request for 4.3 for MIPS. Here's the summary:
Three fixes that didn't make 4.2-stable:
- a -Os build might compile the kernel using the MIPS16 instruction set but the R2 optimized inline functions in <uapi/asm/swab.h> are implemented using 32-bit wide instructions which is invalid.
- a build error in pgtable-bits.h for a particular kernel configuration.
- accessing registers of the CM GCR might have been compiled to use 64 bit accesses but these registers are onl 32 bit wide.
And also a few new bits:
- move the ATH79 GPIO driver to drivers/gpio
- the definition of IRQCHIP_DECLARE has moved to linux/irqchip.h, change ATH79 accordingly.
- fix definition of pgprot_writecombine
- add an implementation of dma_map_ops.mmap
- fix alignment of quiet build output for vmlinuz link
- BCM47xx: Use kmemdup rather than duplicating its implementation
- Netlogic: Fix 0x0x prefixes of constants.
- merge Bjorn Helgaas' series to remove most of the weak keywords from function declarations.
- CP0 and CP1 registers are best considered treated as unsigned values to avoid large values from becoming negative values.
- improve support for the MIPS GIC timer.
- enable common clock framework for Malta and SEAD3.
- a number of improvments and fixes to dump_tlb().
- document the MIPS TLB dump functionality in Magic SysRq.
- Cavium Octeon CN68XX improvments.
- NetLogic improvments.
- irq: Use access helper irq_data_get_affinity_mask.
- handle MSA unaligned accesses.
- a number of R6-related math-emu fixes.
- support for I6400.
- improvments to MSA support.
- add uprobes support.
- move from deprecated __initcall to arch_initcall.
- remove finish_arch_switch().
- IRQ cleanups by Thomas Gleixner.
- migrate to new 'set-state' interface.
- random small cleanups"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (148 commits) MIPS: UAPI: Fix unrecognized opcode WSBH/DSBH/DSHD when using MIPS16. MIPS: Fix alignment of quiet build output for vmlinuz link MIPS: math-emu: Remove unused handle_dsemul function declaration MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction MIPS: math-emu: Add support for the MIPS R6 RINT FPU instruction MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction MIPS: math-emu: Add support for the MIPS R6 SELNEZ FPU instruction MIPS: math-emu: Add support for the MIPS R6 SELEQZ FPU instruction MIPS: math-emu: Add support for the CMP.condn.fmt R6 instruction MIPS: inst.h: Add new MIPS R6 FPU opcodes MIPS: Octeon: Fix management port MII address on Kontron S1901 MIPS: BCM47xx: Use kmemdup rather than duplicating its implementation STAGING: Octeon: Use common helpers for determining interface and port MIPS: Octeon: Support interfaces 4 and 5 MIPS: Octeon: Set up 1:1 mapping between CN68XX PKO queues and ports MIPS: Octeon: Initialize CN68XX PKO STAGING: Octeon: Support CN68XX style WQE ...
show more ...
|
#
01b944fe |
| 03-Sep-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.3 merge window.
|
Revision tags: v4.2, v4.2-rc8, v4.2-rc7 |
|
#
65ab562c |
| 12-Aug-2015 |
Markos Chandras <markos.chandras@imgtec.com> |
MIPS: math-emu: Remove unused handle_dsemul function declaration
handle_dsemul does not exist and it's not being used in the code at all so remove its declaration. The deliberate DS emulation except
MIPS: math-emu: Remove unused handle_dsemul function declaration
handle_dsemul does not exist and it's not being used in the code at all so remove its declaration. The deliberate DS emulation exception is handled by the do_dsemulret C code.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10950/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
Revision tags: v4.2-rc6, v4.2-rc5, v4.2-rc4 |
|
#
c57d5621 |
| 20-Jul-2015 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Merge tag 'v4.2-rc3' into next
Sync up with Linux 4.2-rc3 to bring in infrastructure (OF) pieces.
|
Revision tags: v4.2-rc3, v4.2-rc2, v4.2-rc1 |
|
#
ec3b34e1 |
| 22-Jun-2015 |
Jiri Kosina <jkosina@suse.cz> |
Merge branches 'for-4.2/i2c-hid', 'for-4.2/lenovo', 'for-4.2/plantronics', 'for-4.2/rmi', 'for-4.2/sensor-hub', 'for-4.2/sjoy', 'for-4.2/sony' and 'for-4.2/wacom' into for-linus
Conflicts: drivers/
Merge branches 'for-4.2/i2c-hid', 'for-4.2/lenovo', 'for-4.2/plantronics', 'for-4.2/rmi', 'for-4.2/sensor-hub', 'for-4.2/sjoy', 'for-4.2/sony' and 'for-4.2/wacom' into for-linus
Conflicts: drivers/hid/wacom_wac.c
show more ...
|