No subject
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.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Note that checkpatch throws warnings here:
=20
WARNING: space prohibited between function name and open parenthesis =
'('
Quoted 10 lines
Quoted 7 lines
Quoted 3 lines
=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.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
arch/arc/include/asm/p=
Quoted 2 lines
(quoted diff) +1
-0+#endif /* __ASM_ARC_POSIX_TYPES_H */arch/arc/include/asm/p= renamed from arch/arc/include/asm/ptrace.h +0
-0
trac> e.h
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/arc/include/asm/ptrace.h line 2
Quoted 7 lines
new file mode 100644
index 0000000..3b2df87arch/arc/include/asm/ptrace.h new file +2
-0@@ -0,0 +1,101 @@ +/* +* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rig=
hts > reserved.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
arch/arc/include/asm/ptrace.h line 12
Quoted 10 lines
arch/arc/include/asm/ptrace.h new file +10
-0+* +* 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 */
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
=20
Needed?
=20arch/arc/include/asm/ptrace.h line 14
Quoted 2 lines
arch/arc/include/asm/ptrace.h new file +2
-0+/* 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.
Quoted 4 lines
Quoted 2 lines
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