Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269558AbUI3W2x (ORCPT ); Thu, 30 Sep 2004 18:28:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269535AbUI3W2x (ORCPT ); Thu, 30 Sep 2004 18:28:53 -0400 Received: from mail0.scram.de ([195.226.127.110]:21258 "EHLO mail0.scram.de") by vger.kernel.org with ESMTP id S269558AbUI3WZx (ORCPT ); Thu, 30 Sep 2004 18:25:53 -0400 Date: Fri, 1 Oct 2004 00:25:29 +0200 (CEST) From: Jochen Friedrich X-X-Sender: jochen@localhost To: Roman Zippel , Linux Kernel Cc: Kars de Jong , Linux/m68k kernel mailing list Subject: Re: [PATCH 2.6] DIO driver model In-Reply-To: <415A0EE7.6020203@linux-m68k.org> Message-ID: References: <1096296495.2466.14.camel@kars.perseus.home> <415A0EE7.6020203@linux-m68k.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1744882227-1096583129=:3179" X-Spam-Report: * 2.2 DOMAIN_BODY BODY: Domain registration spam body * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.1 RCVD_IN_NJABL_DIALUP RBL: NJABL: dialup sender did non-local SMTP * [80.128.217.252 listed in dnsbl.njabl.org] * 0.1 RCVD_IN_DYNABLOCK RBL: Sent directly from dynamic IP address * [80.128.217.252 listed in dnsbl.sorbs.net] * 0.1 RCVD_IN_NJABL RBL: Received via a relay in dnsbl.njabl.org * [80.128.217.252 listed in dnsbl.njabl.org] * 0.1 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS * [80.128.217.252 listed in dnsbl.sorbs.net] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 65478 Lines: 1101 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323328-1744882227-1096583129=:3179 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi Roman, here is the updated patch for the driver model of the hp300 DIO bus. Thanks for your comments! Jochen drivers/dio/Makefile | 2 drivers/dio/dio-driver.c | 163 +++++++++++++++++++++++++++ drivers/dio/dio-sysfs.c | 77 +++++++++++++ drivers/dio/dio.c | 209 +++++++++++------------------------ drivers/net/Space.c | 3 drivers/net/hplance.c | 126 +++++++++------------ drivers/serial/8250_hp300.c | 259 +++++++++++++++++++++----------------------- drivers/video/hpfb.c | 122 +++++++++++--------- include/linux/dio.h | 155 +++++++++++++++++++++++--- 9 files changed, 697 insertions(+), 419 deletions(-) On Wed, 29 Sep 2004, Roman Zippel wrote: > Hi, > > Jochen Friedrich wrote: > > >>There seem to be some whitespace problems. Also, please set your indent > >>size to 8 (following the Linux kernel coding style described in > >>Documentation/CodingStyle). > > > > OK, done. I have it attached this time. Hopefully the whitespace problems > > are gone now. > > One more code style nitpick: Please change the if blocks to: > > if (...) { > ... > } else { > ... > } > > Otherwise it looks ok, although it might be better to post it once to > the kernel mailing list, as there there are the people who know better > the driver model. --8323328-1744882227-1096583129=:3179 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=patch U2lnbmVkLW9mZi1ieTogSm9jaGVuIEZyaWVkcmljaCA8am9jaGVuQHNjcmFt LmRlPg0KDQpkaWZmIC11cHJOIC1YIGRvbnRkaWZmIGxpbnV4LTIuNi5vcmln L2RyaXZlcnMvZGlvL01ha2VmaWxlIGxpbnV4LTIuNi9kcml2ZXJzL2Rpby9N YWtlZmlsZQ0KLS0tIGxpbnV4LTIuNi5vcmlnL2RyaXZlcnMvZGlvL01ha2Vm aWxlCTIwMDQtMDktMjYgMjE6MTE6MjIuMDAwMDAwMDAwICswMjAwDQorKysg bGludXgtMi42L2RyaXZlcnMvZGlvL01ha2VmaWxlCTIwMDQtMDktMjIgMTg6 MTg6MDQuMDAwMDAwMDAwICswMjAwDQpAQCAtMiw0ICsyLDQ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AgICAgICAgICAgICAgICAgICAvKiBo YXMgdGhpcyBib2FyZCBiZWVuIGNvbmZpZ3VyZWQ/ICovDQotICAgICAgICBp bnQgc2NvZGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBz ZWxlY3QgY29kZSBvZiB0aGlzIGJvYXJkICovDQotICAgICAgICBpbnQgaWQ7 ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBlbmNvZGVk IElEICovDQotICAgICAgICBjb25zdCBjaGFyICpuYW1lOw0KLX07DQotDQot c3RhdGljIHN0cnVjdCBkaW9ib2FyZCAqYmxpc3QgPSBOVUxMOw0KLQ0KLXN0 YXRpYyBpbnQgX19pbml0IGRpb19maW5kX3Nsb3coaW50IGRldmljZWlkKQ0K LXsNCi0JLyogQ2FsbGVkIHRvIGZpbmQgYSBESU8gZGV2aWNlIGJlZm9yZSB0 aGUgZnVsbCBidXMgc2NhbiBoYXMgcnVuLiAgQmFzaWNhbGx5DQotCSAqIG9u bHkgdXNlZCBieSB0aGUgY29uc29sZSBkcml2ZXIuDQorCS8qIENhbGxlZCB0 byBmaW5kIGEgRElPIGRldmljZSBiZWZvcmUgdGhlIGZ1bGwgYnVzIHNjYW4g aGFzIHJ1bi4NCisJICogT25seSB1c2VkIGJ5IHRoZSBjb25zb2xlIGRyaXZl ci4NCiAJICovDQogCWludCBzY29kZSwgaWQ7DQogCXVfY2hhciBwcmlkLCBz ZWNpZCwgaTsNCiAJbW1fc2VnbWVudF90IGZzOw0KIA0KLQlmb3IgKHNjb2Rl ID0gMDsgc2NvZGUgPCBESU9fU0NNQVg7IHNjb2RlKyspDQotCXsNCisJZm9y IChzY29kZSA9IDA7IHNjb2RlIDwgRElPX1NDTUFYOyBzY29kZSsrKSB7DQog CQl2b2lkICp2YTsNCiAJCXVuc2lnbmVkIGxvbmcgcGE7DQogDQpAQCAtMTQy LDggKzE0MCw3IEBAIHN0YXRpYyBpbnQgX19pbml0IGRpb19maW5kX3Nsb3co aW50IGRldmkNCiAJCWZzID0gZ2V0X2ZzKCk7DQogCQlzZXRfZnMoS0VSTkVM X0RTKTsNCiANCi0gICAgICAgICAgICAgICAgaWYgKGdldF91c2VyKGksICh1 bnNpZ25lZCBjaGFyICopdmEgKyBESU9fSURPRkYpKQ0KLQkJew0KKyAgICAg ICAgICAgICAgICBpZiAoZ2V0X3VzZXIoaSwgKHVuc2lnbmVkIGNoYXIgKil2 YSArIERJT19JRE9GRikpIHsNCiAJCQlzZXRfZnMoZnMpOw0KIAkJCWlmIChz Y29kZSA+PSBESU9JSV9TQ0JBU0UpDQogCQkJCWlvdW5tYXAodmEpOw0KQEAg LTE1MywxNiArMTUwLDEzIEBAIHN0YXRpYyBpbnQgX19pbml0IGRpb19maW5k X3Nsb3coaW50IGRldmkNCiAJCXNldF9mcyhmcyk7DQogCQlwcmlkID0gRElP X0lEKHZhKTsNCiANCi0gICAgICAgICAgICAgICAgaWYgKERJT19ORUVEU1NF Q0lEKHByaWQpKQ0KLSAgICAgICAgICAgICAgICB7DQorICAgICAgICAgICAg ICAgIGlmIChESU9fTkVFRFNTRUNJRChwcmlkKSkgew0KICAgICAgICAgICAg ICAgICAgICAgICAgIHNlY2lkID0gRElPX1NFQ0lEKHZhKTsNCiAgICAgICAg ICAgICAgICAgICAgICAgICBpZCA9IERJT19FTkNPREVfSUQocHJpZCwgc2Vj aWQpOw0KLSAgICAgICAgICAgICAgICB9DQotICAgICAgICAgICAgICAgIGVs c2UNCisgICAgICAgICAgICAgICAgfSBlbHNlDQogCQkJaWQgPSBwcmlkOw0K IA0KLQkJaWYgKGlkID09IGRldmljZWlkKQ0KLQkJew0KKwkJaWYgKGlkID09 IGRldmljZWlkKSB7DQogCQkJaWYgKHNjb2RlID49IERJT0lJX1NDQkFTRSkN CiAJCQkJaW91bm1hcCh2YSk7DQogCQkJcmV0dXJuIHNjb2RlOw0KQEAgLTE3 MiwzNSArMTY2LDMyIEBAIHN0YXRpYyBpbnQgX19pbml0IGRpb19maW5kX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gIH0N Ci0gICAgICAgICAgICAgICAgZWxzZQ0KLSAgICAgICAgICAgICAgICAgICAg ICAgIGItPmlkID0gcHJpZDsNCi0NCi0gICAgICAgICAgICAgICAgYi0+Y29u ZmlndXJlZCA9IDA7DQotICAgICAgICAgICAgICAgIGItPnNjb2RlID0gc2Nv ZGU7DQotICAgICAgICAgICAgICAgIGItPmlwbCA9IERJT19JUEwodmEpOw0K LSAgICAgICAgICAgICAgICBiLT5uYW1lID0gZGlvX2dldG5hbWUoYi0+aWQp Ow0KLSAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9JTkZPICJzZWxlY3Qg Y29kZSAlM2Q6IGlwbCAlZDogSUQgJTAyWCIsIGItPnNjb2RlLCBiLT5pcGws IHByaWQpOw0KKyAgICAgICAgICAgICAgICAgICAgICAgIGRldi0+aWQgPSBE SU9fRU5DT0RFX0lEKHByaWQsIHNlY2lkKTsNCisgICAgICAgICAgICAgICAg fSBlbHNlDQorICAgICAgICAgICAgICAgICAgICAgICAgZGV2LT5pZCA9IHBy aWQ7DQorDQorICAgICAgICAgICAgICAgIGRldi0+aXBsID0gRElPX0lQTCh2 YSk7DQorICAgICAgICAgICAgICAgIHN0cmNweShkZXYtPm5hbWUsZGlvX2dl dG5hbWUoZGV2LT5pZCkpOw0KKyAgICAgICAgICAgICAgICBwcmludGsoS0VS Tl9JTkZPICJzZWxlY3QgY29kZSAlM2Q6IGlwbCAlZDogSUQgJTAyWCIsIGRl di0+c2NvZGUsIGRldi0+aXBsLCBwcmlkKTsNCiAgICAgICAgICAgICAgICAg aWYgKERJT19ORUVEU1NFQ0lEKHByaWQpKQ0KICAgICAgICAgICAgICAgICAg ICAgICAgIHByaW50aygiOiUwMlgiLCBzZWNpZCk7DQotICAgICAgICAgICAg ICAgIHByaW50aygiOiAlc1xuIiwgYi0+bmFtZSk7DQorICAgICAgICAgICAg ICAgIHByaW50aygiOiAlc1xuIiwgZGV2LT5uYW1lKTsNCiANCiAJCWlmIChz Y29kZSA+PSBESU9JSV9TQ0JBU0UpDQogCQkJaW91bm1hcCh2YSk7DQotDQot ICAgICAgICAgICAgICAgIGItPm5leHQgPSBOVUxMOw0KLQ0KLSAgICAgICAg ICAgICAgICBpZiAoYnByZXYpDQotICAgICAgICAgICAgICAgICAgICAgICAg YnByZXYtPm5leHQgPSBiOw0KLSAgICAgICAgICAgICAgICBlbHNlDQotICAg ICAgICAgICAgICAgICAgICAgICAgYmxpc3QgPSBiOw0KLSAgICAgICAgICAg ICAgICBicHJldiA9IGI7DQorCQlkZXZpY2VfcmVnaXN0ZXIoJmRldi0+ZGV2 KTsNCisJCWRpb19jcmVhdGVfc3lzZnNfZGV2X2ZpbGVzKGRldik7DQogICAg ICAgICB9DQotDQogCXJldHVybiAwOw0KIH0NCiANCkBAIC0yNzgsNzcgKzI2 OCwxMiBAQCBzdWJzeXNfaW5pdGNhbGwoZGlvX2luaXQpOw0KICAqLw0KIHVu c2lnbmVkIGxvbmcgZGlvX3Njb2RldG9waHlzYWRkcihpbnQgc2NvZGUpDQog ew0KLSAgICAgICAgaWYgKHNjb2RlID49IERJT0lJX1NDQkFTRSkNCi0gICAg ICAgIHsNCisgICAgICAgIGlmIChzY29kZSA+PSBESU9JSV9TQ0JBU0UpIHsN CiAgICAgICAgICAgICAgICAgcmV0dXJuIChESU9JSV9CQVNFICsgKHNjb2Rl IC0gMTMyKSAqIERJT0lJX0RFVlNJWkUpOw0KLSAgICAgICAgfQ0KLSAgICAg ICAgZWxzZSBpZiAoc2NvZGUgPiBESU9fU0NNQVggfHwgc2NvZGUgPCAwKQ0K KyAgICAgICAgfSBlbHNlIGlmIChzY29kZSA+IERJT19TQ01BWCB8fCBzY29k ZSA8IDApDQogICAgICAgICAgICAgICAgIHJldHVybiAwOw0KICAgICAgICAg ZWxzZSBpZiAoRElPX1NDSU5IT0xFKHNjb2RlKSkNCiAgICAgICAgICAgICAg ICAgcmV0dXJuIDA7DQogDQogICAgICAgICByZXR1cm4gKERJT19CQVNFICsg c2NvZGUgKiBESU9fREVWU0laRSk7DQogfQ0KLQ0KLWludCBkaW9fc2NvZGV0 b2lwbChpbnQgc2NvZGUpDQotew0KLSAgICAgICAgc3RydWN0IGRpb2JvYXJk ICpiOw0KLSAgICAgICAgZm9yIChiID0gYmxpc3Q7IGI7IGIgPSBiLT5uZXh0 KQ0KLSAgICAgICAgICAgICAgICBpZiAoYi0+c2NvZGUgPT0gc2NvZGUpIA0K LSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KLQ0KLSAgICAgICAg aWYgKCFiKQ0KLSAgICAgICAgew0KLSAgICAgICAgICAgICAgICBwcmludGso S0VSTl9FUlIgImRpb19zY29kZXRvaXBsOiBiYWQgc2VsZWN0IGNvZGUgJWRc biIsIHNjb2RlKTsNCi0gICAgICAgICAgICAgICAgcmV0dXJuIDA7DQotICAg ICAgICB9DQotICAgICAgICBlbHNlDQotICAgICAgICAgICAgICAgIHJldHVy biBiLT5pcGw7DQotfQ0KLQ0KLWNvbnN0IGNoYXIgKmRpb19zY29kZXRvbmFt ZShpbnQgc2NvZGUpDQotew0KLSAgICAgICAgc3RydWN0IGRpb2JvYXJkICpi Ow0KLSAgICAgICAgZm9yIChiID0gYmxpc3Q7IGI7IGIgPSBiLT5uZXh0KQ0K LSAgICAgICAgICAgICAgICBpZiAoYi0+c2NvZGUgPT0gc2NvZGUpIA0KLSAg ICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KLQ0KLSAgICAgICAgaWYg KCFiKQ0KLSAgICAgICAgew0KLSAgICAgICAgICAgICAgICBwcmludGsoS0VS Tl9FUlIgImRpb19zY29kZXRvbmFtZTogYmFkIHNlbGVjdCBjb2RlICVkXG4i LCBzY29kZSk7DQotICAgICAgICAgICAgICAgIHJldHVybiBOVUxMOw0KLSAg ICAgICAgfQ0KLSAgICAgICAgZWxzZQ0KLSAgICAgICAgICAgICAgICByZXR1 cm4gYi0+bmFtZTsNCi19DQotDQotdm9pZCBkaW9fY29uZmlnX2JvYXJkKGlu dCBzY29kZSkNCi17DQotICAgICAgICBzdHJ1Y3QgZGlvYm9hcmQgKmI7DQot ICAgICAgICBmb3IgKGIgPSBibGlzdDsgYjsgYiA9IGItPm5leHQpDQotICAg ICAgICAgICAgICAgIGlmIChiLT5zY29kZSA9PSBzY29kZSkNCi0gICAgICAg ICAgICAgICAgICAgICAgICBicmVhazsNCi0NCi0gICAgICAgIGlmICghYikg DQotICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX0VSUiAiZGlvX2NvbmZp Z19ib2FyZDogYmFkIHNlbGVjdCBjb2RlICVkXG4iLCBzY29kZSk7DQotICAg ICAgICBlbHNlIGlmIChiLT5jb25maWd1cmVkKQ0KLSAgICAgICAgICAgICAg ICBwcmludGsoS0VSTl9XQVJOSU5HICJkaW9fY29uZmlnX2JvYXJkOiBib2Fy ZCBhdCBzZWxlY3QgY29kZSAlZCBhbHJlYWR5IGNvbmZpZ3VyZWRcbiIsIHNj b2RlKTsNCi0gICAgICAgIGVsc2UNCi0gICAgICAgICAgICAgICAgYi0+Y29u ZmlndXJlZCA9IDE7DQotfQ0KLQ0KLXZvaWQgZGlvX3VuY29uZmlnX2JvYXJk KGludCBzY29kZSkNCi17DQotICAgICAgICBzdHJ1Y3QgZGlvYm9hcmQgKmI7 DQotICAgICAgICBmb3IgKGIgPSBibGlzdDsgYjsgYiA9IGItPm5leHQpDQot ICAgICAgICAgICAgICAgIGlmIChiLT5zY29kZSA9PSBzY29kZSkgDQotICAg ICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQotDQotICAgICAgICBpZiAo IWIpIA0KLSAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9FUlIgImRpb191 bmNvbmZpZ19ib2FyZDogYmFkIHNlbGVjdCBjb2RlICVkXG4iLCBzY29kZSk7 DQotICAgICAgICBlbHNlIGlmICghYi0+Y29uZmlndXJlZCkNCi0gICAgICAg ICAgICAgICAgcHJpbnRrKEtFUk5fV0FSTklORyAiZGlvX3VuY29uZmlnX2Jv YXJ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lc291cmNlLmVuZC1kLT5yZXNvdXJjZS5z dGFydCwgZC0+bmFtZSkpDQorCQlyZXR1cm4gLUVCVVNZOw0KIA0KIAlTRVRf TU9EVUxFX09XTkVSKGRldik7DQogICAgICAgICANCi0gICAgICAgIC8qIElz bid0IERJTyBuaWNlPyAqLw0KLSAgICAgICAgZm9yKDs7KQ0KLSAgICAgICAg ew0KLSAgICAgICAgICAgICAgICBpbnQgc2NvZGUgPSBkaW9fZmluZChESU9f SURfTEFOKTsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0K LSAgICAgICAgICAgICAgICBpZiAoc2NvZGUgPCAwKQ0KLSAgICAgICAgICAg ICAgICAgICAgICAgIGJyZWFrOw0KLSAgICAgICAgICAgICAgICANCi0JCWRp b19jb25maWdfYm9hcmQoc2NvZGUpOw0KLSAgICAgICAgICAgICAgICBocGxh bmNlX2luaXQoZGV2LCBzY29kZSk7DQotCQlpZiAoIXJlZ2lzdGVyX25ldGRl dihkZXYpKSB7DQotI2lmZGVmIE1PRFVMRQ0KLQkJCXN0cnVjdCBocGxhbmNl X3ByaXZhdGUgKmxwID0gbmV0ZGV2X3ByaXYoZGV2KTsNCi0JCQlscC0+bmV4 dF9tb2R1bGUgPSByb290X2hwbGFuY2VfZGV2Ow0KLQkJCXJvb3RfaHBsYW5j ZV9kZXYgPSBscDsNCi0jZW5kaWYNCi0JCQlyZXR1cm4gZGV2Ow0KLQkJfQ0K LQkJY2xlYW51cF9jYXJkKGRldik7DQotICAgICAgICB9DQorCWhwbGFuY2Vf aW5pdChkZXYsIGQpOw0KKwllcnIgPSByZWdpc3Rlcl9uZXRkZXYoZGV2KTsN CisJaWYgKGVycikgew0KKwkJZnJlZV9uZXRkZXYoZGV2KTsNCisJCXJldHVy biBlcnI7DQorCX0NCisJZGlvX3NldF9kcnZkYXRhKGQsIGRldik7DQorCXJl dHVybiAwOw0KK30NCisNCitzdGF0aWMgdm9pZCBfX2RldmV4aXQgaHBsYW5j ZV9yZW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ZSk7DQorICAgICAgICBwcmludGsoS0VSTl9JTkZPICIlczog JXM7IHNlbGVjdCBjb2RlICVkLCBhZGRyIiwgZGV2LT5uYW1lLCBkLT5uYW1l LCBkLT5zY29kZSk7DQogDQogICAgICAgICAvKiByZXNldCB0aGUgYm9hcmQg Ki8NCiAgICAgICAgIG91dF84KHZhK0RJT19JRE9GRiwgMHhmZik7DQpAQCAt MTM2LDggKzEzMCw3IEBAIHN0YXRpYyB2b2lkIF9faW5pdCBocGxhbmNlX2lu aXQoc3RydWN0IG4NCiAgICAgICAgIGRldi0+c2V0X211bHRpY2FzdF9saXN0 ID0gJmxhbmNlX3NldF9tdWx0aWNhc3Q7DQogICAgICAgICBkZXYtPmRtYSA9 IDA7DQogICAgICAgICANCi0gICAgICAgIGZvciAoaT0wOyBpPDY7IGkrKykN Ci0gICAgICAgIHsNCisgICAgICAgIGZvciAoaT0wOyBpPDY7IGkrKykgew0K ICAgICAgICAgICAgICAgICAvKiBUaGUgTlZSQU0gaG9sZHMgb3VyIGV0aGVy bmV0IGFkZHJlc3MsIG9uZSBuaWJibGUgcGVyIGJ5dGUsDQogICAgICAgICAg ICAgICAgICAqIGF0IGJ5dGVzIE5WUkFNT0ZGKzEsMyw1LDcsOS4uLg0KICAg ICAgICAgICAgICAgICAgKi8NCkBAIC0xNDcsMTIgKzE0MCwxMiBAQCBzdGF0 aWMgdm9pZCBfX2luaXQgaHBsYW5jZV9pbml0KHN0cnVjdCBuDQogICAgICAg ICB9DQogICAgICAgICANCiAgICAgICAgIGxwID0gbmV0ZGV2X3ByaXYoZGV2 KTsNCi0gICAgICAgIGxwLT5sYW5jZS5uYW1lID0gKGNoYXIqKW5hbWU7ICAg ICAgICAgICAgICAgICAgIC8qIGRpc2NhcmRzIGNvbnN0LCBzaHV0IHVwIGdj YyAqLw0KKyAgICAgICAgbHAtPmxhbmNlLm5hbWUgPSAoY2hhciopZC0+bmFt ZTsgICAgICAgICAgICAgICAgLyogZGlzY2FyZHMgY29uc3QsIHNodXQgdXAg Z2NjICovDQogICAgICAgICBscC0+bGFuY2UuYmFzZSA9IHZhOw0KICAgICAg ICAgbHAtPmxhbmNlLmluaXRfYmxvY2sgPSAoc3RydWN0IGxhbmNlX2luaXRf YmxvY2sgKikodmEgKyBIUExBTkNFX01FTU9GRik7IC8qIENQVSBhZGRyICov DQogICAgICAgICBscC0+bGFuY2UubGFuY2VfaW5pdF9ibG9jayA9IDA7ICAg ICAgICAgICAgICAgICAvKiBMQU5DRSBhZGRyIG9mIHNhbWUgUkFNICovDQog ICAgICAgICBscC0+bGFuY2UuYnVzbWFzdGVyX3JlZ3ZhbCA9IExFX0MzX0JT V1A7ICAgICAgICAvKiB3ZSdyZSBiaWdlbmRpYW4gKi8NCi0gICAgICAgIGxw LT5sYW5jZS5pcnEgPSBkaW9fc2NvZGV0b2lwbChzY29kZSk7DQorICAgICAg ICBscC0+bGFuY2UuaXJxID0gZC0+aXBsOw0KICAgICAgICAgbHAtPmxhbmNl LndyaXRlcmFwID0gaHBsYW5jZV93cml0ZXJhcDsNCiAgICAgICAgIGxwLT5s YW5jZS53cml0ZXJkcCA9IGhwbGFuY2Vfd3JpdGVyZHA7DQogICAgICAgICBs cC0+bGFuY2UucmVhZHJkcCA9IGhwbGFuY2VfcmVhZHJkcDsNCkBAIC0xNjAs NyArMTUzLDYgQEAgc3RhdGljIHZvaWQgX19pbml0IGhwbGFuY2VfaW5pdChz dHJ1Y3Qgbg0KICAgICAgICAgbHAtPmxhbmNlLmxhbmNlX2xvZ190eF9idWZz ID0gTEFOQ0VfTE9HX1RYX0JVRkZFUlM7DQogICAgICAgICBscC0+bGFuY2Uu cnhfcmluZ19tb2RfbWFzayA9IFJYX1JJTkdfTU9EX01BU0s7DQogICAgICAg ICBscC0+bGFuY2UudHhfcmluZ19tb2RfbWFzayA9IFRYX1JJTkdfTU9EX01B U0s7DQotICAgICAgICBscC0+c2NvZGUgPSBzY29kZTsNCiAJcHJpbnRrKCIs IGlycSAlZFxuIiwgbHA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zOw0K KwlkaW9faWQgaWQ7DQorCWludCBzY29kZTsNCisJc3RydWN0IGRpb19kcml2 ZXIgKmRyaXZlcjsJLyogd2hpY2ggZHJpdmVyIGhhcyBhbGxvY2F0ZWQgdGhp cyBkZXZpY2UgKi8NCisJc3RydWN0IGRldmljZSBkZXY7CQkvKiBHZW5lcmlj IGRldmljZSBpbnRlcmZhY2UgKi8NCisJdTggaXBsOw0KKwljaGFyIG5hbWVb NjRdOw0KKwlzdHJ1Y3QgcmVzb3VyY2UgcmVzb3VyY2U7DQorfTsNCisNCisj ZGVmaW5lIHRvX2Rpb19kZXYobikgY29udGFpbmVyX29mKG4sIHN0cnVjdCBk aW9fZGV2LCBkZXYpDQorDQorICAgIC8qDQorICAgICAqICBESU8gYnVzDQor ICAgICAqLw0KKw0KK3N0cnVjdCBkaW9fYnVzIHsNCisJc3RydWN0IGxpc3Rf aGVhZCBkZXZpY2VzOyAgICAgICAgICAgLyogbGlzdCBvZiBkZXZpY2VzIG9u IHRoaXMgYnVzICovDQorCXVuc2lnbmVkIGludCBudW1fcmVzb3VyY2VzOyAg ICAgICAgIC8qIG51bWJlciBvZiByZXNvdXJjZXMgKi8NCisJc3RydWN0IHJl c291cmNlIHJlc291cmNlc1syXTsgICAgICAgLyogYWRkcmVzcyBzcGFjZSBy b3V0ZWQgdG8gdGhpcyBidXMgKi8NCisJc3RydWN0IGRldmljZSBkZXY7DQor CWNoYXIgbmFtZVsxMF07DQorfTsNCisNCitleHRlcm4gc3RydWN0IGRpb19i dXMgZGlvX2J1czsgICAgICAvKiBTaW5nbGUgRElPIGJ1cyAqLw0KK2V4dGVy biBzdHJ1Y3QgYnVzX3R5cGUgZGlvX2J1c190eXBlOw0KKw0KKyAgICAvKg0K KyAgICAgKiAgRElPIGRldmljZSBJRHMNCisgICAgICovDQorDQorc3RydWN0 IGRpb19kZXZpY2VfaWQgew0KKwlkaW9faWQgaWQ7ICAgICAgICAgICAgICAg ICAgICAvKiBEZXZpY2UgSUQgb3Ig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B4MDMgICAgICAg ICAgICAgICAgICAgICAgICAvKiBpbnRlcnJ1cHQgcHJpb3JpdHkgbGV2ZWwg Ki8NCi0jZGVmaW5lIERJT19TRUNJRE9GRiAgMHgxNSAgICAgICAgICAgICAg ICAgICAgICAgIC8qIHNlY29uZGFyeSBkZXZpY2UgSUQgKi8NCi0jZGVmaW5l IERJT0lJX1NJWkVPRkYgMHgxMDEgICAgICAgICAgICAgICAgICAgICAgIC8q IGRldmljZSBzaXplLCBESU8tSUkgb25seSAqLw0KLSNkZWZpbmUgRElPX1ZJ UkFERFJCQVNFIDB4ZjAwMDAwMDBVTCAgICAgICAgICAgICAgLyogdmlyIGFk ZHIgd2hlcmUgSU9zcGFjZSBpcyBtYXBwZWQgKi8NCisjZGVmaW5lIERJT19J RE9GRiAgICAgMHgwMSAgICAgICAgICAgICAvKiBwcmltYXJ5IGRldmljZSBJ RCAqLw0KKyNkZWZpbmUgRElPX0lQTE9GRiAgICAweDAzICAgICAgICAgICAg IC8qIGludGVycnVwdCBwcmlvcml0eSBsZXZlbCAqLw0KKyNkZWZpbmUgRElP X1NFQ0lET0ZGICAweDE1ICAgICAgICAgICAgIC8qIHNlY29uZGFyeSBkZXZp Y2UgSUQgKi8NCisjZGVmaW5lIERJT0lJX1NJWkVPRkYgMHgxMDEgICAgICAg ICAgICAvKiBkZXZpY2Ugc2l6ZSwgRElPLUlJIG9ubHkgKi8NCisjZGVmaW5l IERJT19WSVJBRERSQkFTRSAweGYwMDAwMDAwVUwgICAvKiB2aXIgYWRkciB3 aGVyZSBJT3NwYWNlIGlzIG1hcHBlZCAqLw0KIA0KICNkZWZpbmUgRElPX0JB U0UgICAgICAgICAgICAgICAgMHg2MDAwMDAgICAgICAgIC8qIHN0YXJ0IG9m IERJTyBzcGFjZSAqLw0KICNkZWZpbmUgRElPX0VORCAgICAgICAgICAgICAg ICAgMHgxMDAwMDAwICAgICAgIC8qIGVuZCBvZiBESU8gc3BhY2UgKi8NCkBA IC03OSw2ICsxNDI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 ZXIoZHJ2KTsNCisNCisJaWYgKHJjID4gMCkNCisJCXJldHVybiAwOw0KKw0K KwkvKiBpZmYgQ09ORklHX0hPVFBMVUcgYW5kIGJ1aWx0IGludG8ga2VybmVs LCB3ZSBzaG91bGQNCisJICogbGVhdmUgdGhlIGRyaXZlciBhcm91bmQgZm9y IGZ1dHVyZSBob3RwbHVnIGV2ZW50cy4NCisJICogRm9yIHRoZSBtb2R1bGUg Y2FzZSwgYSBob3RwbHVnIGRhZW1vbiBvZiBzb21lIHNvcnQNCisJICogc2hv dWxkIGxvYWQgYSBtb2R1bGUgaW4gcmVzcG9uc2UgdG8gYW4gaW5zZXJ0IGV2 ZW50LiAqLw0KKyNpZiBkZWZpbmVkKENPTkZJR19IT1RQTFVHKSAmJiAhZGVm aW5lZChNT0RVTEUpDQorCWlmIChyYyA9PSAwKQ0KKwkJcmV0dXJuIDA7DQor I2Vsc2UNCisJaWYgKHJjID09IDApDQorCQlyYyA9IC1FTk9ERVY7DQorI2Vu ZGlmDQorDQorCS8qIGlmIHdlIGdldCBoZXJlLCB3ZSBuZWVkIHRvIGNsZWFu IHVwIERJTyBkcml2ZXIgaW5zdGFuY2UNCisJICogYW5kIHJldHVybiBzb21l IHNvcnQgb2YgZXJyb3IgKi8NCisJZGlvX3VucmVnaXN0ZXJfZHJpdmVyKGRy dik7DQogDQorCXJldHVybiByYzsNCit9DQogDQogI2VuZGlmIC8qIF9fS0VS TkVMX18gKi8NCiAjZW5kaWYgLyogbmRlZiBfTElOVVhfRElPX0ggKi8NCg== --8323328-1744882227-1096583129=:3179-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/