[PATCH] imd: Make all pointers into image const

2018-01-29 Thread Sascha Hauer
The IMD code should be readonly and never modify any pointers. Make all pointers const so that const pointers can be passed in to IMD. Signed-off-by: Sascha Hauer --- common/bbu.c | 4 ++-- common/imd.c | 27 ++-

Re: [PATCH] ratp: remove unused context fields

2018-01-29 Thread Sascha Hauer
On Mon, Jan 29, 2018 at 05:28:15PM +0100, Aleksander Morgado wrote: > Signed-off-by: Aleksander Morgado > --- > common/ratp.c | 6 -- > 1 file changed, 6 deletions(-) Applied, thanks Sascha > > diff --git a/common/ratp.c b/common/ratp.c > index

Re: [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1

2018-01-29 Thread Sascha Hauer
On Tue, Jan 30, 2018 at 08:05:09AM +0100, Sascha Hauer wrote: > On Mon, Jan 29, 2018 at 02:04:09PM +0100, Daniel Schultz wrote: > > do_ubiupdatevol can either return 0 or the ioctl return value. This is > > not in conformity with the other ubi comannds return values. > > > > Signed-off-by: Daniel

Re: [PATCH 3/3] drivers: mtd: nand: omap: Return stat value

2018-01-29 Thread Sascha Hauer
On Mon, Jan 29, 2018 at 02:04:11PM +0100, Daniel Schultz wrote: > The read page function should return the total count of flipped bits, > otherwise the caller always thinks no bitflip occured. > > Signed-off-by: Daniel Schultz > --- > drivers/mtd/nand/nand_omap_gpmc.c | 2

Re: [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1

2018-01-29 Thread Sascha Hauer
On Mon, Jan 29, 2018 at 02:04:09PM +0100, Daniel Schultz wrote: > do_ubiupdatevol can either return 0 or the ioctl return value. This is > not in conformity with the other ubi comannds return values. > > Signed-off-by: Daniel Schultz > --- > commands/ubi.c | 2 +- > 1 file

Re: [PATCH] ratp: remove unused list pointer from ratp_bb_pkt

2018-01-29 Thread Sascha Hauer
On Sun, Jan 28, 2018 at 10:30:48PM +0100, Aleksander Morgado wrote: > This struct type is used in the RATP FS implementation, but was never > used as a list element anywhere. > > Signed-off-by: Aleksander Morgado > --- > include/ratp_bb.h | 2 -- > 1 file changed, 2

Re: [PATCH] ratp: move barebox-specific command to ratp_bb.h

2018-01-29 Thread Sascha Hauer
On Sun, Jan 28, 2018 at 10:30:23PM +0100, Aleksander Morgado wrote: > The ratp_run_command() is really an implementation detail of the > barebox ratp 'command' operation support. Move it to the barebox > specific header and rename it with the correct prefix. > > Signed-off-by: Aleksander Morgado

Re: [PATCH] ratp: rename global context variable

2018-01-29 Thread Sascha Hauer
On Sun, Jan 28, 2018 at 10:29:59PM +0100, Aleksander Morgado wrote: > The 'ratp_command_ctx' seems to specify that this variable is only > used to process command operations, but it really is used in every > async operation (e.g. also in FS), so just rename it to a more generic > name for clarity.

Re: [PATCH] bbremote: rename command subparser variables

2018-01-29 Thread Sascha Hauer
On Sun, Jan 28, 2018 at 11:33:26AM +0100, Aleksander Morgado wrote: > Don't reuse unrelated subparser variables for new command subparsers, > make each subparser have its own variable. > > Just for consistency really, not a bugfix. > > Signed-off-by: Aleksander Morgado

Re: [PATCH v3 1/5] net/e1000: remove one level of indentation

2018-01-29 Thread Sascha Hauer
On Fri, Jan 26, 2018 at 02:32:28PM +0100, Lucas Stach wrote: > By returning early if the MAC type isn't e1000_igb. > > Signed-off-by: Lucas Stach > --- > drivers/net/e1000/eeprom.c | 121 > +++-- > 1 file changed, 61

Re: [PATCH] fs: Fix memory leak in mount()

2018-01-29 Thread Sam Ravnborg
Hi Sasha. ... > > No check for PTR_ERR after calling canonalize_path() > > > > unlink() > > No check for PTR_ERR after call to canonalize_dir() > > > > readlink() > > No check for PTR_ERR after call to canonalize_dir() > > Yes, the result should be checked. > > > > > I can create patch for

[PATCH 07/10] ARM: install HYP vectors at PBL and Barebox entry

2018-01-29 Thread Lucas Stach
If the CPU was already in HYP mode when entering the PBL, install a simple trap handler to allow to get back from SVC to HYP before switching to HYP mode. As the vectors are part of the currently running binary, we need to do the same setup when starting the real Barebox binary, as the PBL setup

[PATCH 05/10] ARM: don't try to install secure monitor when entered in HYP mode

2018-01-29 Thread Lucas Stach
When Barebox has been entered in HYP mode, the CPU is already switched to the non-secure world and it's not possible for Barebox to install it's own secure monitor. Signed-off-by: Lucas Stach --- arch/arm/cpu/sm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 08/10] ARM: rpi: add revision IDs for Pi 3 Model B and Pi Zero

2018-01-29 Thread Lucas Stach
From: Enrico Joerns Signed-off-by: Enrico Joerns --- arch/arm/boards/raspberry-pi/rpi-common.c | 2 ++ arch/arm/mach-bcm283x/include/mach/mbox.h | 4 2 files changed, 6 insertions(+) diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c

[PATCH 01/10] ARM: import opcode helpers from Linux kernel

2018-01-29 Thread Lucas Stach
Those are needed to generate some of the ARM SEC and VIRT opcodes in a portable way. Signed-off-by: Lucas Stach --- arch/arm/include/asm/opcodes-virt.h | 39 ++ arch/arm/include/asm/opcodes.h | 231 2 files changed, 270

[PATCH 06/10] ARM: default to starting kernel in HYP mode when entered in HYP

2018-01-29 Thread Lucas Stach
When Barebox has been entered in HYP mode, there is a high chance that the kernel is intended to be started in HYP mode also. Get this default into place. Signed-off-by: Lucas Stach --- arch/arm/cpu/sm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 02/10] ARM: safely switch from HYP to SVC mode if required

2018-01-29 Thread Lucas Stach
This is a port of the Linux safe_svcmode_maskall macro to the Barebox lowlevel init. Signed-off-by: Lucas Stach --- arch/arm/cpu/lowlevel.S | 20 arch/arm/include/asm/system.h | 26 ++ 2 files changed, 42 insertions(+),

[PATCH 04/10] ARM: add file for HYP mode related setup

2018-01-29 Thread Lucas Stach
This adds routines to add hyp mode vectors and switch back to HYP mode from SVC. This is needed in both the PBL and Barebox proper. Signed-off-by: Lucas Stach --- arch/arm/cpu/Makefile | 4 ++ arch/arm/cpu/hyp.S| 115

[PATCH 03/10] ARM: allow secure monitor code to be built without PSCI

2018-01-29 Thread Lucas Stach
The hyp mode handling added in the secure monitor code is also useful when Barebox doesn't have PSCI control. Allow to build without PSCI. Signed-off-by: Lucas Stach --- arch/arm/cpu/sm_as.S | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/cpu/sm_as.S

[PATCH 09/10] ARM: rpi: add raspberry pi 3 support

2018-01-29 Thread Lucas Stach
This adds basic support at the same feature level as the other supported raspberry pi boards. Signed-off-by: Lucas Stach --- arch/arm/boards/raspberry-pi/lowlevel.c | 14 -- arch/arm/configs/rpi_defconfig | 2 ++ arch/arm/dts/Makefile

[PATCH 10/10] ARM: rpi: autosize malloc area

2018-01-29 Thread Lucas Stach
Autosize the malloc area according to the available RAM size. Signed-off-by: Lucas Stach --- arch/arm/configs/rpi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig index

[PATCH] ratp: remove unused context fields

2018-01-29 Thread Aleksander Morgado
Signed-off-by: Aleksander Morgado --- common/ratp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/common/ratp.c b/common/ratp.c index 6db4df870..80863f81f 100644 --- a/common/ratp.c +++ b/common/ratp.c @@ -54,14 +54,8 @@ struct ratp_bb_command_return {

[PATCH 3/3] drivers: mtd: nand: omap: Return stat value

2018-01-29 Thread Daniel Schultz
The read page function should return the total count of flipped bits, otherwise the caller always thinks no bitflip occured. Signed-off-by: Daniel Schultz --- drivers/mtd/nand/nand_omap_gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/3] ARM: configs: am335x_defconfig: Reorder configs

2018-01-29 Thread Daniel Schultz
These configs were added directly in the config file and not with menuconfig. Reorder these like menuconfig would place them. Signed-off-by: Daniel Schultz --- arch/arm/configs/am335x_defconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1

2018-01-29 Thread Daniel Schultz
do_ubiupdatevol can either return 0 or the ioctl return value. This is not in conformity with the other ubi comannds return values. Signed-off-by: Daniel Schultz --- commands/ubi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/ubi.c