Linux MIPS Architecture development
 help / color / mirror / Atom feed
* console stuck
@ 2006-12-09  2:22 Ashlesha Shintre
  2006-12-09 16:55 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Ashlesha Shintre @ 2006-12-09  2:22 UTC (permalink / raw)
  To: Sergei Shtylyov, Atsushi Nemoto, linux-mips

Hi,

I m very much confused as to why there is an infinite loop in the
__request_resource function in the linux/kernel/resource.c file?

The serial console is getting stuck at this point.

> for (;;) {
>                 tmp = *p;
>                 if (!tmp || tmp->start > end) {
>                         new->sibling = tmp;
>                         *p = new;
>                         new->parent = root;
>                         return NULL;
>                 }
>                 p = &tmp->sibling;
>                 if (tmp->end < start){
>                         printk("tmp->end = %d\n",tmp->end);
>                         printk("tmp->start = %d\n",tmp->start);
>                         printk("*********!!!!!!!*******sibling?!!\n");
>                         continue;
>                 }
>                 return tmp;

Thanks and Regards,
Ashlesha.

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

* Re: console stuck
  2006-12-09  2:22 console stuck Ashlesha Shintre
@ 2006-12-09 16:55 ` Sergei Shtylyov
  2006-12-10  0:09   ` Ashlesha Shintre
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2006-12-09 16:55 UTC (permalink / raw)
  To: ashlesha; +Cc: Atsushi Nemoto, linux-mips

Hello.

Ashlesha Shintre wrote:
> Hi,

> I m very much confused as to why there is an infinite loop in the
> __request_resource function in the linux/kernel/resource.c file?

    It has 2 exit points (return statements).

> The serial console is getting stuck at this point.

    Then there's something very wrong with your resources...

>>for (;;) {
>>                tmp = *p;
>>                if (!tmp || tmp->start > end) {
>>                        new->sibling = tmp;
>>                        *p = new;
>>                        new->parent = root;
>>                        return NULL;
>>                }
>>                p = &tmp->sibling;
>>                if (tmp->end < start){
>>                        printk("tmp->end = %d\n",tmp->end);
>>                        printk("tmp->start = %d\n",tmp->start);
>>                        printk("*********!!!!!!!*******sibling?!!\n");
>>                        continue;
>>                }
>>                return tmp;
> 
> 
> Thanks and Regards,
> Ashlesha.

WBR, Sergei

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

* Re: console stuck
  2006-12-09 16:55 ` Sergei Shtylyov
@ 2006-12-10  0:09   ` Ashlesha Shintre
  0 siblings, 0 replies; 3+ messages in thread
From: Ashlesha Shintre @ 2006-12-10  0:09 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Atsushi Nemoto, linux-mips

Another basic query:

I m pretty sure I cant see my user space messages on the console due to
the fact that the ttyS0 device is not registered --

The board specific platform_init function that I wrote returns non-error
values and executes fine! --

Also, I figured that the ttyS0 uart regsitration is a separate process
that runs independently of the above arch_initcall --
It is spawned from the serial8250_register_ports function which is part
of the __init routines --

The "name" of the uart driver in this case is "serial" and is the struct
uart_driver serial8250_reg defined in the drivers/serial/8250.c file and
not "serial8250" which is the name of the struct device_driver
serial8250_isa_driver

-- how are these two processes -- the arch_initcall encm3_platform_init
function and the __init serial8250_register_ports function related? and
how come they use separate drivers?

Thank you,
Ashlesha.

On Sat, 2006-12-09 at 19:55 +0300, Sergei Shtylyov wrote:
> Hello.
> 
> Ashlesha Shintre wrote:
> > Hi,
> 
> > I m very much confused as to why there is an infinite loop in the
> > __request_resource function in the linux/kernel/resource.c file?
> 
>     It has 2 exit points (return statements).
> 
> > The serial console is getting stuck at this point.
> 
>     Then there's something very wrong with your resources...
> 
> >>for (;;) {
> >>                tmp = *p;
> >>                if (!tmp || tmp->start > end) {
> >>                        new->sibling = tmp;
> >>                        *p = new;
> >>                        new->parent = root;
> >>                        return NULL;
> >>                }
> >>                p = &tmp->sibling;
> >>                if (tmp->end < start){
> >>                        printk("tmp->end = %d\n",tmp->end);
> >>                        printk("tmp->start = %d\n",tmp->start);
> >>                        printk("*********!!!!!!!*******sibling?!!\n");
> >>                        continue;
> >>                }
> >>                return tmp;
> > 
> > 
> > Thanks and Regards,
> > Ashlesha.
> 
> WBR, Sergei
> 

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

end of thread, other threads:[~2006-12-09 23:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-09  2:22 console stuck Ashlesha Shintre
2006-12-09 16:55 ` Sergei Shtylyov
2006-12-10  0:09   ` Ashlesha Shintre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox