Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1389953
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V5 3/6] slimbus: Add messaging APIs to slimbus framework |
| Date | 2016-04-28 12:00 +0200 |
| Message-ID | <rsQTO-10l-47@gated-at.bofh.it> (permalink) |
| References | <rsHx8-1CG-3@gated-at.bofh.it> <rsHx9-1CG-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wednesday 27 April 2016 17:58:06 Sagar Dharia wrote:
> + ctrl->tx.base = dma_alloc_coherent(ctrl->dev.parent,
> + (ctrl->tx.sl_sz * ctrl->tx.n),
> + &ctrl->tx.phy, GFP_KERNEL);
> + if (!ctrl->tx.base) {
> + ret = -ENOMEM;
> + goto tx_alloc_failed;
> + }
This looks controller specific, and hints that some parts of the "common"
framework should actually be part of the controller driver instead.
In particular, the use of "ctrl->dev.parent" suggests that this should
have been allocated by the controller.
> @@ -162,6 +279,15 @@ struct slim_controller {
> struct slim_addrt *addrt;
> u8 num_dev;
> struct workqueue_struct *wq;
> + struct slim_val_inf *tid_tbl[SLIM_MAX_TIDS];
> + u8 last_tid;
> + spinlock_t txn_lock;
> + struct slim_ctrl_buf tx;
> + struct slim_ctrl_buf rx;
> + struct slim_pending *pending_wr;
> + struct semaphore tx_sem;
Please try to avoid the use of semaphores in new code.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V5 0/6] Introduce framework for SLIMbus device drivers Sagar Dharia <sdharia@codeaurora.org> - 2016-04-28 02:00 +0200
[PATCH V5 3/6] slimbus: Add messaging APIs to slimbus framework Sagar Dharia <sdharia@codeaurora.org> - 2016-04-28 02:00 +0200
Re: [PATCH V5 3/6] slimbus: Add messaging APIs to slimbus framework Arnd Bergmann <arnd@arndb.de> - 2016-04-28 12:00 +0200
[PATCH V5 6/6] slim: qcom: Add runtime-pm support using clock-pause feature Sagar Dharia <sdharia@codeaurora.org> - 2016-04-28 02:10 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Arnd Bergmann <arnd@arndb.de> - 2016-04-28 12:10 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Mark Brown <broonie@kernel.org> - 2016-04-28 14:00 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Arnd Bergmann <arnd@arndb.de> - 2016-04-28 14:40 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Mark Brown <broonie@kernel.org> - 2016-04-28 16:40 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Arnd Bergmann <arnd@arndb.de> - 2016-04-28 17:10 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Mark Brown <broonie@kernel.org> - 2016-04-28 18:50 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Arnd Bergmann <arnd@arndb.de> - 2016-04-28 19:00 +0200
Re: [PATCH V5 1/6] SLIMbus: Device management on SLIMbus Mark Brown <broonie@kernel.org> - 2016-04-29 13:20 +0200
csiph-web