All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/next] package/{mesa3d, mesa3d-headers}: bump version to 20.1.0
From: Thomas Petazzoni @ 2020-05-29 20:46 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=9ca15896b742d711d61c92c6406541222468bc4e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Rebased 0006-pan_bo.h-add-time.h-include-for-time_t.patch.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/mesa3d-headers/mesa3d-headers.mk                 |  2 +-
 .../0006-pan_bo.h-add-time.h-include-for-time_t.patch    | 16 +++++++++-------
 package/mesa3d/mesa3d.hash                               |  6 +++---
 package/mesa3d/mesa3d.mk                                 |  2 +-
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
index 51b10acdb5..008c2c3cf4 100644
--- a/package/mesa3d-headers/mesa3d-headers.mk
+++ b/package/mesa3d-headers/mesa3d-headers.mk
@@ -12,7 +12,7 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 20.0.7
+MESA3D_HEADERS_VERSION = 20.1.0
 MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
 MESA3D_HEADERS_SITE = https://mesa.freedesktop.org/archive
 MESA3D_HEADERS_DL_SUBDIR = mesa3d
diff --git a/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch b/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
index 1586b26bba..f90fb85aca 100644
--- a/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
+++ b/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
@@ -8,24 +8,26 @@ Content-Transfer-Encoding: 8bit
 
 Fixes:
 
-  ../src/gallium/drivers/panfrost/pan_bo.h:93:9: error: unknown type name ???time_t???
+  ../src/panfrost/encoder/pan_bo.h:93:9: error: unknown type name ???time_t???
 
 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+[Bernd: rebased on 20.1]
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 ---
- src/gallium/drivers/panfrost/pan_bo.h | 1 +
+ src/panfrost/encoder/pan_bo.h | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
+diff --git a/src/panfrost/encoder/pan_bo.h b/src/panfrost/encoder/pan_bo.h
 index 414c356b95c..6dda393095d 100644
---- a/src/gallium/drivers/panfrost/pan_bo.h
-+++ b/src/gallium/drivers/panfrost/pan_bo.h
+--- a/src/panfrost/encoder/pan_bo.h
++++ b/src/panfrost/encoder/pan_bo.h
 @@ -29,6 +29,7 @@
  #include <panfrost-misc.h>
- #include "pipe/p_state.h"
  #include "util/list.h"
+ #include "pan_device.h"
 +#include <time.h>
  
- struct panfrost_screen;
+ /* Flags for allocated memory */
  
 -- 
 2.25.1
diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash
index 0a6d0c5a82..c8eda7b2ba 100644
--- a/package/mesa3d/mesa3d.hash
+++ b/package/mesa3d/mesa3d.hash
@@ -1,6 +1,6 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2020-May/000583.html
-sha256  fe6e258fe772c3cd2ac01741bf7408058c3ac02d66acff9a6e669bd72e3ea178  mesa-20.0.7.tar.xz
-sha512  00baae50f14bf2b08b5654dffb11cf67499dc1825e1700b137fb5719e767e0e78e789979df2c194f677ea9c5e531f34965d47b9e37c239944c38d0570c7a9685  mesa-20.0.7.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2020-May/000585.html
+sha256  2109055d7660514fc4c1bcd861bcba9db00c026119ae222720111732dba27c83  mesa-20.1.0.tar.xz
+sha512  f49230d18febe1bfd7c6282ab95fc244530f5cef56df0f804d8bece8a70bafcb445b8b83df96ad1b4c5af022c4e39a71f19a8f7e47b1fb09ada2b1a1317ff3be  mesa-20.1.0.tar.xz
 
 # License
 sha256  1ddae7da415352a5b5360ff3a9d7ecf23ba81408f62eeecce0011f32e3ef9da6  docs/license.html
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 5304b05de0..abab93bd20 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 # When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 20.0.7
+MESA3D_VERSION = 20.1.0
 MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
 MESA3D_SITE = https://mesa.freedesktop.org/archive
 MESA3D_LICENSE = MIT, SGI, Khronos

^ permalink raw reply related

* [Buildroot] [git commit] package/{mesa3d, mesa3d-headers}: bump version to 20.1.0
From: Thomas Petazzoni @ 2020-05-29 20:46 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=9ca15896b742d711d61c92c6406541222468bc4e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Rebased 0006-pan_bo.h-add-time.h-include-for-time_t.patch.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/mesa3d-headers/mesa3d-headers.mk                 |  2 +-
 .../0006-pan_bo.h-add-time.h-include-for-time_t.patch    | 16 +++++++++-------
 package/mesa3d/mesa3d.hash                               |  6 +++---
 package/mesa3d/mesa3d.mk                                 |  2 +-
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
index 51b10acdb5..008c2c3cf4 100644
--- a/package/mesa3d-headers/mesa3d-headers.mk
+++ b/package/mesa3d-headers/mesa3d-headers.mk
@@ -12,7 +12,7 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 20.0.7
+MESA3D_HEADERS_VERSION = 20.1.0
 MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
 MESA3D_HEADERS_SITE = https://mesa.freedesktop.org/archive
 MESA3D_HEADERS_DL_SUBDIR = mesa3d
diff --git a/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch b/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
index 1586b26bba..f90fb85aca 100644
--- a/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
+++ b/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
@@ -8,24 +8,26 @@ Content-Transfer-Encoding: 8bit
 
 Fixes:
 
-  ../src/gallium/drivers/panfrost/pan_bo.h:93:9: error: unknown type name ???time_t???
+  ../src/panfrost/encoder/pan_bo.h:93:9: error: unknown type name ???time_t???
 
 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+[Bernd: rebased on 20.1]
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 ---
- src/gallium/drivers/panfrost/pan_bo.h | 1 +
+ src/panfrost/encoder/pan_bo.h | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
+diff --git a/src/panfrost/encoder/pan_bo.h b/src/panfrost/encoder/pan_bo.h
 index 414c356b95c..6dda393095d 100644
---- a/src/gallium/drivers/panfrost/pan_bo.h
-+++ b/src/gallium/drivers/panfrost/pan_bo.h
+--- a/src/panfrost/encoder/pan_bo.h
++++ b/src/panfrost/encoder/pan_bo.h
 @@ -29,6 +29,7 @@
  #include <panfrost-misc.h>
- #include "pipe/p_state.h"
  #include "util/list.h"
+ #include "pan_device.h"
 +#include <time.h>
  
- struct panfrost_screen;
+ /* Flags for allocated memory */
  
 -- 
 2.25.1
diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash
index 0a6d0c5a82..c8eda7b2ba 100644
--- a/package/mesa3d/mesa3d.hash
+++ b/package/mesa3d/mesa3d.hash
@@ -1,6 +1,6 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2020-May/000583.html
-sha256  fe6e258fe772c3cd2ac01741bf7408058c3ac02d66acff9a6e669bd72e3ea178  mesa-20.0.7.tar.xz
-sha512  00baae50f14bf2b08b5654dffb11cf67499dc1825e1700b137fb5719e767e0e78e789979df2c194f677ea9c5e531f34965d47b9e37c239944c38d0570c7a9685  mesa-20.0.7.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2020-May/000585.html
+sha256  2109055d7660514fc4c1bcd861bcba9db00c026119ae222720111732dba27c83  mesa-20.1.0.tar.xz
+sha512  f49230d18febe1bfd7c6282ab95fc244530f5cef56df0f804d8bece8a70bafcb445b8b83df96ad1b4c5af022c4e39a71f19a8f7e47b1fb09ada2b1a1317ff3be  mesa-20.1.0.tar.xz
 
 # License
 sha256  1ddae7da415352a5b5360ff3a9d7ecf23ba81408f62eeecce0011f32e3ef9da6  docs/license.html
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 5304b05de0..abab93bd20 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 # When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 20.0.7
+MESA3D_VERSION = 20.1.0
 MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
 MESA3D_SITE = https://mesa.freedesktop.org/archive
 MESA3D_LICENSE = MIT, SGI, Khronos

^ permalink raw reply related

* [net V2 5/7] net/mlx5e: Properly set default values when disabling adaptive moderation
From: Saeed Mahameed @ 2020-05-29 20:46 UTC (permalink / raw)
  To: David S. Miller, kuba; +Cc: netdev, Tal Gilboa, Tariq Toukan, Saeed Mahameed
In-Reply-To: <20200529204610.253456-1-saeedm@mellanox.com>

From: Tal Gilboa <talgi@mellanox.com>

Add a call to mlx5e_reset_rx/tx_moderation() when enabling/disabling
adaptive moderation, in order to select the proper default values.

In order to do so, we separate the logic of selecting the moderation values
and setting moderion mode (CQE/EQE based).

Fixes: 0088cbbc4b66 ("net/mlx5e: Enable CQE based moderation on TX CQ")
Fixes: 9908aa292971 ("net/mlx5e: CQE based moderation")
Signed-off-by: Tal Gilboa <talgi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h  | 10 +++++----
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  | 21 +++++++++++++++----
 .../net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++------
 3 files changed, 37 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 59745402747be..0a5aada0f50f9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -1068,10 +1068,12 @@ void mlx5e_deactivate_priv_channels(struct mlx5e_priv *priv);
 
 void mlx5e_build_default_indir_rqt(u32 *indirection_rqt, int len,
 				   int num_channels);
-void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params,
-				 u8 cq_period_mode);
-void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params,
-				 u8 cq_period_mode);
+
+void mlx5e_reset_tx_moderation(struct mlx5e_params *params, u8 cq_period_mode);
+void mlx5e_reset_rx_moderation(struct mlx5e_params *params, u8 cq_period_mode);
+void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode);
+void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode);
+
 void mlx5e_set_rq_type(struct mlx5_core_dev *mdev, struct mlx5e_params *params);
 void mlx5e_init_rq_type_params(struct mlx5_core_dev *mdev,
 			       struct mlx5e_params *params);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 6f582eb83e54f..bc290ae80a531 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -527,8 +527,8 @@ int mlx5e_ethtool_set_coalesce(struct mlx5e_priv *priv,
 	struct dim_cq_moder *rx_moder, *tx_moder;
 	struct mlx5_core_dev *mdev = priv->mdev;
 	struct mlx5e_channels new_channels = {};
+	bool reset_rx, reset_tx;
 	int err = 0;
-	bool reset;
 
 	if (!MLX5_CAP_GEN(mdev, cq_moderation))
 		return -EOPNOTSUPP;
@@ -566,15 +566,28 @@ int mlx5e_ethtool_set_coalesce(struct mlx5e_priv *priv,
 	}
 	/* we are opened */
 
-	reset = (!!coal->use_adaptive_rx_coalesce != priv->channels.params.rx_dim_enabled) ||
-		(!!coal->use_adaptive_tx_coalesce != priv->channels.params.tx_dim_enabled);
+	reset_rx = !!coal->use_adaptive_rx_coalesce != priv->channels.params.rx_dim_enabled;
+	reset_tx = !!coal->use_adaptive_tx_coalesce != priv->channels.params.tx_dim_enabled;
 
-	if (!reset) {
+	if (!reset_rx && !reset_tx) {
 		mlx5e_set_priv_channels_coalesce(priv, coal);
 		priv->channels.params = new_channels.params;
 		goto out;
 	}
 
+	if (reset_rx) {
+		u8 mode = MLX5E_GET_PFLAG(&new_channels.params,
+					  MLX5E_PFLAG_RX_CQE_BASED_MODER);
+
+		mlx5e_reset_rx_moderation(&new_channels.params, mode);
+	}
+	if (reset_tx) {
+		u8 mode = MLX5E_GET_PFLAG(&new_channels.params,
+					  MLX5E_PFLAG_TX_CQE_BASED_MODER);
+
+		mlx5e_reset_tx_moderation(&new_channels.params, mode);
+	}
+
 	err = mlx5e_safe_switch_channels(priv, &new_channels, NULL, NULL);
 
 out:
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index c6b83042d4318..bd8d0e0960857 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4716,7 +4716,7 @@ static u8 mlx5_to_net_dim_cq_period_mode(u8 cq_period_mode)
 		DIM_CQ_PERIOD_MODE_START_FROM_EQE;
 }
 
-void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
+void mlx5e_reset_tx_moderation(struct mlx5e_params *params, u8 cq_period_mode)
 {
 	if (params->tx_dim_enabled) {
 		u8 dim_period_mode = mlx5_to_net_dim_cq_period_mode(cq_period_mode);
@@ -4725,13 +4725,9 @@ void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
 	} else {
 		params->tx_cq_moderation = mlx5e_get_def_tx_moderation(cq_period_mode);
 	}
-
-	MLX5E_SET_PFLAG(params, MLX5E_PFLAG_TX_CQE_BASED_MODER,
-			params->tx_cq_moderation.cq_period_mode ==
-				MLX5_CQ_PERIOD_MODE_START_FROM_CQE);
 }
 
-void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
+void mlx5e_reset_rx_moderation(struct mlx5e_params *params, u8 cq_period_mode)
 {
 	if (params->rx_dim_enabled) {
 		u8 dim_period_mode = mlx5_to_net_dim_cq_period_mode(cq_period_mode);
@@ -4740,7 +4736,19 @@ void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
 	} else {
 		params->rx_cq_moderation = mlx5e_get_def_rx_moderation(cq_period_mode);
 	}
+}
+
+void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
+{
+	mlx5e_reset_tx_moderation(params, cq_period_mode);
+	MLX5E_SET_PFLAG(params, MLX5E_PFLAG_TX_CQE_BASED_MODER,
+			params->tx_cq_moderation.cq_period_mode ==
+				MLX5_CQ_PERIOD_MODE_START_FROM_CQE);
+}
 
+void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
+{
+	mlx5e_reset_rx_moderation(params, cq_period_mode);
 	MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_CQE_BASED_MODER,
 			params->rx_cq_moderation.cq_period_mode ==
 				MLX5_CQ_PERIOD_MODE_START_FROM_CQE);
-- 
2.26.2


^ permalink raw reply related

* [net V2 6/7] net/mlx5e: Fix MLX5_TC_CT dependencies
From: Saeed Mahameed @ 2020-05-29 20:46 UTC (permalink / raw)
  To: David S. Miller, kuba; +Cc: netdev, Vlad Buslov, Roi Dayan, Saeed Mahameed
In-Reply-To: <20200529204610.253456-1-saeedm@mellanox.com>

From: Vlad Buslov <vladbu@mellanox.com>

Change MLX5_TC_CT config dependencies to include MLX5_ESWITCH instead of
MLX5_CORE_EN && NET_SWITCHDEV, which are already required by MLX5_ESWITCH.
Without this change mlx5 fails to compile if user disables MLX5_ESWITCH
without also manually disabling MLX5_TC_CT.

Fixes: 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index 7d69a3061f178..fd375cbe586e1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -80,7 +80,7 @@ config MLX5_ESWITCH
 
 config MLX5_TC_CT
 	bool "MLX5 TC connection tracking offload support"
-	depends on MLX5_CORE_EN && NET_SWITCHDEV && NF_FLOW_TABLE && NET_ACT_CT && NET_TC_SKB_EXT
+	depends on MLX5_ESWITCH && NF_FLOW_TABLE && NET_ACT_CT && NET_TC_SKB_EXT
 	default y
 	help
 	  Say Y here if you want to support offloading connection tracking rules
-- 
2.26.2


^ permalink raw reply related

* Re: [PATCH] or1k: Fix compilation hiccup
From: Christophe de Dinechin @ 2020-05-29 16:21 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-trivial, Stafford Horne, Jia Liu, qemu-devel
In-Reply-To: <20200526185132.1652355-1-eblake@redhat.com>


On 2020-05-26 at 20:51 CEST, Eric Blake wrote...
> On my Fedora 32 machine, gcc 10.1.1 at -O2 (the default for a bare
> './configure') has a false-positive complaint:
>
>   CC      or1k-softmmu/hw/openrisc/openrisc_sim.o
> /home/eblake/qemu/hw/openrisc/openrisc_sim.c: In function ‘openrisc_sim_init’:
> /home/eblake/qemu/hw/openrisc/openrisc_sim.c:87:42: error: ‘cpu_irqs[0]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    87 |         sysbus_connect_irq(s, i, cpu_irqs[i][irq_pin]);
>       |                                  ~~~~~~~~^~~
>
> Initializing both pointers of cpu_irqs[] to NULL is sufficient to shut
> up the compiler, even though they are definitely assigned in
> openrisc_sim_init() prior to the inlined call to
> openrisc_sim_ompic_init() containing the line in question.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>  hw/openrisc/openrisc_sim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
> index d08ce6181199..95011a8015b4 100644
> --- a/hw/openrisc/openrisc_sim.c
> +++ b/hw/openrisc/openrisc_sim.c
> @@ -129,7 +129,7 @@ static void openrisc_sim_init(MachineState *machine)
>      const char *kernel_filename = machine->kernel_filename;
>      OpenRISCCPU *cpu = NULL;
>      MemoryRegion *ram;
> -    qemu_irq *cpu_irqs[2];
> +    qemu_irq *cpu_irqs[2] = {};

Why is the value [2] correct here? The loop that initializes loops over
machine->smp.cpus. Is it always less than 2 on this machine?


>      qemu_irq serial_irq;
>      int n;
>      unsigned int smp_cpus = machine->smp.cpus;


--
Cheers,
Christophe de Dinechin (IRC c3d)



^ permalink raw reply

* [net V2 7/7] net/mlx5e: replace EINVAL in mlx5e_flower_parse_meta()
From: Saeed Mahameed @ 2020-05-29 20:46 UTC (permalink / raw)
  To: David S. Miller, kuba; +Cc: netdev, Pablo Neira Ayuso, Saeed Mahameed
In-Reply-To: <20200529204610.253456-1-saeedm@mellanox.com>

From: Pablo Neira Ayuso <pablo@netfilter.org>

The drivers reports EINVAL to userspace through netlink on invalid meta
match. This is confusing since EINVAL is usually reserved for malformed
netlink messages. Replace it by more meaningful codes.

Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse_meta support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 6e7b2ce29d411..10f705761666b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2068,7 +2068,7 @@ static int mlx5e_flower_parse_meta(struct net_device *filter_dev,
 	flow_rule_match_meta(rule, &match);
 	if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
 		NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask");
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	}
 
 	ingress_dev = __dev_get_by_index(dev_net(filter_dev),
@@ -2076,13 +2076,13 @@ static int mlx5e_flower_parse_meta(struct net_device *filter_dev,
 	if (!ingress_dev) {
 		NL_SET_ERR_MSG_MOD(extack,
 				   "Can't find the ingress port to match on");
-		return -EINVAL;
+		return -ENOENT;
 	}
 
 	if (ingress_dev != filter_dev) {
 		NL_SET_ERR_MSG_MOD(extack,
 				   "Can't match on the ingress filter port");
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	}
 
 	return 0;
-- 
2.26.2


^ permalink raw reply related

* pull-request: bpf 2020-05-29
From: Alexei Starovoitov @ 2020-05-29 20:47 UTC (permalink / raw)
  To: davem; +Cc: daniel, netdev, bpf, kernel-team

Hi David,

The following pull-request contains BPF updates for your *net* tree.

We've added 6 non-merge commits during the last 7 day(s) which contain
a total of 4 files changed, 55 insertions(+), 34 deletions(-).

The main changes are:

1) minor verifier fix for fmod_ret progs, from Alexei.

2) af_xdp overflow check, from Bjorn.

3) minor verifier fix for 32bit assignment, from John.

4) powerpc has non-overlapping addr space, from Petr.

Please consider pulling these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

Thanks a lot!

Also thanks to reporters, reviewers and testers of commits in this pull-request:

Jonathan Lemon, KP Singh, Michael Ellerman, "Minh Bùi Quang", Yonghong 
Song

----------------------------------------------------------------

The following changes since commit d04322a0da1e86aedaa322ce933cfb8c0191d1eb:

  Merge tag 'rxrpc-fixes-20200523-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs (2020-05-22 16:43:58 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git 

for you to fetch changes up to cf66c29bd7534813d2e1971fab71e25fe87c7e0a:

  bpf, selftests: Add a verifier test for assigning 32bit reg states to 64bit ones (2020-05-29 13:34:06 -0700)

----------------------------------------------------------------
Alexei Starovoitov (1):
      bpf: Fix use-after-free in fmod_ret check

Björn Töpel (1):
      xsk: Add overflow check for u64 division, stored into u32

John Fastabend (3):
      bpf: Fix a verifier issue when assigning 32bit reg states to 64bit ones
      bpf, selftests: Verifier bounds tests need to be updated
      bpf, selftests: Add a verifier test for assigning 32bit reg states to 64bit ones

Petr Mladek (1):
      powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again

 arch/powerpc/Kconfig                          |  1 +
 kernel/bpf/verifier.c                         | 34 ++++++++++----------
 net/xdp/xdp_umem.c                            |  8 +++--
 tools/testing/selftests/bpf/verifier/bounds.c | 46 +++++++++++++++++++--------
 4 files changed, 55 insertions(+), 34 deletions(-)

^ permalink raw reply

* [PATCH v8 05/12] tests/vm: Add ability to select QEMU from current build.
From: Robert Foley @ 2020-05-29 20:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Fam Zheng, philmd, alex.bennee, robert.foley, peter.puhov
In-Reply-To: <20200529203458.1038-1-robert.foley@linaro.org>

Added a new special variable QEMU_LOCAL=1, which
will indicate to take the QEMU binary from the current
build.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include |  4 ++++
 tests/vm/basevm.py        | 23 ++++++++++++++++++++---
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index e22c391a2a..f6c3892bb2 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -41,6 +41,7 @@ endif
 	@echo "    J=[0..9]*            	 - Override the -jN parameter for make commands"
 	@echo "    DEBUG=1              	 - Enable verbose output on host and interactive debugging"
 	@echo "    V=1				 - Enable verbose ouput on host and guest commands"
+	@echo "    QEMU_LOCAL=1                 - Use QEMU binary local to this build."
 	@echo "    QEMU=/path/to/qemu		 - Change path to QEMU binary"
 	@echo "    QEMU_IMG=/path/to/qemu-img	 - Change path to qemu-img tool"
 ifeq ($(PYTHON_YAML),yes)
@@ -63,6 +64,7 @@ $(IMAGES_DIR)/%.img:	$(SRC_PATH)/tests/vm/% \
 		$(PYTHON) $< \
 		$(if $(V)$(DEBUG), --debug) \
 		$(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \
+		$(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \
 		--image "$@" \
 		--force \
 		--build-image $@, \
@@ -77,6 +79,7 @@ vm-build-%: $(IMAGES_DIR)/%.img
 		$(if $(DEBUG), --interactive) \
 		$(if $(J),--jobs $(J)) \
 		$(if $(V),--verbose) \
+		$(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \
 		--image "$<" \
 		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
 		--snapshot \
@@ -98,6 +101,7 @@ vm-boot-ssh-%: $(IMAGES_DIR)/%.img
 		$(PYTHON) $(SRC_PATH)/tests/vm/$* \
 		$(if $(J),--jobs $(J)) \
 		$(if $(V)$(DEBUG), --debug) \
+		$(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \
 		--image "$<" \
 		--interactive \
 		false, \
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 7d23ae279b..75a7ac2bd3 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -91,6 +91,7 @@ class BaseVM(object):
     def __init__(self, args, config=None):
         self._guest = None
         self._genisoimage = args.genisoimage
+        self._build_path = args.build_path
         # Allow input config to override defaults.
         self._config = DEFAULT_CONFIG.copy()
         if config != None:
@@ -275,15 +276,15 @@ class BaseVM(object):
         args = self._args + boot_params.split(' ')
         args += self._data_args + extra_args + self._config['extra_args']
         logging.debug("QEMU args: %s", " ".join(args))
-        qemu_bin = os.environ.get("QEMU", "qemu-system-" + self.arch)
-        guest = QEMUMachine(binary=qemu_bin, args=args)
+        qemu_path = get_qemu_path(self.arch, self._build_path)
+        guest = QEMUMachine(binary=qemu_path, args=args)
         guest.set_machine(self._config['machine'])
         guest.set_console()
         try:
             guest.launch()
         except:
             logging.error("Failed to launch QEMU, command line:")
-            logging.error(" ".join([qemu_bin] + args))
+            logging.error(" ".join([qemu_path] + args))
             logging.error("Log:")
             logging.error(guest.get_log())
             logging.error("QEMU version >= 2.10 is required")
@@ -482,6 +483,19 @@ class BaseVM(object):
                               stderr=self._stdout)
         return os.path.join(cidir, "cloud-init.iso")
 
+def get_qemu_path(arch, build_path=None):
+    """Fetch the path to the qemu binary."""
+    # If QEMU environment variable set, it takes precedence
+    if "QEMU" in os.environ:
+        qemu_path = os.environ["QEMU"]
+    elif build_path:
+        qemu_path = os.path.join(build_path, arch + "-softmmu")
+        qemu_path = os.path.join(qemu_path, "qemu-system-" + arch)
+    else:
+        # Default is to use system path for qemu.
+        qemu_path = "qemu-system-" + arch
+    return qemu_path
+
 def parse_config(config, args):
     """ Parse yaml config and populate our config structure.
         The yaml config allows the user to override the
@@ -556,6 +570,9 @@ def parse_args(vmcls):
     parser.add_option("--config", "-c", default=None,
                       help="Provide config yaml for configuration. "\
                            "See config_example.yaml for example.")
+    parser.add_option("--build-path", default=None,
+                      help="Path of build directory, "\
+                           "for using build tree QEMU binary. ")
     parser.disable_interspersed_args()
     return parser.parse_args()
 
-- 
2.17.1



^ permalink raw reply related

* Re: [PATCH 1/3] ARC: allow to overide default mcpu compiler flag
From: Vineet Gupta @ 2020-05-29 20:47 UTC (permalink / raw)
  To: Eugeniy Paltsev, linux-snps-arc@lists.infradead.org
  Cc: linux-kernel@vger.kernel.org, Alexey Brodkin
In-Reply-To: <20200529115534.22883-2-Eugeniy.Paltsev@synopsys.com>

On 5/29/20 4:55 AM, Eugeniy Paltsev wrote:
> By default we set -mcpu=xxx compiler flag depending on the CPU ISA
> version. It's good starting point, however that may be not enough
> as for some platforms we may want to use some specific 'mcpu'
> options for better optimization or to workaround HW issues.
> 
> We are going to use this option for HSDK-4xD board support.
> In addition it also allows to awoid patching 'mcpu' in ARC Makefile
> when we building Linux for some non-standard simulation or FPGA-based
> platforms.
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

Question: So now if I build in buildroot with -mhs38_linux, it will use hard float
(kernel should not use floating point) but the libgcc linked will be different too
and that should be OK ?

I've rewritten the changelog.

  kernel builds set their own default -mcpu for a given ISA build.
  But that gets in the way of "custom" -mcpu flags from propagating
  into kernel build.

  This will also be used in next patches for HSDK-4xD board support which
  uses a different -mcpu to effect dual issue scheduling.




^ permalink raw reply

* Re: [PATCH 1/3] ARC: allow to overide default mcpu compiler flag
From: Vineet Gupta @ 2020-05-29 20:47 UTC (permalink / raw)
  To: Eugeniy Paltsev, linux-snps-arc@lists.infradead.org
  Cc: Alexey Brodkin, linux-kernel@vger.kernel.org
In-Reply-To: <20200529115534.22883-2-Eugeniy.Paltsev@synopsys.com>

On 5/29/20 4:55 AM, Eugeniy Paltsev wrote:
> By default we set -mcpu=xxx compiler flag depending on the CPU ISA
> version. It's good starting point, however that may be not enough
> as for some platforms we may want to use some specific 'mcpu'
> options for better optimization or to workaround HW issues.
> 
> We are going to use this option for HSDK-4xD board support.
> In addition it also allows to awoid patching 'mcpu' in ARC Makefile
> when we building Linux for some non-standard simulation or FPGA-based
> platforms.
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

Question: So now if I build in buildroot with -mhs38_linux, it will use hard float
(kernel should not use floating point) but the libgcc linked will be different too
and that should be OK ?

I've rewritten the changelog.

  kernel builds set their own default -mcpu for a given ISA build.
  But that gets in the way of "custom" -mcpu flags from propagating
  into kernel build.

  This will also be used in next patches for HSDK-4xD board support which
  uses a different -mcpu to effect dual issue scheduling.



_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply

* [PATCH v8 04/12] tests/vm: Pass --debug through for vm-boot-ssh.
From: Robert Foley @ 2020-05-29 20:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Fam Zheng, philmd, alex.bennee, robert.foley, peter.puhov
In-Reply-To: <20200529203458.1038-1-robert.foley@linaro.org>

This helps debug issues that occur during the boot sequence.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index d9b34eae63..e22c391a2a 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -97,6 +97,7 @@ vm-boot-ssh-%: $(IMAGES_DIR)/%.img
 	$(call quiet-command, \
 		$(PYTHON) $(SRC_PATH)/tests/vm/$* \
 		$(if $(J),--jobs $(J)) \
+		$(if $(V)$(DEBUG), --debug) \
 		--image "$<" \
 		--interactive \
 		false, \
-- 
2.17.1



^ permalink raw reply related

* Re: [BOOTLOADER SPECIFICATION RFC] The bootloader log format for TrenchBoot and others
From: Andy Lutomirski @ 2020-05-29 17:11 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: grub-devel, linux-kernel, trenchboot-devel, x86, xen-devel,
	alec.brown, alexander.burmashev, andrew.cooper3, ard.biesheuvel,
	dpsmith, eric.snowberg, hpa, javierm, kanth.ghatraju, konrad.wilk,
	krystian.hebel, leif, lukasz.hawrylko, michal.zygowski, mjg59,
	mtottenh, phcoder, piotr.krol, pjones, ross.philipson
In-Reply-To: <20200529112735.qln44ds6z7djheof@tomti.i.net-space.pl>



> On May 29, 2020, at 4:30 AM, Daniel Kiper <daniel.kiper@oracle.com> wrote:
> 
> Hey,
> 
> Below you can find my rough idea of the bootloader log format which is
> generic thing but initially will be used for TrenchBoot work. I discussed
> this proposal with Ross and Daniel S. So, the idea went through initial
> sanitization. Now I would like to take feedback from other folks too.
> So, please take a look and complain...

> In general we want to pass the messages produced by the bootloader to the OS
> kernel and finally to the userspace for further processing and analysis. Below
> is the description of the structures which will be used for this thing.

Is the intent for a human to read these, or to get them into the system log file, or are they intended to actually change the behavior of the system?

IOW, what is this for?

^ permalink raw reply

* [Buildroot] [PATCH/next 1/1] package/libdrm: bump version to 2.4.102
From: Thomas Petazzoni @ 2020-05-29 20:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20200529062959.172442-1-bernd.kuhls@t-online.de>

On Fri, 29 May 2020 08:29:59 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Removed patch applied upstream, reformatted hashes.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  .../0003-tests-amdgpu-needs-atomic_ops.patch  | 27 -------------------
>  package/libdrm/libdrm.hash                    |  6 ++---
>  package/libdrm/libdrm.mk                      |  2 +-
>  3 files changed, 4 insertions(+), 31 deletions(-)
>  delete mode 100644 package/libdrm/0003-tests-amdgpu-needs-atomic_ops.patch

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* [Buildroot] [PATCH/next 1/2] package/{mesa3d, mesa3d-headers}: bump version to 20.0.7
From: Thomas Petazzoni @ 2020-05-29 20:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20200529062435.169868-1-bernd.kuhls@t-online.de>

On Fri, 29 May 2020 08:24:34 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> cherry-picked from master to prevent conflicts when next branch,
> including the version bump to 20.1.0, is merged back to master branch.

Both applied to next. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply

* [Buildroot] [PATCH 2/2] package/jailhouse: add option to choose custom repo/branch
From: Yann E. MORIN @ 2020-05-29 20:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20200528144333.49268-3-mariomintel@gmail.com>

Mario, All,

On 2020-05-28 16:43 +0200, Mario Mintel spake thusly:
> In addition to official releases of Jailhouse, allow to specify a custom
> Git URI + branches. This adds more flexibility for custom
> configurations.

The overwhelming majority of packages do not allow selecting an
alternate location. Why would jailhouse be different?

Are you trying to cover for development? In that case, the usual way is
to use the override srcdir mechanism. See BR2_PACKAGE_OVERRIDE_FILE and
provide such a file with definitions like;

    JAILHOUSE_OVERRIDE_SRCDIR = /path/to/your/local/development/tree/jailhouse

Regards,
Yann E. MORIN.

> Signed-off-by: Mario Mintel <mariomintel@gmail.com>
> ---
>  package/jailhouse/Config.in    | 36 ++++++++++++++++++++++++++++++++--
>  package/jailhouse/jailhouse.mk | 17 ++++++++++++++--
>  2 files changed, 49 insertions(+), 4 deletions(-)
> 
> diff --git a/package/jailhouse/Config.in b/package/jailhouse/Config.in
> index 596b4951db..47523747f9 100644
> --- a/package/jailhouse/Config.in
> +++ b/package/jailhouse/Config.in
> @@ -3,18 +3,50 @@ config BR2_PACKAGE_JAILHOUSE
>  	depends on BR2_aarch64 || BR2_x86_64
>  	depends on BR2_LINUX_KERNEL
>  	help
> -	  The Jailhouse partitioning Hypervisor based on Linux.
> +	  The Jailhouse Linux-based partitioning hypervisor.
>  
>  	  https://github.com/siemens/jailhouse
>  
>  if BR2_PACKAGE_JAILHOUSE
>  
> +choice
> +	prompt "Jailhouse Version"
> +
> +config BR2_PACKAGE_JAILHOUSE_LATEST_VERSION
> +	bool "Version 0.12"
> +
> +config BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT
> +	bool "Custom Git repository"
> +	help
> +	  This option allows Buildroot to get the Jailhouse source code
> +	  from a custom Git repository.
> +
> +endchoice
> +
> +if BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT
> +
> +config BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT_URI
> +	string "URI of custom repository"
> +	default "https://github.com/siemens/jailhouse.git"
> +
> +config BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT_BRANCH
> +	string "Name of Git branch"
> +	default "master"
> +
> +endif
> +
> +config BR2_PACKAGE_JAILHOUSE_VERSION
> +	string
> +	default "0.12" if BR2_PACKAGE_JAILHOUSE_LATEST_VERSION
> +	default BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT_BRANCH \
> +		if BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT
> +
>  config BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS
>  	bool "helper scripts"
>  	depends on BR2_PACKAGE_PYTHON
>  	select BR2_PACKAGE_PYTHON_MAKO # runtime
>  	help
> -	  Python-based helpers for the Jailhouse Hypervisor.
> +	  Python-based helpers for the Jailhouse hypervisor.
>  
>  	  https://github.com/siemens/jailhouse
>  
> diff --git a/package/jailhouse/jailhouse.mk b/package/jailhouse/jailhouse.mk
> index 6356c5a7aa..d134b3d1b4 100644
> --- a/package/jailhouse/jailhouse.mk
> +++ b/package/jailhouse/jailhouse.mk
> @@ -4,10 +4,23 @@
>  #
>  ################################################################################
>  
> -JAILHOUSE_VERSION = 0.12
> -JAILHOUSE_SITE = $(call github,siemens,jailhouse,v$(JAILHOUSE_VERSION))
> +JAILHOUSE_VERSION = $(call qstrip,$(BR2_PACKAGE_JAILHOUSE_VERSION))
>  JAILHOUSE_LICENSE = GPL-2.0
> +ifeq ($(BR2_PACKAGE_JAILHOUSE_LATEST_VERSION),y)
>  JAILHOUSE_LICENSE_FILES = COPYING
> +endif
> +
> +ifeq ($(BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT),y)
> +JAILHOUSE_SITE = $(call qstrip,$(BR2_PACKAGE_JAILHOUSE_CUSTOM_GIT_URI))
> +JAILHOUSE_SITE_METHOD = git
> +else
> +JAILHOUSE_SITE = $(call github,siemens,jailhouse,v$(JAILHOUSE_VERSION))
> +endif
> +
> +ifeq ($(BR2_PACKAGE_JAILHOUSE)$(BR2_PACKAGE_JAILHOUSE_CUSTIM_GIT),y)
> +BR_NO_CHECK_HASH_FOR += $(JAILHOUSE_SOURCE)
> +endif
> +
>  JAILHOUSE_DEPENDENCIES = \
>  	linux
>  
> -- 
> 2.26.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply

* [Buildroot] [git commit branch/next] package/hiawatha: enable optional xslt support
From: Thomas Petazzoni @ 2020-05-29 20:48 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=b4cda668d8a1cf1085581e16b1a6c2622ebb5578
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/hiawatha/hiawatha.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk
index eefd0f6f89..28fd286ea8 100644
--- a/package/hiawatha/hiawatha.mk
+++ b/package/hiawatha/hiawatha.mk
@@ -17,9 +17,15 @@ else
 HIAWATHA_CONF_OPTS += -DENABLE_TLS=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)
+HIAWATHA_CONF_OPTS += -DENABLE_XSLT=ON
+HIAWATHA_DEPENDENCIES += libxslt
+else
+HIAWATHA_CONF_OPTS += -DENABLE_XSLT=OFF
+endif
+
 HIAWATHA_CONF_OPTS += \
 	-DENABLE_TOOLKIT=OFF \
-	-DENABLE_XSLT=OFF \
 	-DCONFIG_DIR=/etc/hiawatha \
 	-DLOG_DIR=/var/log \
 	-DPID_DIR=/var/run \

^ permalink raw reply related

* [Buildroot] [git commit] package/hiawatha: enable optional xslt support
From: Thomas Petazzoni @ 2020-05-29 20:48 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=b4cda668d8a1cf1085581e16b1a6c2622ebb5578
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/hiawatha/hiawatha.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk
index eefd0f6f89..28fd286ea8 100644
--- a/package/hiawatha/hiawatha.mk
+++ b/package/hiawatha/hiawatha.mk
@@ -17,9 +17,15 @@ else
 HIAWATHA_CONF_OPTS += -DENABLE_TLS=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)
+HIAWATHA_CONF_OPTS += -DENABLE_XSLT=ON
+HIAWATHA_DEPENDENCIES += libxslt
+else
+HIAWATHA_CONF_OPTS += -DENABLE_XSLT=OFF
+endif
+
 HIAWATHA_CONF_OPTS += \
 	-DENABLE_TOOLKIT=OFF \
-	-DENABLE_XSLT=OFF \
 	-DCONFIG_DIR=/etc/hiawatha \
 	-DLOG_DIR=/var/log \
 	-DPID_DIR=/var/run \

^ permalink raw reply related

* [f2fs-dev] [PATCH] fsck.f2fs: fix dirent position check for encrypted+casefolded dentries
From: Eric Biggers @ 2020-05-29 20:47 UTC (permalink / raw)
  To: linux-f2fs-devel, Jaegeuk Kim; +Cc: Daniel Rosenberg

From: Eric Biggers <ebiggers@google.com>

fsck.f2fs reports corruption if the filesystem contains any encrypted +
casefolded directories with any substantial number of dentries:

    [ASSERT] (f2fs_check_dirent_position:1374)  --> Wrong position of dirent pino:8, name:۟�[I�^*�(�5~�}�D��#]7�8�ˎ�, level:1, dir_level:0, pgofs:4, correct range:[2, 3]

The problem is that f2fs_check_dirent_position() computes the wrong hash
for encrypted+casefolded dentries.  It's not actually possible for it to
compute the correct hash, because it would need the encryption key.

However, the on-disk dentry already contains the hash code, and its
correctness was already verified by f2fs_check_hash_code() if possible.

So, make f2fs_check_dirent_position() use the hash code from disk rather
than recompute it.

Also fix it to print the filename in human-readable form.

This bug was causing 'kvm-xfstests -c f2fs/encrypt -g casefold'
to fail with the test_dummy_encryption_v2 and encryption+casefolding
kernel patches applied.

Fixes: 7f3767ee8dc5 ("f2fs-tools: Casefolded Encryption support")
Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fsck/fsck.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/fsck/fsck.c b/fsck/fsck.c
index 0389146..c249dfa 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1348,11 +1348,10 @@ static int __get_current_level(int dir_level, u32 pgofs)
 	return i;
 }
 
-static int f2fs_check_dirent_position(int encoding, int casefolded,
-						u8 *name, u16 name_len, u32 pgofs,
-						u8 dir_level, u32 pino)
+static int f2fs_check_dirent_position(const struct f2fs_dir_entry *dentry,
+				      const char *printable_name,
+				      u32 pgofs, u8 dir_level, u32 pino)
 {
-	f2fs_hash_t namehash = f2fs_dentry_hash(encoding, casefolded, name, name_len);
 	unsigned int nbucket, nblock;
 	unsigned int bidx, end_block;
 	int level;
@@ -1363,7 +1362,7 @@ static int f2fs_check_dirent_position(int encoding, int casefolded,
 	nblock = bucket_blocks(level);
 
 	bidx = dir_block_index(level, dir_level,
-					le32_to_cpu(namehash) % nbucket);
+			       le32_to_cpu(dentry->hash_code) % nbucket);
 	end_block = bidx + nblock;
 
 	if (pgofs >= bidx && pgofs < end_block)
@@ -1371,7 +1370,8 @@ static int f2fs_check_dirent_position(int encoding, int casefolded,
 
 	ASSERT_MSG("Wrong position of dirent pino:%u, name:%s, level:%d, "
 		"dir_level:%d, pgofs:%u, correct range:[%u, %u]\n",
-		pino, name, level, dir_level, pgofs, bidx, end_block - 1);
+		pino, printable_name, level, dir_level, pgofs, bidx,
+		end_block - 1);
 	return 1;
 }
 
@@ -1552,10 +1552,12 @@ static int __chk_dentries(struct f2fs_sb_info *sbi, int casefolded,
 		if (f2fs_check_hash_code(get_encoding(sbi), casefolded, dentry + i, name, name_len, enc_name))
 			fixed = 1;
 
+		pretty_print_filename(name, name_len, en, enc_name);
+
 		if (max == NR_DENTRY_IN_BLOCK) {
-			ret = f2fs_check_dirent_position(get_encoding(sbi), casefolded,
-					name, name_len,	child->pgofs,
-					child->dir_level, child->p_ino);
+			ret = f2fs_check_dirent_position(dentry + i, en,
+					child->pgofs, child->dir_level,
+					child->p_ino);
 			if (ret) {
 				if (c.fix_on) {
 					FIX_MSG("Clear bad dentry 0x%x", i);
@@ -1568,7 +1570,6 @@ static int __chk_dentries(struct f2fs_sb_info *sbi, int casefolded,
 			}
 		}
 
-		pretty_print_filename(name, name_len, en, enc_name);
 		DBG(1, "[%3u]-[0x%x] name[%s] len[0x%x] ino[0x%x] type[0x%x]\n",
 				fsck->dentry_depth, i, en, name_len,
 				le32_to_cpu(dentry[i].ino),
-- 
2.27.0.rc0.183.gde8f92d652-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related

* Re: [PATCH v8 43/62] target/riscv: vector floating-point/integer type-convert instructions
From: Alistair Francis @ 2020-05-29 20:40 UTC (permalink / raw)
  To: LIU Zhiwei
  Cc: qemu-devel@nongnu.org Developers, open list:RISC-V,
	Richard Henderson, wxy194768, wenmeng_zhang, Alistair Francis,
	Palmer Dabbelt
In-Reply-To: <20200521094413.10425-44-zhiwei_liu@c-sky.com>

On Thu, May 21, 2020 at 4:11 AM LIU Zhiwei <zhiwei_liu@c-sky.com> wrote:
>
> Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/helper.h                   | 13 ++++++++++
>  target/riscv/insn32.decode              |  4 +++
>  target/riscv/insn_trans/trans_rvv.inc.c |  6 +++++
>  target/riscv/vector_helper.c            | 33 +++++++++++++++++++++++++
>  4 files changed, 56 insertions(+)
>
> diff --git a/target/riscv/helper.h b/target/riscv/helper.h
> index 21054cc957..05f8fb5ffc 100644
> --- a/target/riscv/helper.h
> +++ b/target/riscv/helper.h
> @@ -998,3 +998,16 @@ DEF_HELPER_5(vfclass_v_d, void, ptr, ptr, ptr, env, i32)
>  DEF_HELPER_6(vfmerge_vfm_h, void, ptr, ptr, i64, ptr, env, i32)
>  DEF_HELPER_6(vfmerge_vfm_w, void, ptr, ptr, i64, ptr, env, i32)
>  DEF_HELPER_6(vfmerge_vfm_d, void, ptr, ptr, i64, ptr, env, i32)
> +
> +DEF_HELPER_5(vfcvt_xu_f_v_h, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_xu_f_v_w, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_xu_f_v_d, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_x_f_v_h, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_x_f_v_w, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_x_f_v_d, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_f_xu_v_h, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_f_xu_v_w, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_f_xu_v_d, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_f_x_v_h, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_f_x_v_w, void, ptr, ptr, ptr, env, i32)
> +DEF_HELPER_5(vfcvt_f_x_v_d, void, ptr, ptr, ptr, env, i32)
> diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode
> index 14cb4e2e66..53562c6663 100644
> --- a/target/riscv/insn32.decode
> +++ b/target/riscv/insn32.decode
> @@ -515,6 +515,10 @@ vmford_vf       011010 . ..... ..... 101 ..... 1010111 @r_vm
>  vfclass_v       100011 . ..... 10000 001 ..... 1010111 @r2_vm
>  vfmerge_vfm     010111 0 ..... ..... 101 ..... 1010111 @r_vm_0
>  vfmv_v_f        010111 1 00000 ..... 101 ..... 1010111 @r2
> +vfcvt_xu_f_v    100010 . ..... 00000 001 ..... 1010111 @r2_vm
> +vfcvt_x_f_v     100010 . ..... 00001 001 ..... 1010111 @r2_vm
> +vfcvt_f_xu_v    100010 . ..... 00010 001 ..... 1010111 @r2_vm
> +vfcvt_f_x_v     100010 . ..... 00011 001 ..... 1010111 @r2_vm
>
>  vsetvli         0 ........... ..... 111 ..... 1010111  @r2_zimm
>  vsetvl          1000000 ..... ..... 111 ..... 1010111  @r
> diff --git a/target/riscv/insn_trans/trans_rvv.inc.c b/target/riscv/insn_trans/trans_rvv.inc.c
> index dfa2177331..6db460177d 100644
> --- a/target/riscv/insn_trans/trans_rvv.inc.c
> +++ b/target/riscv/insn_trans/trans_rvv.inc.c
> @@ -2215,3 +2215,9 @@ static bool trans_vfmv_v_f(DisasContext *s, arg_vfmv_v_f *a)
>      }
>      return false;
>  }
> +
> +/* Single-Width Floating-Point/Integer Type-Convert Instructions */
> +GEN_OPFV_TRANS(vfcvt_xu_f_v, opfv_check)
> +GEN_OPFV_TRANS(vfcvt_x_f_v, opfv_check)
> +GEN_OPFV_TRANS(vfcvt_f_xu_v, opfv_check)
> +GEN_OPFV_TRANS(vfcvt_f_x_v, opfv_check)
> diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
> index 018293570d..34b21c8deb 100644
> --- a/target/riscv/vector_helper.c
> +++ b/target/riscv/vector_helper.c
> @@ -4217,3 +4217,36 @@ void HELPER(NAME)(void *vd, void *v0, uint64_t s1, void *vs2, \
>  GEN_VFMERGE_VF(vfmerge_vfm_h, int16_t, H2, clearh)
>  GEN_VFMERGE_VF(vfmerge_vfm_w, int32_t, H4, clearl)
>  GEN_VFMERGE_VF(vfmerge_vfm_d, int64_t, H8, clearq)
> +
> +/* Single-Width Floating-Point/Integer Type-Convert Instructions */
> +/* vfcvt.xu.f.v vd, vs2, vm # Convert float to unsigned integer. */
> +RVVCALL(OPFVV1, vfcvt_xu_f_v_h, OP_UU_H, H2, H2, float16_to_uint16)
> +RVVCALL(OPFVV1, vfcvt_xu_f_v_w, OP_UU_W, H4, H4, float32_to_uint32)
> +RVVCALL(OPFVV1, vfcvt_xu_f_v_d, OP_UU_D, H8, H8, float64_to_uint64)
> +GEN_VEXT_V_ENV(vfcvt_xu_f_v_h, 2, 2, clearh)
> +GEN_VEXT_V_ENV(vfcvt_xu_f_v_w, 4, 4, clearl)
> +GEN_VEXT_V_ENV(vfcvt_xu_f_v_d, 8, 8, clearq)
> +
> +/* vfcvt.x.f.v vd, vs2, vm # Convert float to signed integer. */
> +RVVCALL(OPFVV1, vfcvt_x_f_v_h, OP_UU_H, H2, H2, float16_to_int16)
> +RVVCALL(OPFVV1, vfcvt_x_f_v_w, OP_UU_W, H4, H4, float32_to_int32)
> +RVVCALL(OPFVV1, vfcvt_x_f_v_d, OP_UU_D, H8, H8, float64_to_int64)
> +GEN_VEXT_V_ENV(vfcvt_x_f_v_h, 2, 2, clearh)
> +GEN_VEXT_V_ENV(vfcvt_x_f_v_w, 4, 4, clearl)
> +GEN_VEXT_V_ENV(vfcvt_x_f_v_d, 8, 8, clearq)
> +
> +/* vfcvt.f.xu.v vd, vs2, vm # Convert unsigned integer to float. */
> +RVVCALL(OPFVV1, vfcvt_f_xu_v_h, OP_UU_H, H2, H2, uint16_to_float16)
> +RVVCALL(OPFVV1, vfcvt_f_xu_v_w, OP_UU_W, H4, H4, uint32_to_float32)
> +RVVCALL(OPFVV1, vfcvt_f_xu_v_d, OP_UU_D, H8, H8, uint64_to_float64)
> +GEN_VEXT_V_ENV(vfcvt_f_xu_v_h, 2, 2, clearh)
> +GEN_VEXT_V_ENV(vfcvt_f_xu_v_w, 4, 4, clearl)
> +GEN_VEXT_V_ENV(vfcvt_f_xu_v_d, 8, 8, clearq)
> +
> +/* vfcvt.f.x.v vd, vs2, vm # Convert integer to float. */
> +RVVCALL(OPFVV1, vfcvt_f_x_v_h, OP_UU_H, H2, H2, int16_to_float16)
> +RVVCALL(OPFVV1, vfcvt_f_x_v_w, OP_UU_W, H4, H4, int32_to_float32)
> +RVVCALL(OPFVV1, vfcvt_f_x_v_d, OP_UU_D, H8, H8, int64_to_float64)
> +GEN_VEXT_V_ENV(vfcvt_f_x_v_h, 2, 2, clearh)
> +GEN_VEXT_V_ENV(vfcvt_f_x_v_w, 4, 4, clearl)
> +GEN_VEXT_V_ENV(vfcvt_f_x_v_d, 8, 8, clearq)
> --
> 2.23.0
>
>


^ permalink raw reply

* Re: [PATCH 7/9] bpf: Compile the BTF id whitelist data in vmlinux
From: Andrii Nakryiko @ 2020-05-29 20:48 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Alexei Starovoitov, Jiri Olsa, Alexei Starovoitov,
	Daniel Borkmann, Networking, bpf, Yonghong Song, Martin KaFai Lau,
	David Miller, John Fastabend, Jesper Dangaard Brouer, Wenbo Zhang,
	KP Singh, Andrii Nakryiko, Brendan Gregg, Florent Revest, Al Viro
In-Reply-To: <20200528172349.GA506785@krava>

On Thu, May 28, 2020 at 10:24 AM Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Thu, May 14, 2020 at 03:46:26PM -0700, Andrii Nakryiko wrote:
>
> SNIP
>
> > > I was thinking of putting the names in __init section and generate the BTF
> > > ids on kernel start, but the build time generation seemed more convenient..
> > > let's see the linking times with 'real size' whitelist and we can reconsider
> > >
> >
> > Being able to record such places where to put BTF ID in code would be
> > really nice, as Alexei mentioned. There are many potential use cases
> > where it would be good to have BTF IDs just put into arbitrary
> > variables/arrays. This would trigger compilation error, if someone
> > screws up the name, or function is renamed, or if function can be
> > compiled out under some configuration. E.g., assuming some reasonable
> > implementation of the macro
>
> hi,
> I'm struggling with this part.. to get some reasonable reference
> to function/name into 32 bits? any idea? ;-)
>

Well, you don't have to store actual pointer, right? E.g, emitting
something like this in assembly:

.global __BTF_ID___some_function
.type __BTF_ID___some_function, @object
.size __BTF_ID___some_function, 4
__BTF_ID___some_function:
.zero  4

Would reserve 4 bytes and emit __BTF_ID___some_function symbol. If we
can then post-process vmlinux image and for all symbols starting with
__BTF_ID___ find some_function BTF type id and put it into those 4
bytes, that should work, no?

Maybe generalize it to __BTF_ID__{func,struct,typedef}__some_function,
whatever, not sure. Just an idea.


> jirka
>
> >
> > static const u32 d_path_whitelist[] = {
> >     BTF_ID_FUNC(vfs_fallocate),
> > #ifdef CONFIG_WHATEVER
> >     BTF_ID_FUNC(do_truncate),
> > #endif
> > };
> >
> > Would be nice and very explicit. Given this is not going to be sorted,
> > you won't be able to use binary search, but if whitelists are
> > generally small, it should be fine as is. If not, hashmap could be
> > built in runtime and would be, probably, faster than binary search for
> > longer sets of BTF IDs.
> >
> > I wonder if we can do some assembly magic with generating extra
> > symbols and/or relocations to achieve this? What do you think? Is it
> > doable/desirable/better?
> >
> >
> > > thanks,
> > > jirka
> > >
> >
>

^ permalink raw reply

* Re: [PATCH 2/3] ARC: ARCv2: support loop buffer (LPB) disabling
From: Vineet Gupta @ 2020-05-29 20:47 UTC (permalink / raw)
  To: Eugeniy Paltsev, linux-snps-arc@lists.infradead.org
  Cc: Alexey Brodkin, linux-kernel@vger.kernel.org
In-Reply-To: <20200529115534.22883-4-Eugeniy.Paltsev@synopsys.com>

On 5/29/20 4:55 AM, Eugeniy Paltsev wrote:
> On HS cores, loop buffer (LPB) is programmable in runtime and can
> be optionally disabled.
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

LGTM.

-Vineet

^ permalink raw reply

* [Buildroot] [git commit branch/next] package/hiawatha: reorder CONF_OPTS in the .mk file
From: Thomas Petazzoni @ 2020-05-29 20:49 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=b35df346a61c1b4d8835679dc5416734dfc07419
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Move the unconditional CONF_OPTS assignment toward the beginning of
the file, before the conditionals on optional dependencies. And use =
for this unconditional assignment instead of +=. No functional
changes, just to align with the coding style used in most other
packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/hiawatha/hiawatha.mk | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk
index 28fd286ea8..01b9292035 100644
--- a/package/hiawatha/hiawatha.mk
+++ b/package/hiawatha/hiawatha.mk
@@ -10,6 +10,14 @@ HIAWATHA_DEPENDENCIES = zlib
 HIAWATHA_LICENSE = GPL-2.0
 HIAWATHA_LICENSE_FILES = LICENSE
 
+HIAWATHA_CONF_OPTS = \
+	-DENABLE_TOOLKIT=OFF \
+	-DCONFIG_DIR=/etc/hiawatha \
+	-DLOG_DIR=/var/log \
+	-DPID_DIR=/var/run \
+	-DWEBROOT_DIR=/var/www/hiawatha \
+	-DWORK_DIR=/var/lib/hiawatha
+
 ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y)
 HIAWATHA_CONF_OPTS += -DUSE_SYSTEM_MBEDTLS=ON
 HIAWATHA_DEPENDENCIES += mbedtls
@@ -24,12 +32,4 @@ else
 HIAWATHA_CONF_OPTS += -DENABLE_XSLT=OFF
 endif
 
-HIAWATHA_CONF_OPTS += \
-	-DENABLE_TOOLKIT=OFF \
-	-DCONFIG_DIR=/etc/hiawatha \
-	-DLOG_DIR=/var/log \
-	-DPID_DIR=/var/run \
-	-DWEBROOT_DIR=/var/www/hiawatha \
-	-DWORK_DIR=/var/lib/hiawatha
-
 $(eval $(cmake-package))

^ permalink raw reply related

* [Buildroot] [git commit] package/hiawatha: reorder CONF_OPTS in the .mk file
From: Thomas Petazzoni @ 2020-05-29 20:49 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=b35df346a61c1b4d8835679dc5416734dfc07419
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Move the unconditional CONF_OPTS assignment toward the beginning of
the file, before the conditionals on optional dependencies. And use =
for this unconditional assignment instead of +=. No functional
changes, just to align with the coding style used in most other
packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/hiawatha/hiawatha.mk | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk
index 28fd286ea8..01b9292035 100644
--- a/package/hiawatha/hiawatha.mk
+++ b/package/hiawatha/hiawatha.mk
@@ -10,6 +10,14 @@ HIAWATHA_DEPENDENCIES = zlib
 HIAWATHA_LICENSE = GPL-2.0
 HIAWATHA_LICENSE_FILES = LICENSE
 
+HIAWATHA_CONF_OPTS = \
+	-DENABLE_TOOLKIT=OFF \
+	-DCONFIG_DIR=/etc/hiawatha \
+	-DLOG_DIR=/var/log \
+	-DPID_DIR=/var/run \
+	-DWEBROOT_DIR=/var/www/hiawatha \
+	-DWORK_DIR=/var/lib/hiawatha
+
 ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y)
 HIAWATHA_CONF_OPTS += -DUSE_SYSTEM_MBEDTLS=ON
 HIAWATHA_DEPENDENCIES += mbedtls
@@ -24,12 +32,4 @@ else
 HIAWATHA_CONF_OPTS += -DENABLE_XSLT=OFF
 endif
 
-HIAWATHA_CONF_OPTS += \
-	-DENABLE_TOOLKIT=OFF \
-	-DCONFIG_DIR=/etc/hiawatha \
-	-DLOG_DIR=/var/log \
-	-DPID_DIR=/var/run \
-	-DWEBROOT_DIR=/var/www/hiawatha \
-	-DWORK_DIR=/var/lib/hiawatha
-
 $(eval $(cmake-package))

^ permalink raw reply related

* Re: [PATCH 2/3] ARC: ARCv2: support loop buffer (LPB) disabling
From: Vineet Gupta @ 2020-05-29 20:47 UTC (permalink / raw)
  To: Eugeniy Paltsev, linux-snps-arc@lists.infradead.org
  Cc: Alexey Brodkin, linux-kernel@vger.kernel.org
In-Reply-To: <20200529115534.22883-4-Eugeniy.Paltsev@synopsys.com>

On 5/29/20 4:55 AM, Eugeniy Paltsev wrote:
> On HS cores, loop buffer (LPB) is programmable in runtime and can
> be optionally disabled.
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

LGTM.

-Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply

* [PATCH v8 09/12] tests/vm: Added a new script for centos.aarch64.
From: Robert Foley @ 2020-05-29 20:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Fam Zheng, philmd, alex.bennee, robert.foley, peter.puhov
In-Reply-To: <20200529203458.1038-1-robert.foley@linaro.org>

centos.aarch64 creates a CentOS 8 image.
Also added a new kickstart script used to build the centos.aarch64 image.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include    |   3 +-
 tests/vm/centos-8-aarch64.ks |  51 ++++++++
 tests/vm/centos.aarch64      | 227 +++++++++++++++++++++++++++++++++++
 3 files changed, 280 insertions(+), 1 deletion(-)
 create mode 100644 tests/vm/centos-8-aarch64.ks
 create mode 100755 tests/vm/centos.aarch64

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index cc71e6ed0a..8cccfaf95d 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -6,7 +6,7 @@ IMAGES := freebsd netbsd openbsd centos fedora
 ifneq ($(GENISOIMAGE),)
 IMAGES += ubuntu.i386 centos
 ifneq ($(EFI_AARCH64),)
-IMAGES += ubuntu.aarch64
+IMAGES += ubuntu.aarch64 centos.aarch64
 endif
 endif
 
@@ -28,6 +28,7 @@ ifneq ($(GENISOIMAGE),)
 	@echo "  vm-build-ubuntu.i386            - Build QEMU in ubuntu i386 VM"
 ifneq ($(EFI_AARCH64),)
 	@echo "  vm-build-ubuntu.aarch64         - Build QEMU in ubuntu aarch64 VM"
+	@echo "  vm-build-centos.aarch64         - Build QEMU in CentOS aarch64 VM"
 else
 	@echo "  (install qemu-efi-aarch64 to build centos/ubuntu aarch64 images.)"
 endif
diff --git a/tests/vm/centos-8-aarch64.ks b/tests/vm/centos-8-aarch64.ks
new file mode 100644
index 0000000000..fd6ebe4d49
--- /dev/null
+++ b/tests/vm/centos-8-aarch64.ks
@@ -0,0 +1,51 @@
+# CentOS aarch64 image kickstart file.
+# This file is used by the CentOS installer to
+# script the generation of the image.
+#
+# Copyright 2020 Linaro
+#
+ignoredisk --only-use=vda
+# System bootloader configuration
+bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
+autopart --type=plain
+# Partition clearing information
+clearpart --linux --initlabel --drives=vda
+# Use text mode install
+text
+repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
+# Use CDROM installation media
+cdrom
+# Keyboard layouts
+keyboard --vckeymap=us --xlayouts=''
+# System language
+lang en_US.UTF-8
+
+# Network information
+network  --bootproto=dhcp --device=enp0s1 --onboot=off --ipv6=auto --no-activate
+network  --hostname=localhost.localdomain
+# Run the Setup Agent on first boot
+firstboot --enable
+# Do not configure the X Window System
+skipx
+# System services
+services --enabled="chronyd"
+# System timezone
+timezone America/New_York --isUtc
+
+# Shutdown after installation is complete.
+shutdown
+
+%packages
+@^server-product-environment
+kexec-tools
+
+%end
+
+%addon com_redhat_kdump --enable --reserve-mb='auto'
+
+%end
+%anaconda
+pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
+pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
+pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
+%end
diff --git a/tests/vm/centos.aarch64 b/tests/vm/centos.aarch64
new file mode 100755
index 0000000000..d5232ecdb8
--- /dev/null
+++ b/tests/vm/centos.aarch64
@@ -0,0 +1,227 @@
+#!/usr/bin/env python3
+#
+# Centos aarch64 image
+#
+# Copyright 2020 Linaro
+#
+# Authors:
+#  Robert Foley <robert.foley@linaro.org>
+#  Originally based on ubuntu.aarch64
+#
+# This code is licensed under the GPL version 2 or later.  See
+# the COPYING file in the top-level directory.
+#
+
+import os
+import sys
+import subprocess
+import basevm
+import time
+import traceback
+import aarch64vm
+
+DEFAULT_CONFIG = {
+    'cpu'          : "max",
+    'machine'      : "virt,gic-version=max",
+    'install_cmds' : "yum install -y make git python3 gcc gcc-c++ flex bison, "\
+        "yum install -y glib2-devel pixman-devel zlib-devel, "\
+        "yum install -y perl-Test-Harness, "\
+        "alternatives --set python /usr/bin/python3, "\
+        "sudo dnf config-manager "\
+        "--add-repo=https://download.docker.com/linux/centos/docker-ce.repo,"\
+        "sudo dnf install --nobest -y docker-ce.aarch64,"\
+        "systemctl enable docker",
+    # We increase beyond the default time since during boot
+    # it can take some time (many seconds) to log into the VM.
+    'ssh_timeout'  : 60,
+}
+
+class CentosAarch64VM(basevm.BaseVM):
+    name = "centos.aarch64"
+    arch = "aarch64"
+    login_prompt = "localhost login:"
+    prompt = '[root@localhost ~]#'
+    image_name = "CentOS-8-aarch64-1905-dvd1.iso"
+    image_link = "http://mirrors.usc.edu/pub/linux/distributions/centos/8.0.1905/isos/aarch64/"
+    image_link += image_name
+    BUILD_SCRIPT = """
+        set -e;
+        cd $(mktemp -d);
+        sudo chmod a+r /dev/vdb;
+        tar --checkpoint=.10 -xf /dev/vdb;
+        ./configure {configure_opts};
+        make --output-sync {target} -j{jobs} {verbose};
+    """
+    def set_key_perm(self):
+        """Set permissions properly on certain files to allow
+           ssh access."""
+        self.console_wait_send(self.prompt,
+                               "/usr/sbin/restorecon -R -v /root/.ssh\n")
+        self.console_wait_send(self.prompt,
+                "/usr/sbin/restorecon -R -v "\
+                "/home/{}/.ssh\n".format(self._config["guest_user"]))
+
+    def create_kickstart(self):
+        """Generate the kickstart file used to generate the centos image."""
+        # Start with the template for the kickstart.
+        ks_file = "../tests/vm/centos-8-aarch64.ks"
+        subprocess.check_call("cp {} ./ks.cfg".format(ks_file), shell=True)
+        # Append the ssh keys to the kickstart file
+        # as the post processing phase of installation.
+        with open("ks.cfg", "a") as f:
+            # Add in the root pw and guest user.
+            rootpw = "rootpw --plaintext {}\n"
+            f.write(rootpw.format(self._config["root_pass"]))
+            add_user = "user --groups=wheel --name={} "\
+                       "--password={} --plaintext\n"
+            f.write(add_user.format(self._config["guest_user"],
+                                    self._config["guest_pass"]))
+            # Add the ssh keys.
+            f.write("%post --log=/root/ks-post.log\n")
+            f.write("mkdir -p /root/.ssh\n")
+            addkey = 'echo "{}" >> /root/.ssh/authorized_keys\n'
+            addkey_cmd = addkey.format(self._config["ssh_pub_key"])
+            f.write(addkey_cmd)
+            f.write('mkdir -p /home/{}/.ssh\n'.format(self._config["guest_user"]))
+            addkey = 'echo "{}" >> /home/{}/.ssh/authorized_keys\n'
+            addkey_cmd = addkey.format(self._config["ssh_pub_key"],
+                                       self._config["guest_user"])
+            f.write(addkey_cmd)
+            f.write("%end\n")
+        # Take our kickstart file and create an .iso from it.
+        # The .iso will be provided to qemu as we boot
+        # from the install dvd.
+        # Anaconda will recognize the label "OEMDRV" and will
+        # start the automated installation.
+        gen_iso_img = 'genisoimage -output ks.iso -volid "OEMDRV" ks.cfg'
+        subprocess.check_call(gen_iso_img, shell=True)
+
+    def wait_for_shutdown(self):
+        """We wait for qemu to shutdown the VM and exit.
+           While this happens we display the console view
+           for easier debugging."""
+        # The image creation is essentially done,
+        # so whether or not the wait is successful we want to
+        # wait for qemu to exit (the self.wait()) before we return.
+        try:
+            self.console_wait("reboot: Power down")
+        except Exception as e:
+            sys.stderr.write("Exception hit\n")
+            if isinstance(e, SystemExit) and e.code == 0:
+                return 0
+            traceback.print_exc()
+        finally:
+            self.wait()
+
+    def build_base_image(self, dest_img):
+        """Run through the centos installer to create
+           a base image with name dest_img."""
+        # We create the temp image, and only rename
+        # to destination when we are done.
+        img = dest_img + ".tmp"
+        # Create an empty image.
+        # We will provide this as the install destination.
+        qemu_img_create = "qemu-img create {} 50G".format(img)
+        subprocess.check_call(qemu_img_create, shell=True)
+
+        # Create our kickstart file to be fed to the installer.
+        self.create_kickstart()
+        # Boot the install dvd with the params as our ks.iso
+        os_img = self._download_with_cache(self.image_link)
+        dvd_iso = "centos-8-dvd.iso"
+        subprocess.check_call(["cp", "-f", os_img, dvd_iso])
+        extra_args = "-cdrom ks.iso"
+        extra_args += " -drive file={},if=none,id=drive1,cache=writeback"
+        extra_args += " -device virtio-blk,drive=drive1,bootindex=1"
+        extra_args = extra_args.format(dvd_iso).split(" ")
+        self.boot(img, extra_args=extra_args)
+        self.console_wait_send("change the selection", "\n")
+        # We seem to need to hit esc (chr(27)) twice to abort the
+        # media check, which takes a long time.
+        # Waiting a bit seems to be more reliable before hitting esc.
+        self.console_wait("Checking")
+        time.sleep(5)
+        self.console_wait_send("Checking", chr(27))
+        time.sleep(5)
+        self.console_wait_send("Checking", chr(27))
+        print("Found Checking")
+        # Give sufficient time for the installer to create the image.
+        self.console_init(timeout=7200)
+        self.wait_for_shutdown()
+        os.rename(img, dest_img)
+        print("Done with base image build: {}".format(dest_img))
+
+    def check_create_base_img(self, img_base, img_dest):
+        """Create a base image using the installer.
+           We will use the base image if it exists.
+           This helps cut down on install time in case we
+           need to restart image creation,
+           since the base image creation can take a long time."""
+        if not os.path.exists(img_base):
+            print("Generate new base image: {}".format(img_base))
+            self.build_base_image(img_base);
+        else:
+            print("Use existing base image: {}".format(img_base))
+        # Save a copy of the base image and copy it to dest.
+        # which we will use going forward.
+        subprocess.check_call(["cp", img_base, img_dest])
+
+    def boot(self, img, extra_args=None):
+        aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64)
+        default_args = aarch64vm.get_pflash_args(self._tmpdir)
+        if extra_args:
+            extra_args.extend(default_args)
+        else:
+            extra_args = default_args
+        # We always add these performance tweaks
+        # because without them, we boot so slowly that we
+        # can time out finding the boot efi device.
+        if '-smp' not in extra_args and \
+           '-smp' not in self._config['extra_args'] and \
+           '-smp' not in self._args:
+            # Only add if not already there to give caller option to change it.
+            extra_args.extend(["-smp", "8"])
+        # We have overridden boot() since aarch64 has additional parameters.
+        # Call down to the base class method.
+        super(CentosAarch64VM, self).boot(img, extra_args=extra_args)
+
+    def build_image(self, img):
+        img_tmp = img + ".tmp"
+        self.check_create_base_img(img + ".base", img_tmp)
+
+        # Boot the new image for the first time to finish installation.
+        self.boot(img_tmp)
+        self.console_init()
+        self.console_wait_send(self.login_prompt, "root\n")
+        self.console_wait_send("Password:",
+                               "{}\n".format(self._config["root_pass"]))
+
+        self.set_key_perm()
+        self.console_wait_send(self.prompt, "rpm -q centos-release\n")
+        enable_adapter = "sed -i 's/ONBOOT=no/ONBOOT=yes/g'" \
+                         " /etc/sysconfig/network-scripts/ifcfg-enp0s1\n"
+        self.console_wait_send(self.prompt, enable_adapter)
+        self.console_wait_send(self.prompt, "ifup enp0s1\n")
+        self.console_wait_send(self.prompt,
+                               'echo "qemu  ALL=(ALL) NOPASSWD:ALL" | '\
+                               'sudo tee /etc/sudoers.d/qemu\n')
+        self.console_wait(self.prompt)
+
+        # Rest of the commands we issue through ssh.
+        self.wait_ssh(wait_root=True)
+
+        # If the user chooses *not* to do the second phase,
+        # then we will jump right to the graceful shutdown
+        if self._config['install_cmds'] != "":
+            install_cmds = self._config['install_cmds'].split(',')
+            for cmd in install_cmds:
+                self.ssh_root(cmd)
+        self.ssh_root("poweroff")
+        self.wait_for_shutdown()
+        os.rename(img_tmp, img)
+        print("image creation complete: {}".format(img))
+        return 0
+
+if __name__ == "__main__":
+    defaults = aarch64vm.get_config_defaults(CentosAarch64VM, DEFAULT_CONFIG)
+    sys.exit(basevm.main(CentosAarch64VM, defaults))
-- 
2.17.1



^ permalink raw reply related


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.