Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753626AbYHAPvW (ORCPT ); Fri, 1 Aug 2008 11:51:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751710AbYHAPvP (ORCPT ); Fri, 1 Aug 2008 11:51:15 -0400 Received: from relay1.sgi.com ([192.48.171.29]:59196 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751658AbYHAPvP (ORCPT ); Fri, 1 Aug 2008 11:51:15 -0400 Date: Fri, 1 Aug 2008 10:51:20 -0500 From: Cliff Wickman To: "Eric W. Biederman" Cc: Alan Mayer , jeremy@goop.org, rusty@rustcorp.com.au, suresh.b.siddha@intel.com, mingo@elte.hu, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, Dean Nelson Subject: Re: [PATCH] x86_64: Dynamically allocate arch specific system vectors Message-ID: <20080801155120.GA21706@sgi.com> References: <48922D16.1080704@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2335 Lines: 61 On Thu, Jul 31, 2008 at 03:10:23PM -0700, Eric W. Biederman wrote: > Alan Mayer writes: > > > Subject: [PATCH] x86_64: Dynamically allocate arch specific system vectors > > > > From: Alan Mayer > > > > On some systems (e. g., UV) it is necessary to use an interrupt vector > > as a "system" vector, that is, it is generated by system hardware, not an > > IO device. This patch dynamically allocates them from the pool of interrupt > > vectors below the fixed system vectors. This may include stealing some from > > the device interrupt vector pool, so they are allocated dynamically so that > > other archs don't have to pay the price. In UV, examples of these hardware > > and software systems that need dynamically allocated vectors are the GRU, > > the BAU, and XPM/XPC. > > Could you please explain words why the vector allocator does not work > for you? > > This code at first glance looks a lot like duplicating the vector allocator. > > Eric I assume you mean create_irq() and destroy_irq(). They are close to what we need. However for any given system use: - we need to request a high priority vector for some irq's, rather than one randomly allocated as per __assign_irq_vector(). - we want the irq/vector to be targeted to all cpu's (as specified in a mask, and can include currently offline cpu's) rather than a single cpu. I suppose those abilities could be added to create_irq(), but we didn't want to intrude into that interface. A smaller consideration is simplicity of use. We want any such user to use the generic do_IRQ() flow (not alloc_intr_gate()). But make it easy to set up the irq/vector, irq_chip and irq_desc without getting intimate with the details. I suppose some other wrapper for an enhanced create_irq() could be done. We are going to need such irq/vector pairs for a couple of UV drivers (drivers/misc/sgi-gru/ and sgi-xp/). And would prefer it for the UV TLB shootdown (x86/kernel/tlb.uv.c) rather than using alloc_intr_gate(). -Cliff -- Cliff Wickman Silicon Graphics, Inc. cpw@sgi.com (651) 683-3824 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/