[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALHNRZ_abv1P6o7sf9qCjUpOhYCNV1Ms3vr-zAUsX-QgWePu6Q@mail.gmail.com>
Date: Mon, 21 Apr 2025 01:07:33 -0500
From: Aaron Kling <webgeek1234@...il.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH 2/2] cpufreq: tegra124: Allow building as a module
On Mon, Apr 21, 2025 at 12:58 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> On 21-04-25, 00:52, Aaron Kling wrote:
> > lsmod lists the module as "[permanent]" and if I try to rmmod the
> > module, the command throws 'device or resource busy'.
>
> Ahh, I thought kernel will give error on double insertion instead. But
> it looks like we keep some sort of refcount for the devices registered
> by the driver and don't let it unload.
This situation piqued my interest since I was unfamiliar with the
permanent flag in lsmod. And I found this stackoverflow answer [0]
that explained it. If no module_exit is defined, the module cannot be
removed.
>
> Anyway, if you want it to be a module, then it must unload as well I
> guess.
>
> You need to do the reverse of tegra_cpufreq_init() from module_exit to
> get it working I guess.
I will look into adding an exit for v2.
Sincerely,
Aaron
[0] https://stackoverflow.com/a/33464275
Powered by blists - more mailing lists