You have a new message
Please confirm if you got my email.
Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion
On July 30, 2016 5:42:41 AM PDT, Arend van Spriel wrote: >+ Luis (again) ;-) > >On 29-07-16 08:13, Daniel Wagner wrote: >> On 07/28/2016 09:01 PM, Bjorn Andersson wrote: >>> On Thu 28 Jul 11:33 PDT 2016, Dmitry Torokhov wrote: >>> On Thu, Jul 28, 2016 at 09:55:11AM +0200, Daniel Wagner wrote: > From: Daniel Wagner > >>> [..] Do not quite like it... I'd rather asynchronous request give out a firmware status pointer that could be used later on. > >Excellent. Why not get rid of the callback function as well and have >fw_loading_wait() return result (0 = firmware available, < 0 = fail). >Just to confirm, you are proposing a new API function next to >request_firmware_nowait(), right? Yes, that would be a new API call. Maybe we could replace old API with the new at some point. pcu->fw_st = request_firmware_async(IMS_PCU_FIRMWARE_NAME, - pcu, - ims_pcu_process_async_firmware); >+ pcu); if (IS_ERR(pcu->fw_st)) return PTR_ERR(pcu->fw_st); err = fw_loading_wait(pcu->fw_st); > if (err) > return err; > > fw = fwstat_get_firmware(pcu->fw_st); > >Or whatever consistent prefix it is going to be. > >>> >>> In the remoteproc case (patch 6) this would clean up the code, >rather >>> than replacing the completion API 1 to 1. I like it! >> >> IIRC most drivers do it the same way. So request_firmware_async() >indeed >> would be good thing to have. Let me try that. > >While the idea behind this series is a good one I am wondering about >the >need for these drivers to use the asynchronous API. The historic reason >might be to avoid timeout caused by user-mode helper, but that may no >longer apply and these drivers could be better off using >request_firmware_direct(). Actually systems using this driver rely on usermode helper to provide necessary delay and load the firmware from storage once root partition is mounted. Converting to request_firmware_direct() would break them. Thanks. -- Dmitry
[PATCH 1/1] net: caif: use correct format specifier
%u is the wrong format specifier for int. size_t cannot be converted to int without possible loss of information. So leave the result as size_t and use %zu as format specifier. cf. Documentation/printk-formats.txt Signed-off-by: Heinrich Schuchardt --- drivers/net/caif/caif_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c index 4721948..3a529fb 100644 --- a/drivers/net/caif/caif_spi.c +++ b/drivers/net/caif/caif_spi.c @@ -185,8 +185,8 @@ static ssize_t print_frame(char *buf, size_t size, char *frm, /* Fast forward. */ i = count - cut; len += snprintf((buf + len), (size - len), - "--- %u bytes skipped ---\n", - (int)(count - (cut * 2))); + "--- %zu bytes skipped ---\n", + count - (cut * 2)); } if ((!(i % 10)) && i) { -- 2.8.1
Re: [RFC v0 7/8] Input: ims-pcu: use firmware_stat instead of completion
On July 30, 2016 9:58:17 AM PDT, "Luis R. Rodriguez" wrote: >On Sat, Jul 30, 2016 at 02:42:41PM +0200, Arend van Spriel wrote: >> + Luis (again) ;-) >> >> On 29-07-16 08:13, Daniel Wagner wrote: >> > On 07/28/2016 09:01 PM, Bjorn Andersson wrote: >> >> On Thu 28 Jul 11:33 PDT 2016, Dmitry Torokhov wrote: >> >> >> >>> On Thu, Jul 28, 2016 at 09:55:11AM +0200, Daniel Wagner wrote: >> From: Daniel Wagner >> >> >> [..] >> >>> >> >>> Do not quite like it... I'd rather asynchronous request give out >a >> >>> firmware status pointer that could be used later on. >> >> Excellent. Why not get rid of the callback function as well and have >> fw_loading_wait() return result (0 = firmware available, < 0 = fail). >> Just to confirm, you are proposing a new API function next to >> request_firmware_nowait(), right? > >If proposing new firmware_class patches please bounce / Cc me, I've >recently asked for me to be added to MAINTAINERS so I get these >e-mails as I'm working on a new flexible API which would allow us >to extend the firmware API without having to care about the old >stupid usermode helper at all. I am not sure why we started calling usermode helper "stupid". We only had to implement direct kernel firmware loading because udev/stsremd folks had "interesting" ideas how events should be handled; but having userspace to feed us data is not stupid. If we want to overhaul firmware loading support we need to figure out how to support case when a driver want to [asynchronously] request firmware/config/blob and the rest of the system is not ready. Even if we want kernel to do read/load the data we need userspace to tell kernel when firmware partition is available, until then the kernel should not fail the request. Thanks. -- Dmitry
[PATCH 1/1] dsa: b53: remove redundant if
For pdata == null the code leaves with an error. There is need to check the condition again. Signed-off-by: Heinrich Schuchardt --- drivers/net/dsa/b53/b53_mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c index 21f1068..77ffc43 100644 --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c @@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; - if (pdata) - dev->pdata = pdata; + dev->pdata = pdata; platform_set_drvdata(pdev, dev); -- 2.8.1
[PATCH] drm/i915: cleanup_plane_fb: also drop reference to current state wait_req
There are two paths into intel_cleanup_plane_fb, the normal completion path and the failure path. In the failure case, intel_cleanup_plane_fb is called before drm_atomic_helper_swap_state, so any wait_req reference made in intel_prepare_plane_fb will be in old_intel_state->wait_req. In the normal completion path, drm_atomic_helper_swap_state has already been called, so the plane state holding the just-used wait_req will not be in old_intel_state->wait_req, rather it will be in the state associated with the plane itself. Clearing this reference ensures that the wait_req will be freed as soon as it the related mode setting operation is complete, rather than waiting for some future mode setting operation to eventually dereference it. The existing dereference of old_intel_state->wait_req is still required as that will hold the wait_req when the mode setting operation fails. cc: Daniel Vetter cc: David Airlie cc: intel-...@lists.freedesktop.org cc: dri-de...@lists.freedesktop.org Signed-off-by: Keith Packard --- drivers/gpu/drm/i915/intel_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3074c56..dbabaf3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -13924,6 +13924,7 @@ intel_cleanup_plane_fb(struct drm_plane *plane, struct drm_device *dev = plane->dev; struct intel_plane *intel_plane = to_intel_plane(plane); struct intel_plane_state *old_intel_state; + struct intel_plane_state *intel_state = to_intel_plane_state(plane->state); struct drm_i915_gem_object *old_obj = intel_fb_obj(old_state->fb); struct drm_i915_gem_object *obj = intel_fb_obj(plane->state->fb); @@ -13941,6 +13942,7 @@ intel_cleanup_plane_fb(struct drm_plane *plane, (obj && !(obj->frontbuffer_bits & intel_plane->frontbuffer_bit))) i915_gem_track_fb(old_obj, obj, intel_plane->frontbuffer_bit); + i915_gem_request_assign(&intel_state->wait_req, NULL); i915_gem_request_assign(&old_intel_state->wait_req, NULL); } -- 2.8.1
[GIT PULL] sound updates for 4.8
Linus, please pull sound updates for 4.8 from: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.8-rc1 The topmost commit is 0984d159c8ad6618c6ebd9f00bc3f374fa52bc35 sound updates for 4.8 Majority of this update is about ASoC, including a few new drivers, and the rest are mostly minor changes. The only substantial change in ALSA core is about the additional error handling in the compress-offload API. Below are highlights: - Add the error propagating support in compress-offload API - HD-audio: a usual Dell headset fixup, an Intel HDMI/DP fix, and the default mixer setup change ot turn off the loopback - Lots of updates for ASoC Intel drivers, mostly board support and bug fixing, and to the NAU8825 driver - Work on generalizing bits of simple-card to allow more code sharing with the Renesas rsrc-card (which can't use simple-card due to DPCM) - Removal of the Odroid X2 driver due to replacement with simple-card - Support for several new Mediatek platforms and associated boards - New ASoC drivers for Allwinner A10, Analog Devices ADAU7002, Broadcom Cygnus, Cirrus Logic CS35L33 and CS53L30, Maxim MAX8960 and MAX98504, Realtek RT5514 and Wolfson WM8758 Adam Thomson (2): device property: Add function to search for named child of device ASoC: da7219: Convert driver to use generic device/fwnode functions Alan Cox (2): ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute Alexander Shiyan (1): ASoC: wm8753: Replace magic number Amitoj Kaur Chawla (9): sound: aedsp16: Change structure initialisation to C99 style ALSA: seq_oss: Change structure initialisation to C99 style ALSA: usb-audio: Change structure initialisation to C99 style ALSA: ctxfi: Change structure initialisation to C99 style ASoC: wm8753: Remove unneeded header file ALSA: riptide: Use DIV_ROUND_UP ASoC: Atmel: ClassD: Simplify use of devm_ioremap_resource ASoC: atmel-pdmic: Simplify use of devm_ioremap_resource sound: oss: Remove useless initialisation Andrea Gelmini (2): ASoC: dt: Fix typo ASoC: fsl: Fix typo Arnd Bergmann (13): ASoC: wm8985: add i2c dependency ASoC: fix ABE_TWL6040 dependency ASoC: cs53l30: include gpio/consumer.h ASoC: pcm1681/pcm1791: fix typo in declaration ASoC: rcar: fix 'const static' variables ASoC: remove one extraneous 'const' ASoC: nau8825: mark pm functions __maybe_unused ASoC fix up SND_SOC_WM8985 dependency sound: oss: avoid time_t usage ALSA: seq_timer: use monotonic times internally ASoC: dwc: make pcm support built-in when necessary ASoC: cs35l33: mark PM functions as __maybe_unused ALSA: ppc/awacs: shut up maybe-uninitialized warning Axel Lin (5): ASoC: cs35l33: Remove unnecessary free_irq call ASoC: cs35l33: Remove setting dapm->bias_level in cs35l33_set_bias_level ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional ASoC: cs35l33: Fix display revision id ASoC: rt5514-spi: Convert to use devm_* API Bard Liao (5): ASoC: rt5670: fix HP Playback Volume control ASoC: rt5670: patch reg-0x8a ASoC: rt5645: patch reg-0x8a ASoC: rt5645: set RT5645_PRIV_INDEX as volatile ASoC: rt5645: add DAC1 soft volume func control Bastien Nocera (1): ASoC: tlv320aix31xx: Add ACPI match for Lenovo 100S Ben Zhang (1): ASoC: Intel: Fix conflicting pcm dev drvdata on haswell Bhaktipriya Shridhar (1): ALSA: sh: aica: Remove deprecated create_workqueue Charles Keepax (12): ASoC: arizona: Add a notifier chain for CODEC events ASoC: arizona: Add event notification on voice trigger events ASoC: arizona: Tie SYSCLK to DRC signal activity widgets ASoC: arizona: Add voice trigger output widget ASoC: wm_adsp: Specifically propagate voice trigger event to caller ASoC: arizona: Add data structure for voice trigger notifier ASoC: arizona: Add a couple of missing consts ASoC: wm5102: Revert manual speaker enable ALSA: compress: Add function to indicate the stream has gone bad ASoC: wm_adsp: Use new snd_compr_stop_error to signal stream failure ASoC: wm_adsp: Treat missing compressed buffer as a fatal error ASoC: compress: Pass error out of soc_compr_pointer Chris Zhong (1): ASoC: rockchip: correct the spdif clk Clemens Gruber (1): ASoC: sgtl5000: Remove misleading comment Colin Ian King (5): SoC: dwc: trivial fix of spelling mistake "unsuppted" -> "unsupported" ASoC: samsung: fix spelling mistake: "unknwon" -> "unknown" ASoC: fsl_spdif: fix spelling mistake: "receivce" -> "receive"
[PATCH 1/1 linux-next] GFS2: remove inline on static in c file
Let compiler decide what to do with static functions Also fix the following checkpatch warnings: WARNING: line over 80 characters +static unsigned int gfs2_extent_length(void *start, unsigned int len, __be64 *ptr, size_t limit, int *eob) WARNING: Prefer 'unsigned int' to bare use of 'unsigned' +static void gfs2_update_stats(struct gfs2_lkstats *s, unsigned index, Inspired-by: "David S. Miller" Signed-off-by: Fabian Frederick --- fs/gfs2/bmap.c | 15 --- fs/gfs2/dir.c | 4 ++-- fs/gfs2/glock.c| 8 fs/gfs2/lock_dlm.c | 6 +++--- fs/gfs2/log.c | 6 +++--- fs/gfs2/quota.c| 4 ++-- fs/gfs2/rgrp.c | 12 ++-- fs/gfs2/xattr.c| 2 +- 8 files changed, 29 insertions(+), 28 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 6e2bec1..194a7dc 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -245,7 +245,7 @@ static void find_metapath(const struct gfs2_sbd *sdp, u64 block, } -static inline unsigned int metapath_branch_start(const struct metapath *mp) +static unsigned int metapath_branch_start(const struct metapath *mp) { if (mp->mp_list[0] == 0) return 2; @@ -262,7 +262,7 @@ static inline unsigned int metapath_branch_start(const struct metapath *mp) * metadata tree. */ -static inline __be64 *metapointer(unsigned int height, const struct metapath *mp) +static __be64 *metapointer(unsigned int height, const struct metapath *mp) { struct buffer_head *bh = mp->mp_bh[height]; unsigned int head_size = (height > 0) ? @@ -334,7 +334,7 @@ static int lookup_metapath(struct gfs2_inode *ip, struct metapath *mp) return ip->i_height; } -static inline void release_metapath(struct metapath *mp) +static void release_metapath(struct metapath *mp) { int i; @@ -360,7 +360,8 @@ static inline void release_metapath(struct metapath *mp) * Returns: The length of the extent (minimum of one block) */ -static inline unsigned int gfs2_extent_length(void *start, unsigned int len, __be64 *ptr, size_t limit, int *eob) +static unsigned int gfs2_extent_length(void *start, unsigned int len, + __be64 *ptr, size_t limit, int *eob) { const __be64 *end = (start + len); const __be64 *first = ptr; @@ -381,7 +382,7 @@ static inline unsigned int gfs2_extent_length(void *start, unsigned int len, __b return (ptr - first); } -static inline void bmap_lock(struct gfs2_inode *ip, int create) +static void bmap_lock(struct gfs2_inode *ip, int create) { if (create) down_write(&ip->i_rw_mutex); @@ -389,7 +390,7 @@ static inline void bmap_lock(struct gfs2_inode *ip, int create) down_read(&ip->i_rw_mutex); } -static inline void bmap_unlock(struct gfs2_inode *ip, int create) +static void bmap_unlock(struct gfs2_inode *ip, int create) { if (create) up_write(&ip->i_rw_mutex); @@ -397,7 +398,7 @@ static inline void bmap_unlock(struct gfs2_inode *ip, int create) up_read(&ip->i_rw_mutex); } -static inline __be64 *gfs2_indirect_init(struct metapath *mp, +static __be64 *gfs2_indirect_init(struct metapath *mp, struct gfs2_glock *gl, unsigned int i, unsigned offset, u64 bn) { diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index fcb59b2..8551eb0 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -400,12 +400,12 @@ void gfs2_dir_hash_inval(struct gfs2_inode *ip) kvfree(hc); } -static inline int gfs2_dirent_sentinel(const struct gfs2_dirent *dent) +static int gfs2_dirent_sentinel(const struct gfs2_dirent *dent) { return dent->de_inum.no_addr == 0 || dent->de_inum.no_formal_ino == 0; } -static inline int __gfs2_dirent_find(const struct gfs2_dirent *dent, +static int __gfs2_dirent_find(const struct gfs2_dirent *dent, const struct qstr *name, int ret) { if (!gfs2_dirent_sentinel(dent) && diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 3a90b2b..28885dd 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -185,7 +185,7 @@ void gfs2_glock_put(struct gfs2_glock *gl) * Returns: true if its ok to grant the lock */ -static inline int may_grant(const struct gfs2_glock *gl, const struct gfs2_holder *gh) +static int may_grant(const struct gfs2_glock *gl, const struct gfs2_holder *gh) { const struct gfs2_holder *gh_head = list_entry(gl->gl_holders.next, const struct gfs2_holder, gh_list); if ((gh->gh_state == LM_ST_EXCLUSIVE || @@ -296,7 +296,7 @@ restart: * @gl: the glock */ -static inline struct gfs2_holder *find_first_waiter(const struct gfs2_glock *gl) +static struct gfs2_holder *find_first_waiter(const struct gfs2_glock *gl) { struct gfs2_holder *gh; @@ -500,7 +500,7 @@ __acquires(&gl->gl_lockref.lock) * @gl: the glock */ -static inline struct gfs2_holder *find_first_holder(co
[PATCH 1/1] net: ethernet: ax88796: avoid null pointer dereference
If platform_get_resource fails, mem2 is null. Do not dereference null. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/8390/ax88796.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index 5698f53..39ca935 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -910,7 +910,8 @@ static int ax_probe(struct platform_device *pdev) iounmap(ax->map2); exit_mem2: - release_mem_region(mem2->start, mem2_size); + if (mem2) + release_mem_region(mem2->start, mem2_size); exit_mem1: iounmap(ei_local->mem); -- 2.8.1
[PATCH] drm: Don't prepare or cleanup unchanging frame buffers [v2]
When reconfiguring a plane position (as in moving the cursor), the frame buffer for the cursor isn't changing, so don't call the prepare or cleanup driver functions. This avoids making cursor position updates block on all pending rendering. v2: Track which planes have been prepared to know which to cleanup. Otherwise, failure paths and success paths would need different tests in the cleanup code as the plane state points to different places in the two cases. cc: dri-de...@lists.freedesktop.org cc: David Airlie Signed-off-by: Keith Packard --- drivers/gpu/drm/drm_atomic_helper.c | 23 +-- include/drm/drm_crtc.h | 1 + 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index ddfa0d1..f7f3a51 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1246,18 +1246,20 @@ EXPORT_SYMBOL(drm_atomic_helper_commit); * Returns: * 0 on success, negative error code on failure. */ + int drm_atomic_helper_prepare_planes(struct drm_device *dev, struct drm_atomic_state *state) { - int nplanes = dev->mode_config.num_total_plane; + struct drm_plane *plane; + struct drm_plane_state *plane_state; int ret, i; - for (i = 0; i < nplanes; i++) { + for_each_plane_in_state(state, plane, plane_state, i) { const struct drm_plane_helper_funcs *funcs; - struct drm_plane *plane = state->planes[i]; - struct drm_plane_state *plane_state = state->plane_states[i]; - if (!plane) + plane->prepared = false; + + if (plane->state->fb == plane_state->fb) continue; funcs = plane->helper_private; @@ -1267,24 +1269,22 @@ int drm_atomic_helper_prepare_planes(struct drm_device *dev, if (ret) goto fail; } + plane->prepared = true; } return 0; fail: - for (i--; i >= 0; i--) { + for_each_plane_in_state(state, plane, plane_state, i) { const struct drm_plane_helper_funcs *funcs; - struct drm_plane *plane = state->planes[i]; - struct drm_plane_state *plane_state = state->plane_states[i]; - if (!plane) + if (!plane->prepared) continue; funcs = plane->helper_private; if (funcs->cleanup_fb) funcs->cleanup_fb(plane, plane_state); - } return ret; @@ -1527,6 +1527,9 @@ void drm_atomic_helper_cleanup_planes(struct drm_device *dev, for_each_plane_in_state(old_state, plane, plane_state, i) { const struct drm_plane_helper_funcs *funcs; + if (!plane->prepared) + continue; + funcs = plane->helper_private; if (funcs->cleanup_fb) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index d1559cd..08b2033 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1531,6 +1531,7 @@ struct drm_plane { uint32_t *format_types; unsigned int format_count; bool format_default; + bool prepared; struct drm_crtc *crtc; struct drm_framebuffer *fb; -- 2.8.1
[PATCH 1/1] net: amd-xgbe: use correct format specifier
i has been defined as unsigned int. So use %u for output. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index ebf9224..a9b2709 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -154,7 +154,7 @@ static int xgbe_alloc_channels(struct xgbe_prv_data *pdata) goto err_rx_ring; for (i = 0, channel = channel_mem; i < count; i++, channel++) { - snprintf(channel->name, sizeof(channel->name), "channel-%d", i); + snprintf(channel->name, sizeof(channel->name), "channel-%u", i); channel->pdata = pdata; channel->queue_index = i; channel->dma_regs = pdata->xgmac_regs + DMA_CH_BASE + -- 2.8.1
[PATCH 1/1] net: bcm63xx: avoid possible null pointer dereference
If dev_get_platdata has failed pd is null. Do not dereference a null pointer. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 87c6b5b..6c8bc5f 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1859,7 +1859,7 @@ static int bcm_enet_probe(struct platform_device *pdev) } else { /* run platform code to initialize PHY device */ - if (pd->mii_config && + if (pd && pd->mii_config && pd->mii_config(dev, 1, bcm_enet_mdio_read_mii, bcm_enet_mdio_write_mii)) { dev_err(&pdev->dev, "unable to configure mdio bus\n"); -- 2.8.1
Re: kernel/printk/printk.c: Invalid access when buffer wraps around?
Hello, sorry for long reply. do you see this in practice? On (07/25/16 11:22), Vincent Brillault wrote: [..] > To be specific, these circonstances are: > - The buffer is almost full and the `log_next_seq` is closed to the end, > but there is still place for small messages > - A reader updates its index and sequence to log_next_* > - The next message is too large, resulting in the buffer wrapping-around and >a zeroed header to be added at the reader index position > - The buffer is completely filled with new messages but without wrapping: > + The last message must not wrap around (thus log_first_seq will be equal to > the readers's index) > + The last message must override the zeroed header (Trigerring the bug) > - The reader starts reading again, finding random data instead of the zero > 'len' it was supposed to read... the first printk()->console_unlock() to notice `seen_seq != log_next_seq` will wakeup a task from log_wait, sleeping on wait_event_interruptible(seq != log_next_seq) so I believe your assumption here is that we wrap around and then fill up the log_buf again without waking up the klogd even once, correct? CPU0CPU1 console_lock(); printk(); ... devkmsg_read(); printk(); console_unlock(); like the above? -ss
[PATCH 1/1] net: bna: use correct type specifications
addr and len are read with sscanf(kern_buf, "%x:%x", &addr, &len); and used as arguments for bna_reg_offset_check. So they have to be unsigned. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c index 8fc246e..cfcb00c 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c +++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c @@ -312,7 +312,8 @@ bnad_debugfs_write_regrd(struct file *file, const char __user *buf, struct bnad_debug_info *regrd_debug = file->private_data; struct bnad *bnad = (struct bnad *)regrd_debug->i_private; struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc; - int addr, len, rc, i; + int rc, i; + u32 addr, len; u32 *regbuf; void __iomem *rb, *reg_addr; unsigned long flags; -- 2.8.1
fs/xfs/xfs_ondisk.h:93:2: error: call to '__compiletime_assert_93' declared with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].namelen) is wrong, expected 4
Hi, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7f155c702677d057d03b192ce652311de5434697 commit: 3f94c441e2c3dea029a46a2326b2170acf2c7713 xfs: check offsets of variable length structures date: 6 weeks ago config: cris-allmodconfig (attached as .config) compiler: cris-linux-gcc (GCC) 4.6.3 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 3f94c441e2c3dea029a46a2326b2170acf2c7713 # save the attached .config to linux build tree make.cross ARCH=cris All errors (new ones prefixed by >>): In file included from fs/xfs/xfs_super.c:48:0: In function 'xfs_check_ondisk_structs', inlined from 'init_xfs_fs' at fs/xfs/xfs_super.c:1855:26: >> fs/xfs/xfs_ondisk.h:93:2: error: call to '__compiletime_assert_93' declared >> with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].namelen) >> is wrong, expected 4 >> fs/xfs/xfs_ondisk.h:94:2: error: call to '__compiletime_assert_94' declared >> with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].valuelen) >> is wrong, expected 5 >> fs/xfs/xfs_ondisk.h:95:2: error: call to '__compiletime_assert_95' declared >> with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].flags) is >> wrong, expected 6 >> fs/xfs/xfs_ondisk.h:96:2: error: call to '__compiletime_assert_96' declared >> with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].nameval) >> is wrong, expected 7 vim +/__compiletime_assert_93 +93 fs/xfs/xfs_ondisk.h 87 XFS_CHECK_OFFSET(xfs_attr_leaf_name_remote_t, valuelen, 4); 88 XFS_CHECK_OFFSET(xfs_attr_leaf_name_remote_t, namelen, 8); 89 XFS_CHECK_OFFSET(xfs_attr_leaf_name_remote_t, name, 9); 90 XFS_CHECK_STRUCT_SIZE(xfs_attr_leafblock_t, 40); 91 XFS_CHECK_OFFSET(xfs_attr_shortform_t, hdr.totsize, 0); 92 XFS_CHECK_OFFSET(xfs_attr_shortform_t, hdr.count, 2); > 93 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].namelen, 4); > 94 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].valuelen, 5); > 95 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].flags, 6); > 96 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].nameval, 7); 97 XFS_CHECK_STRUCT_SIZE(xfs_da_blkinfo_t, 12); 98 XFS_CHECK_STRUCT_SIZE(xfs_da_intnode_t, 16); 99 XFS_CHECK_STRUCT_SIZE(xfs_da_node_entry_t, 8); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH 1/1] net: bna: use correct type specifier (2)
add and val are read with sscanf(kern_buf, "%x:%x", &addr, &val); and used as arguments for bna_reg_offset_check and writel so they have to be unsigned. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c index cfcb00c..05c1c1d 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c +++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c @@ -373,7 +373,8 @@ bnad_debugfs_write_regwr(struct file *file, const char __user *buf, struct bnad_debug_info *debug = file->private_data; struct bnad *bnad = (struct bnad *)debug->i_private; struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc; - int addr, val, rc; + int rc; + u32 addr, val; void __iomem *reg_addr; unsigned long flags; void *kern_buf; -- 2.8.1
[PATCH 1/1] net: enic: use correct type specifier
i is defined as unsigned. So print it with %u. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/cisco/enic/enic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index f15560a..48f82ab 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -1566,7 +1566,7 @@ static int enic_request_intr(struct enic *enic) intr = enic_msix_rq_intr(enic, i); snprintf(enic->msix[intr].devname, sizeof(enic->msix[intr].devname), - "%.11s-rx-%d", netdev->name, i); + "%.11s-rx-%u", netdev->name, i); enic->msix[intr].isr = enic_isr_msix; enic->msix[intr].devid = &enic->napi[i]; } @@ -1577,7 +1577,7 @@ static int enic_request_intr(struct enic *enic) intr = enic_msix_wq_intr(enic, i); snprintf(enic->msix[intr].devname, sizeof(enic->msix[intr].devname), - "%.11s-tx-%d", netdev->name, i); + "%.11s-tx-%u", netdev->name, i); enic->msix[intr].isr = enic_isr_msix; enic->msix[intr].devid = &enic->napi[wq]; } -- 2.8.1
Re: [PATCH v2] ARM: pxa: fix GPIO double shifts
Joe Perches writes: > On Sat, 2016-07-30 at 13:22 +0200, Robert Jarzmik wrote: ...zip... > $ git grep -w charger_wakeup > arch/arm/mach-pxa/corgi_pm.c: .charger_wakeup = corgi_charger_wakeup, > arch/arm/mach-pxa/sharpsl_pm.c: if > (sharpsl_pm.machinfo->charger_wakeup() != 0) > arch/arm/mach-pxa/sharpsl_pm.c: if > (sharpsl_pm.machinfo->charger_wakeup()) > arch/arm/mach-pxa/sharpsl_pm.h: unsigned long (*charger_wakeup)(void); > arch/arm/mach-pxa/spitz_pm.c: .charger_wakeup = spitz_charger_wakeup, ...zip... > It may be better to change the charger_wakeup callback return > value from unsigned long to bool and modify the other use in > spitz_pm.c You're most probably right. I'll do that for v3. Cheers. -- Robert
Re: [PATCH] drm: Don't prepare or cleanup unchanging frame buffers [v2]
Hi, [auto build test WARNING on v4.7-rc7] [cannot apply to drm/drm-next next-20160729] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Keith-Packard/drm-Don-t-prepare-or-cleanup-unchanging-frame-buffers-v2/20160731-161116 reproduce: make htmldocs All warnings (new ones prefixed by >>): drivers/gpu/drm/i915/i915_irq.c:2722: warning: No description found for parameter 'fmt' include/drm/drm_crtc.h:374: warning: No description found for parameter 'mode_blob' include/drm/drm_crtc.h:789: warning: No description found for parameter 'name' include/drm/drm_crtc.h:1248: warning: No description found for parameter 'connector_id' include/drm/drm_crtc.h:1248: warning: No description found for parameter 'tile_blob_ptr' include/drm/drm_crtc.h:1287: warning: No description found for parameter 'rotation' include/drm/drm_crtc.h:1550: warning: No description found for parameter 'name' include/drm/drm_crtc.h:1550: warning: No description found for parameter 'mutex' >> include/drm/drm_crtc.h:1550: warning: No description found for parameter >> 'prepared' include/drm/drm_crtc.h:1550: warning: No description found for parameter 'helper_private' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tile_idr' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'connector_ida' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'delayed_event' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'edid_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'dpms_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'path_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tile_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'plane_type_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'rotation_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_src_x' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_src_y' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_src_w' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_src_h' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_crtc_x' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_crtc_y' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_crtc_w' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_crtc_h' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_fb_id' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_crtc_id' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_active' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'prop_mode_id' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'dvi_i_subconnector_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'dvi_i_select_subconnector_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_subconnector_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_select_subconnector_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_mode_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_left_margin_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_right_margin_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_top_margin_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_bottom_margin_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_brightness_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_contrast_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter 'tv_flicker_reduction_property' include/drm/drm_crtc.h:2186: warning: No description found for parameter
[PATCH 1/1] net: e1000: do not use uninitalized variable.
phy_data has to be set to zero to avoid undefined behavior. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c index 8172cf0..456bb07 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_hw.c +++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c @@ -5390,7 +5390,7 @@ static s32 e1000_set_phy_mode(struct e1000_hw *hw) static s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active) { s32 ret_val; - u16 phy_data; + u16 phy_data = 0; if (hw->phy_type != e1000_phy_igp) return E1000_SUCCESS; -- 2.8.1
[PATCH 1/1] net: i10e: use matching format indentifiers
i is defined as int but output as %u several times. Change the definition to unsigned. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index c912e04..8b08a69 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -1532,7 +1532,7 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset, struct i40e_vsi *vsi = np->vsi; struct i40e_pf *pf = vsi->back; char *p = (char *)data; - int i; + unsigned int i; switch (stringset) { case ETH_SS_TEST: -- 2.8.1
Re: [PATCH] net: thunderx: correct bound check in nic_config_loopback
Hello. On 7/31/2016 5:49 AM, Levin, Alexander wrote: Off by one in nic_config_loopback would access an invalid arrat variable when Array? vf id == MAX_LMAC. Signed-off-by: Sasha Levin [...] MBR, Sergei
[PATCH 1/1] net: s2io: simplify logical constraint
(!A || (A && B)) is equivalent to (!A || B) Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/neterion/s2io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index 2874dff..eaa37c0 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c @@ -7412,7 +7412,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && ((!ring_data->lro) || -(ring_data->lro && (!(rxdp->Control_1 & RXD_FRAME_IP_FRAG && +(!(rxdp->Control_1 & RXD_FRAME_IP_FRAG))) && (dev->features & NETIF_F_RXCSUM)) { l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1); l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1); -- 2.8.1
Re: [PATCH 1/1] dsa: b53: remove redundant if
Hello. On 7/31/2016 10:42 AM, Heinrich Schuchardt wrote: For pdata == null the code leaves with an error. There is need to check the condition again. No need, you mean? Signed-off-by: Heinrich Schuchardt [...] MBR, Sergei
[PATCH 1/1] net: qlcnic: avoid superfluous assignement
Assigning NULL to parmeter dcb has no effect outside of the inlined function. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h index 9777e57..f4aa633 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h @@ -45,7 +45,6 @@ struct qlcnic_dcb { static inline void qlcnic_clear_dcb_ops(struct qlcnic_dcb *dcb) { kfree(dcb); - dcb = NULL; } static inline int qlcnic_dcb_get_hw_capability(struct qlcnic_dcb *dcb) -- 2.8.1
PERSONALE E PRESTITO OFFERTA BUSINESS (APPLICA)
Sei disperato bisogno di un prestito? Sei stato negato di un prestito dalla propria banca o qualsiasi istituzione? Avete bisogno di assistenza finanziaria? Avete bisogno di un prestito per pagare le bollette o acquistare una casa?Vuoi avere il business della vostra e avete bisogno di un prestito per le vostre esigenze finanziarie se contattarci via;(joneswill...@gmail.com ) Saluti Dr Jones WILLIE
RE: [PATCH v5 6/8] thunderbolt: Networking transmit and receive
On Sat, Jul 30 2016, 12:07 AM, Stephen Hemminger wrote: > On Thu, 28 Jul 2016 11:15:19 +0300 > Amir Levy wrote: > > > + /* pad short packets */ > > + if (unlikely(skb->len < ETH_ZLEN)) { > > + int pad_len = ETH_ZLEN - skb->len; > > + > > + /* The skb is freed on error */ > > + if (unlikely(skb_pad(skb, pad_len))) { > > + cleaned_count += frame_count; > > + continue; > > + } > > + __skb_put(skb, pad_len); > > + } > > Packets should be padded on transmit, not on receive?? This driver emulates an Ethernet adapter on top of Thunderbolt technology. The Thunderbolt medium hasn't any restriction on minimum frame size and doesn't have the Ethernet collision detection limitation. So moving this code from transmit is actually an optimization - sending the minimum on the wire. The network stack thinks it is Ethernet, it might not accept Runt frames, so the driver pads the frame in receive. Looks like it deserves a comment in the code. Will add it.
RE: [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware)
On Sat, Jul 30 2016, 12:48 AM, Greg KH wrote: > On Fri, Jul 29, 2016 at 02:02:24PM -0700, Stephen Hemminger wrote: > > On Thu, 28 Jul 2016 11:15:17 +0300 > > Amir Levy wrote: > > > > > +static LIST_HEAD(controllers_list); static > > > +DECLARE_RWSEM(controllers_list_rwsem); > > > > Why use a semaphore when simple spinlock or mutex would be better? > > And never use a RW semaphore unless you can benchmark the difference > from a normal lock. If you can't benchmark it, then don't use it... I used RW semaphore since most of the time the list will be accessed for read. Since it is used in non-time sensitive flows, I'll change it to mutex.
[PATCH 1/1] net: qlge: remove superfluous statement
Variable length is not used after the deleted line. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index fd5d1c9..fd4a8e4 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c @@ -1892,7 +1892,6 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev, skb->len += length; skb->data_len += length; skb->truesize += length; - length -= length; ql_update_mac_hdr_len(qdev, ib_mac_rsp, lbq_desc->p.pg_chunk.va, &hlen); -- 2.8.1
Re: [v4.7-6816-g797cee982eef] Call-trace: modprobe | asymmetric-keys?
On Sat, Jul 30, 2016 at 4:25 PM, Herbert Xu wrote: > On Sat, Jul 30, 2016 at 02:55:12PM +0200, Sedat Dilek wrote: >> [ CC "MODULE SUPPORT" | "ASYMMETRIC KEYS" | "CRYPTO API" maintainers ] >> >> Hi, >> >> with latest Linus Git (v4.7-6816-g797cee982eef) I see the following >> call-trace in my Ubuntu/precise AMD64 system... > > This should be fixed by > > https://patchwork.kernel.org/patch/9250679/ > > which I will push to Linus soon. > [ CC Nicolai ] I have stolen the mentioned patch [1] from your crypto-2.6.git#master tree... And it fixes the issue for me! Even it's too late for credits... Reported-by: Sedat Dilek Tested-by: Sedat Dilek I had also libmpi on my radar, but if you do not know where the problem exactly is... Many thanks for the quick reply - it helped me a lot. - Sedat - [1] http://git.kernel.org/cgit/linux/kernel/git/herbert/crypto-2.6.git/patch/?id=4816c9406430d0d3d4fa58a212a7a869d429b315 [2] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=127827b9c295db35fa7e49d00ac5d14faeda9461 > Thanks, > -- > Email: Herbert Xu > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[PATCH 1/1] rtlwifi: remove superfluous condition
If sta == NULL, the changed line will not be reached. So no need to check if stat == NULL here. Signed-off-by: Heinrich Schuchardt --- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 41f77f8..7aee5ebb1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -1135,7 +1135,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, mac->mode = WIRELESS_MODE_AC_24G; } - if (vif->type == NL80211_IFTYPE_STATION && sta) + if (vif->type == NL80211_IFTYPE_STATION) rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0); rcu_read_unlock(); -- 2.8.1
[PATCH 1/1] mwifiex: remove superfluous condition
for_each_property_of_node is only executed if the property prop is not NULL. Signed-off-by: Heinrich Schuchardt --- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 7897037..128add8 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -1482,7 +1482,7 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv, continue; /* property header is 6 bytes, data must fit in cmd buffer */ - if (prop && prop->value && prop->length > 6 && + if (prop->value && prop->length > 6 && prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) { ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA, HostCmd_ACT_GEN_SET, 0, -- 2.8.1
[PATCH 1/1] mwifiex: remove superfluous condition (2)
We are using mac as source address in a memcpy. In the lines below we can assume mac is not NULL. Signed-off-by: Heinrich Schuchardt --- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 128add8..0d4f9fe 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv, (priv->wep_key_curr_index & KEY_INDEX_MASK)) key_info |= KEY_DEFAULT; } else { - if (mac) { - if (is_broadcast_ether_addr(mac)) - key_info |= KEY_MCAST; - else - key_info |= KEY_UNICAST | - KEY_DEFAULT; - } else { + if (is_broadcast_ether_addr(mac)) key_info |= KEY_MCAST; - } + else + key_info |= KEY_UNICAST | KEY_DEFAULT; } } km->key_param_set.key_info = cpu_to_le16(key_info); -- 2.8.1
Re: [PATCH] i2c: Modify error handling
Hi Amitoj, On Sun, Jul 31, 2016 at 09:28:00AM +0530, Amitoj Kaur Chawla wrote: > devm_gpiod_get returns an ERR_PTR on error so a null check is > incorrect and an IS_ERR check is required. > > The Coccinelle semantic patch used to make this change is as follows: > @@ > expression e; > statement S; > @@ > > e = devm_gpiod_get(...); > if( > - !e > + IS_ERR(e) >) > { >... > - return ...; > + return PTR_ERR(e); > } > > Signed-off-by: Amitoj Kaur Chawla > --- > drivers/media/i2c/adp1653.c | 4 ++-- In this exact case, the issue has been fixed by similar patch in media-tree master branch. You likely used another branch for preparing this patch. Nevertheless, thank you for the patch --- this kind of cleanups are always much appreciated. commit 806f8ffa8a0fa9a6f0481c5648c27aa51d10fdc6 Author: Vladimir Zapolskiy Date: Mon Mar 7 15:39:32 2016 -0300 [media] media: i2c/adp1653: fix check of devm_gpiod_get() error code The devm_gpiod_get() function returns either a valid pointer to struct gpio_desc or ERR_PTR() error value, check for NULL is bogus. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index fb7ed73..9e1731c 100644 --- a/drivers/media/i2c/adp1653.c +++ b/drivers/media/i2c/adp1653.c @@ -466,9 +466,9 @@ static int adp1653_of_init(struct i2c_client *client, of_node_put(child); pd->enable_gpio = devm_gpiod_get(&client->dev, "enable", GPIOD_OUT_LOW); - if (!pd->enable_gpio) { + if (IS_ERR(pd->enable_gpio)) { dev_err(&client->dev, "Error getting GPIO\n"); - return -EINVAL; + return PTR_ERR(pd->enable_gpio); } return 0; -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
[PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference
All assignments to components of priv should only occur after the check if prif is NULL. Signed-off-by: Heinrich Schuchardt --- drivers/net/wan/fsl_ucc_hdlc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 2fc50ec..6f04445 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -862,7 +862,7 @@ static int uhdlc_suspend(struct device *dev) static int uhdlc_resume(struct device *dev) { struct ucc_hdlc_private *priv = dev_get_drvdata(dev); - struct ucc_tdm *utdm = priv->utdm; + struct ucc_tdm *utdm; struct ucc_tdm_info *ut_info; struct ucc_fast __iomem *uf_regs; struct ucc_fast_private *uccf; @@ -877,6 +877,7 @@ static int uhdlc_resume(struct device *dev) if (!netif_running(priv->ndev)) return 0; + utdm = priv->utdm; ut_info = priv->ut_info; uf_info = &ut_info->uf_info; uf_regs = priv->uf_regs; -- 2.8.1
Re: [PATCH v4] net: sched: convert qdisc linked list to hashtable
On Thu, Jul 28, 2016 at 08:53:12PM +0800, Fengguang Wu wrote: On Thu, Jul 28, 2016 at 01:18:27PM +0200, Jiri Kosina wrote: On Thu, 28 Jul 2016, kbuild test robot wrote: [auto build test ERROR on v4.7-rc7] [also build test ERROR on next-20160728] [cannot apply to net/master net-next/master ipsec-next/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jiri-Kosina/net-sched-convert-qdisc-linked-list-to-hashtable/20160728-182303 config: i386-randconfig-s0-201630 (attached as .config) compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): net/built-in.o: In function `dev_activate': >> (.text+0x37ccb): undefined reference to `qdisc_hash_add' Dear 0-day team, could you please check my question regarding this very build failure here? lkml.kernel.org/r/alpine.lnx.2.00.1607141612560.24...@cbobk.fhfr.pm Sorry I missed that. For your convenience, here is the answer to the original email: This issue is be there even without my patch (but with qdisc_list_add instead), isn't it? Yes it looks so, this number happens in a number of places: dns_query.c:(.text+0x39b84): undefined reference to `qdisc_hash_add' include/linux/netdevice.h:1935: undefined reference to `qdisc_hash_add' net/core/netevent.c:31: undefined reference to `qdisc_hash_add' net/sched/sch_generic.c:789: undefined reference to `qdisc_hash_add' sch_generic.c:(.text+0x33487): undefined reference to `qdisc_hash_add' switchdev.c:(.text+0x3bf58): undefined reference to `qdisc_hash_add' sysctl_net.c:(.text+0x31f70): undefined reference to `qdisc_hash_add' (.text.dev_activate+0x228): undefined reference to `qdisc_hash_add' (.text+0x37d0b): undefined reference to `qdisc_hash_add' wext-proc.c:(.text+0x390a8): undefined reference to `qdisc_hash_add' Jiri, I just double checked and find no similar errors related to qdisc_list_add(). The parent commit 95556a8838 ("dccp: avoid deadlock in dccp_v4_ctl_send_reset") builds fine without error. Thanks, Fengguang The problem is that sch_generic.c (where dev_activate() is) is being compiled everytime CONFIG_NET is set, but sch_api.c (where qdisc_list_add() is defined) only when CONFIG_NET_SCHED is set (and there is no stub for !CONFIG_NET_SCHED case). So it looks like a more general problem than specific to this patch. Thanks, Fengguang
[PATCH 1/1] qed: do not use unitialized variable
Do not write random bytes from the kernel stack when calling qed_wr. Signed-off-by: Heinrich Schuchardt --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c index b26fe26..151cbf9 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c @@ -888,7 +888,7 @@ static int qed_hw_init_pf(struct qed_hwfn *p_hwfn, if (hw_mode & (1 << MODE_MF_SI)) { u8 pf_id = 0; - u32 val; + u32 val = 0; if (!qed_hw_init_first_eth(p_hwfn, p_ptt, &pf_id)) { if (p_hwfn->rel_pf_id == pf_id) { -- 2.8.1
[PATCH 1/1 v2] dsa: b53: remove redundant if
For pdata == null the code leaves with an error. There is no need to check the condition again. Signed-off-by: Heinrich Schuchardt --- drivers/net/dsa/b53/b53_mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c index 21f1068..77ffc43 100644 --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c @@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; - if (pdata) - dev->pdata = pdata; + dev->pdata = pdata; platform_set_drvdata(pdev, dev); -- 2.8.1
RE: [PATCH v5 5/8] thunderbolt: Networking state machine
On Thu, Jul 28 2016, 02:35 PM, Lukas Wunner wrote: > On Thu, Jul 28, 2016 at 11:15:18AM +0300, Amir Levy wrote: > > + nhi_ctxt->net_devices[ > > + port_num].medium_sts = > > Looks like a carriage return slipped in here. Will be fixed. > > In patch [4/8], I've found it a bit puzzling that FW->SW responses and > FW->SW notifications are defined in icm_nhi.c, whereas SW->FW commands > are defined in net.h. It would perhaps be more logical to have them all in the > header file. The FW->SW responses and SW->FW commands are almost > identical, there are odd spelling differences (CONNEXION vs. > CONNECTION). Will move them to the header and will change to CONNECTION. > > It would probably be good to explain the PDF acronym somewhere. Will explain in the enum. > > I've skimmed over all patches in the series, too superficial to provide a > Reviewed-by, it's just too much code to review thoroughly and I also lack the > hardware to test it, but broadly this LGTM. Thank you for the review.
Re: [PATCH V3 4/6] perf tools: pushing driver configuration down to the kernel
On Thu, Jul 28, 2016 at 03:42:21PM -0600, Mathieu Poirier wrote: > Now that PMU specific driver configuration are queued in > evsel::config_terms, all we need to do is re-use the current > ioctl() mechanism to push down the information to the kernel > driver. > > Signed-off-by: Mathieu Poirier > --- > tools/perf/builtin-record.c | 9 + > tools/perf/builtin-stat.c | 8 how about perf top? jirka
Re: [PATCH 1/1] mwifiex: remove superfluous condition (2)
Heinrich Schuchardt writes: > We are using mac as source address in a memcpy. > In the lines below we can assume mac is not NULL. > > Signed-off-by: Heinrich Schuchardt Please try to make the commit titles unique, for example you can use function names or something else. Adding "(2)" is not the way to do that. -- Kalle Valo
RE: [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware)
On Sat, Jul 30 2016, 12:03 AM, Stephen Hemminger wrote: > On Thu, 28 Jul 2016 11:15:17 +0300 > Amir Levy wrote: > > > +int nhi_send_message(struct tbt_nhi_ctxt *nhi_ctxt, enum pdf_value > pdf, > > +u32 msg_len, const u8 *msg, bool ignore_icm_resp) { > > Why not make msg a void * and not have to do so many casts? I couldn't agree more.
[PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition
We are using mac as source address in a memcpy. In the lines below we can assume mac is not NULL. Signed-off-by: Heinrich Schuchardt --- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 128add8..0d4f9fe 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv, (priv->wep_key_curr_index & KEY_INDEX_MASK)) key_info |= KEY_DEFAULT; } else { - if (mac) { - if (is_broadcast_ether_addr(mac)) - key_info |= KEY_MCAST; - else - key_info |= KEY_UNICAST | - KEY_DEFAULT; - } else { + if (is_broadcast_ether_addr(mac)) key_info |= KEY_MCAST; - } + else + key_info |= KEY_UNICAST | KEY_DEFAULT; } } km->key_param_set.key_info = cpu_to_le16(key_info); -- 2.8.1
Re: [PATCH V3 3/6] perf tools: add infrastructure for PMU specific configuration
On Thu, Jul 28, 2016 at 03:42:20PM -0600, Mathieu Poirier wrote: > This patch adds PMU driver specific configuration to the parser > infrastructure by preceding any term with the '@' letter. As such > doing something like: > > perf record -e some_event/@cfg1,@cfg2=config/ ... > > will see 'cfg1' and 'cfg2=config' being added to the list of evsel config > terms. Token 'cfg1' and 'cfg2=config' are not processed in user space > and are meant to be interpreted by the PMU driver. > > First the lexer/parser are supplemented with the required definitions to > recognise the driver specific configuration. From there they are simply > added to the list of event terms. The bulk of the work is done in > function "parse_events_add_pmu()" where driver config event terms are > added to a new list of driver config terms, which in turn spliced with > the event's new driver configuration list. > > Signed-off-by: Mathieu Poirier Acked-by: Jiri Olsa thanks, jirka
[PATCH v3] ARM: pxa: fix GPIO double shifts
The commit 9bf448c66d4b ("ARM: pxa: use generic gpio operation instead of gpio register") from Oct 17, 2011, leads to the following static checker warning: arch/arm/mach-pxa/spitz_pm.c:172 spitz_charger_wakeup() warn: double left shift '!gpio_get_value(SPITZ_GPIO_KEY_INT) << (1 << ((SPITZ_GPIO_KEY_INT) & 31))' As Dan reported, the value is shifted three times : - once by gpio_get_value(), which returns either 0 or BIT(gpio) - once by the shift operation '<<' - a last time by GPIO_bit(gpio) which is BIT(gpio) Therefore the calculation lead to a chained or operator of : - (1 << gpio) << (1 << gpio) = (2^gpio)^gpio = 2 ^ (gpio * gpio) It is be sheer luck the former statement works, only because each gpio used is strictly smaller than 6, and therefore 2^(gpio^2) never overflows a 32 bits value, and because it is used as a boolean value to check a gpio activation. As the xxx_charger_wakeup() functions are used as a true/false detection mechanism, take that opportunity to change their prototypes from integer return value to boolean one. Fixes: 9bf448c66d4b ("ARM: pxa: use generic gpio operation instead of gpio register") Reported-by: Dan Carpenter Cc: Joe Perches Signed-off-by: Robert Jarzmik --- Since v1: replaced binary ORs with logical ORs after assembly comparison Since v2: changed charger_wakeup prototype to bool foo() --- arch/arm/mach-pxa/corgi_pm.c | 12 +--- arch/arm/mach-pxa/sharpsl_pm.c | 2 +- arch/arm/mach-pxa/sharpsl_pm.h | 2 +- arch/arm/mach-pxa/spitz_pm.c | 10 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index d9206811be9b..d935de02b582 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c @@ -131,15 +131,13 @@ static int corgi_should_wakeup(unsigned int resume_on_alarm) return is_resume; } -static unsigned long corgi_charger_wakeup(void) +static bool corgi_charger_wakeup(void) { - unsigned long ret; + bool ret; - ret = (!gpio_get_value(CORGI_GPIO_AC_IN) << GPIO_bit(CORGI_GPIO_AC_IN)) - | (!gpio_get_value(CORGI_GPIO_KEY_INT) - << GPIO_bit(CORGI_GPIO_KEY_INT)) - | (!gpio_get_value(CORGI_GPIO_WAKEUP) - << GPIO_bit(CORGI_GPIO_WAKEUP)); + ret = !gpio_get_value(CORGI_GPIO_AC_IN) + || !gpio_get_value(CORGI_GPIO_KEY_INT) + || !gpio_get_value(CORGI_GPIO_WAKEUP); return ret; } diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index b80eab9993c5..249b7bd5fbc4 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -744,7 +744,7 @@ static int sharpsl_off_charge_battery(void) time = RCNR; while (1) { /* Check if any wakeup event had occurred */ - if (sharpsl_pm.machinfo->charger_wakeup() != 0) + if (sharpsl_pm.machinfo->charger_wakeup()) return 0; /* Check for timeout */ if ((RCNR - time) > SHARPSL_WAIT_CO_TIME) diff --git a/arch/arm/mach-pxa/sharpsl_pm.h b/arch/arm/mach-pxa/sharpsl_pm.h index 905be6755f04..fa75b6df8134 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.h +++ b/arch/arm/mach-pxa/sharpsl_pm.h @@ -34,7 +34,7 @@ struct sharpsl_charger_machinfo { #define SHARPSL_STATUS_LOCK 5 #define SHARPSL_STATUS_CHRGFULL 6 #define SHARPSL_STATUS_FATAL7 - unsigned long (*charger_wakeup)(void); + bool (*charger_wakeup)(void); int (*should_wakeup)(unsigned int resume_on_alarm); void (*backlight_limit)(int); int (*backlight_get_status) (void); diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index ea9f9034cb54..9e2902f32fc2 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -165,12 +165,12 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm) return is_resume; } -static unsigned long spitz_charger_wakeup(void) +static bool spitz_charger_wakeup(void) { - unsigned long ret; - ret = ((!gpio_get_value(SPITZ_GPIO_KEY_INT) - << GPIO_bit(SPITZ_GPIO_KEY_INT)) - | gpio_get_value(SPITZ_GPIO_SYNC)); + bool ret; + + ret = !gpio_get_value(SPITZ_GPIO_KEY_INT) + || gpio_get_value(SPITZ_GPIO_SYNC); return ret; } -- 2.1.4
Re: [PATCH] ftrace/jprobes/s390: Fix conflict between jprobes and function graph tracing
On Thu, Jul 28, 2016 at 02:39:33PM -0400, Steven Rostedt wrote: > On Mon, 18 Jul 2016 15:26:41 +0200 > Jiri Olsa wrote: > > > This fixes the same issue Steven already fixed for x86 > > in following commit: > > > > 237d28db036e ftrace/jprobes/x86: Fix conflict between jprobes and > > function graph tracing > > > > It fixes the crash, that happens when function graph tracing > > and jprobes are used simultaneously. Please refer to above > > commit for details. > > I'm guessing that this should go in via the s390 tree. oops, I forgot to CC s390 mailing list.. CC-ing now I can repost if needed thanks, jirka > > Acked-by: Steven Rostedt > > -- Steve > > > > > Signed-off-by: Jiri Olsa > > --- > > arch/s390/kernel/kprobes.c | 12 > > 1 file changed, 12 insertions(+) > > > > diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c > > index 250f5972536a..dd6306c51bd6 100644 > > --- a/arch/s390/kernel/kprobes.c > > +++ b/arch/s390/kernel/kprobes.c > > @@ -690,6 +690,15 @@ int setjmp_pre_handler(struct kprobe *p, struct > > pt_regs *regs) > > stack = (unsigned long) regs->gprs[15]; > > > > memcpy(kcb->jprobes_stack, (void *) stack, MIN_STACK_SIZE(stack)); > > + > > + /* > > +* jprobes use jprobe_return() which skips the normal return > > +* path of the function, and this messes up the accounting of the > > +* function graph tracer to get messed up. > > +* > > +* Pause function graph tracing while performing the jprobe function. > > +*/ > > + pause_graph_tracing(); > > return 1; > > } > > NOKPROBE_SYMBOL(setjmp_pre_handler); > > @@ -705,6 +714,9 @@ int longjmp_break_handler(struct kprobe *p, struct > > pt_regs *regs) > > struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); > > unsigned long stack; > > > > + /* It's OK to start function graph tracing again */ > > + unpause_graph_tracing(); > > + > > stack = (unsigned long) kcb->jprobe_saved_regs.gprs[15]; > > > > /* Put the regs back */ >
mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal'
Hi, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c9b95e5961c0294e0efffeaa847c1a1e6369204c commit: c1a0e9bc885d46e519fd87d35af6a7937abfb986 MIPS: Allow compact branch policy to be changed date: 9 months ago config: mips-malta_qemu_32r6_defconfig (attached as .config) compiler: mipsel-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout c1a0e9bc885d46e519fd87d35af6a7937abfb986 # save the attached .config to linux build tree make.cross ARCH=mips All errors (new ones prefixed by >>): >> mipsel-linux-gnu-gcc: error: unrecognized command line option >> '-mcompact-branches=optimal' >> mipsel-linux-gnu-gcc: error: unrecognized command line option >> '-mcompact-branches=optimal' make[2]: *** [kernel/bounds.s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [prepare0] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [sub-make] Error 2 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH 2/3] phy: sun4i: add support for A64 usb phy
Hello , > @@ -264,6 +266,12 @@ static int sun4i_usb_phy_init(struct phy *_phy) > val = readl(phy->pmu + REG_PMU_UNK_H3); > writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); > } else { > + /* A64 needs also this unknown bit */ > + if (data->cfg->type == sun50i_a64_phy) { > + val = readl(phy->pmu + REG_PMU_UNK_H3); > + writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); > + } > + This bit is also set for H3, shall we reuse it or we should enclose it in else-if part ? Thanks Amit.
Urgent Please...
Dear Sir/madam My name is Lisa Miller I am 63 years old, I am a dying woman who have decided to donate what I have to you/churches/ motherless babies/less privileged/widows.I was diagnosed for cancer for about 2 years ago. I have been touched by God to donate from what I have inherited from my late husband to you for good work of God. Please if you are ready to assit me distribute my funds of Twenty million Dollars to charity . kindly reply me to my private email: lisamiller60...@gmail.com Lisa Miller.
Notice !!(P)
I am soliciting your assistance to move an investment profit funds from my Bank for investment in your country. This is genuine and I hope it will appeal to you. I need your consent to provide details. Contact me on my email ( lin.li...@aim.com ) for more details Regards, Yang
Re: [PATCH 4/5] s390: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
On Mon, 25 Jul 2016 16:59:53 +0100 James Hogan wrote: > AT_VECTOR_SIZE_ARCH should be defined with the maximum number of > NEW_AUX_ENT entries that ARCH_DLINFO can contain, but it wasn't defined > for s390 at all even though ARCH_DLINFO can contain one NEW_AUX_ENT when > VDSO is enabled. > > This shouldn't be a problem as AT_VECTOR_SIZE_BASE includes space for > AT_BASE_PLATFORM which s390 doesn't use, but lets define it now and add > the comment above ARCH_DLINFO as found in several other architectures to > remind future modifiers of ARCH_DLINFO to keep AT_VECTOR_SIZE_ARCH up to > date. > > Fixes: b020632e40c3 ("[S390] introduce vdso on s390") > Signed-off-by: James Hogan > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: linux-s...@vger.kernel.org The patch makes sense. I not quite sure about the checkpoint-restore code that clears the last two entries of the user_auxv[] without knowing how many aux entries there really are. That seems kind of strange. I will the patch to our repositories and we'll give it a spin. If there is no fallout I queue it to linux-s390. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
core.c:undefined reference to `fpu_save'
Hi, It's probably a bug fix that unveils the link errors. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c9b95e5961c0294e0efffeaa847c1a1e6369204c commit: c60f169202c7643991a8b4bfeea60e06843d5b5a arch/mn10300/kernel/fpu-nofpu.c: needs asm/elf.h date: 5 months ago config: mn10300-allnoconfig (attached as .config) compiler: am33_2.0-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout c60f169202c7643991a8b4bfeea60e06843d5b5a # save the attached .config to linux build tree make.cross ARCH=mn10300 All errors (new ones prefixed by >>): kernel/built-in.o: In function `.L412': >> core.c:(.sched.text+0x257): undefined reference to `fpu_save' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: kernel/printk/printk.c: Invalid access when buffer wraps around?
Dear Sergey, > sorry for long reply. do you see this in practice? No, I've only thought of the bug will trying to adapt this code to build a separate cyclic buffer in a dedicated kernel module. > the first printk()->console_unlock() to notice `seen_seq != log_next_seq` > will wakeup a task from log_wait, sleeping on > wait_event_interruptible(seq != log_next_seq) Yes, but a task could be not waiting to read reading while still having open /dev/kmsg (e.g. after having read it in O_NONBLOCK) > so I believe your assumption here is that we wrap around and then fill up > the log_buf again without waking up the klogd even once, correct? > > CPU0CPU1 > > console_lock(); > printk(); > ... devkmsg_read(); > printk(); > console_unlock(); > > like the above? Mmm, I did not think of such a case, which might be possible. I was more thinking of a userland daemon reading the buffer (via /dev/kmsg) in non-blocking mode and only pulling from time to time. I agree that this is probably not seen often, which could explain why nobody can see it in practice. Thanks for your time, Vincent Brillault signature.asc Description: OpenPGP digital signature
Re: [PATCH] ftrace/jprobes/s390: Fix conflict between jprobes and function graph tracing
On Sun, 31 Jul 2016 14:21:14 +0200 Jiri Olsa wrote: > On Thu, Jul 28, 2016 at 02:39:33PM -0400, Steven Rostedt wrote: > > On Mon, 18 Jul 2016 15:26:41 +0200 > > Jiri Olsa wrote: > > > > > This fixes the same issue Steven already fixed for x86 > > > in following commit: > > > > > > 237d28db036e ftrace/jprobes/x86: Fix conflict between jprobes and > > > function graph tracing > > > > > > It fixes the crash, that happens when function graph tracing > > > and jprobes are used simultaneously. Please refer to above > > > commit for details. > > > > I'm guessing that this should go in via the s390 tree. > > oops, I forgot to CC s390 mailing list.. CC-ing now > > I can repost if needed This is not necessary. I have seen your original patch and could test it now. As expected it crashes without the patch and works find with your patch. Applied to linux-s390. Thanks. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
[GIT PULL] Btrfs
Hi Linus, This is part one of my btrfs pull, and you can find it in my for-linus-4.8 branch: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus-4.8 This pull is dedicated to Josef's enospc rework, which we've been testing for a few releases now. It fixes some early enospc problems and is dramatically faster. The pull also includes an updated fix for the delalloc accounting that happens after a fault in copy_from_user. My patch in v4.7 was almost but not quite enough. Dave Sterba has a branch prepped with a cleanup series from Jeff Mahoney as well as other fixes. My plan is to send that after wading through vacation backlog on Monday. Josef Bacik (19) commits (+679/-344): Btrfs: avoid deadlocks during reservations in btrfs_truncate_block (+5/-0) Btrfs: use FLUSH_LIMIT for relocation in reserve_metadata_bytes (+22/-17) Btrfs: don't bother kicking async if there's nothing to reclaim (+3/-0) Btrfs: change delayed reservation fallback behavior (+23/-41) Btrfs: always reserve metadata for delalloc extents (+13/-22) Btrfs: change how we calculate the global block rsv (+9/-36) Btrfs: add bytes_readonly to the spaceinfo at once (+11/-18) Btrfs: introduce ticketed enospc infrastructure (+380/-151) Btrfs: fill relocation block rsv after allocation (+6/-0) Btrfs: fix delalloc reservation amount tracepoint (+3/-1) Btrfs: fix release reserved extents trace points (+1/-5) Btrfs: fix callers of btrfs_block_rsv_migrate (+18/-25) Btrfs: always use trans->block_rsv for orphans (+7/-1) Btrfs: use root when checking need_async_flush (+6/-5) Btrfs: add tracepoint for adding block groups (+42/-0) Btrfs: add tracepoints for flush events (+103/-10) Btrfs: warn_on for unaccounted spaces (+8/-6) Btrfs: add fsid to some tracepoints (+11/-6) Btrfs: trace pinned extents (+8/-0) Chris Mason (1) commits (+5/-7): Btrfs: fix delalloc accounting after copy_from_user faults Total: (20) commits (+684/-351) fs/btrfs/ctree.h | 15 +- fs/btrfs/delayed-inode.c | 68 ++-- fs/btrfs/extent-tree.c | 731 +++ fs/btrfs/file.c | 16 +- fs/btrfs/inode.c | 7 +- fs/btrfs/relocation.c| 45 +-- include/trace/events/btrfs.h | 139 +++- 7 files changed, 677 insertions(+), 344 deletions(-)
Re: [ANNOUNCE] git-series: track changes to a patch series over time
On Fri, Jul 29, 2016 at 09:59:08AM -0700, Stefan Beller wrote: > On Fri, Jul 29, 2016 at 5:44 AM, Richard Ipsum > wrote: > >> > >> These definitely seem like a family of related problems. I'd like to > >> use git-series as a format for storing iterations on things like GitHub > >> pull-requests or Gerrit patch versions (in the latter case, overcoming > >> Gerrit's limitations on only handling one patch at a time). Integrating > >> reviews with that seems helpful. > > > > Worth noting here that Gerrit's one patch per change format isn't > > intrinsic to Notedb, since we just need to track the sha we want > > to merge and optionally the branch we intend to merge into. > > Note that Gerrit started to lose the "one patch at a time" notion. > It is possible to at least submit multiple changes coupled together > (even across project boundaries) via the topic. Some sort of cover > letter is missing though, that could be used e.g. for the merge commit. Potentially my misuse of the format but git-candidate puts the cover letter into the body of the commit message before the footers begin, for each new patchset added to the change. This has the advantage that you can track each version of the cover letter, since there's one per patchset.
[PATCH V2] dmaengine: qcom_hidma: release the descriptor before the callback
There is a race condition between data transfer callback and descriptor free code. The callback routine may decide to clear the resources even though the descriptor has not yet been freed. Instead of calling the callback first and then releasing the memory, this code is changing the order to return the descriptor back to the free pool and then call the user provided callback. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 41b5c6d..4aaceab 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -111,6 +111,7 @@ static void hidma_process_completed(struct hidma_chan *mchan) struct dma_async_tx_descriptor *desc; dma_cookie_t last_cookie; struct hidma_desc *mdesc; + struct hidma_desc *next; unsigned long irqflags; struct list_head list; @@ -122,8 +123,10 @@ static void hidma_process_completed(struct hidma_chan *mchan) spin_unlock_irqrestore(&mchan->lock, irqflags); /* Execute callbacks and run dependencies */ - list_for_each_entry(mdesc, &list, node) { + list_for_each_entry_safe(mdesc, next, &list, node) { enum dma_status llstat; + dma_async_tx_callback callback; + void *param; desc = &mdesc->desc; @@ -132,18 +135,19 @@ static void hidma_process_completed(struct hidma_chan *mchan) spin_unlock_irqrestore(&mchan->lock, irqflags); llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); - if (desc->callback && (llstat == DMA_COMPLETE)) - desc->callback(desc->callback_param); + callback = desc->callback; + param = desc->callback_param; last_cookie = desc->cookie; dma_run_dependencies(desc); - } - /* Free descriptors */ - spin_lock_irqsave(&mchan->lock, irqflags); - list_splice_tail_init(&list, &mchan->free); - spin_unlock_irqrestore(&mchan->lock, irqflags); + spin_lock_irqsave(&mchan->lock, irqflags); + list_move(&mdesc->node, &mchan->free); + spin_unlock_irqrestore(&mchan->lock, irqflags); + if (callback && (llstat == DMA_COMPLETE)) + callback(param); + } } /* -- 1.8.2.1
Re: [PATCH V2] dmaengine: qcom_hidma: release the descriptor before the callback
Sinan Kaya wrote: + list_for_each_entry_safe(mdesc, next, &list, node) { enum dma_status llstat; + dma_async_tx_callback callback; + void *param; desc = &mdesc->desc; @@ -132,18 +135,19 @@ static void hidma_process_completed(struct hidma_chan *mchan) spin_unlock_irqrestore(&mchan->lock, irqflags); llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); - if (desc->callback && (llstat == DMA_COMPLETE)) - desc->callback(desc->callback_param); + callback = desc->callback; + param = desc->callback_param; It looks to me like 'callback' and 'param' are never actually used. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation.
RE: [PATCH 1/1] qed: do not use unitialized variable
> Do not write random bytes from the kernel stack when calling qed_wr. > > Signed-off-by: Heinrich Schuchardt Thanks. Acked-by: Yuval Mintz
Re: [PATCH V2] dmaengine: qcom_hidma: release the descriptor before the callback
Timur Tabi wrote: It looks to me like 'callback' and 'param' are never actually used. Never mind. I really shouldn't review code before my morning coffee. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation.
Re: [PATCH 1/1] rtlwifi: remove superfluous condition
On 07/31/2016 05:30 AM, Heinrich Schuchardt wrote: If sta == NULL, the changed line will not be reached. So no need to check if stat == NULL here. Signed-off-by: Heinrich Schuchardt --- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I agree. If sta were NULL, we would never have reached this statement. There is, however, a typo in the last line of the commit message. Once this is fixed, you may add the line "Acked-by: Larry Finger " Thanks, Larry diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 41f77f8..7aee5ebb1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -1135,7 +1135,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, mac->mode = WIRELESS_MODE_AC_24G; } - if (vif->type == NL80211_IFTYPE_STATION && sta) + if (vif->type == NL80211_IFTYPE_STATION) rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0); rcu_read_unlock();
㊣Hi
hi this is an electronics shop bike,brand guitar,camera,tv,samsung product free shipping www .slooone .com if you do not want receive our email. please reply to us, we will never send email to you
[GIT PULL REQUEST] watchdog - v4.8 Merge Window
Hi Linus, Please pull from 'master' branch of git://www.linux-watchdog.org/linux-watchdog.git This pull request contains * New driver for the watchdog in Aspeed SoCs * New driver for the watchdog in Maxim PMIC MAX77620 * New driver for the watchdog in Amlogic Meson GXBB SoC * Support for the r8a7796 watchdog device * Support for F81866 watchdog device * Support for 5th variation of Apollo Lake * Support for MCP78S chipset * clean-up of softdog.c watchdog device driver * pic32-wdt and pic32-dmt fixes * core: min and max timeout improvements, WDOG_HW_RUNNING improvements, status funtionality * core: Add a device managed API for watchdog_register_device() * Documentation/watchdog: watchdog-test improvements * Several other fixes and improvements This will update the following files: Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt | 16 Documentation/devicetree/bindings/watchdog/meson-gxbb-wdt.txt | 16 Documentation/devicetree/bindings/watchdog/qcom-wdt.txt |4 Documentation/devicetree/bindings/watchdog/renesas-wdt.txt|5 Documentation/driver-model/devres.txt |3 Documentation/watchdog/hpwdt.txt |5 Documentation/watchdog/src/watchdog-test.c| 39 - Documentation/watchdog/watchdog-kernel-api.txt|9 MAINTAINERS |6 arch/arm/boot/dts/qcom-apq8064.dtsi |3 arch/arm/boot/dts/qcom-ipq4019.dtsi |2 arch/arm/boot/dts/qcom-ipq8064.dtsi |3 arch/arm/boot/dts/qcom-msm8960.dtsi |3 drivers/platform/x86/intel_pmc_ipc.c | 10 drivers/watchdog/Kconfig | 33 + drivers/watchdog/Makefile |3 drivers/watchdog/aspeed_wdt.c | 212 +++ drivers/watchdog/bcm2835_wdt.c| 11 drivers/watchdog/da9063_wdt.c |2 drivers/watchdog/f71808e_wdt.c| 28 - drivers/watchdog/gpio_wdt.c |2 drivers/watchdog/iTCO_wdt.c |2 drivers/watchdog/max77620_wdt.c | 227 drivers/watchdog/meson_gxbb_wdt.c | 270 ++ drivers/watchdog/nv_tco.c |2 drivers/watchdog/pcwd.c | 14 drivers/watchdog/pic32-dmt.c |5 drivers/watchdog/pic32-wdt.c |9 drivers/watchdog/qcom-wdt.c | 69 +- drivers/watchdog/sbsa_gwdt.c | 16 drivers/watchdog/sirfsoc_wdt.c| 15 drivers/watchdog/softdog.c| 92 --- drivers/watchdog/tangox_wdt.c |4 drivers/watchdog/watchdog_core.c | 39 + drivers/watchdog/watchdog_dev.c | 61 +- drivers/watchdog/ziirave_wdt.c|2 include/linux/watchdog.h |6 37 files changed, 1062 insertions(+), 186 deletions(-) with these Changes: commit 1ac06563434e5f3302259608d3589bf7002431fe Author: Wei Yongjun Date: Tue Jul 26 14:50:14 2016 + watchdog: gpio_wdt: Fix missing platform_set_drvdata() in gpio_wdt_probe() Add missing platform_set_drvdata() in gpio_wdt_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3c10bbde10fe4dca52726e246cefa6b0a1dfbd3e Author: Guenter Roeck Date: Thu Jul 21 14:21:56 2016 -0700 watchdog: core: Clear WDOG_HW_RUNNING before calling the stop function WDOG_HW_RUNNING indicates that the hardware watchdog is running while the watchdog device is closed. The flag may be set by the driver when it is instantiated to indicate that the watchdog is running, and that the watchdog core needs to send heartbeat requests to the driver until the watchdog device is opened. When the watchdog device is closed, the flag can be used by the driver's stop function to indicate to the watchdog core that it was unable to stop the watchdog, and that the watchdog core needs to send heartbeat requests. This only works if the flag is actually cleared when the watchdog is stopped. To avoid having to clear the flag in each driver's stop function, clear it in the w
Re: [PATCH v2 2/2] mmc: host: sunxi: add support for A64 mmc controller
Hi, On 31-07-16 13:02, Icenowy Zheng wrote: A64 SoC features a MMC controller which need only the mod clock, and can calibrate delay by itself. This patch adds support for the new MMC controller IP core. Based on work by Andre Przywara . Signed-off-by: Icenowy Zheng Looks good, some minor remarks (see comments inline) after those are addressed this is ready to be merged IMHO. --- drivers/mmc/host/sunxi-mmc.c | 106 --- 1 file changed, 90 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 2ec91ce..aa2abf3 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -72,6 +72,14 @@ #define SDXC_REG_CHDA (0x90) #define SDXC_REG_CBDA (0x94) +/* New registers introduced in A64 */ +#define SDXC_REG_A12A 0x058 /* SMC Auto Command 12 Register */ +#define SDXC_REG_SD_NTSR 0x05C /* SMC New Timing Set Register */ +#define SDXC_REG_DRV_DL0x140 /* Drive Delay Control Register */ +#define SDXC_REG_SAMP_DL_REG 0x144 /* SMC sample delay control */ +#define SDXC_REG_DS_DL_REG 0x148 /* SMC data strobe delay control */ + + Please drop 1 empty line here. #define mmc_readl(host, reg) \ readl((host)->reg_base + SDXC_##reg) #define mmc_writel(host, reg, value) \ @@ -217,6 +225,15 @@ #define SDXC_CLK_50M_DDR 3 #define SDXC_CLK_50M_DDR_8BIT 4 +#define SDXC_2X_TIMING_MODEBIT(31) + +#define SDXC_CAL_START BIT(15) +#define SDXC_CAL_DONE BIT(14) +#define SDXC_CAL_DL_SHIFT 8 +#define SDXC_CAL_DL_SW_EN BIT(7) +#define SDXC_CAL_DL_SW_SHIFT 0 +#define SDXC_CAL_DL_MASK 0x3f + struct sunxi_mmc_clk_delay { u32 output; u32 sample; @@ -232,6 +249,9 @@ struct sunxi_idma_des { struct sunxi_mmc_cfg { u32 idma_des_size_bits; const struct sunxi_mmc_clk_delay *clk_delays; + I would not insert an empty line here. + /* does the IP block support autocalibration? */ + bool can_calibrate; }; struct sunxi_mmc_host { @@ -657,6 +677,34 @@ static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en) return 0; } +static int sunxi_mmc_calibrate(struct sunxi_mmc_host *host, + struct mmc_ios *ios, int reg_off) +{ + u32 reg = readl(host->reg_base + reg_off); + u32 delay; + I would add: if (!host->cfg->can_calibrate) return 0; Here; and ... + reg &= ~(SDXC_CAL_DL_MASK << SDXC_CAL_DL_SW_SHIFT); + reg &= ~SDXC_CAL_DL_SW_EN; + + writel(reg | SDXC_CAL_START, host->reg_base + reg_off); + + dev_dbg(mmc_dev(host->mmc), "calibration started\n"); + + while (!((reg = readl(host->reg_base + reg_off)) & SDXC_CAL_DONE)) + cpu_relax(); + + delay = (reg >> SDXC_CAL_DL_SHIFT) & SDXC_CAL_DL_MASK; + + reg &= ~SDXC_CAL_START; + reg |= (delay << SDXC_CAL_DL_SW_SHIFT) | SDXC_CAL_DL_SW_EN; + + writel(reg, host->reg_base + reg_off); + + dev_dbg(mmc_dev(host->mmc), "calibration ended, res is 0x%x\n", reg); Add: /* TODO: enable calibrate on sdc2 SDXC_REG_DS_DL_REG of A64 */ here; and ... + + return 0; +} + static int sunxi_mmc_clk_set_phase(struct sunxi_mmc_host *host, struct mmc_ios *ios, u32 rate) { @@ -727,9 +775,17 @@ static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host, } mmc_writel(host, REG_CLKCR, rval); - ret = sunxi_mmc_clk_set_phase(host, ios, rate); - if (ret) - return ret; Keep this as is; and add: ret = sunxi_mmc_calibrate(host, ios, SDXC_REG_SAMP_DL_REG); if (ret) return ret; Instead of: + if (host->cfg->can_calibrate) { + ret = sunxi_mmc_calibrate(host, ios, SDXC_REG_SAMP_DL_REG); + if (ret) + return ret; + + /* TODO: enable calibrate on sdc2 SDXC_REG_DS_DL_REG of A64 */ + } else { + ret = sunxi_mmc_clk_set_phase(host, ios, rate); + if (ret) + return ret; + } return sunxi_mmc_oclk_onoff(host, 1); } @@ -982,21 +1038,31 @@ static const struct sunxi_mmc_clk_delay sun9i_mmc_clk_delays[] = { static const struct sunxi_mmc_cfg sun4i_a10_cfg = { .idma_des_size_bits = 13, .clk_delays = NULL, + .can_calibrate = false, }; static const struct sunxi_mmc_cfg sun5i_a13_cfg = { .idma_des_size_bits = 16, .clk_delays = NULL, + .can_calibrate = false, }; static const struct sunxi_mmc_cfg sun7i_a20_cfg = { .idma_des_size_bits = 16, .clk_delays = sunxi_mmc_clk_delays, + .can_calibrate = false, }; static const struct sunxi_mmc_cfg sun9i_a80_cfg = { .idma_des_size_bits = 16, .clk_delays = sun9i_mmc_clk_delays, + .can_calibrate = false, +}; +
Re: [ANNOUNCE] git-series: track changes to a patch series over time
On Fri, Jul 29, 2016 at 06:00:55AM -0700, Josh Triplett wrote: > On Fri, Jul 29, 2016 at 01:44:44PM +0100, Richard Ipsum wrote: > > On Fri, Jul 29, 2016 at 04:04:26AM -0700, Josh Triplett wrote: > > > I hope to use git notes with git-series in the future, by putting > > > another gitlink under the git-series for notes related to the series. > > > I'd intended that for more persistent notes; putting them in the series > > > solves some of the problems related to notes refs, pushing/pulling, and > > > collaboration. Using notes for review comments makes sense as well, > > > whether in a series or in a separate ref. > > > > Sounds interesting, can you explain how this works in more detail? > > The tree within a git-series commit includes a blob "cover" for the > cover letter, a gitlink "base" for the base commit, and a gitlink > "series" for the top of the series. I could add a gitlink "notes", > which acts like a notes ref; then, each version of the series would have > its own notes ref. As with the series, git-series would track the > "history of history"; since git-notes themselves use git history to > store a set of notes, git-series would store the history of the notes. > So if you add, remove, or change a note, git-series would track that as > a change to the notes ref. If you merge/rebase/etc the notes ref to > merge notes, git-series would track that too. A different series would > have a different set of notes, so you wouldn't be limited to > one notes ref per repository. > > This doesn't solve the problem of merging notes, but it *does* mean you > have a full history of the changes to notes, not just the notes > themselves. > > Something similar might work for the Gerrit notesdb. > Okay I think there is a misunderstanding, Notedb is based on notes, but they're not used in the same way as git-notes, an example will help explain what I mean, For a candidate 'update_readme' we store the change/candidate/whatever metadata at refs/candidates/heads/up/update_readme/meta which is analogous to Gerrit's notedb refs which uses something like refs/changes/34/1234/meta, the prototype library I've written supports both forms and allows for some flexibility in the naming of the prefix of the former type of ref (so you may use refs/series/heads/up/update_readme/meta for example). So the output of, git log -p refs/candidates/heads/up/update_readme/meta gives commit 38d0c182a46dc5a0f5d04ea0890e278b8e7a6eb6 Author: Richard Ipsum Date: Sun Jul 24 16:59:16 2016 +0100 Metadata update Patch-set: 1 Status: merged commit f45a396a156e121f923321e7530e74746e10bdb8 Author: Richard Ipsum Date: Sun Jul 24 16:50:13 2016 +0100 Vote on patch set 1 Label: CodeReview=+1 Patch-set: 1 commit b74eb15c1847d3bb28618c738c8ebc3412b6935a Author: Richard Ipsum Date: Sun Jul 24 16:48:11 2016 +0100 Update our README to reflect reality BranchCommit; 59c46c9fa03725308779841f95ad71e7ccdb919c Branch: master Commit: 761d8da03a10b63b0b1e3cf97ffd7ececb09e3d6 Patch-set: 1 Status: new Subject: update_readme This Notedb history is the result of the following git-candidate invocations git candidate create update_readme -m "Update our README to reflect reality" git candidate vote +1 (use whatever git commands you like to merge the change) git candidate close update_readme Basically any change made to a change in Notedb is recorded in a git history. The format is explained in some more detail here[1]. [1]: https://storage.googleapis.com/gerrit-talks/summit/2015/NoteDB.pdf
Re: [PATCH 1/1 linux-next] ipc/msg.c: fix memory leak in do_msgsnd()
Hi Fabian, On 07/29/2016 10:15 AM, Fabian Frederick wrote: Running LTP msgsnd06 with kmemleak gives the following: cat /sys/kernel/debug/kmemleak unreferenced object 0x88003c0a11f8 (size 8): comm "msgsnd06", pid 1645, jiffies 4294672526 (age 6.549s) hex dump (first 8 bytes): 1b 00 00 00 01 00 00 00 backtrace: [] kmemleak_alloc+0x23/0x40 [] kmem_cache_alloc_trace+0xe1/0x180 [] selinux_msg_queue_alloc_security+0x3f/0xd0 [] security_msg_queue_alloc+0x2e/0x40 [] newque+0x4e/0x150 [] ipcget+0x159/0x1b0 [] SyS_msgget+0x39/0x40 [] entry_SYSCALL_64_fastpath+0x13/0x8f [] 0x ipc_rcu_free() was given to ipc_rcu_putref() instead of msg_rcu_free() which does security cleaning. Good catch! From a quick look: - The same bug appears to exist in sem.c. Do you want to fix it as well? - Did you check when it was introduced? I would add cc stable. -- Manfred
Re: [PATCH 2/3] phy: sun4i: add support for A64 usb phy
Hi, On 31-07-16 13:25, Icenowy Zheng wrote: There's something unknown in the pmu part. Signed-off-by: Icenowy Zheng Cool, I really like the work you're doing on A64 support, keep up the good work! --- drivers/phy/phy-sun4i-usb.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index 0a45bc6..6f94369 100644 --- a/drivers/phy/phy-sun4i-usb.c +++ b/drivers/phy/phy-sun4i-usb.c @@ -97,6 +97,7 @@ enum sun4i_usb_phy_type { sun6i_a31_phy, sun8i_a33_phy, sun8i_h3_phy, + sun50i_a64_phy, }; struct sun4i_usb_phy_cfg { @@ -180,8 +181,9 @@ static void sun4i_usb_phy_write(struct sun4i_usb_phy *phy, u32 addr, u32 data, mutex_lock(&phy_data->mutex); - if (phy_data->cfg->type == sun8i_a33_phy) { - /* A33 needs us to set phyctl to 0 explicitly */ + if (phy_data->cfg->type == sun8i_a33_phy || + phy_data->cfg->type == sun50i_a64_phy) { + /* A33 or A64 needs us to set phyctl to 0 explicitly */ writel(0, phyctl); } Maybe add a "bool explicitly_0_phyctl;" to sun4i_usb_phy_cfg ? Note I'm not sure of this myself, feel free to keep this as is, we can always introduce such a bool when we get a 3th SoC which needs it. @@ -264,6 +266,12 @@ static int sun4i_usb_phy_init(struct phy *_phy) val = readl(phy->pmu + REG_PMU_UNK_H3); writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); } else { + /* A64 needs also this unknown bit */ + if (data->cfg->type == sun50i_a64_phy) { + val = readl(phy->pmu + REG_PMU_UNK_H3); + writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); + } + /* Enable USB 45 Ohm resistor calibration */ if (phy->index == 0) sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, 0x01, 1); Erm, as pointed out thus duplicates code from the H3 code path, I believe that you should add a "bool needs_h3_pmu_unk_poke;" to sun4i_usb_phy_cfg and then change this bit of the code to: if (data->cfg->needs_h3_pmu_unk_poke) { val = readl(phy->pmu + REG_PMU_UNK_H3); writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); } if (data->cfg->type == sun8i_h3_phy) { if (phy->index == 0) { val = readl(data->base + REG_PHY_UNK_H3); writel(val & ~1, data->base + REG_PHY_UNK_H3); } } else { ... (original code) } That seems like a cleaner solution to me. And do not forget to set the needs_h3_pmu_unk_poke for the h3! I would not add it to the sun4i_usb_phy_cfg structs for the other type SoCs, if part of the struct is initialized the rest will get set to 0 by the compiler and I believe that it things will be more readable without an explicit: .needs_h3_pmu_unk_poke = false Everywhere. Thanks & Regards, Hans @@ -762,6 +770,14 @@ static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = { .dedicated_clocks = true, }; +static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { + .num_phys = 2, + .type = sun50i_a64_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, +}; + static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun4i-a10-usb-phy", .data = &sun4i_a10_cfg }, { .compatible = "allwinner,sun5i-a13-usb-phy", .data = &sun5i_a13_cfg }, @@ -770,6 +786,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun8i-a23-usb-phy", .data = &sun8i_a23_cfg }, { .compatible = "allwinner,sun8i-a33-usb-phy", .data = &sun8i_a33_cfg }, { .compatible = "allwinner,sun8i-h3-usb-phy", .data = &sun8i_h3_cfg }, + { .compatible = "allwinner,sun50i-a64-usb-phy", .data = &sun50i_a64_cfg}, { }, }; MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
Re: [PATCH 2/3] phy: sun4i: add support for A64 usb phy
Hi, On Sun, Jul 31, 2016 at 10:39 PM, Hans de Goede wrote: > Hi, > > On 31-07-16 13:25, Icenowy Zheng wrote: >> >> There's something unknown in the pmu part. >> >> Signed-off-by: Icenowy Zheng > > > Cool, I really like the work you're doing on A64 support, > keep up the good work! > >> --- >> drivers/phy/phy-sun4i-usb.c | 21 +++-- >> 1 file changed, 19 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c >> index 0a45bc6..6f94369 100644 >> --- a/drivers/phy/phy-sun4i-usb.c >> +++ b/drivers/phy/phy-sun4i-usb.c >> @@ -97,6 +97,7 @@ enum sun4i_usb_phy_type { >> sun6i_a31_phy, >> sun8i_a33_phy, >> sun8i_h3_phy, >> + sun50i_a64_phy, >> }; >> >> struct sun4i_usb_phy_cfg { >> @@ -180,8 +181,9 @@ static void sun4i_usb_phy_write(struct sun4i_usb_phy >> *phy, u32 addr, u32 data, >> >> mutex_lock(&phy_data->mutex); >> >> - if (phy_data->cfg->type == sun8i_a33_phy) { >> - /* A33 needs us to set phyctl to 0 explicitly */ >> + if (phy_data->cfg->type == sun8i_a33_phy || >> + phy_data->cfg->type == sun50i_a64_phy) { >> + /* A33 or A64 needs us to set phyctl to 0 explicitly */ >> writel(0, phyctl); >> } >> > > Maybe add a "bool explicitly_0_phyctl;" to sun4i_usb_phy_cfg ? > > Note I'm not sure of this myself, feel free to keep this as is, > we can always introduce such a bool when we get a 3th SoC which > needs it. > >> @@ -264,6 +266,12 @@ static int sun4i_usb_phy_init(struct phy *_phy) >> val = readl(phy->pmu + REG_PMU_UNK_H3); >> writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); >> } else { >> + /* A64 needs also this unknown bit */ >> + if (data->cfg->type == sun50i_a64_phy) { >> + val = readl(phy->pmu + REG_PMU_UNK_H3); >> + writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); >> + } >> + >> /* Enable USB 45 Ohm resistor calibration */ >> if (phy->index == 0) >> sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, 0x01, >> 1); > > > Erm, as pointed out thus duplicates code from the H3 code path, I believe > that you should add a "bool needs_h3_pmu_unk_poke;" to sun4i_usb_phy_cfg > and then change this bit of the code to: > > if (data->cfg->needs_h3_pmu_unk_poke) { > val = readl(phy->pmu + REG_PMU_UNK_H3); > writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); > } > > if (data->cfg->type == sun8i_h3_phy) { > if (phy->index == 0) { > val = readl(data->base + REG_PHY_UNK_H3); > writel(val & ~1, data->base + REG_PHY_UNK_H3); > } > } else { > ... (original code) > } > > That seems like a cleaner solution to me. > > And do not forget to set the needs_h3_pmu_unk_poke for the h3! > > I would not add it to the sun4i_usb_phy_cfg structs for the > other type SoCs, if part of the struct is initialized the > rest will get set to 0 by the compiler and I believe that > it things will be more readable without an explicit: > > .needs_h3_pmu_unk_poke = false > > Everywhere. > FYI: H3 USB PHY support is not complete. USB0 PHY is not supported, and it does not work. I did a preliminary comparison of this PHY driver and the code in Allwinner's SDK. There are some bits missing. ChenYu > > Thanks & Regards, > > Hans > > > > > >> @@ -762,6 +770,14 @@ static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = >> { >> .dedicated_clocks = true, >> }; >> >> +static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { >> + .num_phys = 2, >> + .type = sun50i_a64_phy, >> + .disc_thresh = 3, >> + .phyctl_offset = REG_PHYCTL_A33, >> + .dedicated_clocks = true, >> +}; >> + >> static const struct of_device_id sun4i_usb_phy_of_match[] = { >> { .compatible = "allwinner,sun4i-a10-usb-phy", .data = >> &sun4i_a10_cfg }, >> { .compatible = "allwinner,sun5i-a13-usb-phy", .data = >> &sun5i_a13_cfg }, >> @@ -770,6 +786,7 @@ static const struct of_device_id >> sun4i_usb_phy_of_match[] = { >> { .compatible = "allwinner,sun8i-a23-usb-phy", .data = >> &sun8i_a23_cfg }, >> { .compatible = "allwinner,sun8i-a33-usb-phy", .data = >> &sun8i_a33_cfg }, >> { .compatible = "allwinner,sun8i-h3-usb-phy", .data = >> &sun8i_h3_cfg }, >> + { .compatible = "allwinner,sun50i-a64-usb-phy", .data = >> &sun50i_a64_cfg}, >> { }, >> }; >> MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); >> >
Re: [PATCH RFC v2 2/2] media: platform: pxa_camera: make a standalone v4l2 device
Hi Hans, Hans Verkuil writes: > On 04/02/2016 04:26 PM, Robert Jarzmik wrote: >> diff --git a/drivers/media/platform/soc_camera/pxa_camera.c >> b/drivers/media/platform/soc_camera/pxa_camera.c >> index b8dd878e98d6..30d266bbab55 100644 >> --- a/drivers/media/platform/soc_camera/pxa_camera.c >> +++ b/drivers/media/platform/soc_camera/pxa_camera.c > > When you prepare the final patch series, please put the driver in > drivers/media/platform/pxa-camera and not in the soc-camera directory. Sure. Would you accept the final patch to make the move, so that I keep the bisectability, ie. that all patches are applied while still in ../soc_camera, and then the final one making just the move to .../platform ? >> +if (format->name) >> +strlcpy(f->description, format->name, sizeof(f->description)); > > You can drop this since the core fills in the description. That means the > 'name' field of struct soc_mbus_pixelfmt is not needed either. Ok, let's try this, for v3. >> +static int pxac_vidioc_querycap(struct file *file, void *priv, >> +struct v4l2_capability *cap) >> +{ >> +strlcpy(cap->bus_info, "platform:pxa-camera", sizeof(cap->bus_info)); >> +strlcpy(cap->driver, PXA_CAM_DRV_NAME, sizeof(cap->driver)); >> +strlcpy(cap->card, pxa_cam_driver_description, sizeof(cap->card)); >> +cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; >> +cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; > > Tiny fix: you can drop the capabilities assignment: the v4l2 core does that > for you these days. Well, above kernel v4.7, if I drop the assignement, v4l2-compliance -s finds 2 new errors: Required ioctls: fail: v4l2-compliance.cpp(534): dcaps & ~caps test VIDIOC_QUERYCAP: FAIL Allow for multiple opens: test second video open: OK fail: v4l2-compliance.cpp(534): dcaps & ~caps test VIDIOC_QUERYCAP: FAIL test VIDIOC_G/S_PRIORITY: OK So there is something fishy here if the core provides this data ... >> +static int pxac_vidioc_enum_input(struct file *file, void *priv, >> + struct v4l2_input *i) >> +{ >> +if (i->index > 0) >> +return -EINVAL; >> + >> +memset(i, 0, sizeof(*i)); > > The memset can be dropped, it's cleared for you. OK, for v3. >> +static void pxac_vb2_queue(struct vb2_buffer *vb) >> +{ >> +struct pxa_buffer *buf = vb2_to_pxa_buffer(vb); >> +struct pxa_camera_dev *pcdev = vb2_get_drv_priv(vb->vb2_queue); >> + >> +dev_dbg(pcdev_to_dev(pcdev), >> + "%s(vb=%p) nb_channels=%d size=%lu active=%p\n", >> +__func__, vb, pcdev->channels, vb2_get_plane_payload(vb, 0), >> +pcdev->active); >> + >> +list_add_tail(&buf->queue, &pcdev->capture); >> + >> +pxa_dma_add_tail_buf(pcdev, buf); >> + >> +if (!pcdev->active) >> +pxa_camera_start_capture(pcdev); > > This is normally done from start_streaming. Are you really sure this is the > right > place? I strongly recommend moving this start_capture call. Well, it was at least with the previous framework. Previously this was done here to "hot-queue" a buffer : - if a previous capture was still running, the buffer was queued by pxa_dma_add_tail_buf(), and no restart of the DMA pump was necessary - if the previous capture was finished, a new one was initiated Now if the new framework takes care of that, I can move the pxa_camera_start_capture() into start_streaming(), no problem, let me try in the next patchset. That might take a bit of time because testing both the "hot-queue" and the "queue but hot-queuing missed" is a bit tricky. > You may also want to use the struct vb2queue min_buffers_needed field to > specify > the minimum number of buffers that should be queued up before start_streaming > can > be called. Whether that's needed depends on your DMA engine. I have no minimum required by the pxa dmaengine driver, that's good. >> + >> +v4l2_disable_ioctl(vdev, VIDIOC_G_STD); >> +v4l2_disable_ioctl(vdev, VIDIOC_S_STD); >> +v4l2_disable_ioctl(vdev, VIDIOC_ENUMSTD); > > I don't think this is needed since the tvnorms field of struct video_device > == 0, > signalling that there is no STD support. OK, for v3. Cheers. -- Robert
Re: OOM killer invoked during btrfs send/recieve on otherwise idle machine
[CC Mel and linux-mm] On Sun 31-07-16 07:11:21, Markus Trippelsdorf wrote: > Tonight the OOM killer got invoked during backup of /: > > [Jul31 01:56] kthreadd invoked oom-killer: > gfp_mask=0x27000c0(GFP_KERNEL_ACCOUNT|__GFP_NOTRACK), order=2, oom_score_adj=0 This a kernel stack allocation. > [ +0.04] CPU: 3 PID: 2 Comm: kthreadd Not tainted > 4.7.0-06816-g797cee982eef-dirty #37 > [ +0.00] Hardware name: System manufacturer System Product > Name/M4A78T-E, BIOS 350304/13/2011 > [ +0.02] 813c2d58 8802168e7d48 > 002ec4ea > [ +0.02] 8118eb9d 01b8 0440 > 03b0 > [ +0.02] 8802133fe400 002ec4ea 81b8ac9c > 0006 > [ +0.01] Call Trace: > [ +0.04] [] ? dump_stack+0x46/0x6e > [ +0.03] [] ? dump_header.isra.11+0x4c/0x1a7 > [ +0.02] [] ? oom_kill_process+0x2ab/0x460 > [ +0.01] [] ? out_of_memory+0x2e3/0x380 > [ +0.02] [] ? > __alloc_pages_slowpath.constprop.124+0x1d32/0x1e40 > [ +0.01] [] ? __alloc_pages_nodemask+0x10c/0x120 > [ +0.02] [] ? copy_process.part.72+0xea/0x17a0 > [ +0.02] [] ? pick_next_task_fair+0x915/0x1520 > [ +0.01] [] ? kthread_flush_work_fn+0x20/0x20 > [ +0.01] [] ? kernel_thread+0x7a/0x1c0 > [ +0.01] [] ? kthreadd+0xd2/0x120 > [ +0.02] [] ? ret_from_fork+0x1f/0x40 > [ +0.01] [] ? kthread_stop+0x100/0x100 > [ +0.01] Mem-Info: > [ +0.03] active_anon:5882 inactive_anon:60307 isolated_anon:0 >active_file:1523729 inactive_file:223965 isolated_file:0 >unevictable:1970 dirty:130014 writeback:40735 unstable:0 >slab_reclaimable:179690 slab_unreclaimable:8041 >mapped:6771 shmem:3 pagetables:592 bounce:0 >free:11374 free_pcp:54 free_cma:0 > [ +0.04] Node 0 active_anon:23528kB inactive_anon:241228kB > active_file:6094916kB inactive_file:895860kB unevictable:7880kB > isolated(anon):0kB isolated(file):0kB mapped:27084kB dirty:520056kB > writeback:162940kB shmem:12kB writeback_tmp:0kB unstable:0kB pages_scanned:32 > all_unreclaimable? no > [ +0.02] DMA free:15908kB min:20kB low:32kB high:44kB active_anon:0kB > inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB > writepending:0kB present:15992kB managed:15908kB mlocked:0kB > slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB > bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB > [ +0.01] lowmem_reserve[]: 0 3486 7953 7953 > [ +0.04] DMA32 free:23456kB min:4996kB low:8564kB high:12132kB > active_anon:2480kB inactive_anon:10564kB active_file:2559792kB > inactive_file:478680kB unevictable:0kB writepending:365292kB > present:3652160kB managed:3574264kB mlocked:0kB slab_reclaimable:437456kB > slab_unreclaimable:12304kB kernel_stack:144kB pagetables:28kB bounce:0kB > free_pcp:212kB local_pcp:0kB free_cma:0kB > [ +0.01] lowmem_reserve[]: 0 0 4466 4466 > [ +0.03] Normal free:6132kB min:6400kB low:10972kB high:15544kB > active_anon:21048kB inactive_anon:230664kB active_file:3535124kB > inactive_file:417312kB unevictable:7880kB writepending:318020kB > present:4718592kB managed:4574096kB mlocked:7880kB slab_reclaimable:281304kB > slab_unreclaimable:19860kB kernel_stack:2944kB pagetables:2340kB bounce:0kB > free_pcp:0kB local_pcp:0kB free_cma:0kB > [ +0.00] lowmem_reserve[]: 0 0 0 0 > [ +0.02] DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) > 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (U) 3*4096kB (M) = 15908kB > [ +0.05] DMA32: 4215*4kB (UMEH) 319*8kB (UMH) 5*16kB (H) 2*32kB (H) > 2*64kB (H) 1*128kB (H) 0*256kB 1*512kB (H) 1*1024kB (H) 1*2048kB (H) 0*4096kB > = 23396kB > [ +0.06] Normal: 650*4kB (UMH) 4*8kB (UH) 27*16kB (H) 23*32kB (H) > 17*64kB (H) 11*128kB (H) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 6296kB The memory is quite fragmented but there are order-2+ free blocks. They seem to be in the high atomic reserves but we should release them. Is this reproducible? If yes, could you try with the 4.7 kernel please? Keeping the rest of the emil for reference. > [ +0.05] 1749526 total pagecache pages > [ +0.01] 150 pages in swap cache > [ +0.01] Swap cache stats: add 1222, delete 1072, find 2366/2401 > [ +0.00] Free swap = 4091520kB > [ +0.01] Total swap = 4095996kB > [ +0.00] 2096686 pages RAM > [ +0.01] 0 pages HighMem/MovableOnly > [ +0.00] 55619 pages reserved > [ +0.01] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents > oom_score_adj name > [ +0.04] [ 153] 0 153 4087 406 9 3 104 >-1000 udevd > [ +0.01] [ 181] 0 181 5718 1169 15 3 143 >0 syslog-ng > [ +0.01] [ 187] 102 18788789 5137 53 3 663 >0 mpd > [ +0.02] [ 1
[RESEND] [PATCH v9 4/4] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel
Add support for the JDI LT070ME05000 WUXGA DSI panel used in Nexus 7 2013 devices. Programming sequence for the panel is was originally found in the android-msm-flo-3.4-lollipop-release branch from: https://android.googlesource.com/kernel/msm.git And video mode setting is from dsi-panel-jdi-dualmipi1-video.dtsi file in: git://codeaurora.org/kernel/msm-3.10.git LNX.LA.3.6_rb1.27 Cc: Archit Taneja Cc: Rob Clark Cc: Sumit Semwal Cc: John Stultz Cc: Emil Velikov Cc: Thierry Reding Cc: David Airlie Signed-off-by: Sumit Semwal Signed-off-by: John Stultz Signed-off-by: Vinay Simha BN Tested-by: John Stultz Reviewed-by: Emil Velikov --- v1: * sumit ported to drm/panel framework, john cherry-picked to mainline, folded down other fixes from Vinay and Archit, vinay removed interface setting cmd mode, video mode panel selected v2: * incorporated code reviews from theiry, archit code style, alphabetical soring in Makefile, Kconfig, regulator_bulk, arrays of u8, generic helper function, documentation bindings, v3: * dcs backlight support added * tested this panel driver in nexus7 2013 device v4: * backlight interface added in the panel driver * incorporated width_mm and height_mm suggested by rob herring v5: * theirry review comments incorporated panel model naming consistent, alphabetical soring in Kconfig Makefile, MAX_BRIGHTNESS dropped, regulator_names, parameterize panel width and height, descprition for control display, cabc and interface setting, temporary variable removed, consistent error reporting and commit message * removed tear on/off, scanline, since these are required only for command mode panels v6: * emil review comments incorporated PANEL_NUM_REGULATORS dropped, return ret added at necessary places, if checks dropped for backlight and gpios v7: * emil review comments incorporated added ARRAY_SIZE in struct, regulator_bulk_disable in poweroff, gpios checks dropped. some returns cannot be dropped, since drm panel framework return type required. v8: * emil review commnets incorporated for jdi_panel_unprepare, dropped the returns (ref: panel-sharp-lq101r1sx01.c) and for jdi_panel_prepare(panel_on) it does not return prematurely and goes to poweroff if not success * few dev_err's for panel_init v9: * function drm_panel_create_dsi_backlight made as static --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 518 + 3 files changed, 530 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-jdi-lt070me05000.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 1500ab9..62aba97 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -18,6 +18,17 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_JDI_LT070ME05000 + tristate "JDI LT070ME05000 WUXGA DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for JDI DSI video mode + panel as found in Google Nexus 7 (2013) devices. + The panel has a 1200(RGB)×1920 (WUXGA) resolution and uses + 24 bit per pixel. + config DRM_PANEL_SAMSUNG_LD9040 tristate "Samsung LD9040 RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f277eed..a5c7ec0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c new file mode 100644 index 000..517fa89 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -0,0 +1,518 @@ +/* + * Copyright (C) 2016 InforceComputing + * Author: Vinay Simha BN + * + * Copyright (C) 2016 Linaro Ltd + * Author: Sumit Semwal + * + * From internet archives, the panel for Nexus 7 2nd Gen, 2013 model is a + * JDI model LT070ME05000, and its data sheet is at: + * http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MER
Re: 4.7-rc6, ext4, sparc64: Unable to handle kernel paging request at ...
> Just got this on bootup of my Sun T2000: This time I got similar (but with slightly different virtual address) one on the same t2000 on 4.7.0-07753-gc9b95e5. Looks like pointer corruption? [ 70.888080] This architecture does not have kernel memory protection. [ 70.901299] random: fast init done [ 72.796476] Unable to handle kernel paging request at virtual address e000 [ 72.796717] tsk->{mm,active_mm}->context = 00b7 [ 72.796904] tsk->{mm,active_mm}->pgd = 8003f354c000 [ 72.797088] \|/ \|/ "@'/ .. \`@" /_| \__/ |_\ \__U_/ [ 72.797490] udevd(410): Oops [#1] [ 72.797669] CPU: 30 PID: 410 Comm: udevd Not tainted 4.7.0-07753-gc9b95e5 #115 [ 72.797900] task: 8003fd72c440 task.stack: 8003f363c000 [ 72.798090] TSTATE: 11001601 TPC: 00741b00 TNPC: 00741b04 Y: Not tainted [ 72.798396] TPC: <__radix_tree_lookup+0x60/0x1a0> [ 72.798521] g0: 00bcec00 g1: e6e1 g2: 0001 g3: 8064d76f [ 72.798752] g4: 8003fd72c440 g5: 8003fec68000 g6: 8003f363c000 g7: [ 72.798980] o0: 8003fca8b6e0 o1: 8003f3502700 o2: 028d o3: 0010 [ 72.799200] o4: o5: 0040 sp: 8003f363f111 ret_pc: 8003fcda2b40 [ 72.799419] RPC: <0x8003fcda2b40> [ 72.799534] l0: 0292 l1: 0005 l2: 0329 l3: 0005 [ 72.799757] l4: 8003fca8b6e8 l5: 8003f363fa70 l6: 024213ca l7: 024213ca [ 72.799979] i0: 8003fca8b6e8 i1: 0292 i2: i3: [ 72.800196] i4: e6e0 i5: 000a i6: 8003f363f1c1 i7: 00541bac [ 72.800451] I7: <__do_page_cache_readahead+0x6c/0x260> [ 72.800631] Call Trace: [ 72.800751] [00541bac] __do_page_cache_readahead+0x6c/0x260 [ 72.800941] [005351e0] filemap_fault+0x2a0/0x540 [ 72.801127] [006355bc] ext4_filemap_fault+0x1c/0x40 [ 72.801312] [005640c0] __do_fault+0x60/0x100 [ 72.801493] [00569648] handle_mm_fault+0x968/0xdc0 [ 72.801629] [00455aa4] do_sparc64_fault+0x264/0x780 [ 72.801861] [00407c08] sparc64_realfault_common+0x10/0x20 [ 72.801939] Disabling lock debugging due to kernel taint [ 72.802123] Caller[00541bac]: __do_page_cache_readahead+0x6c/0x260 [ 72.802363] Caller[005351e0]: filemap_fault+0x2a0/0x540 [ 72.802546] Caller[006355bc]: ext4_filemap_fault+0x1c/0x40 [ 72.802778] Caller[005640c0]: __do_fault+0x60/0x100 [ 72.802863] Caller[00569648]: handle_mm_fault+0x968/0xdc0 [ 72.803096] Caller[00455aa4]: do_sparc64_fault+0x264/0x780 [ 72.803182] Caller[00407c08]: sparc64_realfault_common+0x10/0x20 [ 72.803412] Caller[70038494]: 0x70038494 [ 72.803525] Instruction DUMP: 80a06001 0267ffec b8087ffe 9e10001c bb36501d ba0f603f 83376000 82006004 > [ 72.333077] Unable to handle kernel paging request at virtual address > fcdf6000 > [ 72.14] tsk->{mm,active_mm}->context = 00ba > [ 72.333517] tsk->{mm,active_mm}->pgd = 8003f3518000 > [ 72.333730] \|/ \|/ > "@'/ .. \`@" > /_| \__/ |_\ > \__U_/ > [ 72.334080] udevd(413): Oops [#1] > [ 72.334328] CPU: 12 PID: 413 Comm: udevd Not tainted 4.7.0-rc6 #113 > [ 72.334427] task: 8003f34b91a0 ti: 8003f354 task.ti: > 8003f354 > [ 72.334558] TSTATE: 000811001604 TPC: 007384e0 TNPC: > 007384e4 Y: Not tainted > [ 72.334721] TPC: <__radix_tree_lookup+0x60/0x1a0> > [ 72.334797] g0: 67e6a970 g1: fcdf6b81 g2: 0001 > g3: a0063cd7 > [ 72.334922] g4: 8003f34b91a0 g5: 8003fea3a000 g6: 8003f354 > g7: > [ 72.335048] o0: 8003fcad5518 o1: 8003fbf25700 o2: 02dc > o3: 0010 > [ 72.335174] o4: o5: 0040 sp: 8003f35430e1 > ret_pc: 8003fcad84a0 > [ 72.335300] RPC: <0x8003fcad84a0> > [ 72.335371] l0: 0329 l1: 000f l2: 8003fcad5520 > l3: 8003f3543a40 > [ 72.335496] l4: 1300 l5: 03ff l6: 000f > l7: 02eb > [ 72.335622] i0: 8003fcad5520 i1: 02eb i2: > i3: > [ 72.335749] i4: fcdf6b80 i5: 000b i6: 8003f3543191 > i7: 0053ef40 > [ 72.335882] I7: <__do_page_cache_readahead+0x60/0x260> > [ 72.335969] Call Trace: > [ 72.336043] [0053ef40] __do_page_cache_readahead+0x60/0x260 > [ 72.336148] [00532500] filemap_faul
Re: [PATCH 2/3] phy: sun4i: add support for A64 usb phy
Hi, On 31-07-16 16:50, Chen-Yu Tsai wrote: FYI: H3 USB PHY support is not complete. USB0 PHY is not supported, and it does not work. I did a preliminary comparison of this PHY driver and the code in Allwinner's SDK. There are some bits missing. Right that is a known issue, I believe someone was working on an otg support patch series for the H3 though ? Regards, Hans
[RESEND] [PATCH 1/4] dt-bindings: Add Japan Display Inc vendor id
Add vendor id for Japan Display Inc. Cc: Archit Taneja Cc: John Stultz Cc: Thierry Reding Cc: Sumit Semwal Signed-off-by: Vinay Simha BN Acked-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index ecc8cf4..1b134f3 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -138,6 +138,7 @@ invensense InvenSense Inc. isee ISEE 2007 S.L. isil Intersil issi Integrated Silicon Solutions Inc. +jdiJapan Display Inc. jedec JEDEC Solid State Technology Association karo Ka-Ro electronics GmbH keymileKeymile GmbH -- 2.1.2
[RFC PATCH 2/3] Add generation of Module.ksymb file in streamline_config.pl
Add generation of ./scripts/mod/Module.ksymb file containing associations of driver file names and corresponding CONFIG_* symbol. This file will be used by modpost to peg kconfig CONFIG_* symbol to its corresponding module. This information will be further exposed in userspace for extracting build options for the required modules. This approach faces the following limitations: * in some cases there are more than one CONFIG_* option for certain objects. This happens for the objects that are part of more CONFIGs. Thus, all configs are returned for this object names. For example, the mapping for clk_div6 is CONFIG_ARCH_R8A73A4, CONFIG_ARCH_R8A7793 and many others. * in some cases the driver file name does not match the registered name for the module. For example: Driver filename Module name --- lineage-pem[.o] lineage_pem phy-ab8500-usb[.o] abx5x0-usb ehci-mxc[.o]mxc-ehci etc. There is no naming rule / standard between the driver name and the registered module name. This patch is part of a research project within Google Summer of Code of porting 'make localmodconfig' for backported drivers. Signed-off-by: Cristina Moraru --- scripts/kconfig/streamline_config.pl | 20 1 file changed, 20 insertions(+) diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index b8c7b29..4833ede 100755 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -147,6 +147,7 @@ my %objects; my $var; my $iflevel = 0; my @ifdeps; +my @drv_objs; # prevent recursion my %read_kconfigs; @@ -341,6 +342,10 @@ foreach my $makefile (@makefiles) { # The objects have a hash mapping to a reference # of an array of configs. $objects{$1} = \@arr; + # Save objects corresponding to driver Makefiles + if (index($makefile, "./drivers/") == 0) { + push(@drv_objs, substr($obj, 0, -2)); + } } } } @@ -348,6 +353,21 @@ foreach my $makefile (@makefiles) { close($infile); } +sub gen_module_kconfigs { + + my $module_ksymb = $ENV{'objtree'}."/scripts/mod/Module.ksymb"; + my $key; + + open(my $ksymbfile, '>', $module_ksymb) || die "Can not open $module_ksymb for writing"; + + foreach (@drv_objs) { + print $ksymbfile "$_ " . "@{$objects{$_}}\n"; + } + close $ksymbfile; +} + +gen_module_kconfigs(); + my %modules; my $linfile; -- 2.7.4
[RESEND] [PATCH v2 2/4] dt-bindings: Add jdi lt070me05000 panel bindings
Add documentation for lt070me05000 panel Cc: Archit Taneja Cc: John Stultz Cc: Thierry Reding Cc: Sumit Semwal Signed-off-by: Vinay Simha BN Acked-by: Rob Herring --- v2: * incorporated rob herring and thierry reviews gpio to gpios, gpio to regulator using fixed regulators and pwm backlight is removed, since it is controlled by dcs commands --- .../bindings/display/panel/jdi,lt070me05000.txt| 57 ++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt diff --git a/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt b/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt new file mode 100644 index 000..613b76f --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt @@ -0,0 +1,57 @@ +JDI model LT070ME05000 1200x1920 7" DSI Panel + +Required properties: +- compatible: should be "jdi,lt070me05000" +- vddp-supply: phandle of the regulator that provides the supply voltage + Power IC supply (3-5V) +- dcdc_en-supply: phandle of the regulator that provides the supply voltage + Power IC supply enable, High active +- vcc-supply: phandle of the regulator that provides the supply voltage + IOVCC , power supply for LCM (1.8V) +- reset-gpios: phandle of gpio for reset line + This should be 8mA, gpio can be configured using mux, pinctrl, pinctrl-names + XRES, Reset, Low active +- enable-gpios: phandle of gpio for enable line + LED_EN, LED backlight enable, High active + +Example: + + vcc_1p8v: regulator-fixed@2 { + compatible = "regulator-fixed"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-name = "vcc_1p8v"; + regulator-type = "voltage"; + startup-delay-us = <0>; + gpio = <&pm8921_gpio 23 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; + + tlmm_pinmux: pinctrl@80 { + + dsi_panel_pinctrl: dsi-panel-pinctrl { + mux { + pins = "gpio54"; + function = "gpio"; + bias-pull-up; + drive-strength = <8>; + }; + }; + }; + + dsi0: qcom,mdss_dsi@470 { + panel@0 { + compatible = "jdi,lt070me05000"; + reg = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi_panel_pinctrl>; + + vddp-supply = <&pm8921_l17>; + dcdc_en-supply = <&pm8921_lvs7>; + vcc-supply = <&vcc_1p8v>; + + reset-gpios = <&tlmm_pinmux 54 0>; + enable-gpios = <&pm8921_gpio 36 GPIO_ACTIVE_HIGH>; + }; + }; -- 2.1.2
[RFC PATCH 0/3] Add kconfig symbol as module attribute
This patchset implements dynamic pegging of kconfig symbol into driver modinfo section * adds a kconfig symbol attribute to struct module * updates streamline_config.pl to generate the auxiliary file scripts/mod/Module.ksymb containing associations of driver file names and corresponding kconfig symbols CONFIG_* * updates modpost to use the information from Module.ksymb to add the content of the attribute kconfig_symbol. Please note that this patchset is part of a research and currently does not provide complete correctness or efficiency. The result of this patchset is the following: the attribute kconfig_symbol is added but only for some modules, namely for those for which the module name corresponds to the source file name of the driver. This has been observed by the fact that there are more srcversion attributes than kconfig_symbol. This happens mostly because, in some cases, the driver name does not match the registered module name (more details in the the PATCH2 commit message). Also, in file Module.ksymb some object names have more than one CONFIG_* symbol. This is because that object it may be a platform independent component that is linked to more than one driver. So, all CONFIGs in which is found appear as associated with this object. However, I'm guessing this doesn't happen for final individual modules. Currently, for the sake of the proof of concept, the first of the CONFIG_* options is considered. Usage: First run 'make localmodconfig' in order to generate the .config file and Module.ksymb file with the associations. Then compile the kernel. In the machine booted with this kernel kconfig_symbol attributes should appear in /sys instances of the modules. Thanks, Cristina Cristina Moraru (3): Add kconfig_symbol attribute to struct module Add generation of Module.ksymb file in streamline_config.pl Add dynamic pegging of Kconfig symbol include/linux/module.h | 1 + kernel/module.c | 1 + scripts/kconfig/streamline_config.pl | 20 +++ scripts/mod/modpost.c| 47 scripts/mod/modpost.h| 1 + 5 files changed, 70 insertions(+) -- 2.7.4
[RFC PATCH 3/3] Add dynamic pegging of Kconfig symbol
Update modpost to add dynamic pegging of CONFIG_* symbol from file ./scripts/mod/Module.ksymb into kconfig_symbol attribute of struct module. This information will be further exposed in userspace for extracting build options for the required modules. Note: this patch is part of a proof of concept and does not represent the final version. This patch is part of a research project within Google Summer of Code of porting 'make localmodconfig' for backported drivers. Signed-off-by: Cristina Moraru --- scripts/mod/modpost.c | 47 +++ scripts/mod/modpost.h | 1 + 2 files changed, 48 insertions(+) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 48958d3..d80c062 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -42,6 +42,8 @@ static int sec_mismatch_fatal = 0; /* ignore missing files */ static int ignore_missing_files; +#define MOD_KSYMB_FILENAME "scripts/mod/Module.ksymb" + enum export { export_plain, export_unused, export_gpl, export_unused_gpl, export_gpl_future, export_unknown @@ -2245,6 +2247,50 @@ static void add_srcversion(struct buffer *b, struct module *mod) } } +static void get_kconfig_symbol(struct module *mod) { + + unsigned long size, pos = 0; + void *file = grab_file(MOD_KSYMB_FILENAME, &size); + char *line, *short_name; + + if (!file) + return; + + short_name = strrchr(mod->name, '/'); + short_name++; + + while ((line = get_next_line(&pos, file, size))) { + char *modname, *kconfig_symbol, *p; + + modname = line; + if (!(p = strchr(line, ' '))) + goto fail; + *p++ = '\0'; + if (!strcmp(short_name, modname)) { + kconfig_symbol = p; + if ((p = strchr(kconfig_symbol, ' '))) + *p = '\0'; + strcpy(mod->kconfig_symbol, kconfig_symbol); + break; + } + } + release_file(file, size); + return; +fail: + release_file(file, size); + fatal("parse error in Module.ksymb file\n"); +} + +static void add_kconfig_symbol(struct buffer *b, struct module *mod) +{ + get_kconfig_symbol(mod); + if (mod->kconfig_symbol[0]) { + buf_printf(b, "\n"); + buf_printf(b, "MODULE_INFO(kconfig_symbol, \"%s\");\n", + mod->kconfig_symbol); + } +} + static void write_if_changed(struct buffer *b, const char *fname) { char *tmp; @@ -2478,6 +2524,7 @@ int main(int argc, char **argv) add_depends(&buf, mod, modules); add_moddevtable(&buf, mod); add_srcversion(&buf, mod); + add_kconfig_symbol(&buf, mod); sprintf(fname, "%s.mod.c", mod->name); write_if_changed(&buf, fname); diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 6a5e151..1ba48b1 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -119,6 +119,7 @@ struct module { int has_cleanup; struct buffer dev_table_buf; char srcversion[25]; + char kconfig_symbol[50]; int is_dot_o; }; -- 2.7.4
[RFC PATCH 1/3] Add kconfig_symbol attribute to struct module
Create additional attribute in struct module in order for each module to store its associate kconfig CONFIG_* symbol. The goal is to enable each module to expose in /sys its corresponding CONFIG_* option. The value of this attribute will be dynamically pegged by modpost without requiring extra work from the driver developers. Further, this information will be used by a hardware interogation tool to extract build information about the existent devices. This patch is part of a research project within Google Summer of Code of porting 'make localmodconfig' for backported drivers. Signed-off-by: Cristina Moraru --- include/linux/module.h | 1 + kernel/module.c| 1 + 2 files changed, 2 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h index 3daf2b3..bef5e44 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -353,6 +353,7 @@ struct module { struct module_attribute *modinfo_attrs; const char *version; const char *srcversion; + const char *kconfig_symbol; struct kobject *holders_dir; /* Exported symbols */ diff --git a/kernel/module.c b/kernel/module.c index 5f71aa6..4463c6c 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -757,6 +757,7 @@ static struct module_attribute modinfo_##field = { \ MODINFO_ATTR(version); MODINFO_ATTR(srcversion); +MODINFO_ATTR(kconfig_symbol); static char last_unloaded_module[MODULE_NAME_LEN+1]; -- 2.7.4
[PATCH] Staging: android: ion: ion.c: Compression of lines for
This patch compresses two lines in to a single line in file ion.c if immediate return statement is found.It also removes variable ret as it is no longer needed. ne using script Coccinelle. And coccinelle uses following semantic patch for this compression function: @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Nadim Almas --- drivers/staging/android/ion/ion.c | 8 +++- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 52345df..271395b 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle) { - int ret; - ret = kref_put(&handle->ref, ion_handle_destroy); - - return ret; + return kref_put(&handle->ref, ion_handle_destroy); } static int ion_handle_put(struct ion_handle *handle) @@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle *handle, return -ENODEV; } mutex_unlock(&client->lock); - ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len); - return ret; + return buffer->heap->ops->phys(buffer->heap, buffer, addr, len); } EXPORT_SYMBOL(ion_phys); -- 2.7.4
Re: OOM killer invoked during btrfs send/recieve on otherwise idle machine
On 2016.07.31 at 17:10 +0200, Michal Hocko wrote: > [CC Mel and linux-mm] > > On Sun 31-07-16 07:11:21, Markus Trippelsdorf wrote: > > Tonight the OOM killer got invoked during backup of /: > > > > [Jul31 01:56] kthreadd invoked oom-killer: > > gfp_mask=0x27000c0(GFP_KERNEL_ACCOUNT|__GFP_NOTRACK), order=2, > > oom_score_adj=0 > > This a kernel stack allocation. > > > [ +0.04] CPU: 3 PID: 2 Comm: kthreadd Not tainted > > 4.7.0-06816-g797cee982eef-dirty #37 > > [ +0.00] Hardware name: System manufacturer System Product > > Name/M4A78T-E, BIOS 350304/13/2011 > > [ +0.02] 813c2d58 8802168e7d48 > > 002ec4ea > > [ +0.02] 8118eb9d 01b8 0440 > > 03b0 > > [ +0.02] 8802133fe400 002ec4ea 81b8ac9c > > 0006 > > [ +0.01] Call Trace: > > [ +0.04] [] ? dump_stack+0x46/0x6e > > [ +0.03] [] ? dump_header.isra.11+0x4c/0x1a7 > > [ +0.02] [] ? oom_kill_process+0x2ab/0x460 > > [ +0.01] [] ? out_of_memory+0x2e3/0x380 > > [ +0.02] [] ? > > __alloc_pages_slowpath.constprop.124+0x1d32/0x1e40 > > [ +0.01] [] ? __alloc_pages_nodemask+0x10c/0x120 > > [ +0.02] [] ? copy_process.part.72+0xea/0x17a0 > > [ +0.02] [] ? pick_next_task_fair+0x915/0x1520 > > [ +0.01] [] ? kthread_flush_work_fn+0x20/0x20 > > [ +0.01] [] ? kernel_thread+0x7a/0x1c0 > > [ +0.01] [] ? kthreadd+0xd2/0x120 > > [ +0.02] [] ? ret_from_fork+0x1f/0x40 > > [ +0.01] [] ? kthread_stop+0x100/0x100 > > [ +0.01] Mem-Info: > > [ +0.03] active_anon:5882 inactive_anon:60307 isolated_anon:0 > >active_file:1523729 inactive_file:223965 isolated_file:0 > >unevictable:1970 dirty:130014 writeback:40735 unstable:0 > >slab_reclaimable:179690 slab_unreclaimable:8041 > >mapped:6771 shmem:3 pagetables:592 bounce:0 > >free:11374 free_pcp:54 free_cma:0 > > [ +0.04] Node 0 active_anon:23528kB inactive_anon:241228kB > > active_file:6094916kB inactive_file:895860kB unevictable:7880kB > > isolated(anon):0kB isolated(file):0kB mapped:27084kB dirty:520056kB > > writeback:162940kB shmem:12kB writeback_tmp:0kB unstable:0kB > > pages_scanned:32 all_unreclaimable? no > > [ +0.02] DMA free:15908kB min:20kB low:32kB high:44kB active_anon:0kB > > inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB > > writepending:0kB present:15992kB managed:15908kB mlocked:0kB > > slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB > > bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB > > [ +0.01] lowmem_reserve[]: 0 3486 7953 7953 > > [ +0.04] DMA32 free:23456kB min:4996kB low:8564kB high:12132kB > > active_anon:2480kB inactive_anon:10564kB active_file:2559792kB > > inactive_file:478680kB unevictable:0kB writepending:365292kB > > present:3652160kB managed:3574264kB mlocked:0kB slab_reclaimable:437456kB > > slab_unreclaimable:12304kB kernel_stack:144kB pagetables:28kB bounce:0kB > > free_pcp:212kB local_pcp:0kB free_cma:0kB > > [ +0.01] lowmem_reserve[]: 0 0 4466 4466 > > [ +0.03] Normal free:6132kB min:6400kB low:10972kB high:15544kB > > active_anon:21048kB inactive_anon:230664kB active_file:3535124kB > > inactive_file:417312kB unevictable:7880kB writepending:318020kB > > present:4718592kB managed:4574096kB mlocked:7880kB > > slab_reclaimable:281304kB slab_unreclaimable:19860kB kernel_stack:2944kB > > pagetables:2340kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB > > [ +0.00] lowmem_reserve[]: 0 0 0 0 > > [ +0.02] DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) > > 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (U) 3*4096kB (M) = 15908kB > > [ +0.05] DMA32: 4215*4kB (UMEH) 319*8kB (UMH) 5*16kB (H) 2*32kB (H) > > 2*64kB (H) 1*128kB (H) 0*256kB 1*512kB (H) 1*1024kB (H) 1*2048kB (H) > > 0*4096kB = 23396kB > > [ +0.06] Normal: 650*4kB (UMH) 4*8kB (UH) 27*16kB (H) 23*32kB (H) > > 17*64kB (H) 11*128kB (H) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 6296kB > > The memory is quite fragmented but there are order-2+ free blocks. They > seem to be in the high atomic reserves but we should release them. > Is this reproducible? If yes, could you try with the 4.7 kernel please? It never happened before and it only happend once yet. I will continue to run the latest git kernel and let you know if it happens again. (I did copy several git trees to my root partition yesterday, so the incremental btrfs stream was larger than usual.) -- Markus
Re: [PATCH v5 2/2] clocksource: add J-Core timer/clocksource driver
On Thu, Jul 28, 2016 at 04:18:44PM -0400, Rich Felker wrote: > On Thu, Jul 28, 2016 at 04:00:47PM -0400, Rich Felker wrote: > > On Thu, Jul 28, 2016 at 04:44:05PM +0200, Thomas Gleixner wrote: > > > > +static int jcore_pit_cpu_notify(struct notifier_block *self, > > > > + unsigned long action, void *hcpu) > > > > +{ > > > > + struct jcore_pit_nb *nb = container_of(self, struct > > > > jcore_pit_nb, nb); > > > > + switch (action & ~CPU_TASKS_FROZEN) { > > > > + case CPU_STARTING: > > > > + jcore_pit_local_init(this_cpu_ptr(nb->pit_percpu)); > > > > + break; > > > > + } > > > > + return NOTIFY_OK; > > > > > > Please convert this to the new state machine model of cpu > > > hotplug. CPU_STARTING will be gone very soon. Here is an example: > > > > > > http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=smp/hotplug&id=7e86e8bd8dd67649d176e08d8dfb90039f0a1e98 > > > > Trying this change now and I'm getting hangs inside > > cpuhp_invoke_ap_callback between wake_up_process and > > wait_for_completion. I suspect it's not possible to run a scheduled > > task yet because there's no timer yet, or something like that. Do I > > need further infrastructure from tip that's not upstream yet in order > > to test this? I just rebased on linus/master and still have the same > > problem, but none of the other driver changes are in Linus's tree yet. > > Following the other drivers in tip (again, I don't have any of these > > in my tree), I put the new state between CPUHP_AP_SCHED_STARTING and > > CPUHP_AP_NOTIFY_STARTING; is this correct? > > I think it's this bug where the fix is not yet in Linus's tree: > > http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/kernel/cpu.c?h=smp/hotplug&id=6a4e24518c8a10f78f44da219835239cb5aca90d > > Cherry-picking that made it work. FWIW, it's really hard to do > development on top of new infrastructure that's not yet working in any > tree that's intended for others to pull, but I made it work and I'll > have a new version of the patch for you soon. I hit some more snags with rcu_sched stalls that I thought were my fault, but it looks like it's actually something in the linus/master I had to rebase on (I've tagged the revision locally in case this is something we need to track later). They happen equally with or without my latest changes for the notify_nb -> cpuhp transition and other requested changes to the pit driver. Rich
[RESEND] [PATCH v3 3/4] drm/dsi: Implement dcs set/get display brightness
Provide a small convenience wrapper that set/get the display brightness value Cc: John Stultz Cc: Sumit Semwal Cc: Archit Taneja Cc: Rob Clark Cc: Jani Nikula Cc: Thierry Reding Cc: Emil Velikov Signed-off-by: Vinay Simha BN Reviewed-by: Emil Velikov --- v1: *tested in nexus7 2nd gen. v2: * implemented jani review comments -functions name mapped accordingly -bl value increased from 0xff to 0x -backlight interface will be handled in panel driver, so it is moved from the mipi_dsi helper function v3: * emil review comments (err < 0) supposed to be (err <= 0) --- drivers/gpu/drm/drm_mipi_dsi.c | 49 ++ include/drm/drm_mipi_dsi.h | 4 2 files changed, 53 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index af0d471..43aa743 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -1041,6 +1041,55 @@ int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format) } EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format); +/** + * mipi_dsi_dcs_get_display_brightness() - gets the current brightness value + * of the display + * @dsi: DSI peripheral device + * @brightness: brightness value + * + * Return: 0 on success or a negative error code on failure. + */ +int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi, + u16 *brightness) +{ + ssize_t err; + + err = mipi_dsi_dcs_read(dsi, MIPI_DCS_GET_DISPLAY_BRIGHTNESS, + brightness, sizeof(*brightness)); + if (err <= 0) { + if (err == 0) + err = -ENODATA; + + return err; + } + + return 0; +} +EXPORT_SYMBOL(mipi_dsi_dcs_get_display_brightness); + +/** + * mipi_dsi_dcs_set_display_brightness() - sets the brightness value of + * the display + * @dsi: DSI peripheral device + * @brightness: brightness value + * + * Return: 0 on success or a negative error code on failure. + */ +int mipi_dsi_dcs_set_display_brightness(struct mipi_dsi_device *dsi, + u16 brightness) +{ + ssize_t err; + u8 bl_value[2] = { brightness & 0xff, brightness >> 8 }; + + err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, +bl_value, sizeof(bl_value)); + if (err < 0) + return err; + + return 0; +} +EXPORT_SYMBOL(mipi_dsi_dcs_set_display_brightness); + static int mipi_dsi_drv_probe(struct device *dev) { struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver); diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 47ac925..404c373 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -270,6 +270,10 @@ int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi); int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi, enum mipi_dsi_dcs_tear_mode mode); int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format); +int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi, + u16 *brightness); +int mipi_dsi_dcs_set_display_brightness(struct mipi_dsi_device *dsi, + u16 brightness); /** * struct mipi_dsi_driver - DSI driver -- 2.1.2
[GIT PULL] MMC for v.4.8
Hi Linus, Here's the PR for MMC v4.8 - sorry for being late! Details about the highlights are as usual found in the signed tag. Please pull this in! Kind regards Ulf Hansson The following changes since commit 523d939ef98fd712632d93a5a2b588e477a7565e: Linux 4.7 (2016-07-24 12:23:50 -0700) are available in the git repository at: git://git.linaro.org/people/ulf.hansson/mmc.git tags/mmc-v4.8 for you to fetch changes up to 6ea6257945188ff7f5d1670d5adc964ac78c590c: mmc: rtsx_pci: Remove deprecated create_singlethread_workqueue (2016-07-29 11:29:05 +0200) MMC core: - A couple of changes to improve the support for erase/discard/trim cmds - Add eMMC HS400 enhanced strobe support - Show OCR and DSR registers in SYSFS for MMC/SD cards - Correct and improve busy detection logic for MMC switch (CMD6) cmds - Disable HPI cmds for certain broken Hynix eMMC cards - Allow MMC hosts to specify non-support for SD and MMC cmds - Some minor additional fixes MMC host: - sdhci: Re-works, fixes and clean-ups - sdhci: Add HW auto re-tuning support - sdhci: Re-factor code to prepare for adding support for eMMC CMDQ - sdhci-esdhc-imx: Fixes and clean-ups - sdhci-esdhc-imx: Update system PM support - sdhci-esdhc-imx: Enable HW auto re-tuning - sdhci-bcm2835: Remove driver as sdhci-iproc is used instead - sdhci-brcmstb: Add new driver for Broadcom BRCMSTB SoCs - sdhci-msm: Add support for UHS cards - sdhci-tegra: Improve support for UHS cards - sdhci-of-arasan: Update phy support for Rockchip SoCs - sdhci-of-arasan: Deploy enhanced strobe support - dw_mmc: Some fixes and clean-ups - dw_mmc: Enable support for erase/discard/trim cmds - dw_mmc: Enable CMD23 support - mediatek: Some fixes related to the eMMC HS400 support - sh_mmcif: Improve support for HW busy detection - rtsx_pci: Enable support for erase/discard/trim cmds Adrian Hunter (27): mmc: sdhci: Fix sdhci_card_busy() mmc: block: Fix tag condition with packed writes mmc: sdhci: Do not call implementations of mmc host ops directly mmc: sdhci: Split sdhci_add_host() mmc: sdhci: Make signal voltage support explicit mmc: sdhci: Tidy caps variables in sdhci_setup_host() mmc: sdhci: Add sdhci_read_caps() mmc: sdhci-pci: Do not runtime suspend at the end of sdhci_pci_probe() mmc: sdhci: Move busy signal handling into sdhci_finish_cmd() mmc: sdhci: Get rid of redundant BUG_ONs mmc: sdhci: Simplify sdhci_finish_command() by clearing host->cmd at the start mmc: sdhci: Record what command is using the data lines mmc: sdhci: Get rid of host->busy_handle mmc: sdhci: Reduce the use of host->mrq mmc: sdhci: Move host->data warning mmc: sdhci: Factor out sdhci_finish_mrq() mmc: sdhci: Factor out sdhci_needs_reset() mmc: sdhci: Track whether a reset is pending mmc: sdhci: Clear pointers when a request finishes mmc: sdhci: Ensure all requests get errored out mmc: sdhci: Factor out sdhci_data_line_cmd() mmc: sdhci: Separate timer timeout for command and data requests mmc: sdhci: Allow for finishing multiple requests mmc: sdhci: Factor out sdhci_auto_cmd12() mmc: sdhci: Do not reset cmd or data circuits that are in use mmc: sdhci: Avoid STOP cmd triggering warning in sdhci_send_command() mmc: sdhci: sdhci_execute_tuning() must delete timer Al Cooper (2): mmc: DT: sdhci-brcmstb: Add device tree bindings mmc: sdhci-brcmstb: Add driver for Broadcom BRCMSTB SoCs Andy Shevchenko (2): mmc: sdhci-pci: Convert to use managed functions pcim_* and devm_* sdhci-pci: Use MRFLD as abbreviation of Merrifield Baolin Wang (1): mmc: Change the max discard sectors and erase response when HW busy detect Ben Dooks (1): mmc: dw_mmc: fix 32bit little-endian access of des1 field Bhaktipriya Shridhar (1): mmc: rtsx_pci: Remove deprecated create_singlethread_workqueue Bojan Prtvar (2): mmc: core: Extend sysfs with OCR register mmc: core: Extend sysfs with DSR register Brian Norris (2): phy: rockchip-emmc: configure default output tap delay phy: rockchip-emmc: reindent the register definitions Chaotian Jing (7): mmc: mmc: Use ->card_busy() to detect busy cards in __mmc_switch() mmc: mmc: do not use CMD13 to get status after speed mode switch mmc: mmc: fix switch timeout issue caused by jiffies precision mmc: mediatek: do not tune data for HS400 mode mmc: mediatek: fix CRC error when calling mmc_select_hs400() mmc: mediatek: fix CMD21/CMD19 timeout issue mmc: mediatek: perfer to use rise edge latching Chuanxiao Dong (1): mmc: sdhci: use pr_err for sdhci_dumpregs Colin Ian King (1): mmc: sdhci-msm: fix spelling mistake: "Perpheral" -> "Peripheral" Dong Aisheng (15):
Re: [PATCH] net: thunderx: correct bound check in nic_config_loopback
Thanks for finding. A much better fix would be, - if (lbk->vf_id > MAX_LMAC) + if (lbk->vf_id >= nic->num_vf_en) return -1; where 'num_vf_en' reflects the exact number of physical interfaces or LMACs on the system. Thanks, Sunil.
Re: [PATCH v3 00/15] net: thunderx: Add support for 81xx and 83xx
A gentle reminder. David, Let me know if I need to resubmit the patches on top of latest net-next. Will do that. Thanks, Sunil.
Re: [PATCH v2 1/7] random: Simplify API for random address requests
On Sat, Jul 30, 2016 at 8:42 AM, Jason Cooper wrote: > To date, all callers of randomize_range() have set the length to 0, and > check for a zero return value. For the current callers, the only way > to get zero returned is if end <= start. Since they are all adding a > constant to the start address, this is unnecessary. > > We can remove a bunch of needless checks by simplifying the API to do > just what everyone wants, return an address between [start, start + > range). > > While we're here, s/get_random_int/get_random_long/. No current call > site is adversely affected by get_random_int(), since all current range > requests are < UINT_MAX. However, we should match caller expectations > to avoid coming up short (ha!) in the future. > > All current callers to randomize_range() chose to use the start address > if randomize_range() failed. Therefore, we simplify things by just > returning the start address on error. > > randomize_range() will be removed once all callers have been converted > over to randomize_addr(). > > Signed-off-by: Jason Cooper > --- > Changes from v1: > - Explicitly mention page_aligned start assumption (Yann Droneaud) > - pick random pages vice random addresses (Yann Droneaud) > - catch range=0 last > > drivers/char/random.c | 28 > include/linux/random.h | 1 + > 2 files changed, 29 insertions(+) > > diff --git a/drivers/char/random.c b/drivers/char/random.c > index 0158d3bff7e5..3bedf69546d6 100644 > --- a/drivers/char/random.c > +++ b/drivers/char/random.c > @@ -1840,6 +1840,34 @@ randomize_range(unsigned long start, unsigned long > end, unsigned long len) > return PAGE_ALIGN(get_random_int() % range + start); > } > > +/** > + * randomize_addr - Generate a random, page aligned address > + * @start: The smallest acceptable address the caller will take. > + * @range: The size of the area, starting at @start, within which the > + * random address must fall. > + * > + * If @start + @range would overflow, @range is capped. > + * > + * NOTE: Historical use of randomize_range, which this replaces, presumed > that > + * @start was already page aligned. This assumption still holds. > + * > + * Return: A page aligned address within [start, start + range). On error, > + * @start is returned. > + */ > +unsigned long > +randomize_addr(unsigned long start, unsigned long range) Since we're changing other things about this, let's try to document its behavior in its name too and call this "randomize_page" instead. If it requires a page-aligned value, we should probably also BUG_ON it, or adjust the start too. -Kees > +{ > + if (start > ULONG_MAX - range) > + range = ULONG_MAX - start; > + > + range >>= PAGE_SHIFT; > + > + if (range == 0) > + return start; > + > + return start + (get_random_long() % range << PAGE_SHIFT); > +} > + > /* Interface for in-kernel drivers of true hardware RNGs. > * Those devices may produce endless random bits and will be throttled > * when our pool is full. > diff --git a/include/linux/random.h b/include/linux/random.h > index e47e533742b5..f1ca2fa4c071 100644 > --- a/include/linux/random.h > +++ b/include/linux/random.h > @@ -35,6 +35,7 @@ extern const struct file_operations random_fops, > urandom_fops; > unsigned int get_random_int(void); > unsigned long get_random_long(void); > unsigned long randomize_range(unsigned long start, unsigned long end, > unsigned long len); > +unsigned long randomize_addr(unsigned long start, unsigned long range); > > u32 prandom_u32(void); > void prandom_bytes(void *buf, size_t nbytes); > -- > 2.9.2 > -- Kees Cook Chrome OS & Brillo Security
Re: [PATCH] qed: Add and use specific logging functions to reduce object size
On Wed, 2016-07-27 at 07:24 +, Yuval Mintz wrote: > > > > Current DP_ macros generate a lot of code. > > Using functions with vsprintf extension %pV helps reduce that size. > > > > drivers/net/ethernet/qlogic/qed/Makefile | 2 +- > > drivers/net/ethernet/qlogic/qed/qed_util.c | 82 > > ++ > > include/linux/qed/qed_if.h | 60 +- > > 3 files changed, 106 insertions(+), 38 deletions(-) create mode 100644 > > drivers/net/ethernet/qlogic/qed/qed_util.c > This won't compile when CONFIG_QED*=m, as qede can't link to > the new qed_{err, verbose, info, notice} functions. > That was the original reason for putting the macros in the interface > header. > > Other alternatives: > - We can EXPORT_SYMBOL() the functions, although we've taken a > strain not adding such to the interface. > - Code duplication between qed/qede [ugly]. > - Implementing this in qede via the interface functions with qed; > But the notion of defining an interface between 2 modules passing > va_args seems [to me] like a bad one. > > If you have cleaner solutions, I'd be happy to hear those. Hello Yuval. EXPORT_SYMBOL is probably the simplest solution. It's pretty commonly used for private logging functions in drivers/net/, e.g.: drivers/net/wireless/ath/main.c I'll submit that in awhile. cheers, Joe
Re: [PATCH v5 6/8] thunderbolt: Networking transmit and receive
From: "Levy, Amir (Jer)" Date: Sun, 31 Jul 2016 10:15:52 + > The network stack thinks it is Ethernet, it might not accept Runt > frames, so the driver pads the frame in receive. The network stack doesn't care about this at all. It's wasted effort on your part.
arch/ia64/kernel/ivt.S:759: Error: Operand 3 of `add' should be a general register r0-r3
Hi Will, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c9b95e5961c0294e0efffeaa847c1a1e6369204c commit: da48d094ce5d7c7dcdad9011648a81c42fd1c2ef Kconfig: remove HAVE_LATENCYTOP_SUPPORT date: 7 months ago config: ia64-allyesconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout da48d094ce5d7c7dcdad9011648a81c42fd1c2ef # save the attached .config to linux build tree make.cross ARCH=ia64 All errors (new ones prefixed by >>): arch/ia64/kernel/ivt.S: Assembler messages: >> arch/ia64/kernel/ivt.S:759: Error: Operand 3 of `add' should be a general >> register r0-r3 -- arch/ia64/kernel/entry.S: Assembler messages: >> arch/ia64/kernel/entry.S:621: Error: Operand 2 of `adds' should be a 14-bit >> integer (-8192-8191) arch/ia64/kernel/entry.S:728: Error: Operand 2 of `adds' should be a 14-bit integer (-8192-8191) arch/ia64/kernel/entry.S:859: Error: Operand 2 of `adds' should be a 14-bit integer (-8192-8191) -- arch/ia64/kernel/fsys.S: Assembler messages: >> arch/ia64/kernel/fsys.S:67: Error: Operand 3 of `add' should be a general >> register r0-r3 arch/ia64/kernel/fsys.S:97: Error: Operand 3 of `add' should be a general register r0-r3 arch/ia64/kernel/fsys.S:193: Error: Operand 3 of `add' should be a general register r0-r3 arch/ia64/kernel/fsys.S:336: Error: Operand 3 of `add' should be a general register r0-r3 arch/ia64/kernel/fsys.S:338: Error: Operand 3 of `add' should be a general register r0-r3 vim +759 arch/ia64/kernel/ivt.S f8fa5448 David Mosberger-Tang 2005-04-27 743 nop.m 0 // M f8fa5448 David Mosberger-Tang 2005-04-27 744 mov r20=r1 // Asave r1 f8fa5448 David Mosberger-Tang 2005-04-27 745 f8fa5448 David Mosberger-Tang 2005-04-27 746 nop.m 0 f8fa5448 David Mosberger-Tang 2005-04-27 747 movl r30=sys_call_table // X f8fa5448 David Mosberger-Tang 2005-04-27 748 498c5170 Isaku Yamahata 2008-05-19 749 MOV_FROM_IIP(r28) // M2 (2 cyc) f8fa5448 David Mosberger-Tang 2005-04-27 750 cmp.eq p0,p7=r18,r17 // I0 is this a system call? f8fa5448 David Mosberger-Tang 2005-04-27 751 (p7) br.cond.spnt non_syscall// B no -> f8fa5448 David Mosberger-Tang 2005-04-27 752 // f8fa5448 David Mosberger-Tang 2005-04-27 753 // From this point on, we are definitely on the syscall-path f8fa5448 David Mosberger-Tang 2005-04-27 754 // and we can use (non-banked) scratch registers. f8fa5448 David Mosberger-Tang 2005-04-27 755 // f8fa5448 David Mosberger-Tang 2005-04-27 756 /// f8fa5448 David Mosberger-Tang 2005-04-27 757 mov r1=r16 // Amove task-pointer to "addl"-addressable reg f8fa5448 David Mosberger-Tang 2005-04-27 758 mov r2=r16 // Asetup r2 for ia64_syscall_setup f8fa5448 David Mosberger-Tang 2005-04-27 @759 add r9=TI_FLAGS+IA64_TASK_SIZE,r16 // Ar9 = ¤t_thread_info()->flags f8fa5448 David Mosberger-Tang 2005-04-27 760 f8fa5448 David Mosberger-Tang 2005-04-27 761 adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16 f8fa5448 David Mosberger-Tang 2005-04-27 762 adds r15=-1024,r15 // Asubtract 1024 from syscall number ^1da177e Linus Torvalds 2005-04-16 763 mov r3=NR_syscalls - 1 ^1da177e Linus Torvalds 2005-04-16 764 ;; f8fa5448 David Mosberger-Tang 2005-04-27 765 ld1.bias r17=[r16] // M0|1 r17 = current->thread.on_ustack flag f8fa5448 David Mosberger-Tang 2005-04-27 766 ld4 r9=[r9] // M0|1 r9 = current_thread_info()->flags f8fa5448 David Mosberger-Tang 2005-04-27 767 extr.u r8=r29,41,2 // I0 extract ei field from cr.ipsr :: The code at line 759 was first introduced by commit :: f8fa5448fc9b4a7806b1297a0b57808f12fe4d43 [IA64] Reschedule break_fault() for better performance. :: TO: David Mosberger-Tang :: CC: Tony Luck --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH] prctl: remove one-shot limitation for changing exe link
Mateusz Guzik writes: > On Sat, Jul 30, 2016 at 12:31:40PM -0500, Eric W. Biederman wrote: >> So what I am requesting is very simple. That the checks in >> prctl_set_mm_exe_file be tightened up to more closely approach what >> execve requires. Thus preserving the value of the /proc/[pid]/exe for >> the applications that want to use the exe link. >> >> Once the checks in prctl_set_mm_exe_file are tightened up please feel >> free to remove the one shot test. >> > > This is more fishy. > > First of all exe_file is used by the audit subsystem. So someone has to > ask audit people what is the significance (if any) of the field. > > All exe_file users but one use get_mm_exe_file and handle NULL > gracefully. > > Even with the current limit of changing the field once, the user can > cause a transient failure of get_mm_exe_file which can fail to increment > the refcount before it drops to 0. > > This transient failure can be used to get a NULL value stored in > ->exe_file during fork (in dup_mmap): > RCU_INIT_POINTER(mm->exe_file, get_mm_exe_file(oldmm)); > > The one place which is not using get_mm_exe_file to get to the pointer > is audit_exe_compare: > rcu_read_lock(); > exe_file = rcu_dereference(tsk->mm->exe_file); > ino = exe_file->f_inode->i_ino; > dev = exe_file->f_inode->i_sb->s_dev; > rcu_read_unlock(); > > This is buggy on 2 accounts: > 1. exe_file can be NULL > 2. rcu does not protect f_inode > > The issue is made worse with allowing arbitrary number changes. > > Modifying get_mm_exe_file to retry is trivial and in effect never return > NULL is trivial. With arbitrary number of changes allowed this may > require some cond_resched() or something. > > For comments I cc'ed Richard Guy Briggs, who is both an audit person and > the author of audit_exe_compare. That is fair. Keeping the existing users working is what needs to happen. At the same time we have an arbitrary number of possible changes with exec, but I guess that works differently because the mm is changed as well. So yes let's bug fix this piece of code and then we can see about relaxing constraints. Eric
fs/xfs/xfs_ondisk.h:96:2: error: call to '__compiletime_assert_96' declared with attribute error: XFS: sizeof(xfs_dir2_sf_entry_t) is wrong, expected 3
Hi Dave, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c9b95e5961c0294e0efffeaa847c1a1e6369204c commit: ab9d1e4f7b0217948a3b35a64178602ab30ff45d Merge branch 'xfs-misc-fixes-4.6-3' into for-next date: 5 months ago config: openrisc-allmodconfig (attached as .config) compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout ab9d1e4f7b0217948a3b35a64178602ab30ff45d # save the attached .config to linux build tree make.cross ARCH=openrisc All errors (new ones prefixed by >>): In file included from fs/xfs/xfs_super.c:48:0: In function 'xfs_check_ondisk_structs', inlined from 'init_xfs_fs' at fs/xfs/xfs_super.c:1862:26: fs/xfs/xfs_ondisk.h:86:2: error: call to '__compiletime_assert_86' declared with attribute error: XFS: sizeof(xfs_dir2_data_unused_t) is wrong, expected 6 >> fs/xfs/xfs_ondisk.h:96:2: error: call to '__compiletime_assert_96' declared >> with attribute error: XFS: sizeof(xfs_dir2_sf_entry_t) is wrong, expected 3 fs/xfs/xfs_ondisk.h:97:2: error: call to '__compiletime_assert_97' declared with attribute error: XFS: sizeof(xfs_dir2_sf_hdr_t) is wrong, expected 10 vim +/__compiletime_assert_96 +96 fs/xfs/xfs_ondisk.h 30cbc591 Darrick J. Wong 2016-03-09 80 XFS_CHECK_STRUCT_SIZE(xfs_da_blkinfo_t, 12); 30cbc591 Darrick J. Wong 2016-03-09 81 XFS_CHECK_STRUCT_SIZE(xfs_da_intnode_t, 16); 30cbc591 Darrick J. Wong 2016-03-09 82 XFS_CHECK_STRUCT_SIZE(xfs_da_node_entry_t, 8); 30cbc591 Darrick J. Wong 2016-03-09 83 XFS_CHECK_STRUCT_SIZE(xfs_da_node_hdr_t,16); 30cbc591 Darrick J. Wong 2016-03-09 84 XFS_CHECK_STRUCT_SIZE(xfs_dir2_data_free_t, 4); 30cbc591 Darrick J. Wong 2016-03-09 85 XFS_CHECK_STRUCT_SIZE(xfs_dir2_data_hdr_t, 16); 30cbc591 Darrick J. Wong 2016-03-09 @86 XFS_CHECK_STRUCT_SIZE(xfs_dir2_data_unused_t, 6); 30cbc591 Darrick J. Wong 2016-03-09 87 XFS_CHECK_STRUCT_SIZE(xfs_dir2_free_hdr_t, 16); 30cbc591 Darrick J. Wong 2016-03-09 88 XFS_CHECK_STRUCT_SIZE(xfs_dir2_free_t, 16); 30cbc591 Darrick J. Wong 2016-03-09 89 XFS_CHECK_STRUCT_SIZE(xfs_dir2_ino4_t, 4); 30cbc591 Darrick J. Wong 2016-03-09 90 XFS_CHECK_STRUCT_SIZE(xfs_dir2_ino8_t, 8); 30cbc591 Darrick J. Wong 2016-03-09 91 XFS_CHECK_STRUCT_SIZE(xfs_dir2_inou_t, 8); 30cbc591 Darrick J. Wong 2016-03-09 92 XFS_CHECK_STRUCT_SIZE(xfs_dir2_leaf_entry_t,8); 30cbc591 Darrick J. Wong 2016-03-09 93 XFS_CHECK_STRUCT_SIZE(xfs_dir2_leaf_hdr_t, 16); 30cbc591 Darrick J. Wong 2016-03-09 94 XFS_CHECK_STRUCT_SIZE(xfs_dir2_leaf_t, 16); 30cbc591 Darrick J. Wong 2016-03-09 95 XFS_CHECK_STRUCT_SIZE(xfs_dir2_leaf_tail_t, 4); 30cbc591 Darrick J. Wong 2016-03-09 @96 XFS_CHECK_STRUCT_SIZE(xfs_dir2_sf_entry_t, 3); 30cbc591 Darrick J. Wong 2016-03-09 97 XFS_CHECK_STRUCT_SIZE(xfs_dir2_sf_hdr_t,10); 30cbc591 Darrick J. Wong 2016-03-09 98 XFS_CHECK_STRUCT_SIZE(xfs_dir2_sf_off_t,2); 30cbc591 Darrick J. Wong 2016-03-09 99 :: The code at line 96 was first introduced by commit :: 30cbc591c34e680e8b5d6d675ea49effe42a0570 xfs: check sizes of XFS on-disk structures at compile time :: TO: Darrick J. Wong :: CC: Dave Chinner --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH v3 02/12] gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize()
Adds ipu_cpmem_get_burstsize(). Signed-off-by: Steve Longerbeam --- v3: no changes v2: no changes --- drivers/gpu/ipu-v3/ipu-cpmem.c | 6 ++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index a36c35e..fcb7dc8 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -275,6 +275,12 @@ void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id) } EXPORT_SYMBOL_GPL(ipu_cpmem_set_axi_id); +int ipu_cpmem_get_burstsize(struct ipuv3_channel *ch) +{ + return ipu_ch_param_read_field(ch, IPU_FIELD_NPB) + 1; +} +EXPORT_SYMBOL_GPL(ipu_cpmem_get_burstsize); + void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize) { ipu_ch_param_write_field(ch, IPU_FIELD_NPB, burstsize - 1); diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 69c8658..8c4312d 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -187,6 +187,7 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf); void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off); void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride); void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); +int ipu_cpmem_get_burstsize(struct ipuv3_channel *ch); void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch); void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, -- 1.9.1
[PATCH v3 08/12] gpu: ipu-v3: rename CSI client device
Rename the CSI client device in the client_reg[] table to "imx-ipuv3-csi". Signed-off-by: Steve Longerbeam --- v3: no changes v2: no changes --- drivers/gpu/ipu-v3/ipu-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index d697cd5..d230988 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1010,14 +1010,14 @@ static struct ipu_platform_reg client_reg[] = { .dma[0] = IPUV3_CHANNEL_CSI0, .dma[1] = -EINVAL, }, - .name = "imx-ipuv3-camera", + .name = "imx-ipuv3-csi", }, { .pdata = { .csi = 1, .dma[0] = IPUV3_CHANNEL_CSI1, .dma[1] = -EINVAL, }, - .name = "imx-ipuv3-camera", + .name = "imx-ipuv3-csi", }, { .pdata = { .di = 0, -- 1.9.1
[PATCH v3 00/12] IPUv3 prep for i.MX5/6 v4l2 staging drivers, v3
In this version: - API changes to ipu-vdi.c in "gpu: ipu-v3: Add Video Deinterlacer unit". - "gpu: ipu-v3: Add FSU channel linking support" is new but based on previous patch "gpu: ipu-v3: Add IDMA channel linking support". No other changes from previous version. Steve Longerbeam (12): gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize() gpu: ipu-v3: Add ipu_get_num() gpu: ipu-v3: Add VDI input IDMAC channels gpu: ipu-v3: set correct full sensor frame for PAL/NTSC gpu: ipu-v3: Fix CSI data format for 16-bit media bus formats gpu: ipu-v3: Fix IRT usage gpu: ipu-v3: rename CSI client device gpu: ipu-v3: Add Video Deinterlacer unit gpu: ipu-v3: Add FSU channel linking support gpu: ipu-ic: Add complete image conversion support with tiling gpu: ipu-ic: allow multiple handles to ic drivers/gpu/ipu-v3/Makefile |2 +- drivers/gpu/ipu-v3/ipu-common.c | 154 +++- drivers/gpu/ipu-v3/ipu-cpmem.c | 13 + drivers/gpu/ipu-v3/ipu-csi.c| 26 +- drivers/gpu/ipu-v3/ipu-ic.c | 1756 ++- drivers/gpu/ipu-v3/ipu-prv.h| 34 + drivers/gpu/ipu-v3/ipu-vdi.c| 254 ++ include/video/imx-ipu-v3.h | 99 ++- 8 files changed, 2278 insertions(+), 60 deletions(-) create mode 100644 drivers/gpu/ipu-v3/ipu-vdi.c -- 1.9.1
[PATCH v3 03/12] gpu: ipu-v3: Add ipu_get_num()
Adds of-alias id to ipu_soc and retrieve with ipu_get_num(). Signed-off-by: Steve Longerbeam --- v3: no changes v2: no changes --- drivers/gpu/ipu-v3/ipu-common.c | 8 drivers/gpu/ipu-v3/ipu-prv.h| 1 + include/video/imx-ipu-v3.h | 1 + 3 files changed, 10 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 99dcacf..d697cd5 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -45,6 +45,12 @@ static inline void ipu_cm_write(struct ipu_soc *ipu, u32 value, unsigned offset) writel(value, ipu->cm_reg + offset); } +int ipu_get_num(struct ipu_soc *ipu) +{ + return ipu->id; +} +EXPORT_SYMBOL_GPL(ipu_get_num); + void ipu_srm_dp_sync_update(struct ipu_soc *ipu) { u32 val; @@ -1209,6 +1215,7 @@ static int ipu_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(imx_ipu_dt_ids, &pdev->dev); + struct device_node *np = pdev->dev.of_node; struct ipu_soc *ipu; struct resource *res; unsigned long ipu_base; @@ -1237,6 +1244,7 @@ static int ipu_probe(struct platform_device *pdev) ipu->channel[i].ipu = ipu; ipu->devtype = devtype; ipu->ipu_type = devtype->type; + ipu->id = of_alias_get_id(np, "ipu"); spin_lock_init(&ipu->lock); mutex_init(&ipu->channel_lock); diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index bfb1e8a..fd47f8f 100644 --- a/drivers/gpu/ipu-v3/ipu-prv.h +++ b/drivers/gpu/ipu-v3/ipu-prv.h @@ -152,6 +152,7 @@ struct ipu_soc { void __iomem*cm_reg; void __iomem*idmac_reg; + int id; int usecount; struct clk *clk; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 8c4312d..ef54634 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -138,6 +138,7 @@ int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel, /* * IPU Common functions */ +int ipu_get_num(struct ipu_soc *ipu); void ipu_set_csi_src_mux(struct ipu_soc *ipu, int csi_id, bool mipi_csi2); void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi); void ipu_dump(struct ipu_soc *ipu); -- 1.9.1
[PATCH v3 05/12] gpu: ipu-v3: set correct full sensor frame for PAL/NTSC
Set the sensor full frame based on whether the passed in mbus_fmt is 720x480 (NTSC) or 720x576 (PAL). Signed-off-by: Steve Longerbeam --- v3: no changes v2: no changes --- drivers/gpu/ipu-v3/ipu-csi.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index 06631ac..641ed76 100644 --- a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -365,10 +365,14 @@ int ipu_csi_init_interface(struct ipu_csi *csi, { struct ipu_csi_bus_config cfg; unsigned long flags; - u32 data = 0; + u32 width, height, data = 0; fill_csi_bus_cfg(&cfg, mbus_cfg, mbus_fmt); + /* set default sensor frame width and height */ + width = mbus_fmt->width; + height = mbus_fmt->height; + /* Set the CSI_SENS_CONF register remaining fields */ data |= cfg.data_width << CSI_SENS_CONF_DATA_WIDTH_SHIFT | cfg.data_fmt << CSI_SENS_CONF_DATA_FMT_SHIFT | @@ -386,11 +390,6 @@ int ipu_csi_init_interface(struct ipu_csi *csi, ipu_csi_write(csi, data, CSI_SENS_CONF); - /* Setup sensor frame size */ - ipu_csi_write(csi, - (mbus_fmt->width - 1) | ((mbus_fmt->height - 1) << 16), - CSI_SENS_FRM_SIZE); - /* Set CCIR registers */ switch (cfg.clk_mode) { @@ -408,11 +407,12 @@ int ipu_csi_init_interface(struct ipu_csi *csi, * Field1BlankEnd = 0x7, Field1BlankStart = 0x3, * Field1ActiveEnd = 0x5, Field1ActiveStart = 0x1 */ + height = 625; /* framelines for PAL */ + ipu_csi_write(csi, 0x40596 | CSI_CCIR_ERR_DET_EN, CSI_CCIR_CODE_1); ipu_csi_write(csi, 0xD07DF, CSI_CCIR_CODE_2); ipu_csi_write(csi, 0xFF, CSI_CCIR_CODE_3); - } else if (mbus_fmt->width == 720 && mbus_fmt->height == 480) { /* * NTSC case @@ -422,6 +422,8 @@ int ipu_csi_init_interface(struct ipu_csi *csi, * Field1BlankEnd = 0x6, Field1BlankStart = 0x2, * Field1ActiveEnd = 0x4, Field1ActiveStart = 0 */ + height = 525; /* framelines for NTSC */ + ipu_csi_write(csi, 0xD07DF | CSI_CCIR_ERR_DET_EN, CSI_CCIR_CODE_1); ipu_csi_write(csi, 0x40596, CSI_CCIR_CODE_2); @@ -447,6 +449,10 @@ int ipu_csi_init_interface(struct ipu_csi *csi, break; } + /* Setup sensor frame size */ + ipu_csi_write(csi, (width - 1) | ((height - 1) << 16), + CSI_SENS_FRM_SIZE); + dev_dbg(csi->ipu->dev, "CSI_SENS_CONF = 0x%08X\n", ipu_csi_read(csi, CSI_SENS_CONF)); dev_dbg(csi->ipu->dev, "CSI_ACT_FRM_SIZE = 0x%08X\n", -- 1.9.1
[PATCH v3 04/12] gpu: ipu-v3: Add VDI input IDMAC channels
Adds the VDIC field input IDMAC channels. These channels transfer fields F(n-1), F(n), and F(N+1) from memory to the VDIC (channels 8, 9, 10 respectively). Signed-off-by: Steve Longerbeam --- v3: no changes v2: - made the channel names more descriptive: "_PREV" instead of "_P", etc. --- include/video/imx-ipu-v3.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index ef54634..c4ccc79 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -97,6 +97,9 @@ enum ipu_channel_irq { #define IPUV3_CHANNEL_CSI2 2 #define IPUV3_CHANNEL_CSI3 3 #define IPUV3_CHANNEL_VDI_MEM_IC_VF 5 +#define IPUV3_CHANNEL_MEM_VDI_PREV 8 +#define IPUV3_CHANNEL_MEM_VDI_CUR 9 +#define IPUV3_CHANNEL_MEM_VDI_NEXT 10 #define IPUV3_CHANNEL_MEM_IC_PP11 #define IPUV3_CHANNEL_MEM_IC_PRP_VF12 #define IPUV3_CHANNEL_G_MEM_IC_PRP_VF 14 -- 1.9.1
[PATCH v3 01/12] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset()
Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets. Signed-off-by: Steve Longerbeam --- v3: no changes v2: no changes --- drivers/gpu/ipu-v3/ipu-cpmem.c | 7 +++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index 6494a4d..a36c35e 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -253,6 +253,13 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf) } EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer); +void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off) +{ + ipu_ch_param_write_field(ch, IPU_FIELD_UBO, u_off / 8); + ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_off / 8); +} +EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset); + void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride) { ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1); diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 7adeaae..69c8658 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -184,6 +184,7 @@ void ipu_cpmem_set_resolution(struct ipuv3_channel *ch, int xres, int yres); void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride); void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch); void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf); +void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off); void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride); void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); -- 1.9.1
[PATCH v3 10/12] gpu: ipu-v3: Add FSU channel linking support
Adds functions to link and unlink source channels to sink channels in the FSU: int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch); int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch); The channels numbers are usually IDMAC channels, but they can also be channels that do not transfer data to or from memory. The following convenience functions can be used in place of ipu_fsu_link/unlink() when both source and sink channels are IDMAC channels: int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink); int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink); So far the following links are supported: IPUV3_CHANNEL_IC_PRP_ENC_MEM -> IPUV3_CHANNEL_MEM_ROT_ENC PUV3_CHANNEL_IC_PRP_VF_MEM -> IPUV3_CHANNEL_MEM_ROT_VF IPUV3_CHANNEL_IC_PP_MEM -> IPUV3_CHANNEL_MEM_ROT_PP IPUV3_CHANNEL_CSI_DIRECT -> IPUV3_CHANNEL_CSI_VDI_PREV More links can be added to the fsu_link_info[] array. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-common.c | 131 drivers/gpu/ipu-v3/ipu-prv.h| 27 + include/video/imx-ipu-v3.h | 13 3 files changed, 171 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 9d3584b..891cbef 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -730,6 +730,137 @@ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi) } EXPORT_SYMBOL_GPL(ipu_set_ic_src_mux); + +/* Frame Synchronization Unit Channel Linking */ + +struct fsu_link_reg_info { + int chno; + u32 reg; + u32 mask; + u32 val; +}; + +struct fsu_link_info { + struct fsu_link_reg_info src; + struct fsu_link_reg_info sink; +}; + +static const struct fsu_link_info fsu_link_info[] = { + { + .src = { IPUV3_CHANNEL_IC_PRP_ENC_MEM, IPU_FS_PROC_FLOW2, + FS_PRP_ENC_DEST_SEL_MASK, FS_PRP_ENC_DEST_SEL_IRT_ENC }, + .sink = { IPUV3_CHANNEL_MEM_ROT_ENC, IPU_FS_PROC_FLOW1, + FS_PRPENC_ROT_SRC_SEL_MASK, FS_PRPENC_ROT_SRC_SEL_ENC }, + }, { + .src = { IPUV3_CHANNEL_IC_PRP_VF_MEM, IPU_FS_PROC_FLOW2, + FS_PRPVF_DEST_SEL_MASK, FS_PRPVF_DEST_SEL_IRT_VF }, + .sink = { IPUV3_CHANNEL_MEM_ROT_VF, IPU_FS_PROC_FLOW1, + FS_PRPVF_ROT_SRC_SEL_MASK, FS_PRPVF_ROT_SRC_SEL_VF }, + }, { + .src = { IPUV3_CHANNEL_IC_PP_MEM, IPU_FS_PROC_FLOW2, + FS_PP_DEST_SEL_MASK, FS_PP_DEST_SEL_IRT_PP }, + .sink = { IPUV3_CHANNEL_MEM_ROT_PP, IPU_FS_PROC_FLOW1, + FS_PP_ROT_SRC_SEL_MASK, FS_PP_ROT_SRC_SEL_PP }, + }, { + .src = { IPUV3_CHANNEL_CSI_DIRECT, 0 }, + .sink = { IPUV3_CHANNEL_CSI_VDI_PREV, IPU_FS_PROC_FLOW1, + FS_VDI_SRC_SEL_MASK, FS_VDI_SRC_SEL_CSI_DIRECT }, + }, +}; + +static const struct fsu_link_info *find_fsu_link_info(int src, int sink) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(fsu_link_info); i++) { + if (src == fsu_link_info[i].src.chno && + sink == fsu_link_info[i].sink.chno) + return &fsu_link_info[i]; + } + + return NULL; +} + +/* + * Links a source channel to a sink channel in the FSU. + */ +int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch) +{ + const struct fsu_link_info *link; + u32 src_reg, sink_reg; + unsigned long flags; + + link = find_fsu_link_info(src_ch, sink_ch); + if (!link) + return -EINVAL; + + spin_lock_irqsave(&ipu->lock, flags); + + if (link->src.mask) { + src_reg = ipu_cm_read(ipu, link->src.reg); + src_reg &= ~link->src.mask; + src_reg |= link->src.val; + ipu_cm_write(ipu, src_reg, link->src.reg); + } + + if (link->sink.mask) { + sink_reg = ipu_cm_read(ipu, link->sink.reg); + sink_reg &= ~link->sink.mask; + sink_reg |= link->sink.val; + ipu_cm_write(ipu, sink_reg, link->sink.reg); + } + + spin_unlock_irqrestore(&ipu->lock, flags); + return 0; +} +EXPORT_SYMBOL_GPL(ipu_fsu_link); + +/* + * Unlinks source and sink channels in the FSU. + */ +int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch) +{ + const struct fsu_link_info *link; + u32 src_reg, sink_reg; + unsigned long flags; + + link = find_fsu_link_info(src_ch, sink_ch); + if (!link) + return -EINVAL; + + spin_lock_irqsave(&ipu->lock, flags); + + if (link->src.mask) { + src_reg = ipu_cm_read(ipu, link->src.reg); + src_reg &= ~link->src.mask; + ipu_cm_write(ipu, src_reg, link->src.reg); + } + + if (link->sink.mask) { +