All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [POWERPC] Xilinx: hwicap driver
Date: Fri, 08 Feb 2008 10:10:06 +0100	[thread overview]
Message-ID: <47AC1C6E.1090101@gmail.com> (raw)
In-Reply-To: <20080208021747.92253161805C@mail10-sin.bigfish.com>

On 02/08/2008 03:17 AM, Stephen Neuendorffer wrote:
> This includes code for new fifo-based xps_hwicap in addition to the
> older opb_hwicap, which has a significantly different interface.  The
> common code between the two drivers is largely shared.
> 
> Significant differences exists between this driver and what is
> supported in the EDK drivers.  In particular, most of the
> architecture-specific code for reconfiguring individual FPGA resources
> has been removed.  This functionality is likely better provided in a
> user-space support library.  In addition, read and write access is
> supported.  In addition, although the xps_hwicap cores support
> interrupt-driver mode, this driver only supports polled operation, in
> order to make the code simpler, and since the interrupt processing
> overhead is likely to slow down the throughput under Linux.
> 
> Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
> 
> Fixed to add mutexes, and a few style issues.
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> 
> The final update to xilinx_hwicap.h was missing.
> 
> fix some missing __user tags and incorrect section tags.
> convert semaphores to mutexes.
> make probed_devices re-entrancy and error condition safe.
> fix some backwards memcpys.
> some other minor cleanups.

Looks good to me.

> Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
> ---
[...]
> diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> new file mode 100644
> index 0000000..2caac31
> --- /dev/null
> +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> @@ -0,0 +1,923 @@
[...]
> +module_param(xhwicap_major, int, S_IRUGO);
> +module_param(xhwicap_minor, int, S_IRUGO);
> +
> +/* An array, which is set to true when the device is registered. */
> +static bool probed_devices[HWICAP_DEVICES];
> +static struct mutex icap_sem;

Just a sideway note, static DEFINE_MUTEX(icap_sem); and you don't need to 
runtime init it then.

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Slaby <jirislaby@gmail.com>
To: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Cc: grant.likely@secretlab.ca, linuxppc-dev@ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [POWERPC] Xilinx: hwicap driver
Date: Fri, 08 Feb 2008 10:10:06 +0100	[thread overview]
Message-ID: <47AC1C6E.1090101@gmail.com> (raw)
In-Reply-To: <20080208021747.92253161805C@mail10-sin.bigfish.com>

On 02/08/2008 03:17 AM, Stephen Neuendorffer wrote:
> This includes code for new fifo-based xps_hwicap in addition to the
> older opb_hwicap, which has a significantly different interface.  The
> common code between the two drivers is largely shared.
> 
> Significant differences exists between this driver and what is
> supported in the EDK drivers.  In particular, most of the
> architecture-specific code for reconfiguring individual FPGA resources
> has been removed.  This functionality is likely better provided in a
> user-space support library.  In addition, read and write access is
> supported.  In addition, although the xps_hwicap cores support
> interrupt-driver mode, this driver only supports polled operation, in
> order to make the code simpler, and since the interrupt processing
> overhead is likely to slow down the throughput under Linux.
> 
> Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
> 
> Fixed to add mutexes, and a few style issues.
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> 
> The final update to xilinx_hwicap.h was missing.
> 
> fix some missing __user tags and incorrect section tags.
> convert semaphores to mutexes.
> make probed_devices re-entrancy and error condition safe.
> fix some backwards memcpys.
> some other minor cleanups.

Looks good to me.

> Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
> ---
[...]
> diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> new file mode 100644
> index 0000000..2caac31
> --- /dev/null
> +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> @@ -0,0 +1,923 @@
[...]
> +module_param(xhwicap_major, int, S_IRUGO);
> +module_param(xhwicap_minor, int, S_IRUGO);
> +
> +/* An array, which is set to true when the device is registered. */
> +static bool probed_devices[HWICAP_DEVICES];
> +static struct mutex icap_sem;

Just a sideway note, static DEFINE_MUTEX(icap_sem); and you don't need to 
runtime init it then.


  reply	other threads:[~2008-02-08  9:10 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 20:08 Xilinx: hwicap driver comments Jiri Slaby
2008-02-07 20:34 ` Grant Likely
2008-02-07 21:10   ` Stephen Neuendorffer
2008-02-07 20:42 ` Andrew Morton
2008-02-07 20:54   ` Grant Likely
2008-02-07 21:21     ` Andrew Morton
2008-02-07 21:31       ` Grant Likely
2008-02-07 21:35         ` Stephen Neuendorffer
2008-02-07 21:53           ` Andrew Morton
2008-02-07 22:00             ` Stephen Neuendorffer
2008-02-07 21:40       ` Linus Torvalds
2008-02-07 21:25     ` Benjamin Herrenschmidt
2008-02-07 21:35   ` Josh Boyer
2008-02-07 22:11     ` Andrew Morton
2008-02-07 22:58       ` Josh Boyer
2008-02-07 21:17 ` Benjamin Herrenschmidt
2008-02-07 21:28   ` Jiri Slaby
2008-02-07 21:33     ` Benjamin Herrenschmidt
2008-02-07 21:35       ` Grant Likely
2008-02-07 22:31 ` Stephen Neuendorffer
2008-02-07 22:39   ` Jiri Slaby
2008-02-08  2:17 ` [PATCH] [POWERPC] Xilinx: hwicap driver Stephen Neuendorffer
2008-02-08  2:17   ` Stephen Neuendorffer
2008-02-08  9:10   ` Jiri Slaby [this message]
2008-02-08  9:10     ` Jiri Slaby
2008-02-08 16:49   ` Randy Dunlap
2008-02-08 16:49     ` Randy Dunlap
2008-02-08 17:08 ` Xilinx: hwicap driver comments Stephen Neuendorffer
     [not found] <1201890163-12219-1-git-send-email-stephen.neuendorffer@xilinx.com>
2008-02-01 20:03 ` [PATCH] [POWERPC] Xilinx: hwicap driver Stephen Neuendorffer
2008-02-01 20:11   ` Grant Likely
2008-02-01 21:12     ` Stephen Neuendorffer
     [not found]     ` <1201900363-25230-1-git-send-email-stephen.neuendorffer@xilinx.com>
2008-02-05  0:38       ` Stephen Neuendorffer
     [not found] <1201805233-15112-1-git-send-email-stephen.neuendorffer@xilinx.com>
2008-02-01  1:02 ` Stephen Neuendorffer
2008-02-01  5:21   ` Grant Likely
     [not found] ` <1201827769-7439-1-git-send-email-stephen.neuendorffer@xilinx.com>
2008-02-01  5:01   ` Stephen Neuendorffer
2008-02-01  5:56     ` Nathan Lynch
2008-02-01 17:31       ` Stephen Neuendorffer
2008-02-01 18:22   ` Stephen Neuendorffer
2008-02-01 18:42     ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2007-12-05 12:20 [PATCH] [XILINX][HWICAP] Xilinx Internal Configuration Access Port device driver Peter Korsgaard
2008-01-31 18:47 ` [PATCH] [POWERPC] Xilinx: hwicap driver Stephen Neuendorffer
2008-01-31 19:58   ` Grant Likely
2008-01-31 22:39     ` Stephen Neuendorffer
2008-01-31 23:12       ` Grant Likely
2008-01-31 23:51         ` Stephen Neuendorffer

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=47AC1C6E.1090101@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=stephen.neuendorffer@xilinx.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.