Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp105144ima; Tue, 23 Oct 2018 20:34:55 -0700 (PDT) X-Google-Smtp-Source: AJdET5d7QqxnmUXb76bmfmsu/+7XcUvAQFcyZy9uc18+4FIZlZ3PAkhPMuEii1oQ2SAfCSv/M5Us X-Received: by 2002:a17:902:29e3:: with SMTP id h90-v6mr952210plb.158.1540352095369; Tue, 23 Oct 2018 20:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540352095; cv=none; d=google.com; s=arc-20160816; b=cPPgdoSqM3hNp1gDn/UviTMX4pSE3NQVQXhpJ22FhQDZh0+ncRZy2e0MVWVzoeu44p wsquJiMX31RqpSyrbWbRTaaurGhou8LKJ9pePOoBjNds4PI53eQYlsAXfjVk7Phqjzwf 4L+MwiAObabEcH43OQYzS1nnw3LslMPgVOMZNbWIJr7UHL8lo0+UQAhCYytYH/zBbwqQ koEEXudjXSVuSabh/QUQr324Ftgmn6S/I5DYHZBnNJ5fs3yBHsYNGG3jCq+NjMAJ39Qk tH4Ft6DmR+ufVilDSz2N1VW5wajeBW4mM2pbebvka48SXpMjXduLdro3M0Dn2Ql0CXw0 MAxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=lsX1PX1wxoGK65oJs4mKEr9i4enD8GOuhBxuqyg7VbM=; b=U1AMAR7GvXbLnIml3rBJR/aAvi3UL9j5vgSWFiKYBF4u3mMw6XfONIuiPgEQsNhTkH 6NFPVXfa7tiJMlm0dKHbuVCYYcm+j2uYPZqJG6dAThX96/2qdjBIsOkdF72fAu4GLjIb Kq1zaKmaAoUUkzfpQRdmT1XhnQ/zHZxLGd69lf2hduSUloGCL1v/nfujc3vwDU5zapWG gZqmhYK0YJzg39cfCQml5Y4FwkPCQPwFTKYNH4svSjkX1XKDuD0dromsvRorjMU+838s OzjKyGk3BDy1BZCmmsR/C6nI2nVKEp/mQK8hBAjtyhdYaoBx9Pj2j7m5oExK60YHDThQ Jmjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si3455317pgb.466.2018.10.23.20.34.39; Tue, 23 Oct 2018 20:34:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbeJXMAV (ORCPT + 99 others); Wed, 24 Oct 2018 08:00:21 -0400 Received: from 59-120-53-16.HINET-IP.hinet.net ([59.120.53.16]:34437 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725896AbeJXMAV (ORCPT ); Wed, 24 Oct 2018 08:00:21 -0400 Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id w9O3YOcU099551; Wed, 24 Oct 2018 11:34:24 +0800 (GMT-8) (envelope-from nickhu@andestech.com) Received: from atcsqa06.andestech.com (10.0.15.65) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Wed, 24 Oct 2018 11:32:56 +0800 From: Nickhu To: , , , , , , , , , , , , , , , , , , , , CC: Nickhu , Subject: [PATCH v3 0/4] nds32: Perf Support Date: Wed, 24 Oct 2018 11:32:36 +0800 Message-ID: X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.15.65] X-DNSRBL: X-MAIL: ATCSQR.andestech.com w9O3YOcU099551 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Sorry everyone, I forgot to add the version number of the patch set I just sent. These four commits are perf supporting for nds32. There are three perfomance counters in nds32, and each of them can counts different events. You can use 'perf list' to show the available events that can be used. Changes in V2: 1. Change the definition 'PFM_CTL_xxx' to array form. 2. Simplify the PMU driver. 3. Stop all counters when handling irq caused by performance counters overflow. 4. Rename the compatible string in devicetree. Changes in V3: Fix the typo in Documentation/devicetree/ bindings/nds32/pmu.txt. Nickhu (4): nds32: Fix bug in bitfield.h nds32: Perf porting nds32: Add perf call-graph support. nds32: Add document for NDS32 PMU. .../devicetree/bindings/nds32/pmu.txt | 17 + arch/nds32/Kconfig | 1 + arch/nds32/boot/dts/ae3xx.dts | 5 + arch/nds32/include/asm/Kbuild | 1 + arch/nds32/include/asm/bitfield.h | 4 +- arch/nds32/include/asm/perf_event.h | 16 + arch/nds32/include/asm/pmu.h | 386 +++++ arch/nds32/include/asm/stacktrace.h | 39 + arch/nds32/kernel/Makefile | 3 +- arch/nds32/kernel/perf_event_cpu.c | 1522 +++++++++++++++++ arch/nds32/mm/fault.c | 13 +- tools/include/asm/barrier.h | 2 + tools/perf/arch/nds32/Build | 1 + tools/perf/arch/nds32/util/Build | 1 + tools/perf/arch/nds32/util/header.c | 29 + tools/perf/pmu-events/arch/nds32/mapfile.csv | 15 + .../pmu-events/arch/nds32/n13/atcpmu.json | 290 ++++ 17 files changed, 2337 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/nds32/pmu.txt create mode 100644 arch/nds32/include/asm/perf_event.h create mode 100644 arch/nds32/include/asm/pmu.h create mode 100644 arch/nds32/include/asm/stacktrace.h create mode 100644 arch/nds32/kernel/perf_event_cpu.c create mode 100644 tools/perf/arch/nds32/Build create mode 100644 tools/perf/arch/nds32/util/Build create mode 100644 tools/perf/arch/nds32/util/header.c create mode 100644 tools/perf/pmu-events/arch/nds32/mapfile.csv create mode 100644 tools/perf/pmu-events/arch/nds32/n13/atcpmu.json -- 2.17.0