Skip to contentSkip to conversation

kernel BUG at kernel/kallsyms.c:222!

DISCUSSION Applied Axel Lin 6 participants 29 messages Nov 7, 2013 – Dec 10, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

Hi,
I got below oops while debugging a sd controller driver:

[    4.032026] ------------[ cut here ]------------
[    4.036730] kernel BUG at kernel/kallsyms.c:222!
[    4.041501] Internal error: Oops - BUG: 0 [#1] ARM
[    4.046847] CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.12.0-00061-g0835d93-dirty #1657

I can avoid the oops by either revert commit f6537f2f0eba4eba "scripts/kallsyms: filter symbols not in kernel address space", or comment out below line in drivers/mmc/core/sdio.c.

        dev_dbg(&card->dev, "calling %pF\n", f->vendor_fixup);

The f->vendor_fixup points to add_quirk_for_sdio_devices. It looks like the symbol add_quirk_for_sdio_devices is missing.

So I revert commit f6537f2f and check /proc/kallsyms:
~ # grep add_quirk_for_sdio_devices /proc/kallsyms 00157bf8 t add_quirk_for_sdio_devices

If I don't revert commit f6537f2f and just comment out above dev_dbg line, Checking /proc/kallsyms then I got:
~ # grep add_quirk_for_sdio_devices /proc/kallsyms [sched_delayed] sched: RT throttling activated

BUG: soft lockup - CPU#0 stuck for 21s! [grep:59]

CPU: 0 PID: 59 Comm: grep Not tainted 3.12.0-00061-g0835d93-dirty #1675
task: 01d36320 ti: 008be000 task.ti: 008be000

BTW, I'm testing it on a noMMU platform (arm7tdmi).

Regards,
Axel

#1 lore raw

Hi,

Quoted 24 lines · Axel Lin

Hi,
I got below oops while debugging a sd controller driver:

[    4.032026] ------------[ cut here ]------------
[    4.036730] kernel BUG at kernel/kallsyms.c:222!
[    4.041501] Internal error: Oops - BUG: 0 [#1] ARM
[    4.046847] CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.12.0-00061-g0835d93-dirty #1657

I can avoid the oops by either revert commit f6537f2f0eba4eba "scripts/kallsyms: filter symbols not in kernel address space", or comment out below line in drivers/mmc/core/sdio.c.

        dev_dbg(&card->dev, "calling %pF\n", f->vendor_fixup);

The f->vendor_fixup points to add_quirk_for_sdio_devices. It looks like the symbol add_quirk_for_sdio_devices is missing.

So I revert commit f6537f2f and check /proc/kallsyms:
~ # grep add_quirk_for_sdio_devices /proc/kallsyms 00157bf8 t add_quirk_for_sdio_devices

If I don't revert commit f6537f2f and just comment out above dev_dbg line, Checking /proc/kallsyms then I got:
~ # grep add_quirk_for_sdio_devices /proc/kallsyms [sched_delayed] sched: RT throttling activated

Quoted 6 lines
BUG: soft lockup - CPU#0 stuck for 21s! [grep:59]

CPU: 0 PID: 59 Comm: grep Not tainted 3.12.0-00061-g0835d93-dirty #1675
task: 01d36320 ti: 008be000 task.ti: 008be000

BTW, I'm testing it on a noMMU platform (arm7tdmi).

Could you share what is the value of CONFIG_PAGE_OFFSET on your noMMU platform?

Thanks,

Signature · 1 line
Ming Lei
author
#2 lore raw

2013/11/7 Ming Lei <[email protected]>:

Quoted 29 lines

Hi,

Quoted 26 lines · Axel Lin

Hi,
I got below oops while debugging a sd controller driver:

[    4.032026] ------------[ cut here ]------------
[    4.036730] kernel BUG at kernel/kallsyms.c:222!
[    4.041501] Internal error: Oops - BUG: 0 [#1] ARM
[    4.046847] CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.12.0-00061-g0835d93-dirty #1657

I can avoid the oops by either revert commit f6537f2f0eba4eba "scripts/kallsyms: filter symbols not in kernel address space", or comment out below line in drivers/mmc/core/sdio.c.

        dev_dbg(&card->dev, "calling %pF\n", f->vendor_fixup);

The f->vendor_fixup points to add_quirk_for_sdio_devices. It looks like the symbol add_quirk_for_sdio_devices is missing.

So I revert commit f6537f2f and check /proc/kallsyms:
~ # grep add_quirk_for_sdio_devices /proc/kallsyms 00157bf8 t add_quirk_for_sdio_devices

If I don't revert commit f6537f2f and just comment out above dev_dbg line, Checking /proc/kallsyms then I got:
~ # grep add_quirk_for_sdio_devices /proc/kallsyms [sched_delayed] sched: RT throttling activated

BUG: soft lockup - CPU#0 stuck for 21s! [grep:59]
Quoted 7 lines
Quoted 4 lines
CPU: 0 PID: 59 Comm: grep Not tainted 3.12.0-00061-g0835d93-dirty #1675
task: 01d36320 ti: 008be000 task.ti: 008be000

BTW, I'm testing it on a noMMU platform (arm7tdmi).

Could you share what is the value of CONFIG_PAGE_OFFSET on your noMMU platform?

$ grep  CONFIG_PAGE_OFFSET .config
CONFIG_PAGE_OFFSET=0xC0000000
Quoted 5 lines

Thanks,
--
Ming Lei

#3 lore raw
Quoted 6 lines · Axel Lin

2013/11/7 Ming Lei <[email protected]>:

Quoted 2 lines

Could you share what is the value of CONFIG_PAGE_OFFSET on your noMMU platform?

$ grep  CONFIG_PAGE_OFFSET .config
CONFIG_PAGE_OFFSET=0xC0000000

It seems that the PAGE_OFFSET is _not_ the start of kernel memory in linear address space on your platform, I think it may not be a correct usage, even for uClinux.

Thanks,

Signature · 1 line
Ming Lei
author
#4 lore raw

2013/11/7 Ming Lei <[email protected]>:

Quoted 11 lines · Axel Lin
Quoted 6 lines

2013/11/7 Ming Lei <[email protected]>:

Quoted 2 lines

Could you share what is the value of CONFIG_PAGE_OFFSET on your noMMU platform?

$ grep  CONFIG_PAGE_OFFSET .config
CONFIG_PAGE_OFFSET=0xC0000000

It seems that the PAGE_OFFSET is _not_ the start of kernel memory in linear address space on your platform, I think it may not be a correct usage, even for uClinux.

hi Ming,
Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs...

$ make at91_dt_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make ep93xx_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config
( at91x40_defconfig is also arm7tdmi )

Regards,
Axel

#5 lore raw

Hi,

Quoted 4 lines · Axel Lin

hi Ming,
Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs...

Quoted 8 lines
$ make at91_dt_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make ep93xx_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config
( at91x40_defconfig is also arm7tdmi )

Firstly it can be configured via VMSPLIT_3GVMSPLIT_2G/VMSPLIT_1G.

Secondly, configurable or not isn't the point, and maybe some uclinux platforms do not use CONFIG_PAGE_OFFSET at all, but they should set it as a reasonable value or at least be below than the start link address of vmlinux.

Thanks,

Signature · 1 line
Ming Lei
author
#6 lore raw

2013/11/7 Ming Lei <[email protected]>:

Quoted 16 lines

Hi,

Quoted 4 lines · Axel Lin

hi Ming,
Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs...

Quoted 8 lines
$ make at91_dt_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make ep93xx_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config
( at91x40_defconfig is also arm7tdmi )
Quoted 6 lines

Firstly it can be configured via VMSPLIT_3GVMSPLIT_2G/VMSPLIT_1G.

Secondly, configurable or not isn't the point, and maybe some uclinux platforms do not use CONFIG_PAGE_OFFSET at all, but they should set it as a reasonable value or at least be below than the start link address of vmlinux.

Hi Ming,

I found in arch/arm/include/asm/memory.h:
CONFIG_PAGE_OFFSET is not used if !CONFIG_MMU.
So looks like setting CONFIG_PAGE_OFFSET to other value still won't work.

Thanks,
Axel

#7 lore raw
Quoted 24 lines · Axel Lin

2013/11/7 Ming Lei <[email protected]>:

Quoted 16 lines

Hi,

Quoted 4 lines · Axel Lin

hi Ming,
Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs...

Quoted 8 lines
$ make at91_dt_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make ep93xx_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config
( at91x40_defconfig is also arm7tdmi )
Quoted 6 lines

Firstly it can be configured via VMSPLIT_3GVMSPLIT_2G/VMSPLIT_1G.

Secondly, configurable or not isn't the point, and maybe some uclinux platforms do not use CONFIG_PAGE_OFFSET at all, but they should set it as a reasonable value or at least be below than the start link address of vmlinux.

Quoted 5 lines

Hi Ming,

I found in arch/arm/include/asm/memory.h:
CONFIG_PAGE_OFFSET is not used if !CONFIG_MMU.
So looks like setting CONFIG_PAGE_OFFSET to other value still won't work.

This seems like the simplest solution, but it may mean you still have crap in /proc/kallsyms.

Does it work for you?

Thanks,
Rusty.

scripts/link-vmlinux.sh +3 -1
index 32b10f53d0b4..c3bd3efec4cc 100644
@@ -82,7 +82,9 @@ kallsyms()
 		kallsymopt="${kallsymopt} --all-symbols"
 	fi
 
-	kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
+	if [ -n "${CONFIG_MMU}" ]; then
+		kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
+	fi
 
 	local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
 		      ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
#8 lore raw
Quoted 27 lines · Rusty Russell
Quoted 26 lines · Axel Lin

2013/11/7 Ming Lei <[email protected]>:

Quoted 16 lines

Hi,

Quoted 4 lines · Axel Lin

hi Ming,
Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs...

Quoted 8 lines
$ make at91_dt_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make ep93xx_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config
( at91x40_defconfig is also arm7tdmi )
Quoted 6 lines

Firstly it can be configured via VMSPLIT_3GVMSPLIT_2G/VMSPLIT_1G.

Secondly, configurable or not isn't the point, and maybe some uclinux platforms do not use CONFIG_PAGE_OFFSET at all, but they should set it as a reasonable value or at least be below than the start link address of vmlinux.

Hi Ming,

Quoted 8 lines
Quoted 3 lines

I found in arch/arm/include/asm/memory.h:
CONFIG_PAGE_OFFSET is not used if !CONFIG_MMU.
So looks like setting CONFIG_PAGE_OFFSET to other value still won't work.

This seems like the simplest solution, but it may mean you still have crap in /proc/kallsyms.

Does it work for you?

Yes, it should work, but I am wondering if perf can work on uClinux.

Axel, could you post your .config?

Thanks,

Signature · 1 line
Ming Lei
author
#9 lore raw
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Hi Ming,

I found in arch/arm/include/asm/memory.h:
CONFIG_PAGE_OFFSET is not used if !CONFIG_MMU.
So looks like setting CONFIG_PAGE_OFFSET to other value still won't work.

Quoted 8 lines
Quoted 4 lines

This seems like the simplest solution, but it may mean you still have crap in /proc/kallsyms.

Does it work for you?

Yes, it should work, but I am wondering if perf can work on uClinux.

Axel, could you post your .config?

Hi Ming,

I have patches on top of 3.12 to support gpl32700 SoC. So you cannot find this platform on mainline kernel.
I havn't tried perf, below is my config for your reference:
(to make the config smaller, I grep out disabled config entries.)

#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.12.0 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_VECTORS_BASE=0x00000000 CONFIG_PHYS_OFFSET=0x00000000
CONFIG_GENERIC_BUG=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_IRQ_WORK=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y
CONFIG_DEFAULT_HOSTNAME="(none)"

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y

#
# Timers subsystem
#
CONFIG_HZ_PERIODIC=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_HAVE_UID16=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_BASE_FULL=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_AIO=y
CONFIG_EMBEDDED=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y

#
# Kernel Performance Events And Counters
#
CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_GENERIC_IDLE_POLL_SETUP=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_OLD_SIGACTION=y

#
# GCOV-based kernel profiling
#
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_BASE_SMALL=0
CONFIG_BLOCK=y

#
# Partition Types
#
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED="noop"
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
CONFIG_INLINE_READ_UNLOCK=y
CONFIG_INLINE_READ_UNLOCK_IRQ=y
CONFIG_INLINE_WRITE_UNLOCK=y
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y

#
# System Type
#
CONFIG_ARCH_GPL327XX=y

#
# GPL327XX Implementations
#
CONFIG_ARCH_GPL32700=y

#
# Processor Type
#
CONFIG_CPU_ARM7TDMI=y
CONFIG_CPU_32v4T=y
CONFIG_CPU_ABRT_LV4T=y
CONFIG_CPU_PABRT_LEGACY=y
CONFIG_CPU_CACHE_V4=y

#
# Processor Features
#
CONFIG_TLS_REG_EMUL=y
CONFIG_NEED_KUSER_HELPERS=y
CONFIG_KUSER_HELPERS=y
CONFIG_ARM_L1_CACHE_SHIFT=5
CONFIG_ARM_NR_BANKS=8
CONFIG_MULTI_IRQ_HANDLER=y
CONFIG_SET_MEM_PARAM=y
CONFIG_DRAM_BASE=0x00000000
CONFIG_DRAM_SIZE=0x02000000
CONFIG_FLASH_MEM_BASE=0x20000000
CONFIG_FLASH_SIZE=0x00400000
CONFIG_PROCESSOR_ID=0x41807700

#
# Bus support
#

#
# Kernel Features
#
CONFIG_VMSPLIT_3G=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_ARCH_NR_GPIO=0
CONFIG_PREEMPT_NONE=y
CONFIG_HZ_FIXED=0
CONFIG_HZ_100=y
CONFIG_HZ=100
CONFIG_AEABI=y
CONFIG_HAVE_ARCH_PFN_VALID=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=999999
CONFIG_ZONE_DMA_FLAG=0
CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
CONFIG_NEED_PER_CPU_KM=y
CONFIG_FORCE_MAX_ZONEORDER=11

#
# Boot options
#
CONFIG_USE_OF=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE=""
CONFIG_AUTO_ZRELADDR=y

#
# CPU Power Management
#

#
# CPU Idle
#

#
# Floating point emulation
#

#
# At least one emulation must be selected
#

#
# Userspace binary formats
#
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_BINFMT_FLAT=y
CONFIG_COREDUMP=y

#
# Power management options
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_XFRM=y
CONFIG_INET=y
CONFIG_NET_IP_TUNNEL=y
CONFIG_INET_TUNNEL=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_IPV6=y
CONFIG_INET6_XFRM_MODE_TRANSPORT=y
CONFIG_INET6_XFRM_MODE_TUNNEL=y
CONFIG_INET6_XFRM_MODE_BEET=y
CONFIG_IPV6_SIT=y
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_HAVE_NET_DSA=y
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y

#
# Network testing
#
CONFIG_WIRELESS=y
CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_MAC80211=y
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_HAVE_BPF_JIT=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y

#
# Bus devices
#
CONFIG_MTD=y
CONFIG_MTD_OF_PARTS=y

#
# User Modules And Translation Layers
#
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_RAM=y
CONFIG_MTD_ROM=y

#
# Mapping drivers for chip access
#

#
# Self-contained MTD device drivers
#
CONFIG_MTD_M25P80=y

#
# Disk-On-Chip Device Drivers
#

#
# LPDDR flash memory drivers
#
CONFIG_DTC=y
CONFIG_OF=y

#
# Device Tree and Open Firmware support
#
CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_NET=y
CONFIG_OF_MTD=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096

#
# Misc devices
#

#
# EEPROM support
#

#
# Texas Instruments shared transport line discipline #

#
# Altera FPGA firmware download module
#

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y

#
# CAIF transport drivers
#

#
# Distributed Switch Architecture drivers
#
CONFIG_WLAN=y

#
# Enable WiMAX (Networking options) to see the WiMAX drivers #

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y

#
# Character devices
#
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256

#
# Serial drivers
#

#
# Non-8250 serial port support
#
CONFIG_SERIAL_GPL327XX=y
CONFIG_SERIAL_GPL327XX_UART_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SPI=y
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
CONFIG_SPI_GPL327XX=y

#
# SPI Protocol Masters
#

#
# PPS support
#

#
# PPS generators support
#

#
# PTP clock support
#

#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. #
CONFIG_PINCTRL=y

#
# Pin controllers
#
CONFIG_PINMUX=y
CONFIG_PINCONF=y
CONFIG_GENERIC_PINCONF=y
CONFIG_PINCTRL_GPL327XX=y
CONFIG_PINCTRL_GPL32700=y
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIO_DEVRES=y
CONFIG_GPIOLIB=y
CONFIG_OF_GPIO=y

#
# Memory mapped GPIO drivers:
#

#
# I2C GPIO expanders:
#

#
# PCI GPIO expanders:
#

#
# SPI GPIO expanders:
#

#
# AC97 GPIO expanders:
#

#
# LPC GPIO expanders:
#

#
# MODULbus GPIO expanders:
#

#
# USB GPIO expanders:
#
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
CONFIG_BCMA_POSSIBLE=y

#
# Broadcom specific AMBA
#

#
# Multifunction device drivers
#
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y

#
# Graphics support
#

#
# Console display driver support
#
CONFIG_DUMMY_CONSOLE=y

#
# HID support
#
CONFIG_HID=y
CONFIG_HID_GENERIC=y

#
# Special HID drivers
#
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_MMC=y
CONFIG_MMC_DEBUG=y

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=8
CONFIG_MMC_BLOCK_BOUNCE=y

#
# MMC/SD/SDIO Host Controller Drivers
#
CONFIG_MMC_GPL327XX=y
CONFIG_RTC_LIB=y
CONFIG_DMADEVICES=y

#
# DMA Devices
#
CONFIG_DMA_OF=y

#
# Virtio drivers
#

#
# Microsoft Hyper-V guest support
#
CONFIG_CLKDEV_LOOKUP=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y

#
# Common Clock Framework
#

#
# Hardware Spinlock drivers
#
CONFIG_CLKSRC_OF=y
CONFIG_CLKSRC_MMIO=y

#
# Remoteproc drivers
#

#
# Rpmsg drivers
#
CONFIG_IRQCHIP=y

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_INOTIFY_USER=y

#
# Caches
#

#
# CD-ROM/DVD Filesystems
#

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_MISC_FILESYSTEMS=y
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=2
CONFIG_JFFS2_FS_WRITEBUFFER=y
CONFIG_JFFS2_SUMMARY=y
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
CONFIG_ROMFS_FS=y
CONFIG_ROMFS_BACKED_BY_BLOCK=y
CONFIG_ROMFS_ON_BLOCK=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y

#
# Kernel hacking
#

#

# printk and dmesg options
#
CONFIG_PRINTK_TIME=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4

#
# Compile-time checks and compiler options
#
CONFIG_DEBUG_INFO=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_FRAME_WARN=1024
CONFIG_DEBUG_KERNEL=y

#
# Memory Debugging
#
CONFIG_HAVE_DEBUG_KMEMLEAK=y

#
# Debug Lockups and Hangs
#
CONFIG_LOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_ON_OOPS_VALUE=1

#
# Lock Debugging (spinlocks, mutexes, etc...)
#
CONFIG_DEBUG_BUGVERBOSE=y

#
# RCU Debugging
#
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACING_SUPPORT=y

#
# Runtime Testing
#
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_ARM_UNWIND=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_GPL327XX_UART=y
CONFIG_DEBUG_LL_INCLUDE="debug/gpl327xx.S"
CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h"
CONFIG_EARLY_PRINTK=y

#
# Security options
#
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_WORKQUEUE=y

#
# Authenticated Encryption with Associated Data
#

#
# Block modes
#
CONFIG_CRYPTO_CBC=y

#
# Hash modes
#

#
# Digest
#
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_DES=y

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y

#
# Random Number Generation
#
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_HW=y

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_NET_UTILS=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IO=y
CONFIG_CRC32=y
CONFIG_CRC32_SLICEBY8=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_DQL=y
CONFIG_NLATTR=y
CONFIG_GENERIC_ATOMIC64=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_AVERAGE=y

#10 lore raw

Hi Axel,

Quoted 6 lines · Axel Lin

Hi Ming,

I have patches on top of 3.12 to support gpl32700 SoC. So you cannot find this platform on mainline kernel.

OK, I see.

Quoted 2 lines

I havn't tried perf, below is my config for your reference:
(to make the config smaller, I grep out disabled config entries.)

I doubt CONFIG_VMSPLIT_3G/CONFIG_PAGE_OFFSET isn't
used at all in your unmerged patchset, also your link script should be different with in-tree arch/arm/kernel/vmlinux.lds.S, otherwise you may put all your kernel symbols after 0xC00000000.

Maybe you need to not define PAGE_OFFSET and let it be PHYS_OFFSET at default, also VMSPLIT_3G shouldn't have been there on non-MMU linux.

Thanks,

Signature · 1 line
Ming Lei
#11 lore raw
Quoted 15 lines · Ming Lei

Hi Axel,

Quoted 6 lines · Axel Lin

Hi Ming,

I have patches on top of 3.12 to support gpl32700 SoC. So you cannot find this platform on mainline kernel.

OK, I see.

Quoted 2 lines

I havn't tried perf, below is my config for your reference:
(to make the config smaller, I grep out disabled config entries.)

Quoted 8 lines

I doubt CONFIG_VMSPLIT_3G/CONFIG_PAGE_OFFSET isn't
used at all in your unmerged patchset, also your link script should be different with in-tree arch/arm/kernel/vmlinux.lds.S, otherwise you may put all your kernel symbols after 0xC00000000.

Maybe you need to not define PAGE_OFFSET and let it be PHYS_OFFSET at default, also VMSPLIT_3G shouldn't have been there on non-MMU linux.

OK, unless there are other platforms which have this issue, I'll leave it with you to hold this patch for merge with your SoC.

Cheers,
Rusty.

author
#12 lore raw

2013/11/11 Rusty Russell <[email protected]>:

Quoted 21 lines
Quoted 20 lines · Ming Lei

Hi Axel,

Quoted 6 lines · Axel Lin

Hi Ming,

I have patches on top of 3.12 to support gpl32700 SoC. So you cannot find this platform on mainline kernel.

OK, I see.

Quoted 2 lines

I havn't tried perf, below is my config for your reference:
(to make the config smaller, I grep out disabled config entries.)

I doubt CONFIG_VMSPLIT_3G/CONFIG_PAGE_OFFSET isn't
used at all in your unmerged patchset, also your link script should be different with in-tree arch/arm/kernel/vmlinux.lds.S, otherwise you may put all your kernel symbols after 0xC00000000.

Quoted 6 lines
Quoted 3 lines

Maybe you need to not define PAGE_OFFSET and let it be PHYS_OFFSET at default, also VMSPLIT_3G shouldn't have been there on non-MMU linux.

OK, unless there are other platforms which have this issue, I'll leave it with you to hold this patch for merge with your SoC.

Hi Rusty,

I don't have other noMMU platform to test.
But I think this issue impacts various !CONFIG_MMU platforms:
We have CONFIG_PAGE_OFFSET=0xC0000000 in various default configs. For !CONFIG_MMU case, it just don't use the CONFIG_PAGE_OFFSET setting. So use CONFIG_PAGE_OFFSET to filter symbols looks wrong to me for all !CONFIG_MMU cases.

Below is PAGE_OFFSET setting for !CONFIG_MMU case:
(arch/arm/include/asm/memory.h)

#ifndef PHYS_OFFSET
#define PHYS_OFFSET UL(CONFIG_DRAM_BASE)
#endif

#ifndef END_MEM
#define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
#endif

#ifndef PAGE_OFFSET
#define PAGE_OFFSET (PHYS_OFFSET)
#endif

My patchs for gpl327xx SoC is still in very early stage.
I think you should send your fix upstream because I think it impacts other noMMU platforms (for above reason).

Thanks,
Axel

#13 lore raw

Hi,

Quoted 22 lines · Axel Lin

2013/11/11 Rusty Russell <[email protected]>:

Hi Rusty,

I don't have other noMMU platform to test.
But I think this issue impacts various !CONFIG_MMU platforms:
We have CONFIG_PAGE_OFFSET=0xC0000000 in various default configs. For !CONFIG_MMU case, it just don't use the CONFIG_PAGE_OFFSET setting. So use CONFIG_PAGE_OFFSET to filter symbols looks wrong to me for all !CONFIG_MMU cases.

Below is PAGE_OFFSET setting for !CONFIG_MMU case:
(arch/arm/include/asm/memory.h)

#ifndef PHYS_OFFSET
#define PHYS_OFFSET UL(CONFIG_DRAM_BASE)
#endif

#ifndef END_MEM
#define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
#endif

Quoted 7 lines

#ifndef PAGE_OFFSET
#define PAGE_OFFSET (PHYS_OFFSET)
#endif

My patchs for gpl327xx SoC is still in very early stage.
I think you should send your fix upstream because I think it impacts other noMMU platforms (for above reason).

I suggest to do it when we are clear behind the break.

As I mentioned, no matter what PAGE_OFFSET is, if you link vmlinux from the address of PAGE_OFFSET(that is what arm's link script in tree does), the filter won't break anything.

Thanks,

Signature · 1 line
Ming Lei
author
#14 lore raw

2013/11/11 Ming Lei <[email protected]>:

Quoted 33 lines

Hi,

Quoted 22 lines · Axel Lin

2013/11/11 Rusty Russell <[email protected]>:

Hi Rusty,

I don't have other noMMU platform to test.
But I think this issue impacts various !CONFIG_MMU platforms:
We have CONFIG_PAGE_OFFSET=0xC0000000 in various default configs. For !CONFIG_MMU case, it just don't use the CONFIG_PAGE_OFFSET setting. So use CONFIG_PAGE_OFFSET to filter symbols looks wrong to me for all !CONFIG_MMU cases.

Below is PAGE_OFFSET setting for !CONFIG_MMU case:
(arch/arm/include/asm/memory.h)

#ifndef PHYS_OFFSET
#define PHYS_OFFSET UL(CONFIG_DRAM_BASE)
#endif

#ifndef END_MEM
#define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
#endif

Quoted 7 lines

#ifndef PAGE_OFFSET
#define PAGE_OFFSET (PHYS_OFFSET)
#endif

My patchs for gpl327xx SoC is still in very early stage.
I think you should send your fix upstream because I think it impacts other noMMU platforms (for above reason).

Quoted 5 lines

I suggest to do it when we are clear behind the break.

As I mentioned, no matter what PAGE_OFFSET is, if you link vmlinux from the address of PAGE_OFFSET(that is what arm's link script in tree does), the filter won't break anything.

Hi Ming,

commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", uses CONFIG_PAGE_OFFSET as kernel_start_addr.
However, for !CONFIG_MMU case we have :

    PAGE_OFFSET != CONFIG_PAGE_OFFSET.

That is why I think the filter breaks !MMU platforms.

Regards,
Axel

#15 lore raw

Hi,

Quoted 8 lines · Axel Lin

2013/11/11 Ming Lei <[email protected]>:

Hi Ming,

commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", uses CONFIG_PAGE_OFFSET as kernel_start_addr.
However, for !CONFIG_MMU case we have :

    PAGE_OFFSET != CONFIG_PAGE_OFFSET.

Yes, it is the cause, and strictly speaking, commit f6537f2f is wrong, but triggered with bogus CONFIG_PAGE_OFFSET if !CONFIG_MMU.

We can fix it either by Rusty's patch or removing the bogus CONFIG_PAGE_OFFSET for !CONFIG_MMU.

Thanks,

Signature · 1 line
Ming Lei
#16 lore raw

Hi,

Quoted 12 lines · Ming Lei

Hi,

Quoted 8 lines · Axel Lin

2013/11/11 Ming Lei <[email protected]>:

Hi Ming,

commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", uses CONFIG_PAGE_OFFSET as kernel_start_addr.
However, for !CONFIG_MMU case we have :

    PAGE_OFFSET != CONFIG_PAGE_OFFSET.
Quoted 5 lines

Yes, it is the cause, and strictly speaking, commit f6537f2f is wrong, but triggered with bogus CONFIG_PAGE_OFFSET if !CONFIG_MMU.

We can fix it either by Rusty's patch or removing the bogus CONFIG_PAGE_OFFSET for !CONFIG_MMU.

Rusty, maybe we need revert commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", since CONFIG_PAGE_OFFSET may be bogus on !MMU or not defined on ARCHs(most of 64bit arch, no regression report because scripts/kallsyms may get zero kernel_start_addr)

As I thought of, another way for fixing original problem is to define a RO global variable in kernel and set its value as PAGE_OFFSET, then let scripts/kallsyms use it as kernel start address, or do you other suggestions?

Thanks,

Signature · 1 line
Ming Lei
#17 lore raw
Quoted 18 lines · Ming Lei

Hi,

Quoted 15 lines · Ming Lei

Hi,

Quoted 8 lines · Axel Lin

2013/11/11 Ming Lei <[email protected]>:

Hi Ming,

commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", uses CONFIG_PAGE_OFFSET as kernel_start_addr.
However, for !CONFIG_MMU case we have :

     PAGE_OFFSET != CONFIG_PAGE_OFFSET.

Yes, it is the cause, and strictly speaking, commit f6537f2f is wrong, but triggered with bogus CONFIG_PAGE_OFFSET if !CONFIG_MMU.

Quoted 9 lines
Quoted 2 lines

We can fix it either by Rusty's patch or removing the bogus CONFIG_PAGE_OFFSET for !CONFIG_MMU.

Rusty, maybe we need revert commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", since CONFIG_PAGE_OFFSET may be bogus on !MMU or not defined on ARCHs(most of 64bit arch, no regression report because scripts/kallsyms may get zero kernel_start_addr)

For me on Cortex-R7 (nommu) f6537f2f breaks boot (Oops very early on...) and reverting it fixes the problem... However, as you note, we have a 'bogus' CONFIG_PAGE_OFFSET (0xC0000000) for !MMU so another approach would be to fix that...

I've tested the patch below and it solves the ARM side of things - so gives you an option other than a complete revert. Happy to put this in to RMK's patch system if you'd prefer not to have to revert and he's happy with the patch.

Jonny

-------->8-----------

arch/arm/Kconfig +1 -0
index d601be3..6756651 100644
@@ -1609,6 +1609,7 @@ endchoice
 
 config PAGE_OFFSET
        hex
+       default PHYS_OFFSET if !MMU
        default 0x40000000 if VMSPLIT_1G
        default 0x80000000 if VMSPLIT_2G
        default 0xC0000000
#18 lore raw
Quoted 4 lines · Jonathan Austin

I've tested the patch below and it solves the ARM side of things - so gives you an option other than a complete revert. Happy to put this in to RMK's patch system if you'd prefer not to have to revert and he's happy with the patch.

I think this is the right solution because it then means that this symbol has the same meaning whether on MMU or !MMU - and getting rid of these kinds of gratuitous variances are the only way that !MMU is going to become less fragile.

#19 lore raw
Quoted 10 lines · Russell King - ARM Linux
Quoted 4 lines · Jonathan Austin

I've tested the patch below and it solves the ARM side of things - so gives you an option other than a complete revert. Happy to put this in to RMK's patch system if you'd prefer not to have to revert and he's happy with the patch.

I think this is the right solution because it then means that this symbol has the same meaning whether on MMU or !MMU - and getting rid of these kinds of gratuitous variances are the only way that !MMU is going to become less fragile.

The patch only fixes problem on arm, and other !MMU&&!ARM archs should be affected too.

Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs, such as 64bit ARCHs.

Currently, I suggest to filter only on ARM as attachment patch if we plan to merge Jonathan's patch, otherwise a more complicated approach has to be figured out to do the filter(such as, define a readonly symbol in kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for filtering).

Thanks,

Signature · 8 lines
Ming Lei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filter-only-on-arm.patch
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131112/66bf6a2d/attachment.bin>
#20 lore raw
Quoted 16 lines · Ming Lei
Quoted 10 lines · Russell King - ARM Linux
Quoted 4 lines · Jonathan Austin

I've tested the patch below and it solves the ARM side of things - so gives you an option other than a complete revert. Happy to put this in to RMK's patch system if you'd prefer not to have to revert and he's happy with the patch.

I think this is the right solution because it then means that this symbol has the same meaning whether on MMU or !MMU - and getting rid of these kinds of gratuitous variances are the only way that !MMU is going to become less fragile.

The patch only fixes problem on arm, and other !MMU&&!ARM archs should be affected too.

Quoted 8 lines

Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs, such as 64bit ARCHs.

Currently, I suggest to filter only on ARM as attachment patch if we plan to merge Jonathan's patch, otherwise a more complicated approach has to be figured out to do the filter(such as, define a readonly symbol in kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for filtering).

I'm happy with that approach, though allowing only ARM seems a bit conservative - is it the only architecture we actually expect to work?

Jonny

Quoted 5 lines

Thanks,

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782

#21 lore raw
Quoted 9 lines · Jonathan Austin
Quoted 5 lines

Currently, I suggest to filter only on ARM as attachment patch if we plan to merge Jonathan's patch, otherwise a more complicated approach has to be figured out to do the filter(such as, define a readonly symbol in kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for filtering).

I'm happy with that approach, though allowing only ARM seems a bit conservative - is it the only architecture we actually expect to work?

Yes, the problem is only reported on ARM, so let's do it.

Thanks,

Signature · 1 line
Ming Lei
author
#22 lore raw
In reply to Ming Lei

2013/11/12 Ming Lei <[email protected]>:

Quoted 16 lines
Quoted 10 lines · Russell King - ARM Linux
Quoted 4 lines · Jonathan Austin

I've tested the patch below and it solves the ARM side of things - so gives you an option other than a complete revert. Happy to put this in to RMK's patch system if you'd prefer not to have to revert and he's happy with the patch.

I think this is the right solution because it then means that this symbol has the same meaning whether on MMU or !MMU - and getting rid of these kinds of gratuitous variances are the only way that !MMU is going to become less fragile.

The patch only fixes problem on arm, and other !MMU&&!ARM archs should be affected too.

Quoted 8 lines

Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs, such as 64bit ARCHs.

Currently, I suggest to filter only on ARM as attachment patch if we plan to merge Jonathan's patch, otherwise a more complicated approach has to be figured out to do the filter(such as, define a readonly symbol in kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for filtering).

Hi Ming,
You missed "; then" in the end of if statement in your patch.

So I got below error with your patch:
scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
make: *** [vmlinuxclean] Error 2

Regards,
Axel

#23 lore raw

Hi Axel,

Quoted 7 lines · Axel Lin

Hi Ming,
You missed "; then" in the end of if statement in your patch.

So I got below error with your patch:
scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
make: *** [vmlinuxclean] Error 2

Thanks for your test, and I have fixed it and post a formal one for merge, and you can find these two patches on arm list, but forget to Cc you, sorry for that.

Thanks,

Signature · 1 line
Ming Lei
author
#24 lore raw

2013/11/13 Ming Lei <[email protected]>:

Quoted 7 lines

Hi Axel,

Quoted 4 lines · Axel Lin

Hi Ming,
You missed "; then" in the end of if statement in your patch.

Quoted 7 lines
Quoted 3 lines

So I got below error with your patch:
scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
make: *** [vmlinuxclean] Error 2

Thanks for your test, and I have fixed it and post a formal one for merge, and you can find these two patches on arm list, but forget to Cc you, sorry for that.

Hi Ming,
Both your patch and Jonathan's patch are still not in linux-next. Any chance to resend the patchs to RMK's patch system?

Thanks,
Axel

#25 lore raw

Hi Axel,

I am fine to resend it to RMK's patch system, but I am not sure if Russell would like to host it.

Maybe it is better to push it via Rusty's tree since the change is only on scripts/, and it doesn't depend on the 1st one.

Rusty, could you pick up the patch with title of "scripts/link-vmlinux.sh: only filter kernel symbols for arm"?

Thanks,
--
Ming Lei

Quoted 22 lines · Axel Lin

2013/11/13 Ming Lei <[email protected]>:

Quoted 7 lines

Hi Axel,

Quoted 4 lines · Axel Lin

Hi Ming,
You missed "; then" in the end of if statement in your patch.

Quoted 7 lines
Quoted 3 lines

So I got below error with your patch:
scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
make: *** [vmlinuxclean] Error 2

Thanks for your test, and I have fixed it and post a formal one for merge, and you can find these two patches on arm list, but forget to Cc you, sorry for that.

Hi Ming,
Both your patch and Jonathan's patch are still not in linux-next. Any chance to resend the patchs to RMK's patch system?

Thanks,
Axel

Signature · 1 line
Ming Lei
#26 lore raw
Quoted 10 lines · Ming Lei

Hi Axel,

I am fine to resend it to RMK's patch system, but I am not sure if Russell would like to host it.

Maybe it is better to push it via Rusty's tree since the change is only on scripts/, and it doesn't depend on the 1st one.

Rusty, could you pick up the patch with title of "scripts/link-vmlinux.sh: only filter kernel symbols for arm"?

OK, and I added the correct Fixes: line so the stable people can track it properly:

Cc Rusty Russell <[email protected]>
Fixes f6537f2f0eba4eba3354e48dbe3047db6d8b6254

BTW, you misspelled Signed-off-by :)

Applied,
Rusty.

Quoted 33 lines

Thanks,
--
Ming Lei

Quoted 22 lines · Axel Lin

2013/11/13 Ming Lei <[email protected]>:

Quoted 7 lines

Hi Axel,

Quoted 4 lines · Axel Lin

Hi Ming,
You missed "; then" in the end of if statement in your patch.

Quoted 7 lines
Quoted 3 lines

So I got below error with your patch:
scripts/link-vmlinux.sh: line 87: syntax error near unexpected token `fi'
make: *** [vmlinuxclean] Error 2

Thanks for your test, and I have fixed it and post a formal one for merge, and you can find these two patches on arm list, but forget to Cc you, sorry for that.

Hi Ming,
Both your patch and Jonathan's patch are still not in linux-next. Any chance to resend the patchs to RMK's patch system?

Thanks,
Axel

Signature · 1 line
Ming Lei
#27 lore raw
In reply to Axel Lin

Hello,

Quoted 8 lines · Axel Lin

2013/11/11 Rusty Russell <[email protected]>:

Quoted 1 line

Ming Lei <[email protected]> writes:

I don't have other noMMU platform to test.
But I think this issue impacts various !CONFIG_MMU platforms:
We have CONFIG_PAGE_OFFSET=0xC0000000 in various default configs. For !CONFIG_MMU case, it just don't use the CONFIG_PAGE_OFFSET setting. So use CONFIG_PAGE_OFFSET to filter symbols looks wrong to me for all !CONFIG_MMU cases.

I don't know what the original problem is, but for my Cortex-M3 machine (ie. !MMU) I also have CONFIG_PAGE_OFFSET=0xC0000000. Didn't see this resulting in any problems although the value looks bogus. (The range 0x90000000-0xdfffffff is reserved on my SoC. Trying to read from there with the debugger fails with a message "Could not read memory.")

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
author
#28 lore raw
In reply to Rusty Russell

2013/11/8 Rusty Russell <[email protected]>:

Quoted 27 lines
Quoted 26 lines · Axel Lin

2013/11/7 Ming Lei <[email protected]>:

Quoted 16 lines

Hi,

Quoted 4 lines · Axel Lin

hi Ming,
Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs...

Quoted 8 lines
$ make at91_dt_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make ep93xx_defconfig; grep  CONFIG_PAGE_OFFSET .config
$ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config
$ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config
( at91x40_defconfig is also arm7tdmi )
Quoted 6 lines

Firstly it can be configured via VMSPLIT_3GVMSPLIT_2G/VMSPLIT_1G.

Secondly, configurable or not isn't the point, and maybe some uclinux platforms do not use CONFIG_PAGE_OFFSET at all, but they should set it as a reasonable value or at least be below than the start link address of vmlinux.

Hi Ming,

Quoted 8 lines
Quoted 3 lines

I found in arch/arm/include/asm/memory.h:
CONFIG_PAGE_OFFSET is not used if !CONFIG_MMU.
So looks like setting CONFIG_PAGE_OFFSET to other value still won't work.

This seems like the simplest solution, but it may mean you still have crap in /proc/kallsyms.

Does it work for you?

Yes, it works.

Thanks,
Axel