mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk, alan@redhat.com,
	borntraeger@de.ibm.com, peter.oberparleiter@de.ibm.com,
	schwidefsky@de.ibm.com, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: + s390-tty-prepare-for-put_char-to-return-success-fail.patch added to -mm tree
Date: Tue, 15 Apr 2008 09:21:18 +0200	[thread overview]
Message-ID: <20080415072117.GA4177@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <200804150204.m3F24GdU005600@imap1.linux-foundation.org>

>   * 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?

       reply	other threads:[~2008-04-15  7:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200804150204.m3F24GdU005600@imap1.linux-foundation.org>
2008-04-15  7:21 ` Heiko Carstens [this message]
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

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=20080415072117.GA4177@osiris.boeblingen.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alan@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.oberparleiter@de.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome