linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: dhowells@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-am33-list@redhat.com
Subject: Re: [PATCH 5/6] MN10300: Add the MN10300/AM33 architecture to the kernel [try #5]
Date: Sun, 11 Nov 2007 14:48:37 +0000	[thread overview]
Message-ID: <1658.1194792517@redhat.com> (raw)
In-Reply-To: <20071110200935.60d375de@the-village.bc.nu>

Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> memory mapped registers should be read with readw and friends and that
> should contain the volatile not the public code.

So you would say change the global h/w register variables[*] to be addresses
instead, and change all the references to be readX and writeX?  I'm wary of
doing that in case some special logic needs to be inserted in there to handle
funny buses differently.  I used to have code like that in there, though
there's none at the moment.  On the other hand, since the CPU addresses are for
the most part constants, I can probably do something clever with
__builtin_const_p() if it comes to that.

 [*] This includes auxiliary CPU control registers, though I suppose that
     doesn't make any difference.

> Similarly spin_lock/unlock are store barriers so for ring buffers should
> be sufficient unless you have cache management requirements in which case
> the dma_* APIs will handle those bits.

I don't actually need locks, but sticking smp_rmb()/smp_wmb() is probably the
right thing to do now that I know how to use them.  This code was written five
or six years ago and I haven't really thought about changing that since.

I don't see how the dma_* APIs would help.  The buffer is filled by a higher
priority interrupt routine that does 'virtual DMA'.  It's not actually done by
real DMA.  Normal interrupt disablement doesn't really disable interrupts, it
justs excludes normal priority interrupts.

The virtual DMA is done is ASM as it has to be really quick.  It's unfortunate,
but, the on-chip serial ports don't have a FIFO.

David

  parent reply	other threads:[~2007-11-11 14:48 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 15:34 [PATCH 0/6] MN10300: Add the MN10300 architecture to Linux kernel [try #5] David Howells
2007-11-09 15:34 ` [PATCH 1/6] Suppress A.OUT library support if !CONFIG_BINFMT_AOUT " David Howells
2007-11-11  2:14   ` Andrew Morton
2007-11-11 11:25   ` Adrian Bunk
2007-11-11 13:59   ` David Howells
2007-11-11 14:22     ` Adrian Bunk
2007-11-11 15:03     ` David Howells
2007-11-11 15:19       ` Adrian Bunk
2007-11-11 15:46         ` Andi Kleen
2007-11-11 16:05           ` Adrian Bunk
2007-11-11 16:31         ` David Howells
2007-11-12 15:34   ` David Howells
2007-11-12 19:53     ` Andrew Morton
2007-11-12 22:50       ` SL Baur
2007-11-12 23:14       ` David Howells
2007-11-13  3:09         ` SL Baur
2007-11-13 10:57         ` David Howells
2007-11-13 11:18           ` Andrew Morton
2007-11-13 12:46             ` Peter Zijlstra
2007-11-13 20:40               ` Matt Mackall
2007-11-13 20:46                 ` Peter Zijlstra
2007-12-03 15:15   ` David Howells
2007-12-03 16:00     ` Ralf Baechle
2007-12-03 16:17       ` Adrian Bunk
2007-11-09 15:34 ` [PATCH 2/6] MTD: Add support for the SST 39VF1601 flash chip " David Howells
2007-11-09 22:34   ` David Woodhouse
2007-11-09 15:34 ` [PATCH 3/6] USB: net2280 can't have a function called show_registers() " David Howells
2007-11-09 15:34 ` [PATCH 4/6] MN10300: Allocate serial port UART IDs for on-chip serial ports " David Howells
2007-11-09 15:35 ` [PATCH 6/6] MN10300: Add MTD flash support for the ASB2303 board " David Howells
2007-11-10  4:05   ` David Woodhouse
2007-11-11 14:01   ` David Howells
     [not found] ` <20071109153458.20803.10594.stgit@warthog.procyon.org.uk>
2007-11-10  3:53   ` [PATCH 5/6] MN10300: Add the MN10300/AM33 architecture to the kernel " Andrew Morton
2007-11-10 12:18   ` David Howells
2007-11-10 19:43     ` Andrew Morton
2007-11-10 20:02       ` Alan Cox
2007-11-12  7:44       ` Adrian Bunk
2007-11-10 20:09     ` Alan Cox
2007-11-11 14:32     ` David Howells
2007-11-11 14:48     ` David Howells [this message]
2007-11-11 15:18       ` Alan Cox
2007-11-11 16:36       ` David Howells
2007-11-11 16:42         ` Alan Cox
2007-11-12 12:19         ` David Howells
2007-11-11 15:07     ` David Howells

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=1658.1194792517@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-am33-list@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).