]>
git.karo-electronics.de Git - karo-tx-linux.git/log
Jianguo Wu [Fri, 7 Sep 2012 00:17:43 +0000 (10:17 +1000)]
mm/ia64: fix a memory block size bug
I found following definition in include/linux/memory.h, in my IA64
platform, SECTION_SIZE_BITS is equal to 32, and MIN_MEMORY_BLOCK_SIZE will
be 0.
#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS)
will equal to 0. This will cause wrong system memory infomation in sysfs.
I think it should be:
#define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)
linux-drf:/sys/devices/system/memory # ll
total 0
-r--r--r-- 1 root root 65536 Aug 20 02:35 block_size_bytes
drwxr-xr-x 3 root root 0 Aug 20 02:19 memory0
drwxr-xr-x 2 root root 0 Aug 20 02:35 power
-rw-r--r-- 1 root root 65536 Aug 20 02:35 uevent
linux-drf:/sys/devices/system/memory # cat block_size_bytes
0
linux-drf:/sys/devices/system/memory/memory0 # cat *
8000000000000000
cat: node0: Is a directory
cat: node1: Is a directory
cat: node2: Is a directory
cat: node3: Is a directory
0
8000000000000000
cat: power: Is a directory
1
online
cat: subsystem: Is a directory
And "echo offline > memory0/state" will cause following call trace:
kernel BUG at mm/memory_hotplug.c:885!
sh[6455]: bugcheck! 0 [1]
Pid: 6455, CPU 0, comm: sh
psr :
0000101008526030 ifs :
8000000000000fa4 ip : [<
a0000001008c40f0 >] Not tainted (3.6.0-rc1)
ip is at offline_pages+0x210/0xee0
unat:
0000000000000000 pfs :
0000000000000fa4 rsc :
0000000000000003
rnat:
a0000001008f2d50 bsps:
0000000000000000 pr :
65519a96659a9565
ldrs:
0000000000000000 ccv :
0000010b9263f310 fpsr:
0009804c0270033f
csd :
0000000000000000 ssd :
0000000000000000
b0 :
a0000001008c40f0 b6 :
a000000100473980 b7 :
a0000001000106d0
f6 :
000000000000000000000 f7 :
1003e0000000085c9354c
f8 :
1003e0044b82fa09b5a53 f9 :
1003e000000d65cd62abf
f10 :
1003efd02efdec682803d f11 :
1003e0000000000000042
r1 :
a00000010152c2e0 r2 :
0000000000006ada r3 :
000000000000fffe
r8 :
0000000000000026 r9 :
a00000010121cc18 r10 :
a0000001013309f0
r11 :
65519a96659a19e9 r12 :
e00000070a91fdf0 r13 :
e00000070a910000
r14 :
0000000000006ada r15 :
0000000000004000 r16 :
000000006ad8356c
r17 :
a0000001019a525e r18 :
0000000000007fff r19 :
0000000000000000
r20 :
0000000000006ad6 r21 :
0000000000006ad6 r22 :
a00000010133bec8
r23 :
0000000000006ad4 r24 :
0000000000000002 r25 :
8200000000260038
r26 :
00000000000004f9 r27 :
00000000000004f8 r28 :
000000000001cf98
r29 :
0000000000000038 r30 :
a0000001019a5ae0 r31 :
000000000001cf60
Call Trace:
[<
a0000001000163e0 >] show_stack+0x80/0xa0
sp=
e00000070a91f9b0 bsp=
e00000070a9115e0
[<
a000000100016a40 >] show_regs+0x640/0x920
sp=
e00000070a91fb80 bsp=
e00000070a911588
[<
a000000100040590 >] die+0x190/0x2c0
sp=
e00000070a91fb90 bsp=
e00000070a911548
[<
a000000100040710 >] die_if_kernel+0x50/0x80
sp=
e00000070a91fb90 bsp=
e00000070a911518
[<
a0000001008f8030 >] ia64_bad_break+0x3d0/0x6e0
sp=
e00000070a91fb90 bsp=
e00000070a9114f0
[<
a00000010000c0c0 >] ia64_native_leave_kernel+0x0/0x270
sp=
e00000070a91fc20 bsp=
e00000070a9114f0
[<
a0000001008c40f0 >] offline_pages+0x210/0xee0
sp=
e00000070a91fdf0 bsp=
e00000070a9113c8
[<
a00000010022d580 >] alloc_pages_current+0x180/0x2a0
sp=
e00000070a91fe20 bsp=
e00000070a9113a
Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Wen Congyang [Fri, 7 Sep 2012 00:17:42 +0000 (10:17 +1000)]
memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails
If kthread_run() fails, pgdat->kswapd contains errno. When we stop this
thread, we only check whether pgdat->kswapd is NULL and access it. If it
contains errno, it will cause page fault. Reset pgdat->kswapd to NULL
when creating kernel thread fails can avoid this problem.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stephen Rothwell [Mon, 10 Sep 2012 06:14:15 +0000 (16:14 +1000)]
Merge remote-tracking branch 'clk/clk-next'
Conflicts:
arch/arm/mach-ux500/clock.c
Stephen Rothwell [Mon, 10 Sep 2012 06:00:00 +0000 (16:00 +1000)]
Merge remote-tracking branch 'signal/for-next'
Conflicts:
arch/cris/include/asm/Kbuild
arch/h8300/include/asm/Kbuild
arch/m32r/include/asm/Kbuild
arch/x86/kernel/signal.c
Stephen Rothwell [Mon, 10 Sep 2012 05:53:04 +0000 (15:53 +1000)]
Merge remote-tracking branch 'userns/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:51:26 +0000 (15:51 +1000)]
Merge remote-tracking branch 'pwm/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:49:47 +0000 (15:49 +1000)]
Merge remote-tracking branch 'dma-mapping/dma-mapping-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:48:07 +0000 (15:48 +1000)]
Merge remote-tracking branch 'kvmtool/master'
Stephen Rothwell [Mon, 10 Sep 2012 05:46:34 +0000 (15:46 +1000)]
Merge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:45:04 +0000 (15:45 +1000)]
Merge remote-tracking branch 'samsung/for-next'
Conflicts:
drivers/pinctrl/Makefile
Stephen Rothwell [Mon, 10 Sep 2012 05:16:38 +0000 (15:16 +1000)]
Merge remote-tracking branch 'renesas/next'
Stephen Rothwell [Mon, 10 Sep 2012 05:15:01 +0000 (15:15 +1000)]
Merge remote-tracking branch 'msm/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:13:22 +0000 (15:13 +1000)]
Merge remote-tracking branch 'ep93xx/ep93xx-for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:08:51 +0000 (15:08 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'
Conflicts:
arch/arm/mach-ux500/cpu-db8500.c
drivers/mtd/nand/Kconfig
drivers/usb/host/Kconfig
Stephen Rothwell [Mon, 10 Sep 2012 05:07:14 +0000 (15:07 +1000)]
Merge remote-tracking branch 'gpio-lw/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:06:57 +0000 (15:06 +1000)]
Merge remote-tracking branch 'vhost/linux-next'
Conflicts:
drivers/net/tun.c
Stephen Rothwell [Mon, 10 Sep 2012 05:05:13 +0000 (15:05 +1000)]
Merge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:03:33 +0000 (15:03 +1000)]
Merge remote-tracking branch 'writeback/writeback-for-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:01:56 +0000 (15:01 +1000)]
Merge remote-tracking branch 'tmem/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 05:00:14 +0000 (15:00 +1000)]
Merge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:55:44 +0000 (14:55 +1000)]
Merge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:53:59 +0000 (14:53 +1000)]
Merge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:51:41 +0000 (14:51 +1000)]
Merge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:44:38 +0000 (14:44 +1000)]
Merge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:42:48 +0000 (14:42 +1000)]
Merge remote-tracking branch 'leds/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:41:02 +0000 (14:41 +1000)]
Merge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:39:21 +0000 (14:39 +1000)]
Merge remote-tracking branch 'drivers-x86/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:32:13 +0000 (14:32 +1000)]
Merge remote-tracking branch 'workqueues/for-next'
Conflicts:
drivers/hid/hid-picolcd.c
Stephen Rothwell [Mon, 10 Sep 2012 04:09:26 +0000 (14:09 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 04:07:40 +0000 (14:07 +1000)]
Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'
Conflicts:
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/e500_tlb.c
include/linux/kvm.h
Stephen Rothwell [Mon, 10 Sep 2012 04:05:56 +0000 (14:05 +1000)]
Merge remote-tracking branch 'kvm/linux-next'
Conflicts:
arch/s390/include/asm/processor.h
Stephen Rothwell [Mon, 10 Sep 2012 04:04:12 +0000 (14:04 +1000)]
Merge remote-tracking branch 'kmemleak/kmemleak'
Stephen Rothwell [Mon, 10 Sep 2012 03:56:58 +0000 (13:56 +1000)]
Merge remote-tracking branch 'rcu/rcu/next'
Conflicts:
arch/Kconfig
arch/x86/Kconfig
kernel/rcutree.h
kernel/rcutree_plugin.h
kernel/sched/core.c
Stephen Rothwell [Mon, 10 Sep 2012 03:49:38 +0000 (13:49 +1000)]
Merge remote-tracking branch 'tip/auto-latest'
Conflicts:
arch/Kconfig
Stephen Rothwell [Mon, 10 Sep 2012 03:47:59 +0000 (13:47 +1000)]
Merge remote-tracking branch 'spi-mb/spi-next'
Conflicts:
drivers/mmc/host/mxs-mmc.c
Stephen Rothwell [Mon, 10 Sep 2012 03:45:55 +0000 (13:45 +1000)]
Merge remote-tracking branch 'dt-rh/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 03:45:48 +0000 (13:45 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'
Conflicts:
Documentation/edac.txt
drivers/edac/amd64_edac.c
Stephen Rothwell [Mon, 10 Sep 2012 03:45:33 +0000 (13:45 +1000)]
Merge remote-tracking branch 'edac/linux_next'
Stephen Rothwell [Mon, 10 Sep 2012 03:43:55 +0000 (13:43 +1000)]
Merge remote-tracking branch 'fsnotify/for-next'
Conflicts:
kernel/audit_tree.c
Stephen Rothwell [Mon, 10 Sep 2012 03:41:50 +0000 (13:41 +1000)]
Merge remote-tracking branch 'apm/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 03:34:46 +0000 (13:34 +1000)]
Merge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 03:28:31 +0000 (13:28 +1000)]
Merge remote-tracking branch 'trivial/for-next'
Conflicts:
drivers/scsi/ipr.c
Stephen Rothwell [Mon, 10 Sep 2012 03:26:48 +0000 (13:26 +1000)]
Merge remote-tracking branch 'osd/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 03:25:12 +0000 (13:25 +1000)]
Merge remote-tracking branch 'iommu/next'
Stephen Rothwell [Mon, 10 Sep 2012 03:25:02 +0000 (13:25 +1000)]
Merge remote-tracking branch 'selinux/master'
Stephen Rothwell [Mon, 10 Sep 2012 03:20:57 +0000 (13:20 +1000)]
Merge remote-tracking branch 'security/next'
Stephen Rothwell [Mon, 10 Sep 2012 03:19:15 +0000 (13:19 +1000)]
Merge commit 'refs/next/
20120907 /regulator'
Stephen Rothwell [Mon, 10 Sep 2012 02:59:14 +0000 (12:59 +1000)]
Merge remote-tracking branch 'omap_dss2/for-next'
Conflicts:
drivers/video/omap2/dss/sdi.c
Stephen Rothwell [Mon, 10 Sep 2012 02:57:35 +0000 (12:57 +1000)]
Merge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:55:59 +0000 (12:55 +1000)]
Merge remote-tracking branch 'battery/master'
Stephen Rothwell [Mon, 10 Sep 2012 02:54:21 +0000 (12:54 +1000)]
Merge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:52:44 +0000 (12:52 +1000)]
Merge remote-tracking branch 'md/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:41:02 +0000 (12:41 +1000)]
Merge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:39:23 +0000 (12:39 +1000)]
Merge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:37:49 +0000 (12:37 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:36:05 +0000 (12:36 +1000)]
Merge branch 'quilt/device-mapper'
Stephen Rothwell [Mon, 10 Sep 2012 02:29:38 +0000 (12:29 +1000)]
Merge remote-tracking branch 'block/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:29:35 +0000 (12:29 +1000)]
Merge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:27:55 +0000 (12:27 +1000)]
Merge remote-tracking branch 'input/next'
Stephen Rothwell [Mon, 10 Sep 2012 02:22:00 +0000 (12:22 +1000)]
Merge branch 'quilt/rr'
Conflicts:
arch/alpha/Kconfig
arch/mips/kernel/module.c
arch/s390/Kconfig
arch/xtensa/Kconfig
Stephen Rothwell [Mon, 10 Sep 2012 02:20:20 +0000 (12:20 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:18:34 +0000 (12:18 +1000)]
Merge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:16:44 +0000 (12:16 +1000)]
Merge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Mon, 10 Sep 2012 02:15:01 +0000 (12:15 +1000)]
Merge remote-tracking branch 'crypto/master'
Conflicts:
crypto/Kconfig
Stephen Rothwell [Mon, 10 Sep 2012 02:13:25 +0000 (12:13 +1000)]
Merge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Mon, 10 Sep 2012 02:11:46 +0000 (12:11 +1000)]
Merge remote-tracking branch 'mtd/master'
Stephen Rothwell [Mon, 10 Sep 2012 02:10:07 +0000 (12:10 +1000)]
Merge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Mon, 10 Sep 2012 02:08:10 +0000 (12:08 +1000)]
Merge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Mon, 10 Sep 2012 02:00:54 +0000 (12:00 +1000)]
Merge remote-tracking branch 'net-next/master'
Conflicts:
net/socket.c
Stephen Rothwell [Mon, 10 Sep 2012 01:59:17 +0000 (11:59 +1000)]
Merge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Mon, 10 Sep 2012 01:57:40 +0000 (11:57 +1000)]
Merge remote-tracking branch 'isci/all'
Stephen Rothwell [Mon, 10 Sep 2012 01:56:03 +0000 (11:56 +1000)]
Merge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:54:21 +0000 (11:54 +1000)]
Merge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:52:47 +0000 (11:52 +1000)]
Merge remote-tracking branch 'dlm/next'
Stephen Rothwell [Mon, 10 Sep 2012 01:51:14 +0000 (11:51 +1000)]
Merge remote-tracking branch 'ubi/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:49:40 +0000 (11:49 +1000)]
Merge remote-tracking branch 'thermal/next'
Stephen Rothwell [Mon, 10 Sep 2012 01:49:34 +0000 (11:49 +1000)]
Merge remote-tracking branch 'cpuidle/cpuidle-next'
Conflicts:
drivers/cpuidle/coupled.c
include/linux/cpuidle.h
Stephen Rothwell [Mon, 10 Sep 2012 01:47:48 +0000 (11:47 +1000)]
Merge remote-tracking branch 'pstore/master'
Stephen Rothwell [Mon, 10 Sep 2012 01:46:12 +0000 (11:46 +1000)]
Merge remote-tracking branch 'libata/NEXT'
Stephen Rothwell [Mon, 10 Sep 2012 01:44:42 +0000 (11:44 +1000)]
Merge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:43:02 +0000 (11:43 +1000)]
Merge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:41:01 +0000 (11:41 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'
Conflicts:
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
Stephen Rothwell [Mon, 10 Sep 2012 01:39:30 +0000 (11:39 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:38:03 +0000 (11:38 +1000)]
Merge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Mon, 10 Sep 2012 01:36:35 +0000 (11:36 +1000)]
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:35:10 +0000 (11:35 +1000)]
Merge branch 'quilt/i2c'
Stephen Rothwell [Mon, 10 Sep 2012 01:33:46 +0000 (11:33 +1000)]
Merge remote-tracking branch 'hid/for-next'
Conflicts:
drivers/hid/usbhid/hid-quirks.c
Stephen Rothwell [Mon, 10 Sep 2012 01:22:42 +0000 (11:22 +1000)]
Merge remote-tracking branch 'pci/next'
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/rapidio/devices/tsi721.c
Stephen Rothwell [Mon, 10 Sep 2012 01:18:21 +0000 (11:18 +1000)]
Merge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:16:46 +0000 (11:16 +1000)]
Merge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:15:22 +0000 (11:15 +1000)]
Merge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:13:55 +0000 (11:13 +1000)]
Merge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:12:20 +0000 (11:12 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:10:53 +0000 (11:10 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:09:15 +0000 (11:09 +1000)]
Merge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:07:49 +0000 (11:07 +1000)]
Merge remote-tracking branch 'logfs/master'
Stephen Rothwell [Mon, 10 Sep 2012 01:06:22 +0000 (11:06 +1000)]
Merge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Mon, 10 Sep 2012 01:04:56 +0000 (11:04 +1000)]
Merge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Mon, 10 Sep 2012 01:03:27 +0000 (11:03 +1000)]
Merge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Mon, 10 Sep 2012 01:01:59 +0000 (11:01 +1000)]
Merge remote-tracking branch 'ext3/for_next'