All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Hellstrom <daniel@gaisler.com>
To: sparclinux@vger.kernel.org
Subject: Re: [RFC 1/8] sparc: prom: Sanitize return value from prom_nbputchar()
Date: Wed, 05 Jan 2011 08:58:11 +0000	[thread overview]
Message-ID: <4D2432A3.307@gaisler.com> (raw)
In-Reply-To: <4CF9BBC6.3080809@julian.is-a-geek.org>

Julian Calaby wrote:

>On Wed, Jan 5, 2011 at 04:50, David Miller <davem@davemloft.net> wrote:
>  
>
>>From: Daniel Hellstrom <daniel@gaisler.com>
>>Date: Tue, 04 Jan 2011 15:42:45 +0100
>>
>>    
>>
>>>David Miller wrote:
>>>
>>>      
>>>
>>>>From: Julian Calaby <jcalaby@julian.is-a-geek.org>
>>>>Date: Sat, 04 Dec 2010 14:55:50 +1100
>>>>
>>>>
>>>>        
>>>>
>>>>>Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
>>>>>
>>>>>          
>>>>>
>>>>Applied.
>>>>
>>>>        
>>>>
>>>I think this patch breaks the backwards compatability...
>>>      
>>>
>>Backwards compatability for who?  There is one and only one caller
>>of this function, and it is marked static and not exported to any
>>other piece of code in the tree.
>>    
>>
With this patch we need to have two different versions of the PROM 
emulation implementation, it is a bit sad that it will not work for both 
versions of the linux kernel 2.6.36 and 2.6.37, that's all.

I'm probably out of line here, I havn't read the PROMv0 specification, 
the old linux implementation was perhaps faulty all along and we made 
our PROM code looking at it rather than the PROMv0 spec.

My impression was that pv_nbputchar() in PROM has to be implemented as 
non-blocking in order to avoid taking the prom_lock too long, in order 
to do that in a linux 2.6.36 kernel the PROM has to return -1 from 
pv_nbputchar() when the UART is busy and a 1 when pv_nbputchar() 
actually sends a character. However with this patch the pv_nbputchar() 
must return a 0 when UART is busy, this means that backwards compability 
to the PROM emultation software is lost.

>
>The other point is that sparc64's version works like this, so why
>should sparc32's version be different?
>  
>
Good point. Havn't looked at the SPARC64 code. Probably we should have 
submitted a patch for the old bad behaviour before.

We can live with two different versions of the PROM... there are more 
important things in life :)

Thank you,
Daniel


      parent reply	other threads:[~2011-01-05  8:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-04  3:55 [RFC 1/8] sparc: prom: Sanitize return value from prom_nbputchar() Julian Calaby
2010-12-04  3:56 ` Julian Calaby
2010-12-12 22:51 ` [RFC 1/8] sparc: prom: Sanitize return value from David Miller
2011-01-04 14:42 ` [RFC 1/8] sparc: prom: Sanitize return value from prom_nbputchar() Daniel Hellstrom
2011-01-04 17:50 ` [RFC 1/8] sparc: prom: Sanitize return value from David Miller
2011-01-04 19:51 ` [RFC 1/8] sparc: prom: Sanitize return value from prom_nbputchar() Julian Calaby
2011-01-05  8:58 ` Daniel Hellstrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D2432A3.307@gaisler.com \
    --to=daniel@gaisler.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.