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-next>] [day] [month] [year] [list]
Message-ID: <D728AD1FA2543948B89DE29C5BF4CD0716AF9623@bjmail1.bj.datangmobile.com>
Date:	Wed, 18 Feb 2009 13:47:42 +0800
From:	<dayu@...angmobile.cn>
To:	<olof@...om.net>
Cc:	<leoli@...escale.com>, <galak@...nel.crashing.org>,
	<linuxppc-dev@...abs.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fix the interrupt loss problem on powerpc IPIC(2.6.25-2.6.28)

renew description in  the patch,  with this change the 'temp'  is still used to make code clear.

___________________________________________

From: Da Yu <dayu@...angmobile.cn>
Date: Wed, 18 Feb 2009 19:58:20 +0800
Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC (2.6.25-2.6.28)

Description: The interrupt pending register is write 1 clear.  If there are more than one external interrupts pending at the same time, acking the first interrupt by reading pending register then OR the corresponding bit and write back to pending register will also clear other interrupt pending bits.  That will cause loss of interrupt.

Signed-off-by: Da Yu <dayu@...angmobile.cn>
---

--- a/arch/powerpc/sysdev/ipic.c	2009-02-18 09:47:04.000000000 +0800
+++ b/arch/powerpc/sysdev/ipic.c	2009-02-18 09:46:34.000000000 +0800
@@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int vi

 	spin_lock_irqsave(&ipic_lock, flags);

-	temp = ipic_read(ipic->regs, ipic_info[src].ack);
-	temp |= (1 << (31 - ipic_info[src].bit));
+	temp = 1 << (31 - ipic_info[src].bit);
 	ipic_write(ipic->regs, ipic_info[src].ack, temp);

 	/* mb() can't guarantee that ack is finished.  But it does finish
@@ -592,8 +591,7 @@ static void ipic_mask_irq_and_ack(unsign
 	temp &= ~(1 << (31 - ipic_info[src].bit));
 	ipic_write(ipic->regs, ipic_info[src].mask, temp);

-	temp = ipic_read(ipic->regs, ipic_info[src].ack);
-	temp |= (1 << (31 - ipic_info[src].bit));
+	temp = 1 << (31 - ipic_info[src].bit);
 	ipic_write(ipic->regs, ipic_info[src].ack, temp);

 	/* mb() can't guarantee that ack is finished.  But it does finish



 
 

-----邮件原件-----
发件人: Olof Johansson [mailto:olof@...om.net] 
发送时间: 2009年2月18日 10:43
收件人: 笪禹
抄送: leoli@...escale.com; galak@...nel.crashing.org; linuxppc-dev@...abs.org; linux-kernel@...r.kernel.org
主题: Re: [PATCH] fix the interrupt loss problem on powerpc IPIC(2.6.25-2.6.28)

On Wed, Feb 18, 2009 at 10:16:07AM +0800, dayu@...angmobile.cn wrote:
> From: Da Yu <dayu@...angmobile.cn>
> Date: Wed, 18 Feb 2009 19:58:20 +0800
> Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC 
> (2.6.25-2.6.28)
> 
> Signed-off-by: Da Yu <dayu@...angmobile.cn>

Still no proper explanation in the patch.

Also, with this change, is 'temp' really needed, or can you just pass in the mask by hand?


-Olof

> ---
> 
> --- a/arch/powerpc/sysdev/ipic.c	2009-02-18 09:47:04.000000000 +0800
> +++ b/arch/powerpc/sysdev/ipic.c	2009-02-18 09:46:34.000000000 +0800
> @@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int vi
> 
>  	spin_lock_irqsave(&ipic_lock, flags);
> 
> -	temp = ipic_read(ipic->regs, ipic_info[src].ack);
> -	temp |= (1 << (31 - ipic_info[src].bit));
> +	temp = 1 << (31 - ipic_info[src].bit);
>  	ipic_write(ipic->regs, ipic_info[src].ack, temp);
> 
>  	/* mb() can't guarantee that ack is finished.  But it does finish

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