All of lore.kernel.org
 help / color / mirror / Atom feed
From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: Fix linux-next compile error in arch/arm/common/gic.c
Date: Tue, 3 Jan 2012 10:31:23 +0100	[thread overview]
Message-ID: <20120103093123.GA7620@8bytes.org> (raw)
In-Reply-To: <CAO_0yfOzVCK8OGL5G9Aej+V4AZ12EMFKi3HafAX0JzeW9C3FtQ@mail.gmail.com>

On Tue, Jan 03, 2012 at 08:44:01AM +0800, Yang Bai wrote:
> On Tue, Jan 3, 2012 at 12:33 AM, Joerg Roedel <joerg.roedel@amd.com> wrote:

> > ? ? ? ? ? ? ? ?for_each_possible_cpu(cpu) {
> > - ? ? ? ? ? ? ? ? ? ? ? unsigned long offset = percpu_offset * cpu_logical_map(cpu);
> > + ? ? ? ? ? ? ? ? ? ? ? unsigned long offset = percpu_offset;
> > +#ifdef CONFIG_SMP
> > + ? ? ? ? ? ? ? ? ? ? ? offset *= cpu_logical_map(cpu);
> > +#endif
> > ? ? ? ? ? ? ? ? ? ? ? ?*per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
> > ? ? ? ? ? ? ? ? ? ? ? ?*per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
> > ? ? ? ? ? ? ? ?}
> > --
> > 1.7.5.4
> >
> >
> 
> Is this the right way to fix it? Or shall we do like this:
> 
> #ifdef CONFIG_SMP
> ...
> #else
> #define cpu_logical_map() 1
> #endif
> 
> and leave the gic.c code unchanged.

Well, I don't care ;) But everywhere else in this file the use of
cpu_logical_map() is #ifdef'ed with CONFIG_SMP. So for consistency my
proposed variant is better, no?


	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Yang Bai <hamo.by@gmail.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>,
	Russell King <linux@arm.linux.org.uk>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm: Fix linux-next compile error in arch/arm/common/gic.c
Date: Tue, 3 Jan 2012 10:31:23 +0100	[thread overview]
Message-ID: <20120103093123.GA7620@8bytes.org> (raw)
In-Reply-To: <CAO_0yfOzVCK8OGL5G9Aej+V4AZ12EMFKi3HafAX0JzeW9C3FtQ@mail.gmail.com>

On Tue, Jan 03, 2012 at 08:44:01AM +0800, Yang Bai wrote:
> On Tue, Jan 3, 2012 at 12:33 AM, Joerg Roedel <joerg.roedel@amd.com> wrote:

> >                for_each_possible_cpu(cpu) {
> > -                       unsigned long offset = percpu_offset * cpu_logical_map(cpu);
> > +                       unsigned long offset = percpu_offset;
> > +#ifdef CONFIG_SMP
> > +                       offset *= cpu_logical_map(cpu);
> > +#endif
> >                        *per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
> >                        *per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
> >                }
> > --
> > 1.7.5.4
> >
> >
> 
> Is this the right way to fix it? Or shall we do like this:
> 
> #ifdef CONFIG_SMP
> ...
> #else
> #define cpu_logical_map() 1
> #endif
> 
> and leave the gic.c code unchanged.

Well, I don't care ;) But everywhere else in this file the use of
cpu_logical_map() is #ifdef'ed with CONFIG_SMP. So for consistency my
proposed variant is better, no?


	Joerg


  reply	other threads:[~2012-01-03  9:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 16:33 [PATCH] arm: Fix linux-next compile error in arch/arm/common/gic.c Joerg Roedel
2012-01-02 16:33 ` Joerg Roedel
2012-01-03  0:44 ` Yang Bai
2012-01-03  0:44   ` Yang Bai
2012-01-03  9:31   ` Joerg Roedel [this message]
2012-01-03  9:31     ` Joerg Roedel
2012-01-03 11:16   ` Marc Zyngier
2012-01-03 11:16     ` Marc Zyngier
2012-01-03 13:53     ` Rob Herring
2012-01-03 13:53       ` Rob Herring
2012-01-03 14:05       ` Marc Zyngier
2012-01-03 14:05         ` Marc Zyngier
2012-01-03 17:32         ` Will Deacon
2012-01-03 17:32           ` Will Deacon

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=20120103093123.GA7620@8bytes.org \
    --to=joro@8bytes.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.