From: Eric Van Hensbergen <hidden> Date: 2011-05-18 21:25:11
The Linux kernel patches for the IBM BlueGene/P have been open-sourced
for quite some time, but haven't been integrated into the mainline Linux
kernel source tree. This is the first patch series of several where I
will attempt to cleanup and mainline the already public patches. I
welcome feedback as well as any help I can get. I'm drawing on
the patches available for the IBM Compute Node kernel, the ZeptoOS project
and the Kittyhawk project.
(all available from http://wiki.bg.anl-external.org)
I'll be prioritizing core patches which are harder to keep current with
mainline due to merge conflicts and then slowly incorporating the drivers
and other extensions (if acceptable after community review).
I'll be maintaining the patchset in my kernel.org repository
(/pub/scm/linux/kernel/git/ericvh/bluegene.git) under the bluegene
branch with the source repos (zepto, kittyhawk, ibmcn) available in
respective branches. Ben - if you would prefer me to send pull requests
once we get rolling, I can switch to that -- otherwise I'll stick to
just submitting patches to the list assuming you'll pull them when they
become acceptable. Thanks for your attention reviewing these patches.
Signed-off-by: Eric Van Hensbergen <redacted>
---
MAINTAINERS | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
From: Eric Van Hensbergen <hidden> Date: 2011-05-18 21:25:27
For BGP, it is convenient for 'kmalloc' to come back with 32-byte
aligned units for torus DMA
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/page_32.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Eric Van Hensbergen <hidden> Date: 2011-05-18 21:25:33
BG/P maps firmware with an early TLB
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/mmu-44x.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
From: Eric Van Hensbergen <hidden> Date: 2011-05-18 21:26:15
BG/P nodes need to be configured for writethrough to work in SMP
configurations. This patch adds the right hooks in the MMU code
to make sure L1_WRITETHROUGH configurations are setup for BG/P.
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/mmu-44x.h | 2 ++
arch/powerpc/kernel/head_44x.S | 24 ++++++++++++++++++++++--
arch/powerpc/kernel/misc_32.S | 15 +++++++++++++++
arch/powerpc/lib/copy_32.S | 10 ++++++++++
arch/powerpc/mm/44x_mmu.c | 7 +++++--
arch/powerpc/platforms/Kconfig | 5 +++++
arch/powerpc/platforms/Kconfig.cputype | 4 ++++
7 files changed, 63 insertions(+), 4 deletions(-)
16*? Are these FP regs 64 or 128 bits wide? If 128 you are doing to
have to play with TS_WIDTH to get the size of the FPs correct in the
thread_struct.
I think there's a bug here.
Does this FPU feature have a specific name like double hammer? I'd
rather have the BGP defconfig depend on PPC_FPU_DOUBLE_HUMMER, or
something like that...
+ bool "Blue Gene/P"
+ depends on 44x
+ default n
+ select PPC_FPU
+ select PPC_DOUBLE_FPU
... in fact, it seem you are doing something like these here but you
don't use PPC_DOUBLE_FPU anywhere?
Mikey
+ help
+ This option enables support for the IBM BlueGene/P supercomputer.
+
config ISS4xx
bool "ISS 4xx Simulator"
depends on (44x || 40x)
--
1.7.4.1
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
On Wed, May 18, 2011 at 04:24:52PM -0500, Eric Van Hensbergen wrote:
quoted hunk
BG/P nodes need to be configured for writethrough to work in SMP
configurations. This patch adds the right hooks in the MMU code
to make sure L1_WRITETHROUGH configurations are setup for BG/P.
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/mmu-44x.h | 2 ++
arch/powerpc/kernel/head_44x.S | 24 ++++++++++++++++++++++--
arch/powerpc/kernel/misc_32.S | 15 +++++++++++++++
arch/powerpc/lib/copy_32.S | 10 ++++++++++
arch/powerpc/mm/44x_mmu.c | 7 +++++--
arch/powerpc/platforms/Kconfig | 5 +++++
arch/powerpc/platforms/Kconfig.cputype | 4 ++++
7 files changed, 63 insertions(+), 4 deletions(-)
bool "Xilinx PCI host bridge support"
depends on PCI && XILINX_VIRTEX
+config L1_WRITETHROUGH
+ bool "Blue Gene/P enabled writethrough mode"
+ depends on BGP
+ default y
You add this config option here, named generically, but then make it
depend on BGP. It sees it should be named BGP_L1_WRITETHROUGH, and then
just selected by the BGP platform. But then....
bool
depends on 4xx || 8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON
default n if PPC_47x
+ default n if BGP
default y
config CHECK_CACHE_COHERENCY
bool
+config L1_WRITETHROUGH
+ bool
You add an identical option down here. Confused.
josh
On Wed, May 18, 2011 at 04:24:49PM -0500, Eric Van Hensbergen wrote:
The Linux kernel patches for the IBM BlueGene/P have been open-sourced
for quite some time, but haven't been integrated into the mainline Linux
kernel source tree. This is the first patch series of several where I
will attempt to cleanup and mainline the already public patches. I
welcome feedback as well as any help I can get. I'm drawing on
the patches available for the IBM Compute Node kernel, the ZeptoOS project
and the Kittyhawk project.
(all available from http://wiki.bg.anl-external.org)
I'll be prioritizing core patches which are harder to keep current with
mainline due to merge conflicts and then slowly incorporating the drivers
and other extensions (if acceptable after community review).
I'll be maintaining the patchset in my kernel.org repository
(/pub/scm/linux/kernel/git/ericvh/bluegene.git) under the bluegene
branch with the source repos (zepto, kittyhawk, ibmcn) available in
respective branches. Ben - if you would prefer me to send pull requests
once we get rolling, I can switch to that -- otherwise I'll stick to
just submitting patches to the list assuming you'll pull them when they
become acceptable. Thanks for your attention reviewing these patches.
This is going to get slightly messy if there are lots of changes in
platforms/44x and/or head_44x.S. Most 4xx changes go through my tree,
and I'm happy to pull from your tree once things get off the ground. We
just need to make sure and coordinate as we go.
My tree is fairly low-churn (as is all of 4xx) so hopefully I'm worried
for nothing.
quoted hunk
Signed-off-by: Eric Van Hensbergen <redacted>
---
MAINTAINERS | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
F: arch/powerpc/platforms/40x/
F: arch/powerpc/platforms/44x/
+LINUX FOR POWERPC BLUEGENE/P
+M: Eric Van Hensbergen [off-list ref]
+W: http://bg-linux.anl-external.org/wiki/index.php/Main_Page
+L: bg-linux@lists.anl-external.org
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/bluegene.git
+S: Maintained
+F: arch/powerpc/platforms/44x/bgp*
This should probably be the last patch in the series. You have a file
pattern listed for files that don't exist at all in any of the other
patches you submitted :).
josh
From: Eric Van Hensbergen <hidden> Date: 2011-05-19 12:35:14
On Thu, May 19, 2011 at 6:01 AM, Josh Boyer [off-list ref] wr=
ote:
On Wed, May 18, 2011 at 04:24:49PM -0500, Eric Van Hensbergen wrote:
quoted
I'll be maintaining the patchset in my kernel.org repository
(/pub/scm/linux/kernel/git/ericvh/bluegene.git) under the bluegene
branch with the source repos (zepto, kittyhawk, ibmcn) available in
respective branches. =A0Ben - if you would prefer me to send pull request=
s
quoted
once we get rolling, I can switch to that -- otherwise I'll stick to
just submitting patches to the list assuming you'll pull them when they
become acceptable. =A0Thanks for your attention reviewing these patches.
This is going to get slightly messy if there are lots of changes in
platforms/44x and/or head_44x.S. =A0Most 4xx changes go through my tree,
and I'm happy to pull from your tree once things get off the ground. =A0W=
e
just need to make sure and coordinate as we go.
I'm fine with processing the changes through your tree. Most of the items
with conflicts are in this series, so hopefully it won't be too messy (outs=
ide
of some Makefile and Kconfig changes which are much easier to merge)
after this. So, should I base changes on:
http://git.kernel.org/?p=3Dlinux/kernel/git/jwboyer/powerpc-4xx.git;a=3Dsho=
rtlog;h=3Drefs/heads/next
or:
http://git.kernel.org/?p=3Dlinux/kernel/git/benh/powerpc.git;a=3Dshortlog;h=
=3Drefs/heads/next
There are some important questions on code organization which it would
probably be a good idea to discuss at some point -- in particular what I
should do about the device drivers. Pretty much every driver except for
the ethernet is particular to this platform. IIRC some of the embedded
platforms have the SOC drivers in the platforms directory -- but it doesn't
seem like you've done this with 4xx so I was gonna just place them in
the appropriate drivers/* directory. The other question is that there are
a number of patches which involve communication which a somewhat
substantial firmware layer. You can get an idea of the existing patch's
code organization by looking at:
http://git.kernel.org/?p=3Dlinux/kernel/git/ericvh/bluegene.git;a=3Dcommit;=
h=3Dbee9f329eeef6c8eb95c35de4c5d22a0c05a1b3e
Its important to point out that I am going through and cleaning up as I
go, so not everything from that patch will make the cut as is (or perhaps
even at all) -- but that should help identify where potential conflicts are
as well as potentially out of place code.
This should probably be the last patch in the series. =A0You have a file
pattern listed for files that don't exist at all in any of the other
patches you submitted :).
Yeah, I wondered about that, its just I hate patch series intro messages wi=
th
no patch, and I figured this was a good way out of it. It also adds
the relevant
info as far as mailing lists and wiki pages where folks can go for more inf=
o --
but if folks have a problem with it I'll kill it until we get
everything else in.
-eric
=A0 =A0 =A0 default n if PPC_47x
+ =A0 =A0 =A0default n if BGP
=A0 =A0 =A0 default y
config CHECK_CACHE_COHERENCY
=A0 =A0 =A0 bool
+config L1_WRITETHROUGH
+ =A0 =A0 =A0bool
You add an identical option down here. =A0Confused.
Yeah, this was copied from the original patches and it confused me as
well, but I had never
modified Kconfig.cputype before so I wasn't sure if there were some
weird rules. I'm happy
to remove the vestigial one and make the changes you suggest to make
the naming BGP
specific.
-eric
+#define REST_FPR(n, b, base) li b, THREAD_FPR0+(16*(n)); LFPDX(n, base,=
b)
16*? =A0Are these FP regs 64 or 128 bits wide? =A0If 128 you are doing to
have to play with TS_WIDTH to get the size of the FPs correct in the
thread_struct.
I think there's a bug here.
I actually have three different versions of this code from different
source patches that I'm drawing from - so your help in figuring out
the best way to approach this is appreciated. The kittyhawk version
of the code has 8* instead of 16*. According to the docs:
"Each of the two FPU units contains 32 64-bit floating point registers
for a total of 64 FP registers per processor." which would seem to
point to the kittyhawk version - but they have a second SAVE_32SFPRS
for the second hummer. What wasn't clear to me with this version of
the code was whether or not they were doing something clever like
saving the pair of the 64-bit FPU registers in a single 128-bit slot
(seems plausible). If this is not the way to go, I can certainly
switch the kittyhawk version of the patch with the *, the extra
SAVE32SFPR and the extra double hummer specific storage space in the
thread_struct. If it would help I can post an alternate version of
the patch for discussion with the kittyhawk version.
=A0 =A0 =A0 help
=A0 =A0 =A0 =A0 This option enables support for the AMCC PPC440EP evalua=
tion board.
quoted
+config =A0 =A0 =A0 BGP
Does this FPU feature have a specific name like double hammer? =A0I'd
rather have the BGP defconfig depend on PPC_FPU_DOUBLE_HUMMER, or
something like that...
... in fact, it seem you are doing something like these here but you
don't use PPC_DOUBLE_FPU anywhere?
A fair point. I'm fine with calling it DOUBLE_HUMMER, but I wasn't sure if
that was "too internal" of a name for the kernel. Let me know and
I'll fix it up.
I'll also change the CONFIG_BGP defines in the FPU code to PPC_DOUBLE_FPU
or PPC_DOUBLE_HUMMER depending on what the community decides.
Thanks for the feedback!
-eric
On 05/19/2011 08:53 AM, Eric Van Hensbergen wrote:
quoted
quoted
quoted
quoted
+#ifdef CONFIG_BGP
+#define SAVE_FPR(n, b, base) li b, THREAD_FPR0+(16*(n)); STFPDX(n, base, b)
+#define REST_FPR(n, b, base) li b, THREAD_FPR0+(16*(n)); LFPDX(n, base, b)
16*? Are these FP regs 64 or 128 bits wide? If 128 you are doing to
have to play with TS_WIDTH to get the size of the FPs correct in the
thread_struct.
I think there's a bug here.
I actually have three different versions of this code from different
source patches that I'm drawing from - so your help in figuring out
the best way to approach this is appreciated. The kittyhawk version
of the code has 8* instead of 16*. According to the docs:
"Each of the two FPU units contains 32 64-bit floating point registers
for a total of 64 FP registers per processor." which would seem to
point to the kittyhawk version - but they have a second SAVE_32SFPRS
for the second hummer. What wasn't clear to me with this version of
the code was whether or not they were doing something clever like
saving the pair of the 64-bit FPU registers in a single 128-bit slot
(seems plausible).
Yes, it does. SIMD like instructions are added to BGP PPC.
stdpdx or lfpdx, for example, handle two FPU registers (primary and
secondary).
Thanks,
Kaz
From: Michael Neuling <hidden> Date: 2011-05-19 21:36:36
In message [off-list ref] you wrote:
On Thu, May 19, 2011 at 12:58 AM, Michael Neuling [off-list ref] wrote=
:
quoted
Eric,
quoted
This patch adds save/restore register support for the BlueGene/P
double hummer FPU.
What does this mean? =A0Needs more details here.
Hi Mikey,
any specific details you are looking for here? AFAIK these patches
are required for the kernel to save/restore the double hummer
properly.
I should have been more specific. What does double hammer mean?
I description of how double hammer differs from normal and why a change
in the fpu code is needed would be great.
+#define REST_FPR(n, b, base) li b, THREAD_FPR0+(16*(n)); LFPDX(n, base,=
b)
quoted
16*? =A0Are these FP regs 64 or 128 bits wide? =A0If 128 you are doing to
have to play with TS_WIDTH to get the size of the FPs correct in the
thread_struct.
I think there's a bug here.
I actually have three different versions of this code from different
source patches that I'm drawing from - so your help in figuring out
the best way to approach this is appreciated. The kittyhawk version
of the code has 8* instead of 16*. According to the docs:
"Each of the two FPU units contains 32 64-bit floating point registers
for a total of 64 FP registers per processor." which would seem to
point to the kittyhawk version - but they have a second SAVE_32SFPRS
for the second hummer. What wasn't clear to me with this version of
the code was whether or not they were doing something clever like
saving the pair of the 64-bit FPU registers in a single 128-bit slot
(seems plausible).
Ok, sounds like there is 32*8*2 bytes of data, rather than the normal
32*8 bytes for FP only (ignoring VSX). If this is the case, then you'll
need make 'fpr' in the thread struct bigger which you can do by setting
TS_FPRWIDTH = 2 like we do for VSX.
If there is some instruction that saves and restores two of these at a
time (which LFPDX/STFPDX might I guess), then we can use that, otherwise
we'll have to do 64 saves/restores. Double load/stores will be faster
I'm guessing though.
If two at a time, do we need to increase the index in pairs?
If this is not the way to go, I can certainly
switch the kittyhawk version of the patch with the *, the extra
SAVE32SFPR and the extra double hummer specific storage space in the
thread_struct.
I'd be tempted to keep it in the 'fpr' part of the struct so you can
then access it with ptrace/signals/core dumps.
If it would help I can post an alternate version of the patch for
discussion with the kittyhawk version.
Sure.
The most useful thing would be to see the instruction definition for
STFPDX/LFPDX.
=A0 =A0 =A0 help
=A0 =A0 =A0 =A0 This option enables support for the AMCC PPC440EP evalua=
tion board.
quoted
quoted
+config =A0 =A0 =A0 BGP
Does this FPU feature have a specific name like double hammer? =A0I'd
rather have the BGP defconfig depend on PPC_FPU_DOUBLE_HUMMER, or
something like that...
... in fact, it seem you are doing something like these here but you
don't use PPC_DOUBLE_FPU anywhere?
A fair point. I'm fine with calling it DOUBLE_HUMMER, but I wasn't sure if
that was "too internal" of a name for the kernel. Let me know and
I'll fix it up.
What I'm mostly concerned about is disassociating it with a particular
CPU.
If it has an external name, then all the better.
I'll also change the CONFIG_BGP defines in the FPU code to PPC_DOUBLE_FPU
or PPC_DOUBLE_HUMMER depending on what the community decides.
From: Eric Van Hensbergen <hidden> Date: 2011-05-19 21:41:35
This patch adds save/restore register support for the BlueGene/P
double FPU. Since there are two FPUs, we need to save and restore
twice the registers. Fortunately BG/P gives us some opcodes to
assist with that task.
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/ppc-opcode.h | 9 +++++++++
arch/powerpc/include/asm/ppc_asm.h | 32 ++++++++++++++++++++------------
arch/powerpc/kernel/fpu.S | 8 ++++----
arch/powerpc/platforms/44x/Kconfig | 9 +++++++++
arch/powerpc/platforms/Kconfig.cputype | 4 ++++
5 files changed, 46 insertions(+), 16 deletions(-)
@@ -126,4 +129,10 @@#define XXLOR(t, a, b) stringify_in_c(.long PPC_INST_XXLOR | \VSX_XX3((t),(a),(b)))+#define LFPDX(t, a, b) stringify_in_c(.long PPC_INST_LFPDX | \+__PPC_RT(t)|__PPC_RA(a)|__PPC_RB(b)))+#define STFPDX(t, a, b) stringify_in_c(.long PPC_INST_STFPDX | \+__PPC_RT(t)|__PPC_RA(a)|__PPC_RB(b)))++#endif /* _ASM_POWERPC_PPC_OPCODE_H */
From: Eric Van Hensbergen <hidden> Date: 2011-05-19 21:42:42
BG/P nodes need to be configured for writethrough to work in SMP
configurations. This patch adds the right hooks in the MMU code
to make sure BGP_L1_WRITETHROUGH configurations are setup for BG/P.
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/mmu-44x.h | 2 ++
arch/powerpc/kernel/head_44x.S | 24 ++++++++++++++++++++++--
arch/powerpc/kernel/misc_32.S | 15 +++++++++++++++
arch/powerpc/lib/copy_32.S | 10 ++++++++++
arch/powerpc/mm/44x_mmu.c | 7 +++++--
arch/powerpc/platforms/Kconfig | 5 +++++
arch/powerpc/platforms/Kconfig.cputype | 1 +
7 files changed, 60 insertions(+), 4 deletions(-)
From: Eric Van Hensbergen <hidden> Date: 2011-05-19 21:55:15
Damnit Mikey, just after I hit send on [V2].....
On Thu, May 19, 2011 at 4:36 PM, Michael Neuling [off-list ref] wrote:
In message [off-list ref] you wrote=
:
quoted
On Thu, May 19, 2011 at 12:58 AM, Michael Neuling [off-list ref] wr=
ote=3D
quoted
:
quoted
Eric,
quoted
This patch adds save/restore register support for the BlueGene/P
double hummer FPU.
What does this mean? =3DA0Needs more details here.
okay, I've changed it a bit in [V2], if you want more I can do my best.
quoted
"Each of the two FPU units contains 32 64-bit floating point registers
for a total of 64 FP registers per processor." which would seem to
point to the kittyhawk version - but they have a second SAVE_32SFPRS
for the second hummer. =A0What wasn't clear to me with this version of
the code was whether or not they were doing something clever like
saving the pair of the 64-bit FPU registers in a single 128-bit slot
(seems plausible).
Ok, sounds like there is 32*8*2 bytes of data, rather than the normal
32*8 bytes for FP only (ignoring VSX). =A0If this is the case, then you'l=
l
need make 'fpr' in the thread struct bigger which you can do by setting
TS_FPRWIDTH =3D 2 like we do for VSX.
Okay, I'll incorporate that into [V3].
If there is some instruction that saves and restores two of these at a
time (which LFPDX/STFPDX might I guess), then we can use that, otherwise
we'll have to do 64 saves/restores. =A0Double load/stores will be faster
I'm guessing though.
I assume that's true.
If two at a time, do we need to increase the index in pairs?
I don't believe so.
quoted
If this is not the way to go, I can certainly
switch the kittyhawk version of the patch with the *, the extra
SAVE32SFPR and the extra double hummer specific storage space in the
thread_struct.
I'd be tempted to keep it in the 'fpr' part of the struct so you can
then access it with ptrace/signals/core dumps.
quoted
If it would help I can post an alternate version of the patch for
discussion with the kittyhawk version.
From: Michael Neuling <hidden> Date: 2011-05-19 23:16:45
In message [off-list ref] you wrote:
Damnit Mikey, just after I hit send on [V2].....
On Thu, May 19, 2011 at 4:36 PM, Michael Neuling [off-list ref] wrote:
quoted
In message [off-list ref] you wrote=
:
quoted
quoted
On Thu, May 19, 2011 at 12:58 AM, Michael Neuling [off-list ref] wr=
ote=3D
quoted
quoted
:
quoted
Eric,
quoted
This patch adds save/restore register support for the BlueGene/P
double hummer FPU.
What does this mean? =3DA0Needs more details here.
okay, I've changed it a bit in [V2], if you want more I can do my best.
If you can describe the whole primary and secondary registers that'd be
cool. ASCII art would be awesome! :-)
quoted
quoted
"Each of the two FPU units contains 32 64-bit floating point registers
for a total of 64 FP registers per processor." which would seem to
point to the kittyhawk version - but they have a second SAVE_32SFPRS
for the second hummer. =A0What wasn't clear to me with this version of
the code was whether or not they were doing something clever like
saving the pair of the 64-bit FPU registers in a single 128-bit slot
(seems plausible).
Ok, sounds like there is 32*8*2 bytes of data, rather than the normal
32*8 bytes for FP only (ignoring VSX). =A0If this is the case, then you'l=
l
quoted
need make 'fpr' in the thread struct bigger which you can do by setting
TS_FPRWIDTH =3D 2 like we do for VSX.
Okay, I'll incorporate that into [V3].
quoted
If there is some instruction that saves and restores two of these at a
time (which LFPDX/STFPDX might I guess), then we can use that, otherwise
we'll have to do 64 saves/restores. =A0Double load/stores will be faster
I'm guessing though.
I assume that's true.
quoted
If two at a time, do we need to increase the index in pairs?
I don't believe so.
quoted
quoted
If this is not the way to go, I can certainly
switch the kittyhawk version of the patch with the *, the extra
SAVE32SFPR and the extra double hummer specific storage space in the
thread_struct.
I'd be tempted to keep it in the 'fpr' part of the struct so you can
then access it with ptrace/signals/core dumps.
quoted
If it would help I can post an alternate version of the patch for
discussion with the kittyhawk version.
REST uses r5 as the base in both cases (primary and secondary) which is
good. SAVE uses r4 in the primary case and r3 in the secondary, which
is the wrong base.
quoted
The most useful thing would be to see the instruction definition for
STFPDX/LFPDX.
stfpdx does Primary->DW[EA] Secondary->DW[EA+8]
I'm tempted to continue to use this and store the data in 'fpr' in the
thread_struct. Doing it this way the primary register will continue to
be in the same location as before, which will mean ptrace etc will
continue to work at least for the primary. The secondary will be
accessible using ptrace etc as well, but it'll be a bit of kludge
because it'll appear in the VSX location.
Putting the secondary register in a new area in the thread struct will
mean it's totally inaccessible for debugging without extra code in
ptrace.c/signals.c etc
We are going to need 16x spacing but you are doing to have to increase
the size using TS_FPRWIDTH = 2.
From: Eric Van Hensbergen <hidden> Date: 2011-05-20 00:30:22
On Thu, May 19, 2011 at 6:16 PM, Michael Neuling [off-list ref] wrote:
In message [off-list ref] you wro=
te:
quoted
On Thu, May 19, 2011 at 4:36 PM, Michael Neuling [off-list ref] wro=
te:
quoted
quoted
In message [off-list ref] you wr=
ote=3D
quoted
:
quoted
quoted
On Thu, May 19, 2011 at 12:58 AM, Michael Neuling [off-list ref]=
wr=3D
quoted
ote=3D3D
quoted
quoted
:
quoted
Eric,
quoted
This patch adds save/restore register support for the BlueGene/P
double hummer FPU.
What does this mean? =3D3DA0Needs more details here.
okay, I've changed it a bit in [V2], if you want more I can do my best.
If you can describe the whole primary and secondary registers that'd be
cool. =A0ASCII art would be awesome! :-)
You sure you don't just want a bitfield.conf? :) I'll do my best, but my
ASCII art isn't what it used to be. I'll also include a reference to the P=
DF.
quoted
quoted
Ok, sounds like there is 32*8*2 bytes of data, rather than the normal
32*8 bytes for FP only (ignoring VSX). =3DA0If this is the case, then =
you'l=3D
quoted
l
quoted
need make 'fpr' in the thread struct bigger which you can do by settin=
g
quoted
quoted
TS_FPRWIDTH =3D3D 2 like we do for VSX.
Okay - so basically what I have now and TS_FPRWIDTH=3D2 ?
quoted
Since it isn't available on other chips, shoudl it just be PPC_BGP_FPU
or PPC_BGP_DOUBLE_FPU?
I'd probably still prefer it disassociated with the CPU name, but we are
really bike shedding here. =A0I'm not too fussed.
I'll leave it separate and switch it to PPC_FP2 (or would you prefer
PPC_FP2_FPU to make it clear) since the public PDF refers to it this way.
If that all sounds good, I'll spin [V3] tomorrow.
-eric
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 00:39:15
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
BG/P maps firmware with an early TLB
That's a bit gross. How often do you call that firmware in practice ?
Aren't you better off instead inserting a TLB entry for it when you call
it instead ? A simple tlbsx. + tlbwe sequence would do. That would free
up a TLB entry for normal use.
Cheers,
Ben.
quoted hunk
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/mmu-44x.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
From: Michael Neuling <hidden> Date: 2011-05-20 00:43:42
quoted
quoted
quoted
quoted
quoted
Eric,
quoted
This patch adds save/restore register support for the BlueGene/P
double hummer FPU.
What does this mean? =3DA0Needs more details here.
okay, I've changed it a bit in [V2], if you want more I can do my best.
If you can describe the whole primary and secondary registers that'd be
cool. =A0ASCII art would be awesome! :-)
You sure you don't just want a bitfield.conf? :)
hehe, maybe an interpretive dance video posted on youtube?
I'll do my best, but my ASCII art isn't what it used to be. I'll also
include a reference to the PDF.
Something self contained in the comments would be great as external
links tend to disappear.
quoted
quoted
quoted
Ok, sounds like there is 32*8*2 bytes of data, rather than the normal
32*8 bytes for FP only (ignoring VSX). If this is the case, then you'll
need make 'fpr' in the thread struct bigger which you can do by setting
TS_FPRWIDTH = 2 like we do for VSX.
Okay - so basically what I have now and TS_FPRWIDTH=2 ?
Yes.
quoted
quoted
Since it isn't available on other chips, shoudl it just be PPC_BGP_FPU
or PPC_BGP_DOUBLE_FPU?
I'd probably still prefer it disassociated with the CPU name, but we are
really bike shedding here. =A0I'm not too fussed.
I'll leave it separate and switch it to PPC_FP2 (or would you prefer
PPC_FP2_FPU to make it clear) since the public PDF refers to it this
way.
Is DMA cache coherent on BG/P ? That's odd for a 4xx base :-)
My understanding of things (which could be totally wrong) is that the
DMA we care about on BG/P (namely the Torus and Collective networks)
is coherent at the L2. Of course the change in question is talking
about L1_CACHE_BYTES, so my reading of this is that its a sleazy way
of getting aligned mallocs that make interactions with the tightly
coupled networks easier/more-efficient. I'm open to alternative
suggestions.
-eric
16*? Are these FP regs 64 or 128 bits wide? If 128 you are doing to
have to play with TS_WIDTH to get the size of the FPs correct in the
thread_struct.
I think there's a bug here.
Regardless of that, btw, I don't think it's very sane to change those
macros that way. I'd rather have a separate set to save/restore the BG
stuff and separate code alltogether for loading/saving/flushing/etc...
like FSP SPE. The FPU save/restore code is already too complex as it is.
Also, should we aim to have this co-exist with other 4xx platforms in a
multiplatform kernel ? In that case it should not break the normal FP
case. Feel free to use CPU feature bits, there are 2 or 3 left available
in the 32-bit space, maybe pick a "combo" one for BGP (or one for hummer
and a MMU bit for the odd SMP tricks).
Hrm... thinking of which, what about doing it using the alternate
feature section ? This allows two "alternate" piece of codes to overlay,
the kernel will replace the original one with the alternative one if the
feature bits match. That way you can just stick an alternate around
SAVE/REST_32FPRS that replace them with your new SAVE/REST_32HFPRS (or
whatever you want to call you new set of macros).
Of course you'll probably need a separate area in the thread
struct/pt_regs etc... which mean a userspace ABI change, a change of the
sig context etc etc ....
Cheers,
Ben.
Put these in arch/powerpc/include/asm/ppc-opcode.h and reformat to fit
whats there already.
Also, don't need to put these defines inside a #ifdef.
Sure, I'll fix that up.
quoted
quoted
+#ifdef CONFIG_BGP
+#define SAVE_FPR(n, b, base) li b, THREAD_FPR0+(16*(n)); STFPDX(n, base, b)
+#define REST_FPR(n, b, base) li b, THREAD_FPR0+(16*(n)); LFPDX(n, base, b)
16*? Are these FP regs 64 or 128 bits wide? If 128 you are doing to
have to play with TS_WIDTH to get the size of the FPs correct in the
thread_struct.
I think there's a bug here.
I actually have three different versions of this code from different
source patches that I'm drawing from - so your help in figuring out
the best way to approach this is appreciated. The kittyhawk version
of the code has 8* instead of 16*. According to the docs:
"Each of the two FPU units contains 32 64-bit floating point registers
for a total of 64 FP registers per processor." which would seem to
point to the kittyhawk version - but they have a second SAVE_32SFPRS
for the second hummer. What wasn't clear to me with this version of
the code was whether or not they were doing something clever like
saving the pair of the 64-bit FPU registers in a single 128-bit slot
(seems plausible). If this is not the way to go, I can certainly
switch the kittyhawk version of the patch with the *, the extra
SAVE32SFPR and the extra double hummer specific storage space in the
thread_struct. If it would help I can post an alternate version of
the patch for discussion with the kittyhawk version.
Does this FPU feature have a specific name like double hammer? I'd
rather have the BGP defconfig depend on PPC_FPU_DOUBLE_HUMMER, or
something like that...
quoted
+ bool "Blue Gene/P"
+ depends on 44x
+ default n
+ select PPC_FPU
+ select PPC_DOUBLE_FPU
... in fact, it seem you are doing something like these here but you
don't use PPC_DOUBLE_FPU anywhere?
A fair point. I'm fine with calling it DOUBLE_HUMMER, but I wasn't sure if
that was "too internal" of a name for the kernel. Let me know and
I'll fix it up.
I'll also change the CONFIG_BGP defines in the FPU code to PPC_DOUBLE_FPU
or PPC_DOUBLE_HUMMER depending on what the community decides.
Thanks for the feedback!
-eric
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 01:01:20
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
BG/P nodes need to be configured for writethrough to work in SMP
configurations. This patch adds the right hooks in the MMU code
to make sure L1_WRITETHROUGH configurations are setup for BG/P.
quoted hunk
/* Storage attribute and access control fields */
#define PPC44x_TLB_ATTR_MASK 0x0000ff80
+#define PPC44x_TLB_WL1 0x00100000 /* Write-through L1 */
#define PPC44x_TLB_U0 0x00008000 /* User 0 */
#define PPC44x_TLB_U1 0x00004000 /* User 1 */
#define PPC44x_TLB_U2 0x00002000 /* User 2 */
Make it an MMU feature so it's done at runtime rather than compile time.
Also, you should aim toward avoiding that conditional branch in such a
critical hot path :-) A way to do so would be to shove these in the PTE
instead, there's plenty of unused bits in the top part for example.
quoted hunk
+ tlbwe r11,r13,PPC44x_TLB_ATTRIB /* Write ATTRIB */
/* Done...restore registers and get out of here.
*/
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 01:05:42
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
+#ifdef CONFIG_BGP
+/*
+ * The icbi instruction does not broadcast to all cpus in the ppc450
+ * processor used by Blue Gene/P. It is unlikely this problem will
+ * be exhibited in other processors so this remains ifdef'ed for BGP
+ * specifically.
+ *
+ * We deal with this by marking executable pages either writable, or
+ * executable, but never both. The permissions will fault back and
+ * forth if the thread is actively writing to executable sections.
+ * Each time we fault to become executable we flush the dcache into
+ * icache on all cpus.
+ *
I know that hack :-) I think I wrote it even (or a version of it, that
was a long time ago) ;-) That doesn't make it pretty tho ...
Gotta be very careful with on_each_cpu() done within a lock. I wonder if
we could fast-path & simplify that using crits, is there a way to shoot
criticial IPIs to the other cores ? Might even be able in this case to
do it entirely in asm in the page fault path.
quoted hunk
+ pte_update(ptep, 0, _PAGE_EXEC);
+ pte_unmap_unlock(ptep, ptl);
+ return;
+ }
+ if (is_write &&
+ (pte_val(old) & _PAGE_RW) &&
+ (pte_val(old) & _PAGE_DIRTY) &&
+ !(pte_val(old) & _PAGE_HWWRITE)) {
+ pte_update(ptep, _PAGE_EXEC, _PAGE_HWWRITE);
+ }
+ }
+ if (!pte_same(old, *ptep))
+ flush_tlb_page(vma, address);
+ pte_unmap_unlock(ptep, ptl);
+ }
+}
+#endif /* CONFIG_BGP */
+
/*
* For 600- and 800-family processors, the error_code parameter is DSISR
* for a data fault, SRR1 for an instruction fault. For 400-family processors
That surprised me too, I figured it must have been a close enough
match (at least in the 2.6.29.1 time frame which is where I'm trying
to merge the BG/P patches up from. The kittyhawk patches don't even
use this, so its possible we could just remove it.
_GLOBAL(__setup_cpu_460ex)
_GLOBAL(__setup_cpu_460gt)
mflr r4
bl __init_fpu_44x
bl __fixup_440A_mcheck
mtlr r4
blr
Looks like the 460 setup invokes a bunch of 440 calls! Would you
prefer I setup my own entry point (setup_cpu_bgp or setup_cpu_450)
which makes the same calls?
-eric
From: Eric Van Hensbergen <hidden> Date: 2011-05-20 01:21:56
On Thu, May 19, 2011 at 7:39 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
quoted
BG/P maps firmware with an early TLB
That's a bit gross. How often do you call that firmware in practice ?
Aren't you better off instead inserting a TLB entry for it when you call
it instead ? A simple tlbsx. + tlbwe sequence would do. That would free
up a TLB entry for normal use.
Well, it depends on who you talk to. The production software BG/P
guys use the firmware
constantly, its the primary interface to the networks, the console,
and the management software
which runs the machine. As such the IO Node guys, the Compute Node
Kernel guys and the
ZeptoOS guys use it quite a bit. The kittyhawk guys on the other hand
barely use it at all, in fact
I believe they do all the interaction with it during uboot and then shut it off.
IIRC, the sticky question is RAS support, there are certain things it
wants to jump to firmware
to deal with and expects things to be mapped an pinned into memory.
Furthermore, I think it
may make assumptions about where in the TLB the mappings are. Since
the kittyhawk guys
obviously ignore this by shutting it down, its not clear just how
important this is. I'm game to
try the dynamic mapping as you suggest if you would prefer it.
Its worth mentioning that I believe with BG/Q, the plan is to rely on
the firmware even more
extensively, but I haven't looked at any of the code yet to verify
whether or not this is true.
-eric
On 05/19/2011 07:36 PM, Benjamin Herrenschmidt wrote:
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
quoted
For BGP, it is convenient for 'kmalloc' to come back with 32-byte
aligned units for torus DMA
Signed-off-by: Eric Van Hensbergen<redacted>
---
arch/powerpc/include/asm/page_32.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Is DMA cache coherent on BG/P ? That's odd for a 4xx base :-)
Actually DMA sends invalidate requests to the snoop unit(L2 level).
BGP SoC is a bit different from other 4xx base.
Some details can be found in
www.scc.acad.bg/documentation/team.pdf
- kaz
Is DMA cache coherent on BG/P ? That's odd for a 4xx base :-)
My understanding of things (which could be totally wrong) is that the
DMA we care about on BG/P (namely the Torus and Collective networks)
is coherent at the L2. Of course the change in question is talking
about L1_CACHE_BYTES, so my reading of this is that its a sleazy way
of getting aligned mallocs that make interactions with the tightly
coupled networks easier/more-efficient. I'm open to alternative
suggestions.
But if it's not coherent with L1, then you sould have
CONFIG_NOT_COHERENT_CACHE set and not need that patch... or am I missing
something ?
One thing we should do some day as well is make that whole non-coherent
be runtime selected, on the list of things to fix 440+47x in the same
kernel. Pfiew....
Cheers,
Ben.
That surprised me too, I figured it must have been a close enough
match (at least in the 2.6.29.1 time frame which is where I'm trying
to merge the BG/P patches up from. The kittyhawk patches don't even
use this, so its possible we could just remove it.
_GLOBAL(__setup_cpu_460ex)
_GLOBAL(__setup_cpu_460gt)
mflr r4
bl __init_fpu_44x
bl __fixup_440A_mcheck
mtlr r4
blr
Looks like the 460 setup invokes a bunch of 440 calls! Would you
prefer I setup my own entry point (setup_cpu_bgp or setup_cpu_450)
which makes the same calls?
Yes, add an entry. 460's are just 440's btw :-)
Cheers,
Ben.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 01:54:15
On Thu, 2011-05-19 at 20:21 -0500, Eric Van Hensbergen wrote:
On Thu, May 19, 2011 at 7:39 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
quoted
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
quoted
BG/P maps firmware with an early TLB
That's a bit gross. How often do you call that firmware in practice ?
Aren't you better off instead inserting a TLB entry for it when you call
it instead ? A simple tlbsx. + tlbwe sequence would do. That would free
up a TLB entry for normal use.
Well, it depends on who you talk to. The production software BG/P
guys use the firmware constantly, its the primary interface to the networks, the console,
and the management software which runs the machine.
Yuck.
As such the IO Node guys, the Compute Node Kernel guys and the
ZeptoOS guys use it quite a bit. The kittyhawk guys on the other hand
barely use it at all, in fact I believe they do all the interaction with
it during uboot and then shut it off.
I would prefer that approach.
IIRC, the sticky question is RAS support, there are certain things it
wants to jump to firmware to deal with and expects things to be mapped
an pinned into memory.
Furthermore, I think it may make assumptions about where in the TLB the
mappings are.
This is gross, especially on a system with only 64 SW loaded TLB
entries :-(
Since the kittyhawk guys
obviously ignore this by shutting it down, its not clear just how
important this is. I'm game to
try the dynamic mapping as you suggest if you would prefer it.
I would yes, we can sort things out later for RAS.
Its worth mentioning that I believe with BG/Q, the plan is to rely on
the firmware even more extensively, but I haven't looked at any of the code yet to verify
whether or not this is true.
This is tantamount to linking a binary blob with the kernel ... it's a
fine line. At some point we might refuse the patches if they go too far
in that direction.
Cheers,
Ben.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 01:59:51
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
quoted hunk
For BGP, it is convenient for 'kmalloc' to come back with 32-byte
aligned units for torus DMA
Signed-off-by: Eric Van Hensbergen <redacted>
---
arch/powerpc/include/asm/page_32.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 02:13:55
On Fri, 2011-05-20 at 12:08 +1000, Benjamin Herrenschmidt wrote:
On Thu, 2011-05-19 at 20:32 -0500, Kazutomo Yoshii wrote:
quoted
Actually DMA sends invalidate requests to the snoop unit(L2 level).
BGP SoC is a bit different from other 4xx base.
Well, some other 44x also have a snooping L2 (more or less), but L1 is
usually the problem.
Hrm... looking at the doco you pointed me to, it looks like the L1 -is-
coherent, it gets snoop kills from the L2.
Ok so we do need to make this non-coherent cache stuff a runtime option
(well, we need that for 440+476 too anyways so may as well do it now).
As for the alignment of kmalloc, it looks like a hack that should be
done in the torus code itself.
Cheers,
Ben.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 03:14:01
On Thu, 2011-05-19 at 22:02 -0500, Kazutomo Yoshii wrote:
On 05/19/2011 09:13 PM, Benjamin Herrenschmidt wrote:
quoted
On Fri, 2011-05-20 at 12:08 +1000, Benjamin Herrenschmidt wrote:
quoted
On Thu, 2011-05-19 at 20:32 -0500, Kazutomo Yoshii wrote:
quoted
Actually DMA sends invalidate requests to the snoop unit(L2 level).
BGP SoC is a bit different from other 4xx base.
Well, some other 44x also have a snooping L2 (more or less), but L1 is
usually the problem.
Hrm... looking at the doco you pointed me to, it looks like the L1 -is-
coherent, it gets snoop kills from the L2.
Right, L1D is coherent if write throug is set.
L1I(virtually tagged) is not coherent, btw.
Yes, I wrote the horrid hack to ping pong the pages between writable and
executable afaik :-)
quoted
Ok so we do need to make this non-coherent cache stuff a runtime option
(well, we need that for 440+476 too anyways so may as well do it now).
What sort of runtime option do you mean?
I've asked Tony to give it a go since he's taking over the 476 stuff.
The idea is to make it a MMU feature and call into the cache flush
conditionally on it rather than under the control of a ifdef.
I want it to be possible to build a unified kernel that supports
multiple 44x and 47x platforms including BGP if we can make it happen.
There's still some roadblocks to support 47x and 44x in the same kernel,
most notably the cache line size, but I have hopes I'll get Tony to fix
them soon :-)
Cheers,
Ben.
On 05/19/2011 08:54 PM, Benjamin Herrenschmidt wrote:
On Thu, 2011-05-19 at 20:21 -0500, Eric Van Hensbergen wrote:
quoted
On Thu, May 19, 2011 at 7:39 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
quoted
On Wed, 2011-05-18 at 16:24 -0500, Eric Van Hensbergen wrote:
quoted
BG/P maps firmware with an early TLB
That's a bit gross. How often do you call that firmware in practice ?
Aren't you better off instead inserting a TLB entry for it when you call
it instead ? A simple tlbsx. + tlbwe sequence would do. That would free
up a TLB entry for normal use.
Well, it depends on who you talk to. The production software BG/P
guys use the firmware constantly, its the primary interface to the networks, the console,
and the management software which runs the machine.
Yuck.
Unfortunately, the firmware is also required:
- to configure Blue Gene Interrupt Controller(BIC)
- to configure Torus DMA unit. e.g. fifo
- to configure global interrupt (even we don't use, we need to disable
some channel correctly)
- to access node personality information (node id, DDR size, HZ, etc) or
maybe we can directly access SRAM?
etc, etc.
quoted
As such the IO Node guys, the Compute Node Kernel guys and the
ZeptoOS guys use it quite a bit. The kittyhawk guys on the other hand
barely use it at all, in fact I believe they do all the interaction with
it during uboot and then shut it off.
(I'm one of the ZeptoOS guys, btw)
As a regular ppc linux usage, our firmware dependency is minimum as well.
However, with our HPC extension, the firmware functions are called when
it configures BGP specific network hardware.
We are not planning to submit our HPC extension here anytime soon
because our work is very special purpose and includes lots of dirty hack
right now.
Thanks,
Kaz
I would prefer that approach.
quoted
IIRC, the sticky question is RAS support, there are certain things it
wants to jump to firmware to deal with and expects things to be mapped
an pinned into memory.
Furthermore, I think it may make assumptions about where in the TLB the
mappings are.
This is gross, especially on a system with only 64 SW loaded TLB
entries :-(
quoted
Since the kittyhawk guys
obviously ignore this by shutting it down, its not clear just how
important this is. I'm game to
try the dynamic mapping as you suggest if you would prefer it.
I would yes, we can sort things out later for RAS.
quoted
Its worth mentioning that I believe with BG/Q, the plan is to rely on
the firmware even more extensively, but I haven't looked at any of the code yet to verify
whether or not this is true.
This is tantamount to linking a binary blob with the kernel ... it's a
fine line. At some point we might refuse the patches if they go too far
in that direction.
Cheers,
Ben.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 03:52:35
Unfortunately, the firmware is also required:
- to configure Blue Gene Interrupt Controller(BIC)
Can't we just write bare metal code for that ?
- to configure Torus DMA unit. e.g. fifo
Same
- to configure global interrupt (even we don't use, we need to disable
some channel correctly)
Same
- to access node personality information (node id, DDR size, HZ, etc) or
maybe we can directly access SRAM?
That should be turned into device-tree at boot, possibly from a
bootloader or from the zImage wrapper.
etc, etc.
quoted
quoted
As such the IO Node guys, the Compute Node Kernel guys and the
ZeptoOS guys use it quite a bit. The kittyhawk guys on the other hand
barely use it at all, in fact I believe they do all the interaction with
it during uboot and then shut it off.
(I'm one of the ZeptoOS guys, btw)
Heh ok.
As a regular ppc linux usage, our firmware dependency is minimum as well.
However, with our HPC extension, the firmware functions are called when
it configures BGP specific network hardware.
We are not planning to submit our HPC extension here anytime soon
because our work is very special purpose and includes lots of dirty hack
right now.
Ok.
Cheers,
Ben.
Thanks,
Kaz
quoted
I would prefer that approach.
quoted
IIRC, the sticky question is RAS support, there are certain things it
wants to jump to firmware to deal with and expects things to be mapped
an pinned into memory.
Furthermore, I think it may make assumptions about where in the TLB the
mappings are.
This is gross, especially on a system with only 64 SW loaded TLB
entries :-(
quoted
Since the kittyhawk guys
obviously ignore this by shutting it down, its not clear just how
important this is. I'm game to
try the dynamic mapping as you suggest if you would prefer it.
I would yes, we can sort things out later for RAS.
quoted
Its worth mentioning that I believe with BG/Q, the plan is to rely on
the firmware even more extensively, but I haven't looked at any of the code yet to verify
whether or not this is true.
This is tantamount to linking a binary blob with the kernel ... it's a
fine line. At some point we might refuse the patches if they go too far
in that direction.
Cheers,
Ben.
From: Eric Van Hensbergen <hidden> Date: 2011-05-20 13:01:50
On Thu, May 19, 2011 at 10:52 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
quoted
Unfortunately, the firmware is also required:
- to configure Blue Gene Interrupt Controller(BIC)
- to configure Torus DMA unit. e.g. fifo
- to configure global interrupt (even we don't use, we need to disable
some channel correctly)
Can't we just write bare metal code for that ?
The kittyhawk code has the bare-metal equivalents for all of these.
When I get to the drivers, I'll favor the kittyhawk versions for
submission and then we'll see if it would be possible to adapt the HPC
extensions to use the bare-metal versions of the drivers versus the
firmware interface.
quoted
- to access node personality information (node id, DDR size, HZ, etc) or
maybe we can directly access SRAM?
That should be turned into device-tree at boot, possibly from a
bootloader or from the zImage wrapper.
This is the approach is used by the kittyhawk u-boot approach.
However, it would also be just as easy to construct an in-memory
device-tree within Linux by mapping the personality page and copying
the relevant bits out. This has the advantage of being able to boot
Linux directly on the nodes without an intermediary boot loader (which
kittyhawk uses just to allow us customize which kernel boots on a
node-to-node basis whereas the stock system boots the same kernel on
all the nodes within a partition allocation (64-40,000 nodes)).
-eric
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2011-05-20 22:21:00
On Fri, 2011-05-20 at 08:01 -0500, Eric Van Hensbergen wrote:
On Thu, May 19, 2011 at 10:52 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
quoted
quoted
Unfortunately, the firmware is also required:
- to configure Blue Gene Interrupt Controller(BIC)
- to configure Torus DMA unit. e.g. fifo
- to configure global interrupt (even we don't use, we need to disable
some channel correctly)
Can't we just write bare metal code for that ?
The kittyhawk code has the bare-metal equivalents for all of these.
When I get to the drivers, I'll favor the kittyhawk versions for
submission and then we'll see if it would be possible to adapt the HPC
extensions to use the bare-metal versions of the drivers versus the
firmware interface.
Ok. We can also start with using the FW and then migrate to bare metal.
quoted
quoted
- to access node personality information (node id, DDR size, HZ, etc) or
maybe we can directly access SRAM?
That should be turned into device-tree at boot, possibly from a
bootloader or from the zImage wrapper.
This is the approach is used by the kittyhawk u-boot approach.
However, it would also be just as easy to construct an in-memory
device-tree within Linux by mapping the personality page and copying
the relevant bits out. This has the advantage of being able to boot
Linux directly on the nodes without an intermediary boot loader (which
kittyhawk uses just to allow us customize which kernel boots on a
node-to-node basis whereas the stock system boots the same kernel on
all the nodes within a partition allocation (64-40,000 nodes)).
We can do that from the zImage wrapper... that would be nicer than doing
it from the kernel itself unless there's good reasons to do so like
iSeries.
Cheers,
Ben.