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 +-
>
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.
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
>
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
> ---
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
>
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
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
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,
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
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
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
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
---
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
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
---
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
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
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 @@
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
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
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
+++
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
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 @@
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 @@
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
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
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 @@
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
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
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
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
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.
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
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
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
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
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
+++
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 @@
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
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.
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
>>
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
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
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
+++
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
---
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
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
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
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
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
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
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
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
---
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
+++
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
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
+++
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
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
+++
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
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
>> ---
>>
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 +-
>
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
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
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
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
> >>
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
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
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
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
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
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
70 matches
Mail list logo