Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752771AbdI3DcY (ORCPT ); Fri, 29 Sep 2017 23:32:24 -0400 Received: from mail-ua0-f176.google.com ([209.85.217.176]:54281 "EHLO mail-ua0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752591AbdI3DcX (ORCPT ); Fri, 29 Sep 2017 23:32:23 -0400 X-Google-Smtp-Source: AOwi7QBf6Ds2RcfMy45yC+TgyyDG3EtaxFx8OvLP1yYQ3gSqQr+HpaJPnk6Z3CbuE/gWaSDz+8aaYfmb08sd34FRrTQ= MIME-Version: 1.0 From: Luming Yu Date: Sat, 30 Sep 2017 11:32:21 +0800 Message-ID: Subject: [PATCH v1 9/9] early pt: early start intel processor trace in early boot To: LKML Content-Type: multipart/mixed; boundary="f403045e406412e61c055a5fca21" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4504 Lines: 68 --f403045e406412e61c055a5fca21 Content-Type: text/plain; charset="UTF-8" enable intel PT to trace kernel boot && runtime Signed-off-by: Luming Yu --f403045e406412e61c055a5fca21 Content-Type: application/octet-stream; name="0009-start-early-intel-processor-trace-in-early-boot.patch" Content-Disposition: attachment; filename="0009-start-early-intel-processor-trace-in-early-boot.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j86rhfy50 RnJvbSBlMzdiODZlZDJjNWFhOWNhZTlmNWMzYzFjNTQ4OTM0ODMyM2VlNDgxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMdW1pbmcgWXUgPGx1bWluZy55dUBpbnRlbC5jb20+CkRhdGU6 IEZyaSwgMjkgU2VwIDIwMTcgMjI6MTI6NTkgKzA4MDAKU3ViamVjdDogW1BBVENIIHYxIDkvOV0g ZWFybHkgcHQ6IGVhcmx5IHN0YXJ0IGludGVsIHByb2Nlc3NvciB0cmFjZSBpbiBlYXJseSBib290 CgplbmFibGUgaW50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