public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC] arm : ALIGNMENT_TRAP and MTD
@ 2006-06-23  7:35 Hyok S. Choi
  2006-06-23 19:22 ` Thomas Gleixner
  2006-06-27 13:25 ` David Woodhouse
  0 siblings, 2 replies; 6+ messages in thread
From: Hyok S. Choi @ 2006-06-23  7:35 UTC (permalink / raw)
  To: linux-mtd

Dear MTD folks,

In ARM arch, we're merging my uClinux/ARM tree into mainline.
While merging a certain CPU support codes, we found a bit doubt on the
conditional including of MTD configuration file in arch/arm/Kconfig.
The CPU core has no H/W based alignment mechanism, thus can not handle unaligned access.
However as many uClinux archs do, many of the platforms had supported MTD drivers.

Currently, _only_ ARM arch includes MTD configuration file conditionally as follows:

if ALIGNMENT_TRAP
source "drivers/mtd/Kconfig"
endif

All the other archs includes the config w/o any condition.

To support the CPU core which has no H/W alignment,
the condition should be changed to somewhat strange :

if ALIGNMENT_TRAP || CPU_HAS_NO_CP15
source "drivers/mtd/Kconfig"
endif

Currently only one platform (ARCH_EBSA110) is the out of the condition
of above if condition.

What would be the best condition? or just no condition?
I think just including w/o any condition could be clear. :-)

On Wednesday 21 June 2006 20:32, Hyok S. Choi wrote:
> On Wednesday 21 June 2006 19:42, Uwe Zeisberger wrote:
> > >   However, the mtd drivers has been used for those CPUs.
> > >   the drivers/mtd/Kconfig could be included if CPU_HAS_NO_CP15 in
> > >   arch/arm/Kconfig.
> > > 
> > >   if ALIGNMENT_TRAP || CPU_HAS_NO_CP15
> > >   source "drivers/mtd/Kconfig"
> > >   endif
> > I disbelieve this is the right fix.  Either the mtd drivers have
> > alignment problems or not.  So in the first case it's not save if you
> > have no alignment trap, be it on a processor with or without cp15.  In
> > the latter case the complete if ALIGNMENT_TRAP should be removed.
>   See below.
> 
> > >   Anyway, is this really needed to be blocked if ALIGNMENT_TRAP is not
> > >   enabled?
> > There are (or may be) some drivers, that don't pay attention to only
> > make aligned accesses.  I'd prefer if the individual drivers would be
> > marked and not all mtd drivers together.  For me the AMDSTD driver seems
> > to work.
> I agree. That's why I commented as above. In general, every other
> architectures including uClinux archs just includes mtd configuration
> w/o any condition.
> Currently the ALIGNMENT_TRAP is disabled only for ARCH_EBSA110.

-- 
Hyok
ARM Linux 2.6 MPU/noMMU Project http://opensrc.sec.samsung.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-28  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23  7:35 [RFC] arm : ALIGNMENT_TRAP and MTD Hyok S. Choi
2006-06-23 19:22 ` Thomas Gleixner
2006-06-27 13:30   ` David Woodhouse
2006-06-28  5:04     ` Hyok S. Choi
2006-06-28  9:05       ` David Woodhouse
2006-06-27 13:25 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox