* Re: [PATCH-v3 1/2] wireless: Support assoc-at-ms timer in sta-info
From: Johannes Berg @ 2019-06-14 18:46 UTC (permalink / raw)
To: Ben Greear, linux-wireless
In-Reply-To: <7d606df7-bb8e-c454-1eaf-24fd454eab8e@candelatech.com>
On Fri, 2019-06-14 at 08:14 -0700, Ben Greear wrote:
>
>
> So, maybe I return instead the elapsed time in the netlink API instead of a
> timestamp. I think that will give me the value that I am looking for,
> and I can still print out the 'real' time in iw so any tools reading that
> output and do some simple math and figure out the 'real' associated-at time.
I don't think that's good. There's a delay between filling the message
and then processing it in userspace. We had this in the scan code and
learned that was full of races.
The better thing is to use CLOCK_BOOTTIME nanoseconds, and then
userspace can use clock_gettime() to get the current time etc. and then
do whatever calculations it needs. If it wants to print the realtime
timestamp, it could even calculate that (with some jitter) by doing
clock_gettime() on both realtime and boottime clocks...
johannes
^ permalink raw reply
* Re: [PATCH v3] {nl,mac}80211: allow 4addr AP operation on crypto controlled devices
From: Johannes Berg @ 2019-06-14 18:43 UTC (permalink / raw)
To: Tom Psyborg; +Cc: Manikanta Pubbisetty, linux-wireless
In-Reply-To: <CAKR_QV+5oY-5z4UB+HKV_57r5NneDme+TBg_c26h4C7Sy8R+UQ@mail.gmail.com>
On Fri, 2019-06-14 at 19:45 +0200, Tom Psyborg wrote:
>
> Never got reply. So I checked and definitely wrong version is applied
> (v2 or v3).
Why would that be wrong? I shouldn't apply v1 when v2 and v3 fix
comments I had ...
> Try to reproduce this yourself, I've posted details here:
> https://forum.openwrt.org/t/wds-client-wont-stay-connected-prev-auth-not-valid-using-recent-snapshot-builds/38194/20?u=psyborg
I might even have the requisite hardware, but not the required time now,
sorry.
I'm also not convinced how this patch would affect *staying*
connected... it should affect connecting to start with?
johannes
^ permalink raw reply
* Re: pull-request: mac80211-next 2019-06-14
From: David Miller @ 2019-06-14 18:27 UTC (permalink / raw)
To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <20190614141638.30018-1-johannes@sipsolutions.net>
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 14 Jun 2019 16:16:37 +0200
> And ... here's a -next pull request. Nothing really major here,
> see more details below.
>
> Please pull and let me know if there's any problem.
Pulled and build testing, thank you.
^ permalink raw reply
* Re: [PATCH v3] {nl,mac}80211: allow 4addr AP operation on crypto controlled devices
From: Tom Psyborg @ 2019-06-14 17:45 UTC (permalink / raw)
To: Johannes Berg; +Cc: Manikanta Pubbisetty, linux-wireless
In-Reply-To: <dc9039be42df8d241b14d4f673f3c472dc113991.camel@sipsolutions.net>
On 12/06/2019, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2019-06-06 at 20:41 +0200, Tom Psyborg wrote:
>>
>> Applying this patch instead of v1 broke WDS operation between two
>> Litebeam AC Gen2 devices:
>
> I'm confused, and not even sure which version I applied now.
>
> Manikanta, can you please check this and which version I have and which
> changes I might need?
>
> Thanks,
> Johannes
>
>
>
Never got reply. So I checked and definitely wrong version is applied
(v2 or v3). Try to reproduce this yourself, I've posted details here:
https://forum.openwrt.org/t/wds-client-wont-stay-connected-prev-auth-not-valid-using-recent-snapshot-builds/38194/20?u=psyborg
^ permalink raw reply
* Re: [PATCH v4 4/5] mmc: core: Add sdio_retune_hold_now() and sdio_retune_release()
From: Arend Van Spriel @ 2019-06-14 17:17 UTC (permalink / raw)
To: Doug Anderson, Ulf Hansson, Adrian Hunter
Cc: Kalle Valo, brcm80211-dev-list.pdl, open list:ARM/Rockchip SoC...,
Double Lo, Brian Norris, linux-wireless, Naveen Gupta,
Madhan Mohan R, Matthias Kaehlcke, Wright Feng, Chi-Hsien Lin,
netdev, brcm80211-dev-list, linux-mmc, Linux Kernel Mailing List,
Thomas Gleixner, Greg Kroah-Hartman, Avri Altman
In-Reply-To: <CAD=FV=Wuj=gANR2im_o4ZnoLEB+U6FqzKe4noLdQyi1vw+K2xw@mail.gmail.com>
On June 14, 2019 6:38:51 PM Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> On Fri, Jun 14, 2019 at 5:10 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On Fri, 14 Jun 2019 at 01:42, Douglas Anderson <dianders@chromium.org> wrote:
>> >
>> > We want SDIO drivers to be able to temporarily stop retuning when the
>> > driver knows that the SDIO card is not in a state where retuning will
>> > work (maybe because the card is asleep). We'll move the relevant
>> > functions to a place where drivers can call them.
>> >
>> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>
>> This looks good to me.
>>
>> BTW, seems like this series is best funneled via my mmc tree, no? In
>> such case, I need acks for the brcmfmac driver patches.
>
> For patch #1 I think it could just go in directly to the wireless
> tree. It should be fine to land the rest of the patches separately.
Agree.
> For patch #2 - #5 then what you say makes sense to me. I suppose
> you'd want at least a Reviewed-by from Arend and an Ack from Kalle on
> the Broadcom patches?
Will do.
> I'd also suggest that we Cc stable explicitly when applying. That's
> easy for #2 and #3 since they have a Fixes tag. For #4 and #5 I guess
> the question is how far back to go. Maybe Adrian has an opinion here
> since I think he's the one who experienced these problems.
I see if I can come up wit a fixes tag for #5.
Regards,
Arend
^ permalink raw reply
* [PATCH] wl18xx: Fix Wunused-const-variable
From: Nathan Huckleberry @ 2019-06-14 17:17 UTC (permalink / raw)
To: kvalo, davem
Cc: linux-wireless, netdev, linux-kernel, Nathan Huckleberry,
clang-built-linux
Clang produces the following warning
drivers/net/wireless/ti/wl18xx/main.c:1850:43: warning: unused variable
'wl18xx_iface_ap_cl_limits' [-Wunused-const-variable] static const struct
ieee80211_iface_limit wl18xx_iface_ap_cl_limits[] = { ^
drivers/net/wireless/ti/wl18xx/main.c:1869:43: warning: unused variable
'wl18xx_iface_ap_go_limits' [-Wunused-const-variable] static const struct
ieee80211_iface_limit wl18xx_iface_ap_go_limits[] = { ^
The commit that added these variables never used them. Removing them.
Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/530
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
drivers/net/wireless/ti/wl18xx/main.c | 38 ---------------------------
1 file changed, 38 deletions(-)
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index a5e0604d3009..0b3cf8477c6c 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -1847,44 +1847,6 @@ static const struct ieee80211_iface_limit wl18xx_iface_ap_limits[] = {
},
};
-static const struct ieee80211_iface_limit wl18xx_iface_ap_cl_limits[] = {
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_STATION),
- },
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_AP),
- },
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_P2P_CLIENT),
- },
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
- },
-};
-
-static const struct ieee80211_iface_limit wl18xx_iface_ap_go_limits[] = {
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_STATION),
- },
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_AP),
- },
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_P2P_GO),
- },
- {
- .max = 1,
- .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
- },
-};
-
static const struct ieee80211_iface_combination
wl18xx_iface_combinations[] = {
{
--
2.22.0.rc2.383.gf4fbbf30c2-goog
^ permalink raw reply related
* Re: [PATCH v4 2/5] mmc: core: API to temporarily disable retuning for SDIO CRC errors
From: Doug Anderson @ 2019-06-14 16:41 UTC (permalink / raw)
To: Ulf Hansson
Cc: Kalle Valo, Adrian Hunter, Arend van Spriel,
brcm80211-dev-list.pdl, open list:ARM/Rockchip SoC..., Double Lo,
Brian Norris, linux-wireless, Naveen Gupta, Madhan Mohan R,
Matthias Kaehlcke, Wright Feng, Chi-Hsien Lin, netdev,
brcm80211-dev-list, Jiong Wu, Ritesh Harjani, Allison Randal,
linux-mmc@vger.kernel.org, Linux Kernel Mailing List,
Thomas Gleixner, Greg Kroah-Hartman, Shawn Lin, Wolfram Sang,
Avri Altman
In-Reply-To: <CAPDyKFrgXGf_9=H7G40fiUQj=da5WWRys_oim2azgL4FEOeUVA@mail.gmail.com>
Hi,
On Fri, Jun 14, 2019 at 5:04 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Fri, 14 Jun 2019 at 01:42, Douglas Anderson <dianders@chromium.org> wrote:
> >
> > Normally when the MMC core sees an "-EILSEQ" error returned by a host
> > controller then it will trigger a retuning of the card. This is
> > generally a good idea.
> >
> > However, if a command is expected to sometimes cause transfer errors
> > then these transfer errors shouldn't cause a re-tuning. This
> > re-tuning will be a needless waste of time. One example case where a
> > transfer is expected to cause errors is when transitioning between
> > idle (sometimes referred to as "sleep" in Broadcom code) and active
> > state on certain Broadcom WiFi SDIO cards. Specifically if the card
> > was already transitioning between states when the command was sent it
> > could cause an error on the SDIO bus.
> >
> > Let's add an API that the SDIO function drivers can call that will
> > temporarily disable the auto-tuning functionality. Then we can add a
> > call to this in the Broadcom WiFi driver and any other driver that
> > might have similar needs.
> >
> > NOTE: this makes the assumption that the card is already tuned well
> > enough that it's OK to disable the auto-retuning during one of these
> > error-prone situations. Presumably the driver code performing the
> > error-prone transfer knows how to recover / retry from errors. ...and
> > after we can get back to a state where transfers are no longer
> > error-prone then we can enable the auto-retuning again. If we truly
> > find ourselves in a case where the card needs to be retuned sometimes
> > to handle one of these error-prone transfers then we can always try a
> > few transfers first without auto-retuning and then re-try with
> > auto-retuning if the first few fail.
> >
> > Without this change on rk3288-veyron-minnie I periodically see this in
> > the logs of a machine just sitting there idle:
> > dwmmc_rockchip ff0d0000.dwmmc: Successfully tuned phase to XYZ
> >
> > Fixes: bd11e8bd03ca ("mmc: core: Flag re-tuning is needed on CRC errors")
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> >
> > Changes in v4:
> > - Moved to SDIO API only (Adrian, Ulf).
> > - Renamed to make it less generic, now retune_crc_disable (Ulf).
> > - Function header makes it clear host must be claimed (Ulf).
> > - No more WARN_ON (Ulf).
> >
> > Changes in v3:
> > - Took out the spinlock since I believe this is all in one context.
> >
> > Changes in v2:
> > - Updated commit message to clarify based on discussion of v1.
> >
> > drivers/mmc/core/core.c | 5 +++--
> > drivers/mmc/core/sdio_io.c | 36 +++++++++++++++++++++++++++++++++++
> > include/linux/mmc/core.h | 2 ++
> > include/linux/mmc/host.h | 1 +
> > include/linux/mmc/sdio_func.h | 3 +++
> > 5 files changed, 45 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> > index 6db36dc870b5..9020cb2490f7 100644
> > --- a/drivers/mmc/core/core.c
> > +++ b/drivers/mmc/core/core.c
> > @@ -144,8 +144,9 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
> > int err = cmd->error;
> >
> > /* Flag re-tuning needed on CRC errors */
> > - if ((cmd->opcode != MMC_SEND_TUNING_BLOCK &&
> > - cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200) &&
> > + if (cmd->opcode != MMC_SEND_TUNING_BLOCK &&
> > + cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200 &&
> > + !host->retune_crc_disable &&
> > (err == -EILSEQ || (mrq->sbc && mrq->sbc->error == -EILSEQ) ||
> > (mrq->data && mrq->data->error == -EILSEQ) ||
> > (mrq->stop && mrq->stop->error == -EILSEQ)))
> > diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
> > index f79f0b0caab8..f822a9630b0e 100644
> > --- a/drivers/mmc/core/sdio_io.c
> > +++ b/drivers/mmc/core/sdio_io.c
> > @@ -734,3 +734,39 @@ int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags)
> > return 0;
> > }
> > EXPORT_SYMBOL_GPL(sdio_set_host_pm_flags);
> > +
> > +/**
> > + * sdio_retune_crc_disable - temporarily disable retuning on CRC errors
> > + * @func: SDIO function attached to host
> > + *
> > + * If the SDIO card is known to be in a state where it might produce
> > + * CRC errors on the bus in response to commands (like if we know it is
> > + * transitioning between power states), an SDIO function driver can
> > + * call this function to temporarily disable the SD/MMC core behavior of
> > + * triggering an automatic retuning.
> > + *
> > + * This function should be called while the host is claimed and the host
> > + * should remain claimed until sdio_retune_crc_enable() is called.
> > + * Specifically, the expected sequence of calls is:
> > + * - sdio_claim_host()
> > + * - sdio_retune_crc_disable()
> > + * - some number of calls like sdio_writeb() and sdio_readb()
>
> sdio_retune_crc_enable()
>
> > + * - sdio_release_host()
> > + */
> > +void sdio_retune_crc_disable(struct sdio_func *func)
> > +{
> > + func->card->host->retune_crc_disable = true;
> > +}
> > +EXPORT_SYMBOL_GPL(sdio_retune_crc_disable);
> > +
> > +/**
> > + * sdio_retune_crc_enable - reneable retuning on CRC errors
>
> /s/reneable/re-enable
>
> > + * @func: SDIO function attached to host
> > + *
> > + * This is the compement to sdio_retune_crc_disable().
> > + */
> > +void sdio_retune_crc_enable(struct sdio_func *func)
> > +{
> > + func->card->host->retune_crc_disable = false;
> > +}
> > +EXPORT_SYMBOL_GPL(sdio_retune_crc_enable);
> > diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
> > index 134a6483347a..02a13abf0cda 100644
> > --- a/include/linux/mmc/core.h
> > +++ b/include/linux/mmc/core.h
> > @@ -178,6 +178,8 @@ int mmc_wait_for_cmd(struct mmc_host *host, struct mmc_command *cmd,
> >
> > int mmc_hw_reset(struct mmc_host *host);
> > int mmc_sw_reset(struct mmc_host *host);
> > +void mmc_expect_errors_begin(struct mmc_host *host);
> > +void mmc_expect_errors_end(struct mmc_host *host);
>
> Leftovers for earlier versions.
Oops!
> > void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card);
> >
> > #endif /* LINUX_MMC_CORE_H */
> > diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> > index 43d0f0c496f6..ecb7972e2423 100644
> > --- a/include/linux/mmc/host.h
> > +++ b/include/linux/mmc/host.h
> > @@ -398,6 +398,7 @@ struct mmc_host {
> > unsigned int retune_now:1; /* do re-tuning at next req */
> > unsigned int retune_paused:1; /* re-tuning is temporarily disabled */
> > unsigned int use_blk_mq:1; /* use blk-mq */
> > + unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */
> >
> > int rescan_disable; /* disable card detection */
> > int rescan_entered; /* used with nonremovable devices */
> > diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
> > index e9dfdd501cd1..4820e6d09dac 100644
> > --- a/include/linux/mmc/sdio_func.h
> > +++ b/include/linux/mmc/sdio_func.h
> > @@ -167,4 +167,7 @@ extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b,
> > extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func);
> > extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags);
> >
> > +extern void sdio_retune_crc_disable(struct sdio_func *func);
> > +extern void sdio_retune_crc_enable(struct sdio_func *func);
> > +
> > #endif /* LINUX_MMC_SDIO_FUNC_H */
> > --
> > 2.22.0.rc2.383.gf4fbbf30c2-goog
> >
>
> Besides the minor comments, this looks good to me.
Thank you for the reviews!
I'll plan to send a v5 on my Monday with the fixes assuming no new
heated discussion starts up. If it's less work for you, I'm also
happy if you just want to make the trivial fixes yourself when
applying.
-Doug
^ permalink raw reply
* Re: [PATCH v4 4/5] mmc: core: Add sdio_retune_hold_now() and sdio_retune_release()
From: Doug Anderson @ 2019-06-14 16:38 UTC (permalink / raw)
To: Ulf Hansson, Arend van Spriel, Adrian Hunter
Cc: Kalle Valo, brcm80211-dev-list.pdl, open list:ARM/Rockchip SoC...,
Double Lo, Brian Norris, linux-wireless, Naveen Gupta,
Madhan Mohan R, Matthias Kaehlcke, Wright Feng, Chi-Hsien Lin,
netdev, brcm80211-dev-list, linux-mmc@vger.kernel.org,
Linux Kernel Mailing List, Thomas Gleixner, Greg Kroah-Hartman,
Avri Altman
In-Reply-To: <CAPDyKFrJ4+zn7Ak0tYHkBfXUtH3N7erb5R7Q+hgugchZmCRGrw@mail.gmail.com>
Hi,
On Fri, Jun 14, 2019 at 5:10 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Fri, 14 Jun 2019 at 01:42, Douglas Anderson <dianders@chromium.org> wrote:
> >
> > We want SDIO drivers to be able to temporarily stop retuning when the
> > driver knows that the SDIO card is not in a state where retuning will
> > work (maybe because the card is asleep). We'll move the relevant
> > functions to a place where drivers can call them.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
>
> This looks good to me.
>
> BTW, seems like this series is best funneled via my mmc tree, no? In
> such case, I need acks for the brcmfmac driver patches.
For patch #1 I think it could just go in directly to the wireless
tree. It should be fine to land the rest of the patches separately.
For patch #2 - #5 then what you say makes sense to me. I suppose
you'd want at least a Reviewed-by from Arend and an Ack from Kalle on
the Broadcom patches?
I'd also suggest that we Cc stable explicitly when applying. That's
easy for #2 and #3 since they have a Fixes tag. For #4 and #5 I guess
the question is how far back to go. Maybe Adrian has an opinion here
since I think he's the one who experienced these problems.
Thanks!
-Doug
^ permalink raw reply
* Re: [Intel-gfx] [PATCH 03/16] drm/i915: stop using drm_pci_alloc
From: Ville Syrjälä @ 2019-06-14 16:45 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
Daniel Vetter, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Ian Abbott, H Hartley Sweeten, devel, linux-s390,
Intel Linux Wireless, linux-rdma, netdev, intel-gfx,
linux-wireless, linux-kernel, dri-devel, linux-mm, iommu,
moderated list:ARM PORT, linux-media, Chris Wilson
In-Reply-To: <20190614134726.3827-4-hch@lst.de>
On Fri, Jun 14, 2019 at 03:47:13PM +0200, Christoph Hellwig wrote:
> Remove usage of the legacy drm PCI DMA wrappers, and with that the
> incorrect usage cocktail of __GFP_COMP, virt_to_page on DMA allocation
> and SetPageReserved.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 30 +++++++++++++-------------
> drivers/gpu/drm/i915/i915_gem_object.h | 3 ++-
> drivers/gpu/drm/i915/intel_display.c | 2 +-
> 3 files changed, 18 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index ad01c92aaf74..8f2053c91aff 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -228,7 +228,6 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
> static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
> {
> struct address_space *mapping = obj->base.filp->f_mapping;
> - drm_dma_handle_t *phys;
> struct sg_table *st;
> struct scatterlist *sg;
> char *vaddr;
> @@ -242,13 +241,13 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
> * to handle all possible callers, and given typical object sizes,
> * the alignment of the buddy allocation will naturally match.
> */
> - phys = drm_pci_alloc(obj->base.dev,
> - roundup_pow_of_two(obj->base.size),
> - roundup_pow_of_two(obj->base.size));
> - if (!phys)
> + obj->phys_vaddr = dma_alloc_coherent(&obj->base.dev->pdev->dev,
> + roundup_pow_of_two(obj->base.size),
> + &obj->phys_handle, GFP_KERNEL);
> + if (!obj->phys_vaddr)
> return -ENOMEM;
>
> - vaddr = phys->vaddr;
> + vaddr = obj->phys_vaddr;
> for (i = 0; i < obj->base.size / PAGE_SIZE; i++) {
> struct page *page;
> char *src;
> @@ -286,18 +285,17 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
> sg->offset = 0;
> sg->length = obj->base.size;
>
> - sg_dma_address(sg) = phys->busaddr;
> + sg_dma_address(sg) = obj->phys_handle;
> sg_dma_len(sg) = obj->base.size;
>
> - obj->phys_handle = phys;
> -
> __i915_gem_object_set_pages(obj, st, sg->length);
>
> return 0;
>
> err_phys:
> - drm_pci_free(obj->base.dev, phys);
> -
> + dma_free_coherent(&obj->base.dev->pdev->dev,
> + roundup_pow_of_two(obj->base.size), obj->phys_vaddr,
> + obj->phys_handle);
Need to undo the damage to obj->phys_vaddr here since
i915_gem_pwrite_ioctl() will now use that to determine if it's
dealing with a phys obj.
> return err;
> }
>
> @@ -335,7 +333,7 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,
>
> if (obj->mm.dirty) {
> struct address_space *mapping = obj->base.filp->f_mapping;
> - char *vaddr = obj->phys_handle->vaddr;
> + char *vaddr = obj->phys_vaddr;
> int i;
>
> for (i = 0; i < obj->base.size / PAGE_SIZE; i++) {
> @@ -363,7 +361,9 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,
> sg_free_table(pages);
> kfree(pages);
>
> - drm_pci_free(obj->base.dev, obj->phys_handle);
> + dma_free_coherent(&obj->base.dev->pdev->dev,
> + roundup_pow_of_two(obj->base.size), obj->phys_vaddr,
> + obj->phys_handle);
This one is fine I think since the object remains a phys obj once
turned into one. At least the current code isn't clearing
phys_handle here. But my memory is a bit hazy on the details. Chris?
Also maybe s/phys_handle/phys_busaddr/ all over?
> }
>
> static void
> @@ -603,7 +603,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj,
> struct drm_i915_gem_pwrite *args,
> struct drm_file *file)
> {
> - void *vaddr = obj->phys_handle->vaddr + args->offset;
> + void *vaddr = obj->phys_vaddr + args->offset;
> char __user *user_data = u64_to_user_ptr(args->data_ptr);
>
> /* We manually control the domain here and pretend that it
> @@ -1431,7 +1431,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
> ret = i915_gem_gtt_pwrite_fast(obj, args);
>
> if (ret == -EFAULT || ret == -ENOSPC) {
> - if (obj->phys_handle)
> + if (obj->phys_vaddr)
> ret = i915_gem_phys_pwrite(obj, args, file);
> else
> ret = i915_gem_shmem_pwrite(obj, args);
> diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h
> index ca93a40c0c87..14bd2d61d0f6 100644
> --- a/drivers/gpu/drm/i915/i915_gem_object.h
> +++ b/drivers/gpu/drm/i915/i915_gem_object.h
> @@ -290,7 +290,8 @@ struct drm_i915_gem_object {
> };
>
> /** for phys allocated objects */
> - struct drm_dma_handle *phys_handle;
> + dma_addr_t phys_handle;
> + void *phys_vaddr;
>
> struct reservation_object __builtin_resv;
> };
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5098228f1302..4f8b368ac4e2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -10066,7 +10066,7 @@ static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
> u32 base;
>
> if (INTEL_INFO(dev_priv)->display.cursor_needs_physical)
> - base = obj->phys_handle->busaddr;
> + base = obj->phys_handle;
> else
> base = intel_plane_ggtt_offset(plane_state);
>
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
^ permalink raw reply
* Re: pull-request: mac80211 2019-06-14
From: David Miller @ 2019-06-14 16:37 UTC (permalink / raw)
To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <20190614135042.28352-1-johannes@sipsolutions.net>
From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 14 Jun 2019 15:50:41 +0200
> Here's a round of fixes for the current tree, things are all over
> and the only really important thing is the TDLS and MFP fix, both
> of which allow a security bypass in MFP.
>
> Please pull and let me know if there's any problem.
Pulled, thanks a lot.
^ permalink raw reply
* Re: [PATCH] nfc: Ensure presence of required attributes in the deactivate_target handler
From: David Miller @ 2019-06-14 15:48 UTC (permalink / raw)
To: 92siuyang; +Cc: sameo, linux-wireless, netdev, linux-kernel
In-Reply-To: <1560496382-32532-1-git-send-email-92siuyang@gmail.com>
From: Young Xiao <92siuyang@gmail.com>
Date: Fri, 14 Jun 2019 15:13:02 +0800
> Check that the NFC_ATTR_TARGET_INDEX attributes (in addition to
> NFC_ATTR_DEVICE_INDEX) are provided by the netlink client prior to
> accessing them. This prevents potential unhandled NULL pointer dereference
> exceptions which can be triggered by malicious user-mode programs,
> if they omit one or both of these attributes.
>
> Signed-off-by: Young Xiao <92siuyang@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH] mmc: core: Prevent processing SDIO IRQs when the card is suspended
From: Doug Anderson @ 2019-06-14 15:41 UTC (permalink / raw)
To: Ulf Hansson
Cc: Linux MMC List, Adrian Hunter, Brian Norris, Shawn Lin,
Guenter Roeck, Heiko Stuebner, Kalle Valo, linux-wireless, # 4.0+
In-Reply-To: <CAPDyKFpqk4ZcVTqifnbnW1WgNfx9ZNebCttUPcK_e9KWqpDMjQ@mail.gmail.com>
Hi,
On Fri, Jun 14, 2019 at 4:56 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> > I was more worried about the safety of mmc_card_set_suspended()
> > itself. That is:
> >
> > #define mmc_card_set_suspended(c) ((c)->state |= MMC_STATE_SUSPENDED)
> >
> > ...so it's doing a read-modify-write of "state". Is that safe to do
> > without any type of locking?
>
> In this case, yes I think so.
>
> The point is, it really doesn't matter if the reader (work or thread),
> reads a non-updated value, because the synchronization is managed by
> the later mmc_claim_host() and the cancel_delayed_work_sync().
If this were just an "int" then perhaps, but this is a bitfield. So
if someone else updates the bitfield at the same time then we can
fully clobber their modification or they can clobber ours, right?
task 1: load "state" from memory into CPU register on cpu0
task 2: load "state" from memory into CPU register on cpu1
task 1: OR in MMC_CARD_REMOVED
task 1: write "state" from CPU register on cpu0
task 2: OR in MMC_STATE_SUSPENDED
task 2: write "state" from CPU register on cpu1
...so now we've clobbered MMC_CARD_REMOVED. ...or am I just being
paranoid here and everything else in "state" is somehow guaranteed to
not be touched at the same time this function is running?
-Doug
^ permalink raw reply
* Re: [PATCH 12/16] staging/comedi: mark as broken
From: Christoph Hellwig @ 2019-06-14 15:34 UTC (permalink / raw)
To: Greg KH
Cc: Christoph Hellwig, Maarten Lankhorst, Maxime Ripard, Sean Paul,
David Airlie, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Ian Abbott, H Hartley Sweeten, devel, linux-s390,
Intel Linux Wireless, linux-rdma, netdev, intel-gfx,
linux-wireless, linux-kernel, dri-devel, linux-mm, iommu,
moderated list:ARM PORT, linux-media
In-Reply-To: <20190614153032.GD18049@kroah.com>
On Fri, Jun 14, 2019 at 05:30:32PM +0200, Greg KH wrote:
> On Fri, Jun 14, 2019 at 04:48:57PM +0200, Christoph Hellwig wrote:
> > On Fri, Jun 14, 2019 at 04:02:39PM +0200, Greg KH wrote:
> > > Perhaps a hint as to how we can fix this up? This is the first time
> > > I've heard of the comedi code not handling dma properly.
> >
> > It can be fixed by:
> >
> > a) never calling virt_to_page (or vmalloc_to_page for that matter)
> > on dma allocation
> > b) never remapping dma allocation with conflicting cache modes
> > (no remapping should be doable after a) anyway).
>
> Ok, fair enough, have any pointers of drivers/core code that does this
> correctly? I can put it on my todo list, but might take a week or so...
Just about everyone else. They just need to remove the vmap and
either do one large allocation, or live with the fact that they need
helpers to access multiple array elements instead of one net vmap,
which most of the users already seem to do anyway, with just a few
using the vmap (which might explain why we didn't see blowups yet).
^ permalink raw reply
* Re: [PATCH 12/16] staging/comedi: mark as broken
From: Greg KH @ 2019-06-14 15:30 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
Daniel Vetter, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Ian Abbott, H Hartley Sweeten, devel, linux-s390,
Intel Linux Wireless, linux-rdma, netdev, intel-gfx,
linux-wireless, linux-kernel, dri-devel, linux-mm, iommu,
moderated list:ARM PORT, linux-media
In-Reply-To: <20190614144857.GA9088@lst.de>
On Fri, Jun 14, 2019 at 04:48:57PM +0200, Christoph Hellwig wrote:
> On Fri, Jun 14, 2019 at 04:02:39PM +0200, Greg KH wrote:
> > Perhaps a hint as to how we can fix this up? This is the first time
> > I've heard of the comedi code not handling dma properly.
>
> It can be fixed by:
>
> a) never calling virt_to_page (or vmalloc_to_page for that matter)
> on dma allocation
> b) never remapping dma allocation with conflicting cache modes
> (no remapping should be doable after a) anyway).
Ok, fair enough, have any pointers of drivers/core code that does this
correctly? I can put it on my todo list, but might take a week or so...
Ian, want to look into doing this sooner?
thanks,
greg k-h
^ permalink raw reply
* RE: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous
From: David Laight @ 2019-06-14 15:16 UTC (permalink / raw)
To: 'Robin Murphy', 'Christoph Hellwig'
Cc: Maxime Ripard, Joonas Lahtinen, dri-devel@lists.freedesktop.org,
linux-mm@kvack.org, devel@driverdev.osuosl.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
David Airlie, linux-media@vger.kernel.org, Intel Linux Wireless,
intel-gfx@lists.freedesktop.org, Maarten Lankhorst, Jani Nikula,
Ian Abbott, Rodrigo Vivi, Sean Paul, moderated list:ARM PORT,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, H Hartley Sweeten,
iommu@lists.linux-foundation.org, Daniel Vetter
In-Reply-To: <4113cd5f-5c13-e9c7-bc5e-dcf0b60e7054@arm.com>
From: Robin Murphy
> Sent: 14 June 2019 16:06
...
> Well, apart from the bit in DMA-API-HOWTO which has said this since
> forever (well, before Git history, at least):
>
> "The CPU virtual address and the DMA address are both
> guaranteed to be aligned to the smallest PAGE_SIZE order which
> is greater than or equal to the requested size. This invariant
> exists (for example) to guarantee that if you allocate a chunk
> which is smaller than or equal to 64 kilobytes, the extent of the
> buffer you receive will not cross a 64K boundary."
I knew it was somewhere :-)
Interestingly that also implies that the address returned for a size
of (say) 128 will also be page aligned.
In that case 128 byte alignment should probably be ok - but it is still
an API change that could have horrid consequences.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply
* Re: [PATCH-v3 1/2] wireless: Support assoc-at-ms timer in sta-info
From: Ben Greear @ 2019-06-14 15:14 UTC (permalink / raw)
To: Johannes Berg, linux-wireless
In-Reply-To: <e8343919c6851e6b5a7905b708661870c4c88481.camel@sipsolutions.net>
On 6/14/19 7:56 AM, Johannes Berg wrote:
> On Fri, 2019-06-14 at 07:46 -0700, Ben Greear wrote:
>>
>> The point of my patch was to allow 'iw' to return a more precise time
>> that the station has been associated, so I am not sure that BOOTIME is
>> a good thing to use for that?
>
> Depends what you want, really.
>
>> + if (sinfo[NL80211_STA_INFO_ASSOC_AT_MS])
>> + printf("\n\tassociated at:\t%llu ms",
>> + (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_ASSOC_AT_MS]));
>>
>> - printf("\n");
>> + printf("\n\tcurrent time:\t%llu ms\n", now_ms);
>
> Since you just print the time in milliseconds, and the current time in
> milliseconds, you don't even really have any value in the wall clock.
> Quite the opposite - this lends itself to subtracting to try to figure
> out how long it was associated, which is the completely wrong thing to
> do with wall clock - timezone adjustment could've happened inbetween,
> for example!
>
> I really see no point in trying to give the wall clock at assoc time. If
> no timezone adjustment happened, you can just as well give the boottime
> and have the userspace figure out the wall clock. If timezone adjustment
> happened, then any calculations are wrong anyway, what would the point
> be?
So, maybe I return instead the elapsed time in the netlink API instead of a
timestamp. I think that will give me the value that I am looking for,
and I can still print out the 'real' time in iw so any tools reading that
output and do some simple math and figure out the 'real' associated-at time.
If that sounds good to you, I'll code that up.
Thanks,
Ben
>
> johannes
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous
From: 'Christoph Hellwig' @ 2019-06-14 15:08 UTC (permalink / raw)
To: Robin Murphy
Cc: 'Christoph Hellwig', David Laight, Maxime Ripard,
Joonas Lahtinen, dri-devel@lists.freedesktop.org,
linux-mm@kvack.org, devel@driverdev.osuosl.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
David Airlie, linux-media@vger.kernel.org, Intel Linux Wireless,
intel-gfx@lists.freedesktop.org, Maarten Lankhorst, Jani Nikula,
Ian Abbott, Rodrigo Vivi, Sean Paul, moderated list:ARM PORT,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, H Hartley Sweeten,
iommu@lists.linux-foundation.org, Daniel Vetter
In-Reply-To: <4113cd5f-5c13-e9c7-bc5e-dcf0b60e7054@arm.com>
On Fri, Jun 14, 2019 at 04:05:33PM +0100, Robin Murphy wrote:
> That said, I don't believe this particular patch should make any
> appreciable difference - alloc_pages_exact() is still going to give back
> the same base address as the rounded up over-allocation would, and
> PAGE_ALIGN()ing the size passed to get_order() already seemed to be
> pointless.
True, we actually do get the right alignment just about anywhere.
Not 100% sure about the various static pool implementations, but we
can make sure if any didn't we'll do that right thing once those
get consolidated.
^ permalink raw reply
* Re: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous
From: 'Christoph Hellwig' @ 2019-06-14 15:05 UTC (permalink / raw)
To: David Laight
Cc: 'Christoph Hellwig', Maarten Lankhorst, Maxime Ripard,
Sean Paul, David Airlie, Daniel Vetter, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, Ian Abbott, H Hartley Sweeten,
Intel Linux Wireless, moderated list:ARM PORT,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
linux-rdma@vger.kernel.org, linux-media@vger.kernel.org,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-s390@vger.kernel.org, devel@driverdev.osuosl.org,
linux-mm@kvack.org, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
In-Reply-To: <d93fd4c2c1584d92a05dd641929f6d63@AcuMS.aculab.com>
On Fri, Jun 14, 2019 at 03:01:22PM +0000, David Laight wrote:
> I'm pretty sure there is a lot of code out there that makes that assumption.
> Without it many drivers will have to allocate almost double the
> amount of memory they actually need in order to get the required alignment.
> So instead of saving memory you'll actually make more be used.
That code would already be broken on a lot of Linux platforms.
^ permalink raw reply
* Re: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous
From: Robin Murphy @ 2019-06-14 15:05 UTC (permalink / raw)
To: 'Christoph Hellwig', David Laight
Cc: Maxime Ripard, Joonas Lahtinen, dri-devel@lists.freedesktop.org,
linux-mm@kvack.org, devel@driverdev.osuosl.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
David Airlie, linux-media@vger.kernel.org, Intel Linux Wireless,
intel-gfx@lists.freedesktop.org, Maarten Lankhorst, Jani Nikula,
Ian Abbott, Rodrigo Vivi, Sean Paul, moderated list:ARM PORT,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, H Hartley Sweeten,
iommu@lists.linux-foundation.org, Daniel Vetter
In-Reply-To: <20190614145001.GB9088@lst.de>
On 14/06/2019 15:50, 'Christoph Hellwig' wrote:
> On Fri, Jun 14, 2019 at 02:15:44PM +0000, David Laight wrote:
>> Does this still guarantee that requests for 16k will not cross a 16k boundary?
>> It looks like you are losing the alignment parameter.
>
> The DMA API never gave you alignment guarantees to start with,
> and you can get not naturally aligned memory from many of our
> current implementations.
Well, apart from the bit in DMA-API-HOWTO which has said this since
forever (well, before Git history, at least):
"The CPU virtual address and the DMA address are both
guaranteed to be aligned to the smallest PAGE_SIZE order which
is greater than or equal to the requested size. This invariant
exists (for example) to guarantee that if you allocate a chunk
which is smaller than or equal to 64 kilobytes, the extent of the
buffer you receive will not cross a 64K boundary."
That said, I don't believe this particular patch should make any
appreciable difference - alloc_pages_exact() is still going to give back
the same base address as the rounded up over-allocation would, and
PAGE_ALIGN()ing the size passed to get_order() already seemed to be
pointless.
Robin.
^ permalink raw reply
* RE: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous
From: David Laight @ 2019-06-14 15:01 UTC (permalink / raw)
To: 'Christoph Hellwig'
Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
Daniel Vetter, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Ian Abbott, H Hartley Sweeten, Intel Linux Wireless,
moderated list:ARM PORT, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, linux-rdma@vger.kernel.org,
linux-media@vger.kernel.org, netdev@vger.kernel.org,
linux-wireless@vger.kernel.org, linux-s390@vger.kernel.org,
devel@driverdev.osuosl.org, linux-mm@kvack.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
In-Reply-To: <20190614145001.GB9088@lst.de>
From: 'Christoph Hellwig'
> Sent: 14 June 2019 15:50
> To: David Laight
> On Fri, Jun 14, 2019 at 02:15:44PM +0000, David Laight wrote:
> > Does this still guarantee that requests for 16k will not cross a 16k boundary?
> > It looks like you are losing the alignment parameter.
>
> The DMA API never gave you alignment guarantees to start with,
> and you can get not naturally aligned memory from many of our
> current implementations.
Hmmm...
I thought that was even documented.
I'm pretty sure there is a lot of code out there that makes that assumption.
Without it many drivers will have to allocate almost double the
amount of memory they actually need in order to get the required alignment.
So instead of saving memory you'll actually make more be used.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply
* Re: [mac80211-next:master 17/20] drivers/net/wireless/intel/iwlwifi/dvm/rs.c:3317:3: error: 'const struct rate_control_ops' has no member named 'remove_sta_debugfs'; did you mean 'add_sta_debugfs'?
From: Johannes Berg @ 2019-06-14 14:58 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: kbuild test robot, kbuild-all, linux-wireless
In-Reply-To: <20190614143359.GA11550@kroah.com>
On Fri, 2019-06-14 at 16:33 +0200, Greg Kroah-Hartman wrote:
> Did you apply my "[PATCH 3/5] iwlwifi: dvm: no need to check return
> value of debugfs_create function" patch also to this tree? The 5th
> patch in the series depended on it :(
Yeah, my bad, sorry about that. I was not paying attention to the "5/5"
in patchwork, and the other patches got assigned to other maintainers so
I didn't see them there.
I've dropped the patch for now, until that's all sorted out. Or maybe
Kalle will just take them all together.
johannes
^ permalink raw reply
* Re: [PATCH-v3 1/2] wireless: Support assoc-at-ms timer in sta-info
From: Johannes Berg @ 2019-06-14 14:56 UTC (permalink / raw)
To: Ben Greear, linux-wireless
In-Reply-To: <3ad69c55-2b88-a96b-d21e-99f4418466ee@candelatech.com>
On Fri, 2019-06-14 at 07:46 -0700, Ben Greear wrote:
>
> The point of my patch was to allow 'iw' to return a more precise time
> that the station has been associated, so I am not sure that BOOTIME is
> a good thing to use for that?
Depends what you want, really.
> + if (sinfo[NL80211_STA_INFO_ASSOC_AT_MS])
> + printf("\n\tassociated at:\t%llu ms",
> + (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_ASSOC_AT_MS]));
>
> - printf("\n");
> + printf("\n\tcurrent time:\t%llu ms\n", now_ms);
Since you just print the time in milliseconds, and the current time in
milliseconds, you don't even really have any value in the wall clock.
Quite the opposite - this lends itself to subtracting to try to figure
out how long it was associated, which is the completely wrong thing to
do with wall clock - timezone adjustment could've happened inbetween,
for example!
I really see no point in trying to give the wall clock at assoc time. If
no timezone adjustment happened, you can just as well give the boottime
and have the userspace figure out the wall clock. If timezone adjustment
happened, then any calculations are wrong anyway, what would the point
be?
johannes
^ permalink raw reply
* Re: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous
From: 'Christoph Hellwig' @ 2019-06-14 14:50 UTC (permalink / raw)
To: David Laight
Cc: 'Christoph Hellwig', Maarten Lankhorst, Maxime Ripard,
Sean Paul, David Airlie, Daniel Vetter, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, Ian Abbott, H Hartley Sweeten,
Intel Linux Wireless, moderated list:ARM PORT,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
linux-rdma@vger.kernel.org, linux-media@vger.kernel.org,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-s390@vger.kernel.org, devel@driverdev.osuosl.org,
linux-mm@kvack.org, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
In-Reply-To: <a90cf7ec5f1c4166b53c40e06d4d832a@AcuMS.aculab.com>
On Fri, Jun 14, 2019 at 02:15:44PM +0000, David Laight wrote:
> Does this still guarantee that requests for 16k will not cross a 16k boundary?
> It looks like you are losing the alignment parameter.
The DMA API never gave you alignment guarantees to start with,
and you can get not naturally aligned memory from many of our
current implementations.
^ permalink raw reply
* Re: [PATCH 12/16] staging/comedi: mark as broken
From: Christoph Hellwig @ 2019-06-14 14:48 UTC (permalink / raw)
To: Greg KH
Cc: Christoph Hellwig, Maarten Lankhorst, Maxime Ripard, Sean Paul,
David Airlie, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Ian Abbott, H Hartley Sweeten, devel, linux-s390,
Intel Linux Wireless, linux-rdma, netdev, intel-gfx,
linux-wireless, linux-kernel, dri-devel, linux-mm, iommu,
moderated list:ARM PORT, linux-media
In-Reply-To: <20190614140239.GA7234@kroah.com>
On Fri, Jun 14, 2019 at 04:02:39PM +0200, Greg KH wrote:
> Perhaps a hint as to how we can fix this up? This is the first time
> I've heard of the comedi code not handling dma properly.
It can be fixed by:
a) never calling virt_to_page (or vmalloc_to_page for that matter)
on dma allocation
b) never remapping dma allocation with conflicting cache modes
(no remapping should be doable after a) anyway).
^ permalink raw reply
* Re: [PATCH-v3 1/2] wireless: Support assoc-at-ms timer in sta-info
From: Ben Greear @ 2019-06-14 14:46 UTC (permalink / raw)
To: Johannes Berg, linux-wireless
In-Reply-To: <21fa668485f4eb0a8056aac1797854f267d5f1e0.camel@sipsolutions.net>
On 6/14/19 6:38 AM, Johannes Berg wrote:
> On Mon, 2019-04-15 at 10:21 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Report time stamp of when sta became associated.
>
> I guess that makes sense.
>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>> include/net/cfg80211.h | 2 ++
>> include/uapi/linux/nl80211.h | 2 ++
>> net/wireless/nl80211.c | 1 +
>> 3 files changed, 5 insertions(+)
>>
>> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
>> index f49eb1464b7a..a3ad78b9d9f4 100644
>> --- a/include/net/cfg80211.h
>> +++ b/include/net/cfg80211.h
>> @@ -1268,6 +1268,7 @@ struct cfg80211_tid_stats {
>> * indicate the relevant values in this struct for them
>> * @connected_time: time(in secs) since a station is last connected
>> * @inactive_time: time since last station activity (tx/rx) in milliseconds
>> + * @assoc_at_ms: time in ms of the last association
>
> I think the "_at_ms" doesn't really make sense. "time in ms" also
> doesn't make sense as documentation. I think you need to say what should
> be assigned here.
>
> Also, you're actually using ktime_get_real() for this, which again
> doesn't make much sense. For exposing an absolute time, I think we're
> better off with CLOCK_BOOTTIME like we use elsewhere:
The point of my patch was to allow 'iw' to return a more precise time
that the station has been associated, so I am not sure that BOOTIME is
a good thing to use for that?
Here are the pertinent parts of my iw patches:
diff --git a/station.c b/station.c
index 25cbbc3..e7738cc 100644
--- a/station.c
+++ b/station.c
@@ -314,6 +314,12 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
[NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
};
char *chain;
+ struct timeval now;
+ unsigned long long now_ms;
+
+ gettimeofday(&now, NULL);
+ now_ms = now.tv_sec * 1000;
+ now_ms += (now.tv_usec / 1000);
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
@@ -557,8 +563,11 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
if (sinfo[NL80211_STA_INFO_CONNECTED_TIME])
printf("\n\tconnected time:\t%u seconds",
nla_get_u32(sinfo[NL80211_STA_INFO_CONNECTED_TIME]));
+ if (sinfo[NL80211_STA_INFO_ASSOC_AT_MS])
+ printf("\n\tassociated at:\t%llu ms",
+ (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_ASSOC_AT_MS]));
- printf("\n");
+ printf("\n\tcurrent time:\t%llu ms\n", now_ms);
return NL_SKIP;
}
Thanks,
Ben
>
> * @boottime_ns: CLOCK_BOOTTIME timestamp the frame was received at, this is
> * needed only for beacons and probe responses that update the scan cache.
>
>
>> + * @NL80211_STA_INFO_ASSOC_AT_MS: Timestamp of last association
>
> _ASSOC_TIMESTAMP or something would make more sense too as the attribute
> name, and clearly the documentation needs to spell out the semantics
> here too.
>
> johannes
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox