Re: [PATCH v2 2/4] LoongArch: cpu-probe: Move IOCSR probing out of cpu_probe_common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Jiaxun,

On Fri, Sep 13, 2024 at 4:59 AM Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx> wrote:
>
>
>
> 在2024年9月12日九月 下午9:55,Jiaxun Yang写道:
> [...]
> > +
> > +     if (c->options & LOONGARCH_CPU_IOCSR)
> > +             return;
> Oops, typo here, there should be a not :-(
>
> Huacai, if the series is ok for you please fix this when applying
> the patch. I only tested against NEMU so didn't catch this :-(
Since the first patch can also be improved, you can improve this one
by yourself. And from my point of view the two patches can be combined
to one.

Huacai

>
> Thanks
> - Jiaxun
>
> > +
> > +     *vendor = iocsr_read64(LOONGARCH_IOCSR_VENDOR);
> > +     *cpuname = iocsr_read64(LOONGARCH_IOCSR_CPUNAME);
> > +
> > +     if (!__cpu_full_name[cpu])
> > +             __cpu_full_name[cpu] = cpu_full_name;
> > +
> > +     config = iocsr_read32(LOONGARCH_IOCSR_FEATURES);
> > +     if (config & IOCSRF_CSRIPI)
> > +             c->options |= LOONGARCH_CPU_CSRIPI;
> > +     if (config & IOCSRF_EXTIOI)
> > +             c->options |= LOONGARCH_CPU_EXTIOI;
> > +     if (config & IOCSRF_FREQSCALE)
> > +             c->options |= LOONGARCH_CPU_SCALEFREQ;
> > +     if (config & IOCSRF_FLATMODE)
> > +             c->options |= LOONGARCH_CPU_FLATMODE;
> > +     if (config & IOCSRF_EIODECODE)
> > +             c->options |= LOONGARCH_CPU_EIODECODE;
> > +     if (config & IOCSRF_AVEC)
> > +             c->options |= LOONGARCH_CPU_AVECINT;
> > +     if (config & IOCSRF_VM)
> > +             c->options |= LOONGARCH_CPU_HYPERVISOR;
> >  }
> >
> >  #ifdef CONFIG_64BIT
> >
> > --
> > 2.46.0
>
> --
> - Jiaxun





[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux