please pull powerpc.git 'merge' branch
Linus,
Please do a pull from the "merge" branch of
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git
to get the following powerpc updates. They are mostly bug-fixes; there is also a defconfig update for Cell, plus a couple of commits that will enable the kernel to run on forthcoming IBM machines. These don't affect anything on the current machines, since the firmware properties and methods they use aren't present.
Thanks,
Paul.
Alan Modra:
powerpc64: Fix loading of modules without a .toc section
Andreas Schwab:
sound/ppc: snd_pmac_toonie_init should be __init
powerpc: Wire up *at syscalls
Anton Blanchard:
powerpc: Add cputable entry for POWER6
Arnd Bergmann:
spufs: Disable local interrupts for SPE hash_page calls.
powerpc: update cell_defconfig
David Gibson:
powerpc: Fix pagetable bloat for hugepages
David Woodhouse:
powerpc: Use check_legacy_ioport() on ppc32 too.
Eugene Surovegin:
ppc32: add 440GX erratum 440_43 workaround
Paul Mackerras:
powerpc/pseries: Tell firmware our capabilities on new machines
Vitaly Bordug:
ppc32: odd fixes and improvements in ppc_sys ppc32 CPM_UART: Convert to use platform devices
ppc32: Update board-specific code of the CPM UART users ppc32 CPM_UART: Fixed odd address translations
arch/powerpc/configs/cell_defconfig | 40 ++-- arch/powerpc/kernel/cputable.c | 16 + arch/powerpc/kernel/module_64.c | 16 + arch/powerpc/kernel/prom_init.c | 112 ++++++++++ arch/powerpc/kernel/setup-common.c | 8 + arch/powerpc/kernel/setup_64.c | 8 - arch/powerpc/kernel/systbl.S | 13 + arch/powerpc/mm/hugetlbpage.c | 295 ++++++++++++++++++++++++--- arch/powerpc/mm/init_64.c | 7 + arch/powerpc/platforms/cell/spu_base.c | 10 + arch/powerpc/platforms/cell/spu_callbacks.c | 13 + arch/ppc/platforms/4xx/ocotea.c | 2 arch/ppc/platforms/mpc8272ads_setup.c | 114 ++++++++++ arch/ppc/platforms/mpc866ads_setup.c | 140 +++++++++++++ arch/ppc/platforms/mpc885ads_setup.c | 131 ++++++++++++ arch/ppc/platforms/pq2ads.c | 31 +++ arch/ppc/syslib/ibm440gx_common.c | 13 + arch/ppc/syslib/ibm440gx_common.h | 4 arch/ppc/syslib/mpc8xx_devices.c | 25 ++ arch/ppc/syslib/ppc_sys.c | 4 arch/ppc/syslib/pq2_sys.c | 8 - drivers/block/floppy.c | 2 drivers/input/serio/i8042-io.h | 4 drivers/serial/cpm_uart/cpm_uart.h | 49 ++++ drivers/serial/cpm_uart/cpm_uart_core.c | 280 ++++++++++++++++++++------ drivers/serial/cpm_uart/cpm_uart_cpm1.c | 54 ----- drivers/serial/cpm_uart/cpm_uart_cpm2.c | 14 - fs/stat.c | 2 include/asm-powerpc/cputable.h | 14 + include/asm-powerpc/io.h | 6 - include/asm-powerpc/page_64.h | 1 include/asm-powerpc/pgalloc.h | 2 include/asm-powerpc/unistd.h | 20 ++ include/asm-ppc/ppc_sys.h | 2 include/asm-ppc/reg_booke.h | 1 sound/ppc/toonie.c | 2 36 files changed, 1234 insertions(+), 229 deletions(-)
Quoted 2 lines · Paul Mackerras
Anton Blanchard:
powerpc: Add cputable entry for POWER6
I never saw this posted to the list.
+#define PPC_FEATURE_ARCH_2_05 0x00001000
Previously we've said implementation instead of specification ("PPC_FEATURE_POWER5_PLUS" etc). That's better than saying base architecture version, since there are parts of the arch that might or might not be implemented (i.e. optional features, etc).
Quoted 2 lines
Paul Mackerras:
powerpc/pseries: Tell firmware our capabilities on new machines
I never saw this one on the list either.
Don't you want to fall back to the ELF method if the prom call fails (ret != 0)? Right you close and return.
-Olof
Quoted 4 lines · Olof Johansson
Previously we've said implementation instead of specification ("
PPC_FEATURE_POWER5_PLUS" etc). That's better than saying base architecture version, since there are parts of the arch that might or might not be implemented (i.e. optional features, etc).
We now have the AT_PLATFORM string, which we didn't have when we added the POWER5_PLUS etc. features. That specifies which particular implementation we are on quite precisely. We don't want to have a bit for every single implementation or we'll run out of bits.
The ARCH_2_05 bit means all the non-optional bits of the 2.05 architecture. If there are optional features in the architecture, we have separate bits for them. For example, we don't have separate bits for POWER4 and for 970; instead we have a HAS_ALTIVEC bit, and for 970 we set both POWER4 and HAS_ALTIVEC. So the POWER4 bit is really a "2.00 architecture version" bit.
Quoted 2 lines
Don't you want to fall back to the ELF method if the prom call fails (ret != 0)? Right you close and return.
There are two return values here - the return from call-method, and the return from ibm,client-architecture-support. If the latter does not exist, call-method returns non-zero, which gets returned from call_prom_ret, and we close the root node and try the elf-header method. If the ibm,client-architecture-support method exists but returns an error, call_prom_ret returns zero but puts a non-zero value in ret. In that case we don't want to try the elf-header method.
So I claim that the code is correct as it is. :)
Paul.
Quoted 10 lines
Quoted 4 lines
Previously we've said implementation instead of specification ("
PPC_FEATURE_POWER5_PLUS" etc). That's better than saying base architecture version, since there are parts of the arch that might or might not be implemented (i.e. optional features, etc).We now have the
AT_PLATFORMstring, which we didn't have when we added thePOWER5_PLUSetc. features. That specifies which particular implementation we are on quite precisely. We don't want to have a bit for every single implementation or we'll run out of bits.
Quoted 6 lines
The
ARCH_2_05bit means all the non-optional bits of the 2.05 architecture. If there are optional features in the architecture, we have separate bits for them. For example, we don't have separate bits for POWER4 and for 970; instead we have aHAS_ALTIVECbit, and for 970 we set both POWER4 andHAS_ALTIVEC. So the POWER4 bit is really a "2.00 architecture version" bit.
Except that the 970 at least is actually version 2.01. Sounds like names are better than bare numbers -- you showed yourself that numbers like this are confusing, but you also say that a cpu name really means an arch version (which isn't so bad -- there generally is only one "main" CPU per arch version anyway, and people generally know what is compatible to what).
So please rename ARCH_2_05 to the name of the first CPU that implements architecture 2.05?
Segher
Quoted 10 lines · Segher Boessenkool
Quoted 10 lines
Quoted 4 lines
Previously we've said implementation instead of specification ("
PPC_FEATURE_POWER5_PLUS" etc). That's better than saying base architecture version, since there are parts of the arch that might or might not be implemented (i.e. optional features, etc).We now have the
AT_PLATFORMstring, which we didn't have when we added thePOWER5_PLUSetc. features. That specifies which particular implementation we are on quite precisely. We don't want to have a bit for every single implementation or we'll run out of bits.
Quoted 8 lines
Quoted 6 lines
The
ARCH_2_05bit means all the non-optional bits of the 2.05 architecture. If there are optional features in the architecture, we have separate bits for them. For example, we don't have separate bits for POWER4 and for 970; instead we have aHAS_ALTIVECbit, and for 970 we set both POWER4 andHAS_ALTIVEC. So the POWER4 bit is really a "2.00 architecture version" bit.Except that the 970 at least is actually version 2.01.
Are there any userspace-visible differences between 2.00 and 2.01?
Quoted 6 lines
Sounds
like names are better than bare numbers -- you showed yourself that numbers like this are confusing, but you also say that a cpu name really means an arch version (which isn't so bad -- there generally is only one "main" CPU per arch version anyway, and people generally know what is compatible to what).
It's actually about an even tradeoff between the two. We run the risk of running out of bits eventually no matter what, and as long as it's blindingly clear and well stated that it does not imply any optional features, then it doesn't matter. This puts the burden on userspace developers to know which features are optional, not just what works on their POWER6 lab machine, etc.
Quoted 2 lines
So please rename
ARCH_2_05to the name of the first CPU that implements architecture 2.05?
We already have SMT, ICACHE_SNOOP and ALTIVEC feature bits, so it probably makes sense to stay in the ARCH_2_05 direction. Unfortunately it might be tricky to rename the old defines now due to userland exposure.
I guess Cell breaks all this logic though. Which PPC base version does it implement?
-Olof
Quoted 6 lines · Olof Johansson
We already have SMT,
ICACHE_SNOOPand ALTIVEC feature bits, so it probably makes sense to stay in theARCH_2_05direction. Unfortunately it might be tricky to rename the old defines now due to userland exposure.I guess Cell breaks all this logic though. Which PPC base version does it implement?
The Cell Broadband Engine Architecture in theory is 2.03 and also mandates some of the extensions that are optional in there.
The relevant sections in the specs are:
| 4.1.1 Optional Features in PowerPC Architecture, Book I (Required for | CBEA) | The following facilities and instructions are considered optional in | the PowerPC Architecture, but are required for the PPE by the CBEA | user mode environment. | • Floating reciprocal estimate single A-form (fres) | • Floating reciprocal square-root estimate A-form (frsqte) | • Vector/SIMD multimedia extension | Note: The optional PowerPC floating-point instructions that are | mandatory in the CBEA are needed for the application space targeted | by the CBEA. | | 4.1.3 Optional Features in PowerPC Architecture, Book II (Required | for CBEA) | The following facilities and instructions are considered optional | in the PowerPC Architecture, but are required in the CBEA. | • Data cache block touch X-form (dcbt) | This is an optional version of dcbt that permits a program to | provide a hint that a sequence of data cache blocks is likely | to be needed soon. | Book II describes these facilities and instructions.
I believe the actual implementation is missing one of the mandatory features of 2.03 that was not in 2.02 though.
Arnd <><
Quoted 2 lines · Arnd Bergmann
The Cell Broadband Engine Architecture in theory is 2.03 and also mandates some of the extensions that are optional in there.
Oh, and it also has some extensions that are supposed to be part of later powerpc architecture releases (CBEA, appendix E):
• Mediated interrupt
• Multiple concurrent large pages
• Add TL (TLB load control) bit to logical-partitioning control register (LPCR) for software versus hardware load of TLB
• Change tlbie<l> of large page to always invalidate ERAT
• Hypervisor SPRs no longer readable when HV equals 0
Do we know which ones of these made it into 2.05?
Arnd <><
Quoted 8 lines · Arnd Bergmann
• Mediated interrupt
• Multiple concurrent large pages
• Add TL (TLB load control) bit to logical-partitioning control register (LPCR) for software versus hardware load of TLB
• Change tlbie<l> of large page to always invalidate ERAT
• Hypervisor SPRs no longer readable when HV equals 0Do we know which ones of these made it into 2.05?
I'm not sure that can be discussed on a public mailing list, given that 2.02 is the last non-secret architecture version at this time. :-)
-Olof
Quoted 8 lines
Quoted 6 lines
We already have SMT,
ICACHE_SNOOPand ALTIVEC feature bits, so it probably makes sense to stay in theARCH_2_05direction. Unfortunately it might be tricky to rename the old defines now due to userland exposure.I guess Cell breaks all this logic though. Which PPC base version does it implement?
The Cell Broadband Engine Architecture in theory is 2.03 and also mandates
The docs (for example, "CBE_Architecture_v10.pdf") say 2.02. One more reason to not use those arch version numbers.
Segher
Quoted 7 lines · Segher Boessenkool
Quoted 3 lines
The Cell Broadband Engine Architecture in theory is 2.03 and also mandates
The docs (for example, "CBE_Architecture_v10.pdf") say 2.02. One more reason
to not use those arch version numbers.
Sorry, my fault. I misremembered it from that spec.
Arnd <><
Quoted 3 lines · Arnd Bergmann
The Cell Broadband Engine Architecture in theory is 2.03 and also mandates some of the extensions that are optional in there.
The relevant sections in the specs are:
Ok. So Cell should really set PPC_FEATURE_ARCH_2_02 then, and possible PPC_FEATURE_CELL to signify the cell extensions?
Right now ARCH_2_02 is not set as far as I can see.
-Olof
Quoted 10 lines · Olof Johansson
Quoted 3 lines · Arnd Bergmann
The Cell Broadband Engine Architecture in theory is 2.03 and also mandates some of the extensions that are optional in there.
The relevant sections in the specs are:Ok. So Cell should really set
PPC_FEATURE_ARCH_2_02then, and possiblePPC_FEATURE_CELLto signify the cell extensions?Right now
ARCH_2_02is not set as far as I can see.
s/2_02/2_03/g
-Olof
Quoted 12 lines · Paul Mackerras
Quoted 4 lines · Olof Johansson
Previously we've said implementation instead of specification ("
PPC_FEATURE_POWER5_PLUS" etc). That's better than saying base architecture version, since there are parts of the arch that might or might not be implemented (i.e. optional features, etc).We now have the
AT_PLATFORMstring, which we didn't have when we added thePOWER5_PLUSetc. features. That specifies which particular implementation we are on quite precisely. We don't want to have a bit for every single implementation or we'll run out of bits.
Quoted 6 lines
The
ARCH_2_05bit means all the non-optional bits of the 2.05 architecture. If there are optional features in the architecture, we have separate bits for them. For example, we don't have separate bits for POWER4 and for 970; instead we have aHAS_ALTIVECbit, and for 970 we set both POWER4 andHAS_ALTIVEC. So the POWER4 bit is really a "2.00 architecture version" bit.
Ok, I guess that's more or less how it's been used, since there's only been one implementation per architecture version in the past (970 series being the main exception). The only one left out from the table seems to be 2.01 (POWER4+), not sure if it had any userspace-visible changes in the first place.
A rename of existing names might make sense for consistency/clarity. But that's outside of __KERNEL__ so it would break userspace.
Quoted 6 lines
Quoted 2 lines
Don't you want to fall back to the ELF method if the prom call fails (ret != 0)? Right you close and return.
If the ibm,client-architecture-support method exists but returns an error,
call_prom_retreturns zero but puts a non-zero value in ret.
Right, that's quite obvious from the implementation.
Quoted 1 line
In that case we don't want to try the elf-header method.
That was my question, if it made sense to fall back to it. And that's a "no". Thanks. :-)
-Olof
PATCH 1/1 powerpc: rename PPC_FEATURE_POWER.* to PPC_FEATURE_ARCH.*
Quoted 2 lines · Olof Johansson
A rename of existing names might make sense for consistency/clarity. But that's outside of
__KERNEL__so it would break userspace.
Less talk, more patches. 2.6.18 material.
Btw, looks like glibc duplicates the definitions instead of includes them, but let's be nice and keep them anyway. Besides, they got the ISA version to processor mappings wrong in their comments.
---
Rename PPC_FEATURE_POWER.* to be signify the base architecture versions instead. Keep the old names around since they're defined outside of __KERNEL__.
If POWER5 is 2.02 (last public version), and POWER6 is 2.05, then POWER5+ should be 2.03 or 2.04. Not sure what fills in the hole, but I took a guess that 5+ is 2.03.
arch/powerpc/kernel/cputable.c +3 -3
@@ -52,10 +52,10 @@ extern void __setup_cpu_ppc970(unsigned#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \ PPC_FEATURE_HAS_MMU)#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) -#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) -#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\ +#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_00) +#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_02 |\ PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) -#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ +#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_03|\ PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
include/asm-powerpc/cputable.h +12 -3
@@ -15,15 +15,24 @@#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000#define PPC_FEATURE_NO_TB 0x00100000 -#define PPC_FEATURE_POWER4 0x00080000 -#define PPC_FEATURE_POWER5 0x00040000 -#define PPC_FEATURE_POWER5_PLUS 0x00020000 +#define PPC_FEATURE_ARCH_2_00 0x00080000 +#define PPC_FEATURE_ARCH_2_02 0x00040000 +#define PPC_FEATURE_ARCH_2_03 0x00020000#define PPC_FEATURE_CELL 0x00010000#define PPC_FEATURE_BOOKE 0x00008000#define PPC_FEATURE_SMT 0x00004000#define PPC_FEATURE_ICACHE_SNOOP 0x00002000#define PPC_FEATURE_ARCH_2_05 0x00001000 +/* +* These are needed for userspace compat, since processor +* models used to be used before instead of arch versions +*/ + +#define PPC_FEATURE_POWER4 PPC_FEATURE_ARCH_2_00 +#define PPC_FEATURE_POWER5 PPC_FEATURE_ARCH_2_02 +#define PPC_FEATURE_POWER5_PLUS PPC_FEATURE_ARCH_2_03 +#ifdef __KERNEL__#ifndef __ASSEMBLY__
PATCH 1/1 powerpc: Fix comment in ibm_architecture_vec
In reply to Paul MackerrasQuoted 2 lines · Paul Mackerras
Paul Mackerras:
powerpc/pseries: Tell firmware our capabilities on new machines
Below is definitely not 2.6.17 material, so for the 2.6.18 queue:
---
Either constant or comment is wrong, I'm guessing it's comment since the ELF header version uses 64MB.
arch/powerpc/kernel/prom_init.c +1 -1
@@ -705,7 +705,7 @@ static unsigned char ibm_architecture_veW (0xffffffff ),/* virt_base */ W (0xffffffff ),/* virt_size */ W (0xffffffff ),/* load_base */ -W (64 ),/* 128MB min RMA */ +W (64 ),/* 64MB min RMA */ W (0xffffffff ),/* full client load */ 0 ,/* min RMA percentage of total RAM */ 48, /* max log_2(hash table size) */