From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> To: Jeremy Linton <jeremy.linton@arm.com> Cc: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, will.deacon@arm.com, mark.rutland@arm.com, punit.agrawal@arm.com, steve.capper@arm.com, msalter@redhat.com, mlangsdorf@redhat.com, linux@armlinux.org.uk Subject: Re: [PATCH v12 6/7] arm64: pmu: Detect and enable multiple PMUs in an ACPI system Date: Mon, 16 Jan 2017 18:28:38 +0000 [thread overview] Message-ID: <20170116182838.GA1843@red-moon> (raw) In-Reply-To: <1484068672-15852-7-git-send-email-jeremy.linton@arm.com> On Tue, Jan 10, 2017 at 11:17:51AM -0600, Jeremy Linton wrote: [...] > +static int __init pmu_acpi_init(void) > +{ > + struct pmu_types *pmu, *safe_temp; > + bool unused_madt_entries; > + LIST_HEAD(pmus); > + > + if (acpi_disabled) > + return 0; > + > + unused_madt_entries = arm_pmu_acpi_determine_cpu_types(&pmus); IIUC (and that's an if) unused_madt_entries is a "buffer" that you add to all platform devices you manage to create through midr matching to make sure there are enough resource entries when/if a cpu of the respective type is onlined. If that's the case unused_madt_entries can't be a bool. Second question I have is what happens if cpus that aren't online have an midr that differs from all the entries parsed at init time (ie those you created a platform device for), that's certainly a pesky corner case though. Thanks, Lorenzo > + > + list_for_each_entry_safe(pmu, safe_temp, &pmus, list) { > + pmu->cpu_count += unused_madt_entries; > + pmu_acpi_register(pmu); > + > + list_del(&pmu->list); > + kfree(pmu); > + } > + > + return 0; > +} > + > +arch_initcall(pmu_acpi_init); > -- > 2.5.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v12 6/7] arm64: pmu: Detect and enable multiple PMUs in an ACPI system Date: Mon, 16 Jan 2017 18:28:38 +0000 [thread overview] Message-ID: <20170116182838.GA1843@red-moon> (raw) In-Reply-To: <1484068672-15852-7-git-send-email-jeremy.linton@arm.com> On Tue, Jan 10, 2017 at 11:17:51AM -0600, Jeremy Linton wrote: [...] > +static int __init pmu_acpi_init(void) > +{ > + struct pmu_types *pmu, *safe_temp; > + bool unused_madt_entries; > + LIST_HEAD(pmus); > + > + if (acpi_disabled) > + return 0; > + > + unused_madt_entries = arm_pmu_acpi_determine_cpu_types(&pmus); IIUC (and that's an if) unused_madt_entries is a "buffer" that you add to all platform devices you manage to create through midr matching to make sure there are enough resource entries when/if a cpu of the respective type is onlined. If that's the case unused_madt_entries can't be a bool. Second question I have is what happens if cpus that aren't online have an midr that differs from all the entries parsed at init time (ie those you created a platform device for), that's certainly a pesky corner case though. Thanks, Lorenzo > + > + list_for_each_entry_safe(pmu, safe_temp, &pmus, list) { > + pmu->cpu_count += unused_madt_entries; > + pmu_acpi_register(pmu); > + > + list_del(&pmu->list); > + kfree(pmu); > + } > + > + return 0; > +} > + > +arch_initcall(pmu_acpi_init); > -- > 2.5.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-01-16 18:26 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-01-10 17:17 [PATCH v12 0/7] Enable PMUs in ACPI systems Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 1/7] arm64: Rename the common MADT parse routine Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 2/7] arm: arm64: Add routine to determine cpuid of other cpus Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 3/7] arm64: pmu: Cache PMU interrupt numbers from MADT parse Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 4/7] arm: arm64: pmu: Assign platform PMU CPU affinity Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 5/7] arm64: pmu: Detect multiple generic PMUs and append counter Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 6/7] arm64: pmu: Detect and enable multiple PMUs in an ACPI system Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-16 18:28 ` Lorenzo Pieralisi [this message] 2017-01-16 18:28 ` Lorenzo Pieralisi 2017-01-17 19:57 ` Jeremy Linton 2017-01-17 19:57 ` Jeremy Linton 2017-01-10 17:17 ` [PATCH v12 7/7] arm: pmu: Add PMU definitions for cores not initially online Jeremy Linton 2017-01-10 17:17 ` Jeremy Linton 2017-01-14 9:00 ` [PATCH v12 0/7] Enable PMUs in ACPI systems Bamvor Zhang 2017-01-14 9:00 ` Bamvor Zhang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170116182838.GA1843@red-moon \ --to=lorenzo.pieralisi@arm.com \ --cc=jeremy.linton@arm.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux@armlinux.org.uk \ --cc=mark.rutland@arm.com \ --cc=mlangsdorf@redhat.com \ --cc=msalter@redhat.com \ --cc=punit.agrawal@arm.com \ --cc=steve.capper@arm.com \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.