powerpc: remove default=y from PMAC and CHRP Kconfigs
Subsystems (2)
PATCH 1/1 powerpc: remove default=y from PMAC and CHRP Kconfigs
Remove the "default y" from the Kconfig options for CHRP, PMAC, and PMAC64 platforms. This patch is a follow-up to "remove CHRP and PMAC support from defconfigs, fix Kconfigs", which was applied incompletely.
---
Ben, in the future, please apply either all of my patch or none of it. Applying half of my patch and "thinking about" the other half doesn't do me any good.
arch/powerpc/platforms/chrp/Kconfig | 1 - arch/powerpc/platforms/powermac/Kconfig | 4 ---- 2 files changed, 0 insertions(+), 5 deletions(-)
arch/powerpc/platforms/chrp/Kconfig +0 -1
@@ -9,4 +9,3 @@ config PPC_CHRP select PPC_UDBG_16550 select PPC_NATIVE select PCI - default y
arch/powerpc/platforms/powermac/Kconfig +0 -4
@@ -6,7 +6,6 @@ config PPC_PMAC select PPC_INDIRECT_PCI if PPC32 select PPC_MPC106 if PPC32 select PPC_NATIVE - default y config PPC_PMAC64 bool
@@ -16,6 +15,3 @@ config PPC_PMAC64 select MPIC_U3_HT_IRQS select GENERIC_TBSYNC select PPC_970_NAP - default y - -
Signature · 1 line
1.5.5
Quoted 3 lines · Timur Tabi
Remove the "default y" from the
Kconfigoptions for CHRP, PMAC, and PMAC64 platforms. This patch is a follow-up to "remove CHRP and PMAC support from defconfigs, fix Kconfigs", which was applied incompletely.
No. Instead, send a patch that fixes the defconfig's to explicitely set those to "n". As to whether those should be defaults or not, this is a different discussion (I'm almost tempted to have everything default to y).
Ben.
Quoted 39 lines
Signed-off-by Timur Tabi <[email protected]>---
Ben, in the future, please apply either all of my patch or none of it. Applying half of my patch and "thinking about" the other half doesn't do me any good.
arch/powerpc/platforms/chrp/Kconfig | 1 - arch/powerpc/platforms/powermac/Kconfig | 4 ---- 2 files changed, 0 insertions(+), 5 deletions(-)arch/powerpc/platforms/chrp/Kconfig +0
-1@@ -9,4 +9,3 @@ config PPC_CHRP select PPC_UDBG_16550 select PPC_NATIVE select PCI - default yarch/powerpc/platforms/powermac/Kconfig +0
-4@@ -6,7 +6,6 @@ config PPC_PMAC select PPC_INDIRECT_PCI if PPC32 select PPC_MPC106 if PPC32 select PPC_NATIVE - default y config PPC_PMAC64 bool@@ -16,6 +15,3 @@ config PPC_PMAC64 select MPIC_U3_HT_IRQS select GENERIC_TBSYNC select PPC_970_NAP - default y - -
Quoted 4 lines · Benjamin Herrenschmidt
No. Instead, send a patch that fixes the defconfig's to explicitely set those to "n". As to whether those should be defaults or not, this is a different discussion (I'm almost tempted to have everything default to y).
But this is the reason I sent you the patch in the first place. I think "default y" is wrong and doesn't make any sense, so I'm asking you for a technical reason why PMAC and CHRP should default to yes. That is the focus of my patch. The defconfig changes are just to clean up the mess that "default y" left behind.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 6 lines · Timur Tabi
But this is the reason I sent you the patch in the first place. I think "default y" is wrong and doesn't make any sense, so I'm asking you for a technical reason why PMAC and CHRP should default to yes. That is the focus of my patch. The defconfig changes are just to clean up the mess that "default y" left behind.
I'm happy with -all- platforms for a given CPU type defaulting to y.
Ben.
Quoted 2 lines · Benjamin Herrenschmidt
No. Instead, send a patch that fixes the defconfig's to explicitely set those to "n".
What's the difference, other than wasting some bytes in the Kconfig file?
Quoted 2 lines
As to whether those should be defaults or not, this is a different discussion (I'm almost tempted to have everything default to y).
Please, no. It's much easier to turn on what you want, than to go through menuconfig turning a million things off.
-Scott
Quoted 1 line · Benjamin Herrenschmidt
I'm happy with -all- platforms for a given CPU type defaulting to y.
I'm not sure I understand. The current Kconfigs defaults to Y for CHRP and PMAC on *all* PowerPC systems, including those that are neither CHRP nor PMAC. Are you saying that's a good thing?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 7 lines · Timur Tabi
Quoted 1 line · Benjamin Herrenschmidt
I'm happy with -all- platforms for a given CPU type defaulting to y.
I'm not sure I understand. The current Kconfigs defaults to Y for CHRP and PMAC on *all* PowerPC systems, including those that are neither CHRP nor PMAC. Are you saying that's a good thing?
Timur,
You do realise it's entirely possible to build a kernel which supports 50 different Freescale CPUs all in one?
Enabling CHRP, PMAC support *AND* non-CHRP platforms is possible in the same binary. The relevant code that differentiates them is in the boot wrapper and this is selected by *how you compile the kernel* and not which objects are compiled in. make zImage and make cuImage on the same kernel objects will give you an 'identical' image just packaged in a different way.
If you really want to build a single-cpu single-board kernel, disable CHRP and PMAC for those board configs, but the default definitely should be to enable them all within reason (obviously coherent and non-coherent designs cannot coexist in the same kernel, 32-bit and 64-bit do not play well in the same kernel..)
Signature · 2 lines
Matt Sealey <[email protected]> Genesi, Manager, Developer Relations
T24gVGh1LCBPY3QgOSwgMjAwOCBhdCAxMDo1OSBBTSwgTWF0dCBTZWFsZXkgPG1hdHRAZ2VuZXNp LXVzYS5jb20+IHdyb3RlOgoKPiBJZiB5b3UgcmVhbGx5IHdhbnQgdG8gYnVpbGQgYSBzaW5nbGUt Y3B1IHNpbmdsZS1ib2FyZCBrZXJuZWwsIGRpc2FibGUgQ0hSUAo+IGFuZCBQTUFDIGZvciB0aG9z ZSBib2FyZCBjb25maWdzLCBidXQgdGhlIGRlZmF1bHQgZGVmaW5pdGVseSBzaG91bGQgYmUgdG8K PiBlbmFibGUgdGhlbSBhbGwgd2l0aGluIHJlYXNvbgoKVGhlIHByb2JsZW0gaXMgdGhhdCB0aGlz IGlzIGluY29uc2lzdGVudCB3aXRoIG1vc3QgS2NvbmZpZyBvcHRpb25zLgpMYXN0IEkgaGVhcmQs IHRoZSBrZXJuZWwgY29tbXVuaXR5IGdlbmVyYWxseSBmcm93bnMgb24gImRlZmF1bHQgeSIgaW4K S2NvbmZpZyBvcHRpb25zLgoKSSdtIHdhaXRpbmcgZm9yIHNvbWVvbmUgdG8gZXhwbGFpbiB0byBt ZSB3aGF0J3Mgc28gc3BlY2lhbCBhYm91dCBDSFJQCmFuZCBQTUFDIHRoYXQgdGhlc2UgdHdvIHBs YXRmb3JtcyBzaG91bGQgYmUgZW5hYmxlZCBieSBkZWZhdWx0LCB3aGVuCmFsbCBvdGhlciBQb3dl clBDIHBsYXRmb3JtcyBhcmUgZGlzYWJsZWQgYnkgZGVmYXVsdC4KClRoaXMgaXMgd2hhdCBJIHNl ZSBpbiBtZW51Y29uZmlnIHdoZW4gSSBjcmVhdGUgYSBmcmVzaCAuY29uZmlnIGZvciBQb3dlclBD OgoKICCBIIEgICAgWypdIENvbW1vbiBIYXJkd2FyZSBSZWZlcmVuY2UgUGxhdGZvcm0gKENIUlAp IGJhc2VkIG1hY2hpbmVzIChORVcpCiAggSCBICAgIFsgXSBGcmVlc2NhbGUgTVBDNTEyMUUgQURT IChORVcpCiAggSCBICAgIFsgXSBHZW5lcmljIHN1cHBvcnQgZm9yIHNpbXBsZSBNUEM1MTIxIGJh c2VkIGJvYXJkcyAoTkVXKQogIIEggSAgICBbIF0gNTJ4eC1iYXNlZCBib2FyZHMgKE5FVykKICCB IIEgICAgWypdIEFwcGxlIFBvd2VyTWFjIGJhc2VkIG1hY2hpbmVzIChORVcpCiAggSCBICAgIFsg XSA4Mnh4LWJhc2VkIGJvYXJkcyAoUFEgSUkpIChORVcpICAtLS0+CiAggSCBICAgIFsgXSA4M3h4 LWJhc2VkIGJvYXJkcyAoTkVXKSAgLS0tPgogIIEggSAgICBbIF0gODZ4eC1iYXNlZCBib2FyZHMg KE5FVykgIC0tLT4KICCBIIEgICAgWyBdIEVtYmVkZGVkIDZ4eC83eHgvN3h4eC1iYXNlZCBib2Fy ZHMgKE5FVykKCkNIUlAgYW5kIFBNQUMgYXJlbid0IGZvbGxvd2luZyB0aGUgcnVsZXMgdGhhdCBl dmVyeW9uZSBlbHNlIGlzIGZvbGxvd2luZy4gIFdoeT8KCi0tIApUaW11ciBUYWJpCkxpbnV4IGtl cm5lbCBkZXZlbG9wZXIgYXQgRnJlZXNjYWxlCg==
Quoted 26 lines · Timur Tabi
Quoted 3 lines · Matt Sealey
If you really want to build a single-cpu single-board kernel, disable CHRP and PMAC for those board configs, but the default definitely should be to enable them all within reason
The problem is that this is inconsistent with most
Kconfigoptions. Last I heard, the kernel community generally frowns on "default y" inKconfigoptions.I'm waiting for someone to explain to me what's so special about CHRP and PMAC that these two platforms should be enabled by default, when all other PowerPC platforms are disabled by default.
This is what I see in menuconfig when I create a fresh .config for PowerPC:
│ │ [*] Common Hardware Reference Platform (CHRP) based machines (NEW) │ │ [ ] Freescale MPC5121E ADS (NEW) │ │ [ ] Generic support for simple MPC5121 based boards (NEW) │ │ [ ] 52xx-based boards (NEW) │ │ [*] Apple PowerMac based machines (NEW) │ │ [ ] 82xx-based boards (PQ II) (NEW) ---> │ │ [ ] 83xx-based boards (NEW) ---> │ │ [ ] 86xx-based boards (NEW) ---> │ │ [ ] Embedded 6xx/7xx/7xxx-based boards (NEW)
Quoted 1 line
CHRP and PMAC aren't following the rules that everyone else is following. Why?
Because they are by far the historically most common configuration, and still in production as the defacto standard PowerPC system configuration. IBM blades etc. with SLOF will boot up as a CHRP-ish system, as well as the Efika and Pegasos and anything else Genesi produces. Since Linux distributions generally do not support tiny embedded boards, you can imagine why it's disabled by default, but there's no reason it can't be ENABLED by default and turned off by a distribution, the same way it can't be enabled by default and turned off by YOU (compare and contrast having to manually select which board you want to build for every time).
But, turning them all on would not matter. You would build a kernel for every one and a device tree for every one increasing your build time a bit for a default kernel, but you would be guaranteed to get a kernel binary somewhere in the tree that would work on all of them :)
Signature · 2 lines
Matt Sealey <[email protected]> Genesi, Manager, Developer Relations
Quoted 2 lines · Matt Sealey
Because they are by far the historically most common configuration, and still in production as the defacto standard PowerPC system configuration.
Not really. PMAC systems are not being built any more. So that leaves CHRP.
Quoted 3 lines
IBM blades etc. with SLOF will boot up as a CHRP-ish system, as well as the Efika and Pegasos and anything else Genesi produces. Since Linux distributions generally do not support tiny embedded boards,
So what? Distributions don't need our help to turn on the options that are important to them. This is a ridiculous argument.
Quoted 5 lines
you can imagine why it's
disabled by default, but there's no reason it can't be ENABLED by default and turned off by a distribution, the same way it can't be enabled by default and turned off by YOU (compare and contrast having to manually select which board you want to build for every time).
This problem is solved with defconfigs. Kconfig options are supposed to make sense. Not all PowerPC systems are CHRP, therefore CHRP should not be enabled by default.
Quoted 3 lines
But, turning them all on would not matter. You would build a kernel for every one and a device tree for every one increasing your build time a bit for a default kernel,
Not really true. Having the default be disabled for specific platforms can make a big difference in compile time.
Quoted 2 lines
but you would be guaranteed to get a kernel
binary somewhere in the tree that would work on all of them :)
Again, not relevant. One giant kernel that works on a Freescale embedded system *and* an IBM mainframe is useless. No one would actually ever do that.
Quoted 1 line
Genesi, Manager, Developer Relations
Developer Relations, eh?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 20 lines · Timur Tabi
Quoted 2 lines · Matt Sealey
Because they are by far the historically most common configuration, and still in production as the defacto standard PowerPC system configuration.
Not really. PMAC systems are not being built any more. So that leaves CHRP.
Quoted 3 lines
IBM blades etc. with SLOF will boot up as a CHRP-ish system, as well as the Efika and Pegasos and anything else Genesi produces. Since Linux distributions generally do not support tiny embedded boards,
So what? Distributions don't need our help to turn on the options that are important to them. This is a ridiculous argument.
Quoted 5 lines
you can imagine why it's
disabled by default, but there's no reason it can't be ENABLED by default and turned off by a distribution, the same way it can't be enabled by default and turned off by YOU (compare and contrast having to manually select which board you want to build for every time).This problem is solved with defconfigs.
Kconfigoptions are supposed
...
Quoted 2 lines
Not really true. Having the default be disabled for specific platforms can make a big difference in compile time.
Notice that the defconfigs answer also applies here :)
Friendly,
Sven Luther
Quoted 4 lines · Sven Luther
Quoted 2 lines
Not really true. Having the default be disabled for specific platforms can make a big difference in compile time.
Notice that the defconfigs answer also applies here :)
Not really. In order for me to create a new defconfig for an embedded platform, I have to turn *off* CHRP *and* PMAC support, and then turn on whatever platform I want.
That's the point behind my patch. The default is on, so anyone creating a non-CHRP or non-PMAC platform has to do extra work.
And the argument that embedded platforms aren't as important as the exalted CHRP is bollocks. All platforms should be treated equally. And like I said earlier, PMAC platforms aren't even being built any more, so it's ridiculous to consider that the default.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 10 lines · Timur Tabi
Quoted 4 lines · Sven Luther
Quoted 2 lines
Not really true. Having the default be disabled for specific platforms can make a big difference in compile time.
Notice that the defconfigs answer also applies here :)
Not really. In order for me to create a new defconfig for an embedded platform, I have to turn *off* CHRP *and* PMAC support, and then turn on whatever platform I want.
Quoted 7 lines
That's the point behind my patch. The default is on, so anyone creating a non-CHRP or non-PMAC platform has to do extra work.
And the argument that embedded platforms aren't as important as the exalted CHRP is bollocks. All platforms should be treated equally. And like I said earlier, PMAC platforms aren't even being built any more, so it's ridiculous to consider that the default.
You just turn it on by default for 64bit and idsable it for 32bit :)
Friendly,
Sven Luther
Quoted 1 line · Sven Luther
You just turn it on by default for 64bit and idsable it for 32bit :)
That hack might work for now, but it will break once we have 64-bit embedded systems. Regardless, it doesn't address the core issue - there should be no default platform for PowerPC.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 3 lines · Timur Tabi
I'm waiting for someone to explain to me what's so special about CHRP and PMAC that these two platforms should be enabled by default, when all other PowerPC platforms are disabled by default.
Historically they have been the most important 32-bit platforms, along with PReP.
The problem with making all platforms default to N is that if you take the default values for all config options you end up with a config that won't build. So we want at least one platform to default to Y, and pmac has been as good a choice as any for that (and probably still is).
Paul.
Quoted 6 lines · Paul Mackerras
Quoted 3 lines · Timur Tabi
I'm waiting for someone to explain to me what's so special about CHRP and PMAC that these two platforms should be enabled by default, when all other PowerPC platforms are disabled by default.
Quoted 8 lines
Historically they have been the most important 32-bit platforms, along with PReP.
The problem with making all platforms default to N is that if you take the default values for all config options you end up with a config that won't build. So we want at least one platform to default to Y, and pmac has been as good a choice as any for that (and probably still is).
I've got no issue w/grandfathering CHRP or PMAC as default Y. However I DO NOT think we should default other platforms to 'Y' as that means updating configs will pick up platforms they dont want.
- k
Quoted 5 lines · Kumar Gala
Quoted 5 lines
The problem with making all platforms default to N is that if you take the default values for all config options you end up with a config that won't build. So we want at least one platform to default to Y, and pmac has been as good a choice as any for that (and probably still is).
Ok, I can accept that.
Quoted 3 lines
I've got no issue w/grandfathering CHRP or PMAC as default Y. However I DO NOT think we should default other platforms to 'Y' as that means updating configs will pick up platforms they dont want.
As far as I know, CHRP and PMAC are the only PowerPC platforms that default to Y.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 9 lines · Kumar Gala
Quoted 8 lines
Historically they have been the most important 32-bit platforms, along with PReP.
The problem with making all platforms default to N is that if you take the default values for all config options you end up with a config that won't build. So we want at least one platform to default to Y, and pmac has been as good a choice as any for that (and probably still is).
Quoted 3 lines
I've got no issue w/grandfathering CHRP or PMAC as default Y. However I DO NOT think we should default other platforms to 'Y' as that means updating configs will pick up platforms they dont want.
Ok. So Timur, please send a new patch on top of your previous one since I already merged it, that explicitely sets PMAC and CHRP to "n" in your defconfigs.
Ben.
Quoted 8 lines · Timur Tabi
Quoted 5 lines · Kumar Gala
Quoted 5 lines
The problem with making all platforms default to N is that if you take the default values for all config options you end up with a config that won't build. So we want at least one platform to default to Y, and pmac has been as good a choice as any for that (and probably still is).
Quoted 8 lines
Ok, I can accept that.
Quoted 3 lines
I've got no issue w/grandfathering CHRP or PMAC as default Y. However I DO NOT think we should default other platforms to 'Y' as that means updating configs will pick up platforms they dont want.
As far as I know, CHRP and PMAC are the only PowerPC platforms that default to Y.
There use to be PREP too I think :-)
Ben.
Quoted 5 lines · Matt Sealey
You do realise it's entirely possible to build a kernel which supports 50 different Freescale CPUs all in one?
Enabling CHRP, PMAC support *AND* non-CHRP platforms is possible in the same binary.
It's possible to build a kernel with 50 network drivers, too. That doesn't mean they should all be "default y". The kernel build takes long enough as is.
Quoted 2 lines
If you really want to build a single-cpu single-board kernel, disable CHRP and PMAC for those board configs,
If you really want to build a targets-everything kernel, then turn on everything. Go ahead and create a 6xx_defconfig that has support for everything enabled. But don't cause huge heaps of stuff to be enabled for everyone that does a "make oldconfig" with a config file that predates change d8267c1a36864fc30a2ce01f4349a8f2931ae741.
-Scott
Quoted 4 lines · Matt Sealey
Quoted 1 line
CHRP and PMAC aren't following the rules that everyone else is following. Why?
Because they are by far the historically most common configuration, and still in production as the defacto standard PowerPC system configuration.
So you could make an argument for it being turned on in arch/powerpc/defconfig, if we had one. That doesn't mean it should be "default y".
Quoted 3 lines
IBM blades etc. with SLOF will boot up as a CHRP-ish system, as well as the Efika and Pegasos and anything else Genesi produces. Since Linux distributions generally do not support tiny embedded boards,
What do distributions have to do with it? It's harder for distributions to set the options they want than for embedded developers?
Quoted 5 lines
you can imagine why it's
disabled by default, but there's no reason it can't be ENABLED by default and turned off by a distribution, the same way it can't be enabled by default and turned off by YOU (compare and contrast having to manually select which board you want to build for every time).
Likewise there's no reason that PMAC/CHRP can't be DISABLED by default, and turned on by YOU.
Quoted 3 lines
But, turning them all on would not matter. You would build a kernel for every one and a device tree for every one increasing your build time a bit for a default kernel,
s/a bit/a lot/
Quoted 2 lines
but you would be guaranteed to get a kernel
binary somewhere in the tree that would work on all of them :)
Really? Who do I go to for this guarantee, when there's no support for the hardware I'm trying to get to work? :-)
-Scott