public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/3] ARM: SoC: Add per SoC SMP and CPU hotplug operations
Date: Thu, 08 Sep 2011 22:23:53 +0200	[thread overview]
Message-ID: <1594529.EmMGjcLOoi@wuerfel> (raw)
In-Reply-To: <1315501212-1820-3-git-send-email-marc.zyngier@arm.com>

On Thursday 08 September 2011 18:00:11 Marc Zyngier wrote:
> +struct arm_soc_smp_ops {
> +       void (*smp_init_cpus)(void);
> +       void (*smp_prepare_cpus)(unsigned int max_cpus);
> +       void (*smp_secondary_init)(unsigned int cpu);
> +       int  (*smp_boot_secondary)(unsigned int cpu, struct task_struct *idle);
> +#ifdef CONFIG_HOTPLUG_CPU
> +       int  (*cpu_kill)(unsigned int cpu);
> +       void (*cpu_die)(unsigned int cpu);
> +       int  (*cpu_disable)(unsigned int cpu);
> +#endif
> +};
> +
>  struct arm_soc_desc {
>         const char              *name;
> +#ifdef CONFIG_SMP
> +       struct arm_soc_smp_ops  smp_ops;
> +#endif
>  };

If you make this two data structures, I would actually recommend using a
pointer to the arm_soc_smp_ops instead of embedding it in arm_soc_desc.

This will make it possible to put the arm_soc_smp_ops into the plat_smp.c file
and get rid of a few more #ifdefs.

It may also be a good idea to have global pointers and for arm_soc_desc and
arm_soc_smp_ops instead of pointing to them from the board file. I can see
reasons both ways, and that should probably be driven by code efficiency
concerns.

	Arnd

  reply	other threads:[~2011-09-08 20:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 17:00 [RFC PATCH 0/3] Per SoC descriptor Marc Zyngier
2011-09-08 17:00 ` [RFC PATCH 1/3] ARM: SoC: Introduce per " Marc Zyngier
2011-09-08 17:00 ` [RFC PATCH 2/3] ARM: SoC: Add per SoC SMP and CPU hotplug operations Marc Zyngier
2011-09-08 20:23   ` Arnd Bergmann [this message]
2011-09-08 17:00 ` [RFC PATCH 3/3] ARM: SoC: convert VExpress/RealView to SoC descriptor Marc Zyngier
2011-09-08 20:18 ` [RFC PATCH 0/3] Per " Arnd Bergmann
2011-09-08 20:54   ` Nicolas Pitre

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=1594529.EmMGjcLOoi@wuerfel \
    --to=arnd@arndb.de \
    --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