From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 15 Feb 2003 20:13:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 15 Feb 2003 20:13:39 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.106]:31727 "EHLO e6.ny.us.ibm.com") by vger.kernel.org with ESMTP id ; Sat, 15 Feb 2003 20:13:38 -0500 Message-ID: <3E4EE7CE.1010401@us.ibm.com> Date: Sat, 15 Feb 2003 17:22:22 -0800 From: Dave Hansen User-Agent: Mozilla/5.0 (compatible; MSIE5.5; Windows 98; X-Accept-Language: en MIME-Version: 1.0 To: Linus Torvalds CC: "Martin J. Bligh" , Linux Kernel Mailing List Subject: [PATCH] fix kirq for clustered apic mode Content-Type: multipart/mixed; boundary="------------040206030804010009060504" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------040206030804010009060504 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The new kirq patch assumes flat addressing APIC mode where apicid = (1 << cpu). This isn't true for clustered mode. - Change name/type of irq_balance_mask. The type of apicid seems to be int. - Change instance of (1<lock); - irq_balance_mask[selected_irq] = target_cpu_mask; + pending_irq_balance_apicid[selected_irq] = cpu_to_logical_apicid(min_loaded); spin_unlock(&desc->lock); /* Since we made a change, come back sooner to * check for more variation. @@ -500,7 +500,7 @@ if (cpu != new_cpu) { irq_desc_t *desc = irq_desc + irq; spin_lock(&desc->lock); - irq_balance_mask[irq] = cpu_to_logical_apicid(new_cpu); + pending_irq_balance_apicid[irq] = cpu_to_logical_apicid(new_cpu); spin_unlock(&desc->lock); } } @@ -515,7 +515,7 @@ /* push everything to CPU 0 to give us a starting point. */ for (i = 0 ; i < NR_IRQS ; i++) - irq_balance_mask[i] = 1 << 0; + pending_irq_balance_apicid[i] = cpu_to_logical_apicid(0); for (;;) { set_current_state(TASK_INTERRUPTIBLE); time_remaining = schedule_timeout(time_remaining); @@ -580,9 +580,9 @@ static inline void move_irq(int irq) { /* note - we hold the desc->lock */ - if (unlikely(irq_balance_mask[irq])) { - set_ioapic_affinity(irq, irq_balance_mask[irq]); - irq_balance_mask[irq] = 0; + if (unlikely(pending_irq_balance_apicid[irq])) { + set_ioapic_affinity(irq, pending_irq_balance_apicid[irq]); + pending_irq_balance_apicid[irq] = 0; } } --------------040206030804010009060504--