Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Huth 2ef6d1e52d Move the code for rfill into a separate function
The code from the FAST_RFILL macro uses a local array as a
temporary buffer - which gets allocated in the stack frame
of the engine() function. Since engine() can be called
recursively, this can cause stack overflows. So let's
move the rfill code into a separate function to avoid
these problems.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-12-01 17:02:04 +11:00
Thomas Huth 86b2718b46 Add missing half word access case to _FASTRMOVE and _FASTMOVE
The _FASTRMOVE and _FASTMOVE macros are missing the case where
the alignment matches "6" - in this case, the copying can also
be done with 16-bit accesses.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-08-05 16:02:34 +10:00
Thomas Huth 47a425db40 fbuffer: Implement RFILL as an accelerated primitive
By implementing RFILL as an primitive, we can get a huge
speed-up of the screen erasing function. On board-js2x,
it writes the pattern directly into the IO region, and on
board-qemu it uses the KVMPPC_H_LOGICAL_MEMOP hypercall to
copy the pattern from a temporary buffer into the IO region.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-08-05 16:02:18 +10:00
Thomas Huth 59a135eb78 fbuffer: Implement MRMOVE as an accelerated primitive
The character drawing function fb8-draw-character uses "mrmove"
(which moves main memory contents to IO memory) to copy the data
of the character from main memory to the frame buffer. However,
the current implementation of "mrmove"  performs quite badly on
board-qemu since it triggers a hypercall for each memory access
(e.g. for each 8 bytes that are transfered).
But since the KVMPPC_H_LOGICAL_MEMOP hypercall can transfer bigger
regions at once, we can accelerate the character drawing quite a
bit by simply mapping the "mrmove" to the same macro that is
already used for the "rmove" (which is normally only used for
copying from IO memory to IO memory, but on board-qemu it does
not matter). For keeping board-js2x in sync, this patch also
transforms the "mrmove" for js2x into primitives.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-08-05 16:01:39 +10:00
Benjamin Herrenschmidt 7add7a0a9f Move _FASTRMOVE implementation into headers & support new hcall
This moves _FASTREMOVE to the cache.h header, 970 uses the
existing code, p7 now uses the new memop hcall.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22 10:33:18 +11:00
Benjamin Herrenschmidt 59f6d802f3 Fix inline asm for ci_write_xx
It was clobbering r4 and not marking it as such, causing
problems among others in virtio-blk

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11 11:54:24 +11:00
Thomas Huth d38a1c54f5 Improved cache-inhibited access functions
Implemented the CI functions in cache.h (which are required by net-snk)
and fixed a bug in hv_logical_ci_store in libhvcall.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-10-12 13:20:00 +02:00
Benjamin Herrenschmidt 39426bad55 Initial qemu/KVM board support
Added a new board for SLOF running on KVM/qemu.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-03-22 15:22:00 +01:00