<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/base/regmap/regcache-flat.c, branch v6.12.80</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>regcache: use map-&gt;alloc_flags also for allocating cache</title>
<updated>2024-08-28T12:52:29+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2024-08-28T12:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=ae0acef3822ed8908e83cd24f337891e6be64eba'/>
<id>ae0acef3822ed8908e83cd24f337891e6be64eba</id>
<content type='text'>
Commit fd4ebc07b4df ("regmap: Hold the regmap lock when allocating and
freeing the cache") introduced a locking around the allocating and
freeing a regmap cache, so adjust the memory allocation flags to the ones
given in the regmap configuration instead of the hardcoded GFP_KERNEL.

This fixes the "BUG: sleeping function called from invalid context"
introduced by the mentioned commit.

Fixes: fd4ebc07b4df ("regmap: Hold the regmap lock when allocating and freeing the cache")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Link: https://patch.msgid.link/20240828122834.3778031-1-m.szyprowski@samsung.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit fd4ebc07b4df ("regmap: Hold the regmap lock when allocating and
freeing the cache") introduced a locking around the allocating and
freeing a regmap cache, so adjust the memory allocation flags to the ones
given in the regmap configuration instead of the hardcoded GFP_KERNEL.

This fixes the "BUG: sleeping function called from invalid context"
introduced by the mentioned commit.

Fixes: fd4ebc07b4df ("regmap: Hold the regmap lock when allocating and freeing the cache")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Link: https://patch.msgid.link/20240828122834.3778031-1-m.szyprowski@samsung.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: rework -&gt;max_register handling</title>
<updated>2024-02-05T14:32:35+00:00</updated>
<author>
<name>Jan Dakinevich</name>
<email>jan.dakinevich@salutedevices.com</email>
</author>
<published>2024-01-26T20:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=0ec74ad3c157bd4bcbcc8b294777733687e8cd2a'/>
<id>0ec74ad3c157bd4bcbcc8b294777733687e8cd2a</id>
<content type='text'>
When regmap consists of single register, 'regmap' subsystem is unable to
understand whether -&gt;max_register is set or not, because in both cases it
is equal to zero. It leads to that the logic based on value of
-&gt;max_register doesn't work. For example using of REGCACHE_FLAT fails.

This patch introduces an extra parameter to regmap config, indicating
that zero value in -&gt;max_register is authentic.

Signed-off-by: Jan Dakinevich &lt;jan.dakinevich@salutedevices.com&gt;
Link: https://lore.kernel.org/r/20240126200836.1829995-1-jan.dakinevich@salutedevices.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When regmap consists of single register, 'regmap' subsystem is unable to
understand whether -&gt;max_register is set or not, because in both cases it
is equal to zero. It leads to that the logic based on value of
-&gt;max_register doesn't work. For example using of REGCACHE_FLAT fails.

This patch introduces an extra parameter to regmap config, indicating
that zero value in -&gt;max_register is authentic.

Signed-off-by: Jan Dakinevich &lt;jan.dakinevich@salutedevices.com&gt;
Link: https://lore.kernel.org/r/20240126200836.1829995-1-jan.dakinevich@salutedevices.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: add proper SPDX identifiers on files that did not have them.</title>
<updated>2019-04-25T19:22:15+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-04-25T18:06:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=37613fa5b762a73073de3c2e23baa4a1da337e71'/>
<id>37613fa5b762a73073de3c2e23baa4a1da337e71</id>
<content type='text'>
There were a few files in the regmap code that did not have SPDX
identifiers on them, so fix that up.  At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.

Also, as Mark loves // comment markers, convert all of the headers to be
the same to make things look consistent :)

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were a few files in the regmap code that did not have SPDX
identifiers on them, so fix that up.  At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.

Also, as Mark loves // comment markers, convert all of the headers to be
the same to make things look consistent :)

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regcache: flat: Un-inline index lookup from cache access</title>
<updated>2018-01-08T12:08:57+00:00</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2018-01-07T23:22:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=46318b9784fb7b8363cc67bec24796b15dbba1e9'/>
<id>46318b9784fb7b8363cc67bec24796b15dbba1e9</id>
<content type='text'>
This makes the code slightly more readable and allows for cleaner
addition of functionality in later patches.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the code slightly more readable and allows for cleaner
addition of functionality in later patches.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regcache: flat: Require max_registers to be set</title>
<updated>2016-03-29T16:51:04+00:00</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2016-03-29T06:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6e4f28780f38e27cb7ca0edeb1d7ebb4edfd1fc5'/>
<id>6e4f28780f38e27cb7ca0edeb1d7ebb4edfd1fc5</id>
<content type='text'>
If max_register is unset, regcache_flat_get_index will return 0 and only
memory for 1 unsigned int will be allocated, resulting in writing out
of bounds.

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If max_register is unset, regcache_flat_get_index will return 0 and only
memory for 1 unsigned int will be allocated, resulting in writing out
of bounds.

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regcache: flat: Introduce register strider order</title>
<updated>2016-02-19T16:12:32+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>lixiubo@cmss.chinamobile.com</email>
</author>
<published>2016-01-04T10:00:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=ce11020f0e82dbb18eb59b6f6ce92cc0410b353e'/>
<id>ce11020f0e82dbb18eb59b6f6ce92cc0410b353e</id>
<content type='text'>
Here we introduce regcache_flat_get_index(), which using register
stride order and bit rotation, will save some memory spaces for
flat cache. Though this will also lost some access performance,
since the bit rotation is used to get the index of the cache array,
and this could be ingored for memory I/O accessing.

Signed-off-by: Xiubo Li &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Here we introduce regcache_flat_get_index(), which using register
stride order and bit rotation, will save some memory spaces for
flat cache. Though this will also lost some access performance,
since the bit rotation is used to get the index of the cache array,
and this could be ingored for memory I/O accessing.

Signed-off-by: Xiubo Li &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: replace kzalloc with kcalloc</title>
<updated>2015-11-20T12:27:57+00:00</updated>
<author>
<name>lixiubo</name>
<email>lixiubo@cmss.chinamobile.com</email>
</author>
<published>2015-11-20T10:06:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=eeda1bd69d5d8a020ce191f717b94ca99707daad'/>
<id>eeda1bd69d5d8a020ce191f717b94ca99707daad</id>
<content type='text'>
Replace kzalloc with specialized function kcalloc when the size is
a multiplication of : number * sizeof

Signed-off-by: lixiubo &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace kzalloc with specialized function kcalloc when the size is
a multiplication of : number * sizeof

Signed-off-by: lixiubo &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: cache: Sort include headers alphabetically</title>
<updated>2014-10-20T11:25:06+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>Li.Xiubo@freescale.com</email>
</author>
<published>2014-10-09T09:02:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e39be3a31b8f16d92fff096e92b593a9bffecb93'/>
<id>e39be3a31b8f16d92fff096e92b593a9bffecb93</id>
<content type='text'>
If the inlcude headers aren't sorted alphabetically, then the
logical choice is to append new ones, however that creates a
lot of potential for conflicts or duplicates because every change
will then add new includes in the same location.

Signed-off-by: Xiubo Li &lt;Li.Xiubo@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the inlcude headers aren't sorted alphabetically, then the
logical choice is to append new ones, however that creates a
lot of potential for conflicts or duplicates because every change
will then add new includes in the same location.

Signed-off-by: Xiubo Li &lt;Li.Xiubo@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regmap: flat: Add flat cache type</title>
<updated>2013-01-02T10:58:53+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-12-19T14:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=2ac902ce17f9dfa0d4d1f0818be147b5d2515fb7'/>
<id>2ac902ce17f9dfa0d4d1f0818be147b5d2515fb7</id>
<content type='text'>
While for I2C and SPI devices the overhead of using rbtree for devices with
only one block of registers is negligible the same isn't always going to
be true for MMIO devices where the I/O costs are very much lower. Cater
for these devices by adding a simple flat array type for them where the
lookups are simple array accesses, taking us right back to the original
ASoC cache implementation.

Thanks to Magnus Damm for the discussion which prompted this.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While for I2C and SPI devices the overhead of using rbtree for devices with
only one block of registers is negligible the same isn't always going to
be true for MMIO devices where the I/O costs are very much lower. Cater
for these devices by adding a simple flat array type for them where the
lookups are simple array accesses, taking us right back to the original
ASoC cache implementation.

Thanks to Magnus Damm for the discussion which prompted this.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
