lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a66rhkri.fsf@baylibre.com>
Date:   Thu, 22 Sep 2022 10:32:33 +0200
From:   Mattijs Korpershoek <mkorpershoek@...libre.com>
To:     Huacai Chen <chenhuacai@...ngson.cn>,
        Arnd Bergmann <arnd@...db.de>,
        Huacai Chen <chenhuacai@...nel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     loongarch@...ts.linux.dev, linux-arch@...r.kernel.org,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Guo Ren <guoren@...nel.org>, Xuerui Wang <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        Huacai Chen <chenhuacai@...ngson.cn>
Subject: Re: [PATCH 2/2] Input: i8042: Add LoongArch support in
 i8042-acpipnpio.h

On Sat, Sep 17, 2022 at 14:40, Huacai Chen <chenhuacai@...ngson.cn> wrote:

> LoongArch uses ACPI and nearly the same as X86/IA64 for 8042. So modify
> i8042-acpipnpio.h slightly and enable it for LoongArch in i8042.h. Then
> i8042 driver can work well under the ACPI firmware with PNP typed key-
> board and mouse configured in DSDT.
>
> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>

I would have split the pr_info() move in its own patch since it seems
like a "valid fix" on its own, but i'm probably too pedantic about this.

So, please take my:

Reviewed-by: Mattijs Korpershoek <mkorpershoek@...libre.com>

> ---
>  drivers/input/serio/i8042-acpipnpio.h | 8 ++++++--
>  drivers/input/serio/i8042.h           | 2 +-
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h
> index d14b9fb59d6c..c22151f180bb 100644
> --- a/drivers/input/serio/i8042-acpipnpio.h
> +++ b/drivers/input/serio/i8042-acpipnpio.h
> @@ -2,6 +2,7 @@
>  #ifndef _I8042_ACPIPNPIO_H
>  #define _I8042_ACPIPNPIO_H
>  
> +#include <linux/acpi.h>
>  
>  #ifdef CONFIG_X86
>  #include <asm/x86_init.h>
> @@ -1449,16 +1450,19 @@ static int __init i8042_pnp_init(void)
>  
>  	if (!i8042_pnp_kbd_devices && !i8042_pnp_aux_devices) {
>  		i8042_pnp_exit();
> +		pr_info("PNP: No PS/2 controller found.\n");
>  #if defined(__ia64__)
>  		return -ENODEV;
> +#elif defined(__loongarch__)
> +		if (acpi_disabled == 0)
> +			return -ENODEV;
>  #else
> -		pr_info("PNP: No PS/2 controller found.\n");
>  		if (x86_platform.legacy.i8042 !=
>  				X86_LEGACY_I8042_EXPECTED_PRESENT)
>  			return -ENODEV;
> +#endif
>  		pr_info("Probing ports directly.\n");
>  		return 0;
> -#endif
>  	}
>  
>  	if (i8042_pnp_kbd_devices)
> diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
> index bf2592fa9a78..adb5173372d3 100644
> --- a/drivers/input/serio/i8042.h
> +++ b/drivers/input/serio/i8042.h
> @@ -19,7 +19,7 @@
>  #include "i8042-snirm.h"
>  #elif defined(CONFIG_SPARC)
>  #include "i8042-sparcio.h"
> -#elif defined(CONFIG_X86) || defined(CONFIG_IA64)
> +#elif defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_LOONGARCH)
>  #include "i8042-acpipnpio.h"
>  #else
>  #include "i8042-io.h"
> -- 
> 2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ