Re: [RFC PATCH] efi_loader: disable GRUB workaround by default

2021-02-09 Thread Matthias Brugger



On 09/02/2021 13:22, Heinrich Schuchardt wrote:
> On 09.02.21 12:38, matthias@kernel.org wrote:
>> From: Matthias Brugger 
>>
>> GRUB version 2.04 was published over a year ago. We should expect that
>> distros use this version now. So disable the workaround by default.
>> As we know that i.MX6 CPUs lack proper handling of caches, enable the
>> workaround on these only.
> 
> Hello Matthias,
> 
> Where did the current setting hurt?
> 

I hit this on BananaPi R2 where the time from exiting the boot services until
the kernel gets loaded was three times bigger with the workaround. Similar
numbers, ~40 down to 12 seconds.

> Did you really check all 32bit ARM defconfig?

No I didn't, that's why I send it as RFC. If you think this is a can of worms we
would open, then I just disable the workaround for these two defconfigs.

Regards,
Matthias

> Which other devices have caches that are not controlled by CP15?
> How about all non-i.mx6 devices using CONFIG_SYS_L2_PL310?
> 
> Best regards
> 
> Heinrich
> 
>>
>> Signed-off-by: Matthias Brugger 
>>
>> ---
>>
>>  configs/imx6dl_icore_nand_defconfig  | 1 +
>>  configs/imx6dl_mamoj_defconfig   | 1 +
>>  configs/imx6q_icore_nand_defconfig   | 1 +
>>  configs/imx6q_logic_defconfig| 1 +
>>  configs/imx6qdl_icore_mipi_defconfig | 1 +
>>  configs/imx6qdl_icore_mmc_defconfig  | 1 +
>>  configs/imx6qdl_icore_nand_defconfig | 1 +
>>  configs/imx6qdl_icore_rqs_defconfig  | 1 +
>>  configs/imx6ul_geam_mmc_defconfig| 1 +
>>  configs/imx6ul_geam_nand_defconfig   | 1 +
>>  configs/imx6ul_isiot_emmc_defconfig  | 1 +
>>  configs/imx6ul_isiot_nand_defconfig  | 1 +
>>  lib/efi_loader/Kconfig   | 2 +-
>>  13 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/configs/imx6dl_icore_nand_defconfig 
>> b/configs/imx6dl_icore_nand_defconfig
>> index 06005c4288..44fbbe6bd1 100644
>> --- a/configs/imx6dl_icore_nand_defconfig
>> +++ b/configs/imx6dl_icore_nand_defconfig
>> @@ -68,3 +68,4 @@ CONFIG_SPLASH_SCREEN=y
>>  CONFIG_SPLASH_SCREEN_ALIGN=y
>>  CONFIG_VIDEO_BMP_RLE8=y
>>  CONFIG_BMP_16BPP=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
>> index fa2adaf47d..7ebbb5830b 100644
>> --- a/configs/imx6dl_mamoj_defconfig
>> +++ b/configs/imx6dl_mamoj_defconfig
>> @@ -57,3 +57,4 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
>>  CONFIG_USB_GADGET_VENDOR_NUM=0x0525
>>  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
>>  CONFIG_CI_UDC=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6q_icore_nand_defconfig 
>> b/configs/imx6q_icore_nand_defconfig
>> index f38b06dab9..cef5f3448d 100644
>> --- a/configs/imx6q_icore_nand_defconfig
>> +++ b/configs/imx6q_icore_nand_defconfig
>> @@ -69,3 +69,4 @@ CONFIG_SPLASH_SCREEN=y
>>  CONFIG_SPLASH_SCREEN_ALIGN=y
>>  CONFIG_VIDEO_BMP_RLE8=y
>>  CONFIG_BMP_16BPP=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
>> index 36dc24d080..b5a4d3d24d 100644
>> --- a/configs/imx6q_logic_defconfig
>> +++ b/configs/imx6q_logic_defconfig
>> @@ -103,3 +103,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
>>  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
>>  CONFIG_CI_UDC=y
>>  CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6qdl_icore_mipi_defconfig 
>> b/configs/imx6qdl_icore_mipi_defconfig
>> index f1b5389470..1d9e021844 100644
>> --- a/configs/imx6qdl_icore_mipi_defconfig
>> +++ b/configs/imx6qdl_icore_mipi_defconfig
>> @@ -63,3 +63,4 @@ CONFIG_PINCTRL=y
>>  CONFIG_PINCTRL_IMX6=y
>>  CONFIG_MXC_UART=y
>>  CONFIG_IMX_THERMAL=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6qdl_icore_mmc_defconfig 
>> b/configs/imx6qdl_icore_mmc_defconfig
>> index a32ae6a75d..b46d19ad88 100644
>> --- a/configs/imx6qdl_icore_mmc_defconfig
>> +++ b/configs/imx6qdl_icore_mmc_defconfig
>> @@ -86,3 +86,4 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
>>  CONFIG_VIDEO_BMP_RLE8=y
>>  CONFIG_BMP_16BPP=y
>>  CONFIG_IMX_WATCHDOG=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6qdl_icore_nand_defconfig 
>> b/configs/imx6qdl_icore_nand_defconfig
>> index f38b06dab9..cef5f3448d 100644
>> --- a/configs/imx6qdl_icore_nand_defconfig
>> +++ b/configs/imx6qdl_icore_nand_defconfig
>> @@ -69,3 +69,4 @@ CONFIG_SPLASH_SCREEN=y
>>  CONFIG_SPLASH_SCREEN_ALIGN=y
>>  CONFIG_VIDEO_BMP_RLE8=y
>>  CONFIG_BMP_16BPP=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6qdl_icore_rqs_defconfig 
>> b/configs/imx6qdl_icore_rqs_defconfig
>> index 34e3250f95..db439255a5 100644
>> --- a/configs/imx6qdl_icore_rqs_defconfig
>> +++ b/configs/imx6qdl_icore_rqs_defconfig
>> @@ -60,3 +60,4 @@ CONFIG_MII=y
>>  CONFIG_PINCTRL=y
>>  CONFIG_PINCTRL_IMX6=y
>>  CONFIG_MXC_UART=y
>> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
>> diff --git a/configs/imx6ul_geam_mmc_defconfig 
>> b/configs/imx6ul_geam_mmc_defconfig
>> index 4b47e196f3..ae83d35a53 100644
>> --- a/configs/imx6ul_geam_mmc_defconfig
>>

Re: [RFC PATCH] efi_loader: disable GRUB workaround by default

2021-02-09 Thread Heinrich Schuchardt
On 09.02.21 12:38, matthias@kernel.org wrote:
> From: Matthias Brugger 
>
> GRUB version 2.04 was published over a year ago. We should expect that
> distros use this version now. So disable the workaround by default.
> As we know that i.MX6 CPUs lack proper handling of caches, enable the
> workaround on these only.

Hello Matthias,

Where did the current setting hurt?

Did you really check all 32bit ARM defconfig?
Which other devices have caches that are not controlled by CP15?
How about all non-i.mx6 devices using CONFIG_SYS_L2_PL310?

Best regards

Heinrich

>
> Signed-off-by: Matthias Brugger 
>
> ---
>
>  configs/imx6dl_icore_nand_defconfig  | 1 +
>  configs/imx6dl_mamoj_defconfig   | 1 +
>  configs/imx6q_icore_nand_defconfig   | 1 +
>  configs/imx6q_logic_defconfig| 1 +
>  configs/imx6qdl_icore_mipi_defconfig | 1 +
>  configs/imx6qdl_icore_mmc_defconfig  | 1 +
>  configs/imx6qdl_icore_nand_defconfig | 1 +
>  configs/imx6qdl_icore_rqs_defconfig  | 1 +
>  configs/imx6ul_geam_mmc_defconfig| 1 +
>  configs/imx6ul_geam_nand_defconfig   | 1 +
>  configs/imx6ul_isiot_emmc_defconfig  | 1 +
>  configs/imx6ul_isiot_nand_defconfig  | 1 +
>  lib/efi_loader/Kconfig   | 2 +-
>  13 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/configs/imx6dl_icore_nand_defconfig 
> b/configs/imx6dl_icore_nand_defconfig
> index 06005c4288..44fbbe6bd1 100644
> --- a/configs/imx6dl_icore_nand_defconfig
> +++ b/configs/imx6dl_icore_nand_defconfig
> @@ -68,3 +68,4 @@ CONFIG_SPLASH_SCREEN=y
>  CONFIG_SPLASH_SCREEN_ALIGN=y
>  CONFIG_VIDEO_BMP_RLE8=y
>  CONFIG_BMP_16BPP=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
> index fa2adaf47d..7ebbb5830b 100644
> --- a/configs/imx6dl_mamoj_defconfig
> +++ b/configs/imx6dl_mamoj_defconfig
> @@ -57,3 +57,4 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
>  CONFIG_USB_GADGET_VENDOR_NUM=0x0525
>  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
>  CONFIG_CI_UDC=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6q_icore_nand_defconfig 
> b/configs/imx6q_icore_nand_defconfig
> index f38b06dab9..cef5f3448d 100644
> --- a/configs/imx6q_icore_nand_defconfig
> +++ b/configs/imx6q_icore_nand_defconfig
> @@ -69,3 +69,4 @@ CONFIG_SPLASH_SCREEN=y
>  CONFIG_SPLASH_SCREEN_ALIGN=y
>  CONFIG_VIDEO_BMP_RLE8=y
>  CONFIG_BMP_16BPP=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
> index 36dc24d080..b5a4d3d24d 100644
> --- a/configs/imx6q_logic_defconfig
> +++ b/configs/imx6q_logic_defconfig
> @@ -103,3 +103,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
>  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
>  CONFIG_CI_UDC=y
>  CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6qdl_icore_mipi_defconfig 
> b/configs/imx6qdl_icore_mipi_defconfig
> index f1b5389470..1d9e021844 100644
> --- a/configs/imx6qdl_icore_mipi_defconfig
> +++ b/configs/imx6qdl_icore_mipi_defconfig
> @@ -63,3 +63,4 @@ CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX6=y
>  CONFIG_MXC_UART=y
>  CONFIG_IMX_THERMAL=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6qdl_icore_mmc_defconfig 
> b/configs/imx6qdl_icore_mmc_defconfig
> index a32ae6a75d..b46d19ad88 100644
> --- a/configs/imx6qdl_icore_mmc_defconfig
> +++ b/configs/imx6qdl_icore_mmc_defconfig
> @@ -86,3 +86,4 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
>  CONFIG_VIDEO_BMP_RLE8=y
>  CONFIG_BMP_16BPP=y
>  CONFIG_IMX_WATCHDOG=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6qdl_icore_nand_defconfig 
> b/configs/imx6qdl_icore_nand_defconfig
> index f38b06dab9..cef5f3448d 100644
> --- a/configs/imx6qdl_icore_nand_defconfig
> +++ b/configs/imx6qdl_icore_nand_defconfig
> @@ -69,3 +69,4 @@ CONFIG_SPLASH_SCREEN=y
>  CONFIG_SPLASH_SCREEN_ALIGN=y
>  CONFIG_VIDEO_BMP_RLE8=y
>  CONFIG_BMP_16BPP=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6qdl_icore_rqs_defconfig 
> b/configs/imx6qdl_icore_rqs_defconfig
> index 34e3250f95..db439255a5 100644
> --- a/configs/imx6qdl_icore_rqs_defconfig
> +++ b/configs/imx6qdl_icore_rqs_defconfig
> @@ -60,3 +60,4 @@ CONFIG_MII=y
>  CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX6=y
>  CONFIG_MXC_UART=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6ul_geam_mmc_defconfig 
> b/configs/imx6ul_geam_mmc_defconfig
> index 4b47e196f3..ae83d35a53 100644
> --- a/configs/imx6ul_geam_mmc_defconfig
> +++ b/configs/imx6ul_geam_mmc_defconfig
> @@ -55,3 +55,4 @@ CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX6=y
>  CONFIG_MXC_UART=y
>  CONFIG_IMX_THERMAL=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff --git a/configs/imx6ul_geam_nand_defconfig 
> b/configs/imx6ul_geam_nand_defconfig
> index 9870612edf..8bffdab9c8 100644
> --- a/configs/imx6ul_geam_nand_defconfig
> +++ b/configs/imx6ul_geam_nand_defconfig
> @@ -60,3 +60,4 @@ CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX6=y
>  CONFIG_MXC_UART=y
>  CONFIG_IMX_THERMAL=y
> +CONFIG_EFI_GRUB_ARM32_WORKAROUND=y
> diff