Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2015 16:31:21 +0000
From:      "zbb (Zbigniew Bodek)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Updated, 1, 030 lines] D2377: Introduce ARM GICv3 support
Message-ID:  <aa86d2b102d65d0b7ec96760f1e6406e@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_aa86d2b102d65d0b7ec96760f1e6406e
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

zbb updated this revision to Diff 5366.
This revision now requires review to proceed.

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

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, ian, andrew, emaste, imp, brueffer, joel, wblock
Cc: kostikbel, emaste, andrew, imp, freebsd-arm

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

ZGlmZiAtLWdpdCBhL3N5cy9jb25mL2ZpbGVzLmFybTY0IGIvc3lzL2NvbmYvZmlsZXMuYXJtNjQK
LS0tIGEvc3lzL2NvbmYvZmlsZXMuYXJtNjQKKysrIGIvc3lzL2NvbmYvZmlsZXMuYXJtNjQKQEAg
LTE5LDYgKzE5LDggQEAKIGFybTY0L2FybTY0L2VsZl9tYWN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
KHNjLCA0LCBHSUNSX1NHSV9CQVNFX1NJWkUgKyBHSUNEX0lQUklPUklUWVIoaSksCisJCSAgICBH
SUNfUFJJT1JJVFlfTUFYKTsKKwl9CisKKwlnaWNfdjNfd2FpdF9mb3JfcndwKHNjLCBSRURJU1Qp
OworCisJcmV0dXJuICgwKTsKK30KCg==


--b1_aa86d2b102d65d0b7ec96760f1e6406e--



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