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:	Fri, 21 Jun 2013 23:00:38 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Stephen Boyd <sboyd@...eaurora.org>
cc:	Srinivas KANDAGATLA <srinivas.kandagatla@...com>,
	John Stultz <john.stultz@...aro.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Rob Landley <rob@...dley.net>,
	devicetree-discuss@...ts.ozlabs.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	Stephen Gallimore <stephen.gallimore@...com>,
	Stuart Menefy <stuart.menefy@...com>,
	Rob Herring <robherring2@...il.com>,
	Will Deacon <will.deacon@....com>
Subject: Re: [PATCH v4] clocksource:arm_global_timer: Add ARM global timer
 support.

On Fri, 21 Jun 2013, Stephen Boyd wrote:

> On 06/21/13 08:56, Thomas Gleixner wrote:
> >
> >> +static irqreturn_t gt_clockevent_interrupt(int irq, void *dev_id)
> >> +{
> >> +	struct clock_event_device *evt = *(struct clock_event_device **)dev_id;
> > What kind of construct is this?
> >
> > You are using request_percpu_irq() and the device id is pointing to
> > per cpu memory. Why do you need this horrible pointer indirection?
> >
> > Because a lot of other ARM code uses the same broken construct?
> 
> This is an artifact of the ARM local timer API. I have been trying for a

No, it's not an artifact. It's a copy and paste issue. Looking at
drivers/clocksource/arm_arch_timer.c

        arch_timer_evt = alloc_percpu(struct clock_event_device);
...
	err = request_percpu_irq(ppi, arch_timer_handler_virt,
                                 "arch_timer", arch_timer_evt);

This code is correct and it does not need any of the changes.

Doing it with the pointer madness is just wrong, nothing else. Even if
there is a historic reason why the pointer juggling was necessary at
some point, it's obviously not needed anymore.

And historic crap is no justification for brainlessly copied code.

Thanks,

	tglx


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