Re: [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator

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

 



On Tue, Sep 01, 2015 at 11:56:06AM -0700, Tony Lindgren wrote:
> * Mark Brown <broonie@xxxxxxxxxx> [150901 11:40]:

> > That'd work.  The other thing I was thinking we could do is to get
> > syscon to treat any excessively large address that gets passed in that
> > looks like an absolute address appropriately.

> Hmm wouldn't that get messy for 64-bit :) How about something
> like:

Meh, it'd probably be fine - I was thinking falling back to trying to
substract the base address if the passed address was out of bounds.
It's not super elegant though, something that directly does the right
thing would be better.

> unsigned long syscon_regmap_get_offset(struct regmap *syscon,
> 					void __iomem *base)

> Not sure if that's something that some drivers would start to
> misuse with read/writel though.. Presumably not if the driver
> already is using syscon.

It should be really easy to spot abuse I'd hope.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux