Linux-Next discussions
 help / color / mirror / Atom feed
* Re: [powerpc] Next tree Nov 2 : kernel BUG at mm/mmap.c:2135!
From: David Gibson @ 2009-11-13  2:10 UTC (permalink / raw)
  To: Sachin Sant, Linux/PPC Development, Stephen Rothwell, linux-next,
	Benjamin Herrenschmidt
In-Reply-To: <20091113013729.GB18848@yookeroo.seuss>

On Fri, Nov 13, 2009 at 12:37:29PM +1100, David Gibson wrote:
> On Thu, Nov 12, 2009 at 04:46:40PM +0530, Sachin Sant wrote:
> > David Gibson wrote:
> > >On Wed, Nov 04, 2009 at 06:08:44PM +0530, Sachin Sant wrote:
> > >>Sachin Sant wrote:
> > >>>Today's next tree failed to boot on a POWER 6 box with :
> > >>>
> > >>>------------[ cut here ]------------
> > >>>kernel BUG at mm/mmap.c:2135!
> > >>>Oops: Exception in kernel mode, sig: 5 [#2]
> > >>>SMP NR_CPUS=1024 NUMA pSeries
> > >>Problem exists with today's next as well.
> > >>
> > >>Likely cause for this problem seems to the following commit.
> > >>If i revert this patch the machine boots fine.
> > >>
> > >>commit a0668cdc154e54bf0c85182e0535eea237d53146
> > >>powerpc/mm: Cleanup management of kmem_caches for pagetables
> > >
> > >Ugh.  Ok, it's not at all obvious how my patch could cause this bug.
> > >Can you send your .config?
> > >
> > Still present in today's next.
> 
> Sorry, I've been sidetracked by other issues and have only managed to
> look into this today.  My initial attempts to reproduce the bug with
> your config on both POWER6 and POWER5+ have failed though.
> 
> Is it possible to get the complete boot log from this system - not
> just the [cut here] section around the BUG()?  This should help to
> determine exactly when during boot the bug is being triggered.

Also, could you try booting the kernel with the patch below, which
should give a bit more information about the problem.

Index: working-2.6/mm/mmap.c
===================================================================
--- working-2.6.orig/mm/mmap.c	2009-11-13 13:08:29.000000000 +1100
+++ working-2.6/mm/mmap.c	2009-11-13 13:09:26.000000000 +1100
@@ -2136,6 +2136,8 @@ void exit_mmap(struct mm_struct *mm)
 	while (vma)
 		vma = remove_vma(vma);
 
+	if (nr_ptes != 0)
+		printk("exit_mmap(): mm %p nr_ptes %d\n", mm, mm->nr_ptes);
 	BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT);
 }
 


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* linux-next: manual merge of the sound tree with the omap tree
From: Stephen Rothwell @ 2009-11-13  2:19 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: linux-next, linux-kernel, Peter Ujfalusi, Mark Brown,
	vikram pandita

Hi Takashi,

Today's linux-next merge of the sound tree got a conflict in
arch/arm/mach-omap2/board-zoom2.c between commit
3541a57ebeb4c817e6e25bb0c2a2c174d6edb7c4 ("omap: zoom2: split board file
for software reuse") from the omap tree and commits
f8d9aad96d0d7b57d0bf2e4de21fdda3a42f4449 ("OMAP: Platform support for
twl4030_codec MFD") and 953e2f3d272db9db6671ad4f4244820557a71cf7 ("OMAP:
Configure audio_mclk for twl4030-codec MFD") from the sound tree.

The former moved the code that the latter modifies into another file.  I
have added the following merge fixup patch and can carry it as necessary.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 13 Nov 2009 13:17:56 +1100
Subject: [PATCH] sound: merger fixup for omap board-zoom2 updates

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 54619d5..f570949 100755
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -217,6 +217,15 @@ static struct twl4030_madc_platform_data zoom_madc_data = {
 	.irq_line	= 1,
 };
 
+static struct twl4030_codec_audio_data zoom2_audio_data = {
+	.audio_mclk = 26000000,
+};
+
+static struct twl4030_codec_data zoom2_codec_data = {
+	.audio_mclk = 26000000,
+	.audio = &zoom2_audio_data,
+};
+
 static struct twl4030_platform_data zoom_twldata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
@@ -227,6 +236,7 @@ static struct twl4030_platform_data zoom_twldata = {
 	.usb		= &zoom_usb_data,
 	.gpio		= &zoom_gpio_data,
 	.keypad		= &zoom_kp_twl4030_data,
+	.codec		= &zoom2_codec_data,
 	.vmmc1          = &zoom_vmmc1,
 	.vmmc2          = &zoom_vmmc2,
 	.vsim           = &zoom_vsim,
-- 
1.6.5.2

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related

* linux-next: Tree for November 13
From: Stephen Rothwell @ 2009-11-13  7:30 UTC (permalink / raw)
  To: linux-next; +Cc: LKML

[-- Attachment #1: Type: text/plain, Size: 8741 bytes --]

Hi all,

Changes since 20091112:

I remerged Linus' tree at the end just to get the -rc7 tag.

Linus' tree lost its build failure.

The sound tree gained a conflict against the omap tree.

The rr tree lost its build failures.

The sysctl tree lost its build failure.

----------------------------------------------------------------------------

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one.  You should use "git fetch" as mentioned in the FAQ on the wiki
(see below).

You can see which trees have been included by looking in the Next/Trees
file in the source.  There are also quilt-import.log and merge.log files
in the Next directory.  Between each merge, the tree was built with
a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the
final fixups (if any), it is also built with powerpc allnoconfig (32 and
64 bit), ppc44x_defconfig and allyesconfig (minus
CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc
and sparc64 defconfig. These builds also have
CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and
CONFIG_DEBUG_INFO disabled when necessary.

Below is a summary of the state of the merge.

We are up to 148 trees (counting Linus' and 22 trees of patches pending for
Linus' tree), more are welcome (even if they are currently empty).
Thanks to those who have contributed, and to those who haven't, please do.

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more builds.

Thanks to Jan Dittmer for adding the linux-next tree to his build tests
at http://l4x.org/k/ , the guys at http://test.kernel.org/ and Randy
Dunlap for doing many randconfig builds.

There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ .  Thanks to Frank Seidel.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

$ git checkout master
$ git reset --hard stable
Merging origin/master
Merging fixes/fixes
Merging arm-current/master
Merging m68k-current/for-linus
Merging powerpc-merge/merge
Merging sparc-current/master
Merging scsi-rc-fixes/master
Merging net-current/master
Merging sound-current/for-linus
Merging pci-current/for-linus
Merging wireless-current/master
Merging kbuild-current/master
Merging quilt/driver-core.current
Merging quilt/tty.current
Merging quilt/usb.current
Merging quilt/staging.current
Merging cpufreq-current/fixes
Merging input-current/for-linus
Merging md-current/for-linus
Merging audit-current/for-linus
Merging crypto-current/master
Merging ide-curent/master
Merging dwmw2/master
Merging arm/devel
Merging davinci/davinci-next
Merging msm/for-next
Merging omap/for-next
Merging pxa/for-next
Merging avr32/avr32-arch
CONFLICT (content): Merge conflict in arch/avr32/mach-at32ap/include/mach/cpu.h
Merging blackfin/for-linus
Merging cris/for-next
Merging ia64/test
Merging m68k/for-next
CONFLICT (content): Merge conflict in drivers/rtc/Kconfig
Merging m68knommu/for-next
Merging microblaze/next
Merging mips/mips-for-linux-next
Merging parisc/next
Merging powerpc/next
Merging 4xx/next
Merging 52xx-and-virtex/next
Merging galak/next
Merging s390/features
Merging sh/master
Merging sparc/master
Merging xtensa/master
Merging ceph/for-next
Merging cifs/master
Merging configfs/linux-next
Merging ecryptfs/next
Merging ext3/for_next
Merging ext4/next
Merging fatfs/master
Merging fuse/for-next
Merging gfs2/master
Merging jfs/next
Merging nfs/linux-next
Merging nfsd/nfsd-next
Merging nilfs2/for-next
Merging ocfs2/linux-next
Merging squashfs/master
Merging udf/for_next
Merging v9fs/for-next
Merging ubifs/linux-next
Merging xfs/master
Merging reiserfs-bkl/reiserfs/kill-bkl
Merging vfs/for-next
Merging pci/linux-next
Merging hid/for-next
Merging quilt/i2c
Merging quilt/jdelvare-hwmon
Merging quilt/kernel-doc
Merging v4l-dvb/master
CONFLICT (content): Merge conflict in drivers/media/common/tuners/tda18271-fe.c
Merging kbuild/master
Merging kconfig/for-next
Merging ide/master
Merging libata/NEXT
Merging infiniband/for-next
Merging acpi/test
Merging ieee1394/for-next
Merging ubi/linux-next
Merging kvm/linux-next
CONFLICT (content): Merge conflict in arch/powerpc/kvm/timing.h
Merging dlm/next
Merging scsi/master
Merging async_tx/next
Merging net/master
CONFLICT (delete/modify): drivers/net/sfc/sfe4001.c deleted in net/master and modified in HEAD. Version HEAD of drivers/net/sfc/sfe4001.c left in tree.
CONFLICT (content): Merge conflict in drivers/net/wireless/libertas/cmd.c
CONFLICT (content): Merge conflict in drivers/staging/Kconfig
CONFLICT (content): Merge conflict in drivers/staging/Makefile
CONFLICT (content): Merge conflict in drivers/staging/rtl8187se/Kconfig
CONFLICT (content): Merge conflict in drivers/staging/rtl8192e/Kconfig
$ git rm -f drivers/net/sfc/sfe4001.c
Applying: net: merge fixup for drivers/net/sfc/falcon_boards.c
Merging wireless/master
Merging mtd/master
Merging crypto/master
Merging sound/for-next
CONFLICT (content): Merge conflict in arch/arm/mach-omap2/board-omap3evm.c
CONFLICT (content): Merge conflict in arch/arm/mach-omap2/board-zoom2.c
Applying: sound: merger fixup for omap board-zoom2 updates
Merging cpufreq/next
CONFLICT (content): Merge conflict in include/acpi/processor.h
Merging quilt/rr
Applying: modpost: autoconf.h has moved to include/generated
Merging mmc/next
Merging tmio-mmc/linux-next
Merging input/next
Merging lsm/for-next
Merging block/for-next
Merging quilt/device-mapper
Merging embedded/master
Merging firmware/master
Merging pcmcia/master
CONFLICT (content): Merge conflict in drivers/mtd/maps/pcmciamtd.c
CONFLICT (content): Merge conflict in drivers/net/wireless/ray_cs.c
CONFLICT (content): Merge conflict in drivers/pcmcia/Makefile
Merging battery/master
Merging leds/for-mm
Merging backlight/for-mm
Merging kgdb/kgdb-next
Merging slab/for-next
Merging uclinux/for-next
Merging md/for-next
Merging mfd/for-next
Merging hdlc/hdlc-next
Merging drm/drm-next
Merging voltage/for-next
CONFLICT (content): Merge conflict in drivers/mfd/Kconfig
CONFLICT (content): Merge conflict in drivers/mfd/Makefile
Merging security-testing/next
CONFLICT (content): Merge conflict in Documentation/dontdiff
Merging lblnet/master
Merging agp/agp-next
Merging uwb/for-upstream
Merging watchdog/master
Merging bdev/master
Merging dwmw2-iommu/master
Merging cputime/cputime
Merging osd/linux-next
Merging jc_docs/docs-next
Merging nommu/master
Merging trivial/for-next
Merging audit/for-next
Merging quilt/aoe
Merging suspend/linux-next
Merging bluetooth/master
Merging fsnotify/for-next
Merging irda/for-next
Merging hwlat/for-linus
CONFLICT (content): Merge conflict in drivers/misc/Makefile
Merging drbd/for-jens
Merging catalin/for-next
Merging alacrity/linux-next
CONFLICT (content): Merge conflict in drivers/net/Kconfig
CONFLICT (content): Merge conflict in include/linux/Kbuild
CONFLICT (content): Merge conflict in lib/Kconfig
Merging i7core_edac/linux_next
Applying: i7core_edac: do not export static functions
Merging devicetree/next-devicetree
Merging limits/writable_limits
Merging tip/auto-latest
CONFLICT (content): Merge conflict in arch/x86/kernel/kgdb.c
CONFLICT (content): Merge conflict in kernel/irq/chip.c
Merging oprofile/for-next
Merging percpu/for-next
CONFLICT (content): Merge conflict in arch/powerpc/platforms/pseries/hvCall.S
CONFLICT (content): Merge conflict in arch/x86/kvm/svm.c
CONFLICT (content): Merge conflict in kernel/softlockup.c
CONFLICT (content): Merge conflict in mm/percpu.c
Applying: percpu: merge fixup for variable renaming
Merging sfi/sfi-test
Merging asm-generic/next
Merging hwpoison/hwpoison
Merging sysctl/master
Merging quilt/driver-core
Merging quilt/tty
Merging quilt/usb
Merging quilt/staging
CONFLICT (content): Merge conflict in drivers/staging/Kconfig
CONFLICT (content): Merge conflict in drivers/staging/Makefile
CONFLICT (content): Merge conflict in drivers/staging/comedi/drivers/cb_das16_cs.c
CONFLICT (content): Merge conflict in drivers/staging/comedi/drivers/ni_labpc_cs.c
CONFLICT (content): Merge conflict in drivers/staging/comedi/drivers/ni_mio_cs.c
Merging scsi-post-merge/master
Merging origin/master

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Sachin Sant @ 2009-11-13  9:00 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: LKML, Stephen Rothwell, linux-next, Ingo Molnar, Mike Galbraith,
	Gautham R Shenoy
In-Reply-To: <1258045831.4039.736.camel@laptop>

Peter Zijlstra wrote:
> So what we need to do is make the whole of select_task_rq_fair()
> cpu_online/active_mask aware, or give up and simply punt:
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 1f2e99d..62df61c 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -2377,6 +2377,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
>  	task_rq_unlock(rq, &flags);
>
>  	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
> +	if (!cpu_active(cpu))
> +		cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
> +
>  	if (cpu != orig_cpu) {
>  		local_irq_save(flags);
>  		rq = cpu_rq(cpu);
>
>
> Something I think Mike also tried and didn't deadlock for him..
>
> Sachin, Mike, could you try the above snippet and verify if it does
> indeed solve your respective issues?
>   
Unfortunately the above patch made things worse. With this patch
the machine failed to boot with following oops

CPU0: Dual-Core AMD Opteron(tm) Processor 2218 stepping 02
BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffff81061f17>] set_task_cpu+0x189/0x1ed
PGD 0
Oops: 0000 [#1] SMP
last sysfs file:
CPU 0
Modules linked in:
Pid: 3, comm: kthreadd Not tainted 2.6.32-rc7-next-20091113 #1 BladeCenter LS21 -[79716AA]-
RIP: 0010:[<ffffffff81061f17>]  [<ffffffff81061f17>] set_task_cpu+0x189/0x1ed
RSP: 0018:ffff88012b357dd0  EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000004
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88012b340000
RBP: ffff88012b357e10 R08: 0000000000000004 R09: ffff88012b3401f8
R10: 00000000000cffa7 R11: 0000000000000000 R12: ffff88012b340000
R13: 000000000c28ccf6 R14: 0000000000000004 R15: ffff880028214cc0
FS:  0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000020 CR3: 000000000174e000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kthreadd (pid: 3, threadinfo ffff88012b356000, task ffff88012b3431c0)
Stack:
 ffff880028214d20 0000000000000000 0000000028215640 0000000000000000
<0> ffff88012b340000 0000000000000001 ffff880028214cc0 0000000000000000
<0> ffff88012b357e60 ffffffff81063a75 0000000000000000 0000000000000000
Call Trace:
 [<ffffffff81063a75>] try_to_wake_up+0x103/0x31f
 [<ffffffff81063c9e>] default_wake_function+0xd/0xf
 [<ffffffff810519a7>] __wake_up_common+0x46/0x76
 [<ffffffff810648ae>] ? migration_thread+0x0/0x285
 [<ffffffff810577c8>] complete+0x38/0x4b
 [<ffffffff8108040a>] kthread+0x67/0x85
 [<ffffffff810298fa>] child_rip+0xa/0x20
 [<ffffffff810803a3>] ? kthread+0x0/0x85
 [<ffffffff810298f0>] ? child_rip+0x0/0x20
Code: 00 8b 05 dd d7 df 04 85 c0 74 19 45 31 c0 31 c9 ba 01 00 00 00 be 01 00 00 00 bf 04 00 00 00 e8 79 02 07 00 48 8b 55 c8 44 89 f1 <48> 8b 42 20 48 8b 55 c0 49 03 84 24 88 00 00 00 48 2b 42 20 49
RIP  [<ffffffff81061f17>] set_task_cpu+0x189/0x1ed
 RSP <ffff88012b357dd0>
CR2: 0000000000000020
---[ end trace 4eaa2a86a8e2da22 ]---

I tried this with today's next (2.6.32-rc7-20091113) + the above patch.
Here is how the code looks after applying the patch...

        task_rq_unlock(rq, &flags);

        cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
        if (!cpu_active(cpu))
                cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);

        if (cpu != orig_cpu)
                set_task_cpu(p, cpu);

Thanks
-Sachin


-- 

---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------

^ permalink raw reply

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Peter Zijlstra @ 2009-11-13  9:06 UTC (permalink / raw)
  To: Sachin Sant
  Cc: LKML, Stephen Rothwell, linux-next, Ingo Molnar, Mike Galbraith,
	Gautham R Shenoy
In-Reply-To: <4AFD2027.5060303@in.ibm.com>

On Fri, 2009-11-13 at 14:30 +0530, Sachin Sant wrote:
> Peter Zijlstra wrote:
> > So what we need to do is make the whole of select_task_rq_fair()
> > cpu_online/active_mask aware, or give up and simply punt:
> >
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 1f2e99d..62df61c 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -2377,6 +2377,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
> >  	task_rq_unlock(rq, &flags);
> >
> >  	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
> > +	if (!cpu_active(cpu))
> > +		cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
> > +
> >  	if (cpu != orig_cpu) {
> >  		local_irq_save(flags);
> >  		rq = cpu_rq(cpu);
> >
> >
> > Something I think Mike also tried and didn't deadlock for him..
> >
> > Sachin, Mike, could you try the above snippet and verify if it does
> > indeed solve your respective issues?
> >   
> Unfortunately the above patch made things worse. With this patch
> the machine failed to boot with following oops

Ugh, more head scratching for me then..

Thanks for testing.

^ permalink raw reply

* Re: [powerpc] Next tree Nov 2 : kernel BUG at mm/mmap.c:2135!
From: Sachin Sant @ 2009-11-13  9:35 UTC (permalink / raw)
  To: dwg
  Cc: Linux/PPC Development, Stephen Rothwell, linux-next,
	Benjamin Herrenschmidt
In-Reply-To: <20091113021048.GA4865@yookeroo.seuss>

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

David Gibson wrote:
> so, could you try booting the kernel with the patch below, which
> should give a bit more information about the problem.
>
> Index: working-2.6/mm/mmap.c
> ===================================================================
> --- working-2.6.orig/mm/mmap.c	2009-11-13 13:08:29.000000000 +1100
> +++ working-2.6/mm/mmap.c	2009-11-13 13:09:26.000000000 +1100
> @@ -2136,6 +2136,8 @@ void exit_mmap(struct mm_struct *mm)
>  	while (vma)
>  		vma = remove_vma(vma);
>
> +	if (nr_ptes != 0)
> +		printk("exit_mmap(): mm %p nr_ptes %d\n", mm, mm->nr_ptes);
>  	BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT);
>  }
>   
Here is the information collected with today's next.
(2.6.32-rc7-20091113)

------------[ cut here ]------------
kernel BUG at mm/mmap.c:2139!
cpu 0x3: Vector: 700 (Program Check) at [c0000000fae1b7e0]
    pc: c000000000150e88: .exit_mmap+0x1ac/0x1d4
    lr: c000000000150e78: .exit_mmap+0x19c/0x1d4
    sp: c0000000fae1ba60
   msr: 8000000000029032
  current = 0xc0000000fada8be0
  paca    = 0xc000000000bb2c00
    pid   = 84, comm = cat
kernel BUG at mm/mmap.c:2139!
enter ? for help
[c0000000fae1bb10] c000000000093d24 .mmput+0x54/0x164
[c0000000fae1bba0] c000000000098f30 .exit_mm+0x17c/0x1a0
[c0000000fae1bc50] c00000000009b310 .do_exit+0x248/0x784
[c0000000fae1bd30] c00000000009b900 .do_group_exit+0xb4/0xe8
[c0000000fae1bdc0] c00000000009b948 .SyS_exit_group+0x14/0x28
[c0000000fae1be30] c0000000000085b4 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 00000fff89a8ff40
SP (fffdf8a2460) is in userspace

Have attached the complete boot log.

At the time of crash values of mm and mm->nr_ptes were

<7>exit_mmap(): mm c0000000fa9f9580 nr_ptes 1

Thanks
-Sachin


-- 

---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


[-- Attachment #2: next13Nov-boot-log --]
[-- Type: text/plain, Size: 7764 bytes --]

<4>Crash kernel location must be 0x2000000
<6>Reserving 256MB of memory at 32MB for crashkernel (System RAM: 4096MB)
<6>Using pSeries machine description
<7>Page orders: linear mapping = 24, virtual = 16, io = 12
<6>Using 1TB segments
<4>Found initrd at 0xc0000000034d0000:0xc000000003cf8359
<6>bootconsole [udbg0] enabled
<6>Partition configured for 4 cpus.
<6>CPU maps initialized for 2 threads per core
<7> (thread shift is 1)
<4>Starting Linux PPC64 #3 SMP Fri Nov 13 14:48:28 IST 2009
<4>-----------------------------------------------------
<4>ppc64_pft_size                = 0x1a
<4>physicalMemorySize            = 0x100000000
<4>htab_hash_mask                = 0x7ffff
<4>-----------------------------------------------------
<6>Initializing cgroup subsys cpuset
<6>Initializing cgroup subsys cpu
<5>Linux version 2.6.32-rc7-next-20091113 (root@llm62) (gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux) ) #3 SMP Fri Nov 13 14:48:28 IST 2009
<4>[boot]0012 Setup Arch
<7>Node 0 Memory:
<7>Node 1 Memory: 0x0-0x100000000
<4>EEH: No capable adapters found
<6>PPC64 nvram contains 15360 bytes
<7>Using shared processor idle loop
<4>Zone PFN ranges:
<4>  DMA      0x00000000 -> 0x00010000
<4>  Normal   0x00010000 -> 0x00010000
<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4>    1: 0x00000000 -> 0x00010000
<4>Could not find start_pfn for node 0
<7>On node 0 totalpages: 0
<7>On node 1 totalpages: 65536
<7>  DMA zone: 56 pages used for memmap
<7>  DMA zone: 0 pages reserved
<7>  DMA zone: 65480 pages, LIFO batch:1
<4>[boot]0015 Setup Done
<6>PERCPU: Embedded 2 pages/cpu @c000000000f00000 s89000 r0 d42072 u262144
<6>pcpu-alloc: s89000 r0 d42072 u262144 alloc=1*1048576
<6>pcpu-alloc: [0] 0 1 2 3 
<4>Built 2 zonelists in Node order, mobility grouping on.  Total pages: 65480
<4>Policy zone: DMA
<5>Kernel command line: root=/dev/sda5 sysrq=1 insmod=sym53c8xx insmod=ipr crashkernel=512M-:256M xmon=on 
<6>PID hash table entries: 4096 (order: -1, 32768 bytes)
<4>freeing bootmem node 1
<6>Memory: 3899712k/4194304k available (9216k kernel code, 294592k reserved, 2688k data, 2370k bss, 640k init)
<6>Hierarchical RCU implementation.
<6>RCU-based detection of stalled CPUs is enabled.
<6>NR_IRQS:512 nr_irqs:512
<4>[boot]0020 XICS Init
<4>[boot]0021 XICS Done
<7>pic: no ISA interrupt controller
<7>time_init: decrementer frequency = 512.000000 MHz
<7>time_init: processor frequency   = 4704.000000 MHz
<6>clocksource: timebase mult[7d0000] shift[22] registered
<7>clockevent: decrementer mult[83126e97] shift[32] cpu[0]
<4>Console: colour dummy device 80x25
<6>console [hvc0] enabled, bootconsole disabled
<6>allocated 2621440 bytes of page_cgroup
<6>please try 'cgroup_disable=memory' option if you don't want memory cgroups
<6>Security Framework initialized
<6>SELinux:  Disabled at boot.
<6>Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes)
<6>Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
<4>Mount-cache hash table entries: 4096
<6>Initializing cgroup subsys ns
<6>Initializing cgroup subsys cpuacct
<6>Initializing cgroup subsys memory
<6>Initializing cgroup subsys devices
<6>Initializing cgroup subsys freezer
<7>  alloc irq_desc for 16 on node 0
<7>  alloc kstat_irqs on node 0
<7>irq: irq 2 on host null mapped to virtual irq 16
<7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
<4>Processor 1 found.
<7>clockevent: decrementer mult[83126e97] shift[32] cpu[2]
<4>Processor 2 found.
<7>clockevent: decrementer mult[83126e97] shift[32] cpu[3]
<4>Processor 3 found.
<6>Brought up 4 CPUs
<7>Node 0 CPUs: 0-3
<7>Node 1 CPUs:
<7>CPU0 attaching sched-domain:
<7> domain 0: span 0-1 level SIBLING
<7>  groups: 0 (cpu_power = 589) 1 (cpu_power = 589)
<7>  domain 1: span 0-3 level CPU
<7>   groups: 0-1 (cpu_power = 1178) 2-3 (cpu_power = 1178)
<7>CPU1 attaching sched-domain:
<7> domain 0: span 0-1 level SIBLING
<7>  groups: 1 (cpu_power = 589) 0 (cpu_power = 589)
<7>  domain 1: span 0-3 level CPU
<7>   groups: 0-1 (cpu_power = 1178) 2-3 (cpu_power = 1178)
<7>CPU2 attaching sched-domain:
<7> domain 0: span 2-3 level SIBLING
<7>  groups: 2 (cpu_power = 589) 3 (cpu_power = 589)
<7>  domain 1: span 0-3 level CPU
<7>   groups: 2-3 (cpu_power = 1178) 0-1 (cpu_power = 1178)
<7>CPU3 attaching sched-domain:
<7> domain 0: span 2-3 level SIBLING
<7>  groups: 3 (cpu_power = 589) 2 (cpu_power = 589)
<7>  domain 1: span 0-3 level CPU
<7>   groups: 2-3 (cpu_power = 1178) 0-1 (cpu_power = 1178)
<6>NET: Registered protocol family 16
<6>IBM eBus Device Driver
<6>POWER6 performance monitor hardware support registered
<6>PCI: Probing PCI hardware
<7>PCI: Probing PCI hardware done
<4>bio: create slab <bio-0> at 0
<6>vgaarb: loaded
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Switching to clocksource timebase
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 32768 (order: 2, 262144 bytes)
<6>TCP established hash table entries: 131072 (order: 5, 2097152 bytes)
<6>TCP bind hash table entries: 65536 (order: 4, 1048576 bytes)
<6>TCP: Hash tables configured (established 131072 bind 65536)
<6>TCP reno registered
<6>UDP hash table entries: 2048 (order: 0, 65536 bytes)
<6>UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes)
<6>NET: Registered protocol family 1
<7>PCI: CLS 0 bytes, default 128
<6>Unpacking initramfs...
<7>RTAS daemon started
<7>  alloc irq_desc for 17 on node 0
<7>  alloc kstat_irqs on node 0
<7>irq: irq 655360 on host null mapped to virtual irq 17
<7>  alloc irq_desc for 18 on node 0
<7>  alloc kstat_irqs on node 0
<7>irq: irq 655362 on host null mapped to virtual irq 18
<6>IOMMU table initialized, virtual merging enabled
<7>  alloc irq_desc for 19 on node 0
<7>  alloc kstat_irqs on node 0
<7>irq: irq 589825 on host null mapped to virtual irq 19
<6>audit: initializing netlink socket (disabled)
<5>type=2000 audit(1258104404.220:1): initialized
<1>rcu-torture:--- Start of test: nreaders=8 nfakewriters=4 stat_interval=0 verbose=0 test_no_idle_hz=0 shuffle_interval=3 stutter=5 irqreader=1
<6>HugeTLB registered 16 MB page size, pre-allocated 0 pages
<6>HugeTLB registered 16 GB page size, pre-allocated 0 pages
<5>VFS: Disk quotas dquot_6.5.2
<4>Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
<6>msgmni has been set to 7616
<6>alg: No test for stdrng (krng)
<6>Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
<6>io scheduler noop registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>pci_hotplug: PCI Hot Plug PCI Core version: 0.5
<6>pciehp: PCI Express Hot Plug Controller Driver version: 0.4
<6>rpaphp: RPA HOT Plug PCI Controller Driver version: 0.1
<7>vio_register_driver: driver hvc_console registering
<7>HVSI: registered 0 devices
<6>Generic RTC Driver v1.07
<6>Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
<6>pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
<6>input: Macintosh mouse button emulation as /devices/virtual/input/input0
<6>Uniform Multi-Platform E-IDE driver
<6>ide-gd driver 1.18
<6>ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
<6>mice: PS/2 mouse device common for all mice
<6>EDAC MC: Ver: 2.1.0 Nov 13 2009
<6>usbcore: registered new interface driver hiddev
<6>usbcore: registered new interface driver usbhid
<6>usbhid: USB HID core driver
<6>TCP cubic registered
<6>NET: Registered protocol family 15
<4>registered taskstats version 1
<4>Freeing unused kernel memory: 640k freed
<7>exit_mmap(): mm c0000000fa9f9580 nr_ptes 1
<0>------------[ cut here ]------------
<2>kernel BUG at mm/mmap.c:2139!
3:mon>


^ permalink raw reply

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Gautham R Shenoy @ 2009-11-13  9:58 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Sachin Sant, LKML, Stephen Rothwell, linux-next, Ingo Molnar,
	Mike Galbraith
In-Reply-To: <1258045831.4039.736.camel@laptop>

On Thu, Nov 12, 2009 at 06:10:31PM +0100, Peter Zijlstra wrote:
> 
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 1f2e99d..62df61c 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -2377,6 +2377,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
>  	task_rq_unlock(rq, &flags);
> 

How about this ?

again:
  	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
 	if (!cpu_online(cpu))
 		cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
	if (!cpu) {
		set_task_affinity(); 
		goto again;
	}
> +
>  	if (cpu != orig_cpu) {
>  		local_irq_save(flags);
>  		rq = cpu_rq(cpu);

Will it help further narrow down the window ?
> 
> 
> Something I think Mike also tried and didn't deadlock for him..
> 
> Sachin, Mike, could you try the above snippet and verify if it does
> indeed solve your respective issues?
> 
> /me prays it does, because otherwise I'm fresh out of clue...

-- 
Thanks and Regards
gautham

^ permalink raw reply

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Peter Zijlstra @ 2009-11-13 10:16 UTC (permalink / raw)
  To: ego
  Cc: Sachin Sant, LKML, Stephen Rothwell, linux-next, Ingo Molnar,
	Mike Galbraith
In-Reply-To: <20091113095801.GA29977@in.ibm.com>

On Fri, 2009-11-13 at 15:28 +0530, Gautham R Shenoy wrote:
> On Thu, Nov 12, 2009 at 06:10:31PM +0100, Peter Zijlstra wrote:
> > 
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 1f2e99d..62df61c 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -2377,6 +2377,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
> >  	task_rq_unlock(rq, &flags);
> > 
> 
> How about this ?
> 
> again:
>   	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
>  	if (!cpu_online(cpu))
>  		cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
> 	if (!cpu) {
> 		set_task_affinity(); 
> 		goto again;
> 	}
> > +
> >  	if (cpu != orig_cpu) {
> >  		local_irq_save(flags);
> >  		rq = cpu_rq(cpu);

Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -2376,7 +2376,15 @@ static int try_to_wake_up(struct task_st
 	p->state = TASK_WAKING;
 	__task_rq_unlock(rq);
 
+again:
 	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
+	if (!cpu_online(cpu))
+		cpu = cpumask_any_and(&p->cpus_allowed, cpu_online_mask);
+	if (cpu >= nr_cpu_ids) {
+		cpuset_cpus_allowed_locked(p, &p->cpus_allowed);
+		goto again;
+	}
+
 	if (cpu != orig_cpu) {
 		rq = cpu_rq(cpu);
 		update_rq_clock(rq);

is what I stuck in and am compiling now.. we'll see what that does.

^ permalink raw reply

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Peter Zijlstra @ 2009-11-13 10:31 UTC (permalink / raw)
  To: ego
  Cc: Sachin Sant, LKML, Stephen Rothwell, linux-next, Ingo Molnar,
	Mike Galbraith
In-Reply-To: <1258107368.4039.1149.camel@laptop>

On Fri, 2009-11-13 at 11:16 +0100, Peter Zijlstra wrote:
> 
> Index: linux-2.6/kernel/sched.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched.c
> +++ linux-2.6/kernel/sched.c
> @@ -2376,7 +2376,15 @@ static int try_to_wake_up(struct task_st
>         p->state = TASK_WAKING;
>         __task_rq_unlock(rq);
>  
> +again:
>         cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
> +       if (!cpu_online(cpu))
> +               cpu = cpumask_any_and(&p->cpus_allowed, cpu_online_mask);
> +       if (cpu >= nr_cpu_ids) {
> +               cpuset_cpus_allowed_locked(p, &p->cpus_allowed);
> +               goto again;
> +       }
> +
>         if (cpu != orig_cpu) {
>                 rq = cpu_rq(cpu);
>                 update_rq_clock(rq);
> 
> is what I stuck in and am compiling now.. we'll see what that does. 

Well, it boots for me, but then, I've not been able to reproduce any
issues anyway :/

/me goes try a PREEMPT=n kernel, since that is what Mike reports boot
funnies with..

Full running diff against -tip:

---
diff --git a/kernel/sched.c b/kernel/sched.c
index 1f2e99d..7089063 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2374,17 +2374,24 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
 	if (task_contributes_to_load(p))
 		rq->nr_uninterruptible--;
 	p->state = TASK_WAKING;
-	task_rq_unlock(rq, &flags);
+	__task_rq_unlock(rq);
 
+again:
 	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
+	if (!cpu_online(cpu))
+		cpu = cpumask_any_and(&p->cpus_allowed, cpu_online_mask);
+	if (cpu >= nr_cpu_ids) {
+		printk(KERN_ERR "Breaking affinity on %d/%s\n", p->pid, p->comm);
+		cpuset_cpus_allowed_locked(p, &p->cpus_allowed);
+		goto again;
+	}
+
 	if (cpu != orig_cpu) {
-		local_irq_save(flags);
 		rq = cpu_rq(cpu);
 		update_rq_clock(rq);
 		set_task_cpu(p, cpu);
-		local_irq_restore(flags);
 	}
-	rq = task_rq_lock(p, &flags);
+	rq = __task_rq_lock(p);
 
 	WARN_ON(p->state != TASK_WAKING);
 	cpu = task_cpu(p);
@@ -7620,6 +7627,8 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
 	unsigned long flags;
 	struct rq *rq;
 
+	printk(KERN_ERR "migration call\n");
+
 	switch (action) {
 
 	case CPU_UP_PREPARE:
@@ -9186,6 +9195,8 @@ int __init sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
 static int update_sched_domains(struct notifier_block *nfb,
 				unsigned long action, void *hcpu)
 {
+	printk(KERN_ERR "update_sched_domains\n");
+
 	switch (action) {
 	case CPU_ONLINE:
 	case CPU_ONLINE_FROZEN:
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 5488a5d..0ff21af 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1345,6 +1345,37 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
 }
 
 /*
+ * Try and locate an idle CPU in the sched_domain.
+ */
+static int
+select_idle_sibling(struct task_struct *p, struct sched_domain *sd, int target)
+{
+	int cpu = smp_processor_id();
+	int prev_cpu = task_cpu(p);
+	int i;
+
+	/*
+	 * If this domain spans both cpu and prev_cpu (see the SD_WAKE_AFFINE
+	 * test in select_task_rq_fair) and the prev_cpu is idle then that's
+	 * always a better target than the current cpu.
+	 */
+	if (target == cpu && !cpu_rq(prev_cpu)->cfs.nr_running)
+		return prev_cpu;
+
+	/*
+	 * Otherwise, iterate the domain and find an elegible idle cpu.
+	 */
+	for_each_cpu_and(i, sched_domain_span(sd), &p->cpus_allowed) {
+		if (!cpu_rq(i)->cfs.nr_running) {
+			target = i;
+			break;
+		}
+	}
+
+	return target;
+}
+
+/*
  * sched_balance_self: balance the current task (running on cpu) in domains
  * that have the 'flag' flag set. In practice, this is SD_BALANCE_FORK and
  * SD_BALANCE_EXEC.
@@ -1398,37 +1429,34 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
 				want_sd = 0;
 		}
 
-		if (want_affine && (tmp->flags & SD_WAKE_AFFINE)) {
-			int candidate = -1, i;
+		/*
+		 * While iterating the domains looking for a spanning
+		 * WAKE_AFFINE domain, adjust the affine target to any idle cpu
+		 * in cache sharing domains along the way.
+		 */
+		if (want_affine) {
+			int target = -1;
 
+			/*
+			 * If both cpu and prev_cpu are part of this domain,
+			 * cpu is a valid SD_WAKE_AFFINE target.
+			 */
 			if (cpumask_test_cpu(prev_cpu, sched_domain_span(tmp)))
-				candidate = cpu;
+				target = cpu;
 
 			/*
-			 * Check for an idle shared cache.
+			 * If there's an idle sibling in this domain, make that
+			 * the wake_affine target instead of the current cpu.
 			 */
-			if (tmp->flags & SD_PREFER_SIBLING) {
-				if (candidate == cpu) {
-					if (!cpu_rq(prev_cpu)->cfs.nr_running)
-						candidate = prev_cpu;
-				}
+			if (tmp->flags & SD_PREFER_SIBLING)
+				target = select_idle_sibling(p, tmp, target);
 
-				if (candidate == -1 || candidate == cpu) {
-					for_each_cpu(i, sched_domain_span(tmp)) {
-						if (!cpumask_test_cpu(i, &p->cpus_allowed))
-							continue;
-						if (!cpu_rq(i)->cfs.nr_running) {
-							candidate = i;
-							break;
-						}
-					}
+			if (target >= 0) {
+				if (tmp->flags & SD_WAKE_AFFINE) {
+					affine_sd = tmp;
+					want_affine = 0;
 				}
-			}
-
-			if (candidate >= 0) {
-				affine_sd = tmp;
-				want_affine = 0;
-				cpu = candidate;
+				cpu = target;
 			}
 		}
 

^ permalink raw reply related

* Re: linux-next: sparc tree build failure
From: Kristoffer Glembo @ 2009-11-13 10:34 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, linux-next, linux-kernel
In-Reply-To: <20091105.000012.61292273.davem@davemloft.net>

I noticed just now that this patch broke the driver on LEON SPARC. It
does not find the root node by using of_find_node_by_name(NULL, "/").

I'm not sure whether this is because we build our OF tree wrong or if
it is an incorrect way of doing things. But if I instead change it to
of_find_node_by_path("/") it works fine.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>

---
  drivers/serial/apbuart.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index a1e9503..fe91319 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -609,7 +609,7 @@ static void grlib_apbuart_configure(void)
                 return;

         /* Get bus frequency */
-       rp = of_find_node_by_name(NULL, "/");
+       rp = of_find_node_by_path("/");
         rp = of_get_next_child(rp, NULL);
         prop = of_get_property(rp, "clock-frequency", NULL);
         freq_khz = *prop;
--
1.5.2.2


David Miller wrote:
> 
> Hmm, it took a tiny bit more than that :-)  Here's what I commited
> to fix this, thanks.
> 
> apbuart: Kill dependency on deprecated Sparc-only PROM interfaces.
> 
> Use the proper modern OF ones instead.
> 
> Noticed by Stephen Rothwell.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  drivers/serial/apbuart.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
> index c7883a3..5f9dec3 100644
> --- a/drivers/serial/apbuart.c
> +++ b/drivers/serial/apbuart.c
> @@ -29,7 +29,6 @@
>  #include <linux/io.h>
>  #include <linux/serial_core.h>
>  #include <asm/irq.h>
> -#include <asm/oplib.h>
>  
>  #include "apbuart.h"
>  
> @@ -596,10 +595,9 @@ static struct of_platform_driver grlib_apbuart_of_driver = {
>  static void grlib_apbuart_configure(void)
>  {
>  	static int enum_done;
> -	struct device_node *np;
> +	struct device_node *np, *rp;
>  	struct uart_port *port = NULL;
> -
> -	int node;
> +	const u32 *prop;
>  	int freq_khz;
>  	int v = 0, d = 0;
>  	unsigned int addr;
> @@ -610,8 +608,10 @@ static void grlib_apbuart_configure(void)
>  		return;
>  
>  	/* Get bus frequency */
> -	node = prom_getchild(prom_root_node);
> -	freq_khz = prom_getint(node, "clock-frequency");
> +	rp = of_find_node_by_name(NULL, "/");
> +	rp = of_get_next_child(rp, NULL);
> +	prop = of_get_property(rp, "clock-frequency", NULL);
> +	freq_khz = *prop;
>  
>  	line = 0;
>  	for_each_matching_node(np, apbuart_match) {

^ permalink raw reply related

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Peter Zijlstra @ 2009-11-13 10:49 UTC (permalink / raw)
  To: ego
  Cc: Sachin Sant, LKML, Stephen Rothwell, linux-next, Ingo Molnar,
	Mike Galbraith
In-Reply-To: <1258108281.22655.5.camel@laptop>

On Fri, 2009-11-13 at 11:31 +0100, Peter Zijlstra wrote:
> /me goes try a PREEMPT=n kernel, since that is what Mike reports boot
> funnies with..

Seems to boot just fine..

let me run a few benchmarks while I have:

while :; 
do
	echo 0 > /sys/devices/system/cpu/cpu1/online; 
	sleep .1;
	echo 1 > /sys/devices/system/cpu/cpu1/online;
done &

running

^ permalink raw reply

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Sachin Sant @ 2009-11-13 11:44 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: ego, LKML, Stephen Rothwell, linux-next, Ingo Molnar,
	Mike Galbraith
In-Reply-To: <1258108281.22655.5.camel@laptop>

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

Peter Zijlstra wrote:
> Well, it boots for me, but then, I've not been able to reproduce any
> issues anyway :/
>
> /me goes try a PREEMPT=n kernel, since that is what Mike reports boot
> funnies with..
>   
With the suggested changes against -next the machine boots fine.
After multiple runs of hackbenck,kernbench,cpu_hotplug tests the
machine is still up and running. So at this point all is well.
I will continue to monitor the box for a while..

I just picked up the changes made to kernel/sched.c. Have attached
the changes here.

Thanks for all your help.

Thanks
-Sachin

-- 

---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------


[-- Attachment #2: sched-next.patch --]
[-- Type: text/x-patch, Size: 861 bytes --]

diff -Naurp a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c	2009-11-13 16:53:19.000000000 +0530
+++ b/kernel/sched.c	2009-11-13 16:50:47.000000000 +0530
@@ -2372,13 +2372,22 @@ static int try_to_wake_up(struct task_st
 	if (task_contributes_to_load(p))
 		rq->nr_uninterruptible--;
 	p->state = TASK_WAKING;
-	task_rq_unlock(rq, &flags);
+	__task_rq_unlock(rq);
 
+again:
 	cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
+	if (!cpu_online(cpu))
+		cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
+	if (cpu >= nr_cpu_ids) {
+		printk(KERN_ERR "Breaking affinity on %d/%s\n", p->pid, p->comm);
+		cpuset_cpus_allowed_locked(p, &p->cpus_allowed);
+		goto again;
+	}
+	
 	if (cpu != orig_cpu)
 		set_task_cpu(p, cpu);
 
-	rq = task_rq_lock(p, &flags);
+	rq = __task_rq_lock(p);
 
 	if (rq != orig_rq)
 		update_rq_clock(rq);

^ permalink raw reply

* Re: linux-next: manual merge of the sound tree with the omap tree
From: Mark Brown @ 2009-11-13 12:39 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Takashi Iwai, linux-next, linux-kernel, Peter Ujfalusi,
	vikram pandita, Tony Lindgren
In-Reply-To: <20091113131947.03d1b259.sfr@canb.auug.org.au>

On Fri, Nov 13, 2009 at 01:19:47PM +1100, Stephen Rothwell wrote:

> Today's linux-next merge of the sound tree got a conflict in
> arch/arm/mach-omap2/board-zoom2.c between commit
> 3541a57ebeb4c817e6e25bb0c2a2c174d6edb7c4 ("omap: zoom2: split board file
> for software reuse") from the omap tree and commits
> f8d9aad96d0d7b57d0bf2e4de21fdda3a42f4449 ("OMAP: Platform support for
> twl4030_codec MFD") and 953e2f3d272db9db6671ad4f4244820557a71cf7 ("OMAP:
> Configure audio_mclk for twl4030-codec MFD") from the sound tree.

> The former moved the code that the latter modifies into another file.  I
> have added the following merge fixup patch and can carry it as necessary.

Adding Tony for the OMAP tree - as discussed previously you could merge

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git twl4030-mfd

into the OMAP tree to resolve this.  There's some older ASoC changes in
there to ensure the patches applied but I'm happy for you to carry those
providing Takashi is.

^ permalink raw reply

* Re: linux-next: manual merge of the sound tree with the omap tree
From: Takashi Iwai @ 2009-11-13 13:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Stephen Rothwell, linux-next, linux-kernel, Peter Ujfalusi,
	vikram pandita, Tony Lindgren
In-Reply-To: <20091113123901.GB30966@sirena.org.uk>

At Fri, 13 Nov 2009 12:39:01 +0000,
Mark Brown wrote:
> 
> On Fri, Nov 13, 2009 at 01:19:47PM +1100, Stephen Rothwell wrote:
> 
> > Today's linux-next merge of the sound tree got a conflict in
> > arch/arm/mach-omap2/board-zoom2.c between commit
> > 3541a57ebeb4c817e6e25bb0c2a2c174d6edb7c4 ("omap: zoom2: split board file
> > for software reuse") from the omap tree and commits
> > f8d9aad96d0d7b57d0bf2e4de21fdda3a42f4449 ("OMAP: Platform support for
> > twl4030_codec MFD") and 953e2f3d272db9db6671ad4f4244820557a71cf7 ("OMAP:
> > Configure audio_mclk for twl4030-codec MFD") from the sound tree.
> 
> > The former moved the code that the latter modifies into another file.  I
> > have added the following merge fixup patch and can carry it as necessary.
> 
> Adding Tony for the OMAP tree - as discussed previously you could merge
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git twl4030-mfd
> 
> into the OMAP tree to resolve this.  There's some older ASoC changes in
> there to ensure the patches applied but I'm happy for you to carry those
> providing Takashi is.

I can merge the tree above to for-next branch of sound git tree, too.
In that way, we can keep asoc branches clean.


thanks,

Takashi

^ permalink raw reply

* Re: linux-next: manual merge of the sound tree with the omap tree
From: Mark Brown @ 2009-11-13 13:11 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Rothwell, linux-next, linux-kernel, Peter Ujfalusi,
	vikram pandita, Tony Lindgren
In-Reply-To: <s5h1vk2po9n.wl%tiwai@suse.de>

On Fri, Nov 13, 2009 at 02:06:44PM +0100, Takashi Iwai wrote:
> Mark Brown wrote:

> > into the OMAP tree to resolve this.  There's some older ASoC changes in
> > there to ensure the patches applied but I'm happy for you to carry those
> > providing Takashi is.

> I can merge the tree above to for-next branch of sound git tree, too.
> In that way, we can keep asoc branches clean.

I believe that creates the same problem both ways :/ .  If we merge
OMAP->sound we may as well put it on the ASoC topic branch, it'll
probably be helpful for people doing OMAP work anyway.

^ permalink raw reply

* Re: linux-next: manual merge of the sound tree with the omap tree
From: Takashi Iwai @ 2009-11-13 13:14 UTC (permalink / raw)
  To: Mark Brown
  Cc: Stephen Rothwell, linux-next, linux-kernel, Peter Ujfalusi,
	vikram pandita, Tony Lindgren
In-Reply-To: <20091113131148.GC21516@rakim.wolfsonmicro.main>

At Fri, 13 Nov 2009 13:11:48 +0000,
Mark Brown wrote:
> 
> On Fri, Nov 13, 2009 at 02:06:44PM +0100, Takashi Iwai wrote:
> > Mark Brown wrote:
> 
> > > into the OMAP tree to resolve this.  There's some older ASoC changes in
> > > there to ensure the patches applied but I'm happy for you to carry those
> > > providing Takashi is.
> 
> > I can merge the tree above to for-next branch of sound git tree, too.
> > In that way, we can keep asoc branches clean.
> 
> I believe that creates the same problem both ways :/ .  If we merge
> OMAP->sound we may as well put it on the ASoC topic branch, it'll
> probably be helpful for people doing OMAP work anyway.

OK, in both ways I don't care...


thanks,

Takashi

^ permalink raw reply

* Re: linux-next: sparc tree build failure
From: David Miller @ 2009-11-13 14:57 UTC (permalink / raw)
  To: kristoffer; +Cc: sfr, linux-next, linux-kernel
In-Reply-To: <4AFD3644.1080907@gaisler.com>


Your patch is correct but is whitespace damaged by your email
client.

Please take extra care to avoid this, because I spent the time to
prepare your patch for application and then it failed, and therefore I
wasted my time on your patch.

^ permalink raw reply

* [PATCH] Use of_find_node_by_path to find root node.
From: Kristoffer Glembo @ 2009-11-13 15:15 UTC (permalink / raw)
  To: davem; +Cc: linux-next, Kristoffer Glembo
In-Reply-To: <20091113.065751.162221666.davem@davemloft.net>

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
---
 drivers/serial/apbuart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index a1e9503..fe91319 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -609,7 +609,7 @@ static void grlib_apbuart_configure(void)
 		return;
 
 	/* Get bus frequency */
-	rp = of_find_node_by_name(NULL, "/");
+	rp = of_find_node_by_path("/");
 	rp = of_get_next_child(rp, NULL);
 	prop = of_get_property(rp, "clock-frequency", NULL);
 	freq_khz = *prop;
-- 
1.5.2.2

^ permalink raw reply related

* Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
From: Mike Galbraith @ 2009-11-13 16:12 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: ego, Sachin Sant, LKML, Stephen Rothwell, linux-next, Ingo Molnar
In-Reply-To: <1258108281.22655.5.camel@laptop>

On Fri, 2009-11-13 at 11:31 +0100, Peter Zijlstra wrote:

> /me goes try a PREEMPT=n kernel, since that is what Mike reports boot
> funnies with..

My highly intermittent funny is still there unfortunately.

dmesg|grep span
[    0.504026]  domain 0: span 0,3 level MC
[    0.504032]   domain 1: span 0-3 level CPU
[    0.504042]  domain 0: span 1-2 level MC
[    0.504047]   domain 1: span 0-3 level CPU
[    0.504055]  domain 0: span 1-2 level MC
[    0.504060]   domain 1: span 0-3 level CPU
[    0.504069]  domain 0: span 0,3 level MC
[    0.504073]   domain 1: span 0-3 level CPU

	-Mike

^ permalink raw reply

* Re: linux-next: manual merge of the sound tree with the omap tree
From: Tony Lindgren @ 2009-11-13 20:44 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mark Brown, Stephen Rothwell, linux-next, linux-kernel,
	Peter Ujfalusi, vikram pandita
In-Reply-To: <s5hzl6qo9c9.wl%tiwai@suse.de>

* Takashi Iwai <tiwai@suse.de> [091113 05:13]:
> At Fri, 13 Nov 2009 13:11:48 +0000,
> Mark Brown wrote:
> > 
> > On Fri, Nov 13, 2009 at 02:06:44PM +0100, Takashi Iwai wrote:
> > > Mark Brown wrote:
> > 
> > > > into the OMAP tree to resolve this.  There's some older ASoC changes in
> > > > there to ensure the patches applied but I'm happy for you to carry those
> > > > providing Takashi is.
> > 
> > > I can merge the tree above to for-next branch of sound git tree, too.
> > > In that way, we can keep asoc branches clean.
> > 
> > I believe that creates the same problem both ways :/ .  If we merge
> > OMAP->sound we may as well put it on the ASoC topic branch, it'll
> > probably be helpful for people doing OMAP work anyway.
> 
> OK, in both ways I don't care...

I think this should get resolved if I git cherry-pick the following
commits to linux-omap for-next:

MFD: twl4030: add twl4030_codec MFD as a new child to the core
0b83ddebc6e884dc0221358cf68c461520fbdd8e

OMAP: Platform support for twl4030_codec MFD
f8d9aad96d0d7b57d0bf2e4de21fdda3a42f4449

OMAP: Configure audio_mclk for twl4030-codec MFD
953e2f3d272db9db6671ad4f4244820557a71cf7

Then I can tweak the sdp and zoom patches accordingly. So let's try
that first, I'll try it out today.

Regards,

Tony

^ permalink raw reply

* Re: [PATCH] Use of_find_node_by_path to find root node.
From: David Miller @ 2009-11-13 21:25 UTC (permalink / raw)
  To: kristoffer; +Cc: linux-next
In-Reply-To: <1258125351-25965-1-git-send-email-kristoffer@gaisler.com>

From: Kristoffer Glembo <kristoffer@gaisler.com>
Date: Fri, 13 Nov 2009 16:15:51 +0100

> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>

Applied, thanks.

^ permalink raw reply

* Re: linux-next: manual merge of the sound tree with the omap tree
From: Tony Lindgren @ 2009-11-14  3:02 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mark Brown, Stephen Rothwell, linux-next, linux-kernel,
	Peter Ujfalusi, vikram pandita, linux-omap
In-Reply-To: <20091113204429.GE3684@atomide.com>

* Tony Lindgren <tony@atomide.com> [091113 12:44]:
> * Takashi Iwai <tiwai@suse.de> [091113 05:13]:
> > At Fri, 13 Nov 2009 13:11:48 +0000,
> > Mark Brown wrote:
> > > 
> > > On Fri, Nov 13, 2009 at 02:06:44PM +0100, Takashi Iwai wrote:
> > > > Mark Brown wrote:
> > > 
> > > > > into the OMAP tree to resolve this.  There's some older ASoC changes in
> > > > > there to ensure the patches applied but I'm happy for you to carry those
> > > > > providing Takashi is.
> > > 
> > > > I can merge the tree above to for-next branch of sound git tree, too.
> > > > In that way, we can keep asoc branches clean.
> > > 
> > > I believe that creates the same problem both ways :/ .  If we merge
> > > OMAP->sound we may as well put it on the ASoC topic branch, it'll
> > > probably be helpful for people doing OMAP work anyway.
> > 
> > OK, in both ways I don't care...
> 
> I think this should get resolved if I git cherry-pick the following
> commits to linux-omap for-next:
> 
> MFD: twl4030: add twl4030_codec MFD as a new child to the core
> 0b83ddebc6e884dc0221358cf68c461520fbdd8e
> 
> OMAP: Platform support for twl4030_codec MFD
> f8d9aad96d0d7b57d0bf2e4de21fdda3a42f4449
> 
> OMAP: Configure audio_mclk for twl4030-codec MFD
> 953e2f3d272db9db6671ad4f4244820557a71cf7
> 
> Then I can tweak the sdp and zoom patches accordingly. So let's try
> that first, I'll try it out today.

OK, I ended up cherry-picking the following MFD commits to keep things
compiling:

$ git cherry-pick 0b83ddebc6e884dc0221358cf68c461520fbdd8e
$ git cherry-pick f8d9aad96d0d7b57d0bf2e4de21fdda3a42f4449
$ git cherry-pick cfd5324e699a2e74a44642d43dcf03d581f2a7db
$ git cherry-pick 953e2f3d272db9db6671ad4f4244820557a71cf7
$ git cherry-pick f9b4639e045c750e2bad37462476403995508350

Then I made the following changes to linux-omap for-next branch.
I will revert these changes as a fix after the merge window.

Without the patch below, there will still be conflicts. And
git mergetool ends up adding back the non-compiling entries
to board-zoom2.c.

But with the patch things work. So pulling

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 twl4030-mfd

to linux-omap for-next branch does not cause conflicts. So hopefully
it now works for Stephen too.

Regards,

Tony

--- b/arch/arm/mach-omap2/board-omap3evm.c
+++ a/arch/arm/mach-omap2/board-omap3evm.c
@@ -308,8 +308,6 @@ static struct twl4030_platform_data omap3evm_twldata = {
 	.usb		= &omap3evm_usb_data,
 	.gpio		= &omap3evm_gpio_data,
 	.codec		= &omap3evm_codec_data,
-	.vmmc1		= &omap3evm_vmmc1,
-	.vsim		= &omap3evm_vsim,
 };
 
 static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
@@ -323,6 +321,13 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
 
 static int __init omap3_evm_i2c_init(void)
 {
+	/*
+	 * REVISIT: These entries can be set in omap3evm_twl_data
+	 * after a merge with MFD tree
+	 */
+	omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
+	omap3evm_twldata.vsim = &omap3evm_vsim;
+
 	omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
 			ARRAY_SIZE(omap3evm_i2c_boardinfo));
 	omap_register_i2c_bus(2, 400, NULL, 0);
diff --git b/arch/arm/mach-omap2/board-zoom2.c a/arch/arm/mach-omap2/board-zoom2.c
index 3e88fcc..f2e66f3 100644
--- b/arch/arm/mach-omap2/board-zoom2.c
+++ a/arch/arm/mach-omap2/board-zoom2.c
@@ -36,6 +36,31 @@ static void __init omap_zoom2_init_irq(void)
 	omap_gpio_init();
 }
 
+/* REVISIT: These audio entries can be removed once MFD code is merged */
+#if 0
+
+static struct twl4030_madc_platform_data zoom2_madc_data = {
+	.irq_line	= 1,
+};
+
+static struct twl4030_platform_data zoom2_twldata = {
+	.irq_base	= TWL4030_IRQ_BASE,
+	.irq_end	= TWL4030_IRQ_END,
+
+	/* platform_data for children goes here */
+	.bci		= &zoom2_bci_data,
+	.madc		= &zoom2_madc_data,
+	.usb		= &zoom2_usb_data,
+	.gpio		= &zoom2_gpio_data,
+	.keypad		= &zoom2_kp_twl4030_data,
+	.vmmc1          = &zoom2_vmmc1,
+	.vmmc2          = &zoom2_vmmc2,
+	.vsim           = &zoom2_vsim,
+
+};
+
+#endif
+
 extern int __init omap_zoom2_debugboard_init(void);
 extern void __init zoom_peripherals_init(void);
 

^ permalink raw reply related

* linux-next: net tree build failure
From: Stephen Rothwell @ 2009-11-14  6:50 UTC (permalink / raw)
  To: David S. Miller, netdev
  Cc: linux-next, linux-kernel, Arnaldo Carvalho de Melo

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

Hi Dave,

Today's linux-next build (alpha defconfig) failed like this:

arch/alpha/kernel/systbls.S:507: Error: .err encountered

Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net:
Introduce recvmmsg socket syscall") which added a syscall to the alpha
syscall table but forgot to update NR_SYSCALLS in
arch/alpha/include/asm/unistd.h (it also didn't add the __NR_ constant
thee either).

I suspect that this is true for a few other architectures as well
(including sparc?).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: linux-next: net tree build failure
From: Arnaldo Carvalho de Melo @ 2009-11-14 13:18 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David S. Miller, netdev, linux-next, linux-kernel
In-Reply-To: <20091114175041.61bdb27f.sfr@canb.auug.org.au>

Em Sat, Nov 14, 2009 at 05:50:41PM +1100, Stephen Rothwell escreveu:
> Hi Dave,
> 
> Today's linux-next build (alpha defconfig) failed like this:
> 
> arch/alpha/kernel/systbls.S:507: Error: .err encountered
> 
> Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net:
> Introduce recvmmsg socket syscall") which added a syscall to the alpha
> syscall table but forgot to update NR_SYSCALLS in
> arch/alpha/include/asm/unistd.h (it also didn't add the __NR_ constant
> thee either).
> 
> I suspect that this is true for a few other architectures as well
> (including sparc?).

I'm trying to get hold of a cross compiler setup now...

- Arnaldo

^ permalink raw reply

* Re: linux-next: i7core_edac tree build failure
From: Stephen Rothwell @ 2009-11-15 23:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Rusty Russell, linux-next, linux-kernel, Aristeu Rozanski
In-Reply-To: <20091113105435.1b9b0060.sfr@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

Hi Mauro,

On Fri, 13 Nov 2009 10:54:35 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Yeah, the i7core_edac fix needs to stay in my tree as it is an
> interaction between two trees in linux-next.  The others should be
> applied to the powerpc and sparc trees, as you say, since they fix the
> current code in those trees.

Actually, Mauro, this patch should be applied to the i7core_edac as that
symbol never needed to be exported and the patch to export it is in that
tree.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox