linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* info needed for check_bugs
@ 2010-06-07 12:52 naveen yadav
  2010-06-07 13:27 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: naveen yadav @ 2010-06-07 12:52 UTC (permalink / raw)
  To: linux-mips, kernelnewbies

Hi all ,

I am porting 2.6.30.9 to MIPS target. The target boot well, but when
it reaches to check_bugs() function.
static inline void check_bugs(void)
{
	unsigned int cpu ;
	cpu = smp_processor_id();
	cpu_data[cpu].udelay_val = loops_per_jiffy;
	check_bugs32();
#ifdef CONFIG_64BIT
	check_bugs64();
#endif
}

the debug outupt print to screen become very slow. kernel boots but it
print one char in 1 min.

When i change above function as

static inline void check_bugs(void)
{
	unsigned int cpu ;
	cpu = smp_processor_id();
	//cpu_data[cpu].udelay_val = loops_per_jiffy;
	check_bugs32();
#ifdef CONFIG_64BIT
	check_bugs64();
#endif
}

it works fine. Is there any side effect with this. ?

or how can i fix this issue.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: info needed for check_bugs
  2010-06-07 12:52 info needed for check_bugs naveen yadav
@ 2010-06-07 13:27 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2010-06-07 13:27 UTC (permalink / raw)
  To: naveen yadav; +Cc: linux-mips, kernelnewbies

On Mon, Jun 07, 2010 at 06:22:47PM +0530, naveen yadav wrote:

> I am porting 2.6.30.9 to MIPS target. The target boot well, but when
> it reaches to check_bugs() function.
> static inline void check_bugs(void)
> {
> 	unsigned int cpu ;
> 	cpu = smp_processor_id();
> 	cpu_data[cpu].udelay_val = loops_per_jiffy;
> 	check_bugs32();
> #ifdef CONFIG_64BIT
> 	check_bugs64();
> #endif
> }
> 
> the debug outupt print to screen become very slow. kernel boots but it
> print one char in 1 min.
> 
> When i change above function as
> 
> static inline void check_bugs(void)
> {
> 	unsigned int cpu ;
> 	cpu = smp_processor_id();
> 	//cpu_data[cpu].udelay_val = loops_per_jiffy;
> 	check_bugs32();
> #ifdef CONFIG_64BIT
> 	check_bugs64();
> #endif
> }
> 
> it works fine. Is there any side effect with this. ?

I suggest to check that the value of cpu_data[cpu].udelay_va and of
loops_per_jiffy make sense.  It would appear that loops_per_jiffy is zero
on your system which would cause __delay() to loop 2^32 times.  If that
is the case, checkout the timer interrupt's frequency and the BogoMIPS
calibration.

You may also want to verify that your platform actually needs mdelay(),
udelay() or ndelay().  These calls should be considered a kludge for
broken hardware and avoided if possible.

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-07 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 12:52 info needed for check_bugs naveen yadav
2010-06-07 13:27 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).