[OpenWrt-Devel] [PATCH v4 4/4] kernel: 3.18: Strip off all the useless options

Maxime Ripard maxime.ripard at free-electrons.com
Sat Dec 13 11:03:47 EST 2014


On Fri, Dec 12, 2014 at 06:45:06PM +0100, Jonas Gorski wrote:
> On Fri, Dec 12, 2014 at 5:02 PM, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> > Now that we use the defconfigs, we can remove all the options at their default
> > value.
> 
> This causes a lot of kernel-config changes for e.g bcm63xx_smp with
> 3.18, several of which are unwanted (e.g. enabling of the FPU
> emulator).
> 
> How did you determine which of these symbols were unneeded?

I let Kconfig do that job.

The only thing I did was copying the old config-3.18 as .config, and
did a make savedefconfig.

If somethings are missing, they're probably enabled either in your
target config-3.18 or through the openwrt code itself.

> 
> Here a diff of the resulting .config with patches 1-3 applied
> (before), and with patch 4 in addition applied (after)
> 
> --- config-3.18-before 2014-12-12 18:39:08.385702153 +0100
> +++ config-3.18-after   2014-12-12 18:33:58.197708840 +0100
> @@ -167,9 +167,9 @@
>  # CONFIG_PREEMPT is not set
>  # CONFIG_KEXEC is not set
>  # CONFIG_CRASH_DUMP is not set
> -# CONFIG_SECCOMP is not set
> +CONFIG_SECCOMP=y

That one is odd. It's probably because SECCOMP has a default y on
MIPS, and I used an ARM configured kernel.

>  CONFIG_MIPS_O32_FP64_SUPPORT=y
> -# CONFIG_MIPS_FPU_EMULATOR is not set
> +CONFIG_MIPS_FPU_EMULATOR=y

Same thing here.

>  CONFIG_USE_OF=y
>  CONFIG_BOOT_RAW=y
>  CONFIG_LOCKDEP_SUPPORT=y
> @@ -262,7 +262,7 @@
>  # CONFIG_KALLSYMS_UNCOMPRESSED is not set
>  CONFIG_BPF=y
>  CONFIG_EXPERT=y
> -# CONFIG_SGETMASK_SYSCALL is not set
> +CONFIG_SGETMASK_SYSCALL=y

Ditto.

>  # CONFIG_SYSFS_SYSCALL is not set
>  # CONFIG_SYSCTL_SYSCALL is not set
>  CONFIG_KALLSYMS=y
> @@ -276,7 +276,7 @@
>  CONFIG_SIGNALFD=y
>  CONFIG_TIMERFD=y
>  CONFIG_EVENTFD=y
> -CONFIG_BPF_SYSCALL=y
> +# CONFIG_BPF_SYSCALL is not set

Hmmm, that symbol seem to have been introduced in 3.18-rc3. I probably
used an earlier kernel.

>  CONFIG_SHMEM=y
>  # CONFIG_AIO is not set
>  # CONFIG_ADVISE_SYSCALLS is not set
> @@ -311,6 +311,7 @@
>  CONFIG_HAVE_ARCH_JUMP_LABEL=y
>  CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
>  CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
> +CONFIG_SECCOMP_FILTER=y

Same as SECCOMP I guess.

>  CONFIG_HAVE_CC_STACKPROTECTOR=y
>  # CONFIG_CC_STACKPROTECTOR is not set
>  CONFIG_CC_STACKPROTECTOR_NONE=y
> @@ -406,7 +407,11 @@
>  #
>  CONFIG_PCIEPORTBUS=y
>  # CONFIG_PCIEAER is not set
> -# CONFIG_PCIEASPM is not set
> +CONFIG_PCIEASPM=y

Ditto.

> +# CONFIG_PCIEASPM_DEBUG is not set
> +CONFIG_PCIEASPM_DEFAULT=y
> +# CONFIG_PCIEASPM_POWERSAVE is not set
> +# CONFIG_PCIEASPM_PERFORMANCE is not set
>  CONFIG_MMU=y
>  # CONFIG_PCCARD is not set
>  # CONFIG_HOTPLUG_PCI is not set
> @@ -418,7 +423,7 @@
>  #
>  CONFIG_BINFMT_ELF=y
>  CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
> -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
> +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y

Another default y option....

>  CONFIG_BINFMT_SCRIPT=y
>  # CONFIG_HAVE_AOUT is not set
>  # CONFIG_BINFMT_MISC is not set
> @@ -528,7 +533,7 @@
>  CONFIG_NETFILTER=y
>  # CONFIG_NETFILTER_DEBUG is not set
>  CONFIG_NETFILTER_ADVANCED=y
> -# CONFIG_BRIDGE_NETFILTER is not set
> +CONFIG_BRIDGE_NETFILTER=y

This one seems to be enforced by the netfilter module.

>  #
>  # Core Netfilter Configuration
> @@ -636,6 +641,7 @@
>  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
>  # CONFIG_NETFILTER_XT_MATCH_NFACCT is not set
>  # CONFIG_NETFILTER_XT_MATCH_OWNER is not set
> +# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
>  # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
>  # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
>  # CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
> @@ -657,7 +663,7 @@
>  #
>  CONFIG_NF_DEFRAG_IPV4=m
>  CONFIG_NF_CONNTRACK_IPV4=m
> -# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
> +CONFIG_NF_CONNTRACK_PROC_COMPAT=y

default y....

>  # CONFIG_NF_LOG_ARP is not set
>  CONFIG_NF_LOG_IPV4=m
>  CONFIG_NF_REJECT_IPV4=m
> @@ -966,7 +972,7 @@
>  #
>  # CONFIG_MTD_LPDDR is not set
>  CONFIG_MTD_SPI_NOR=y
> -# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
> +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y

Ditto.

>  # CONFIG_MTD_UBI is not set
>  CONFIG_DTC=y
>  CONFIG_OF=y
> @@ -1201,7 +1207,9 @@
>  # CONFIG_FORCEDETH is not set
>  CONFIG_NET_VENDOR_OKI=y
>  # CONFIG_ETHOC is not set
> -# CONFIG_NET_PACKET_ENGINE is not set
> +CONFIG_NET_PACKET_ENGINE=y
> +# CONFIG_HAMACHI is not set
> +# CONFIG_YELLOWFIN is not set

Again...

>  CONFIG_NET_VENDOR_QLOGIC=y
>  # CONFIG_QLA3XXX is not set
>  # CONFIG_QLCNIC is not set
> @@ -1304,9 +1312,9 @@
>  CONFIG_PPP=m
>  # CONFIG_PPP_BSDCOMP is not set
>  # CONFIG_PPP_DEFLATE is not set
> -CONFIG_PPP_FILTER=y
> +# CONFIG_PPP_FILTER is not set
>  # CONFIG_PPP_MPPE is not set
> -CONFIG_PPP_MULTILINK=y
> +# CONFIG_PPP_MULTILINK is not set
>  CONFIG_PPPOE=m
>  CONFIG_PPP_ASYNC=m
>  # CONFIG_PPP_SYNC_TTY is not set
> @@ -1345,7 +1353,10 @@
>  #
>  # Userland interfaces
>  #
> -# CONFIG_INPUT_MOUSEDEV is not set
> +CONFIG_INPUT_MOUSEDEV=m
> +CONFIG_INPUT_MOUSEDEV_PSAUX=y
> +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
> +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768

Again....

>  # CONFIG_INPUT_JOYDEV is not set
>  # CONFIG_INPUT_EVDEV is not set
>  # CONFIG_INPUT_EVBUG is not set
> @@ -1354,7 +1365,7 @@
>  # Input Device Drivers
>  #
>  CONFIG_INPUT_KEYBOARD=y
> -# CONFIG_KEYBOARD_ATKBD is not set
> +CONFIG_KEYBOARD_ATKBD=m
>  # CONFIG_KEYBOARD_LKKBD is not set
>  # CONFIG_KEYBOARD_GPIO is not set
>  CONFIG_KEYBOARD_GPIO_POLLED=m
> @@ -1366,29 +1377,41 @@
>  # CONFIG_KEYBOARD_SUNKBD is not set
>  # CONFIG_KEYBOARD_OMAP4 is not set
>  # CONFIG_KEYBOARD_XTKBD is not set
> -# CONFIG_INPUT_MOUSE is not set
> +CONFIG_INPUT_MOUSE=y
> +CONFIG_MOUSE_PS2=m
> +CONFIG_MOUSE_PS2_ALPS=y
> +CONFIG_MOUSE_PS2_LOGIPS2PP=y
> +CONFIG_MOUSE_PS2_SYNAPTICS=y
> +CONFIG_MOUSE_PS2_CYPRESS=y
> +CONFIG_MOUSE_PS2_TRACKPOINT=y
> +# CONFIG_MOUSE_PS2_ELANTECH is not set
> +# CONFIG_MOUSE_PS2_SENTELIC is not set
> +# CONFIG_MOUSE_PS2_TOUCHKIT is not set
> +# CONFIG_MOUSE_SERIAL is not set
> +# CONFIG_MOUSE_APPLETOUCH is not set
> +# CONFIG_MOUSE_BCM5974 is not set
> +# CONFIG_MOUSE_VSXXXAA is not set
> +# CONFIG_MOUSE_GPIO is not set
> +# CONFIG_MOUSE_SYNAPTICS_USB is not set
>  # CONFIG_INPUT_JOYSTICK is not set
>  # CONFIG_INPUT_TABLET is not set
>  # CONFIG_INPUT_TOUCHSCREEN is not set
> -CONFIG_INPUT_MISC=y
> -# CONFIG_INPUT_AD714X is not set
> -# CONFIG_INPUT_GPIO_BEEPER is not set
> -# CONFIG_INPUT_GPIO_TILT_POLLED is not set
> -# CONFIG_INPUT_ATI_REMOTE2 is not set
> -# CONFIG_INPUT_KEYSPAN_REMOTE is not set
> -# CONFIG_INPUT_POWERMATE is not set
> -# CONFIG_INPUT_YEALINK is not set
> -# CONFIG_INPUT_CM109 is not set
> -# CONFIG_INPUT_UINPUT is not set
> -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
> -# CONFIG_INPUT_ADXL34X is not set
> -# CONFIG_INPUT_CMA3000 is not set
> +# CONFIG_INPUT_MISC is not set
> 
>  #
>  # Hardware I/O ports
>  #
> -# CONFIG_SERIO is not set
> +CONFIG_SERIO=m
>  CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
> +CONFIG_SERIO_I8042=m
> +CONFIG_SERIO_SERPORT=m
> +# CONFIG_SERIO_PCIPS2 is not set
> +CONFIG_SERIO_LIBPS2=m
> +# CONFIG_SERIO_RAW is not set
> +# CONFIG_SERIO_ALTERA_PS2 is not set
> +# CONFIG_SERIO_PS2MULT is not set
> +# CONFIG_SERIO_ARC_PS2 is not set
> +# CONFIG_SERIO_APBPS2 is not set
>  # CONFIG_GAMEPORT is not set
> 
>  #
> @@ -1636,7 +1659,8 @@
>  #
>  # Graphics support
>  #
> -# CONFIG_VGA_ARB is not set
> +CONFIG_VGA_ARB=y
> +CONFIG_VGA_ARB_MAX_GPUS=16
> 
>  #
>  # Direct Rendering Manager
> @@ -1942,7 +1966,7 @@
>  # Compile-time checks and compiler options
>  #
>  CONFIG_DEBUG_INFO=y
> -CONFIG_DEBUG_INFO_REDUCED=y
> +# CONFIG_DEBUG_INFO_REDUCED is not set
>  # CONFIG_DEBUG_INFO_SPLIT is not set
>  # CONFIG_DEBUG_INFO_DWARF4 is not set
>  CONFIG_ENABLE_WARN_DEPRECATED=y
> @@ -2015,7 +2039,7 @@
>  # CONFIG_SPARSE_RCU_POINTER is not set
>  # CONFIG_TORTURE_TEST is not set
>  # CONFIG_RCU_TORTURE_TEST is not set
> -CONFIG_RCU_CPU_STALL_TIMEOUT=60
> +CONFIG_RCU_CPU_STALL_TIMEOUT=21
>  # CONFIG_RCU_CPU_STALL_INFO is not set
>  # CONFIG_RCU_TRACE is not set
>  # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set

Ok, I think most of it is because of options enabled by default. I
wonder why that happens, but I also wonder why it hasn't been picked
up by my tests.

What configuration are you using? Do you have any modifications of
some sort (beside the switch to 3.18?)

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20141213/59317812/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list