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: <AANLkTimvudYv4fwyGWjL5c10QrM9GtC2SXjPZzcV20_s@mail.gmail.com>
Date:	Tue, 31 Aug 2010 12:53:12 +0800
From:	Haojian Zhuang <haojian.zhuang@...il.com>
To:	"Mark F. Brown" <mark.brown314@...il.com>
Cc:	Eric Miao <eric.y.miao@...il.com>,
	Haojian Zhuang <haojian.zhuang@...vell.com>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-input <linux-input@...r.kernel.org>
Subject: Re: [PATCH 4/5] ARM: pxa168: added special case handler for keypad interrupts

On Thu, Aug 26, 2010 at 5:18 PM, Mark F. Brown <mark.brown314@...il.com> wrote:
> Signed-off-by: Mark F. Brown <mark.brown314@...il.com>
> ---
>  arch/arm/mach-mmp/irq-pxa168.c |   23 ++++++++++++++++++++++-
>  1 files changed, 22 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-mmp/irq-pxa168.c b/arch/arm/mach-mmp/irq-pxa168.c
> index 52ff2f0..bfb0984 100644
> --- a/arch/arm/mach-mmp/irq-pxa168.c
> +++ b/arch/arm/mach-mmp/irq-pxa168.c
> @@ -17,6 +17,8 @@
>  #include <linux/io.h>
>
>  #include <mach/regs-icu.h>
> +#include <mach/regs-apmu.h>
> +#include <mach/cputype.h>
>
>  #include "common.h"
>
> @@ -42,6 +44,19 @@ static struct irq_chip icu_irq_chip = {
>        .unmask = icu_unmask_irq,
>  };
>
> +void handle_pxa168_keypad_irq(unsigned int irq, struct irq_desc *desc)
> +{
> +       uint32_t val;
> +       uint32_t mask = APMU_PXA168_KP_WAKE_CLR;
> +
> +       /* clear keypad wake event */
> +       val = __raw_readl(APMU_WAKE_CLR);
> +       __raw_writel(val |  mask, APMU_WAKE_CLR);
> +
> +       /* handle irq */
> +       handle_level_irq(irq, desc);
> +}
> +

Why should you clear wakeup event status in IRQ handler? If system is
resumed by keypad event, you should clear this wakeup source in resume
code. I think that IRQ code should not be binded with wakeup event at
here.

>  void __init icu_init_irq(void)
>  {
>        int irq;
> @@ -49,7 +64,13 @@ void __init icu_init_irq(void)
>        for (irq = 0; irq < 64; irq++) {
>                icu_mask_irq(irq);
>                set_irq_chip(irq, &icu_irq_chip);
> -               set_irq_handler(irq, handle_level_irq);
> +
> +               /* special handler for keypad */
> +               if (cpu_is_pxa168() && irq == IRQ_PXA168_KEYPAD)
> +                       set_irq_handler(irq, handle_pxa168_keypad_irq);
> +               else
> +                       set_irq_handler(irq, handle_level_irq);
> +
>                set_irq_flags(irq, IRQF_VALID);
>        }
>  }
> --
> 1.7.0.4
>
> --
> 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/
>
--
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