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]
Date:	Tue, 20 May 2014 18:16:48 +0200
From:	Marek Olšák <maraeo@...il.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org,
	"Deucher, Alexander" <alexander.deucher@....com>,
	akpm@...ux-foundation.org, Andi Kleen <ak@...ux.intel.com>,
	dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH 7/8] radeon: Out of line radeon_get_ib_value

I think the function should stay in the header file. It's used in
performance-critical code, so we want it to be inlined.

Marek

On Fri, May 16, 2014 at 11:43 PM, Andi Kleen <andi@...stfloor.org> wrote:
> From: Andi Kleen <ak@...ux.intel.com>
>
> Saves about 5k of text
>
>    text    data     bss     dec     hex filename
> 14080360        2008168 1507328 17595856        10c7dd0 vmlinux-before-radeon
> 14074978        2008168 1507328 17590474        10c68ca vmlinux-radeon
>
> Cc: alexander.deucher@....com
> Cc: dri-devel@...ts.freedesktop.org
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
>  drivers/gpu/drm/radeon/radeon.h        | 10 +---------
>  drivers/gpu/drm/radeon/radeon_device.c |  9 +++++++++
>  2 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 6852861..8cae409 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1032,15 +1032,7 @@ struct radeon_cs_parser {
>         struct ww_acquire_ctx   ticket;
>  };
>
> -static inline u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx)
> -{
> -       struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx];
> -
> -       if (ibc->kdata)
> -               return ibc->kdata[idx];
> -       return p->ib.ptr[idx];
> -}
> -
> +u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx);
>
>  struct radeon_cs_packet {
>         unsigned        idx;
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 0e770bb..1cbd171 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -112,6 +112,15 @@ bool radeon_is_px(struct drm_device *dev)
>         return false;
>  }
>
> +u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx)
> +{
> +       struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx];
> +
> +       if (ibc->kdata)
> +               return ibc->kdata[idx];
> +       return p->ib.ptr[idx];
> +}
> +
>  /**
>   * radeon_program_register_sequence - program an array of registers.
>   *
> --
> 1.9.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ