[PATCH v2 2/7] powerpc/eeh_cache: Add pr_debug() prints for insert/remove

Sam Bobroff sbobroff at linux.ibm.com
Fri Feb 15 16:11:15 AEDT 2019


On Fri, Feb 15, 2019 at 11:48:12AM +1100, Oliver O'Halloran wrote:
> The EEH address cache is used to map a physical MMIO address back to a PCI
> device. It's useful to know when it's being manipulated, but currently this
> requires recompiling with #define DEBUG set. This is pointless since we
> have dynamic_debug nowdays, so remove the #ifdef guard and add a pr_debug()
> for the remove case too.
> 
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

Reviewed-by: Sam Bobroff <sbobroff at linux.ibm.com>

> ---
>  arch/powerpc/kernel/eeh_cache.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c
> index 201943d54a6e..b2c320e0fcef 100644
> --- a/arch/powerpc/kernel/eeh_cache.c
> +++ b/arch/powerpc/kernel/eeh_cache.c
> @@ -157,10 +157,8 @@ eeh_addr_cache_insert(struct pci_dev *dev, resource_size_t alo,
>  	piar->pcidev = dev;
>  	piar->flags = flags;
>  
> -#ifdef DEBUG
>  	pr_debug("PIAR: insert range=[%pap:%pap] dev=%s\n",
>  		 &alo, &ahi, pci_name(dev));
> -#endif
>  
>  	rb_link_node(&piar->rb_node, parent, p);
>  	rb_insert_color(&piar->rb_node, &pci_io_addr_cache_root.rb_root);
> @@ -240,6 +238,8 @@ static inline void __eeh_addr_cache_rmv_dev(struct pci_dev *dev)
>  		piar = rb_entry(n, struct pci_io_addr_range, rb_node);
>  
>  		if (piar->pcidev == dev) {
> +			pr_debug("PIAR: remove range=[%pap:%pap] dev=%s\n",
> +				 &piar->addr_lo, &piar->addr_hi, pci_name(dev));
>  			rb_erase(n, &pci_io_addr_cache_root.rb_root);
>  			kfree(piar);
>  			goto restart;
> -- 
> 2.20.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190215/c01389cb/attachment-0001.sig>


More information about the Linuxppc-dev mailing list