Re: [PATCH 12/14] hwmon: (xgene-hwmon) Simplify PCC shared memory region handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 03, 2025 at 05:55:57AM -0800, Guenter Roeck wrote:
> On 3/3/25 02:51, Sudeep Holla wrote:
> > The PCC driver now handles mapping and unmapping of shared memory
> > areas as part of pcc_mbox_{request,free}_channel(). Without these before,
> > this xgene hwmon driver did handling of those mappings like several
> > other PCC mailbox client drivers.
> > 
> > There were redundant operations, leading to unnecessary code. Maintaining
> > the consistency across these driver was harder due to scattered handling
> > of shmem.
> > 
> > Just use the mapped shmem and remove all redundant operations from this
> > driver.
> > 
> > Cc: Jean Delvare <jdelvare@xxxxxxxx>
> > Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> > Cc: linux-hwmon@xxxxxxxxxxxxxxx
> > Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
> 
> Acked-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> 
> Note that I'll apply a fix this week which will cause a context conflict.
> See below.
>

Sure, I was planning to repost these individually after the mailbox changes
are merged. I am not sure if I can get some testing on this xgene platform
as I am changing the mapping attributes which currently is different for
different versions of firmware and both are incorrect in terms of ACPI spec.

In short, no rush. The idea of posting these is to show how duplicate code
can be removed. I will post it independently sometime in the future.

>
> This needed to be IS_ERR_OR_NULL() since devm_memremap() returns an ERR_PTR.
>

True. IIRC, there are few valid iomem related sparse warnings which I plan
to fix and post it together once the PCC changes are merged.

Thanks for the review.

-- 
Regards,
Sudeep




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux