[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 Sep 2014 11:12:01 +0200
From: Robert Richter <rric@...nel.org>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
Robert Richter <rrichter@...ium.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] GICv3: Fixing 32 bit compatibility
On 09.09.14 10:00:42, Uwe Kleine-König wrote:
> On Mon, Sep 08, 2014 at 04:11:19PM +0200, Robert Richter wrote:
> > @@ -479,7 +479,7 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
> > smp_wmb();
> >
> > for_each_cpu_mask(cpu, *mask) {
> > - u64 cluster_id = cpu_logical_map(cpu) & ~0xffUL;
> > + u64 cluster_id = cpu_logical_map(cpu) & ~0xffULL;
> This doesn't change anything, does it?
It does, not in 64 bit but in 32 bit there unsigned long is 32
bit. So, bit masks are broken if you compile a 32 bit kernel.
> I wonder if it would be cleaner to use (u64)0xff here.
No, that's ULL for. This is commonly used in x86 too.
-Robert
--
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