linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: christian pellegrin <chripell-VaTbYqLCNhc@public.gmane.org>
To: Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org"
	<greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
	"david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org"
	<david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
	"linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
	<spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	"akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org"
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	"alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org"
	<alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Subject: Re: [PATCH 3/3] max3100: adds console support for MAX3100
Date: Mon, 22 Mar 2010 08:03:00 +0100	[thread overview]
Message-ID: <cabda6421003220003h42fa6229xe5a83a37c36ae7bc@mail.gmail.com> (raw)
In-Reply-To: <20100322093157.705bf458@feng-i7>

On Mon, Mar 22, 2010 at 2:31 AM, Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>
> Hi Christian,

Hi,

>
> You'd better not call max3110_sr (which calls spi_sync) here, a console's
> putchar() func may be called in some atomic context.
>

ack, I didn't realize that. Unfortunately this makes reliable use of
MAX3100 as a console near impossible. Some SPI master driver use
workqueues (see the bit banging ones). I don't see any way to yield
CPU to them while somehow wait the output has finished (a busy loop
won't work: perhaps the thread calling the console has a higher
priority than the one doing actual SPI output so the system will
deadlock). The only way out I see is to provide a buffer large enough
for all practical purposes. Will try it in the next version of the
patch.

Thanks.

-- 
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

      reply	other threads:[~2010-03-22  7:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cabda6421003190139h344bc172h3556fca78e4b25cb@mail.gmail.com>
2010-03-19  8:38 ` [PATCH 1/3] max3100: added raise_threaded_irq Christian Pellegrin
2010-03-19  8:39 ` [PATCH 2/3] max3100: moved to threaded interrupt Christian Pellegrin
2010-03-19  8:39 ` [PATCH 3/3] max3100: adds console support for MAX3100 Christian Pellegrin
     [not found] ` <1268987934-22690-1-git-send-email-chripell@fsfe.org>
2010-03-19 17:48   ` [PATCH 1/3] max3100: added raise_threaded_irq Grant Likely
2010-03-21  7:31     ` christian pellegrin
     [not found] ` <1268987973-22719-1-git-send-email-chripell@fsfe.org>
2010-03-19 17:58   ` [PATCH 2/3] max3100: moved to threaded interrupt Grant Likely
2010-03-21  7:34     ` christian pellegrin
     [not found] ` <1268987997-22746-1-git-send-email-chripell@fsfe.org>
2010-03-19 19:31   ` [PATCH 3/3] max3100: adds console support for MAX3100 Grant Likely
2010-03-21  7:47     ` christian pellegrin
     [not found]       ` <cabda6421003210047i1d4545aasf8969bb70d48ceb9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-21 16:28         ` David Brownell
2010-03-22  1:31   ` Feng Tang
2010-03-22  7:03     ` christian pellegrin [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=cabda6421003220003h42fa6229xe5a83a37c36ae7bc@mail.gmail.com \
    --to=chripell-vatbyqlcnhc@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 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).