All of lore.kernel.org
 help / color / mirror / Atom feed
* hvm_init_ap_contexts
@ 2007-03-01 16:42 PUCCETTI Armand
  2007-03-01 16:49 ` hvm_init_ap_contexts Petersson, Mats
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: PUCCETTI Armand @ 2007-03-01 16:42 UTC (permalink / raw)
  To: xen-devel

Why is there an argument returned in the function below (of hvm.h), 
knowing that there is void?

static inline void
hvm_init_ap_context(struct vcpu_guest_context *ctxt,
                   int vcpuid, int trampoline_vector)
{
   return hvm_funcs.init_ap_context(ctxt, vcpuid, trampoline_vector);
}

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

* RE: hvm_init_ap_contexts
  2007-03-01 16:42 hvm_init_ap_contexts PUCCETTI Armand
@ 2007-03-01 16:49 ` Petersson, Mats
  2007-03-01 16:59 ` hvm_init_ap_contexts Keir Fraser
  2007-03-12  6:56 ` question about the poll_timer tgh
  2 siblings, 0 replies; 8+ messages in thread
From: Petersson, Mats @ 2007-03-01 16:49 UTC (permalink / raw)
  To: PUCCETTI Armand, xen-devel

 

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com 
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 
> PUCCETTI Armand
> Sent: 01 March 2007 16:43
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] hvm_init_ap_contexts
> 
> Why is there an argument returned in the function below (of hvm.h), 
> knowing that there is void?
> 
> static inline void
> hvm_init_ap_context(struct vcpu_guest_context *ctxt,
>                    int vcpuid, int trampoline_vector)
> {
>    return hvm_funcs.init_ap_context(ctxt, vcpuid, trampoline_vector);
> }

Seems broken (or rather "unnecessar and confusing" to me - fancy
submitting a fix?

>From what I can tell, this has been "broken" for quite some time, and as
of about 2000 changesets, the return-type of that function hasn't
changed. 

--
Mats
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 
> 
> 

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

* Re: hvm_init_ap_contexts
  2007-03-01 16:42 hvm_init_ap_contexts PUCCETTI Armand
  2007-03-01 16:49 ` hvm_init_ap_contexts Petersson, Mats
@ 2007-03-01 16:59 ` Keir Fraser
  2007-03-01 17:25   ` hvm_init_ap_contexts Petersson, Mats
  2007-03-12  6:56 ` question about the poll_timer tgh
  2 siblings, 1 reply; 8+ messages in thread
From: Keir Fraser @ 2007-03-01 16:59 UTC (permalink / raw)
  To: PUCCETTI Armand, xen-devel

The return keyword is pointless here, but allowed.

 -- Keir

On 1/3/07 16:42, "PUCCETTI Armand" <armand.puccetti@cea.fr> wrote:

> Why is there an argument returned in the function below (of hvm.h),
> knowing that there is void?
> 
> static inline void
> hvm_init_ap_context(struct vcpu_guest_context *ctxt,
>                    int vcpuid, int trampoline_vector)
> {
>    return hvm_funcs.init_ap_context(ctxt, vcpuid, trampoline_vector);
> }

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

* RE: hvm_init_ap_contexts
  2007-03-01 16:59 ` hvm_init_ap_contexts Keir Fraser
@ 2007-03-01 17:25   ` Petersson, Mats
  0 siblings, 0 replies; 8+ messages in thread
From: Petersson, Mats @ 2007-03-01 17:25 UTC (permalink / raw)
  To: Keir Fraser, PUCCETTI Armand, xen-devel

 

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com 
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 
> Keir Fraser
> Sent: 01 March 2007 17:00
> To: PUCCETTI Armand; xen-devel@lists.xensource.com
> Subject: Re: [Xen-devel] hvm_init_ap_contexts
> 
> The return keyword is pointless here, but allowed.

Agreed - but removing the return keyword would make sure that someone
looking at the code doesn't try to figure out what is being returned by
the original function - and since there's nothing being returned, not
using a return keyword makes the code "clearer". 

My personal opinion, of course. 

--
Mats
> 
>  -- Keir
> 
> On 1/3/07 16:42, "PUCCETTI Armand" <armand.puccetti@cea.fr> wrote:
> 
> > Why is there an argument returned in the function below (of hvm.h),
> > knowing that there is void?
> > 
> > static inline void
> > hvm_init_ap_context(struct vcpu_guest_context *ctxt,
> >                    int vcpuid, int trampoline_vector)
> > {
> >    return hvm_funcs.init_ap_context(ctxt, vcpuid, 
> trampoline_vector);
> > }
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 
> 
> 

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

* question about the poll_timer
  2007-03-01 16:42 hvm_init_ap_contexts PUCCETTI Armand
  2007-03-01 16:49 ` hvm_init_ap_contexts Petersson, Mats
  2007-03-01 16:59 ` hvm_init_ap_contexts Keir Fraser
@ 2007-03-12  6:56 ` tgh
  2007-03-12  7:08   ` Atsushi SAKAI
  2 siblings, 1 reply; 8+ messages in thread
From: tgh @ 2007-03-12  6:56 UTC (permalink / raw)
  To: xen-devel

hi
 I try to understand the scheduler part code of xen,and I am confused 
about the poll_timer
could you help me by telling me about the meaning and function of poll_timer


struct vcpu {
 ....
struct timer     poll_timer;    /* timeout for SCHEDOP_poll */
....
}

Thanks in advance

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

* Re: question about the poll_timer
  2007-03-12  6:56 ` question about the poll_timer tgh
@ 2007-03-12  7:08   ` Atsushi SAKAI
  2007-03-12  7:29     ` tgh
  0 siblings, 1 reply; 8+ messages in thread
From: Atsushi SAKAI @ 2007-03-12  7:08 UTC (permalink / raw)
  To: tgh; +Cc: xen-devel

Hi,

Have you ever seen the do_pci_op() of
linux-2.6-sparse/drivers/xen/pcifront/pci_op.c?

Thanks
Atsushi SAKAI


tgh <tianguanhua@ncic.ac.cn> wrote:

> hi
>  I try to understand the scheduler part code of xen,and I am confused 
> about the poll_timer
> could you help me by telling me about the meaning and function of poll_timer
> 
> 
> struct vcpu {
>  ....
> struct timer     poll_timer;    /* timeout for SCHEDOP_poll */
> ....
> }
> 
> Thanks in advance
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: question about the poll_timer
  2007-03-12  7:08   ` Atsushi SAKAI
@ 2007-03-12  7:29     ` tgh
  2007-03-13 17:00       ` Mark Williamson
  0 siblings, 1 reply; 8+ messages in thread
From: tgh @ 2007-03-12  7:29 UTC (permalink / raw)
  To: Atsushi SAKAI; +Cc: xen-devel

Thank you for your reply
I read to the function do_pci_op() you told me,but I am not familiar 
with the pci facility
I guess the poll_timer gives a interval for pci probing before time out 
or something
could you tell me more about pci and poll_timer

Thank you in advance




Atsushi SAKAI 写道:
> Hi,
>
> Have you ever seen the do_pci_op() of
> linux-2.6-sparse/drivers/xen/pcifront/pci_op.c?
>
> Thanks
> Atsushi SAKAI
>
>
> tgh <tianguanhua@ncic.ac.cn> wrote:
>
>   
>> hi
>>  I try to understand the scheduler part code of xen,and I am confused 
>> about the poll_timer
>> could you help me by telling me about the meaning and function of poll_timer
>>
>>
>> struct vcpu {
>>  ....
>> struct timer     poll_timer;    /* timeout for SCHEDOP_poll */
>> ....
>> }
>>
>> Thanks in advance
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>     
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
>   

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

* Re: question about the poll_timer
  2007-03-12  7:29     ` tgh
@ 2007-03-13 17:00       ` Mark Williamson
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Williamson @ 2007-03-13 17:00 UTC (permalink / raw)
  To: xen-devel; +Cc: Atsushi SAKAI, tgh

> Thank you for your reply
> I read to the function do_pci_op() you told me,but I am not familiar
> with the pci facility
> I guess the poll_timer gives a interval for pci probing before time out
> or something
> could you tell me more about pci and poll_timer
>
> Thank you in advance
>
> Atsushi SAKAI 写道:

ISTR that the poll_timer is used to "Don't schedule me until an event comes 
in, or if the event hasn't arrived within this timeout"

It's a bit like the poll() system call in this respect.

HTH,
Cheers,
Mark

> >
> > Have you ever seen the do_pci_op() of
> > linux-2.6-sparse/drivers/xen/pcifront/pci_op.c?
> >
> > Thanks
> > Atsushi SAKAI
> >
> > tgh <tianguanhua@ncic.ac.cn> wrote:
> >> hi
> >>  I try to understand the scheduler part code of xen,and I am confused
> >> about the poll_timer
> >> could you help me by telling me about the meaning and function of
> >> poll_timer
> >>
> >>
> >> struct vcpu {
> >>  ....
> >> struct timer     poll_timer;    /* timeout for SCHEDOP_poll */
> >> ....
> >> }
> >>
> >> Thanks in advance
> >>
> >> _______________________________________________
> >> Xen-devel mailing list
> >> Xen-devel@lists.xensource.com
> >> http://lists.xensource.com/xen-devel
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

end of thread, other threads:[~2007-03-13 17:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 16:42 hvm_init_ap_contexts PUCCETTI Armand
2007-03-01 16:49 ` hvm_init_ap_contexts Petersson, Mats
2007-03-01 16:59 ` hvm_init_ap_contexts Keir Fraser
2007-03-01 17:25   ` hvm_init_ap_contexts Petersson, Mats
2007-03-12  6:56 ` question about the poll_timer tgh
2007-03-12  7:08   ` Atsushi SAKAI
2007-03-12  7:29     ` tgh
2007-03-13 17:00       ` Mark Williamson

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.