From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752610AbaBVTzv (ORCPT ); Sat, 22 Feb 2014 14:55:51 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:49622 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287AbaBVTzu (ORCPT ); Sat, 22 Feb 2014 14:55:50 -0500 X-Originating-IP: 50.43.14.201 Date: Sat, 22 Feb 2014 11:55:32 -0800 From: Josh Triplett To: Andrew Morton , Andi Kleen , Borislav Petkov , Feng Tang , "H. Peter Anvin" , Ingo Molnar , Jacob Shin , Jan Beulich , Jussi Kivilinna , "Kirill A. Shutemov" , Paul Gortmaker , Peter Zijlstra , "Rafael J. Wysocki" , Rob Landley , Seiji Aguchi , Stephane Eranian , Suravee Suthikulpanit , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org Subject: [PATCH v2 1/2] x86: Drop support for /proc files when !CONFIG_PROC_FS Message-ID: <296de15c8addece6dada4ddac982b3934d8ff6fa.1393098813.git.josh@joshtriplett.org> References: <296de15c8addece6dada4ddac982b3934d8ff6fa.1393096111.git.josh@joshtriplett.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <296de15c8addece6dada4ddac982b3934d8ff6fa.1393096111.git.josh@joshtriplett.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org arch/x86/kernel/cpu/proc.c only exists to support files in /proc; omit that file when compiling without CONFIG_PROC_FS. Saves 645 additional bytes on 32-bit x86 when !CONFIG_PROC_FS: add/remove: 0/5 grow/shrink: 0/0 up/down: 0/-645 (-645) function old new delta c_stop 1 - -1 c_next 11 - -11 cpuinfo_op 16 - -16 c_start 24 - -24 show_cpuinfo 593 - -593 Signed-off-by: Josh Triplett --- v2: no changes to patch 1. arch/x86/kernel/cpu/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index 7fd54f0..64038d8 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile @@ -13,10 +13,12 @@ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_common.o := $(nostackp) obj-y := intel_cacheinfo.o scattered.o topology.o -obj-y += proc.o capflags.o powerflags.o common.o +obj-y += capflags.o powerflags.o common.o obj-y += rdrand.o obj-y += match.o +obj-$(CONFIG_PROC_FS) += proc.o + obj-$(CONFIG_X86_32) += bugs.o obj-$(CONFIG_X86_64) += bugs_64.o -- 1.9.0