the assembler to
properly place move in delay slot (as it is done in Linux now - see
68dec269ee29c3abfd09596fbee7e40d875a6ab3) - that is what is done in
patch.
Denis Orlov (1):
MIPS: fix optimised memset returning garbage
arch/mips/lib/memset.S | 2 +-
1 file changed, 1 insertion(+), 1
There is a subtle bug in arch/mips/lib/memset.S, which results in
not writing the correct return value into v0 register if the value
to fill memory with is 0.
Signed-off-by: Denis Orlov
---
arch/mips/lib/memset.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lib
a583158c9ce822c96a718fbf877cec1e5f9ad75d). Or, rather, the move and the
branch instruction could be swapped, thus allowing the assembler to
properly place move in delay slot (as it is done in Linux now - see
68dec269ee29c3abfd09596fbee7e40d875a6ab3) - that is what is done in this
patch.
Signed-off-by: Denis Orlov
---
arch
Currently, after successful memory region requests the driver
initialization could still fail, leaving those regions allocated. By
reordering the code those requests can be placed later, after the
possibly failing calls.
Signed-off-by: Denis Orlov
---
drivers/usb/host/ehci-hcd.c | 28
With GENERIC_PHY disabled, EHCI driver initialization fails in
ehci_probe() as calling phy_optional_get() returns "Function not
implemented" value. So it seems reasonable to make USB_EHCI explicitly
depend on GENERIC_PHY.
Signed-off-by: Denis Orlov
---
drivers/usb/host/Kconfig | 1
Signed-off-by: Denis Orlov
---
drivers/ata/ide-sff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index 7884b62bab..69055e0585 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -96,7 +96,7 @@ static int
Add missing macros and fix misspellings.
Signed-off-by: Denis Orlov
---
drivers/ata/disk_ata_drive.c | 23 +--
include/ata_drive.h | 5 +
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata
that clk_round_rate() returns the frequency that was given as
argument in this case.
Signed-off-by: Denis Orlov
---
drivers/clk/clk.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 52e309e877..7492717d3c 100644
--- a/drivers/clk/clk.c
Signed-off-by: Denis Orlov
---
commands/clk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commands/clk.c b/commands/clk.c
index 0f7d7422e9..dfbc7c988f 100644
--- a/commands/clk.c
+++ b/commands/clk.c
@@ -99,12 +99,12 @@ static int do_clk_round_rate(int argc, char
Denis Orlov (7):
net: e1000: remove superfluous allocation check
net: e1000: properly read/write MDI registers on 8254x cards
net: e1000: do not actually acquire/put swfw_sync on 8254x cards
net: e1000: configure tx/rx and rctl in open() instead of init()
net: rtl8169: properly map rx/tx
dma_alloc() calls xmemalign which panics if unable to allocate memory,
so there is no need to check the returned pointer for validity.
Signed-off-by: Denis Orlov
---
drivers/net/e1000/main.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000
There is no Software-Firmware Synchronization register on these
controllers.
Signed-off-by: Denis Orlov
---
drivers/net/e1000/main.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 3b45fb3b51..4ca598eb2f 100644
--- a/drivers
Otherwise, ifdowning the interface leads to a state in which trying to
ifup it again fails.
Signed-off-by: Denis Orlov
---
drivers/net/e1000/main.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index
Otherwise it just leaks.
Signed-off-by: Denis Orlov
---
drivers/net/rtl8169.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 4b40c539dd..e923e179bf 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -478,6
Otherwise, the board hangs on doing ifup after ifdown as the latter
disables bus mastering for the device in rtl8169_eth_halt().
Signed-off-by: Denis Orlov
---
drivers/net/rtl8169.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index
Taken from Linux e1000 driver.
Signed-off-by: Denis Orlov
---
drivers/net/e1000/e1000.h | 3 +++
drivers/net/e1000/main.c | 22 ++
2 files changed, 25 insertions(+)
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 52ad3d4cdb..3a5ee9988e 100644
Signed-off-by: Denis Orlov
---
drivers/net/rtl8169.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 341f5f240e..e78cc40ffe 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 21 +++--
drivers/ata/ahci.h | 12
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ad9e2f950f..c64c856f94 100644
--- a/drivers/ata/ahci.c
+++ b/drivers
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index c64c856f94..5aab81fcef 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -596,7 +596,7 @@ int ahci_add_host(struct
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 5aab81fcef..026f83046c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -192,14 +192,12
Currently those are used in some routines side by side with underlying
functions with no apparent reason for it. Make their usage uniform, this
cleans up code a bit and allows to remove unneeded variables.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 18 +++---
1 file changed
Memory allocated with dma_alloc_coherent() is aligned by page size.
Calling it multiple times leads to unnecessary fragmentation and
overhead considering that we are actually able to allocate all the
memory that we need at once by issuing only one call.
Signed-off-by: Denis Orlov
---
drivers
The value from the "ports implemented" register should be kept in mind
when registering ports or detecting devices on them.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/ahci.c b/d
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2d5adcfca9..f9056ff418 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -171,7 +171,7 @@ static int ahci_io(struct
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 23085ebe09..2d5adcfca9 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -532,6 +532,7 @@ void ahci_print_info(struct ahci_device *ahci
We are supposed to populate a table, but instead we were just
overwriting the same entry over and over in a loop.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index f7eb35c09d..2d7b527755 100644
Using dma_sync_single_for_*() does not make sense in there - we are
given a cpu side address of a buffer and need to actually map it for
the device.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions
It is supposed to represent a pointer so make it actually be one.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 5 ++---
drivers/ata/ahci.h | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index d423da3a48..23085ebe09 100644
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ff9093c7b7..d423da3a48 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -117,8 +117,10 @@ static
They represent addresses from the device side and should be used instead
of cpu side ones when populating device registers than hold addresses.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 21 -
drivers/ata/ahci.h | 3 +++
2 files changed, 15 insertions(+), 9
The output was a bit misleading, not displaying physical addresses while
for some reason using "dma" to specify a variable in one case. Make it
print both types of addresses.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 6 --
1 file changed, 4 insertions(+), 2 deletion
a somewhat misleading comment that calls the command
list a command table. There is a cmt_tbl field that actually holds a
pointer to a different structure that is called a command table in the
specification, so it seems better to more clearly disambiguate them.
Signed-off-by: Denis Orlov
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 51 +++---
drivers/ata/ahci.h | 30 +++
2 files changed, 52 insertions(+), 29 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2d7b527755..1d8099c2ee 100644
The macro that indicates the size of a single element in the command
list was incorrectly used instead of the macro that stands for the size
of the whole list.
Signed-off-by: Denis Orlov
---
drivers/ata/ahci.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers
We do not have an edev.dev set up yet when we are filling in the device
structure and reading an EEPROM in probe. Besides, using hw->dev for
those messages seems more appropriate.
Signed-off-by: Denis Orlov
---
drivers/net/e1000/eeprom.c | 6 +++---
drivers/net/e1000/main.c | 2 +-
2 fi
Every other function in reset.h has a corresponding stub that is used
when the option RESET_CONTROLLER is disabled in config. This allows for
code that uses this function to still be compilable even when the reset
controller subsystem is disabled.
Signed-off-by: Denis Orlov
---
include/linux
significant byte set for any of computed CRC bytes thus
results in the mismatch being erroneously detected.
While at it, also remove redundant type casts.
Signed-off-by: Denis Orlov
---
common/ddr_spd.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/common
.
Signed-off-by: Denis Orlov
---
drivers/net/e1000/eeprom.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index 27143bd6d0..c90faf3a58 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -495,6 +495,7
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
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
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
().
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
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
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
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
', 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
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
Otherwise, we can not access file systems located on partitioned NVME
drives.
Signed-off-by: Denis Orlov
---
drivers/nvme/host/core.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 79a5f9325e..bf9176ce09 100644
--- a/drivers
This driver seems to work fine on ARM64 Virtual Machine in QEMU.
Signed-off-by: Denis Orlov
---
drivers/net/Kconfig | 1 -
drivers/net/rtl8139.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 30de1f544c..86096c07e2 100644
--- a/drivers
This moves PCI bus-mastering enable from 'init' to 'open', allowing to
bring an interface up after bringing it down. Also add corresponding
dma_free_coherent() calls into 'close', getting rid of memory leaks.
Signed-off-by: Denis Orlov
---
drivers/net/rtl8139.c | 8 +++-
1 file changed, 7
Fixes a typo.
Signed-off-by: Denis Orlov
---
drivers/net/rtl8139.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 1cd2ae14de..5c91c10fea 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -412,7 +412,7
From: Antony Pavlov
Signed-off-by: Antony Pavlov
Signed-off-by: Denis Orlov
---
drivers/net/e1000/e1000.h | 2 ++
drivers/net/e1000/main.c | 8
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 558a4ac271
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
.
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
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
-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
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
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
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
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
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 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,
> >>>
.
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_
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
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
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(+)
> >
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
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
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
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 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
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
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
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
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
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
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
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
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
---
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
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
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
1 - 100 of 142 matches
Mail list logo