[PATCH v3 0/6] Fixes for HiSilicon LPC driver and logical PIO code
From: John Garry
Date: Wed Jun 26 2019 - 12:28:49 EST
As reported in , the hisi-lpc driver has certain issues in handling
logical PIO regions, specifically unregistering regions.
This series add a method to unregister a logical PIO region, and fixes up
the driver to use them.
RCU usage in logical PIO code looks to always have been broken, so that
is fixed also. This is not a major fix as the list which RCU protects
would be rarely modified.
There is another patch to simplify logical PIO registration, made possible
by the fixes.
At this point, there are still separate ongoing discussions about how to
stop the logical PIO and PCI host bridge code leaking ranges, as in .
Hopefully this series can go through the arm soc tree and the maintainers
have no issue with that. I'm talking specifically about the logical PIO
code, which went through PCI tree on only previous upstreaming.
Since we so late in the cycle, it may be best to target v5.3, and I can
backport the fixes to stable myself.
Change since v2:
- Add hisi_lpc_acpi_remove() stub to fix build for !CONFIG_ACPI
Changes since v1:
- Add more reasoning in RCU fix patch
- Create separate patch to change LOGIC_PIO_CPU_MMIO registration to
John Garry (6):
lib: logic_pio: Fix RCU usage
lib: logic_pio: Avoid possible overlap for unregistering regions
lib: logic_pio: Add logic_pio_unregister_range()
bus: hisi_lpc: Unregister logical PIO range to avoid potential
bus: hisi_lpc: Add .remove method to avoid driver unbind crash
lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at
drivers/bus/hisi_lpc.c | 47 ++++++++++++++++++---
include/linux/logic_pio.h | 1 +
lib/logic_pio.c | 86 +++++++++++++++++++++++++++------------
3 files changed, 103 insertions(+), 31 deletions(-)