-off-by: Denis Orlov
---
arch/mips/boot/uncompress.c | 6 +++---
arch/mips/lib/reloc.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/boot/uncompress.c b/arch/mips/boot/uncompress.c
index 9344679a6b..0630d03c6b 100644
--- a/arch/mips/boot/uncompress.c
+++ b
This adds support for identifying more CPUs emulatable by QEMU, so that
their names are shown when using 'cpuinfo' command.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/cpu.h | 30 +++
arch/mips/lib/cpu-probe.c | 59 -
2 files
Also reorder some of them to be more uniform.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/mipsregs.h | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 9e7d656542..0b618320ff 100644
Otherwise it would output as __cpu_name global variable ends up
being a null pointer.
Signed-off-by: Denis Orlov
---
arch/mips/lib/cpu-probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lib/cpu-probe.c b/arch/mips/lib/cpu-probe.c
index cbde43a595..47c9c671eb
Denis Orlov (3):
mips: cpuinfo: fix cpu name output for unknown processors
mips: cpu-probe: identify more MIPS CPUs
mips: mipsregs: remove duplicate definitions for Config 1 bits
arch/mips/include/asm/cpu.h | 30 +---
arch/mips/include/asm/mipsregs.h | 12 +++
arch
It was at odds with the list of options, with the former mentioning
RATE and the latter mentioning HZ as a parameter. It seems that every
other clk-related command uses HZ, so use it here too.
Signed-off-by: Denis Orlov
---
commands/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
as a hexadecimal value instead of a decoded string. The
logic is mostly the same too, but some changes in how calculations are
made were required so as not to use floating point arithmetic.
Signed-off-by: Denis Orlov
---
common/ddr_spd.c | 556 ++-
1
This extends the spd_decode command to correctly print out the contents
of the DDR3 SPD EEPROMs in addition to the DDR2 ones.
Denis Orlov (2):
ddr_spd: add DDR3 Load Reduced module specific data
ddr_spd: add routine for printing DDR3 SPD contents
common/ddr_spd.c | 556
This will be used by the DDR3 SPD data printing routine and is needed for
completeness, to cover all of the DDR3-related cases from the original
decode-dimms tool.
Signed-off-by: Denis Orlov
---
include/ddr_spd.h | 34 ++
1 file changed, 34 insertions(+)
diff
Signed-off-by: Denis Orlov
---
arch/mips/lib/barebox.lds.S | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
index 1259a4e94f..0720f9295d 100644
--- a/arch/mips/lib/barebox.lds.S
+++ b/arch/mips/lib/barebox.lds.S
@@ -3,7 +3,6
and calls to them. This will make it easier
to add support for boards that do happen to have secondary caches.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/cacheops.h | 5 +
arch/mips/lib/c-r4k.c| 12 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git
'r4k_cache_init()' is already declared in the appropriate 'asm/cache.h'
header.
Signed-off-by: Denis Orlov
---
arch/mips/lib/c-r4k.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/mips/lib/c-r4k.c b/arch/mips/lib/c-r4k.c
index 2fb4e90138..44cf57d99b 100644
--- a/arch/mips/lib/c-r4k.c
Even though the original code was taken from Linux, it is quite old and
crufty. Replace the 'while (1)' loop with the 'for' one, use const for
constant variables and use ALIGN_DOWN macro instead of repeating its
code.
Signed-off-by: Denis Orlov
---
arch/mips/lib/c-r4k.c | 13 +
1
Improves the code readability a tiny little bit.
Signed-off-by: Denis Orlov
---
arch/mips/lib/reloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 83b4040d95..a9078aa813 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips
to copy now consists of just two instructions.
However it feels more safe to calculate that in code instead, so that we
don't have to update this value if some code is added there in the
future.
Signed-off-by: Denis Orlov
---
arch/mips/boot/main_entry.c | 39
This gets us rid of this logic repeated in 'flush_cache_all()' for each
cache and allows to use blast_*cache funcs elsewhere if such a need
arises.
Signed-off-by: Denis Orlov
---
arch/mips/lib/c-r4k.c | 41 -
1 file changed, 24 insertions(+), 17 deletions
-by: Denis Orlov
---
arch/mips/include/asm/addrspace.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/include/asm/addrspace.h
b/arch/mips/include/asm/addrspace.h
index 11f10e5011..7a2006a8d1 100644
--- a/arch/mips/include/asm/addrspace.h
+++ b/arch/mips
For some reason we do set 'ttb' global variable, however we never end up
using it.
Signed-off-by: Denis Orlov
---
arch/mips/boot/main_entry-pbl.c | 4
1 file changed, 4 deletions(-)
diff --git a/arch/mips/boot/main_entry-pbl.c b/arch/mips/boot/main_entry-pbl.c
index f75ec03851..78982fd995
()'.
Signed-off-by: Denis Orlov
---
arch/mips/boot/start.S | 46 --
arch/mips/boot/start.c | 17
2 files changed, 17 insertions(+), 46 deletions(-)
delete mode 100644 arch/mips/boot/start.S
create mode 100644 arch/mips/boot/start.c
diff
It seems more reasonable to do that in PBL code that initializes all the
other appropriate CP0 register bits. This also makes a corresponding
call in barebox proper entry code redundant, paving the way to its
removal.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/pbl_macros.h | 1 +
1
compatible exception handling scheme
(and we even hardcode that), so what are we trying to achieve there
anyway?
Signed-off-by: Denis Orlov
---
arch/mips/boot/main_entry.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot
GAS allows to use '.asciz'/'.asciiz' instead of manually writing
'.byte 0' to null-terminate the string specified in '.ascii' directive.
Do just that in 'mips_barebox_10h'. The malta-specific entry code
currently does the same.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/pbl_macros.h
Remove duplicated macro calls by moving it into a common macro, as is
done in ARM code. Some boards were missing this one for no good reason,
it seems. Well, now they don't.
Signed-off-by: Denis Orlov
---
arch/mips/boards/8devices-lima/lowlevel.S | 2 --
arch/mips/boards/dlink-dir-320
Use 'mips_barebox_10h' macro instead. Remove the comment about the same
address being reserved for a Board ID as we don't really do anything
about it anyway.
Signed-off-by: Denis Orlov
---
arch/mips/boards/qemu-malta/lowlevel.S | 11 +--
1 file changed, 1 insertion(+), 10 deletions
The various definitions related to GT64120 system controller were split
between two headers: 'asm/gt64120.h' and 'mach/mach-gt64120.h'. It seems
that they were taken from Linux in this form. No reason to keep it like
that though, so unify them into 'mach/gt64120.h'.
Signed-off-by: Denis Orlov
of those actions and ensure that it's used in every board's entry
code.
Signed-off-by: Denis Orlov
---
arch/mips/boards/8devices-lima/lowlevel.S | 2 ++
arch/mips/boards/dlink-dir-320/lowlevel.S | 2 +-
arch/mips/boards/img-ci20/lowlevel.S | 2 +-
arch/mips/boards/loongson-ls1b
Signed-off-by: Denis Orlov
---
arch/mips/lib/cpuinfo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/lib/cpuinfo.c b/arch/mips/lib/cpuinfo.c
index fd27920f9b..41ec7b8d53 100644
--- a/arch/mips/lib/cpuinfo.c
+++ b/arch/mips/lib/cpuinfo.c
@@ -25,12 +25,12
Denis Orlov (21):
MIPS: addrspace: rectify ksseg segment naming
MIPS: addrspace: simplify the header
MIPS: main_entry-pbl: remove unused variable
MIPS: barebox.lds: remove extra whitespace
MIPS: reloc: mark relocate_code() as noreturn
MIPS: cpuinfo: use appropriate format specifiers
This register contains the failing address on Address Error and some
TLB-related exceptions, and is useful for debugging purposes.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/stackframe.h | 4
arch/mips/lib/traps.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion
Deduplicate some of the definitions for 32/64-bit targets and make KSEG*
32-bit defines available for 64-bit builds, as those might still be
useful in certain cases.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/addrspace.h | 45 ++-
1 file changed, 20
After relocating the code we jump straight to it, with the function
having an 'unreachable()' call at the end. So add an appropriate
attribute.
Signed-off-by: Denis Orlov
---
arch/mips/lib/reloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/lib/reloc.c b
On 6/30/23 11:57, Ian Abbott wrote:
> On 29/06/2023 21:13, Denis Orlov wrote:
>> The architecture was removed back in the commit efccc13513, however some
>> drivers that were available exclusively for NIOS2 were left over. As it
>> has been impossible to compile those
The architecture was removed back in the commit efccc13513, however some
drivers that were available exclusively for NIOS2 were left over. As it
has been impossible to compile those since then, it seems reasonable to
just get rid of them.
Signed-off-by: Denis Orlov
---
drivers/serial/Kconfig
. This is exactly what dma_alloc() is for, so use that for
buffers which we are going to map for dma.
Signed-off-by: Denis Orlov
---
drivers/usb/core/usb.c | 16 ---
drivers/usb/storage/transport.c | 74 +++--
drivers/usb/storage/usb.c | 17
3
Make sure dma buffers are both properly allocated and freed (they were
not in a few places).
Denis Orlov (2):
usb: storage: fix missing calls to free()
usb: make sure dma buffers are properly allocated
drivers/usb/core/usb.c | 16 ---
drivers/usb/storage/transport.c | 74
Memory allocated with xzalloc() was not actually being freed in a few
functions, resulting in memory leaks.
Signed-off-by: Denis Orlov
---
drivers/usb/storage/usb.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/storage/usb.c b/drivers/usb
The issues that broke the usage of VIRTIO_PCI on MIPS when we are
running uncached (i.e. with CONFIG_MMU=n) seem to have been fixed.
As such, allow this option to be set for those configurations.
Signed-off-by: Denis Orlov
---
drivers/virtio/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff
This mainly enables virtio stuff, but also turns on EXT4 and GPT
support. The latter two simplify things somewhat, allowing to mount
appropriate images, and are enabled in generic defconfigs for other
archs.
Signed-off-by: Denis Orlov
---
arch/mips/configs/qemu-malta64el_defconfig | 10
The issues with VIRTIO_PCI on MIPS seems to have been fixes, so enable
this option. And, while at it, also enable a few more for which there is
no reason not to have them enabled.
Denis Orlov (2):
virtio: remove VIRTIO_PCI dependance on MMU for MIPS
MIPS: enable more options in malta
On Fri, 9 Jun 2023 at 12:28, Ahmad Fatoum wrote:
>
> On 09.06.23 11:17, Denis Orlov wrote:
> > On Fri, 9 Jun 2023 at 10:21, Ahmad Fatoum wrote:
> >>
> >> On 09.06.23 09:14, Denis Orlov wrote:
> >>> Hello Ahmad,
> >>>
On Fri, 9 Jun 2023 at 10:21, Ahmad Fatoum wrote:
>
> On 09.06.23 09:14, Denis Orlov wrote:
> > Hello Ahmad,
> >
> > On Fri, 9 Jun 2023 at 09:36, Ahmad Fatoum wrote:
> >>
> >> On 07.06.23 06:59, Denis Orlov wrote:
> >>> Signe
On Fri, 9 Jun 2023 at 09:38, Ahmad Fatoum wrote:
>
> On 07.06.23 06:59, Denis Orlov wrote:
> > Signed-off-by: Denis Orlov
>
> https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/
> has a dedicated mips64 toolchain. Given that you don't touch the
Hello Ahmad,
On Fri, 9 Jun 2023 at 09:36, Ahmad Fatoum wrote:
>
> On 07.06.23 06:59, Denis Orlov wrote:
> > Signed-off-by: Denis Orlov
> > ---
> > test/mips/qemu-malta64el_defconfig.yaml | 22 ++
> > 1 file changed, 22 insertions(+)
> >
Use UL/ULL() macros for those so that corresponding suffixes only appear
when we are compiling C code. Hide all the other functions/macros that
we can't use in assembly with '#ifndef __ASSEMBLY__'.
Signed-off-by: Denis Orlov
---
include/linux/bitops.h | 18 --
1 file changed, 12
Those seem quite useful, e.g. when defining bitmasks.
Signed-off-by: Denis Orlov
---
include/linux/bitops.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index d9a5a81a9c..a5f6ac6545 100644
--- a/include/linux/bitops.h
.
Signed-off-by: Denis Orlov
---
arch/arm/include/asm/memory.h| 5 -
arch/arm/include/asm/pgtable64.h | 2 --
arch/kvx/include/asm/sfr_defs.h | 2 --
include/linux/const.h| 10 --
4 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/arch/arm/include/asm
This updates some of the definitions in those files, mainly to make
BIT*/GENMASK() macros usable in assembly code.
Denis Orlov (3):
include: const: make UL/ULL() macros commonly available
include: bitops: allow BIT* macros to be used in assembly code
include: bitops: import more BITS_TO_
Signed-off-by: Denis Orlov
---
.github/workflows/test-labgrid-pytest.yml | 4
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/test-labgrid-pytest.yml
b/.github/workflows/test-labgrid-pytest.yml
index 2c74150066..674e4251d1 100644
--- a/.github/workflows/test-labgrid
Signed-off-by: Denis Orlov
---
test/mips/qemu-malta64el_defconfig.yaml | 22 ++
1 file changed, 22 insertions(+)
create mode 100644 test/mips/qemu-malta64el_defconfig.yaml
diff --git a/test/mips/qemu-malta64el_defconfig.yaml
b/test/mips/qemu-malta64el_defconfig.yaml
new
-by: Denis Orlov
---
arch/mips/configs/qemu-malta64el_defconfig | 87 ++
1 file changed, 87 insertions(+)
create mode 100644 arch/mips/configs/qemu-malta64el_defconfig
diff --git a/arch/mips/configs/qemu-malta64el_defconfig
b/arch/mips/configs/qemu-malta64el_defconfig
new file
supported, so naming it as that seems more fitting for me. And if
more MIPS64 boards will get support in the future, then this defconfig
might be renamed appropriately.
Denis Orlov (3):
MIPS: add qemu-malta64el_defconfig
test: mips: add QEMU Malta 64le labgrid config
ci: add a job for testing
On Tue, 6 Jun 2023 at 11:13, Ahmad Fatoum wrote:
>
> On 05.06.23 22:10, Denis Orlov wrote:
> > This allows to write generic assembly code that will compile under both
> > o32 and n64 ABIs, as otherwise the register definitions would conflict.
> >
> > Taken from Linu
On Tue, 6 Jun 2023 at 12:04, Ahmad Fatoum wrote:
>
> On 05.06.23 22:10, Denis Orlov wrote:
> > The code that uses TEXT_BASE will fail on reading truncated 32-bit
> > address if running with 64BIT enabled. As we only support running from
> > compatibility segments (i.e.
On Tue, 6 Jun 2023 at 11:03, Ahmad Fatoum wrote:
>
> On 05.06.23 22:10, Denis Orlov wrote:
> > KSEG macro is not available when compiling with CONFIG_64BIT enabled, so
> > use CKSEG instead.
>
> If they're interchangeable, why do we need KSEG?
Hmm, I think maybe we don
Hello Ahmad,
On Tue, 6 Jun 2023 at 11:02, Ahmad Fatoum wrote:
>
> Hello Denis,
>
> On 05.06.23 22:10, Denis Orlov wrote:
> > The existing 64BIT support for MIPS was somewhat incomplete with no
> > board having MIPS64 CPUs specified to be available as targets. Define
>
Make the code compatible with 64-bit configurations by storing saved
register values with unsigned long type and using generic macros in
assembly code.
Signed-off-by: Denis Orlov
---
arch/mips/Kconfig | 2 +-
arch/mips/include/asm/setjmp.h | 2 +-
arch/mips/lib/setjmp.S
the stack pointer.
Signed-off-by: Denis Orlov
---
arch/mips/lib/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index ff0a54af8e..45694fe7ef 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -173,7 +173
at it, this also removes an unused macro define.
Signed-off-by: Denis Orlov
---
arch/mips/Kconfig | 1 -
arch/mips/lib/memcpy.S | 37 -
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ab8c8cf176..de2f539cc1
This may speed up this code a little on MIPS64, however this also allows
us to get rid of unnecessary macro definition there, simplifying the
code a tiny bit.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/pbl_macros.h | 21 ++---
1 file changed, 10 insertions(+), 11
Fix "cast from pointer to integer of different size" warnings by casting
pointers into unsigned long values when calculating sizes. While at it,
simplify code a bit, removing unnecessary variables and instead giving
another variable a more comprehensible name.
Signed-off-by: D
-by: Denis Orlov
---
arch/mips/include/asm/regdef.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h
index 1300251661..df87582e8e 100644
--- a/arch/mips/include/asm/regdef.h
+++ b/arch/mips/include/asm/regdef.h
@@ -3,6 +3,8
stead"
warnings when compiling assembly code with CONFIG_64BIT.
Signed-off-by: Denis Orlov
---
arch/mips/boot/start.S | 2 +-
arch/mips/include/asm/asm.h | 10 +-
arch/mips/include/asm/debug_ll_ns16550.h | 6 +++---
arch/mips/include/asm/pbl_macros.h
Fixes "warning: cast from pointer to integer of different size"
messages.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/dma.h | 16 +---
arch/mips/include/asm/io.h | 2 +-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/arch/mips/include/asm/dm
Do not (accidentally?) truncate addresses when setting them in the
handler array.
Signed-off-by: Denis Orlov
---
arch/mips/boot/main_entry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
index 2c18bc81c3..d061a0e987
boots into 64BIT barebox
in QEMU.
Signed-off-by: Denis Orlov
---
arch/mips/boot/start.S | 2 ++
arch/mips/include/asm/pbl_macros.h | 11 +++
2 files changed, 13 insertions(+)
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index 5f134f9ae9..30828ad9ef 100644
The code that uses TEXT_BASE will fail on reading truncated 32-bit
address if running with 64BIT enabled. As we only support running from
compatibility segments (i.e. no 'proper' 64-bit base addresses), simply
make sure the value is sign-extended when passing it as a define.
Signed-off-by: Denis
Use CKSEG instead of KSEG, allowing it to compile on 64BIT
configurations. Also make sure that we do not truncate target
relocation address by writing it into a 32-bit wide variable.
Signed-off-by: Denis Orlov
---
arch/mips/lib/reloc.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions
This allows to compile PBL code with n64 ABI, which we use when
CONFIG_64BIT is set.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/pbl_macros.h | 28 ++--
arch/mips/include/asm/pbl_nmon.h | 10 +-
2 files changed, 19 insertions(+), 19 deletions(-)
diff
The existing 64BIT support for MIPS was somewhat incomplete with no
board having MIPS64 CPUs specified to be available as targets. Define
Malta as supporting those and fix all the compilation and linking
errors. Make some optional features available with 64BIT too.
Denis Orlov (17):
MIPS: malta
KSEG macro is not available when compiling with CONFIG_64BIT enabled, so
use CKSEG instead.
Signed-off-by: Denis Orlov
---
arch/mips/boards/qemu-malta/lowlevel.S | 4 ++--
arch/mips/mach-malta/pci.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips
For some reasons, object file format was not passed to the linker when
linking PBL, leading for a bunch of "ABI is incompatible with that of
the selected emulation" errors. Fix it, and also remove duplicate flags
being passed when linking barebox proper.
Signed-off-by: Denis Orlov
---
Use CKSEG1ADDR for it to be properly converted to the 64-bit
sign-extended address when building with CONFIG_64BIT set.
Signed-off-by: Denis Orlov
---
arch/mips/mach-malta/include/mach/mach-gt64120.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/mach-malta
QEMU is able to emulate malta machine with a variety of MIPS CPUs,
including MIPS64 ones, so allow to compile barebox for such
configurations.
Signed-off-by: Denis Orlov
---
arch/mips/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index
he virtual address
argument of those arch-side functions be properly represented with a
void* type.
Apply the required changes in device drivers that use the affected
functions, making them pass the appropriate device pointer.
Signed-off-by: Denis Orlov
---
arch/arm/cpu/dma_32.c | 17 ++
merging two parts of the patch and
dropping changes not really related to the matter at hand.
Denis Orlov (2):
dma: rework dma_sync_single_for_*() interface
net: macb: remove const from dev pointer in macb_device
arch/arm/cpu/dma_32.c | 17 +++---
arch/arm/cpu/dma_64.c
Otherwise, it leads to a bunch of warnings on passing those pointers to
dma_*() functions. As every other driver seem to be having non-const dev
pointers in their private structs, do the same here.
Signed-off-by: Denis Orlov
---
drivers/net/macb.c | 2 +-
1 file changed, 1 insertion(+), 1
that.
Signed-off-by: Denis Orlov
---
drivers/net/r8169_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/r8169_main.c b/drivers/net/r8169_main.c
index 5b448fa029..2225c26190 100644
--- a/drivers/net/r8169_main.c
+++ b/drivers/net/r8169_main.c
@@ -17,7 +17,6 @@
#include
#include
Hi!
>
> On 31.05.23 12:23, Sascha Hauer wrote:
> > This reverts commit d13d870986eeecc58d8652268557e4a159b9d4c4.
> >
> > While the patch itself is correct, it at least breaks USB on the
> > Raspberry Pi 3b.
> >
> > With this patch dma_sync_single_for_device() is passed the DMA address.
> > This
of the latter function having __iomem attributes, we
should not be remapping them. So, remove those IOMEM calls and instead
do explicit remapping in bochs_isa_detect(), which was missing it.
Also fix bochs_hw_probe() declaration missing one __iomem.
Signed-off-by: Denis Orlov
---
drivers/video/bochs
af3cd13501eb04ca61d017ff4406f1cbffafdc04).
Signed-off-by: Denis Orlov
---
include/linux/string.h | 3 ---
lib/string.c | 48 +++---
2 files changed, 17 insertions(+), 34 deletions(-)
diff --git a/include/linux/string.h b/include/linux/string.h
index 0c79d3e5cf
', instead of 'p_memsz', to 'request_sdram_region',
resulting in potentially smaller amount of memory to be reserved.
As 'p_memsz' is always greater or equal to 'p_filesz', use only the
former for checking memory requirements in 'request_elf_segment'.
Signed-off-by: Denis Orlov
---
common/elf.c | 7
Signed-off-by: Denis Orlov
---
arch/mips/lib/bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 95e9dc0d7d..69ce9b3904 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -69,7 +69,7 @@ static int
Denis Orlov (3):
MIPS: bootm: do not free fdt pointer that contains an error
MIPS: bootm: do not leak memory on error in of_overlay_load_firmware()
MIPS: bootm: remove unnecessary phys/virt conversions
arch/mips/lib/bootm.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions
They are not doing anything there - we should already have proper
virtual addresses represented by those pointers.
Signed-off-by: Denis Orlov
---
arch/mips/lib/bootm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index
Also add a proper error message.
Signed-off-by: Denis Orlov
---
arch/mips/lib/bootm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 655535737e..95e9dc0d7d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
().
The functional change itself is taken from Linux commit
'MIPS: make dma_sync_*_for_cpu a little less overzealous'
(hash: cbf1449ba5aec9cf4c68b69f899391a8d42e9b8f).
Signed-off-by: Denis Orlov
---
arch/mips/lib/dma-default.c | 36 +---
1 file changed, 17 insertions
Cache flushing functions expect virtual addresses, so make sure those
are properly converted from the physical ones in dma_sync_single_for_*.
QEMU doesn't care as it ignores cache instructions, but without such
change this code would result in TLB exceptions on real hardware.
Signed-off-by: Denis
called directly, and a virtual address treated as one when
called from dma_map funcs.
Signed-off-by: Denis Orlov
---
drivers/dma/map.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/map.c b/drivers/dma/map.c
index 114c0f7db3..fea04c38a3 100644
This fixes a few issues with streaming DMA functions, which should make
those work on real hardware. It also improves the code a bit, removing
unnecessary cache flushing in some cases.
Denis Orlov (3):
dma: use dma/cpu conversions correctly in dma_map/unmap_single
MIPS: dma-default: use
Hi!
On Fri, 3 Mar 2023 at 13:06, Sascha Hauer wrote:
>
> Hi Denis,
>
> On Tue, Feb 28, 2023 at 01:32:47PM +0300, Denis Orlov wrote:
> > -#ifndef dma_sync_single_for_device
> > -static inline void dma_sync_single_for_device(dma_addr_t a
for those. This should not make any functional change, as
there is no driver at the moment that requires non 1-to-1 dma mappings,
and thus would actually utilize those device pointers.
Signed-off-by: Denis Orlov
---
arch/arm/mach-bcm283x/mbox.c| 4 ++--
drivers/crypto/caam/caam
t, i.e. we would have to do all dma/cpu conversions in
arch-specific code, unlike how it is done in this patch. This would
lead to some code duplication though.
TODO: dma_alloc/free_coherent do need same kind of changes to utilise
cpu/dma conversions properly
Signed-off-by: Denis Orlov
---
arch/a
usage in drivers.
Denis Orlov (2):
dma: rework dma_sync_single interface
dma: update dma_sync_single uses in drivers
arch/arm/cpu/mmu-common.c| 9 +--
arch/arm/cpu/mmu.c | 17 +++--
arch/arm/cpu/mmu_64.c| 13 ++--
arch/arm/include/asm/dma.h
Denis Orlov (4):
MIPS: dma: fix nullptr handling in dma_free_coherent
MIPS: dma: remove unnecessary ifdefs
MIPS: dma: add arch-specific dma_alloc() implementation
MIPS: dma: simplify source structure
arch/mips/include/asm/dma-mapping.h | 40 ---
arch/mips/include
it to free(), actually trying to deallocate stuff.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/dma-mapping.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/dma-mapping.h
b/arch/mips/include/asm/dma-mapping.h
index 8e6ea08168..9f6ec03e3b 100644
There is no reason to keep code from 'dma-mapping.h' in a separate file,
so merge it into 'dma.h'.
Signed-off-by: Denis Orlov
---
arch/mips/include/asm/dma-mapping.h | 40 -
arch/mips/include/asm/dma.h | 31 +-
2 files changed, 30
We do not support any MIPS CPUs that are not MIPS32/MIPS64, so there is
no reason to check for those.
Signed-off-by: Denis Orlov
---
arch/mips/lib/dma-default.c | 8
1 file changed, 8 deletions(-)
diff --git a/arch/mips/lib/dma-default.c b/arch/mips/lib/dma-default.c
index fbe627c24c
-by: Denis Orlov
---
arch/mips/include/asm/dma.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h
index e0b4689172..49eeaac1a2 100644
--- a/arch/mips/include/asm/dma.h
+++ b/arch/mips/include/asm/dma.h
@@ -6,6 +6,18 @@
#ifndef
.
Signed-off-by: Denis Orlov
---
drivers/dma/map.c | 25 ++---
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/drivers/dma/map.c b/drivers/dma/map.c
index a00abf6421..13dbf2840f 100644
--- a/drivers/dma/map.c
+++ b/drivers/dma/map.c
@@ -3,25 +3,20
With these changes, e1000 driver now works on MIPS Malta in QEMU with
the corresponding network controller attached:
-netdev user,tftp=/tftpboot,id=net0 -device e1000,netdev=net0
Antony Pavlov (1):
net: e1000: properly map dma allocations
Denis Orlov (1):
dma: use virt/phys conversions
1 - 100 of 143 matches
Mail list logo