<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/head_64.S, branch linux-2.6.25.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.25.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.25.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-04-03T11:10:34Z</updated>
<entry>
<title>[POWERPC] Fix iSeries hard irq enabling regression</title>
<updated>2008-04-03T11:10:34Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2008-04-02T04:58:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff3da2e0938bae36d10d69c22bce0177b067a9e2'/>
<id>urn:sha1:ff3da2e0938bae36d10d69c22bce0177b067a9e2</id>
<content type='text'>
A subtle bug sneaked into iSeries recently.  On this platform, we must
not normally clear MSR:EE (the hardware external interrupt enable)
except for short periods of time.  Taking an interrupt while
soft-disabled doesn't cause us to clear it for example.

The iSeries kernel expects to mostly run with MSR:EE enabled at all
times except in a few exception entry/exit code paths.  Thus
local_irq_enable() doesn't check if it needs to hard-enable as it
expects this to be unnecessary on iSeries.

However, hard_irq_disable() _does_ cause MSR:EE to be cleared,
including on iSeries.  A call to it was recently added to the
context switch code, thus causing interrupts to become disabled
for a long periods of time, causing the iSeries watchdog to kick
in under some circumstances and other nasty things.

This patch fixes it by making local_irq_enable() properly re-enable
MSR:EE on iSeries.  It basically removes a return statement here
to make iSeries use the same code path as everybody else.  That does
mean that we might occasionally get spurious decrementer interrupts
but I don't think that matters.

Another option would have been to make hard_irq_disable() a nop
on iSeries but I didn't like it much, in case we have good reasons
to hard-disable.

Part of the patch is fixes to make sure the hard_enabled PACA field
is properly set on iSeries as it used not to be before, since it
was mostly unused.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Provide a way to protect 4k subpages when using 64k pages</title>
<updated>2008-01-23T23:06:01Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2008-01-23T21:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa28237cfcc5827553044cbd6ee52e33692b0faa'/>
<id>urn:sha1:fa28237cfcc5827553044cbd6ee52e33692b0faa</id>
<content type='text'>
Using 64k pages on 64-bit PowerPC systems makes life difficult for
emulators that are trying to emulate an ISA, such as x86, which use a
smaller page size, since the emulator can no longer use the MMU and
the normal system calls for controlling page protections.  Of course,
the emulator can emulate the MMU by checking and possibly remapping
the address for each memory access in software, but that is pretty
slow.

This provides a facility for such programs to control the access
permissions on individual 4k sub-pages of 64k pages.  The idea is
that the emulator supplies an array of protection masks to apply to a
specified range of virtual addresses.  These masks are applied at the
level where hardware PTEs are inserted into the hardware page table
based on the Linux PTEs, so the Linux PTEs are not affected.  Note
that this new mechanism does not allow any access that would otherwise
be prohibited; it can only prohibit accesses that would otherwise be
allowed.  This new facility is only available on 64-bit PowerPC and
only when the kernel is configured for 64k pages.

The masks are supplied using a new subpage_prot system call, which
takes a starting virtual address and length, and a pointer to an array
of protection masks in memory.  The array has a 32-bit word per 64k
page to be protected; each 32-bit word consists of 16 2-bit fields,
for which 0 allows any access (that is otherwise allowed), 1 prevents
write accesses, and 2 or 3 prevent any access.

Implicit in this is that the regions of the address space that are
protected are switched to use 4k hardware pages rather than 64k
hardware pages (on machines with hardware 64k page support).  In fact
the whole process is switched to use 4k hardware pages when the
subpage_prot system call is used, but this could be improved in future
to switch only the affected segments.

The subpage protection bits are stored in a 3 level tree akin to the
page table tree.  The top level of this tree is stored in a structure
that is appended to the top level of the page table tree, i.e., the
pgd array.  Since it will often only be 32-bit addresses (below 4GB)
that are protected, the pointers to the first four bottom level pages
are also stored in this structure (each bottom level page contains the
protection bits for 1GB of address space), so the protection bits for
addresses below 4GB can be accessed with one fewer loads than those
for higher addresses.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Fix si_addr value on low level hash failures</title>
<updated>2007-11-08T03:15:34Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2007-11-07T06:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a792e75d9b3dec3fc1dfef4a8c40674bbba44641'/>
<id>urn:sha1:a792e75d9b3dec3fc1dfef4a8c40674bbba44641</id>
<content type='text'>
If the low level MMU hash table insertion returns an error (which
can happen in some rare circumstances when the hypervisor refuses
the insertion of a PTE, typically if you try to access junk via
/dev/mem), the generated signal had an incorrect si_addr value due
to a bug in the assembly, which was loading it as a 32 bits quantity
instead of a 64 bits quantity.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Use 1TB segments</title>
<updated>2007-10-12T04:05:17Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2007-10-11T10:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1189be6508d45183013ddb82b18f4934193de274'/>
<id>urn:sha1:1189be6508d45183013ddb82b18f4934193de274</id>
<content type='text'>
This makes the kernel use 1TB segments for all kernel mappings and for
user addresses of 1TB and above, on machines which support them
(currently POWER5+, POWER6 and PA6T).

We detect that the machine supports 1TB segments by looking at the
ibm,processor-segment-sizes property in the device tree.

We don't currently use 1TB segments for user addresses &lt; 1T, since
that would effectively prevent 32-bit processes from using huge pages
unless we also had a way to revert to using 256MB segments.  That
would be possible but would involve extra complications (such as
keeping track of which segment size was used when HPTEs were inserted)
and is not addressed here.

Parts of this patch were originally written by Ben Herrenschmidt.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] FWNMI is only used on pSeries</title>
<updated>2007-09-19T05:25:34Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2007-09-18T07:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e4859ef5462193643fd2b3c8ffb298e5a4a4319'/>
<id>urn:sha1:9e4859ef5462193643fd2b3c8ffb298e5a4a4319</id>
<content type='text'>
This saves 4k on non pSeries builds (except for iSeries where it saves
almost 4k).

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Size swapper_pg_dir correctly</title>
<updated>2007-09-19T05:25:34Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2007-09-18T07:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee7a76da1ef5e3e5e0e54e84319e435ea25c267c'/>
<id>urn:sha1:ee7a76da1ef5e3e5e0e54e84319e435ea25c267c</id>
<content type='text'>
David Gibson pointed out that swapper_pg_dir actually need to be
PGD_TABLE_SIZE bytes long not PAGE_SIZE.  This actually saves 64k in
the bss for a kernel ppc64_defconfig built with CONFIG_PPC_64K_PAGES.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Remove cmd_line from head*.S</title>
<updated>2007-09-19T05:25:34Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2007-09-17T04:41:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19a8d97d89442e2bda6245b8a3de2c1fec69a7ad'/>
<id>urn:sha1:19a8d97d89442e2bda6245b8a3de2c1fec69a7ad</id>
<content type='text'>
It is just a C char array, so declare it thusly.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Move lowlevel runlatch calls under cpu feature control</title>
<updated>2007-09-13T15:33:22Z</updated>
<author>
<name>Olof Johansson</name>
</author>
<published>2007-09-05T02:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a416561bf790d55db68b2980c2a6951981018041'/>
<id>urn:sha1:a416561bf790d55db68b2980c2a6951981018041</id>
<content type='text'>
There's no need to call the runlatch on functions on processors that
don't implement them (CPU_FTR_CTRL).

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Move the iSeries exception vectors</title>
<updated>2007-08-22T06:48:35Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2007-08-22T03:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc8f571a26689102f6abe2565a84226edeaacc61'/>
<id>urn:sha1:dc8f571a26689102f6abe2565a84226edeaacc61</id>
<content type='text'>
out of head_64.S and into platforms/iseries/exception.S

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Move the exception macros into a header file</title>
<updated>2007-08-22T06:48:35Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2007-08-22T03:46:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9ff0f304833be9a6a605c84e24d630d5aef2230'/>
<id>urn:sha1:f9ff0f304833be9a6a605c84e24d630d5aef2230</id>
<content type='text'>
It makes head_64.S a bit more readable and will allow us to move the
iSeries exceptions elsewhere.

This also removes the last line of the comment:

 * The following macros define the code that appears as
 * the prologue to each of the exception handlers.  They
 * are split into two parts to allow a single kernel binary
 * to be used for pSeries and iSeries.
 * LOL.  One day... - paulus

Anything is possible. :-)

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
</feed>
