Re: [PATCH 5/6] MN10300: Add the MN10300/AM33 architecture to the kernel [try #5]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Cox <[email protected]> wrote:

> Ok so these are not addresses but magic registers in the processor ? Then
> I guess volatile makes complete sense.

They are such magic registers, though of various grades.

Some are part of the CPU core and affect things like CPU core itself, CPU
caches, MMU/TLB and exceptions/interrupts.  Others are on-silicon devices such
as the serial ports, the bus controller, the SDRAM controller.

> For PIO (virtual DMA or otherwise) the locking does that. Because
> spin_unlock and spin_lock are compiler barriers the need to use volatile
> shouldn't normally be there. If you are doing it via asm without locks
> then I would expect atomic_t because the sematics of volatile are
> horribly vague on their own ?

Using memory barriers ought to be good enough for the ring buffer.  There
aren't actually any atomic ops available other than bit-set and bit-clear.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux