[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/13] ppc/pnv: Introduce PnvChipClass::intc_print_info() met
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH 07/13] ppc/pnv: Introduce PnvChipClass::intc_print_info() method |
Date: |
Mon, 16 Dec 2019 08:54:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
>> May be we should introduce a helper such as :
>>
>> int pnv_chip_cpu_foreach(PnvChip *chip,
>> int (*doit)(PnvChip *chip, PowerPCCPU *cpu, void *opaque), void
>> *opaque)
>> {
>> int i, j;
>> int ret = 0;
>>
>> for (i = 0; i < chip->nr_cores; i++) {
>> PnvCore *pc = chip->cores[i];
>> CPUCore *cc = CPU_CORE(pc);
>>
>> for (j = 0; j < cc->nr_threads; j++) {
>> PowerPCCPU *cpu = pc->threads[j];
>> ret = doit(chip, cpu, opaque);
>> if (ret) {
>> break;
>> }
>> }
>> }
>> return ret;
>> }
>
> What I'd actually like to work towards is just having the interrupt
> controllers themselves advertize TYPE_INTERRUPT_STATS_PROVIDER and not
> needing anything specific at the machine level to locate them, just
> let the generic code in hmp_info_pic handle it.
OK. It would good to at least loop on the chips, so that the output
of the possible TYPE_INTERRUPT_STATS_PROVIDER (IC, PSIHB, PHB, NPU)
are ordered.
C.
- Re: [PATCH 03/13] ppc/pnv: Drop PnvPsiClass::chip_type, (continued)
- [PATCH 08/13] ppc/pnv: Introduce PnvChipClass::xscom_core_base() method, Greg Kurz, 2019/12/13
- [PATCH 09/13] ppc/pnv: Pass XSCOM base address and address size to pnv_dt_xscom(), Greg Kurz, 2019/12/13
- [PATCH 10/13] ppc/pnv: Pass content of the "compatible" property to pnv_dt_xscom(), Greg Kurz, 2019/12/13
- [PATCH 12/13] ppc/pnv: Introduce PnvChipClass::xscom_pcba() method, Greg Kurz, 2019/12/13
- [PATCH 13/13] ppc/pnv: Drop PnvChipClass::type, Greg Kurz, 2019/12/13