Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Nov 2011 15:49:16 +0000
From:      "Paul B. Mahol" <onemda@gmail.com>
To:        net <net@freebsd.org>
Subject:   [PATCH] ndis: safe fpu on amd64
Message-ID:  <CAPYw7P6eNFwFJn=7922hCD3Ajtjmtyp388onSyanUOCG=rQH8Q@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--20cf3079bf3c088d6d04b240a1f2
Content-Type: text/plain; charset=ISO-8859-1

Hi,

This patch should fix panic on amd64 when using ndis with drivers
which make use of fpu registers.

--20cf3079bf3c088d6d04b240a1f2
Content-Type: text/x-diff; charset=US-ASCII; name="fpu.diff"
Content-Disposition: attachment; filename="fpu.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: file0

ZGlmZiAtLWdpdCBhL3N5cy9jb21wYXQvbmRpcy9rZXJuX3dpbmRydi5jIGIvc3lzL2NvbXBhdC9u
ZGlzL2tlcm5fd2luZHJ2LmMKaW5kZXggNTU3Mjk4OC4uMWE5M2I1NCAxMDA2NDQKLS0tIGEvc3lz
L2NvbXBhdC9uZGlzL2tlcm5fd2luZHJ2LmMKKysrIGIvc3lzL2NvbXBhdC9uZGlzL2tlcm5fd2lu
ZHJ2LmMKQEAgLTU1LDYgKzU1LDkgQEAgX19GQlNESUQoIiRGcmVlQlNEJCIpOwogI2lmZGVmIF9f
aTM4Nl9fCiAjaW5jbHVkZSA8bWFjaGluZS9zZWdtZW50cy5oPgogI2VuZGlmCisjaWZkZWYgX19h
bWQ2NF9fCisjaW5jbHVkZSA8bWFjaGluZS9mcHUuaD4KKyNlbmRpZgogCiAjaW5jbHVkZSA8ZGV2
L3VzYi91c2IuaD4KIApAQCAtNjEzLDYgKzYxNiw4NiBAQCB3aW5kcnZfd3JhcChmdW5jLCB3cmFw
LCBhcmdjbnQsIGZ0eXBlKQogCiAJcmV0dXJuICgwKTsKIH0KKwordWludDY0X3QKK194ODZfNjRf
Y2FsbDEodm9pZCAqZm4sIHVpbnQ2NF90IG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GZuKSwgKHVpbnQ2NF90KShhKSwgKHVpbnQ2NF90KShiKSwJCVwKIAkodWludDY0X3Qp
KGMpLCAodWludDY0X3QpKGQpKQotI2RlZmluZQlNU0NBTEw1KGZuLCBhLCBiLCBjLCBkLCBlKQkJ
CQlcCi0JeDg2XzY0X2NhbGw1KChmbiksICh1aW50NjRfdCkoYSksICh1aW50NjRfdCkoYiksCQlc
CisjZGVmaW5lCU1TQ0FMTDUoZm4sIGEsIGIsIGMsIGQsIGUpCQkJCQlcCisJX3g4Nl82NF9jYWxs
NSgoZm4pLCAodWludDY0X3QpKGEpLCAodWludDY0X3QpKGIpLAkJXAogCSh1aW50NjRfdCkoYyks
ICh1aW50NjRfdCkoZCksICh1aW50NjRfdCkoZSkpCi0jZGVmaW5lCU1TQ0FMTDYoZm4sIGEsIGIs
IGMsIGQsIGUsIGYpCQkJCVwKLQl4ODZfNjRfY2FsbDYoKGZuKSwgKHVpbnQ2NF90KShhKSwgKHVp
bnQ2NF90KShiKSwJCVwKKyNkZWZpbmUJTVNDQUxMNihmbiwgYSwgYiwgYywgZCwgZSwgZikJCQkJ
CVwKKwlfeDg2XzY0X2NhbGw2KChmbiksICh1aW50NjRfdCkoYSksICh1aW50NjRfdCkoYiksCQlc
CiAJKHVpbnQ2NF90KShjKSwgKHVpbnQ2NF90KShkKSwgKHVpbnQ2NF90KShlKSwgKHVpbnQ2NF90
KShmKSkKIAogI2VuZGlmIC8qIF9fYW1kNjRfXyAqLwo=
--20cf3079bf3c088d6d04b240a1f2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPYw7P6eNFwFJn=7922hCD3Ajtjmtyp388onSyanUOCG=rQH8Q>