Re: [PATCH] arch/tile: new multi-core architecture for Linux

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Mundt
Date: Tuesday, May 25, 2010 - 10:02 pm

On Mon, May 24, 2010 at 11:29:18AM -0400, Chris Metcalf wrote:

It also depends what precisely your goal with arch/tile/drivers is. In
the sh case I started out with an arch/sh/pci and then migrated to an
arch/sh/drivers/ model when we started having to support various bus
operations similar to PCI. Anything common or shared on the other hand
gets pushed in to drivers/sh/ directly.

These days there is also a drivers/platform/<arch> abstraction which
you could easily use for platform-specific drivers that aren't things
like CPU/board-specific bus operations/fixups.

To give a bit of background on this..

All of these platforms provide this header for legacy reasons, and it's
not a road you want to go down. Its primary purpose was to provide
definitions for memory segments, and specifically wrappers for flipping
between them. For platforms that have 1:1 cached/uncached mappings for
lowmem in different segments, old drivers used to commonly toggle the
high bits of an address to determine whether access was cached or not.
These days any driver that has knowledge of memory segmentation is almost
certainly doing something wrong.

If you need to support this sort of thing, then you ideally want to hide
the segmentation information in your ioremap() implementation (you can
look at what arch/sh/include/asm/io.h does for its ioremap cases, and we
have a wide variety of corner cases outside of legacy segmentation).

These platforms have also traditionally had these segments bypass the MMU
completely, so while you don't take page faults for lowmem, you can't
reuse parts of the address space in untranslatable holes. Some
architectures (like sh) have dropped the segmentation entirely for
certain MMU modes which permits for things like setting up an uncached
mapping for kernel text without enabling drivers to game the system
without proper remapping.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] arch/tile: new multi-core architecture for Linux, Chris Metcalf, (Wed May 19, 10:43 pm)
Re: [PATCH] arch/tile: new multi-core architecture for Linux, Thomas Gleixner, (Tue May 25, 1:12 pm)
Re: [PATCH] arch/tile: new multi-core architecture for Linux, Paul Mundt, (Tue May 25, 10:02 pm)
Re: [PATCH] arch/tile: new multi-core architecture for Linux, Geert Uytterhoeven, (Thu May 27, 6:41 am)
[PATCH 4/8] arch/tile: core kernel/ code., Chris Metcalf, (Fri May 28, 8:10 pm)
[PATCH 5/8] arch/tile: the kernel/tile-desc_32.c file., Chris Metcalf, (Fri May 28, 8:11 pm)
[PATCH 6/8] arch/tile: the mm/ directory., Chris Metcalf, (Fri May 28, 8:13 pm)
[PATCH 7/8] arch/tile: lib/ directory., Chris Metcalf, (Fri May 28, 8:16 pm)
[PATCH 8/8] arch/tile: hypervisor console driver., Chris Metcalf, (Fri May 28, 8:17 pm)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Chris Metcalf, (Fri May 28, 8:20 pm)
[PATCH 0/8] revised patch for arch/tile/ support, Chris Metcalf, (Fri May 28, 8:20 pm)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Arnd Bergmann, (Sat May 29, 4:29 am)
Re: [PATCH 4/8] arch/tile: core kernel/ code., FUJITA Tomonori, (Sun May 30, 7:58 pm)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Arnd Bergmann, (Thu Jun 3, 1:40 pm)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Chris Metcalf, (Thu Jun 3, 2:48 pm)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Chris Metcalf, (Fri Jun 4, 2:32 pm)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Stephen Rothwell, (Sat Jun 5, 5:56 am)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Chris Metcalf, (Sat Jun 5, 6:30 am)
Re: [PATCH 0/8] revised patch for arch/tile/ support, Stephen Rothwell, (Sat Jun 5, 7:10 am)