MIPS: Fixup of the r4k timer
PATCH 1/1 MIPS: Fixup of the r4k timer
From: Wu Zhangjin <[email protected]>
As reported by Maxime Bizon, the commit "MIPS: PowerTV: Fix support for timer interrupts with > 64 external IRQs" have broken the r4k timer since it didn't initialize the cp0_compare_irq_shift variable used in c0_compare_int_pending() on the architectures whose cpu_has_mips_r2 is false.
This patch fixes it via initializing the cp0_compare_irq_shift as the cp0_compare_irq used in the old c0_compare_int_pending().
--- arch/mips/kernel/traps.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/mips/kernel/traps.c +1 -0
@@ -1501,6 +1501,7 @@ void __cpuinit per_cpu_trap_init(void) cp0_perfcount_irq =-1 ; }else { cp0_compare_irq =CP0_LEGACY_COMPARE_IRQ ; + cp0_compare_irq_shift = cp0_compare_irq; cp0_perfcount_irq =-1 ; }
Signature · 1 line
1.6.6
Quoted 9 lines · Wu Zhangjin
From: Wu Zhangjin <[email protected]>
As reported by Maxime Bizon, the commit "MIPS: PowerTV: Fix support for timer interrupts with > 64 external IRQs" have broken the r4k timer since it didn't initialize the
cp0_compare_irq_shiftvariable used inc0_compare_int_pending()on the architectures whosecpu_has_mips_r2is false.
Quoted 5 lines
This patch fixes it via initializing the
cp0_compare_irq_shiftas thecp0_compare_irqused in the oldc0_compare_int_pending().Reported-by Maxime Bizon <[email protected]>Signed-off-by Wu Zhangjin <[email protected]>
When applied to 2.6.33-rc6, this patch fixes the problem on my RM7035C-based system.
Quoted 13 lines · Shane McDonald
Quoted 12 lines · Wu Zhangjin
From: Wu Zhangjin <[email protected]>
As reported by Maxime Bizon, the commit "MIPS: PowerTV: Fix support for timer interrupts with > 64 external IRQs" have broken the r4k timer since it didn't initialize the
cp0_compare_irq_shiftvariable used inc0_compare_int_pending()on the architectures whosecpu_has_mips_r2is false.This patch fixes it via initializing the
cp0_compare_irq_shiftas thecp0_compare_irqused in the oldc0_compare_int_pending().
Quoted 7 lines
Quoted 2 lines
Reported-by Maxime Bizon <[email protected]>Signed-off-by Wu Zhangjin <[email protected]>When applied to 2.6.33-rc6, this patch fixes the problem on my RM7035C-based system.
Tested-by Shane McDonald <[email protected]>
Thanks folks, applied.
Ralf
Cached Base address difference.
Hi list,
I am seeing a address conflict in asm-generic/spaces.h . in spaces.h ( 64 bit)CAC_BASE has been defined as 0x9800000000000000 however see mips run says it is 0x9000000000000000
http://books.google.co.in/books?id=kk8G2gK4Tw8C&lpg=PP1&dq=see%20mips%20
run&pg=PA51#v=onepage&q=&f=false
Is this intentional?
Thanks
Anoop
Re: Cached Base address difference.
Quoted 7 lines · Anoop P.A.
I am seeing a address conflict in
asm-generic/spaces.h. inspaces.h( 64 bit)CAC_BASE has been defined as0x9800000000000000however see mips run says it is0x9000000000000000
http://books.google.co.in/books?id=kk8G2gK4Tw8C&lpg=PP1&dq=see%20mips%20
run&pg=PA51#v=onepage&q=&f=falseIs this intentional?
<asm/mach-generic/spaces.h> defines:
#ifndef CAC_BASE
#ifdef CONFIG_DMA_NONCOHERENT
#define CAC_BASE _AC(0x9800000000000000, UL)
#else
#define CAC_BASE _AC(0xa800000000000000, UL)
#endif
#endif
No 0x9000000000000000 anywhere - and it would be wrong because it stands for uncached.
Ralf
RE: Cached Base address difference.
Hi Ralf,
I am sorry if it is not clear from my last mail.
What I want to convey is,
"See MIPS Run" explains "window on physical memory (cached)" will start @ 0x9000_0000_0000_0000.
You can see "See MIPS Run" page under suspect from this link
http://books.google.co.in/books?id=kk8G2gK4Tw8C&lpg=PP1&dq=see%20mips%20
run&pg=PA51#v=onepage&q=&f=false
How ever as you mentioned Linux source defines CAC_BASE 0x98000000_00000000
Thanks
Anoop
Quoted 10 lines
-----Original Message-----
From: Ralf Baechle [mailto:[email protected]]
Sent: Wednesday, February 03, 2010 6:04 PM
To: Anoop P.A.
Cc: [email protected]
Subject: Re: Cached Base address difference.Quoted 1 line · Anoop P.A.
I am seeing a address conflict in
asm-generic/spaces.h. in
spaces.h (
Quoted 1 line
Quoted 1 line
64 bit)CAC_BASE has been defined as
0x9800000000000000however see
mips
Quoted 2 lines
Quoted 2 lines
run says it is
0x9000000000000000
http://books.google.co.in/books?id=kk8G2gK4Tw8C&lpg=PP1&dq=see%20mips%20
Quoted 14 lines
Quoted 3 lines
run&pg=PA51#v=onepage&q=&f=false
Is this intentional?
<
asm/mach-generic/spaces.h> defines:#ifndef
CAC_BASE
#ifdefCONFIG_DMA_NONCOHERENT
#defineCAC_BASE_AC(0x9800000000000000, UL)
#else
#defineCAC_BASE_AC(0xa800000000000000, UL)
#endif
#endif
Quoted 1 line
No
0x9000000000000000anywhere - and it would be wrong because it
stands
Quoted 3 lines
for uncached.
Ralf
Re: Cached Base address difference.
Quoted 9 lines · Anoop P.A.
Hi Ralf,
I am sorry if it is not clear from my last mail.
What I want to convey is,
"See MIPS Run" explains "window on physical memory (cached)" will start @ 0x9000_0000_0000_0000.
Quoted 6 lines
You can see "See MIPS Run" page under suspect from this link
http://books.google.co.in/books?id=kk8G2gK4Tw8C&lpg=PP1&dq=see%20mips%20
run&pg=PA51#v=onepage&q=&f=falseHow ever as you mentioned Linux source defines
CAC_BASE0x98000000_00000000
The Linux header file is correct; the cached and uncached regions are swapped in the "See MIPS Run" diagram.
The full MIPS64 memory map is documented in Volume III of the architecture manual which you can download from http://www.mips.com/products/architectures/mips64/
Chris
Signature · 2 lines
Chris Dearman Desk: +1 408 530 5092 Cell: +1 408 398 5531 MIPS Technologies Inc 955 East Arques Ave, Sunnyvale CA 94085