public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: chrisw@sous-sol.org, sct@redhat.com,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, xen-ia64-devel@lists.xensource.com,
	eddie.dong@intel.com
Subject: Re: [PATCH 08/12] xen: add resend_irq_on_evtchn() definition into events.c.
Date: Fri, 28 Mar 2008 13:29:54 -0700	[thread overview]
Message-ID: <47ED5542.2060503@goop.org> (raw)
In-Reply-To: <1206704418876-git-send-email-yamahata@valinux.co.jp>

Isaku Yamahata wrote:
> Define resend_irq_on_evtchn() which ia64/xen uses.
> Although it isn't used by current x86/xen code, it's arch generic
> so that put it into common code.
> make ipi_to_irq[] visible removing static because
> ia64/xen needs to access the variable from ia64 specific code
>   

What kind of access?  Would it be better to add some accessor functions?

If nothing else, it needs to be prefixed with xen_ if it goes non-static.

(As should resend_irq_on_evtchn(), but I'm less concerned about a name 
collision.)

    J

> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> ---
>  drivers/xen/events.c |   18 +++++++++++++++++-
>  include/xen/events.h |    1 +
>  2 files changed, 18 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index 2396b44..1c2c193 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
> @@ -48,7 +48,7 @@ static DEFINE_SPINLOCK(irq_mapping_update_lock);
>  static DEFINE_PER_CPU(int, virq_to_irq[NR_VIRQS]) = {[0 ... NR_VIRQS-1] = -1};
>  
>  /* IRQ <-> IPI mapping */
> -static DEFINE_PER_CPU(int, ipi_to_irq[XEN_NR_IPIS]) = {[0 ... XEN_NR_IPIS-1] = -1};
> +DEFINE_PER_CPU(int, ipi_to_irq[XEN_NR_IPIS]) = {[0 ... XEN_NR_IPIS-1] = -1};
>  
>  /* Packed IRQ information: binding type, sub-type index, and event channel. */
>  struct packed_irq
> @@ -586,6 +586,22 @@ static void set_affinity_irq(unsigned irq, cpumask_t dest)
>  	rebind_irq_to_cpu(irq, tcpu);
>  }
>  
> +int resend_irq_on_evtchn(unsigned int irq)
> +{
> +	int masked, evtchn = evtchn_from_irq(irq);
> +	struct shared_info *s = HYPERVISOR_shared_info;
> +
> +	if (!VALID_EVTCHN(evtchn))
> +		return 1;
> +
> +	masked = sync_test_and_set_bit(evtchn, s->evtchn_mask);
> +	sync_set_bit(evtchn, s->evtchn_pending);
> +	if (!masked)
> +		unmask_evtchn(evtchn);
> +
> +	return 1;
> +}
> +
>  static void enable_dynirq(unsigned int irq)
>  {
>  	int evtchn = evtchn_from_irq(irq);
> diff --git a/include/xen/events.h b/include/xen/events.h
> index 2bde54d..574cfa4 100644
> --- a/include/xen/events.h
> +++ b/include/xen/events.h
> @@ -37,6 +37,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi,
>  void unbind_from_irqhandler(unsigned int irq, void *dev_id);
>  
>  void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector);
> +int resend_irq_on_evtchn(unsigned int irq);
>  
>  static inline void notify_remote_via_evtchn(int port)
>  {
>   


  reply	other threads:[~2008-03-28 20:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 11:40 [PATCH 00/12] Xen arch portability patches (take 4) Isaku Yamahata
2008-03-28 11:40 ` [PATCH 01/12] xen: add missing __HYPERVISOR_arch_[0-7] definisions which ia64 needs Isaku Yamahata
2008-03-28 11:40 ` [PATCH 02/12] xen: add missing VIRQ_ARCH_[0-7] definitions which ia64/xen needs Isaku Yamahata
2008-03-28 11:40 ` [PATCH 03/12] xen: add missing definitions for xen grant table " Isaku Yamahata
2008-03-28 11:40 ` [PATCH 04/12] xen: add missing definitions in include/xen/interface/vcpu.h " Isaku Yamahata
2008-03-28 11:40 ` [PATCH 05/12] xen: move features.c from arch/x86/xen/features.c to drivers/xen Isaku Yamahata
2008-03-28 11:40 ` [PATCH 06/12] xen: Move events.c to drivers/xen for IA64/Xen support Isaku Yamahata
2008-03-28 11:40 ` [PATCH 07/12] Xen: Make events.c portable for ia64/xen support Isaku Yamahata
2008-03-28 20:27   ` Jeremy Fitzhardinge
2008-03-31  9:34     ` Isaku Yamahata
2008-03-28 11:40 ` [PATCH 08/12] xen: add resend_irq_on_evtchn() definition into events.c Isaku Yamahata
2008-03-28 20:29   ` Jeremy Fitzhardinge [this message]
2008-03-31  9:36     ` Isaku Yamahata
2008-03-28 11:40 ` [PATCH 09/12] xen: make include/xen/page.h portable moving those definitions under asm dir Isaku Yamahata
2008-03-28 20:41   ` Jeremy Fitzhardinge
2008-03-30 13:41     ` Avi Kivity
2008-03-28 11:40 ` [PATCH 10/12] xen: replace callers of alloc_vm_area()/free_vm_area() with xen_ prefixed one Isaku Yamahata
2008-03-28 20:31   ` Jeremy Fitzhardinge
2008-03-31 10:11     ` Isaku Yamahata
2008-03-28 11:40 ` [PATCH 11/12] xen: make grant table arch portable Isaku Yamahata
2008-03-28 11:40 ` [PATCH 12/12] xen: import arch generic part of xencomm Isaku Yamahata
2008-03-28 20:09   ` Jeremy Fitzhardinge
2008-03-31  9:49     ` Isaku Yamahata
2008-03-31 15:01       ` Jeremy Fitzhardinge

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=47ED5542.2060503@goop.org \
    --to=jeremy@goop.org \
    --cc=chrisw@sous-sol.org \
    --cc=eddie.dong@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-ia64-devel@lists.xensource.com \
    --cc=yamahata@valinux.co.jp \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox