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: <20200108172825.GV32742@smile.fi.intel.com>
Date:   Wed, 8 Jan 2020 19:28:25 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Darren Hart <dvhart@...radead.org>,
        Lee Jones <lee.jones@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Zha Qipeng <qipeng.zha@...el.com>,
        Rajneesh Bhardwaj <rajneesh.bhardwaj@...ux.intel.com>,
        "David E . Box" <david.e.box@...ux.intel.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 24/36] platform/x86: intel_scu_ipc: Add function to
 remove SCU IPC

On Wed, Jan 08, 2020 at 02:41:49PM +0300, Mika Westerberg wrote:
> Drivers such as intel_pmc_ipc.c can be unloaded as well so in order to
> support those in this driver add a new function that can be called to
> remove the SCU IPC if the driver is unloaded.
> 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
>  arch/x86/include/asm/intel_scu_ipc.h |  1 +
>  drivers/platform/x86/intel_scu_ipc.c | 18 ++++++++++++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/arch/x86/include/asm/intel_scu_ipc.h b/arch/x86/include/asm/intel_scu_ipc.h
> index 9895b60386c5..250127eb1e38 100644
> --- a/arch/x86/include/asm/intel_scu_ipc.h
> +++ b/arch/x86/include/asm/intel_scu_ipc.h
> @@ -32,6 +32,7 @@ struct intel_scu_ipc_pdata {
>  
>  struct intel_scu_ipc_dev *
>  intel_scu_ipc_probe(struct device *dev, const struct intel_scu_ipc_pdata *pdata);
> +void intel_scu_ipc_remove(struct intel_scu_ipc_dev *scu);
>  
>  struct intel_scu_ipc_dev *intel_scu_ipc_dev_get(void);
>  void intel_scu_ipc_dev_put(struct intel_scu_ipc_dev *scu);
> diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
> index cc29f504adcf..9fa0ea95198b 100644
> --- a/drivers/platform/x86/intel_scu_ipc.c
> +++ b/drivers/platform/x86/intel_scu_ipc.c
> @@ -566,3 +566,21 @@ intel_scu_ipc_probe(struct device *dev, const struct intel_scu_ipc_pdata *pdata)
>  	return scu;
>  }
>  EXPORT_SYMBOL_GPL(intel_scu_ipc_probe);
> +
> +/**
> + * intel_scu_ipc_remove() - Remove SCU IPC
> + * @scu: SCU IPC handle
> + *
> + * This unregisters the SCU IPC device and releases the interrupt.
> + */
> +void intel_scu_ipc_remove(struct intel_scu_ipc_dev *scu)
> +{
> +	mutex_lock(&ipclock);
> +	if (!WARN_ON(!scu->dev)) {
> +		if (scu->irq > 0)
> +			devm_free_irq(scu->dev, scu->irq, scu);
> +		scu->dev = NULL;
> +	}
> +	mutex_unlock(&ipclock);
> +}
> +EXPORT_SYMBOL_GPL(intel_scu_ipc_remove);
> -- 
> 2.24.1
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ