public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Denys Vlasenko <dvlasenk@redhat.com>, Ben Skeggs <bskeggs@redhat.com>
Cc: Stefan Huehner <stefan@huehner.org>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/nouveau/core: deinline nv_mask()
Date: Fri, 08 May 2015 08:14:15 -0400	[thread overview]
Message-ID: <554CA897.2000305@hurleysoftware.com> (raw)
In-Reply-To: <1430988589-9486-1-git-send-email-dvlasenk@redhat.com>

On 05/07/2015 04:49 AM, Denys Vlasenko wrote:
> Function compiles to 89 bytes of machine code.
> 466 callsites with this .config:
> http://busybox.net/~vda/kernel_config
> Size reduction:

Much of the cruft is related to calling iowriteX.

Ben,

Isn't subdev io always mmio? (iow, never to the 64k i/o space)


>    text      data      bss       dec     hex filename
> 82432426 22255384 20627456 125315266 77828c2 vmlinux.before
> 82426986 22255416 20627456 125309858 77813a2 vmlinux
> 
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Stefan Huehner <stefan@huehner.org>
> CC: Ben Skeggs <bskeggs@redhat.com>
> CC: David Airlie <airlied@linux.ie>
> CC: dri-devel@lists.freedesktop.org
> CC: linux-kernel@vger.kernel.org
> ---
>  drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 9 ++-------
>  drivers/gpu/drm/nouveau/nvkm/core/subdev.c         | 8 ++++++++
>  2 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
> index 6fdc391..261b7ff 100644
> --- a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
> +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
> @@ -109,11 +109,6 @@ nv_wr32(void *obj, u32 addr, u32 data)
>  	iowrite32_native(data, subdev->mmio + addr);
>  }
>  
> -static inline u32
> -nv_mask(void *obj, u32 addr, u32 mask, u32 data)
> -{
> -	u32 temp = nv_rd32(obj, addr);
> -	nv_wr32(obj, addr, (temp & ~mask) | data);
> -	return temp;
> -}
> +u32
> +nv_mask(void *obj, u32 addr, u32 mask, u32 data);
>  #endif
> diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
> index c5fb3a79..88331ea 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
> @@ -25,6 +25,14 @@
>  #include <core/device.h>
>  #include <core/option.h>
>  
> +u32
> +nv_mask(void *obj, u32 addr, u32 mask, u32 data)
> +{
> +	u32 temp = nv_rd32(obj, addr);
> +	nv_wr32(obj, addr, (temp & ~mask) | data);
> +	return temp;
> +}
> +
>  struct nvkm_subdev *
>  nvkm_subdev(void *obj, int idx)
>  {
> 


      reply	other threads:[~2015-05-08 12:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  8:49 [PATCH] drm/nouveau/core: deinline nv_mask() Denys Vlasenko
2015-05-08 12:14 ` Peter Hurley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554CA897.2000305@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dvlasenk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan@huehner.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox