Xbox Linux kernel for 2.6.21-rc2 working too

"Ronald C.F. Antony" <[email protected]> Sat, 3 Mar 2007 13:21:56 -0500
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <[email protected]>
--===============0916573917==
Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-66--782085828;
	protocol="application/pkcs7-signature"


--Apple-Mail-66--782085828
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Subject says it all.

One question, though, that I don't get. In the kernel configuration's  
"Processor type and features" section, the "Math emulation" help  
states this:


> CONFIG_MATH_EMULATION:
>
> Linux can emulate a math coprocessor (used for floating point  
> operations) if you don't have one. 486DX and Pentium processors  
> have a math coprocessor built in, 486SX and 386 do not, unless you  
> added a 487DX or 387, respectively. (The messages during boot time  
> can give you some hints here ["man dmesg"].) Everyone needs either  
> a coprocessor or this emulation.
>
> If you don't have a math coprocessor, you need to say Y here; if  
> you say Y here even though you have a coprocessor, the coprocessor  
> will be used nevertheless. (This behavior can be changed with the  
> kernel command line option "no387", which comes handy if your  
> coprocessor is broken. Try "man bootparam" or see the documentation  
> of your boot loader (lilo or loadlin) about how to pass options to  
> the kernel at boot time.) This means that it is a good idea to say  
> Y here if you intend to use this kernel on different machines.
>
> More information about the internals of the Linux math coprocessor  
> emulation can be found in <file:arch/i386/math-emu/README>.
>
> If you are not sure, say Y; apart from resulting in a 66 KB  
> biggerkernel, it won't hurt.
>
> Symbol: MATH_EMULATION [=y]
> Prompt: Math emulation
> 	Defined at arch/i386/Kconfig:676
> 	Location:
> 		-> Processor type and features

So if Linux automatically uses a math processor, if present, unless  
told to do so otherwise, then why on the one hand does the arch/i386/ 
Makefile specify in the standard kernel the -msoft-float compiler  
flag, and why do we bother removing it for the xbox if the standard  
kernel decides it's important to have that option?

I mean, either the kernel does the right thing, even with this  
option, and uses the coprocessor if present, or it doesn't. Somehow,  
this seems somewhat contradictory to me.

I then googled on the subject, and found this here:

http://uwsg.iu.edu/hypermail/linux/kernel/0409.1/2266.html

> On Wed, Sep 15, 2004 at 02:14:18AM +0600, Denis Zaitsev wrote:
>> Why this kernel is always compiled with the FP emulation for x86?
>> This is the line from the beginning of arch/i386/Makefile:
>>
>>  CFLAGS += -pipe -msoft-float
>>
>>  And it's hardcoded, it does not depend on CONFIG_MATH_EMULATION. So,
>>  is this just a typo or not?
>
> It catches bogus attempts to use floating point in the kernel by
> making them error at link-time.

So does this mean the kernel is not supposed to use floating point at  
all, and the -msoft-float forces the compiled to create references to  
libraries, which then aren't linked and hence cause a link error to  
catch this problem?

If so, shouldn't we stop patching this, and leave the -msoft-float  
compiler flag where it is and reduce the size of the xbox-linux  
kernel patch a bit?

Ronald
--Apple-Mail-66--782085828
Content-Transfer-Encoding: base64
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Disposition: attachment;
	filename=smime.p7s

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGSTCCAwIw
ggJroAMCAQICEF3Jp0yEGdv1n319+krhAD8wDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA3MDExNTEwNDYyMloXDTA4MDExNTEwNDYy
MlowRDEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEhMB8GCSqGSIb3DQEJARYScmNm
YUBjdWJpY3VsdW0uY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxtjBtHMQjA4v
PSE6LrmTUVjE2WD5BP9cvJ/fMgRcxas4A0Lh569iAxKU5DXK9O51qm9hsWFFZqa6ZqUB5yyVZVD6
I9Cc4HMQZIHz4FiSz2QjFxGWJoZRVhnJofcp7ojr1+8NERTuP7kr4yEc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IElzc3VpbmcgQ0ECEF3Jp0yEGdv1n319+krhAD8wgYcGCyqGSIb3DQEJEAIL
MXigdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRk
LjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEF3Jp0yEGdv1
n319+krhAD8wDQYJKoZIhvcNAQEBBQAEggEANBYdfFMiETsOR3SXiYfgipWIQ11+UhHvDwbbk5pI
gkhG8HfRk30CnkRirsBkXQWkW3eMmBeMfdUrhkV0dARCRv0+Y0AoLDDhn1SnMtWQDWUSBGu2pHU+
KFyXlXNaqwU4J98r06PsEXrZ7SaKJ9wzs3N63SrmWK50/GhyWdCxQWsZvhkovPAl59h6tckjBD5o
VohxWEdFh0Ffvf9i5mgDO8aPBWbA8JSKyJPmV3anRqQPtoXflIhsG8vMyWbm09AQ5AwXIPGuwE0W
yzT7yQ2SBDsxia87l2SYjlHPP7EteK2K5lJmQvz9Rz1kReJhLQfb6MbbIZtGXM4zZwL90FVjRgAA
AAAAAA==

--Apple-Mail-66--782085828--


--===============0916573917==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--===============0916573917==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xbox-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbox-linux-devel

--===============0916573917==--