* MIPS: AR7/BCM63xx: fix gpio_to_irq() return value
@ 2010-05-24 8:36 Yoichi Yuasa
2010-05-24 12:44 ` Kernel unaligned access Anoop P.A.
2010-05-27 10:55 ` MIPS: AR7/BCM63xx: fix gpio_to_irq() return value Ralf Baechle
0 siblings, 2 replies; 6+ messages in thread
From: Yoichi Yuasa @ 2010-05-24 8:36 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yuasa, linux-mips
The return value of gpio_to_irq() is not a pointer.
It's integer.
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
---
arch/mips/include/asm/mach-ar7/gpio.h | 2 +-
arch/mips/include/asm/mach-bcm63xx/gpio.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/include/asm/mach-ar7/gpio.h b/arch/mips/include/asm/mach-ar7/gpio.h
index 73f9b16..abc317c 100644
--- a/arch/mips/include/asm/mach-ar7/gpio.h
+++ b/arch/mips/include/asm/mach-ar7/gpio.h
@@ -24,7 +24,7 @@
#define AR7_GPIO_MAX 32
#define NR_BUILTIN_GPIO AR7_GPIO_MAX
-#define gpio_to_irq(gpio) NULL
+#define gpio_to_irq(gpio) -1
#define gpio_get_value __gpio_get_value
#define gpio_set_value __gpio_set_value
diff --git a/arch/mips/include/asm/mach-bcm63xx/gpio.h b/arch/mips/include/asm/mach-bcm63xx/gpio.h
index 7cda8c0..1eb534d 100644
--- a/arch/mips/include/asm/mach-bcm63xx/gpio.h
+++ b/arch/mips/include/asm/mach-bcm63xx/gpio.h
@@ -3,7 +3,7 @@
#include <bcm63xx_gpio.h>
-#define gpio_to_irq(gpio) NULL
+#define gpio_to_irq(gpio) -1
#define gpio_get_value __gpio_get_value
#define gpio_set_value __gpio_set_value
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Kernel unaligned access
2010-05-24 8:36 MIPS: AR7/BCM63xx: fix gpio_to_irq() return value Yoichi Yuasa
@ 2010-05-24 12:44 ` Anoop P.A.
2010-05-25 3:15 ` Maciej W. Rozycki
2010-05-27 10:55 ` MIPS: AR7/BCM63xx: fix gpio_to_irq() return value Ralf Baechle
1 sibling, 1 reply; 6+ messages in thread
From: Anoop P.A. @ 2010-05-24 12:44 UTC (permalink / raw)
To: linux-mips; +Cc: Ralf Baechle
Hi list,
I am trying to run 32 bit RFS with a 64 bit kernel on a RM9000 based
processor board. The board is equipped with 2 GB DIMM. When ever I
initiate ftp transfer of 1 GB file I am getting following unaligned
access error
ftp> get 1gfile
local: 1gfile remote: 1gfile
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for 1gfile (1024000000 bytes).
Unhandled kernel unaligned access[#1]:
Cpu 0
$ 0 : 0000000000000000 ffffffff804c7710 0000000000000000
0000000000000000
$ 4 : 9a5d9c1483fa8a60 ffffffffdc620000 0000000000000000
ffffffff8017f1f8
$ 8 : ffffffffdc620000 9800000001fd7ce0 980000003fa3e310
980000003fa3e3b0
$12 : ffffffff9400e0e0 000000001000001e 0000000000000000
ffffffff8055c000
$16 : 980000003fe16560 9800000001fd7ce0 980000003fe07810
0000000000000000
$20 : 0000000000000070 0000000000000038 0000000000200200
0000000000100100
$24 : 0000000000000000 000000002ad6afd8
$28 : 9800000001fd4000 9800000001fd7cb0 6800000000000000
ffffffff801041c0
Hi : 0000000000000000
Lo : 025d9c1482fa8a60
epc : ffffffff8010b904 do_ade+0x1c4/0x470 Not tainted
ra : ffffffff801041c0 handle_adel_int+0x28/0x48
Status: 9400e0e2 KX SX UX KERNEL EXL
Cause : 00000010
BadVA : 9a5d9c1483fa8a60
PrId : 000034c1
Modules linked in: e1000 aoe bonding block2mtd
Process events/0 (pid: 4, threadinfo=9800000001fd4000,
task=9800000001fc0648)
Stack : 0000000000000000 980000003fe16560 0000000000000000
980000003fe07810
980000003fe16570 ffffffff801041c0 0000000000000000
ffffffff80820000
025d9c1482fa8a60 9a5d9c1483fa8a60 450805dc47954000
980000003fe07810
0000000000000070 0000000000000010 0000000000000000
980000003f9ff440
980000003fa3e310 980000003fa3e3b0 9800000001fd7fe0
000000000000e000
0000000000000000 ffffffff8055c000 980000003fe16560
0000000000000000
980000003fe07810 980000003fe16570 0000000000000070
0000000000000038
0000000000200200 0000000000100100 0000000000000000
000000002ad6afd8
9800000022ddf020 0000000000000000 9800000001fd4000
9800000001fd7e10
6800000000000000 ffffffff8017f584 ffffffff9400e0e2
0000000000000000
...
Call Trace:
[<ffffffff8010b904>] do_ade+0x1c4/0x470
[<ffffffff801041c0>] handle_adel_int+0x28/0x48
Code: 00431024 5440005f de220100 <68830000> 6c830007 24020000
08042e1d 00000000 3042001f
FTP of smaller files ( ~100MB) works without any issues.
If I limit memory size to 512MB from command line, ftp transfer of
bigger files works as expected.
Kindly help me with your pointers to debug the issue. I am running
2.6.18 kernel.
Thanks
Anoop
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Kernel unaligned access
2010-05-24 12:44 ` Kernel unaligned access Anoop P.A.
@ 2010-05-25 3:15 ` Maciej W. Rozycki
2010-05-25 4:30 ` Anoop P.A.
0 siblings, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2010-05-25 3:15 UTC (permalink / raw)
To: Anoop P.A.; +Cc: linux-mips, Ralf Baechle
On Mon, 24 May 2010, Anoop P.A. wrote:
> I am trying to run 32 bit RFS with a 64 bit kernel on a RM9000 based
> processor board. The board is equipped with 2 GB DIMM. When ever I
> initiate ftp transfer of 1 GB file I am getting following unaligned
> access error
[...]
> Kindly help me with your pointers to debug the issue. I am running
> 2.6.18 kernel.
Please try something less rotten. That version is almost four years old.
Lots of issues have been fixed since then. The current version is 2.6.34.
Maciej
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Kernel unaligned access
2010-05-25 3:15 ` Maciej W. Rozycki
@ 2010-05-25 4:30 ` Anoop P.A.
2010-05-25 4:59 ` Maciej W. Rozycki
0 siblings, 1 reply; 6+ messages in thread
From: Anoop P.A. @ 2010-05-25 4:30 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: linux-mips, Ralf Baechle
Hi Maciej,
Thanks for your reply but unfortunately we are not in a position to
upgrade the kernel. It will be great if you can give me some pointers to
debug the issue.
Thanks
Anoop
> -----Original Message-----
> From: Maciej W. Rozycki [mailto:macro@linux-mips.org]
> Sent: Tuesday, May 25, 2010 8:46 AM
> To: Anoop P.A.
> Cc: linux-mips; Ralf Baechle
> Subject: Re: Kernel unaligned access
>
> On Mon, 24 May 2010, Anoop P.A. wrote:
>
> > I am trying to run 32 bit RFS with a 64 bit kernel on a RM9000 based
> > processor board. The board is equipped with 2 GB DIMM. When ever I
> > initiate ftp transfer of 1 GB file I am getting following unaligned
> > access error
> [...]
> > Kindly help me with your pointers to debug the issue. I am running
> > 2.6.18 kernel.
>
> Please try something less rotten. That version is almost four years
old.
> Lots of issues have been fixed since then. The current version is
2.6.34.
>
> Maciej
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Kernel unaligned access
2010-05-25 4:30 ` Anoop P.A.
@ 2010-05-25 4:59 ` Maciej W. Rozycki
0 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2010-05-25 4:59 UTC (permalink / raw)
To: Anoop P.A.; +Cc: linux-mips, Ralf Baechle
On Mon, 24 May 2010, Anoop P.A. wrote:
> Thanks for your reply but unfortunately we are not in a position to
> upgrade the kernel. It will be great if you can give me some pointers to
> debug the issue.
Well, you are on your own then.
Pointers? Well, first despite the confusing message it's not an
alignment error. The Linux kernel does not try to be particularly precise
here and hardware does not always help either (the RM9000 isn't a MIPS64
architecture processor, is it?). Anyway, BadVAddr is 0x9a5d9c1483fa8a60,
which clearly indicates this is a reference to an address outside the
defined address space. I don't know off the head how many physical
address bits the RM9000 implements, but the typical number is 40 and the
extreme one is 44. Masking out the XKPHYS cache coherence mode and
(optimistically) 44 address bits we are still left with
0x025d900000000000. These bits in the address are what the CPU complains
about.
Second, the address looks remarkably similar to the value in $lo, that is
0x025d9c1482fa8a60. Go calculate the difference! That's probably an
index to an array of some sort that went out of limits.
The rest you need to figure out yourself. It might be easier if you
disable the unaligned access emulator altogether (#ifdef it out or
whatever) and let the kernel throw an error straight away. It might be
that you're getting a nested fault. That's what the decoded value of EPC
being do_ade+0x1c4/0x470 actually suggests.
Good luck!
Maciej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MIPS: AR7/BCM63xx: fix gpio_to_irq() return value
2010-05-24 8:36 MIPS: AR7/BCM63xx: fix gpio_to_irq() return value Yoichi Yuasa
2010-05-24 12:44 ` Kernel unaligned access Anoop P.A.
@ 2010-05-27 10:55 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2010-05-27 10:55 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: linux-mips
On Mon, May 24, 2010 at 05:36:24PM +0900, Yoichi Yuasa wrote:
Thanks Yoichi, applied.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-27 10:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-24 8:36 MIPS: AR7/BCM63xx: fix gpio_to_irq() return value Yoichi Yuasa
2010-05-24 12:44 ` Kernel unaligned access Anoop P.A.
2010-05-25 3:15 ` Maciej W. Rozycki
2010-05-25 4:30 ` Anoop P.A.
2010-05-25 4:59 ` Maciej W. Rozycki
2010-05-27 10:55 ` MIPS: AR7/BCM63xx: fix gpio_to_irq() return value Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.