On Thu, Nov 19, 2015 at 4:08 AM, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote: > Hi Andrew, > > On 17/11/15 22:10, Andrew Pinski wrote: >> >> To Add support for -mcpu=thunderxt88pass1, I needed to fix up a few >> things in the support for -mcpu=native. First was I wanted to do the same >> cleanup that was done for some of the other .def files and move the >> #undef into the .def files instead of the .h files. >> Second to make it easier to understand the implemention_id and part >> numbers >> are really numbers, move them over to use integer to compare against >> instead of strings which allows for easier comparisons later on. >> Third fix the way we compare imp and part num; that is instead of finding >> the part number and then comparing the imp, we find both numbers first >> and then search for the ones that match. >> Add a comment to the aarch64-cores.def file in front of each group of >> cores >> to signify the groups of company's cores. >> And all of this allows for adding variant for the check of the cores >> which allows for thunderxt88pass1 to be added. >> >> The reason why thunderxt88pass1 is seperate from thunderx is because >> thunderx is changed to be an ARMv8.1 arch core while thunderxt88pass1 >> is still an ARMv8 arch core. >> >> I tested each of these patches seperately. > > > I tried these patches out on a big.LITTLE system with 2 Cortex-A57 and 4 > Cortex-A53 > cores and the code doesn't detect it properly anymore. Can you have a look > please? > The Linux /proc/cpuinfo for that system looks like what's described here: > https://lists.linaro.org/pipermail/cross-distro/2014-October/000750.html > Look for the entry "[3] arm64, v3.17 + this patch, Juno platform " > You can put that into a file, point the fopen call in driver-aarch64.c to > that file > and use that to debug the issue.
It is a simple fix, valid_bL_core_p should be checking both orders of the core as I thought it ordering the BIG as first always. Like: static bool valid_bL_core_p (unsigned int *core, unsigned int bL_core) { return AARCH64_BIG_LITTLE (core[0], core[1]) == bL_core || AARCH64_BIG_LITTLE (core[1], core[0]) == bL_core; } Thanks, Andrew > > Thanks, > Kyrill > > >> Ok for the trunk even though I missed out on stage 1? >> >> Thanks, >> Andrew >> >> Andrew Pinski (5): >> [AARCH64]: Move #undef into .def files. >> [AARCH64] Change IMP and PART over to integers from strings. >> [AARCH64] Fix part num and implement indendent. >> {AARCH64] Add comment for the company's cores. >> [AARCH64] Add variant support to -m*=native and add thunderxt88pass1. >> >> gcc/common/config/aarch64/aarch64-common.c | 5 +- >> gcc/config/aarch64/aarch64-arches.def | 1 + >> gcc/config/aarch64/aarch64-cores.def | 43 ++++-- >> gcc/config/aarch64/aarch64-fusion-pairs.def | 1 + >> gcc/config/aarch64/aarch64-option-extensions.def | 2 + >> gcc/config/aarch64/aarch64-opts.h | 4 +- >> gcc/config/aarch64/aarch64-protos.h | 4 - >> gcc/config/aarch64/aarch64-tune.md | 2 +- >> gcc/config/aarch64/aarch64-tuning-flags.def | 1 + >> gcc/config/aarch64/aarch64.c | 7 +- >> gcc/config/aarch64/aarch64.h | 3 +- >> gcc/config/aarch64/driver-aarch64.c | 169 >> +++++++++++++---------- >> 12 files changed, 136 insertions(+), 106 deletions(-) >> >