[PATCH V2 3/7] arm64/perf: Update struct pmu_hw_events for BRBE

Mark Brown broonie at kernel.org
Wed Sep 14 02:35:48 PDT 2022


On Wed, Sep 14, 2022 at 09:09:10AM +0530, Anshuman Khandual wrote:

> Something like the following change moves the buffer allocation off the stack,
> although it requires updating the driver, and buffer assignment during a PMU
> interrupt. But it does seem to work (will require some more testing).

Yeah, looks like it should do the trick.

> +
> +               events->branch_records = kmalloc(sizeof(struct brbe_records), flags);
> +               WARN_ON(!events->branch_records);

No need for the WARN_ON(), if we run out of memory the memory
management code is already very loud about it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220914/01974ff1/attachment.sig>


More information about the linux-arm-kernel mailing list