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QorCQkJCQlvbWFwMV9jbGtfZGVueV9pZGxlKGNsay0+cGFyZW50KTsKKwkJfQorCisJCXJldCA9IGNsay0+ZW5hYmxlKGNsayk7CisKKwkJaWYgKHVubGlrZWx5KHJldCAhPSAwKSAmJiBjbGstPnBhcmVudCkgeworCQkJb21hcDFfY2xrX3VudXNlKGNsay0+cGFyZW50KTsKKwkJCWNsay0+dXNlY291bnQtLTsKKwkJfQorCX0KKworCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyB2b2lkIG9tYXAxX2Nsa191bnVzZShzdHJ1Y3QgY2xrICpjbGspCit7CisJaWYgKGNsay0+dXNlY291bnQgPiAwICYmICEoLS1jbGstPnVzZWNvdW50KSkgeworCQljbGstPmRpc2FibGUoY2xrKTsKKwkJaWYgKGxpa2VseShjbGstPnBhcmVudCkpIHsKKwkJCW9tYXAxX2Nsa191bnVzZShjbGstPnBhcmVudCk7CisJCQlpZiAoY2xrLT5mbGFncyAmIENMT0NLX05PX0lETEVfUEFSRU5UKQorCQkJCWlmICghY3B1X2lzX29tYXAyNHh4KCkpCisJCQkJCW9tYXAxX2Nsa19hbGxvd19pZGxlKGNsay0+cGFyZW50KTsKKwkJfQorCX0KK30KKworc3RhdGljIGludCBvbWFwMV9jbGtfZW5hYmxlKHN0cnVjdCBjbGsgKmNsaykKK3sKKwlfX3UxNiByZWd2YWwxNjsKKwlfX3UzMiByZWd2YWwzMjsKKworCWlmIChjbGstPmZsYWdzICYgQUxXQVlTX0VOQUJMRUQpCisJCXJldHVybiAwOworCisJaWYgKHVubGlrZWx5KGNsay0+ZW5hYmxlX3JlZyA9PSAwKSkgeworCQlwcmludGsoS0VSTl9FUlIgImNsb2NrLmM6IEVuYWJsZSBmb3IgJXMgd2l0aG91dCBlbmFibGUgY29kZVxuIiwKKwkJICAgICAgIGNsay0+bmFtZSk7CisJCXJldHVybiAwOworCX0KKworCWlmIChjbGstPmZsYWdzICYgRU5BQkxFX1JFR18zMkJJVCkgeworCQlpZiAoY2xr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ZWFrOworCisJCXByaW50ayhLRVJOX0lORk8gIkVFSDogRGV0ZWN0ZWQgUENJIGJ1cyBlcnJvciBvbiBkZXZpY2UgJXNcbiIsCisJCSAgICAgICBwY2lfbmFtZShldmVudC0+ZGV2KSk7CisKKwkJZWVoX3BhbmljIChldmVudC0+ZGV2LCBldmVudC0+c3RhdGUpOworCisJCWtmcmVlKGV2ZW50KTsKKwl9CisKKwlyZXR1cm4gMDsKK30KKworLyoqCisgKiBlZWhfdGhyZWFkX2xhdW5jaGVyCisgKgorICogQGR1bW15IC0gdW51c2VkCisgKi8KK3N0YXRpYyB2b2lkIGVlaF90aHJlYWRfbGF1bmNoZXIodm9pZCAqZHVtbXkpCit7CisJaWYgKGtlcm5lbF90aHJlYWQoZWVoX2V2ZW50X2hhbmRsZXIsIE5VTEwsIENMT05FX0tFUk5FTCkgPCAwKQorCQlwcmludGsoS0VSTl9FUlIgIkZhaWxlZCB0byBzdGFydCBFRUggZGFlbW9uXG4iKTsKK30KKworLyoqCisgKiBlZWhfc2VuZF9mYWlsdXJlX2V2ZW50IC0gZ2VuZXJhdGUgYSBQQ0kgZXJyb3IgZXZlbnQKKyAqIEBkZXYgcGNpIGRldmljZQorICoKKyAqIFRoaXMgcm91dGluZSBjYW4gYmUgY2FsbGVkIHdpdGhpbiBhbiBpbnRlcnJ1cHQgY29udGV4dDsKKyAqIHRoZSBhY3R1YWwgZXZlbnQgd2lsbCBiZSBkZWxpdmVyZWQgaW4gYSBub3JtYWwgY29udGV4dAorICogKGZyb20gYSB3b3JrcXVldWUpLgorICovCitpbnQgZWVoX3NlbmRfZmFpbHVyZV9ldmVudCAoc3RydWN0IGRldmljZV9ub2RlICpkbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgcGNpX2RldiAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBzdGF0ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdGltZV91bmF2YWlsKQorewor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51c2VycyA+IDApeworCWlmICh0b2RvLT51c2VycyA+IDApIHsKIAkJLyogZm9yIFZJUEEgYW5kIFJYSVAgbGltaXQgcmVmY291bnQgdG8gMSAqLwogCQlpZiAodG9kby0+dHlwZSAhPSBRRVRIX0lQX1RZUEVfTk9STUFMKQogCQkJdG9kby0+dXNlcnMgPSAxOwpAQCAtNjgyLDEyICs2OTQsMjIgQEAKIAkJaWYgKChhZGRyLT50eXBlID09IFFFVEhfSVBfVFlQRV9ERUxfQUxMX01DKSAmJgogCQkgICAgKHRtcC0+dHlwZSA9PSBRRVRIX0lQX1RZUEVfREVMX0FMTF9NQykpCiAJCQlyZXR1cm4gMDsKKwkJaWYgKGNhcmQtPm9wdGlvbnMubGF5ZXIyKSB7CisJCQlpZiAoKHRtcC0+dHlwZQk9PSBhZGRyLT50eXBlKQkmJgorCQkJICAgICh0bXAtPmlzX211bHRpY2FzdCA9PSBhZGRyLT5pc19tdWx0aWNhc3QpICYmCisJCQkgICAgKG1lbWNtcCgmdG1wLT5tYWMsICZhZGRyLT5tYWMsIAorCQkJCSAgICBPU0FfQUREUl9MRU4pID09IDApKSB7CisJCQkJZm91bmQgPSAxOworCQkJCWJyZWFrOworCQkJfQorCQkJY29udGludWU7CisJCX0gCSAKIAkJaWYgKCh0bXAtPnByb3RvICAgICAgICA9PSBRRVRIX1BST1RfSVBWNCkgICAgICYmCiAJCSAgICAoYWRkci0+cHJvdG8gICAgICAgPT0gUUVUSF9QUk9UX0lQVjQpICAgICAmJgogCQkgICAgKHRtcC0+dHlwZSAgICAgICAgID09IGFkZHItPnR5cGUpICAgICAgICAgJiYKIAkJICAgICh0bXAtPmlzX211bHRpY2FzdCA9PSBhZGRyLT5pc19tdWx0aWNhc3QpICYmCiAJCSAgICAodG1wLT51LmE0LmFkZHIgICAgPT0gYWRkci0+dS5hNC5hZGRyKSAgICAmJgotCQkgICAgKHRtcC0+dS5hNC5tYXNrICAgID09IGFkZHItPnUuYTQubWFzaykgICAgICApeworCQkgIC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