lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_PT8HyLUi-tSNdXbJVJiVWV-f_io8gOabiPxDfDONEfKg@mail.gmail.com>
Date:   Mon, 8 Jul 2019 11:58:50 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Jack Xiao <Jack.Xiao@....com>,
        Jonathan Kim <Jonathan.Kim@....com>,
        Felix Kuehling <Felix.Kuehling@....com>,
        xinhui pan <xinhui.pan@....com>,
        LKML <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Emily Deng <Emily.Deng@....com>, Huang Rui <ray.huang@....com>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>, Evan Quan <evan.quan@....com>,
        Hawking Zhang <Hawking.Zhang@....com>,
        Rex Zhu <Rex.Zhu@....com>, Xiaojie Yuan <xiaojie.yuan@....com>
Subject: Re: [PATCH 1/2] amdgpu: make pmu support optional

On Mon, Jul 8, 2019 at 10:42 AM Arnd Bergmann <arnd@...db.de> wrote:
>
> When CONFIG_PERF_EVENTS is disabled, we cannot compile the pmu
> portion of the amdgpu driver:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:48:38: error: no member named 'hw' in 'struct perf_event'
>         struct hw_perf_event *hwc = &event->hw;
>                                      ~~~~~  ^
> drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:51:13: error: no member named 'attr' in 'struct perf_event'
>         if (event->attr.type != event->pmu->type)
>             ~~~~~  ^
> ...
>
> Use conditional compilation for this file.
>
> Fixes: 9c7c85f7ea1f ("drm/amdgpu: add pmu counters")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Applied this patch.

Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/Makefile        | 4 +++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++--
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 3a15a46b4ecb..3f5329906fce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -54,7 +54,9 @@ amdgpu-y += amdgpu_device.o amdgpu_kms.o \
>         amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \
>         amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \
>         amdgpu_gmc.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
> -       amdgpu_vm_sdma.o amdgpu_pmu.o amdgpu_discovery.o
> +       amdgpu_vm_sdma.o amdgpu_discovery.o
> +
> +amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o
>
>  # add asic specific block
>  amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 30989b455047..a02ccce7bf53 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2816,7 +2816,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>                 return r;
>         }
>
> -       r = amdgpu_pmu_init(adev);
> +       if (IS_ENABLED(CONFIG_PERF_EVENTS))
> +               r = amdgpu_pmu_init(adev);
>         if (r)
>                 dev_err(adev->dev, "amdgpu_pmu_init failed\n");
>
> @@ -2888,7 +2889,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
>         amdgpu_debugfs_regs_cleanup(adev);
>         device_remove_file(adev->dev, &dev_attr_pcie_replay_count);
>         amdgpu_ucode_sysfs_fini(adev);
> -       amdgpu_pmu_fini(adev);
> +       if (IS_ENABLED(CONFIG_PERF_EVENTS))
> +               amdgpu_pmu_fini(adev);
>         amdgpu_debugfs_preempt_cleanup(adev);
>         if (amdgpu_discovery)
>                 amdgpu_discovery_fini(adev);
> --
> 2.20.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ