Re: [PATCH 00/17] ia64/pv_ops take 6

2008-05-28 Thread Isaku Yamahata
On Tue, May 27, 2008 at 04:26:45PM -0700, Luck, Tony wrote:

> I had to spend time on a bugfix.  The bugfix is posted
> in my 'release' branch. The pv_ops series (including the
> documentation) is now in the 'test' branch.  Take a close
> look at arch/is64/kernel/minstate.h as I had to re-merge
> your changes because of collisions with the bugfix.

Thank you for commiting them.
I checked the RSE work around patch of
4dcc29e1574d88f4465ba865ed82800032f76418.
It bloated SAVE_MIN_WITH_COVER and SAVE_MIN_WITH_COVER_R19
so that on paravirtualized case not only dispatch_illegal_op_fault
but also other functions which those macros need to be moved.
Since the effort to reduce code size had already been made, so 
it is difficult to go further. By moving all of them, it would
be consistent and we don't have to worry about code size anymore.

>From 8a280936ca40bf824250f22c77228412b17ef74a Mon Sep 17 00:00:00 2001
From: Isaku Yamahata <[EMAIL PROTECTED]>
Date: Wed, 28 May 2008 16:28:41 +0900
Subject: ia64/pv_ops: preparation: move some functions in ivt.S to avoid lack 
of space.

move interrupt, page_fault, non_syscall, dispatch_unaligned_handler and
dispatch_to_fault_handler to avoid lack of instructin space.
The change set 4dcc29e1574d88f4465ba865ed82800032f76418 bloated
SAVE_MIN_WITH_COVER, SAVE_MIN_WITH_COVER_R19 so that it bloated the
functions which uses those macros.
In the native case, only dispatch_illegal_op_fault had to be moved.
When paravirtualized case the all functions which use the macros need
to be moved to avoid the lack of space.

Signed-off-by: Isaku Yamahata <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/ivt.S |  261 ---
 1 files changed, 133 insertions(+), 128 deletions(-)

diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index 23749ed..c39627d 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -515,27 +515,6 @@ ENTRY(ikey_miss)
FAULT(6)
 END(ikey_miss)
 
-   
//---
-   // call do_page_fault (predicates are in r31, psr.dt may be off, r16 is 
faulting address)
-ENTRY(page_fault)
-   SSM_PSR_DT_AND_SRLZ_I
-   ;;
-   SAVE_MIN_WITH_COVER
-   alloc r15=ar.pfs,0,0,3,0
-   MOV_FROM_IFA(out0)
-   MOV_FROM_ISR(out1)
-   SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r14, r3)
-   adds r3=8,r2// set up second base pointer
-   SSM_PSR_I(p15, p15, r14)// restore psr.i
-   movl r14=ia64_leave_kernel
-   ;;
-   SAVE_REST
-   mov rp=r14
-   ;;
-   adds out2=16,r12// out2 = pointer to pt_regs
-   br.call.sptk.many b6=ia64_do_page_fault // ignore return address
-END(page_fault)
-
.org ia64_ivt+0x1c00
 
/
 // 0x1c00 Entry 7 (size 64 bundles) Data Key Miss (12,51)
@@ -896,26 +875,8 @@ END(break_fault)
 
/
 // 0x3000 Entry 12 (size 64 bundles) External Interrupt (4)
 ENTRY(interrupt)
-   DBG_FAULT(12)
-   mov r31=pr  // prepare to save predicates
-   ;;
-   SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3
-   SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r14)
-   // ensure everybody knows psr.ic is back on
-   adds r3=8,r2// set up second base pointer for SAVE_REST
-   ;;
-   SAVE_REST
-   ;;
-   MCA_RECOVER_RANGE(interrupt)
-   alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
-   MOV_FROM_IVR(out0, r8)  // pass cr.ivr as first arg
-   add out1=16,sp  // pass pointer to pt_regs as second arg
-   ;;
-   srlz.d  // make sure we see the effect of cr.ivr
-   movl r14=ia64_leave_kernel
-   ;;
-   mov rp=r14
-   br.call.sptk.many b6=ia64_handle_irq
+   /* interrupt handler has become too big to fit this area. */
+   br.sptk.many __interrupt
 END(interrupt)
 
.org ia64_ivt+0x3400
@@ -1125,105 +1086,18 @@ END(account_sys_enter)
DBG_FAULT(17)
FAULT(17)
 
-ENTRY(non_syscall)
-   mov ar.rsc=r27  // restore ar.rsc before 
SAVE_MIN_WITH_COVER
-   ;;
-   SAVE_MIN_WITH_COVER
-
-   // There is no particular reason for this code to be here, other than 
that
-   // there happens to be space here that would go unused otherwise.  If 
this
-   // fault ever gets "unreserved", simply moved the following code to a 
more
-   // suitable spot...
-
-   alloc r14=ar.pfs,0,0,2,0
-   MOV_FROM_IIM(out0)
-   add out1=16,sp
-   adds r3=8,r2// set up second base pointer for 
SAVE_REST
-
-   SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r15, r24)
-   // guarantee that interruption 
c

RE: [PATCH 00/17] ia64/pv_ops take 6

2008-05-28 Thread Luck, Tony
> Since the effort to reduce code size had already been made, so 
> it is difficult to go further. By moving all of them, it would
> be consistent and we don't have to worry about code size anymore.

I've been caught by these a number of times while adding debug/monitor
hooks to ivt.S code.  Moving all of these squatters out is a good idea.

Thank you. Applied.

-Tony
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


linux-next 20080528: XEN build error when no Power Mgt enabled

2008-05-28 Thread Randy Dunlap

linux-next-20080528/drivers/xen/manage.c: In function 'xen_suspend':
linux-next-20080528/drivers/xen/manage.c:43: error: implicit declaration of 
function 'device_power_down'
linux-next-20080528/drivers/xen/manage.c:65: error: implicit declaration of 
function 'device_power_up'
linux-next-20080528/drivers/xen/manage.c: In function 'do_suspend':
linux-next-20080528/drivers/xen/manage.c:114: error: implicit declaration of 
function 'device_resume'
make[3]: *** [drivers/xen/manage.o] Error 1

---
~Randy
"He closes his eyes and drops the goggles.  You can't get hurt
by looking at a bitmap.  Or can you?"


config-xen-nopm
Description: Binary data
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Re: linux-next 20080528: XEN build error when no Power Mgt enabled

2008-05-28 Thread Jeremy Fitzhardinge
Randy Dunlap wrote:
> linux-next-20080528/drivers/xen/manage.c: In function 'xen_suspend':
> linux-next-20080528/drivers/xen/manage.c:43: error: implicit declaration of 
> function 'device_power_down'
> linux-next-20080528/drivers/xen/manage.c:65: error: implicit declaration of 
> function 'device_power_up'
> linux-next-20080528/drivers/xen/manage.c: In function 'do_suspend':
> linux-next-20080528/drivers/xen/manage.c:114: error: implicit declaration of 
> function 'device_resume'
> make[3]: *** [drivers/xen/manage.o] Error 1
>   

Thanks for the reminder.  That was on my TODO list.

J
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


Re: [PATCH 2/3] virtio_net: Trivial coding style fix

2008-05-28 Thread Rusty Russell
On Tuesday 27 May 2008 21:20:46 Mark McLoughlin wrote:
> - if (!skb_partial_csum_set(skb,hdr->csum_start,hdr->csum_offset))
> + if (!skb_partial_csum_set(skb, hdr->csum_start, 
> hdr->csum_offset))

I compressed the whitespace to avoid going over 80 cols.  A choice of lesser 
evils :)

Cheers,
Rusty.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


Re: [PATCH 3/3] virtio_net: Fix skb->csum_start computation

2008-05-28 Thread Herbert Xu
On Tue, May 27, 2008 at 12:20:47PM +0100, Mark McLoughlin wrote:
> hdr->csum_start is the offset from the start of the ethernet
> header to the transport layer checksum field. skb->csum_start
> is the offset from skb->head.
> 
> skb_partial_csum_set() assumes that skb->data points to the
> ethernet header - i.e. it computes skb->csum_start by adding
> the headroom to hdr->csum_start.
> 
> Since eth_type_trans() skb_pull()s the ethernet header,
> skb_partial_csum_set() should be called before
> eth_type_trans().
> 
> Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]>

Good catch! Clearly shows I never ran this across a real Ethernet
device :)

Acked-by: Herbert Xu <[EMAIL PROTECTED]>

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization