From: Tim Deegan Subject: Re: [PATCH v5 2/5] x86/hpet: Use singe apic vector rather than irq_descs for HPET interrupts Date: Thu, 6 Mar 2014 15:11:27 +0100 Message-ID: <20140306141127.GG11475@deinos.phlegethon.org> References: <1394034226-14327-1-git-send-email-andrew.cooper3@citrix.com> <1394034226-14327-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1394034226-14327-3-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Frediano Ziglio , Keir Fraser , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org At 15:43 +0000 on 05 Mar (1394030623), Andrew Cooper wrote: > This involves rewriting most of the MSI related HPET code, and as a result > this patch looks very complicated. It is probably best viewed as an end > result, with the following notes explaining what is going on. > > The new logic is as follows: > * A single high priority vector is allocated and uses on all cpus. > * Reliance on the irq infrastructure is completely removed. > * Tracking of free hpet channels has changed. It is now an individual > bitmap, and allocation is based on winning a test_and_clear_bit() > operation. > * There is a notion of strict ownership of hpet channels. > ** A cpu which owns an HPET channel can program it for a desired deadline. > ** A cpu which can't find a free HPET channel will have to share. > > ** If an HPET firing at an appropriate time can be found (up to 20us late), a > CPU will simply request to be woken up with that HPET. > ** Failing finding an appropriate timed HPET, a CPU shall find the soonest > late HPET and program it earlier. > ** Failing any late HPETs, a CPU shall wake up with the latest early HPET it > can find. > ** Failing all else, a CPU shall retry to find a free HPET. This guarantees > that a CPU will never leave hpet_broadcast_enter() without arranging an > interrupt. > * Some functions have been renamed to be more descriptive. Some functions > have parameters changed to be more consistent. > > Contains a folded half bugfix from Frediano: > Signed-off-by: Frediano Ziglio > Signed-off-by: Andrew Cooper > CC: Keir Fraser > CC: Jan Beulich > CC: Tim Deegan Reviewed-by: Tim Deegan