From patchwork Thu Mar 12 05:36:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rientjes X-Patchwork-Id: 5990761 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2013DBF90F for ; Thu, 12 Mar 2015 05:37:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BF11203A0 for ; Thu, 12 Mar 2015 05:37:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D496F2038F for ; Thu, 12 Mar 2015 05:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751158AbbCLFg4 (ORCPT ); Thu, 12 Mar 2015 01:36:56 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:33480 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998AbbCLFgs (ORCPT ); Thu, 12 Mar 2015 01:36:48 -0400 Received: by iecvj10 with SMTP id vj10so17764869iec.0 for ; Wed, 11 Mar 2015 22:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=nwSqkkVYYJ/7No7F/XbH1OijLVenNf5Npo0RMPfdYyY=; b=hGQRdhQLXpRPUrJ3Bc1Th3oXdCA/er7dHd1kQgO2dMb+46el7E2r2Ltar6OeiSjZlJ 1ISMJ/Qhn8DyhtiXIBbH/kl+bnfwfstRowzxhepBtnz3OTRiiRKGtQY7feyxlzXjgTrV iPkWIgCB/yPzwqzTthNc8sxMGuXnI8s6O+dxnEkEGkiIJNIyebKIW3q8Iw6xBmPyxLk7 NivwJ5PYmh9jihfHtJfAvJrQUKdF/U3T2PmfGo3V23jkP/KGuk79xcH49qzB9escthsP bOf9Izmw7NWh4b3YXAj3Qrjc5l2JvL0FUiyCzl5nuVbGlmFHIkQZY0UAM2cfYppH13BR fG7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=nwSqkkVYYJ/7No7F/XbH1OijLVenNf5Npo0RMPfdYyY=; b=d5WavX5M0fAAEphOatgficyMNX5AcXq64oVJdwsL11cob0YOoo3PSUWhm0iD3W8ogb uyRbXSQQvMhVbiQj2adx35swZHOIsw1z5wI6IZshyPCp7vQNk0SLKiWL4AprfAnJ3kQS vPAuz+1NF3QVK0lKoy0ylPe9c7dzaOm0xYOYUX1P18401k/97Ox4QyV8yjWAeGOkZ3KF Ti84bfYDt9SRdTmwJoTFXthIKVZwTo5ob+EmldsNdrVahBTuqLSTH816TBg5RCmX2raa 5F0/VxKnXqemYYPW89pgRcqPQZ7iucGxlFEA+MmCuPNo9aZcZOKvAY2N8xvFSefcoKgA wGkg== X-Gm-Message-State: ALoCoQm7A9YWJbh+qV2d1dnRG8S1kthnBbUaFK8k0/GpB0MT6Phqk1mqZ3CIX3BN6fOrBcoT9VpR X-Received: by 10.107.15.155 with SMTP id 27mr52957690iop.49.1426138603724; Wed, 11 Mar 2015 22:36:43 -0700 (PDT) Received: from [2620:0:1008:1101:3de9:9542:2b2f:e4b6] ([2620:0:1008:1101:3de9:9542:2b2f:e4b6]) by mx.google.com with ESMTPSA id f77sm3850108iof.7.2015.03.11.22.36.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Mar 2015 22:36:43 -0700 (PDT) Date: Wed, 11 Mar 2015 22:36:41 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: "Luis R. Rodriguez" cc: bhelgaas@google.com, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, pure.logic@nexus-software.ie, jgross@suse.com, luto@amacapital.net, andy.shevchenko@gmail.com, thomas.petazzoni@free-electrons.com, JBeulich@suse.com, bp@suse.de, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, "Luis R. Rodriguez" , Ingo Molnar Subject: Re: [PATCH v1 1/2] x86: kconfig: remove X86_UP_IOAPIC In-Reply-To: <1426115422-1823-2-git-send-email-mcgrof@do-not-panic.com> Message-ID: References: <1426115422-1823-1-git-send-email-mcgrof@do-not-panic.com> <1426115422-1823-2-git-send-email-mcgrof@do-not-panic.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 11 Mar 2015, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > X86_UP_IOAPIC is a way so that 32-bit UP systems can enable > X86_IOAPIC. X86_UP_IOAPIC is only as a visible user option if > you are on a 32-bit system but have X86_UP_APIC enabled. X86_UP_APIC > will be enabled by force if you have PCI_MSI on 32-bit systems > now, X86_UP_APIC will now only be user selectable if you didn't > have PCI_MSI enabled and are also not on a X86_32_NON_STANDARD > system. Bryan's original patch (refactored commit log in commit > 38a1dfda) [0] describes that Intel CE, Intel MID and Intel Quark > are all 32-bit uniprocessor systems with IO-APICs, the code change > however only *re-enabled* UP_IOAPIC as an *option* when PCI_MSI > was enabled, but given that: > > 1) enabling X86_IOAPIC is the real end goal here > 2) enabling X86_IOAPIC only increases the kernel only by 12064 bytes (~12 KiB) > 3) enabling X86_IOAPIC will in no way slow down your kernel > > Let's make a compromise for 32-bit systems and always enable X86_IOAPIC > when X86_UP_IOAPIC is enabled as 32-bit systems are not in a state > of flux and the price for the size is small with no performance impact. > > Using: > > export ARCH=i386 > make allnoconfig > --> Enabling PCI_MSI > make localyesconfig > > With X86_IO_APIC: > mcgrof@ergon ~/linux-next (git::master)$ du -b arch/x86/boot/bzImage > 734608 arch/x86/boot/bzImage > > Without X86_IO_APIC: > mcgrof@ergon ~/linux-next (git::master)$ du -b arch/x86/boot/bzImage > 722544 arch/x86/boot/bzImage > 1.6% increase. > [0] https://lkml.org/lkml/2015/1/22/718 > > Cc: David Rientjes > Cc: Bjorn Helgaas > Cc: Bryan O'Donoghue > Cc: Thomas Gleixner > Cc: Andy Shevchenko > Cc: Thomas Petazzoni > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: H. Peter Anvin > Cc: Jan Beulich > Cc: Juergen Gross > Cc: linux-pci@vger.kernel.org > Cc: x86@kernel.org > Signed-off-by: Luis R. Rodriguez > --- > arch/x86/Kconfig | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 110f6ae..b17a8ea 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -899,6 +899,7 @@ config X86_UP_APIC > bool "Local APIC support on uniprocessors" if !PCI_MSI > default PCI_MSI > depends on X86_32 && !SMP && !X86_32_NON_STANDARD > + select X86_IO_APIC > ---help--- > A local APIC (Advanced Programmable Interrupt Controller) is an > integrated interrupt controller in the CPU. If you have a single-CPU > @@ -909,18 +910,6 @@ config X86_UP_APIC > performance counters), and the NMI watchdog which detects hard > lockups. > > -config X86_UP_IOAPIC > - bool "IO-APIC support on uniprocessors" > - depends on X86_UP_APIC > - ---help--- > - An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an > - SMP-capable replacement for PC-style interrupt controllers. Most > - SMP systems and many recent uniprocessor systems have one. > - > - If you have a single-CPU system with an IO-APIC, you can say Y here > - to use it. If you say Y here even though your machine doesn't have > - an IO-APIC, then the kernel will still run with no slowdown at all. > - > config X86_LOCAL_APIC > def_bool y > depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI > @@ -928,7 +917,7 @@ config X86_LOCAL_APIC > > config X86_IO_APIC > def_bool y > - depends on X86_LOCAL_APIC || X86_UP_IOAPIC > + depends on X86_LOCAL_APIC > select IRQ_DOMAIN > > config X86_REROUTE_FOR_BROKEN_BOOT_IRQS I think it would be best to remove the "select" so the "depends" for both config options won't diverge in the future. This should be equivalent, right? And then the second patch adds a 3.8% increase on top of this (and the two "select" statements in that patch shouldn't be necessary, both X86_LOCAL_APIC and X86_IO_APIC are def_bool y for PCI_MSI configs). If these are just cleanup patches, I'm not sure I understand why a considerable kernel text size increase is worth it. --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -909,18 +909,6 @@ config X86_UP_APIC performance counters), and the NMI watchdog which detects hard lockups. -config X86_UP_IOAPIC - bool "IO-APIC support on uniprocessors" - depends on X86_UP_APIC - ---help--- - An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an - SMP-capable replacement for PC-style interrupt controllers. Most - SMP systems and many recent uniprocessor systems have one. - - If you have a single-CPU system with an IO-APIC, you can say Y here - to use it. If you say Y here even though your machine doesn't have - an IO-APIC, then the kernel will still run with no slowdown at all. - config X86_LOCAL_APIC def_bool y depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI @@ -928,7 +916,7 @@ config X86_LOCAL_APIC config X86_IO_APIC def_bool y - depends on X86_LOCAL_APIC || X86_UP_IOAPIC + depends on X86_LOCAL_APIC || X86_UP_APIC select IRQ_DOMAIN config X86_REROUTE_FOR_BROKEN_BOOT_IRQS