lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Jan 2012 10:31:23 +0100
From:	Joerg Roedel <joro@...tes.org>
To:	Yang Bai <hamo.by@...il.com>
Cc:	Joerg Roedel <joerg.roedel@....com>,
	Russell King <linux@....linux.org.uk>,
	Marc Zyngier <marc.zyngier@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Rob Herring <rob.herring@...xeda.com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm: Fix linux-next compile error in
	arch/arm/common/gic.c

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@....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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ