linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bryan.wu@canonical.com (Bryan Wu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] ARM: Add inline function smp_on_up() for early init testing
Date: Mon, 6 Sep 2010 18:17:12 +0800	[thread overview]
Message-ID: <AANLkTik2FNBv-72C4L7PxBoMsTENSds-PvbAzxGd-h4y@mail.gmail.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02CCFE75A2@dbde02.ent.ti.com>

Tony,

I tried your latest branch: devel-smp-on-unicore, kernel boots up but
got lots of WARN_ON fired:

---
------------[ cut here ]------------
[    1.149719] WARNING: at mm/percpu-vm.c:320 pcpu_alloc+0x2fc/0x888()
[    1.149780] Modules linked in:
[    1.149841] [<c01b34c8>] (unwind_backtrace+0x0/0xe4) from
[<c01e939c>] (warn_slowpath_common+0x4c/0x64)
[    1.149902] [<c01e939c>] (warn_slowpath_common+0x4c/0x64) from
[<c01e93cc>] (warn_slowpath_null+0x18/0x1c)
[    1.149993] [<c01e93cc>] (warn_slowpath_null+0x18/0x1c) from
[<c0274730>] (pcpu_alloc+0x2fc/0x888)
[    1.150085] [<c0274730>] (pcpu_alloc+0x2fc/0x888) from [<c0279578>]
(sget+0x198/0x43c)
[    1.150146] [<c0279578>] (sget+0x198/0x43c) from [<c0279adc>]
(get_sb_ns+0x20/0x90)
[    1.150238] [<c0279adc>] (get_sb_ns+0x20/0x90) from [<c02791a4>]
(vfs_kern_mount+0x9c/0x18c)
[    1.150299] [<c02791a4>] (vfs_kern_mount+0x9c/0x18c) from
[<c0022280>] (init_mqueue_fs+0x68/0xc8)
[    1.150390] [<c0022280>] (init_mqueue_fs+0x68/0xc8) from
[<c01ac5d0>] (do_one_initcall+0xcc/0x1a4)
[    1.150451] [<c01ac5d0>] (do_one_initcall+0xcc/0x1a4) from
[<c0008760>] (kernel_init+0x148/0x210)
[    1.150543] [<c0008760>] (kernel_init+0x148/0x210) from
[<c01adcf8>] (kernel_thread_exit+0x0/0x8)
[    1.150604] ---[ end trace 1b75b31a2719ed74 ]---
---

It looks like we still missed to set some flag for chuck.

-Bryan

On Fri, Sep 3, 2010 at 8:09 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
>
>
>> -----Original Message-----
>> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
>> owner at vger.kernel.org] On Behalf Of Tony Lindgren
>> Sent: Thursday, September 02, 2010 11:13 PM
>> To: Russell King - ARM Linux
>> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
>> Bryan Wu; Will Deacon
>> Subject: Re: [PATCH 1/6] ARM: Add inline function smp_on_up() for early
>> init testing
>>
>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [100902 10:00]:
>> > On Thu, Sep 02, 2010 at 09:18:47AM -0700, Tony Lindgren wrote:
>> >
>> > > --- a/arch/arm/include/asm/smp_plat.h
>> > > +++ b/arch/arm/include/asm/smp_plat.h
>> > > @@ -39,4 +39,20 @@ static inline int cache_ops_need_broadcast(void)
>> > > ?#define UP(instr...) ? ? _str(instr)
>> > > ?#endif
>> > >
>> > > +static inline int smp_on_up(void)
>> > > +{
>> > > +#ifdef CONFIG_SMP_ON_UP
>> > > + int smp_on_up;
>> > > +
>> > > + asm( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
>> > > + ? ? ? ? SMP(mov %0, #0) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
>> > > + ? ? ? ? UP(mov ?%0, #1) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
>> > > + ? ? ? ? : "=r" (smp_on_up));
>> > > +
>> > > + return smp_on_up;
>> > > +#else
>> > > + return 0;
>> > > +#endif
>> >
>> > I think this is the wrong approach - rather than a function which tells
>> us
>> > just if we are a SMP kernel running on UP, why not something which
>> returns
>> > whether we're running on SMP and use that to eliminate some of these
>> ifdefs?
>>
>> Sure. Will has something like this in his patches:
>>
>> static inline int cpu_is_part_of_mp_system(void)
>> {
>> ? ? ? u32 mpidr;
>> ? ? ? asm volatile("mrc p15, 0, %0, c0, c0, 5" : "=r" (mpidr));
>> ? ? ? return (mpidr >> 31) ? !(mpidr >> 30) : 0;
>> }
>
> I guess this register is only available on MP Core extensions.
>
> Regards,
> Santosh
>

  reply	other threads:[~2010-09-06 10:17 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 10:53 [PATCH 0/4] Hacks to allow booting ARM SMP kernel on UP ARMv7 Tony Lindgren
2010-08-17 10:53 ` [PATCH 1/4] ARM: Add SMP_ON_UP Kconfig option for booting SMP kernel on UP Tony Lindgren
2010-08-17 10:53 ` [PATCH 2/4] ARM: Allow optional UP processor functions for SMP kernels Tony Lindgren
2010-08-17 11:08   ` Russell King - ARM Linux
2010-08-17 11:20     ` Tony Lindgren
2010-08-17 10:53 ` [PATCH 3/4] ARM: Set separate proc-v7 functions for SMP Tony Lindgren
2010-08-17 10:53 ` [PATCH 4/4] omap: Fix SMP on UP interrupt handling for multi-omap Tony Lindgren
2010-08-17 11:07   ` srinidhi
2010-08-17 11:30     ` Tony Lindgren
2010-08-17 12:14       ` srinidhi
2010-08-17 14:14         ` Tony Lindgren
2010-08-17 15:07           ` Shilimkar, Santosh
2010-09-02 16:27       ` Tony Lindgren
2010-08-17 13:52 ` [PATCH 0/4] Hacks to allow booting ARM SMP kernel on UP ARMv7 Russell King - ARM Linux
2010-08-17 14:12   ` Tony Lindgren
2010-08-17 15:40     ` Russell King - ARM Linux
2010-08-19  7:38       ` Tony Lindgren
2010-08-19  9:38         ` Bryan Wu
2010-08-19  9:57           ` Tony Lindgren
2010-08-19 10:20             ` Russell King - ARM Linux
2010-08-20 12:06               ` Tony Lindgren
2010-08-30 22:55                 ` Tony Lindgren
2010-09-02 13:36                   ` Russell King - ARM Linux
2010-09-02 16:16                     ` Tony Lindgren
2010-09-02 16:18                       ` [PATCH 1/6] ARM: Add inline function smp_on_up() for early init testing Tony Lindgren
2010-09-02 17:08                         ` Russell King - ARM Linux
2010-09-02 17:15                           ` [PATCH 0/6] " Tony Lindgren
2010-09-02 17:42                           ` [PATCH 1/6] " Tony Lindgren
2010-09-02 19:26                             ` [PATCH 1/6] ARM: Add inline function smp_cpu() " Tony Lindgren
2010-09-03  0:08                               ` Tony Lindgren
2010-09-03  2:22                                 ` Tony Lindgren
2010-09-03  8:58                                   ` Will Deacon
2010-09-03  9:02                                     ` Russell King - ARM Linux
2010-09-03  9:07                                       ` Will Deacon
2010-09-03 12:12                               ` Shilimkar, Santosh
2010-09-03 12:23                                 ` Will Deacon
2010-09-03 12:31                                   ` Shilimkar, Santosh
2010-09-05  1:53                                 ` Michał Nazarewicz
2010-09-03 12:09                             ` [PATCH 1/6] ARM: Add inline function smp_on_up() " Shilimkar, Santosh
2010-09-06 10:17                               ` Bryan Wu [this message]
2010-09-08  3:26                                 ` Tony Lindgren
2010-09-08 20:26                                   ` Tony Lindgren
2010-09-09  3:45                                     ` Bryan Wu
2010-09-02 16:19                       ` [PATCH 2/6] ARM: Use SMP and UP macros for cacheflush Tony Lindgren
2010-09-03 11:57                         ` Shilimkar, Santosh
2010-09-04 10:57                           ` Russell King - ARM Linux
2010-09-04 11:01                             ` Shilimkar, Santosh
2010-09-02 16:20                       ` [PATCH 3/6] ARM: Fix v7wbi_tlb_flags for SMP on UP Tony Lindgren
2010-09-02 16:25                         ` Russell King - ARM Linux
2010-09-02 16:34                           ` Tony Lindgren
2010-09-02 23:47                             ` Tony Lindgren
2010-09-03  9:07                               ` Russell King - ARM Linux
2010-09-03  9:10                                 ` Russell King - ARM Linux
2010-09-03 17:04                                   ` Tony Lindgren
2010-09-03 19:36                                     ` Russell King - ARM Linux
2010-09-06 11:46                                   ` Catalin Marinas
2010-09-06 15:34                                     ` Russell King - ARM Linux
2010-09-06 15:53                                       ` Catalin Marinas
2010-09-06 16:36                                         ` Russell King - ARM Linux
2010-09-06 17:11                                           ` Catalin Marinas
2010-09-02 16:21                       ` [PATCH 4/6] ARM: Do not call test_for_ipi or test_for_ltrirq on UP systems Tony Lindgren
2010-09-03 12:00                         ` Shilimkar, Santosh
2010-09-04 10:55                           ` Russell King - ARM Linux
2010-09-04 10:55                         ` Russell King - ARM Linux
2010-09-02 16:22                       ` [PATCH 5/6] ARM: Don't set TLB ops broadcasting on UP ARMv7 Tony Lindgren
2010-09-02 16:57                         ` Russell King - ARM Linux
2010-09-02 17:21                           ` Tony Lindgren
2010-09-02 18:01                             ` Russell King - ARM Linux
2010-09-02 18:13                               ` Tony Lindgren
2010-09-02 18:18                                 ` Russell King - ARM Linux
2010-09-02 16:23                       ` [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap Tony Lindgren
2010-09-02 19:30                         ` Tony Lindgren
2010-09-03 12:15                           ` Shilimkar, Santosh
2010-09-08  3:30                             ` Tony Lindgren
2010-09-03 12:06                         ` Shilimkar, Santosh
2010-09-04 11:05                           ` Russell King - ARM Linux
2010-09-04 11:22                             ` Shilimkar, Santosh
2010-09-03  4:20                       ` [PATCH 0/4] Hacks to allow booting ARM SMP kernel on UP ARMv7 Bryan Wu
2010-09-03  7:46                         ` Russell King - ARM Linux
2010-09-06  9:28                       ` Catalin Marinas
2010-09-06  9:34                         ` Russell King - ARM Linux
2010-09-06  9:38                           ` Catalin Marinas
2010-09-06 10:06                             ` Russell King - ARM Linux
2010-09-06 10:39                               ` Catalin Marinas
2010-09-02 13:33         ` Russell King - ARM Linux
2010-09-03  1:39           ` Tony Lindgren
2010-08-23 16:59 ` Will Deacon
2010-08-30 22:53   ` Tony Lindgren
2010-09-06 10:44 ` Russell King - ARM Linux
2010-09-06 15:16   ` Catalin Marinas
2010-09-06 18:03   ` Tony Lindgren
2010-09-08  3:09     ` Tony Lindgren
2010-09-08  3:12       ` [PATCH] ARM: Check for is_smp for tlb_ops and cache_ops boardcast Tony Lindgren
2010-09-08  3:14         ` [PATCH] ARM: Don't try to send IPI on UP systems with CONFIG_SMP Tony Lindgren
2010-09-08  3:17           ` [PATCH] omap: Fix CONFIG_LOCAL_TIMERS initialization for multi-omap Tony Lindgren
2010-09-08  7:26             ` Shilimkar, Santosh
2010-09-08  7:30           ` [PATCH] ARM: Don't try to send IPI on UP systems with CONFIG_SMP Shilimkar, Santosh
2010-09-08  8:56           ` Russell King - ARM Linux
2010-09-08 19:32             ` Tony Lindgren
2010-10-05 22:19         ` [PATCH] ARM: Check for is_smp for tlb_ops and cache_ops boardcast Tony Lindgren
2010-10-05 22:33           ` Russell King - ARM Linux
2010-10-06 14:44             ` Tony Lindgren
2010-10-06 22:33               ` Russell King - ARM Linux
2010-10-06 23:07                 ` Tony Lindgren
2010-09-14 18:59   ` [PATCH] ARM: Handle __flush_icache_all for CONFIG_SMP_ON_UP Tony Lindgren
2010-09-14 19:03     ` [PATCH] omap: Update omap3_defconfig to work with SMP_ON_UP Tony Lindgren
2010-09-14 19:05       ` [PATCH] omap: Update omap3_defconfig for omap2 Tony Lindgren
2010-09-14 19:17       ` [PATCH] omap: Update omap3_defconfig to work with SMP_ON_UP Shilimkar, Santosh
2010-09-14 20:27         ` Tony Lindgren
2010-09-15  6:11           ` Shilimkar, Santosh
2010-09-15 16:11             ` Tony Lindgren
2010-09-15 18:25               ` Shilimkar, Santosh
2010-09-15 23:15                 ` Tony Lindgren
2010-09-16 17:05     ` [PATCH] ARM: Handle __flush_icache_all for CONFIG_SMP_ON_UP Catalin Marinas
2010-09-21 16:16     ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2010-08-30 21:00 [PATCH 1/6] ARM: Add inline function smp_on_up() for early init testing Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTik2FNBv-72C4L7PxBoMsTENSds-PvbAzxGd-h4y@mail.gmail.com \
    --to=bryan.wu@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).