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]
Message-ID: <alpine.LFD.2.00.0903191639530.29264@localhost.localdomain>
Date:	Thu, 19 Mar 2009 16:49:21 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Michal Simek <monstr@...str.eu>
cc:	linux-kernel@...r.kernel.org, john.williams@...alogix.com
Subject: Re: [PATCH 08/57] microblaze_v7: Interrupt handling, timer support,
 selfmod code

Michal,

On Wed, 18 Mar 2009, monstr@...str.eu wrote:

> +static u32 concurrent_irq;
> +
> +void do_IRQ(struct pt_regs *regs)
> +{
> +	unsigned int irq;
> +	struct pt_regs *old_regs = set_irq_regs(regs);
> +
> +	irq_enter();
> +	irq = get_irq(regs);
> +next_irq:
> +	BUG_ON(irq == -1U);
> +	__do_IRQ(irq);

You use irq chips now and you set the type handlers (edge/level), but
you still call __do_IRQ() the all in one fits nothing handler, which
is going to be deprecated and removed.

Please call 
       generic_handle_irq(irq);

which will call the correct flow handlers.

> +static int microblaze_timer_set_next_event(unsigned long delta,
> +					 struct clock_event_device *dev)
> +{
> +	printk(KERN_INFO "next event, delta %x, %d\n", (u32)delta, (u32)delta);

  This should be pr_debug() or do you want to flood the syslog in
  every timer interrupt ?

> +	microblaze_timer_start(delta);
> +	return 0;
> +}
> +
> +static void microblaze_timer_set_mode(enum clock_event_mode mode,
> +				    struct clock_event_device *evt)
> +{
> +	microblaze_timer_stop();
> +
> +	switch (mode) {
> +	case CLOCK_EVT_MODE_PERIODIC:
> +		printk(KERN_INFO "%s: periodic\n", __func__);

  pr_debug as well. That's not very informative

> +static irqreturn_t timer_interrupt(int irq, void *dev_id)
> +{
> +	struct clock_event_device *evt = &clockevent_microblaze_timer;
> +#ifdef CONFIG_HEART_BEAT
> +	heartbeat();
> +#endif
> +	timer_ack();
> +
> +	mb_tick_cnt += cpuinfo.freq_div_hz;

Hmm. How does that work with oneshot timers ?

> +	evt->event_handler(evt);
> +	return IRQ_HANDLED;
> +}
> +
> +static struct irqaction timer_irqaction = {
> +	.handler = timer_interrupt,
> +	.flags = IRQF_DISABLED,

    IRQF_DISABLED  | IRQF_TIMER,


> +	xtime.tv_sec = mktime(2007, 1, 1, 0, 0, 0);
> +	xtime.tv_nsec = 0;
> +	set_normalized_timespec(&wall_to_monotonic,
> +				-xtime.tv_sec, -xtime.tv_nsec);

  Yuck. What's that ? wall_to_monotonic is maintained by the generic
  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