From owner-freebsd-net@FreeBSD.ORG Mon Nov 21 16:12:14 2011 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1936D1065673 for ; Mon, 21 Nov 2011 16:12:14 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C60878FC15 for ; Mon, 21 Nov 2011 16:12:13 +0000 (UTC) Received: by vbbfa15 with SMTP id fa15so4092891vbb.13 for ; Mon, 21 Nov 2011 08:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=nuMBwNbm5za1ZyX9bABQLE+S7yEdzRbVJH5GW8Ryr94=; b=ZdbJpfYXi5ZXvy63xs6CnsAITb8O3HTLqD918yAoCm0mdfcwOSH+0BfWzJTWkXBPXg aB2YMk06XsG0uRb3nJJM8F1ErEoqryAwDnp2KnsHWb/PBaYDEmhT/MQTXMa02KNGWTtW ryVNd4scnGCAZYdkYfVusLmtoQmVafzENQrS0= MIME-Version: 1.0 Received: by 10.52.34.211 with SMTP id b19mr15763736vdj.112.1321890556185; Mon, 21 Nov 2011 07:49:16 -0800 (PST) Received: by 10.52.101.132 with HTTP; Mon, 21 Nov 2011 07:49:16 -0800 (PST) Date: Mon, 21 Nov 2011 15:49:16 +0000 Message-ID: From: "Paul B. Mahol" To: net Content-Type: multipart/mixed; boundary=20cf3079bf3c088d6d04b240a1f2 Cc: Subject: [PATCH] ndis: safe fpu on amd64 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 16:12:14 -0000 --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 Y2FsbDEodm9pZCAqZm4sIHVpbnQ2NF90IGEpCit7CisJc3RydWN0IGZwdV9rZXJuX2N0eCBmcHVf Y3R4X3NhdmU7CisJdWludDY0X3QgcmV0OworCisJZnB1X2tlcm5fZW50ZXIoY3VydGhyZWFkLCAm ZnB1X2N0eF9zYXZlLCBGUFVfS0VSTl9OT1JNQUwpOworCXJldCA9IHg4Nl82NF9jYWxsMShmbiwg YSk7CisJZnB1X2tlcm5fbGVhdmUoY3VydGhyZWFkLCAmZ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