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] [day] [month] [year] [list]
Message-ID: <CADnq5_Pwc9U03+1=tKs2hxKVdqfwXOc14XRD=yeJCsc4=5NJtw@mail.gmail.com>
Date:   Wed, 13 Nov 2019 14:22:10 -0500
From:   Alex Deucher <alexdeucher@...il.com>
To:     Joe Perches <joe@...ches.com>
Cc:     yu kuai <yukuai3@...wei.com>,
        "Deucher, Alexander" <alexander.deucher@....com>,
        "Kuehling, Felix" <Felix.Kuehling@....com>,
        Christian Koenig <christian.koenig@....com>,
        Chunming Zhou <David1.Zhou@....com>,
        Dave Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Rex Zhu <Rex.Zhu@....com>,
        "Quan, Evan" <evan.quan@....com>, zhengbin <zhengbin13@...wei.com>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>, yi.zhang@...wei.com
Subject: Re: [PATCH 1/7] drm/amdgpu: remove set but not used variable
 'mc_shared_chmap' from 'gfx_v6_0.c' and 'gfx_v7_0.c'

On Wed, Nov 13, 2019 at 11:56 AM Joe Perches <joe@...ches.com> wrote:
>
> On Wed, 2019-11-13 at 20:44 +0800, yu kuai wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> >
> > drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c: In function
> > ‘gfx_v6_0_constants_init’:
> > drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c:1579:6: warning: variable
> > ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable]
> []
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> []
> > @@ -1678,7 +1678,6 @@ static void gfx_v6_0_constants_init(struct amdgpu_device *adev)
> >
> >       WREG32(mmBIF_FB_EN, BIF_FB_EN__FB_READ_EN_MASK | BIF_FB_EN__FB_WRITE_EN_MASK);
> >
> > -     mc_shared_chmap = RREG32(mmMC_SHARED_CHMAP);
>
> I do not know the hardware but frequently hardware like
> this has read ordering requirements and various registers
> can not be read in a random order.
>
> Does removing this read have no effect on the hardware?

There is no dependency.  It's safe.  Same thing below.

Alex

>
> >       adev->gfx.config.mc_arb_ramcfg = RREG32(mmMC_ARB_RAMCFG);
> >       mc_arb_ramcfg = adev->gfx.config.mc_arb_ramcfg;
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> []
> > @@ -4336,7 +4336,6 @@ static void gfx_v7_0_gpu_early_init(struct amdgpu_device *adev)
> >               break;
> >       }
> >
> > -     mc_shared_chmap = RREG32(mmMC_SHARED_CHMAP);
> >       adev->gfx.config.mc_arb_ramcfg = RREG32(mmMC_ARB_RAMCFG);
> >       mc_arb_ramcfg = adev->gfx.config.mc_arb_ramcfg;
>
> Same question.
>
> _______________________________________________
> 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