netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen-netfront: remove dead code
@ 2007-08-07 21:56 Jeremy Fitzhardinge
  2007-08-07 22:25 ` Jeff Garzik
  2007-08-14  5:52 ` Jeff Garzik
  0 siblings, 2 replies; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2007-08-07 21:56 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Kernel Mailing List, NetDev, Adrian Bunk, Michal Piotrowski

This patch removes some residual dead code left over from removing the
"flip" receive mode.  This patch doesn't change the generated output
at all, since gcc already realized it was dead.

This resolves the "regression" reported by Adrian.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

---
 drivers/net/xen-netfront.c |   37 ++-----------------------------------
 1 file changed, 2 insertions(+), 35 deletions(-)

===================================================================
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -209,11 +209,9 @@ static void xennet_alloc_rx_buffers(stru
 	struct page *page;
 	int i, batch_target, notify;
 	RING_IDX req_prod = np->rx.req_prod_pvt;
-	struct xen_memory_reservation reservation;
 	grant_ref_t ref;
 	unsigned long pfn;
 	void *vaddr;
-	int nr_flips;
 	struct xen_netif_rx_request *req;
 
 	if (unlikely(!netif_carrier_ok(dev)))
@@ -263,7 +261,7 @@ no_skb:
 		np->rx_target = np->rx_max_target;
 
  refill:
-	for (nr_flips = i = 0; ; i++) {
+	for (i = 0; ; i++) {
 		skb = __skb_dequeue(&np->rx_batch);
 		if (skb == NULL)
 			break;
@@ -292,38 +290,7 @@ no_skb:
 		req->gref = ref;
 	}
 
-	if (nr_flips != 0) {
-		reservation.extent_start = np->rx_pfn_array;
-		reservation.nr_extents   = nr_flips;
-		reservation.extent_order = 0;
-		reservation.address_bits = 0;
-		reservation.domid        = DOMID_SELF;
-
-		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-			/* After all PTEs have been zapped, flush the TLB. */
-			np->rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] =
-				UVMF_TLB_FLUSH|UVMF_ALL;
-
-			/* Give away a batch of pages. */
-			np->rx_mcl[i].op = __HYPERVISOR_memory_op;
-			np->rx_mcl[i].args[0] = XENMEM_decrease_reservation;
-			np->rx_mcl[i].args[1] = (unsigned long)&reservation;
-
-			/* Zap PTEs and give away pages in one big
-			 * multicall. */
-			(void)HYPERVISOR_multicall(np->rx_mcl, i+1);
-
-			/* Check return status of HYPERVISOR_memory_op(). */
-			if (unlikely(np->rx_mcl[i].result != i))
-				panic("Unable to reduce memory reservation\n");
-		} else {
-			if (HYPERVISOR_memory_op(XENMEM_decrease_reservation,
-						 &reservation) != i)
-				panic("Unable to reduce memory reservation\n");
-		}
-	} else {
-		wmb();		/* barrier so backend seens requests */
-	}
+	wmb();		/* barrier so backend seens requests */
 
 	/* Above is a suitable barrier to ensure backend will see requests. */
 	np->rx.req_prod_pvt = req_prod + i;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen-netfront: remove dead code
  2007-08-07 21:56 [PATCH] xen-netfront: remove dead code Jeremy Fitzhardinge
@ 2007-08-07 22:25 ` Jeff Garzik
  2007-08-07 22:37   ` Jeremy Fitzhardinge
  2007-08-14  5:52 ` Jeff Garzik
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2007-08-07 22:25 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Linus Torvalds, Linux Kernel Mailing List, NetDev, Adrian Bunk,
	Michal Piotrowski

Jeremy Fitzhardinge wrote:
> This patch removes some residual dead code left over from removing the
> "flip" receive mode.  This patch doesn't change the generated output
> at all, since gcc already realized it was dead.
> 
> This resolves the "regression" reported by Adrian.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
> Cc: Adrian Bunk <bunk@stusta.de>
> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
> 
> ---
>  drivers/net/xen-netfront.c |   37 ++-----------------------------------
>  1 file changed, 2 insertions(+), 35 deletions(-)

Please send drivers/net/* through me and netdev...

	Jeff



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen-netfront: remove dead code
  2007-08-07 22:25 ` Jeff Garzik
@ 2007-08-07 22:37   ` Jeremy Fitzhardinge
  2007-08-08  0:46     ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2007-08-07 22:37 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Linus Torvalds, Linux Kernel Mailing List, NetDev, Adrian Bunk,
	Michal Piotrowski

Jeff Garzik wrote:
> Please send drivers/net/* through me and netdev... 

Sure.  Did you pick this patch up?

Thanks,
    J

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen-netfront: remove dead code
  2007-08-08  0:46     ` Jeff Garzik
@ 2007-08-08  0:45       ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2007-08-08  0:45 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Linus Torvalds, Linux Kernel Mailing List, NetDev, Adrian Bunk,
	Michal Piotrowski

Jeff Garzik wrote:
> Yes.  It's in my pending-for-2.6.24 folder, since it's not a bug fix.

Great, thanks.

    J

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen-netfront: remove dead code
  2007-08-07 22:37   ` Jeremy Fitzhardinge
@ 2007-08-08  0:46     ` Jeff Garzik
  2007-08-08  0:45       ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2007-08-08  0:46 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Linus Torvalds, Linux Kernel Mailing List, NetDev, Adrian Bunk,
	Michal Piotrowski

Jeremy Fitzhardinge wrote:
> Jeff Garzik wrote:
>> Please send drivers/net/* through me and netdev... 
> 
> Sure.  Did you pick this patch up?

Yes.  It's in my pending-for-2.6.24 folder, since it's not a bug fix.

	Jeff




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen-netfront: remove dead code
  2007-08-07 21:56 [PATCH] xen-netfront: remove dead code Jeremy Fitzhardinge
  2007-08-07 22:25 ` Jeff Garzik
@ 2007-08-14  5:52 ` Jeff Garzik
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2007-08-14  5:52 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Linus Torvalds, Linux Kernel Mailing List, NetDev, Adrian Bunk,
	Michal Piotrowski

Jeremy Fitzhardinge wrote:
> This patch removes some residual dead code left over from removing the
> "flip" receive mode.  This patch doesn't change the generated output
> at all, since gcc already realized it was dead.
> 
> This resolves the "regression" reported by Adrian.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
> Cc: Adrian Bunk <bunk@stusta.de>
> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>

applied



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-08-14  5:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 21:56 [PATCH] xen-netfront: remove dead code Jeremy Fitzhardinge
2007-08-07 22:25 ` Jeff Garzik
2007-08-07 22:37   ` Jeremy Fitzhardinge
2007-08-08  0:46     ` Jeff Garzik
2007-08-08  0:45       ` Jeremy Fitzhardinge
2007-08-14  5:52 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).