1 From: Ingo Molnar <mingo@elte.hu>
2 Subject: Re: [PATCH 3/6] x86: ifdef INTR_REMAP code out
3 Date: Mon, 14 Feb 2011 12:02:31 +0100
5 Message-ID: <20110214110231.GB7140@elte.hu>
6 References: <1297677612-12405-1-git-send-email-henne@nachtwindheim.de>
7 <1297677612-12405-3-git-send-email-henne@nachtwindheim.de>
9 Content-Type: text/plain; charset=us-ascii
10 Cc: mingo@readhat.com, tglx@linutronix.de, hpa@zytor.com,
11 x86@kernel.org, tj@kernel.org, yinghai@kernel.org,
12 ak@linux.intel.com, robert.richter@amd.com,
13 linux-kernel@vger.kernel.org
14 To: Henrik Kretzschmar <henne@nachtwindheim.de>
15 X-From: linux-kernel-owner@vger.kernel.org Mon Feb 14 12:02:52 2011
16 Return-path: <linux-kernel-owner@vger.kernel.org>
17 Envelope-to: glk-linux-kernel-3@lo.gmane.org
18 Received: from vger.kernel.org ([209.132.180.67])
19 by lo.gmane.org with esmtp (Exim 4.69)
20 (envelope-from <linux-kernel-owner@vger.kernel.org>)
22 for glk-linux-kernel-3@lo.gmane.org; Mon, 14 Feb 2011 12:02:50 +0100
23 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
24 id S1752997Ab1BNLCn (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
25 Mon, 14 Feb 2011 06:02:43 -0500
26 Received: from mx3.mail.elte.hu ([157.181.1.138]:38974 "EHLO mx3.mail.elte.hu"
27 rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
28 id S1751314Ab1BNLCl (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
29 Mon, 14 Feb 2011 06:02:41 -0500
30 Received: from elvis.elte.hu ([157.181.1.14])
31 by mx3.mail.elte.hu with esmtp (Exim)
33 from <mingo@elte.hu>; Mon, 14 Feb 2011 12:02:34 +0100
34 Received: by elvis.elte.hu (Postfix, from userid 1004)
35 id 0D9343E2369; Mon, 14 Feb 2011 12:02:32 +0100 (CET)
36 Content-Disposition: inline
37 In-Reply-To: <1297677612-12405-3-git-send-email-henne@nachtwindheim.de>
38 User-Agent: Mutt/1.5.20 (2009-08-17)
39 Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu;
40 X-ELTE-SpamScore: -2.0
43 X-ELTE-SpamVersion: ELTE 2.0
44 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5
45 -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1%
47 Sender: linux-kernel-owner@vger.kernel.org
49 List-ID: <linux-kernel.vger.kernel.org>
50 X-Mailing-List: linux-kernel@vger.kernel.org
51 Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1099671>
54 * Henrik Kretzschmar <henne@nachtwindheim.de> wrote:
56 > +#ifdef CONFIG_INTR_REMAP
57 > + struct IO_APIC_route_entry **ioapic_entries = NULL;
59 > if (intr_remapping_enabled) {
60 > ioapic_entries = alloc_ioapic_entries();
61 > if (!ioapic_entries) {
62 > @@ -2133,6 +2136,7 @@ static int lapic_resume(struct sys_device *dev)
63 > mask_IO_APIC_setup(ioapic_entries);
64 > legacy_pic->mask_all();
70 > @@ -2173,6 +2177,7 @@ static int lapic_resume(struct sys_device *dev)
71 > apic_write(APIC_ESR, 0);
72 > apic_read(APIC_ESR);
74 > +#ifdef CONFIG_INTR_REMAP
75 > if (intr_remapping_enabled) {
76 > reenable_intr_remapping(x2apic_mode);
77 > legacy_pic->restore_mask();
78 > @@ -2180,6 +2185,7 @@ static int lapic_resume(struct sys_device *dev)
79 > free_ioapic_entries(ioapic_entries);
84 Hm, these bits should be factored out in a cleaner fashion - by adding helper
85 functions, etc. The x2apic code's integration into the lapic code was done in a
86 pretty ugly fashion so it's not your fault - but if we want to reintroduce UP-IOAPIC
87 we need to do it cleanly.
89 Do you still want to do it? :-)