Received: by 10.213.65.68 with SMTP id h4csp2320693imn; Mon, 2 Apr 2018 05:33:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx48DOthOxeP+M3qS+Siw+fyiMUXeAv3ESlYAClVWDPHTFgJ+1F8OGMRk1hoCej2UFrly6pbz X-Received: by 10.99.42.148 with SMTP id q142mr6188164pgq.425.1522672388907; Mon, 02 Apr 2018 05:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522672388; cv=none; d=google.com; s=arc-20160816; b=xz/O/nlkyGlnw1WpAAcVTd1OjL8YimcOR6YUcc5WLghCCI0lfFpAHwayWHPVpNVsiA 9vKNuhoRQXlkPLq98qIzGGLNtHOoRp7Nqvn06WpPBWzeC5uU2kNtOkfZgInuoOnOHrsE SNI/PtcrP7m9DBHdROKRKJf/OHm9U9m2KilsznVN2Furq2ZX21YZPMob2sUJ0D9iy6If bX9AkEj/2eEEuXf3vgoH8kIDO79UIAHD7JqWUj7hhRriB8MMzNGZndat7XoKroBzISIM JHlfS4TsChPlPLcun2wJzMle+mfBi7ONxDoK22rfeAEqg3tECUF+L2NaT4a0iZrM/klQ E1hQ== 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:arc-authentication-results; bh=DQfy0tMXDHJQbdKuMV/n9mqrkL47X1khIRA/2hoCRec=; b=RiBkuHCuRQnOPTvHDU+haRBGmW1QiNfc56d66SNnxrEz2uj2B1Y/d7JLUSKObEU3EN x5TH/Ugn9T61lSNgnHgBRh9PbF4AyWGR9AhKjkaJpweQN/caoCJKu6yNggIPdQn7OBd8 frHW9m+Cp7xsFHHl9tXAZRv80pG1U/jyr0drtbrQuqrJU2C4aL9LnYT9bm74Xb9aOWgo 1eOLeK5ssu90nKkJ73az5CZQN3LmoxLa2Sw2hl0IMBbkttV7woppja1HNx/39dIDRj8d LStIMJom3T9AFEuh5tu/c4tMARY5XmQPJI3RAJ8C4Q0aiMjaxg38QfoJjn9QY1DiR4SW HN1g== 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 t15si183974pfa.170.2018.04.02.05.32.54; Mon, 02 Apr 2018 05:33:08 -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 S1751418AbeDBMbp (ORCPT + 99 others); Mon, 2 Apr 2018 08:31:45 -0400 Received: from exmail.andestech.com ([59.124.169.137]:10932 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbeDBMbn (ORCPT ); Mon, 2 Apr 2018 08:31:43 -0400 Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id w32CQYoE097130; Mon, 2 Apr 2018 20:26:34 +0800 (GMT-8) (envelope-from alankao@andestech.com) Received: from atcsqa06.andestech.com (10.0.1.85) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Mon, 2 Apr 2018 20:31:39 +0800 From: Alan Kao To: Palmer Dabbelt , Albert Ou , "Peter Zijlstra" , Ingo Molnar , "Arnaldo Carvalho de Melo" , Alexander Shishkin , Jiri Olsa , "Namhyung Kim" , Alex Solomatnikov , "Jonathan Corbet" , , , CC: Alan Kao Subject: [PATCH 0/2] perf: riscv: Preliminary Perf Event Support on RISC-V Date: Mon, 2 Apr 2018 20:31:22 +0800 Message-ID: <1522672284-29593-1-git-send-email-alankao@andestech.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.1.85] X-DNSRBL: X-MAIL: ATCSQR.andestech.com w32CQYoE097130 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This implements the baseline PMU for RISC-V platforms. To ease future PMU portings, a guide is also written, containing perf concepts, arch porting practices and some hints. Changes in v2: - Fix the bug reported by Alex, which was caused by not sufficient initialization. Check https://lkml.org/lkml/2018/3/31/251 for the discussion. Alan Kao (2): perf: riscv: preliminary RISC-V support perf: riscv: Add Document for Future Porting Guide Documentation/riscv/pmu.txt | 249 +++++++++++++++++++ arch/riscv/Kconfig | 12 + arch/riscv/include/asm/perf_event.h | 76 +++++- arch/riscv/kernel/Makefile | 1 + arch/riscv/kernel/perf_event.c | 468 ++++++++++++++++++++++++++++++++++++ 5 files changed, 802 insertions(+), 4 deletions(-) create mode 100644 Documentation/riscv/pmu.txt create mode 100644 arch/riscv/kernel/perf_event.c -- 2.16.2