All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: konrad@kernel.org, xen-devel@lists.xenproject.org,
	david.vrabel@citrix.com, linux-kernel@vger.kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH v4 5/5] xen/pciback: Remove tons of dereferences
Date: Fri, 11 Jul 2014 16:54:16 -0400	[thread overview]
Message-ID: <53C04EF8.8050601@oracle.com> (raw)
In-Reply-To: <1405109332-31659-6-git-send-email-konrad@kernel.org>

On 07/11/2014 04:08 PM, konrad@kernel.org wrote:
> From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> A little cleanup. No functional difference.

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
>   drivers/xen/xen-pciback/pci_stub.c |   20 +++++++++++---------
>   1 files changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
> index efcb73b..cf0b3c1 100644
> --- a/drivers/xen/xen-pciback/pci_stub.c
> +++ b/drivers/xen/xen-pciback/pci_stub.c
> @@ -630,10 +630,12 @@ static pci_ers_result_t common_process(struct pcistub_device *psdev,
>   {
>   	pci_ers_result_t res = result;
>   	struct xen_pcie_aer_op *aer_op;
> +	struct xen_pcibk_device *pdev = psdev->pdev;
> +	struct xen_pci_sharedinfo *sh_info = pdev->sh_info;
>   	int ret;
>   
>   	/*with PV AER drivers*/
> -	aer_op = &(psdev->pdev->sh_info->aer_op);
> +	aer_op = &(sh_info->aer_op);
>   	aer_op->cmd = aer_cmd ;
>   	/*useful for error_detected callback*/
>   	aer_op->err = state;
> @@ -654,36 +656,36 @@ static pci_ers_result_t common_process(struct pcistub_device *psdev,
>   	* this flag to judge whether we need to check pci-front give aer
>   	* service ack signal
>   	*/
> -	set_bit(_PCIB_op_pending, (unsigned long *)&psdev->pdev->flags);
> +	set_bit(_PCIB_op_pending, (unsigned long *)&pdev->flags);
>   
>   	/*It is possible that a pcifront conf_read_write ops request invokes
>   	* the callback which cause the spurious execution of wake_up.
>   	* Yet it is harmless and better than a spinlock here
>   	*/
>   	set_bit(_XEN_PCIB_active,
> -		(unsigned long *)&psdev->pdev->sh_info->flags);
> +		(unsigned long *)&sh_info->flags);
>   	wmb();
> -	notify_remote_via_irq(psdev->pdev->evtchn_irq);
> +	notify_remote_via_irq(pdev->evtchn_irq);
>   
>   	ret = wait_event_timeout(xen_pcibk_aer_wait_queue,
>   				 !(test_bit(_XEN_PCIB_active, (unsigned long *)
> -				 &psdev->pdev->sh_info->flags)), 300*HZ);
> +				 &sh_info->flags)), 300*HZ);
>   
>   	if (!ret) {
>   		if (test_bit(_XEN_PCIB_active,
> -			(unsigned long *)&psdev->pdev->sh_info->flags)) {
> +			(unsigned long *)&sh_info->flags)) {
>   			dev_err(&psdev->dev->dev,
>   				"pcifront aer process not responding!\n");
>   			clear_bit(_XEN_PCIB_active,
> -			  (unsigned long *)&psdev->pdev->sh_info->flags);
> +			  (unsigned long *)&sh_info->flags);
>   			aer_op->err = PCI_ERS_RESULT_NONE;
>   			return res;
>   		}
>   	}
> -	clear_bit(_PCIB_op_pending, (unsigned long *)&psdev->pdev->flags);
> +	clear_bit(_PCIB_op_pending, (unsigned long *)&pdev->flags);
>   
>   	if (test_bit(_XEN_PCIF_active,
> -		(unsigned long *)&psdev->pdev->sh_info->flags)) {
> +		(unsigned long *)&sh_info->flags)) {
>   		dev_dbg(&psdev->dev->dev,
>   			"schedule pci_conf service in " DRV_NAME "\n");
>   		xen_pcibk_test_and_schedule_op(psdev->pdev);


  parent reply	other threads:[~2014-07-11 20:52 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 20:08 [PATCH v4] PCI back fixes for 3.17 konrad
2014-07-11 20:08 ` [PATCH v4 1/5] xen-pciback: Document the various parameters and attributes in SysFS konrad
2014-07-11 20:08   ` konrad
2014-07-11 20:46   ` Boris Ostrovsky
2014-07-11 20:46   ` Boris Ostrovsky
2014-07-14 16:28     ` Konrad Rzeszutek Wilk
2014-07-14 16:28     ` Konrad Rzeszutek Wilk
2014-07-11 20:08 ` [PATCH v4 2/5] xen/pciback: Don't deadlock when unbinding konrad
2014-07-11 20:48   ` Boris Ostrovsky
2014-07-11 20:48   ` Boris Ostrovsky
2014-07-11 21:02     ` Konrad Rzeszutek Wilk
2014-07-11 21:02     ` Konrad Rzeszutek Wilk
2014-07-14 14:13       ` Konrad Rzeszutek Wilk
2014-07-14 14:13       ` Konrad Rzeszutek Wilk
2014-07-14 14:30         ` Boris Ostrovsky
2014-07-14 14:30         ` Boris Ostrovsky
2014-07-14 15:42           ` Konrad Rzeszutek Wilk
2014-07-14 15:42           ` Konrad Rzeszutek Wilk
2014-07-11 20:08 ` konrad
2014-07-11 20:08 ` [PATCH v4 3/5] xen/pciback: Include the domain id if removing the device whilst still in use konrad
2014-07-11 20:08   ` konrad
2014-07-11 20:08 ` [PATCH v4 4/5] xen/pciback: Print out the domain owning the device konrad
2014-07-11 20:08 ` konrad
2014-07-11 20:08 ` [PATCH v4 5/5] xen/pciback: Remove tons of dereferences konrad
2014-07-11 20:08 ` konrad
2014-07-11 20:54   ` Boris Ostrovsky
2014-07-11 20:54   ` Boris Ostrovsky [this message]
2014-07-14 16:37 ` [PATCH v4] PCI back fixes for 3.17 Sander Eikelenboom
2014-07-14 16:37 ` [Xen-devel] " Sander Eikelenboom
2014-07-14 17:22   ` Konrad Rzeszutek Wilk
2014-07-14 17:22   ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-07-14 17:29     ` Sander Eikelenboom
2014-07-14 17:37       ` Konrad Rzeszutek Wilk
2014-07-14 17:43         ` Sander Eikelenboom
2014-07-14 17:45           ` Konrad Rzeszutek Wilk
2014-07-14 18:24             ` Sander Eikelenboom
2014-07-14 18:45               ` Konrad Rzeszutek Wilk
2014-07-14 18:45               ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-07-14 19:01                 ` Sander Eikelenboom
2014-07-14 19:01                 ` [Xen-devel] " Sander Eikelenboom
2014-07-14 19:50                   ` Sander Eikelenboom
2014-07-14 19:50                   ` [Xen-devel] " Sander Eikelenboom
2014-07-14 19:54                   ` Konrad Rzeszutek Wilk
2014-07-14 19:54                   ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-07-14 20:16                     ` Sander Eikelenboom
2014-07-14 20:16                     ` [Xen-devel] " Sander Eikelenboom
2014-07-14 20:18                       ` Konrad Rzeszutek Wilk
2014-07-14 20:18                       ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-07-14 20:21                         ` Sander Eikelenboom
2014-07-14 20:25                           ` Konrad Rzeszutek Wilk
2014-07-14 20:25                           ` Konrad Rzeszutek Wilk
2014-07-14 20:21                         ` Sander Eikelenboom
2014-07-14 18:24             ` Sander Eikelenboom
2014-07-14 17:45           ` Konrad Rzeszutek Wilk
2014-07-14 17:43         ` Sander Eikelenboom
2014-07-14 17:37       ` Konrad Rzeszutek Wilk
2014-07-14 17:29     ` Sander Eikelenboom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53C04EF8.8050601@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.