No subject
Mon Dec 16 12:38:43 CET 2013
other architecture will work for ARC. So did I - copied and it worked.
I would say that in U-Boot we need to unify lots of things - for example
unified init sequences is a good movement but even there I see tons of
ifdefs for each and other corner case.
So if I want to fix every flaw of existing U-Boot that I met during
implementation of my port I would spend many months on this work while
ARC port still won't be in upstream.
That's why I decided to fix non-ARC sources that block ARC port form
being useful (more than 10 patches were accepted) and then submit ARC
part which looks as much as possible similarly to existing
architectures. This similarity will allow even automatic batch fixing of
things. Otherwise each time you'll need to figure out what happen here
and there and why there're different implementations of similar or even
same things.
Saying all this I'm not withdrawing from doing all these fixes anytime
later. As an active user and contributor I'm interested in having U-boot
sources in good shape - it benefits me in the end.
> > > Note that checkpatch throws warnings here:
> > >=20
> > > WARNING: space prohibited between function name and open parenthesis =
'('
> > >=20
> > > Please make sure to run all your patches through checkpatch and fix
> > > such errors and warnings!
> >
> > As I mentioned I took this one from ARM so I left it as it is.
> > I might just add explicit mention that my file is a copy.
> > Will it work?
>=20
> No. Everybody can make mistakes. But to knowingly copy poor code
> would be... well, no.
Understood.
> > > > +#endif /* __ASM_ARC_POSIX_TYPES_H */
> > > > diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/p=
trac> e.h
> > > > new file mode 100644
> > > > index 0000000..3b2df87
> > > > --- /dev/null
> > > > +++ b/arch/arc/include/asm/ptrace.h
> > > > @@ -0,0 +1,101 @@
> > > > +/*
> > > > + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rig=
hts > reserved.
> > > > + *
> > > > + * SPDX-License-Identifier: GPL-2.0+
> > > > + */
> > > > +
> > > > +#ifndef __ASM_ARC_PTRACE_H
> > > > +#define __ASM_ARC_PTRACE_H
> > > > +
> > > > +#ifndef __ASSEMBLY__
> > > > +
> > > > +/* THE pt_regs: Defines how regs are saved during entry into kerne=
l */
> > >=20
> > > Needed?
> > >=20
> > > > +/* return 1 if user mode or 0 if kernel mode */
> > > > +#define user_mode(regs) (regs->status32 & STATUS_U_MASK)
> > >=20
> > > Certainly not needed, right?
> > >=20
> > > etc. etc.
> >
> > This is another file taken from Linux kernel source that's why I didn't
> > touch it at all.
>=20
> Maybe we can take only the parts that are actually needed or useful?
As with "arcregs.h" I'll clean this one up heavily so it has only useful
pieces.
Regard,
Alexey
More information about the U-Boot
mailing list