lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140416095922.GG4754@lee--X1>
Date:	Wed, 16 Apr 2014 10:59:22 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Doug Anderson <dianders@...omium.org>, broonie@...nel.org
Cc:	Anton Vorontsov <anton@...msg.org>,
	Olof Johansson <olof@...om.net>,
	Sachin Kamat <sachin.kamat@...aro.org>,
	ajaykumar.rs@...sung.com, linux-samsung-soc@...r.kernel.org,
	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] mfd: tps65090: Stop caching registers

> Nearly all of the registers in tps65090 combine control bits and
> status bits.  Turn off caching of registers so that we can read status
> bits reliably.
> 
> NOTE: the IRQnMASK and CG_CTRLn registers are the exception and could
> be cached.  If we find that we spend a lot of time reading those we
> can turn on cache for just those registers.
> 
> Signed-off-by: Doug Anderson <dianders@...omium.org>
> ---
>  drivers/mfd/tps65090.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index c3cddb4..4cfdd07 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -149,21 +149,11 @@ static struct regmap_irq_chip tps65090_irq_chip = {
>  	.mask_invert = true,
>  };
>  
> -static bool is_volatile_reg(struct device *dev, unsigned int reg)
> -{
> -	if ((reg == TPS65090_INT_STS) || (reg == TPS65090_INT_STS2))
> -		return true;
> -	else
> -		return false;
> -}
> -

I don't know enough about Regmap internals to know what this actually
affects in real terms.

Mark,
  Does this change seem sane to you?

>  static const struct regmap_config tps65090_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  	.max_register = TOTAL_NUM_REG,
>  	.num_reg_defaults_raw = TOTAL_NUM_REG,
> -	.cache_type = REGCACHE_RBTREE,
> -	.volatile_reg = is_volatile_reg,
>  };
>  
>  #ifdef CONFIG_OF

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ