<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/uio_driver.h, branch v4.14.27</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.27</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.27'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-04-08T16:13:27Z</updated>
<entry>
<title>uio: Allow handling of non page-aligned memory regions</title>
<updated>2017-04-08T16:13:27Z</updated>
<author>
<name>Michal Sojka</name>
<email>sojkam1@fel.cvut.cz</email>
</author>
<published>2017-03-16T13:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=171058fb0883247b3a484a542b5dc89753c57cb5'/>
<id>urn:sha1:171058fb0883247b3a484a542b5dc89753c57cb5</id>
<content type='text'>
Since commit b65502879556 ("uio: we cannot mmap unaligned page
contents") addresses and sizes of UIO memory regions must be
page-aligned. If the address in the BAR register is not
page-aligned (which is the case of the mf264 card), the mentioned
commit forces the UIO driver to round the address down to the page
size. Then, there is no easy way for user-space to learn the offset of
the actual memory region within the page, because the offset seen in
/sys/class/uio/uio?/maps/map?/offset is calculated from the rounded
address and thus it is always zero.

Fix that problem by including the offset in struct uio_mem. UIO
drivers can set this field and userspace can read its value from
/sys/class/uio/uio?/maps/map?/offset.

The following commits update the uio_mf264 driver to set this new offs
field.

Drivers for hardware with page-aligned BARs need not to be modified
provided that they initialize struct uio_info (which contains uio_mem)
with zeros.

Signed-off-by: Michal Sojka &lt;sojkam1@fel.cvut.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>uio: support memory sizes larger than 32 bits</title>
<updated>2014-11-07T18:09:07Z</updated>
<author>
<name>Cristian Stoica</name>
<email>cristian.stoica@freescale.com</email>
</author>
<published>2014-10-09T12:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0f1147cc9512d3610d2f2a0f069690661444703'/>
<id>urn:sha1:e0f1147cc9512d3610d2f2a0f069690661444703</id>
<content type='text'>
This is a completion to 27a90700a4275c5178b883b65927affdafa5185c
The size field is also increased to allow values larger than 32 bits
on platforms that have more than 32 bit physical addresses.

Signed-off-by: Cristian Stoica &lt;cristian.stoica@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>uio: Export definition of struct uio_device</title>
<updated>2014-10-03T04:35:54Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2014-10-01T23:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f14bb039a4e8206439d3e9abd92bc76bd142f243'/>
<id>urn:sha1:f14bb039a4e8206439d3e9abd92bc76bd142f243</id>
<content type='text'>
In order to prevent a O(n) search of the filesystem to link up its uio
node with its target configuration, TCMU needs to know the minor number
that UIO assigned. Expose the definition of this struct so TCMU can
access this field.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>include: replace linux/module.h with "struct module" wherever possible</title>
<updated>2011-10-31T23:32:32Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-26T17:46:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de47725421ad5627a5c905f4e40bb844ebc06d29'/>
<id>urn:sha1:de47725421ad5627a5c905f4e40bb844ebc06d29</id>
<content type='text'>
The &lt;linux/module.h&gt; pretty much brings in the kitchen sink along
with it, so it should be avoided wherever reasonably possible in
terms of being included from other commonly used &lt;linux/something.h&gt;
files, as it results in a measureable increase on compile times.

The worst culprit was probably device.h since it is used everywhere.
This file also had an implicit dependency/usage of mutex.h which was
masked by module.h, and is also fixed here at the same time.

There are over a dozen other headers that simply declare the
struct instead of pulling in the whole file, so follow their lead
and simply make it a few more.

Most of the implicit dependencies on module.h being present by
these headers pulling it in have been now weeded out, so we can
finally make this change with hopefully minimal breakage.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>include: convert various register fcns to macros to avoid include chaining</title>
<updated>2011-10-31T23:32:32Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T13:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eb5589a8f0dab7e29021344228856339e6a1249c'/>
<id>urn:sha1:eb5589a8f0dab7e29021344228856339e6a1249c</id>
<content type='text'>
The original implementations reference THIS_MODULE in an inline.
We could include &lt;linux/export.h&gt;, but it is better to avoid chaining.

Fortunately someone else already thought of this, and made a similar
inline into a #define in &lt;linux/device.h&gt; for device_schedule_callback(),
[see commit 523ded71de0] so follow that precedent here.

Also bubble up any __must_check that were used on the prev. wrapper inline
functions up one to the real __register functions, to preserve any prev.
sanity checks that were used in those instances.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>uio: Support physical addresses &gt;32 bits on 32-bit systems</title>
<updated>2011-10-18T18:18:57Z</updated>
<author>
<name>Kai Jiang</name>
<email>Kai.Jiang@freescale.com</email>
</author>
<published>2011-10-17T18:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=27a90700a4275c5178b883b65927affdafa5185c'/>
<id>urn:sha1:27a90700a4275c5178b883b65927affdafa5185c</id>
<content type='text'>
To support &gt;32-bit physical addresses for UIO_MEM_PHYS type we need to
extend the width of 'addr' in struct uio_mem.  Numerous platforms like
embedded PPC, ARM, and X86 have support for systems with larger physical
address than logical.

Since 'addr' may contain a physical, logical, or virtual address the
easiest solution is to just change the type to 'phys_addr_t' which
should always be greater than or equal to the sizeof(void *) such that
it can properly hold any of the address types.

For physical address we can support up to a 44-bit physical address on a
typical 32-bit system as we utilize remap_pfn_range() for the mapping of
the memory region and pfn's are represnted by shifting the address by
the page size (typically 4k).

Signed-off-by: Kai Jiang &lt;Kai.Jiang@freescale.com&gt;
Signed-off-by: Minghuan Lian &lt;Minghuan.Lian@freescale.com&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Signed-off-by: Hans J. Koch &lt;hjk@hansjkoch.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>uio: Change mail address of Hans J. Koch</title>
<updated>2010-11-11T00:57:11Z</updated>
<author>
<name>Hans J. Koch</name>
<email>hjk@hansjkoch.de</email>
</author>
<published>2010-10-29T22:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=318af55ddd38bdaaa2b57f5c3bd394f3ce3a2610'/>
<id>urn:sha1:318af55ddd38bdaaa2b57f5c3bd394f3ce3a2610</id>
<content type='text'>
My old mail address doesn't exist anymore. This changes all occurrences
to my new address.

Signed-off-by: Hans J. Koch &lt;hjk@hansjkoch.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>uio: Cleanup irq handling.</title>
<updated>2010-10-22T17:16:43Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@aristanetworks.com</email>
</author>
<published>2010-09-14T18:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6427a7655afd7f07dfa83736defd1d94656c83e5'/>
<id>urn:sha1:6427a7655afd7f07dfa83736defd1d94656c83e5</id>
<content type='text'>
Change the value of UIO_IRQ_NONE -2 to 0.  0 is well defined in the rest
of the kernel as the value to indicate an irq has not been assigned.

Update the calls to request_irq and free_irq to only ignore UIO_IRQ_NONE
and UIO_IRQ_CUSTOM allowing the rest of the kernel's possible irq
numbers to be used.

Signed-off-by: Eric W. Biederman &lt;ebiederm@aristanetworks.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Hans J. Koch &lt;hjk@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>UIO: Add name attributes for mappings and port regions</title>
<updated>2009-03-24T23:38:24Z</updated>
<author>
<name>Hans J. Koch</name>
<email>hjk@linutronix.de</email>
</author>
<published>2009-01-06T23:15:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8205779114e8f612549d191f8e151526a74ab9f2'/>
<id>urn:sha1:8205779114e8f612549d191f8e151526a74ab9f2</id>
<content type='text'>
If a UIO device has several memory mappings, it can be difficult for userspace
to find the right one. The situation becomes even worse if the UIO driver can
handle different versions of a card that have different numbers of mappings.
Benedikt Spranger has such cards and pointed this out to me. Thanks, Bene!

To address this problem, this patch adds "name" sysfs attributes for each
mapping. Userspace can use these to clearly identify each mapping. The name
string is optional. If a driver doesn't set it, an empty string will be
returned, so this patch won't break existing drivers.

The same problem exists for port region information, so a "name" attribute is
added there, too.

Signed-off-by: Hans J. Koch &lt;hjk@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>uio: make uio_info's name and version const</title>
<updated>2009-01-06T18:44:44Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2008-12-12T10:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90'/>
<id>urn:sha1:b8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90</id>
<content type='text'>
These are only ever assigned constant strings and never modified.

This was noticed because Wolfram Sang needed to cast the result of
of_get_property() in order to assign it to the name field of a struct
uio_info.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Hans J. Koch &lt;hjk@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
