Re: [RFC PATCH 05/15] mips: fix dma_sync_* stuff for MIPS64

2018-05-17 Thread Sascha Hauer
On Thu, May 17, 2018 at 04:58:48PM +0300, Peter Mamonov wrote: > Signed-off-by: Peter Mamonov > --- > arch/mips/include/asm/dma-mapping.h | 2 +- > arch/mips/include/asm/io.h | 4 ++-- > arch/mips/lib/c-r4k.c | 26 +- >

Re: [RFC PATCH 00/15] MIPS64 support

2018-05-17 Thread Sascha Hauer
Hi Peter, On Thu, May 17, 2018 at 04:58:43PM +0300, Peter Mamonov wrote: > Hi, > > Recently I've resolved a couple of issues that prevented 64bit Barebox from > running on MIPS64 CPUs. By the way, 32bit Barebox runs on MIPS64 without any > issues, since MIPS64 supports 32 bit addressing mode.

Re: [PATCH v1 05/10] MIPS: add kexec ELF loading support

2018-05-17 Thread Sascha Hauer
On Thu, May 17, 2018 at 12:07:29PM +0200, Oleksij Rempel wrote: > Am 17.05.2018 um 11:56 schrieb Sascha Hauer: > > On Wed, May 16, 2018 at 06:42:28PM +0200, Oleksij Rempel wrote: > >> From: Antony Pavlov > >> > >> Signed-off-by: Antony Pavlov >

Re: [RFC PATCH 11/15] resource: fix iomem root resource for 64 bit

2018-05-17 Thread Andrey Smirnov
On Thu, May 17, 2018 at 6:58 AM, Peter Mamonov wrote: > Signed-off-by: Peter Mamonov > --- > common/resource.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/common/resource.c b/common/resource.c > index e4bbe15fd..1cf00a927 100644 > ---

Re: [RFC PATCH 15/15] i2c/muxes/i2c-mux-pca954x: fix private data retrieval for 64bit mode

2018-05-17 Thread Andrey Smirnov
On Thu, May 17, 2018 at 6:58 AM, Peter Mamonov wrote: > Signed-off-by: Peter Mamonov > --- > drivers/i2c/muxes/i2c-mux-pca954x.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c >

[PATCH v3 4/4] common: oftree: Pass reset source and reset source instance to kernel

2018-05-17 Thread Andrey Smirnov
Detecting reset reason is, in some cases, a destructive operation and in such cases it is impossible to obtain that information in the kernel without some help from barebox. Pass reset source and reset source instance to kernel to Linux to make it availible to Linux userspace. This info is

[PATCH v3 0/4] Pass reset and boot sources via /chosen node

2018-05-17 Thread Andrey Smirnov
Everyone: The following patches are really usefull for Linux userspace applications that need to know the details about reset and boot sources. Feedback is welcome! Changes since [v2]: - Dropped unnecessary code in bootsource_get_alias_name(). - Chagned

[PATCH v3 2/4] bootsource: Add bootsource alias name API

2018-05-17 Thread Andrey Smirnov
Add API allowing to query and override the name of the alias pointing at DTB node representing current bootsource. Signed-off-by: Andrey Smirnov --- common/bootsource.c | 68 include/bootsource.h | 2 ++ 2 files changed,

[PATCH v3 3/4] common: oftree: Pass bootsource and bootsource instance to kernel

2018-05-17 Thread Andrey Smirnov
Pass barebox-detected bootsource to Linux to make it availible to Linux userspace. That information is passed as full path to the node corresponding to the bootsource and is placed under /chosen/bootsource and it can be read under Linux in /sys/firmware/devicetree/base/chosen/bootsource

[PATCH v3 1/4] of: Make of_property_get_value() public

2018-05-17 Thread Andrey Smirnov
Make of_property_get_value() public, so it can be used in other part of the system. Signed-off-by: Andrey Smirnov --- drivers/of/base.c | 5 - include/of.h | 6 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/of/base.c

[PATCH v3 26/28] ARM: mmu: Simplify the use of dma_flush_range()

2018-05-17 Thread Andrey Smirnov
Simplify the use of dma_flush_range() by changing its signature to accept pointer to start of the data and data size. This change allows us to avoid a whole bunch of repetitive arithmetic currently done by all of the callers. Reviewed-by: Lucas Stach Signed-off-by: Andrey

[PATCH v3 21/28] ARM: mmu: Share code between dma_alloc_*() functions

2018-05-17 Thread Andrey Smirnov
Code of dma_alloc_coherent() and dma_alloc_writecombine() is almost identical with exception of the flags passed to undelying call to __remap_range(). Move commong code into a shared subroutine and convert both functions to use it. Signed-off-by: Andrey Smirnov ---

[PATCH v3 27/28] ARM: mmu: Implement on-demand PTE allocation

2018-05-17 Thread Andrey Smirnov
Allocating PTEs for every 4K page corresponding to SDRAM upfront costs us quite a bit of memory: 1KB per 1MB or RAM. This is far from being a deal-breaker for majority of use-cases, but for builds where amount of free memory is in hundres of KBs* it becomes a real hurdle for being able to use MMU

[PATCH v3 22/28] ARM: mmu: Pass PTE flags a parameter to arm_create_pte()

2018-05-17 Thread Andrey Smirnov
In order to make it possible to use this functions in contexts where creating a new PTE of uncached pages in not appropriate, pass PTE flags a parameter to arm_create_pte() and fix all of the current users as necessary. Signed-off-by: Andrey Smirnov ---

[PATCH v3 23/28] ARM: mmu: Make sure that address is 1M aligned in arm_create_pte()

2018-05-17 Thread Andrey Smirnov
If address passed arm_create_pte() is not 1M (PGDIR_SIZE) aligned, page table that is created will end up having unexpected mapping offset, breaking "1:1 mapping" assumption and leading to bugs that are not immediately obvious in their nature. To prevent this and because all of the callers

[PATCH v3 28/28] ARM: mmu: Introduce ARM_TTB_SIZE

2018-05-17 Thread Andrey Smirnov
Commit 1c33aacf8a247ab45814b43ac0ca903677afffae ("ARM: use memalign to allocate page table"), reasonalby changed TTB allocation size from SZ_32K to SZ_16K (TTB's real size), but it also changed alignment from SZ_16K to SZ_64K for unclear reasons. Reading various TTBR related ARM documentation it

[PATCH v3 18/28] ARM: mmu: Use PAGE_SIZE instead of magic right shift by 12

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 627962fea..4090f7da9 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -215,7 +215,7 @@

[PATCH v3 20/28] ARM: mmu: Use xmemalign in mmu_init()

2018-05-17 Thread Andrey Smirnov
We don't handle OOM case in that code, so using xmemalign seems like a better option. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index

[PATCH v3 19/28] ARM: mmu: Use xmemalign in arm_create_pte()

2018-05-17 Thread Andrey Smirnov
We don't handle the OOM case in that code, so using xmemalign seems like a better option. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index

[PATCH v3 15/28] ARM: mmu: Replace various SZ_1M with PGDIR_SIZE

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 8 arch/arm/cpu/mmu.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 83577300f..de242e0d7 100644 --- a/arch/arm/cpu/mmu.c +++

[PATCH v3 13/28] ARM: mmu: Replace hardcoded shifts with pgd_index() from Linux

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 12 ++-- arch/arm/cpu/mmu.h | 8 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 06c9045b7..1dbfcee16 100644 --- a/arch/arm/cpu/mmu.c

[PATCH v3 17/28] ARM: mmu: Define and use PTRS_PER_PTE

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 62425b828..627962fea 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -34,6 +34,7 @@

[PATCH v3 16/28] ARM: mmu: Use PAGE_SIZE when specifying size of one page

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index de242e0d7..62425b828 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -271,7 +271,7 @@

[PATCH v3 25/28] ARM: mmu: Use dma_inv_range() in dma_sync_single_for_cpu()

2018-05-17 Thread Andrey Smirnov
The code in the if () statement is identical to already existing dma_inv_rand(). Use it instead. Reviewed-by: Lucas Stach Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff

[PATCH v3 24/28] ARM: mmu: Use find_pte() to find PTE in create_vector_table()

2018-05-17 Thread Andrey Smirnov
There's already a function that implement necessary arithemtic to find offset within page table for a given address, so make use of it instead of re-implementing it again. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 9 - 1 file changed, 4

[PATCH v3 14/28] ARM: mmu: Trivial simplification in arm_mmu_remap_sdram()

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 1dbfcee16..83577300f 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -212,7 +212,7 @@

[PATCH v3 09/28] ARM: mmu: Specify size in bytes in create_sections()

2018-05-17 Thread Andrey Smirnov
Seeing create_sections(ttb, 0, PAGE_SIZE, ...); as the code the creates initial flat 4 GiB mapping is a bit less intuitive then create_sections(ttb, 0, SZ_4G - 1, ...); so, for the sake of clarification, convert create_sections() to accept address of the last byte in the region

[PATCH v3 12/28] ARM: mmu: Drop needless shifting in map_io_sections()

2018-05-17 Thread Andrey Smirnov
Instead of shifting phys right by 20 and then again left by the same amount, just convert the code to expect it to be in unit of bytes all the time. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v3 11/28] ARM: mmu: Share PMD_SECT_DEF_CACHED

2018-05-17 Thread Andrey Smirnov
Share PMD_SECT_DEF_CACHED between mmu.c and mmu-early.c. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu-early.c | 3 +-- arch/arm/cpu/mmu.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/mmu-early.c

[PATCH v3 10/28] ARM: mmu: Share code for initial flat mapping creation

2018-05-17 Thread Andrey Smirnov
Code creating inital 4GiB flat mapping is identical between mmu.c and mmu-early.c, so move it to mmu.h and share. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu-early.c | 4 +--- arch/arm/cpu/mmu.c | 6 +- arch/arm/cpu/mmu.h | 8 3 files

[PATCH v3 07/28] ARM: mmu: Separate index and address in create_sections()

2018-05-17 Thread Andrey Smirnov
Both TTB index and address used to fill that entry are derived from the same variable 'addr' which requires shifting right and left by 20 and somewhat confusing. Split the counter used to iterate over elements of TTB into a separate variable to make this code a bit easier to read.

[PATCH v3 08/28] sizes.h: Sync with Linux 4.16

2018-05-17 Thread Andrey Smirnov
Sync with Linux 4.16 to get SZ_4G. Signed-off-by: Andrey Smirnov --- arch/arm/boards/phytec-som-imx6/lowlevel.c | 1 + include/linux/sizes.h | 4 2 files changed, 5 insertions(+) diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c

[PATCH v3 04/28] ARM: mmu: Introduce set_ttbr()

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu-early.c | 3 +-- arch/arm/cpu/mmu.c | 3 +-- arch/arm/cpu/mmu.h | 5 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/mmu-early.c b/arch/arm/cpu/mmu-early.c index

[PATCH v3 05/28] ARM: mmu: Introduce set_domain()

2018-05-17 Thread Andrey Smirnov
Port set_domain() form Linux kernel and share it between regular and early MMU code to avoid duplication. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu-early.c | 7 +-- arch/arm/cpu/mmu.c | 6 +- arch/arm/cpu/mmu.h | 9 + 3 files

[PATCH v3 06/28] ARM: mmu: Share code for create_sections()

2018-05-17 Thread Andrey Smirnov
Regular MMU code never creates anything but 1:1 mapping, and barring that plus the call to __mmu_cache_flush(), early MMU code version of the function is pretty much identical. To avoid code duplication, move it to mmu.h and convert both regular and early MMU code to use it. Signed-off-by: Andrey

[PATCH v3 03/28] ARM: mmu: Use ALIGN and ALIGN_DOWN in map_cachable()

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu-early.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/mmu-early.c b/arch/arm/cpu/mmu-early.c index 70cb5fe31..fc14d5cac 100644 --- a/arch/arm/cpu/mmu-early.c +++

[PATCH v3 02/28] ARM: mmu: Make use of IS_ALIGNED in arm_mmu_remap_sdram()

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 9472013ca..c70e9e782 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -241,7 +241,7 @@

[PATCH v3 01/28] ARM: mmu: Remove unused ARM_VECTORS_SIZE

2018-05-17 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 6ccd5893b..9472013ca 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -270,12 +270,6 @@ static int

[PATCH v3 00/28] ARM MMU code improvements and on-demand PTE allocation

2018-05-17 Thread Andrey Smirnov
Everyone: With exeception of patch 27/28, all patches in this series are just small improvements(IMHO) that I made while working with ARM MMU code. Patch 27/28, OTOH, brings a bit of a change to how MMU code allocates PTEs, postponing that until the users of DMA API actually request that.

Re: [PATCH v2 3/4] common: oftree: Pass bootsource and bootsource instance to kernel

2018-05-17 Thread Andrey Smirnov
On Thu, May 17, 2018 at 2:52 AM, Sascha Hauer wrote: > On Wed, May 16, 2018 at 01:18:26PM -0700, Andrey Smirnov wrote: >> Pass barebox-detected bootsource to Linux to make it availible to >> Linux userspace. That information is passed as full path to the node >>

Re: [PATCH v2 2/4] bootsource: Add bootsource alias name API

2018-05-17 Thread Andrey Smirnov
On Thu, May 17, 2018 at 2:43 AM, Sascha Hauer wrote: > On Wed, May 16, 2018 at 01:18:25PM -0700, Andrey Smirnov wrote: >> Add API allowing to query and override the name of the alias pointing >> at DTB node representing current bootsource. >> >> Signed-off-by: Andrey

Re: [PATCH] USB: host: hub: increase delay after device removal

2018-05-17 Thread Christoph Fritz
Hi Sascha On Mon, 2017-01-09 at 09:38 +0100, Sascha Hauer wrote: > Hi Christoph, > > On Wed, Dec 28, 2016 at 04:29:44PM +0100, Christoph Fritz wrote: > > This patch increases delay time for slow hubs after device removal. > > Could you spent a few words what happens without this patch, i.e. how

[RFC PATCH 14/15] mtd: cfi-flash: fix write_buff() for 64BIT

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- drivers/mtd/nor/cfi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c index 5bdcccae1..01ab1aa27 100644 --- a/drivers/mtd/nor/cfi_flash.c +++

[RFC PATCH 15/15] i2c/muxes/i2c-mux-pca954x: fix private data retrieval for 64bit mode

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- drivers/i2c/muxes/i2c-mux-pca954x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 0d5515b71..395254cdc 100644 ---

[RFC PATCH 12/15] FIXME: commands/mem: fix /dev/mem size

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- commands/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/mem.c b/commands/mem.c index eb91ade05..80cf5c79d 100644 --- a/commands/mem.c +++ b/commands/mem.c @@ -96,7 +96,7 @@ static int mem_probe(struct

[RFC PATCH 13/15] FIXME: fs: fix memory access for 64bit MIPS

2018-05-17 Thread Peter Mamonov
Address 0x is a valid MIPS64 address. Signed-off-by: Peter Mamonov --- fs/fs.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/fs.c b/fs/fs.c index b66cc9b17..d4965c85e 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -962,8 +962,6 @@ loff_t lseek(int

[RFC PATCH 11/15] resource: fix iomem root resource for 64 bit

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- common/resource.c | 4 1 file changed, 4 insertions(+) diff --git a/common/resource.c b/common/resource.c index e4bbe15fd..1cf00a927 100644 --- a/common/resource.c +++ b/common/resource.c @@ -114,7 +114,11 @@ int release_region(struct

[RFC PATCH 10/15] common.h: fix IOMEM() for MIPS64

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- include/common.h | 4 1 file changed, 4 insertions(+) diff --git a/include/common.h b/include/common.h index 60e5005b8..4b3bcae40 100644 --- a/include/common.h +++ b/include/common.h @@ -142,7 +142,11 @@ void

[RFC PATCH 05/15] mips: fix dma_sync_* stuff for MIPS64

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/include/asm/dma-mapping.h | 2 +- arch/mips/include/asm/io.h | 4 ++-- arch/mips/lib/c-r4k.c | 26 +- arch/mips/lib/dma-default.c | 6 -- 4 files changed, 20

[RFC PATCH 08/15] fixup! MIPS: import optimized string functions from Linux

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index deeda62ea..9e8341e9f 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -338,6 +338,7 @@ config NMON_HELP config

[RFC PATCH 06/15] common/Kconfig: add PHYS_ADDR_T_64BIT option

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- common/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index b7000c4d7..a5b53b2e4 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -95,6 +95,9 @@ config FILE_LIST config ARCH_DMA_ADDR_T_64BIT

[RFC PATCH 09/15] MIPS: import 64-bit address conversion macros

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/include/asm/addrspace.h | 20 1 file changed, 20 insertions(+) diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index 04d0f95db..688620472 100644 ---

[RFC PATCH 04/15] mips: fix warnings from CPHYSADDR() macro

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/include/asm/addrspace.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index 17d480d08..04d0f95db 100644 --- a/arch/mips/include/asm/addrspace.h +++

[RFC PATCH 07/15] mips: 64BIT selects PHYS_ADDR_T_64BIT

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c2c555dc3..deeda62ea 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -275,6 +275,7 @@ config 64BIT bool "64-bit

[RFC PATCH 02/15] MIPS: use CKSEG1 instead of KSEG1

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/boot/dtb.c | 4 ++-- arch/mips/lib/c-r4k.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/boot/dtb.c b/arch/mips/boot/dtb.c index e7633a5af..3f7f46641 100644 --- a/arch/mips/boot/dtb.c +++

[RFC PATCH 03/15] FIXME: mips: fix copy_to_link_location for 64 bit mode

2018-05-17 Thread Peter Mamonov
A better solution: use 4 instead of LONGSIZE Signed-off-by: Peter Mamonov --- arch/mips/include/asm/pbl_macros.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/asm/pbl_macros.h

[RFC PATCH 01/15] FIXME: add t4..t7 definitions for MIPS64

2018-05-17 Thread Peter Mamonov
Signed-off-by: Peter Mamonov --- arch/mips/include/asm/regdef.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h index 7c8ecb6b9..5a31ea022 100644 --- a/arch/mips/include/asm/regdef.h +++

[RFC PATCH 00/15] MIPS64 support

2018-05-17 Thread Peter Mamonov
Hi, Recently I've resolved a couple of issues that prevented 64bit Barebox from running on MIPS64 CPUs. By the way, 32bit Barebox runs on MIPS64 without any issues, since MIPS64 supports 32 bit addressing mode. Here is a relevant patch series. This is mostly for discussion, yet some patches

Re: [PATCH v1 05/10] MIPS: add kexec ELF loading support

2018-05-17 Thread Oleksij Rempel
Am 17.05.2018 um 11:56 schrieb Sascha Hauer: > On Wed, May 16, 2018 at 06:42:28PM +0200, Oleksij Rempel wrote: >> From: Antony Pavlov >> >> Signed-off-by: Antony Pavlov >> Signed-off-by: Peter Mamonov >> --- >>

Re: [PATCH v1 05/10] MIPS: add kexec ELF loading support

2018-05-17 Thread Sascha Hauer
On Wed, May 16, 2018 at 06:42:28PM +0200, Oleksij Rempel wrote: > From: Antony Pavlov > > Signed-off-by: Antony Pavlov > Signed-off-by: Peter Mamonov > --- > arch/mips/include/asm/elf.h| 8 +- >

Re: [PATCH v1 04/10] bootm: add kexec ELF support

2018-05-17 Thread Peter Mamonov
On Thu, May 17, 2018 at 09:01:06AM +0200, Sascha Hauer wrote: > On Thu, May 17, 2018 at 06:52:10AM +0200, Oleksij Rempel wrote: > > Am 16.05.2018 um 23:34 schrieb Peter Mamonov: > > > Hi! > > > > > > On Wed, May 16, 2018 at 06:42:27PM +0200, Oleksij Rempel wrote: > > >> From: Antony Pavlov

Re: [PATCH v2 3/4] common: oftree: Pass bootsource and bootsource instance to kernel

2018-05-17 Thread Sascha Hauer
On Wed, May 16, 2018 at 01:18:26PM -0700, Andrey Smirnov wrote: > Pass barebox-detected bootsource to Linux to make it availible to > Linux userspace. That information is passed as full path to the node > corresponding to the bootsource and is placed under /chosen/bootsource > and it can be read

Re: [PATCH v2 2/4] bootsource: Add bootsource alias name API

2018-05-17 Thread Sascha Hauer
On Wed, May 16, 2018 at 01:18:25PM -0700, Andrey Smirnov wrote: > Add API allowing to query and override the name of the alias pointing > at DTB node representing current bootsource. > > Signed-off-by: Andrey Smirnov > --- > common/bootsource.c | 74

Re: [PATCH v2 09/28] ARM: mmu: Specify size in bytes in create_sections()

2018-05-17 Thread Sascha Hauer
On Thu, May 17, 2018 at 12:35:10AM -0700, Andrey Smirnov wrote: > On Thu, May 17, 2018 at 12:08 AM, Sascha Hauer wrote: > > On Thu, May 17, 2018 at 12:01:34AM -0700, Andrey Smirnov wrote: > >> On Wed, May 16, 2018 at 11:55 PM, Sascha Hauer > >>

Re: [PATCH v2 09/28] ARM: mmu: Specify size in bytes in create_sections()

2018-05-17 Thread Andrey Smirnov
On Thu, May 17, 2018 at 12:08 AM, Sascha Hauer wrote: > On Thu, May 17, 2018 at 12:01:34AM -0700, Andrey Smirnov wrote: >> On Wed, May 16, 2018 at 11:55 PM, Sascha Hauer >> wrote: >> > On Wed, May 16, 2018 at 01:00:17PM -0700, Andrey Smirnov

Re: [PATCH v2 09/28] ARM: mmu: Specify size in bytes in create_sections()

2018-05-17 Thread Sascha Hauer
On Thu, May 17, 2018 at 12:01:34AM -0700, Andrey Smirnov wrote: > On Wed, May 16, 2018 at 11:55 PM, Sascha Hauer wrote: > > On Wed, May 16, 2018 at 01:00:17PM -0700, Andrey Smirnov wrote: > >> Seeing > >> > >> create_sections(ttb, 0, PAGE_SIZE, ...); > >> > >> as

Re: [PATCH] usb: gadget: fastboot: fix barebox update without using buffer

2018-05-17 Thread Sascha Hauer
On Wed, May 16, 2018 at 06:43:28PM +0200, Michael Grzeschik wrote: > Commit e5098495 "usb: gadget: fastboot: Add option to download to a buffer" > breaks the use of temporary files for fastboot barebox_update. > > In the patch the ".imagefile = FASTBOOT_TMPFILE" allocation gets > removed, but

Re: [PATCH v2 09/28] ARM: mmu: Specify size in bytes in create_sections()

2018-05-17 Thread Andrey Smirnov
On Wed, May 16, 2018 at 11:55 PM, Sascha Hauer wrote: > On Wed, May 16, 2018 at 01:00:17PM -0700, Andrey Smirnov wrote: >> Seeing >> >> create_sections(ttb, 0, PAGE_SIZE, ...); >> >> as the code the creates initial flat 4 GiB mapping is a bit less >> intuitive then

Re: [PATCH v1 04/10] bootm: add kexec ELF support

2018-05-17 Thread Sascha Hauer
On Thu, May 17, 2018 at 06:52:10AM +0200, Oleksij Rempel wrote: > Am 16.05.2018 um 23:34 schrieb Peter Mamonov: > > Hi! > > > > On Wed, May 16, 2018 at 06:42:27PM +0200, Oleksij Rempel wrote: > >> From: Antony Pavlov > >> > >> +int kexec_load_bootm_data(struct image_data

Re: [PATCH v2 09/28] ARM: mmu: Specify size in bytes in create_sections()

2018-05-17 Thread Sascha Hauer
On Wed, May 16, 2018 at 01:00:17PM -0700, Andrey Smirnov wrote: > Seeing > > create_sections(ttb, 0, PAGE_SIZE, ...); > > as the code the creates initial flat 4 GiB mapping is a bit less > intuitive then > > create_sections(ttb, 0, SZ_4G, ...); > > so, for the sake of