On Wed, Mar 28, 2018 at 5:49 AM, Guo Ren <ren_...@c-sky.com> wrote: > Hi Arnd, > > On Tue, Mar 27, 2018 at 09:38:56AM +0200, Arnd Bergmann wrote: >> Usually the way gcc handles this, either each CPU is a strict superset >> of another >> one, so you just need to specify the one with the smallest instruction set, >> or you have an option like -mcpu=generic that produces the common subset. >> > ck807 ck810 ck860 are diffrent architecture, so they can not be strict > superset and there is no option like '-mcpu=generic' in our gcc and > binutils. > > I know you want one vmlinux which could run on all ck807 ck810 ck860 with > different dts-setting. But now, may I keep current design for abiv1&abiv2? > > In abiv3, we will take your advice seriously.
Ok, thanks for the clarification. Obviously if they are mutually incompatible, there is no point in using a common kernel, so your current version is absolutely fine, and this is similar to how we cannot have a common kernel between ARMv5, ARMv7-A and ARMv7-M, which are all incompatible at the kernel level. One more question for my understanding: Are the three types of ck8xx CPUs mutually incompatible in user space as well, or are the differences only for the kernel? For the ARM example, ARMv5 and ARMv7 fundamentally require separate kernels, but both can run user space programs built for ARMv5. Arnd