* Re: + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree
[not found] <200804150204.m3F24GdU005600@imap1.linux-foundation.org>
@ 2008-04-15 7:21 ` Heiko Carstens
2008-04-15 10:11 ` Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2008-04-15 7:21 UTC (permalink / raw)
To: linux-kernel
Cc: alan, alan, borntraeger, peter.oberparleiter, schwidefsky,
Andrew Morton
> * NOTE: include/linux/tty_driver.h specifies that a character should be
> * ignored if there is no room in the queue. This driver implements a different
> * semantic in that it will block when there is no more room left.
> + *
> + * FIXME: putchar can currently be called from BH and other non blocking
> + * handlers so this semantic isn't a good idea.
> */
> -static void
> +static int
> sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch)
> {
> __sclp_vt220_write(&ch, 1, 0, 0, 1);
> + return 1;
Uh, oh... the comment above used to mean "block if in schedulable context or
busy wait otherwise". Figuring out which context we were in was done via
in_atomic(), which was broken on !SMP anyway, so that had to go.
So the last parameter for __sclp_vt220_write is now an indicator if scheduling
is allowed or not (1 means yes). Somebody told me that the put_char routine
will only be called from schedulable context, which now doesn't seem to be
true?!
For the console functions we pass indeed 0 to __sclp_vt220_write since printk
may be called within any context. Is that also true for the tty put_char
routine?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree
2008-04-15 7:21 ` + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree Heiko Carstens
@ 2008-04-15 10:11 ` Alan Cox
2008-04-15 10:45 ` Heiko Carstens
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2008-04-15 10:11 UTC (permalink / raw)
To: Heiko Carstens
Cc: linux-kernel, alan, borntraeger, peter.oberparleiter, schwidefsky,
Andrew Morton
> is allowed or not (1 means yes). Somebody told me that the put_char routine
> will only be called from schedulable context, which now doesn't seem to be
> true?!
It isnt true.
> For the console functions we pass indeed 0 to __sclp_vt220_write since printk
> may be called within any context. Is that also true for the tty put_char
> routine?
Yes, but failing a put_char is perfectly acceptable.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree
2008-04-15 10:11 ` Alan Cox
@ 2008-04-15 10:45 ` Heiko Carstens
2008-04-15 11:07 ` Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2008-04-15 10:45 UTC (permalink / raw)
To: Alan Cox
Cc: linux-kernel, alan, borntraeger, peter.oberparleiter, schwidefsky,
Andrew Morton
On Tue, Apr 15, 2008 at 11:11:01AM +0100, Alan Cox wrote:
> > is allowed or not (1 means yes). Somebody told me that the put_char routine
> > will only be called from schedulable context, which now doesn't seem to be
> > true?!
>
> It isnt true.
>
> > For the console functions we pass indeed 0 to __sclp_vt220_write since printk
> > may be called within any context. Is that also true for the tty put_char
> > routine?
>
> Yes, but failing a put_char is perfectly acceptable.
Ok, thanks for pointing this out! We are going to fix this as soon as your
patch is merged, so we can avoid further merge conflicts.
I assume your patch is for 2.6.26?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree
2008-04-15 10:45 ` Heiko Carstens
@ 2008-04-15 11:07 ` Alan Cox
2008-04-15 17:59 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2008-04-15 11:07 UTC (permalink / raw)
To: Heiko Carstens
Cc: Alan Cox, linux-kernel, alan, borntraeger, peter.oberparleiter,
schwidefsky, Andrew Morton
On Tue, Apr 15, 2008 at 12:45:07PM +0200, Heiko Carstens wrote:
> Ok, thanks for pointing this out! We are going to fix this as soon as your
> patch is merged, so we can avoid further merge conflicts.
> I assume your patch is for 2.6.26?
I would hope so - assuming no other bugs fall out of this.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree
2008-04-15 11:07 ` Alan Cox
@ 2008-04-15 17:59 ` Andrew Morton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2008-04-15 17:59 UTC (permalink / raw)
To: Alan Cox
Cc: Heiko Carstens, Alan Cox, linux-kernel, borntraeger,
peter.oberparleiter, schwidefsky
On Tue, 15 Apr 2008 07:07:45 -0400 Alan Cox <alan@redhat.com> wrote:
> On Tue, Apr 15, 2008 at 12:45:07PM +0200, Heiko Carstens wrote:
> > Ok, thanks for pointing this out! We are going to fix this as soon as your
> > patch is merged, so we can avoid further merge conflicts.
> > I assume your patch is for 2.6.26?
>
> I would hope so - assuming no other bugs fall out of this.
>
It might be a bit late to find out - I'll _try_ to squeeze a -mm out this
week, but I have an ill-timed trip next week and then we're into the merge
window.
So please do double-check that it's not all catastrophically buggy in some
way ;)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-15 18:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200804150204.m3F24GdU005600@imap1.linux-foundation.org>
2008-04-15 7:21 ` + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree Heiko Carstens
2008-04-15 10:11 ` Alan Cox
2008-04-15 10:45 ` Heiko Carstens
2008-04-15 11:07 ` Alan Cox
2008-04-15 17:59 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox