From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12D2CC433E6 for ; Mon, 31 Aug 2020 09:13:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D348F2098B for ; Mon, 31 Aug 2020 09:13:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PsaoZ3ia"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TXVz1iOI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D348F2098B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7ovoB8xlsKs6B896ZMsBRh8d37cHfLX7FwKIZNA7GGQ=; b=PsaoZ3ia5/f1M6p/eZXPa/grK 09Y2q4DWFmUaPaMERnQ1giQUfeYx2zqymmTJWrgP5/HhB3QG39uyIhiQS3siKz20tcEpUQLJHfE/6 9spEda4b86/lH1p7Z9mPNX9QWgc+iiWfzsbyfNRyIgqbVgiXfdlSiRXAVRJ8tblVamu48w0tLRy8F PVv8y2ew5IDA94beyNoc7KYFiJZNMgHucWRFfvlZHI1+9UIlZhFI0aSeQBUxuJIy2V7M9MM8fayou Gj1Kpf2yA0QWy1PuW5tZXa1zELCpZXVdW7vC2wRuHMznTwNBRX4UOnEy3RaFEFZVjHdknKBI7B2bH 5H3Q4sKLw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCfr1-0002os-Mu; Mon, 31 Aug 2020 09:11:55 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCfqs-0002mM-Uc for linux-arm-kernel@lists.infradead.org; Mon, 31 Aug 2020 09:11:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598865106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EfpC+AqfnpGwHjV0xVxdR1qwCrWSqJH9ydS92LDsoRI=; b=TXVz1iOIgBqXKqMd+bOWt0J5daGBwCb9j5w/ab5EtnJMh55A0XqW5p1WahU6HQW0KJjwKh t3hqtGMkrcN6Z9m7TWZ1vmicfHxIn6cb37oDwq4I/wP8DTL40EYzim3qs5MMVrqOf+nKLF f3AClVrfF3yAYd2kWVWN9NOaYzLYArY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-417-z0pltVqoNKGm9qCJLdt-fg-1; Mon, 31 Aug 2020 05:11:42 -0400 X-MC-Unique: z0pltVqoNKGm9qCJLdt-fg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4753D18A0F14; Mon, 31 Aug 2020 09:11:40 +0000 (UTC) Received: from krava (unknown [10.40.193.236]) by smtp.corp.redhat.com (Postfix) with SMTP id 110DB1002D4A; Mon, 31 Aug 2020 09:11:34 +0000 (UTC) Date: Mon, 31 Aug 2020 11:11:34 +0200 From: Jiri Olsa To: Rob Herring Subject: Re: [PATCH v2 5/9] libperf: Add support for user space counter access Message-ID: <20200831091134.GC406859@krava> References: <20200828205614.3391252-1-robh@kernel.org> <20200828205614.3391252-6-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200828205614.3391252-6-robh@kernel.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200831_051148_856629_C5871197 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ian Rogers , Peter Zijlstra , Catalin Marinas , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexander Shishkin , Raphael Gault , Ingo Molnar , honnappa.nagarahalli@arm.com, Jonathan Cameron , Namhyung Kim , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 28, 2020 at 02:56:10PM -0600, Rob Herring wrote: SNIP > > +void *perf_evsel__mmap(struct perf_evsel *evsel) > +{ > + int ret; > + struct perf_mmap *map; > + struct perf_mmap_param mp = { > + .mask = -1, > + .prot = PROT_READ | PROT_WRITE, > + }; > + > + if (FD(evsel, 0, 0) < 0) > + return NULL; > + > + map = zalloc(sizeof(*map)); > + if (!map) > + return NULL; > + > + perf_mmap__init(map, NULL, false, NULL); > + > + ret = perf_mmap__mmap(map, &mp, FD(evsel, 0, 0), 0); > + if (ret) { > + free(map); > + return NULL; > + } > + > + evsel->mmap = map; > + return map->base; > +} so this only maps first page, I think we should use different name and keep perf_evsel__mmap for some generic map with size perf_evsel__mmap_user perf_evsel__mmap_zero ...? not sure.. or we could add size argument jirka _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel