32 messages in com.xensource.lists.xen-ia64-devel[Xen-ia64-devel] Re: [PATCH 11/15] ia...
FromSent OnAttachments
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Isaku Yamahata08 Apr 2008 21:48 
Jes Sorensen22 Apr 2008 02:07 
Jes Sorensen22 Apr 2008 02:16 
Isaku Yamahata22 Apr 2008 03:01 
Isaku Yamahata22 Apr 2008 03:10 
Jes Sorensen22 Apr 2008 03:36 
Dong, Eddie22 Apr 2008 03:41 
Isaku Yamahata22 Apr 2008 04:01 
Jes Sorensen22 Apr 2008 04:29 
Jes Sorensen22 Apr 2008 05:05 
Dong, Eddie22 Apr 2008 06:15 
Jes Sorensen22 Apr 2008 06:55 
Isaku Yamahata22 Apr 2008 19:53 
Jes Sorensen23 Apr 2008 07:03 
Isaku Yamahata24 Apr 2008 04:18 
Jes Sorensen24 Apr 2008 04:51 
Isaku Yamahata24 Apr 2008 05:21 
Subject:[Xen-ia64-devel] Re: [PATCH 11/15] ia64/pv_ops: paravirtualize NR_IRQS
From:Isaku Yamahata (yama@valinux.co.jp)
Date:04/22/2008 07:53:51 PM
List:com.xensource.lists.xen-ia64-devel

On Tue, Apr 22, 2008 at 02:05:59PM +0200, Jes Sorensen wrote:

Isaku Yamahata wrote:

I'm willing to introduce something like PARAVIRT_NR_IRQS, but I don't see how PARAVIRT_NR_IRQS solves the issues. What I want here is to define by cpp #define PARAVIRT_NR_IRQS \ max( \ IA64_NATIVE_NR_IRQS, \ XEN_NR_IRQS, /* only if CONFIG_XEN */ \ LGUSET_NR_IRQS, /* only if CONFIG_LGUSET */ \ KVM_GUEST_NR_IRQS, /* only if CONFIG_KVM_GUEST */ \ MORE_FUTURE_VM_NR_IRQS, /* only if ...*/ \ .... \ )

Probably I'm missing something. Could you suggest more concretly? Hopefully (pseudo) code snippet.

I'd rather have PARAVIRT_NR_IRQ set from Kconfig if possible given that all of these are constants anyway. If we cannot do that, then it would be better to do the #if FOO_NR_IRQ > PARAVIRT_NR_IRQ in the various header files for Xen/KVM/lguest so we don't get the clutter in the main makefile.

Unfotunately Kconfig doesn't support arithmetic comparison. So do you want something like the followings?

irq.h:

#if (NR_VECTORS + 32 * NR_CPUS) < 1024 #define IA64_NATIVE_NR_IRQS (NR_VECTORS + 32 * NR_CPUS) #else #define IA64_NATIVE_NR_IRQS 1024 #endif

#define PARAVIRT_NR_IRQS IA64_NATIVE_NR_IRQS /* CAUTION:each asm/xxx/irq.h may redefine PARAVIRT_NR_IRQS */ #include <asm/xen/irq.h> #include <asm/kvm/irq.h> #include <asm/foo/irq.h> ...

#define NR_IRQS PARAVIRT_NR_IRQS

asm/foo/irq.h:

#define FOO_NR_IRQ ...

#ifdef CONFIG_FOO #if FOO_NR_IRQS > PARAVIRT_NR_IRQS #undef PARAVIRT_NR_IRQS #define PARAVIRT_NR_IRQS FOO_NR_IRQS #endif #endif