From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14678 invoked by alias); 24 Jan 2011 08:11:57 -0000 Received: (qmail 14647 invoked by uid 22791); 24 Jan 2011 08:11:53 -0000 X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MISSING_HEADERS,RCVD_IN_DNSWL_LOW,TW_CL,TW_FH,TW_MK,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qy0-f176.google.com (HELO mail-qy0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Jan 2011 08:11:46 +0000 Received: by qyk10 with SMTP id 10so3864016qyk.0 for ; Mon, 24 Jan 2011 00:11:44 -0800 (PST) Received: by 10.224.67.207 with SMTP id s15mt5644043qai.185.1295856704176; Mon, 24 Jan 2011 00:11:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.179.139 with HTTP; Mon, 24 Jan 2011 00:11:23 -0800 (PST) In-Reply-To: References: From: Kevin Pouget Date: Mon, 24 Jan 2011 08:11:00 -0000 Message-ID: Subject: Re: [PATCH] Built kernel without -O2 option Cc: linux-kernel@vger.kernel.org, gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00104.txt.bz2 I'm looking forward to testing in on ARM linux once it's ready, if it's on our roadmad :) Kevin (sorry if you got it twice, the first one might have been rejected because of HTML content) On Mon, Jan 24, 2011 at 8:47 AM, Hui Zhu wrote: > > https://lkml.org/lkml/2010/11/28/211 > > Update follow kernel trunk. > > I built and use it in i386 and x86_64 with 2.6.38-rc2+. > > And I will put new patch in here and > http://code.google.com/p/kgtp/downloads/list > > Thanks, > Hui > > Signed-off-by: Hui Zhu > --- > > --- > =A0Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0| =A0 =A02 ++ > =A0arch/x86/crypto/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| =A0 =A06 ++++++ > =A0arch/x86/include/asm/page_64_types.h =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A04= ++++ > =A0arch/x86/include/asm/uaccess_32.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A04 ++++ > =A0arch/x86/kernel/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| =A0 =A09 +++++++++ > =A0arch/x86/kvm/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A06 ++++++ > =A0arch/x86/lib/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A04 ++++ > =A0arch/x86/power/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A04 ++++ > =A0crypto/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 | =A0 =A04 ++++ > =A0drivers/char/mwave/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | = =A0 =A04 ++++ > =A0drivers/gpu/drm/i915/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | = =A0 =A04 ++++ > =A0drivers/gpu/drm/i915/i915_drv.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A04 ++++ > =A0drivers/gpu/drm/nouveau/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 = =A04 ++++ > =A0drivers/gpu/drm/radeon/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A04 ++++ > =A0drivers/infiniband/hw/qib/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 = =A04 ++++ > =A0drivers/net/can/sja1000/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 = =A04 ++++ > =A0drivers/staging/comedi/drivers/Makefile =A0 =A0 =A0 =A0 | =A0 =A04 ++++ > =A0drivers/staging/et131x/et1310_address_map.h =A0 =A0 | =A0 =A08 ++++++++ > =A0drivers/staging/rtl8187se/ieee80211/ieee80211.h | =A0 =A08 ++++++++ > =A0drivers/staging/wlags49_h2/wl_internal.h =A0 =A0 =A0 =A0| =A0 =A09 +++= +++++- > =A0drivers/usb/gadget/f_loopback.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A02 ++ > =A0drivers/usb/gadget/f_sourcesink.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A02 ++ > =A0drivers/usb/gadget/g_zero.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | = =A0 =A02 ++ > =A0drivers/usb/host/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = | =A0 =A04 ++++ > =A0fs/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | =A0 =A05 +++++ > =A0include/linux/pagemap.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A02 ++ > =A0init/Kconfig =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0| =A0 =A01 + > =A0kernel/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 | =A0 =A04 ++++ > =A0kernel/kfifo.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0| =A0 =A03 +++ > =A0lib/Kconfig.debug =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 | =A0 =A08 ++++++++ > =A0lib/raid6/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0| =A0 =A06 ++++++ > =A0mm/Makefile =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | =A0 =A06 ++++++ > =A0mm/memory.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | =A0 =A06 ++++++ > =A0mm/mincore.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0| =A0 =A02 ++ > =A0mm/percpu.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | =A0 =A04 ++++ > =A0mm/rmap.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | =A0 =A02 ++ > =A0net/mac80211/cfg.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0| =A0 =A02 ++ > =A0net/mac80211/iface.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0| =A0 =A08 ++++++++ > =A0net/mac80211/mesh.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 | =A0 =A02 ++ > =A0net/mac80211/rx.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 | =A0 =A08 ++++++++ > =A0net/mac80211/sta_info.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A02 ++ > =A0net/mac80211/status.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A02 ++ > =A0net/mac80211/tx.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 | =A0 =A04 ++++ > =A0net/netfilter/nf_conntrack_pptp.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A03 ++- > =A044 files changed, 188 insertions(+), 2 deletions(-) > > --- a/Makefile > +++ b/Makefile > @@ -541,8 +541,10 @@ all: vmlinux > =A0ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > =A0KBUILD_CFLAGS =A0+=3D -Os > =A0else > +ifndef CONFIG_CC_CLOSE_OPTIMIZATION > =A0KBUILD_CFLAGS =A0+=3D -O2 > =A0endif > +endif > > =A0include $(srctree)/arch/$(SRCARCH)/Makefile > > --- a/arch/x86/crypto/Makefile > +++ b/arch/x86/crypto/Makefile > @@ -2,6 +2,12 @@ > =A0# Arch-specific CryptoAPI modules. > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_fpu.o =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +=3D -O2 > +CFLAGS_aesni-intel_glue.o =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D -O2 > +CFLAGS_ghash-clmulni-intel_glue.o =A0 =A0 =A0+=3D -O2 > +endif > + > =A0obj-$(CONFIG_CRYPTO_FPU) +=3D fpu.o > > =A0obj-$(CONFIG_CRYPTO_AES_586) +=3D aes-i586.o > --- a/arch/x86/include/asm/page_64_types.h > +++ b/arch/x86/include/asm/page_64_types.h > @@ -1,7 +1,11 @@ > =A0#ifndef _ASM_X86_PAGE_64_DEFS_H > =A0#define _ASM_X86_PAGE_64_DEFS_H > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +#define THREAD_ORDER =A0 2 > +#else > =A0#define THREAD_ORDER =A0 1 > +#endif > =A0#define THREAD_SIZE =A0(PAGE_SIZE << THREAD_ORDER) > =A0#define CURRENT_MASK (~(THREAD_SIZE - 1)) > > --- a/arch/x86/include/asm/uaccess_32.h > +++ b/arch/x86/include/asm/uaccess_32.h > @@ -209,7 +209,11 @@ static inline unsigned long __must_check > =A0 =A0 =A0 =A0if (likely(sz =3D=3D -1 || sz >=3D n)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0n =3D _copy_from_user(to, from, n); > =A0 =A0 =A0 =A0else > +#ifndef CONFIG_CC_CLOSE_OPTIMIZATION > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0copy_from_user_overflow(); > +#else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 n =3D -EFAULT; > +#endif > > =A0 =A0 =A0 =A0return n; > =A0} > --- a/arch/x86/kernel/Makefile > +++ b/arch/x86/kernel/Makefile > @@ -31,6 +31,15 @@ GCOV_PROFILE_hpet.o =A0 =A0 =A0 =A0 =A0:=3D n > =A0GCOV_PROFILE_tsc.o =A0 =A0 =A0 =A0 =A0 =A0 :=3D n > =A0GCOV_PROFILE_paravirt.o =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0:=3D n > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_process_$(BITS).o =A0 =A0 =A0 +=3D -O2 > +CFLAGS_entry_$(BITS).o =A0 =A0 =A0 =A0 +=3D -O2 > +CFLAGS_traps.o =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +=3D -O2 > +CFLAGS_i387.o =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D -O2 > +CFLAGS_xsave.o =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +=3D -O2 > +CFLAGS_hpet.o =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D -O2 > +endif > + > =A0obj-y =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0:=3D process_$(BITS).o signal= .o entry_$(BITS).o > =A0obj-y =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D traps.o irq.o irq_$(BITS= ).o dumpstack_$(BITS).o > =A0obj-y =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D time.o ioport.o ldt.o du= mpstack.o > --- a/arch/x86/kvm/Makefile > +++ b/arch/x86/kvm/Makefile > @@ -5,6 +5,12 @@ CFLAGS_x86.o :=3D -I. > =A0CFLAGS_svm.o :=3D -I. > =A0CFLAGS_vmx.o :=3D -I. > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_x86.o =A0 =A0 =A0 =A0 =A0 +=3D -O2 > +CFLAGS_emulate.o =A0 =A0 =A0 +=3D -O2 > +CFLAGS_svm.o =A0 =A0 =A0 =A0 =A0 +=3D -O2 > +endif > + > =A0kvm-y =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+=3D $(addprefix ../../../vir= t/kvm/, kvm_main.o ioapic.o \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0coalesced_= mmio.o irq_comm.o eventfd.o \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0assigned-d= ev.o) > --- a/arch/x86/lib/Makefile > +++ b/arch/x86/lib/Makefile > @@ -2,6 +2,10 @@ > =A0# Makefile for x86 specific library files. > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_memmove_64.o =A0 =A0+=3D -O2 > +endif > + > =A0inat_tables_script =3D $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk > =A0inat_tables_maps =3D $(srctree)/arch/x86/lib/x86-opcode-map.txt > =A0quiet_cmd_inat_tables =3D GEN =A0 =A0 $@ > --- a/arch/x86/power/Makefile > +++ b/arch/x86/power/Makefile > @@ -3,5 +3,9 @@ > =A0nostackp :=3D $(call cc-option, -fno-stack-protector) > =A0CFLAGS_cpu.o =A0 :=3D $(nostackp) > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_cpu.o =A0 +=3D -O2 > +endif > + > =A0obj-$(CONFIG_PM_SLEEP) =A0 =A0 =A0 =A0 +=3D cpu.o > =A0obj-$(CONFIG_HIBERNATION) =A0 =A0 =A0+=3D hibernate_$(BITS).o hibernat= e_asm_$(BITS).o > --- a/crypto/Makefile > +++ b/crypto/Makefile > @@ -2,6 +2,10 @@ > =A0# Cryptographic API > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_xor.o =A0 +=3D -O2 > +endif > + > =A0obj-$(CONFIG_CRYPTO) +=3D crypto.o > =A0crypto-y :=3D api.o cipher.o compress.o > > --- a/drivers/char/mwave/Makefile > +++ b/drivers/char/mwave/Makefile > @@ -4,6 +4,10 @@ > =A0# See the README file in this directory for more info. > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_smapi.o +=3D -O2 > +endif > + > =A0obj-$(CONFIG_MWAVE) +=3D mwave.o > > =A0mwave-y :=3D mwavedd.o smapi.o tp3780i.o 3780i.o > --- a/drivers/gpu/drm/i915/Makefile > +++ b/drivers/gpu/drm/i915/Makefile > @@ -2,6 +2,10 @@ > =A0# Makefile for the drm device driver. =A0This driver provides support = for the > =A0# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_i915_gem.o =A0 =A0 =A0+=3D -O2 > +endif > + > =A0ccflags-y :=3D -Iinclude/drm > =A0i915-y :=3D i915_drv.o i915_dma.o i915_irq.o i915_mem.o \ > =A0 =A0 =A0 =A0 =A0i915_debugfs.o \ > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -1221,7 +1221,11 @@ extern int intel_setup_gmbus(struct drm_ > =A0extern void intel_teardown_gmbus(struct drm_device *dev); > =A0extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int spe= ed); > =A0extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool fo= rce_bit); > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter) > +#else > =A0extern inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapt= er) > +#endif > =A0{ > =A0 =A0 =A0 =A0return container_of(adapter, struct intel_gmbus, adapter)-= >force_bit; > =A0} > --- a/drivers/gpu/drm/nouveau/Makefile > +++ b/drivers/gpu/drm/nouveau/Makefile > @@ -2,6 +2,10 @@ > =A0# Makefile for the drm device driver. =A0This driver provides support = for the > =A0# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_nv50_instmem.o =A0+=3D -O2 > +endif > + > =A0ccflags-y :=3D -Iinclude/drm > =A0nouveau-y :=3D nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau= _mem.o \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0nouveau_object.o nouveau_irq.o nouveau_notifie= r.o \ > --- a/drivers/gpu/drm/radeon/Makefile > +++ b/drivers/gpu/drm/radeon/Makefile > @@ -2,6 +2,10 @@ > =A0# Makefile for the drm device driver. =A0This driver provides support = for the > =A0# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_radeon_gem.o =A0 =A0+=3D -O2 > +endif > + > =A0ccflags-y :=3D -Iinclude/drm > > =A0hostprogs-y :=3D mkregtable > --- a/drivers/infiniband/hw/qib/Makefile > +++ b/drivers/infiniband/hw/qib/Makefile > @@ -1,5 +1,9 @@ > =A0obj-$(CONFIG_INFINIBAND_QIB) +=3D ib_qib.o > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_qib_iba7322.o =A0 +=3D -O2 > +endif > + > =A0ib_qib-y :=3D qib_cq.o qib_diag.o qib_dma.o qib_driver.o qib_eeprom.o \ > =A0 =A0 =A0 =A0qib_file_ops.o qib_fs.o qib_init.o qib_intr.o qib_keys.o \ > =A0 =A0 =A0 =A0qib_mad.o qib_mmap.o qib_mr.o qib_pcie.o qib_pio_copy.o \ > --- a/drivers/net/can/sja1000/Makefile > +++ b/drivers/net/can/sja1000/Makefile > @@ -2,6 +2,10 @@ > =A0# =A0Makefile for the SJA1000 CAN controller drivers. > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_kvaser_pci.o =A0 =A0+=3D -O2 > +endif > + > =A0obj-$(CONFIG_CAN_SJA1000) +=3D sja1000.o > =A0obj-$(CONFIG_CAN_SJA1000_ISA) +=3D sja1000_isa.o > =A0obj-$(CONFIG_CAN_SJA1000_PLATFORM) +=3D sja1000_platform.o > --- a/drivers/staging/comedi/drivers/Makefile > +++ b/drivers/staging/comedi/drivers/Makefile > @@ -1,6 +1,10 @@ > =A0# Makefile for individual comedi drivers > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_cb_pcidas64.o =A0 +=3D -O2 > +endif > + > =A0# Comedi "helper" modules > =A0obj-$(CONFIG_COMEDI) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +=3D pcm_comm= on.o > > --- a/drivers/staging/et131x/et1310_address_map.h > +++ b/drivers/staging/et131x/et1310_address_map.h > @@ -212,12 +212,20 @@ struct global_regs { =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0/* Location: */ > =A0#define INDEX10(x) =A0 =A0 ((x) & ET_DMA10_MASK) > =A0#define INDEX4(x) =A0 =A0 =A0((x) & ET_DMA4_MASK) > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline void add_10bit(u32 *v, int n) > +#else > =A0extern inline void add_10bit(u32 *v, int n) > +#endif > =A0{ > =A0 =A0 =A0 =A0*v =3D INDEX10(*v + n) | (*v & ET_DMA10_WRAP); > =A0} > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline void add_12bit(u32 *v, int n) > +#else > =A0extern inline void add_12bit(u32 *v, int n) > +#endif > =A0{ > =A0 =A0 =A0 =A0*v =3D INDEX12(*v + n) | (*v & ET_DMA12_WRAP); > =A0} > --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h > +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h > @@ -1221,7 +1221,11 @@ static inline void *ieee80211_priv(struc > =A0 =A0 =A0 =A0return ((struct ieee80211_device *)netdev_priv(dev))->priv; > =A0} > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline int ieee80211_is_empty_essid(const char *essid, int essid_= len) > +#else > =A0extern inline int ieee80211_is_empty_essid(const char *essid, int essi= d_len) > +#endif > =A0{ > =A0 =A0 =A0 =A0/* Single white space is for Linksys APs */ > =A0 =A0 =A0 =A0if (essid_len =3D=3D 1 && essid[0] =3D=3D ' ') > @@ -1263,7 +1267,11 @@ extern inline int ieee80211_is_valid_mod > =A0 =A0 =A0 =A0return 0; > =A0} > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline int ieee80211_get_hdrlen(u16 fc) > +#else > =A0extern inline int ieee80211_get_hdrlen(u16 fc) > +#endif > =A0{ > =A0 =A0 =A0 =A0int hdrlen =3D 24; > > --- a/drivers/staging/wlags49_h2/wl_internal.h > +++ b/drivers/staging/wlags49_h2/wl_internal.h > @@ -1022,8 +1022,11 @@ static inline void wl_unlock(struct wl_p > =A0/********************************************************************/ > =A0/* Interrupt enable disable functions =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > =A0/********************************************************************/ > - > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline void wl_act_int_on(struct wl_private *lp) > +#else > =A0extern inline void wl_act_int_on(struct wl_private *lp) > +#endif > =A0{ > =A0 =A0 =A0 =A0/* > =A0 =A0 =A0 =A0 * Only do something when the driver is handling > @@ -1035,7 +1038,11 @@ extern inline void wl_act_int_on(struct > =A0 =A0 =A0 =A0} > =A0} > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +static inline void wl_act_int_off(struct wl_private *lp) > +#else > =A0extern inline void wl_act_int_off(struct wl_private *lp) > +#endif > =A0{ > =A0 =A0 =A0 =A0/* > =A0 =A0 =A0 =A0 * Only do something when the driver is handling > --- a/drivers/usb/gadget/f_loopback.c > +++ b/drivers/usb/gadget/f_loopback.c > @@ -376,10 +376,12 @@ int __init loopback_add(struct usb_compo > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sourcesink_driver.bmAttributes |=3D USB_CO= NFIG_ATT_WAKEUP; > > =A0 =A0 =A0 =A0/* support OTG systems */ > +#ifdef CONFIG_USB_OTG > =A0 =A0 =A0 =A0if (gadget_is_otg(cdev->gadget)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0loopback_driver.descriptors =3D otg_desc; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0loopback_driver.bmAttributes |=3D USB_CONF= IG_ATT_WAKEUP; > =A0 =A0 =A0 =A0} > +#endif > > =A0 =A0 =A0 =A0return usb_add_config(cdev, &loopback_driver, loopback_bin= d_config); > =A0} > --- a/drivers/usb/gadget/f_sourcesink.c > +++ b/drivers/usb/gadget/f_sourcesink.c > @@ -526,10 +526,12 @@ int __init sourcesink_add(struct usb_com > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sourcesink_driver.bmAttributes |=3D USB_CO= NFIG_ATT_WAKEUP; > > =A0 =A0 =A0 =A0/* support OTG systems */ > +#ifdef CONFIG_USB_OTG > =A0 =A0 =A0 =A0if (gadget_is_otg(cdev->gadget)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sourcesink_driver.descriptors =3D otg_desc; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sourcesink_driver.bmAttributes |=3D USB_CO= NFIG_ATT_WAKEUP; > =A0 =A0 =A0 =A0} > +#endif > > =A0 =A0 =A0 =A0return usb_add_config(cdev, &sourcesink_driver, sourcesink= _bind_config); > =A0} > --- a/drivers/usb/gadget/g_zero.h > +++ b/drivers/usb/gadget/g_zero.h > @@ -10,7 +10,9 @@ > > =A0/* global state */ > =A0extern unsigned buflen; > +#ifdef CONFIG_USB_OTG > =A0extern const struct usb_descriptor_header *otg_desc[]; > +#endif > > =A0/* common utilities */ > =A0struct usb_request *alloc_ep_req(struct usb_ep *ep); > --- a/drivers/usb/host/Makefile > +++ b/drivers/usb/host/Makefile > @@ -4,6 +4,10 @@ > > =A0ccflags-$(CONFIG_USB_DEBUG) :=3D -DDEBUG > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_ehci-hcd.o =A0 =A0 =A0+=3D -O2 > +endif > + > =A0isp1760-y :=3D isp1760-hcd.o isp1760-if.o > > =A0fhci-y :=3D fhci-hcd.o fhci-hub.o fhci-q.o > --- a/fs/Makefile > +++ b/fs/Makefile > @@ -13,6 +13,11 @@ obj-y :=3D =A0 =A0 open.o read_write.o file_table. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pnode.o drop_caches.o splice.o sync.o utim= es.o \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0stack.o fs_struct.o statfs.o > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_compat_ioctl.o =A0+=3D -O2 > +CFLAGS_binfmt_elf.o =A0 =A0+=3D -O2 > +endif > + > =A0ifeq ($(CONFIG_BLOCK),y) > =A0obj-y +=3D =A0 =A0 =A0 buffer.o bio.o block_dev.o direct-io.o mpage.o = ioprio.o > =A0else > --- a/include/linux/pagemap.h > +++ b/include/linux/pagemap.h > @@ -289,8 +289,10 @@ static inline pgoff_t linear_page_index( > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0unsigned long address) > =A0{ > =A0 =A0 =A0 =A0pgoff_t pgoff; > +#ifdef CONFIG_HUGETLBFS > =A0 =A0 =A0 =A0if (unlikely(is_vm_hugetlb_page(vma))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return linear_hugepage_index(vma, address); > +#endif > =A0 =A0 =A0 =A0pgoff =3D (address - vma->vm_start) >> PAGE_SHIFT; > =A0 =A0 =A0 =A0pgoff +=3D vma->vm_pgoff; > =A0 =A0 =A0 =A0return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT); > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -886,6 +886,7 @@ endif > > =A0config CC_OPTIMIZE_FOR_SIZE > =A0 =A0 =A0 =A0bool "Optimize for size" > + =A0 =A0 =A0 depends on !CC_CLOSE_OPTIMIZATION > =A0 =A0 =A0 =A0default y > =A0 =A0 =A0 =A0help > =A0 =A0 =A0 =A0 =A0Enabling this option will pass "-Os" instead of "-O2" = to gcc > --- a/kernel/Makefile > +++ b/kernel/Makefile > @@ -2,6 +2,10 @@ > =A0# Makefile for the linux kernel. > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_sched.o +=3D -O2 > +endif > + > =A0obj-y =A0 =A0 =3D sched.o fork.o exec_domain.o panic.o printk.o \ > =A0 =A0 =A0 =A0 =A0 =A0cpu.o exit.o itimer.o time.o softirq.o resource.o \ > =A0 =A0 =A0 =A0 =A0 =A0sysctl.o sysctl_binary.o capability.o ptrace.o tim= er.o user.o \ > --- a/kernel/kfifo.c > +++ b/kernel/kfifo.c > @@ -402,6 +402,9 @@ unsigned int __kfifo_max_r(unsigned int > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return max; > =A0 =A0 =A0 =A0return len; > =A0} > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +EXPORT_SYMBOL(__kfifo_max_r); > +#endif > > =A0#define =A0 =A0 =A0 =A0__KFIFO_PEEK(data, out, mask) \ > =A0 =A0 =A0 =A0((data)[(out) & (mask)]) > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -136,6 +136,14 @@ config DEBUG_SECTION_MISMATCH > =A0 =A0 =A0 =A0 =A0- Enable verbose reporting from modpost to help solving > =A0 =A0 =A0 =A0 =A0 =A0the section mismatches reported. > > +config CC_CLOSE_OPTIMIZATION > + =A0 =A0 =A0 bool "Close GCC optimization" > + =A0 =A0 =A0 default n > + =A0 =A0 =A0 help > + =A0 =A0 =A0 =A0 Enabling this option will let gcc build kernel without = "-O2". > + > + =A0 =A0 =A0 =A0 If unsure, say N. > + > =A0config DEBUG_KERNEL > =A0 =A0 =A0 =A0bool "Kernel debugging" > =A0 =A0 =A0 =A0help > --- a/lib/raid6/Makefile > +++ b/lib/raid6/Makefile > @@ -1,3 +1,9 @@ > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_mmx.o =A0 +=3D -O2 > +CFLAGS_sse1.o =A0+=3D -O2 > +CFLAGS_sse2.o =A0+=3D -O2 > +endif > + > =A0obj-$(CONFIG_RAID6_PQ) +=3D raid6_pq.o > > =A0raid6_pq-y =A0 =A0 +=3D algos.o recov.o tables.o int1.o int2.o int4.o \ > --- a/mm/Makefile > +++ b/mm/Makefile > @@ -2,6 +2,12 @@ > =A0# Makefile for the linux memory manager. > =A0# > > +ifdef CONFIG_CC_CLOSE_OPTIMIZATION > +CFLAGS_slob.o =A0+=3D -O2 > +CFLAGS_slab.o =A0+=3D -O2 > +CFLAGS_slub.o =A0+=3D -O2 > +endif > + > =A0mmu-y =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0:=3D nommu.o > =A0mmu-$(CONFIG_MMU) =A0 =A0 =A0:=3D fremap.o highmem.o madvise.o memory.= o mincore.o \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mlock.o mmap.o mprote= ct.o mremap.o msync.o rmap.o \ > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -1317,8 +1317,10 @@ struct page *follow_page(struct vm_area_ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_unloc= k(&mm->page_table_lock); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0wait_split= _huge_page(vma->anon_vma, pmd); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else { > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0page =3D f= ollow_trans_huge_pmd(mm, address, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmd, flags); > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_unloc= k(&mm->page_table_lock); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > @@ -2775,7 +2777,9 @@ static int do_swap_page(struct mm_struct > > =A0 =A0 =A0 =A0if (ksm_might_need_to_copy(page, vma, address)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0swapcache =3D page; > +#ifdef CONFIG_KSM > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0page =3D ksm_does_need_to_copy(page, vma, = address); > +#endif > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (unlikely(!page)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ret =3D VM_FAULT_OOM; > @@ -3314,11 +3318,13 @@ int handle_mm_fault(struct mm_struct *mm > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmd_t orig_pmd =3D *pmd; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0barrier(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (pmd_trans_huge(orig_pmd)) { > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (flags & FAULT_FLAG_WRI= TE && > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0!pmd_write(orig_pm= d) && > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0!pmd_trans_splitti= ng(orig_pmd)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return do_= huge_pmd_wp_page(mm, vma, address, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmd, orig_pmd); > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} > --- a/mm/mincore.c > +++ b/mm/mincore.c > @@ -155,10 +155,12 @@ static void mincore_pmd_range(struct vm_ > =A0 =A0 =A0 =A0do { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0next =3D pmd_addr_end(addr, end); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (pmd_trans_huge(*pmd)) { > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (mincore_huge_pmd(vma, = pmd, addr, next, vec)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vec +=3D (= next - addr) >> PAGE_SHIFT; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* fall through */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (pmd_none_or_clear_bad(pmd)) > --- a/mm/percpu.c > +++ b/mm/percpu.c > @@ -1886,7 +1886,11 @@ void __init percpu_init_late(void) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int *map; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0const size_t size =3D PERCPU_DYNAMIC_EARLY= _SLOTS * sizeof(map[0]); > > +#ifdef CONFIG_CC_CLOSE_OPTIMIZATION > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 BUG_ON(size > PAGE_SIZE); > +#else > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BUILD_BUG_ON(size > PAGE_SIZE); > +#endif > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0map =3D pcpu_mem_alloc(size); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BUG_ON(!map); > --- a/mm/rmap.c > +++ b/mm/rmap.c > @@ -515,6 +515,7 @@ int page_referenced_one(struct page *pag > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0referenced++; > > =A0 =A0 =A0 =A0if (unlikely(PageTransHuge(page))) { > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmd_t *pmd; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_lock(&mm->page_table_lock); > @@ -524,6 +525,7 @@ int page_referenced_one(struct page *pag > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmdp_clear_flush_young_notify(vma,= address, pmd)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0referenced++; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spin_unlock(&mm->page_table_lock); > +#endif > =A0 =A0 =A0 =A0} else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pte_t *pte; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0spinlock_t *ptl; > --- a/net/mac80211/cfg.c > +++ b/net/mac80211/cfg.c > @@ -699,6 +699,7 @@ static void sta_apply_parameters(struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0params->ht_capa, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0&sta->sta.ht_cap); > > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0if (ieee80211_vif_is_mesh(&sdata->vif) && params->plink_ac= tion) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (params->plink_action) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case PLINK_ACTION_OPEN: > @@ -709,6 +710,7 @@ static void sta_apply_parameters(struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} > +#endif > =A0} > > =A0static int ieee80211_add_station(struct wiphy *wiphy, struct net_devic= e *dev, > --- a/net/mac80211/iface.c > +++ b/net/mac80211/iface.c > @@ -620,8 +620,10 @@ static void ieee80211_teardown_sdata(str > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__skb_queue_purge(&sdata->fragments[i].skb= _list); > =A0 =A0 =A0 =A0sdata->fragment_next =3D 0; > > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0if (ieee80211_vif_is_mesh(&sdata->vif)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mesh_rmc_free(sdata); > +#endif > > =A0 =A0 =A0 =A0flushed =3D sta_info_flush(local, sdata); > =A0 =A0 =A0 =A0WARN_ON(flushed); > @@ -797,7 +799,9 @@ static void ieee80211_iface_work(struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case NL80211_IFTYPE_MESH_POINT: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!ieee80211_vif_is_mesh= (&sdata->vif)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieee80211_mesh_rx_queued_m= gmt(sdata, skb); > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0default: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0WARN(1, "frame for unexpec= ted interface type"); > @@ -818,7 +822,9 @@ static void ieee80211_iface_work(struct > =A0 =A0 =A0 =A0case NL80211_IFTYPE_MESH_POINT: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!ieee80211_vif_is_mesh(&sdata->vif)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieee80211_mesh_work(sdata); > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0default: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > @@ -872,8 +878,10 @@ static void ieee80211_setup_sdata(struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieee80211_ibss_setup_sdata(sdata); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0case NL80211_IFTYPE_MESH_POINT: > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ieee80211_vif_is_mesh(&sdata->vif)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieee80211_mesh_init_sdata(= sdata); > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0case NL80211_IFTYPE_MONITOR: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sdata->dev->type =3D ARPHRD_IEEE80211_RADI= OTAP; > --- a/net/mac80211/mesh.h > +++ b/net/mac80211/mesh.h > @@ -189,8 +189,10 @@ int ieee80211_fill_mesh_addresses(struct > =A0int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ieee80211_sub_if_data *sdata, char = *addr4or5, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0char *addr6); > +#ifdef CONFIG_MAC80211_MESH > =A0int mesh_rmc_check(u8 *addr, struct ieee80211s_hdr *mesh_hdr, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ieee80211_sub_if_data *sdata); > +#endif > =A0bool mesh_matches_local(struct ieee802_11_elems *ie, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ieee80211_sub_if_data *sdata); > =A0void mesh_ids_set_default(struct ieee80211_if_mesh *mesh); > --- a/net/mac80211/rx.c > +++ b/net/mac80211/rx.c > @@ -453,6 +453,14 @@ static int ieee80211_get_mmie_keyidx(str > =A0} > > > +#ifndef CONFIG_MAC80211_MESH > +static int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ieee80211_sub_if_data *sdata) > +{ > + =A0 =A0 =A0 return 0; > +} > +#endif > + > =A0static ieee80211_rx_result > =A0ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx) > =A0{ > --- a/net/mac80211/sta_info.c > +++ b/net/mac80211/sta_info.c > @@ -470,8 +470,10 @@ int sta_info_insert_rcu(struct sta_info > =A0 =A0 =A0 =A0rcu_read_lock(); > =A0 =A0 =A0 =A0mutex_unlock(&local->sta_mtx); > > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0if (ieee80211_vif_is_mesh(&sdata->vif)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mesh_accept_plinks_update(sdata); > +#endif > > =A0 =A0 =A0 =A0return 0; > =A0out_free: > --- a/net/mac80211/status.c > +++ b/net/mac80211/status.c > @@ -247,8 +247,10 @@ void ieee80211_tx_status(struct ieee8021 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rate_control_tx_status(local, sband, sta, = skb); > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ieee80211_vif_is_mesh(&sta->sdata->vif= )) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieee80211s_update_metric(l= ocal, sta, skb); > +#endif > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!(info->flags & IEEE80211_TX_CTL_INJEC= TED) && acked) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieee80211_frame_acked(sta,= skb); > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -1638,6 +1638,7 @@ static void ieee80211_xmit(struct ieee80 > =A0 =A0 =A0 =A0hdr =3D (struct ieee80211_hdr *) skb->data; > =A0 =A0 =A0 =A0info->control.vif =3D &sdata->vif; > > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0if (ieee80211_vif_is_mesh(&sdata->vif) && > =A0 =A0 =A0 =A0 =A0 =A0ieee80211_is_data(hdr->frame_control) && > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0!is_multicast_ether_addr(hdr->addr1)) > @@ -1646,6 +1647,7 @@ static void ieee80211_xmit(struct ieee80 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rcu_read_u= nlock(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > +#endif > > =A0 =A0 =A0 =A0ieee80211_set_qos_hdr(local, skb); > =A0 =A0 =A0 =A0ieee80211_tx(sdata, skb, false); > @@ -2322,7 +2324,9 @@ struct sk_buff *ieee80211_beacon_get_tim > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*pos++ =3D WLAN_EID_SSID; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*pos++ =3D 0x0; > > +#ifdef CONFIG_MAC80211_MESH > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mesh_mgmt_ies_add(skb, sdata); > +#endif > =A0 =A0 =A0 =A0} else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0WARN_ON(1); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out; > --- a/net/netfilter/nf_conntrack_pptp.c > +++ b/net/netfilter/nf_conntrack_pptp.c > @@ -67,7 +67,8 @@ void > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct nf_conntra= ck_expect *exp) __read_mostly; > =A0EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_expectfn); > > -#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) > +#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) \ > + =A0 =A0|| defined(CONFIG_CC_CLOSE_OPTIMIZATION) > =A0/* PptpControlMessageType names */ > =A0const char *const pptp_msg_name[] =3D { > =A0 =A0 =A0 =A0"UNKNOWN_MESSAGE",