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]
Date:	Thu, 06 Jun 2013 12:59:28 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	liguang <lig.fnst@...fujitsu.com>
Cc:	Len Brown <lenb@...nel.org>,
	Matthew Garrett <matthew.garrett@...ula.com>,
	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
	platform-driver-x86@...r.kernel.org,
	Andreas Färber <afaerber@...e.de>,
	Igor Mammedov <imammedo@...hat.com>
Subject: Re: [PATCH RFC v2 2/3] ec: add ec space notifier

On Thursday, June 06, 2013 09:40:34 AM liguang wrote:
> add a notifier for anyone who are instresting in
> ec space changing.
> 
> Signed-off-by: liguang <lig.fnst@...fujitsu.com>

I'm not going to apply this anyway, but can you please explain what's the
problem you're trying to solve here?

Rafael


> ---
>  drivers/acpi/ec.c    |   32 ++++++++++++++++++++++++++++++++
>  include/linux/acpi.h |    2 ++
>  2 files changed, 34 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index edc0081..dee3417 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -124,6 +124,35 @@ static int EC_FLAGS_MSI; /* Out-of-spec MSI controller */
>  static int EC_FLAGS_VALIDATE_ECDT; /* ASUStec ECDTs need to be validated */
>  static int EC_FLAGS_SKIP_DSDT_SCAN; /* Not all BIOS survive early DSDT scan */
>  
> +/* notifier chain for who are intresting in ec space changing */
> +static RAW_NOTIFIER_HEAD(ec_space_chain);
> +
> +int __ref register_ec_space_notifier(struct notifier_block *nb)
> +{
> +        int ret;
> +
> +        ret = raw_notifier_chain_register(&ec_space_chain, nb);
> +
> +        return ret;
> +}
> +EXPORT_SYMBOL(register_ec_space_notifier);
> +
> +void __ref unregister_ec_space_notifier(struct notifier_block *nb)
> +{
> +
> +        raw_notifier_chain_unregister(&ec_space_chain, nb);
> +}
> +EXPORT_SYMBOL(unregister_ec_space_notifier);
> +
> +static int ec_space_notify(void *data)
> +{
> +    int ret;
> +
> +    ret = __raw_notifier_call_chain(&ec_space_chain, 0, data, -1, NULL);
> +
> +     return notifier_to_errno(ret);
> +}
> +
>  /* --------------------------------------------------------------------------
>                               Transaction Management
>     -------------------------------------------------------------------------- */
> @@ -638,6 +667,9 @@ static u32 acpi_ec_gpe_handler(acpi_handle gpe_device,
>  		wake_up(&ec->wait);
>  		ec_check_sci(ec, acpi_ec_read_status(ec));
>  	}
> +
> +	ec_space_notify(data);
> +
>  	return ACPI_INTERRUPT_HANDLED | ACPI_REENABLE_GPE;
>  }
>  
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 17b5b59..4fe2247 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -158,6 +158,8 @@ extern int ec_transaction(u8 command,
>                            const u8 *wdata, unsigned wdata_len,
>                            u8 *rdata, unsigned rdata_len);
>  extern acpi_handle ec_get_handle(void);
> +extern int register_ec_space_notifier(struct notifier_block *nb);
> +extern void unregister_ec_space_notifier(struct notifier_block *nb);
>  
>  #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ