<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/sparc/lib, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-10-09T12:11:03Z</updated>
<entry>
<title>sparc64: fix pci_iounmap() when CONFIG_PCI is not set</title>
<updated>2021-10-09T12:11:03Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-09-20T17:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce53b91e974d7b87fe8a457c2431d050466de87e'/>
<id>urn:sha1:ce53b91e974d7b87fe8a457c2431d050466de87e</id>
<content type='text'>
[ Upstream commit d8b1e10a2b8efaf71d151aa756052fbf2f3b6d57 ]

Guenter reported [1] that the pci_iounmap() changes remain problematic,
with sparc64 allnoconfig and tinyconfig still not building due to the
header file changes and confusion with the arch-specific pci_iounmap()
implementation.

I'm pretty convinced that sparc should just use GENERIC_IOMAP instead of
doing its own thing, since it turns out that the sparc64 version of
pci_iounmap() is somewhat buggy (see [2]).  But in the meantime, this
just fixes the build by avoiding the trivial re-definition of the empty
case.

Link: https://lore.kernel.org/lkml/20210920134424.GA346531@roeck-us.net/ [1]
Link: https://lore.kernel.org/lkml/CAHk-=wgheheFx9myQyy5osh79BAazvmvYURAtub2gQtMvLrhqQ@mail.gmail.com/ [2]
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc32: fix a user-triggerable oops in clear_user()</title>
<updated>2021-03-04T08:39:57Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2020-07-20T01:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06604b22f06bc56c7c36681a71b2abac84574819'/>
<id>urn:sha1:06604b22f06bc56c7c36681a71b2abac84574819</id>
<content type='text'>
commit 7780918b36489f0b2f9a3749d7be00c2ceaec513 upstream.

Back in 2.1.29 the clear_user() guts (__bzero()) had been merged
with memset().  Unfortunately, while all exception handlers had been
copied, one of the exception table entries got lost.  As the result,
clear_user() starting at 128*n bytes before the end of page and
spanning between 8 and 127 bytes into the next page would oops when
the second page is unmapped.  It's trivial to reproduce - all
it takes is

main()
{
	int fd = open("/dev/zero", O_RDONLY);
	char *p = mmap(NULL, 16384, PROT_READ|PROT_WRITE,
			MAP_PRIVATE|MAP_ANON, -1, 0);
	munmap(p + 8192, 8192);
	read(fd, p + 8192 - 128, 192);
}

which had been oopsing since March 1997.  Says something about
the quality of test coverage... ;-/  And while today sparc32 port
is nearly dead, back in '97 it had been very much alive; in fact,
sparc64 had only been in mainline for 3 months by that point...

Cc: stable@kernel.org
Fixes: v2.1.29
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>atomics/treewide: Rename __atomic_add_unless() =&gt; atomic_fetch_add_unless()</title>
<updated>2018-06-21T12:22:32Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2018-06-21T12:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfc18e389c7a09fbbbed6bf4032396685b14246e'/>
<id>urn:sha1:bfc18e389c7a09fbbbed6bf4032396685b14246e</id>
<content type='text'>
While __atomic_add_unless() was originally intended as a building-block
for atomic_add_unless(), it's now used in a number of places around the
kernel. It's the only common atomic operation named __atomic*(), rather
than atomic_*(), and for consistency it would be better named
atomic_fetch_add_unless().

This lack of consistency is slightly confusing, and gets in the way of
scripting atomics. Given that, let's clean things up and promote it to
an official part of the atomics API, in the form of
atomic_fetch_add_unless().

This patch converts definitions and invocations over to the new name,
including the instrumented version, using the following script:

  ----
  git grep -w __atomic_add_unless | while read line; do
  sed -i '{s/\&lt;__atomic_add_unless\&gt;/atomic_fetch_add_unless/}' "${line%%:*}";
  done
  git grep -w __arch_atomic_add_unless | while read line; do
  sed -i '{s/\&lt;__arch_atomic_add_unless\&gt;/arch_atomic_fetch_add_unless/}' "${line%%:*}";
  done
  ----

Note that we do not have atomic{64,_long}_fetch_add_unless(), which will
be introduced by later patches.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Reviewed-by: Will Deacon &lt;will.deacon@arm.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Palmer Dabbelt &lt;palmer@sifive.com&gt;
Cc: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/lkml/20180621121321.4761-2-mark.rutland@arm.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sparc64: repair calling incorrect hweight function from stubs</title>
<updated>2017-12-28T01:29:48Z</updated>
<author>
<name>Jan Engelhardt</name>
</author>
<published>2017-12-25T02:43:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59585b4be9ae4dc6506551709bdcd6f5210b8a01'/>
<id>urn:sha1:59585b4be9ae4dc6506551709bdcd6f5210b8a01</id>
<content type='text'>
Commit v4.12-rc4-1-g9289ea7f952b introduced a mistake that made the
64-bit hweight stub call the 16-bit hweight function.

Fixes: 9289ea7f952b ("sparc64: Use indirect calls in hamming weight stubs")
Signed-off-by: Jan Engelhardt &lt;jengelh@inai.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sparc64: Fix boot on T4 and later.</title>
<updated>2017-11-29T20:09:29Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2017-11-29T20:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5372cd5ef12b05ae74d608f95dc53fe06558867'/>
<id>urn:sha1:e5372cd5ef12b05ae74d608f95dc53fe06558867</id>
<content type='text'>
If we don't put the NG4fls.o object into the same part of
the link as the generic sparc64 objects for fls() and __fls()
then the relocation in the branch we use for patching will
not fit.

Move NG4fls.o into lib-y to fix this problem.

Fixes: 46ad8d2d22c1 ("sparc64: Use sparc optimized fls and __fls for T4 and above")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Reported-by: Anatoly Pugachev &lt;matorola@gmail.com&gt;
Tested-by: Anatoly Pugachev &lt;matorola@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc</title>
<updated>2017-11-18T04:21:44Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-11-18T04:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1deab8ce2c91e3b16563b7a7ea150f82334262ec'/>
<id>urn:sha1:1deab8ce2c91e3b16563b7a7ea150f82334262ec</id>
<content type='text'>
Pull sparc updates from David Miller:

 1) Add missing cmpxchg64() for 32-bit sparc.

 2) Timer conversions from Allen Pais and Kees Cook.

 3) vDSO support, from Nagarathnam Muthusamy.

 4) Fix sparc64 huge page table walks based upon bug report by Al Viro,
    from Nitin Gupta.

 5) Optimized fls() for T4 and above, from Vijay Kumar.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix page table walk for PUD hugepages
  sparc64: Convert timers to user timer_setup()
  sparc64: convert mdesc_handle.refcnt from atomic_t to refcount_t
  sparc/led: Convert timers to use timer_setup()
  sparc64: Use sparc optimized fls and __fls for T4 and above
  sparc64: SPARC optimized __fls function
  sparc64: SPARC optimized fls function
  sparc64: Define SPARC default __fls function
  sparc64: Define SPARC default fls function
  vDSO for sparc
  sparc32: Add cmpxchg64().
  sbus: char: Move D7S_MINOR to include/linux/miscdevice.h
  sparc: time: Remove unneeded linux/miscdevice.h include
  sparc64: mmu_context: Add missing include files
</content>
</entry>
<entry>
<title>sparc64: Use sparc optimized fls and __fls for T4 and above</title>
<updated>2017-11-15T05:26:46Z</updated>
<author>
<name>Vijay Kumar</name>
</author>
<published>2017-10-11T18:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46ad8d2d22c17e2b577adec55ae87161666a3267'/>
<id>urn:sha1:46ad8d2d22c17e2b577adec55ae87161666a3267</id>
<content type='text'>
For T4 and above, patch fls and __fls functions
at the boot time to use lzcnt instruction.

Signed-off-by: Vijay Kumar &lt;vijay.ac.kumar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sparc64: SPARC optimized __fls function</title>
<updated>2017-11-15T05:26:46Z</updated>
<author>
<name>Vijay Kumar</name>
</author>
<published>2017-10-11T18:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b41ce5df20b698436526fcd8478094140b91706'/>
<id>urn:sha1:2b41ce5df20b698436526fcd8478094140b91706</id>
<content type='text'>
Defined SPARC optimized __fls using lzcnt opcode.

Signed-off-by: Vijay Kumar &lt;vijay.ac.kumar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sparc64: SPARC optimized fls function</title>
<updated>2017-11-15T05:26:46Z</updated>
<author>
<name>Vijay Kumar</name>
</author>
<published>2017-10-11T18:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70cbec0c53739e170ea9c418e740f007ab5bca52'/>
<id>urn:sha1:70cbec0c53739e170ea9c418e740f007ab5bca52</id>
<content type='text'>
Defined SPARC optimized fls using lzcnt opcode.

Signed-off-by: Vijay Kumar &lt;vijay.ac.kumar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sparc64: Define SPARC default __fls function</title>
<updated>2017-11-15T05:26:46Z</updated>
<author>
<name>Vijay Kumar</name>
</author>
<published>2017-10-11T18:50:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be52bbe3ea1ae2619ca64d67d56e84a9c7e358f9'/>
<id>urn:sha1:be52bbe3ea1ae2619ca64d67d56e84a9c7e358f9</id>
<content type='text'>
__fls will now require a boot time patching on T4 and above.
Redefining it under arch/sparc/lib.

Signed-off-by: Vijay Kumar &lt;vijay.ac.kumar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
