Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2015 11:59:09 +0000
From:      "zbb (Zbigniew Bodek)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Updated, 1, 026 lines] D2377: Introduce ARM GICv3 support
Message-ID:  <da8b1c7776e9b50d88b9b02f12c1bb97@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-piql4a7htwxjub743777-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-piql4a7htwxjub743777-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--b1_da8b1c7776e9b50d88b9b02f12c1bb97
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

zbb updated this revision to Diff 5255.

CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D2377?vs=5180&id=5255

REVISION DETAIL
  https://reviews.freebsd.org/D2377

AFFECTED FILES
  sys/arm64/arm64/gic_v3.c
  sys/arm64/arm64/gic_v3_fdt.c
  sys/arm64/arm64/gic_v3_reg.h
  sys/arm64/arm64/gic_v3_var.h
  sys/arm64/arm64/locore.S
  sys/arm64/include/armreg.h
  sys/conf/files.arm64

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: zbb, emaste, ian, imp, andrew, brueffer, joel, wblock
Cc: kostikbel, emaste, andrew, imp, freebsd-arm

--b1_da8b1c7776e9b50d88b9b02f12c1bb97
Content-Type: text/x-patch; charset=utf-8; name="D2377.5255.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="D2377.5255.patch"

ZGlmZiAtLWdpdCBhL3N5cy9jb25mL2ZpbGVzLmFybTY0IGIvc3lzL2NvbmYvZmlsZXMuYXJtNjQK
LS0tIGEvc3lzL2NvbmYvZmlsZXMuYXJtNjQKKysrIGIvc3lzL2NvbmYvZmlsZXMuYXJtNjQKQEAg
LTE4LDYgKzE4LDcgQEAKIGFybTY0L2FybTY0L2VsZl9tYWNoZGVwLmMJ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kaXN0X2luaXQoc3RydWN0IGdpY192M19zb2Z0YyAqc2MpCit7CisJaW50IGVycjsKKwlz
aXplX3QgaTsKKworCWVyciA9IGdpY192M19yZWRpc3RfZmluZChzYyk7CisJaWYgKGVycikKKwkJ
Z290byBlcnJvcjsKKworCWVyciA9IGdpY192M19yZWRpc3Rfd2FrZShzYyk7CisJaWYgKGVycikK
KwkJZ290byBlcnJvcjsKKworCS8qIERpc2FibGUgU1BJcyAqLworCWdpY19yX3dyaXRlKHNjLCA0
LCBHSUNSX1NHSV9CQVNFX1NJWkUgKyBHSUNSX0lDRU5BQkxFUjAsCisJICAgIEdJQ1JfSV9FTkFC
TEVSX1BQSV9NQVNLKTsKKwkvKiBFbmFibGUgU0dJcyAqLworCWdpY19yX3dyaXRlKHNjLCA0LCBH
SUNSX1NHSV9CQVNFX1NJWkUgKyBHSUNSX0lTRU5BQkxFUjAsCisJICAgIEdJQ1JfSV9FTkFCTEVS
X1NHSV9NQVNLKTsKKworCS8qIFNldCBwcmlvcml0eSBmb3IgU0dJcyBhbmQgUFBJcyAqLworCWZv
ciAoaSA9IDA7IGkgPD0gR0lDX0xBU1RfUFBJOyBpICs9IDQpIHsKKwkJZ2ljX3Jfd3JpdGUoc2Ms
IDQsIEdJQ1JfU0dJX0JBU0VfU0laRSArIEdJQ0RfSVBSSU9SSVRZUihpKSwKKwkJICAgIEdJQ19Q
UklPUklUWV9NQVgpOworCX0KKworCWdpY192M193YWl0X2Zvcl9yd3Aoc2MsIFJFRElTVCk7CisK
K2Vycm9yOgorCXJldHVybiAoZXJyKTsKK30KCg==


--b1_da8b1c7776e9b50d88b9b02f12c1bb97--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?da8b1c7776e9b50d88b9b02f12c1bb97>