public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Baochen Qiang" <baochen.qiang@oss.qualcomm.com>,
	"Nicolas Escande" <nico.escande@gmail.com>,
	<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH ath-next] wifi: ath12k: avoid dynamic alloc when parsing wmi tb
Date: Thu, 12 Mar 2026 16:26:19 +0100	[thread overview]
Message-ID: <DH0WQAE5UP5T.3ND14AH29KR8A@gmail.com> (raw)
In-Reply-To: <adcb0245-6514-42f7-a47d-f6d8b3f79dff@oss.qualcomm.com>

On Wed Mar 11, 2026 at 6:46 AM CET, Baochen Qiang wrote:
[...]
>> 
>> But if you guys don't want it that way, I can rework it. Just tell me in more
>> details what you think is the right way and I can modify it.
>
> then how about adding module init path to ath12k module and do percpu allocation there:
>
> in ath12k/core.c
>
> +void __percpu *wmi_tb;
> +
> +static int ath12k_core_module_init(void)
> +{
> +       wmi_tb  = __alloc_percpu(WMI_TAG_MAX * sizeof(void *),
> +                             __alignof__(void *));
> +       if (!wmi_tb)
> +               return -ENOMEM;
> +
> +       return 0;
> +}
> +
> +static void ath12k_core_module_exit(void)
> +{
> +       free_percpu(wmi_tb);
> +}
> +
> +module_init(ath12k_core_module_init);
> +module_exit(ath12k_core_module_exit);

That should work, I'll try something along those lines then.

>
>
>> 
>> Thanks

Thanks for the review Baochen

  reply	other threads:[~2026-03-12 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 15:20 [PATCH ath-next] wifi: ath12k: avoid dynamic alloc when parsing wmi tb Nicolas Escande
2026-03-09 20:16 ` Jeff Johnson
2026-03-10  9:56   ` Nicolas Escande
2026-03-10 14:39     ` Jeff Johnson
2026-03-10  2:05 ` Baochen Qiang
2026-03-10 10:31   ` Nicolas Escande
2026-03-11  5:46     ` Baochen Qiang
2026-03-12 15:26       ` Nicolas Escande [this message]
2026-03-12 15:30 ` Nicolas Escande

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=DH0WQAE5UP5T.3ND14AH29KR8A@gmail.com \
    --to=nico.escande@gmail.com \
    --cc=ath12k@lists.infradead.org \
    --cc=baochen.qiang@oss.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox