[PATCH v1 1/1] iommu/vt-d: use lo_hi_readq() / lo_hi_writeq()

2015-08-20 Thread Andy Shevchenko
There is already helper functions to do 64-bit I/O on 32-bit machines or buses, thus we don't need to reinvent the wheel. Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com --- include/linux/intel-iommu.h | 19 +-- 1 file changed, 5 insertions(+), 14 deletions

Re: [PATCH 4/7] mfd: hi655x: Add hi665x pmic driver

2015-11-06 Thread Andy Shevchenko
ral Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#ifndef __HI655X_PMIC_H > +#define __HI655X_PMIC_H > + > +/* Hi655x registers are mapped to memory bus in 4 bytes stride */ > +#define HI655X_REG_TO_BUS_ADDR(x) ((x) <<

Re: [PATCH 6/7] regulator: hisilicon: Add hi655x pmic voltage regulator driver

2015-11-06 Thread Andy Shevchenko
= { > + .name = "hi655x_regulator", > + .of_match_table = of_hi655x_regulator_match_tbl, > + }, > + .probe = hi655x_regulator_probe, > +}; > +module_platform_driver(hi655x_regulator_driver); > + > +MODULE_AUTHOR

Re: [PATCH v1 1/1] iommu/vt-d: use lo_hi_readq() / lo_hi_writeq()

2015-09-17 Thread Andy Shevchenko
On Mon, 2015-08-17 at 17:04 +0300, Andy Shevchenko wrote: > There is already helper functions to do 64-bit I/O on 32-bit machines > or buses, > thus we don't need to reinvent the wheel. > Any comment on this one? > Signed-off-by: Andy Shevchenko <andriy.shevche.

Re: [PATCH 4/9] dmaengine: pl330: add new items for pl330 private data

2015-12-11 Thread Andy Shevchenko
dma_pl330_platdata. >> Physically DMA share ACPI device with UART, however, BIOS believes DMA and >> UART is one device. >> We can't get irq share info from ACPI. And we don't use DT. >> > That should be then a MFD device And for me seems like acpi_amba and driv

Re: [PATCH 5/9] dmaengine: pl330: provide ACPI dmaengine interface

2015-12-12 Thread Andy Shevchenko
_register(>dev, > + acpi_dma_pl330_xlate, > pl330); So, someone has either to provide CSRT (which is mostly foreign to ACPI tables), or to provide those resources somehow else (request line base and number). In the latter case you would need to add the hook into acpi_dm

Re: [PATCH 7/9] Serial:8250: New Port Type PORT_AMD_8250

2015-12-12 Thread Andy Shevchenko
ceiver line status interrupt > */ > #define UART_IER_THRI 0x02 /* Enable Transmitter holding register > int. */ > #define UART_IER_RDI 0x01 /* Enable receiver data interrupt */ > +/* Enable Programmable Transmitter holding register int. */ > +#define UART_IER_PTIME 0x80 Move this to be first in the list. Put comment at the end of the line > /* > * Sleep mode for ST16650 and TI16750. For the ST16650, EFR[4]=1 > */ > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 0/9] 8250: AMD Carrizo UART PL300 DMA enablement

2015-12-12 Thread Andy Shevchenko
pi_amba.c > > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at htt

[PATCH v2 1/1] iommu/vt-d: use lo_hi_readq() / lo_hi_writeq()

2015-11-19 Thread Andy Shevchenko
There is already helper functions to do 64-bit I/O on 32-bit machines or buses, thus we don't need to reinvent the wheel. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- Cahngelog v2: - rebase on top of recent linux-next include/linux/intel-iommu.

Re: [PATCH v2 1/1] iommu/vt-d: use lo_hi_readq() / lo_hi_writeq()

2016-01-28 Thread Andy Shevchenko
On Thu, 2015-11-19 at 18:22 +0200, Andy Shevchenko wrote: > There is already helper functions to do 64-bit I/O on 32-bit machines > or buses, > thus we don't need to reinvent the wheel. > Any comment on this? > Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com&

Re: [PATCH v1 1/6] iommu/dmar: Fix crash on boot when DMAR is disabled

2017-02-20 Thread Andy Shevchenko
On Wed, 2017-02-15 at 16:42 +0200, Andy Shevchenko wrote: > By default CONFIG_INTEL_IOMMU_DEFAULT_ON is not set and thus > dmar_disabled variable is set. > > Intel IOMMU driver based on above doesn't set intel_iommu_enabled > variable. > > The commit b0119e870837 ("io

Re: [PATCH v1 1/6] iommu/dmar: Fix crash on boot when DMAR is disabled

2017-02-22 Thread Andy Shevchenko
On Wed, 2017-02-22 at 12:26 +0100, Joerg Roedel wrote: > Hi Andy, > > On Wed, Feb 15, 2017 at 04:42:21PM +0200, Andy Shevchenko wrote: > > By default CONFIG_INTEL_IOMMU_DEFAULT_ON is not set and thus > > dmar_disabled variable is set. > > > > Intel IOMMU

[PATCH v1 3/6] iommu/dmar: Return directly from a loop in dmar_dev_scope_status()

2017-02-15 Thread Andy Shevchenko
There is no need to have a temporary variable. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 322765

[PATCH v1 5/6] iommu/dmar: Remove redundant ' != 0' when check return code

2017-02-15 Thread Andy Shevchenko
Usual patter when we check for return code, which might be negative errno, is either ret or !ret. Remove extra ' != 0' from condition. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v1 4/6] iommu/dmar: Remove redundant assignment of ret

2017-02-15 Thread Andy Shevchenko
There is no need to assign ret to 0 in some cases. Moreover it might shadow some errors in the future. Remove such assignments. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v1 6/6] iommu/vt-d: Use lo_hi_readq() / lo_hi_writeq()

2017-02-15 Thread Andy Shevchenko
There is already helper functions to do 64-bit I/O on 32-bit machines or buses, thus we don't need to reinvent the wheel. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- include/linux/intel-iommu.h | 18 ++ 1 file changed, 2 insertions(+), 16 del

[PATCH v1 1/6] iommu/dmar: Fix crash on boot when DMAR is disabled

2017-02-15 Thread Andy Shevchenko
ommu: Introduce new 'struct iommu_device'") Cc: Joerg Roedel <jroe...@suse.de> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers

Re: [PATCH v1 2/6] iommu/dmar: Rectify return code handling in detect_intel_iommu()

2017-02-15 Thread Andy Shevchenko
On Wed, 2017-02-15 at 16:42 +0200, Andy Shevchenko wrote: > There is inconsistency in return codes across the functions called > from > detect_intel_iommu(). > > Make it consistent and propagate return code to the caller.   > @@ -911,10 +911,9 @@ int __init detec

Re: [PATCH] ACPI / DMAR: Avoid passing NULL to acpi_put_table()

2017-01-05 Thread Andy Shevchenko
not present in which case NULL is > passed to acpi_put_table() which doesn't check against that and > attempts to handle it regardless. > > For this reason, check the pointer passed to acpi_put_table() > before invoking it. > Reviewed-by: Andy Shevchenko <andy.shevche...

[PATCH v2 5/5] iommu/vt-d: Use lo_hi_readq() / lo_hi_writeq()

2017-03-16 Thread Andy Shevchenko
There is already helper functions to do 64-bit I/O on 32-bit machines or buses, thus we don't need to reinvent the wheel. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- include/linux/intel-iommu.h | 18 ++ 1 file changed, 2 insertions(+), 16 del

[PATCH v2 2/5] iommu/dmar: Return directly from a loop in dmar_dev_scope_status()

2017-03-16 Thread Andy Shevchenko
There is no need to have a temporary variable. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index edcf74

[PATCH v2 1/5] iommu/dmar: Rectify return code handling in detect_intel_iommu()

2017-03-16 Thread Andy Shevchenko
There is inconsistency in return codes across the functions called from detect_intel_iommu(). Make it consistent and propagate return code to the caller. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 15 +++ 1 file chan

[PATCH v2 4/5] iommu/dmar: Remove redundant ' != 0' when check return code

2017-03-16 Thread Andy Shevchenko
Usual pattern when we check for return code, which might be negative errno, is either (ret) or (!ret). Remove extra ' != 0' from condition. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 3/5] iommu/dmar: Remove redundant assignment of ret

2017-03-16 Thread Andy Shevchenko
There is no need to assign ret to 0 in some cases. Moreover it might shadow some errors in the future. Remove such assignments. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/dmar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-22 Thread Andy Shevchenko
On Thu, 2017-05-04 at 12:21 +0300, Andy Shevchenko wrote: > acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16 > bytes. Instead we convert them to use uuid_le type. At the same time > we > convert current users. > > acpi_str_to_uuid() becomes useless af

[PATCH v1] ACPI: Switch to use generic UUID API

2017-05-04 Thread Andy Shevchenko
x.intel.com> Cc: Liam Girdwood <lgirdw...@gmail.com> Cc: Mark Brown <broo...@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/acpi/acpi_extlog.c | 10 +++--- drivers/acpi/bus.c | 29 ++

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-05 Thread Andy Shevchenko
On Fri, 2017-05-05 at 10:06 +0300, Amir Goldstein wrote: > On Fri, May 5, 2017 at 9:20 AM, Dan Williams <dan.j.willi...@intel.com > > wrote: > > On Thu, May 4, 2017 at 2:21 AM, Andy Shevchenko > > <andriy.shevche...@linux.intel.com> wrote: > > >  

Re: [PATCH 0/2] lib: Adjustments for 11 function implementations

2017-10-08 Thread Andy Shevchenko
gt; but without that they simply are churn. > > NAK for both patches. While patch 1 might have some sense, second one is matter of taste which is dependent to maintainer/trends/weather on Mars. So, +1 to Christoph's opinion. -- Andy Shevchenko <andriy.shevche...@linux.int

Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents

2017-11-28 Thread Andy Shevchenko
On Tue, 2017-11-28 at 00:02 +, Mehta, Sohil wrote: > On Mon, 2017-11-27 at 20:52 +, Kammela, Gayatri wrote: > > > > > > > > From: Andy Shevchenko [mailto:andriy.shevche...@linux.intel.com] > > > Sent: Wednesday, November 22, 2017 1:19 PM > > >

Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents

2017-11-28 Thread Andy Shevchenko
ily consolidate them in one patch then against seq_file.h. > > [1]: https://marc.info/?l=linux-bluetooth=151138535801354=2 -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ iommu mailing list iommu@lists.linux-foundation.

Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents

2017-11-22 Thread Andy Shevchenko
o use in the future. > + if (!debugfs_create_file("intel_iommu_regset", S_IRUGO, > + iommu_debug_root, NULL, > _iommu_regs_fops [1]: https://marc.info/?l=linux-bluetooth=151138535801354=2 -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Inte

Re: [PATCH v2 6/6] iommu/vt-d: Add debugfs support for Intel IOMMU Interrupt remapping

2017-11-22 Thread Andy Shevchenko
lease= single_release, > + .owner = THIS_MODULE, > +}; > Same comments as per patch 4. -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v4 5/5] iommu/vt-d: Add debugfs support for Interrupt remapping

2017-12-19 Thread Andy Shevchenko
\t\t\t\t\t\t\t\n"); Leading \n. > + seq_printf(m, "\nPosted Interrupt supported on IOMMU: > %s\n" Ditto. > +" IR table address:%p\n", iommu->name, > + iommu->ir_table); > + >

Re: [PATCH v4 0/5] Add Intel IOMMU debugfs support

2017-12-19 Thread Andy Shevchenko
t and extended context patch into > one > - Remove redundant IOMMU null check under for_each_active_iommu > - Update the commit title to be consistent > > Changes since v2: > - Added a macro for seq file operations based on recommendation by > Andy >Shevchenko. The

[PATCH v1] iommu: Remove extra NULL check when call strtobool()

2018-05-14 Thread Andy Shevchenko
strtobool() does check for NULL parameter already. No need to repeat. While here, switch to kstrtobool() and unshadow actual error code (which is still -EINVAL). No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/iommu/iommu

Re: [PATCH 2/2] dma-mapping: move all DMA mapping code to kernel/dma

2018-06-14 Thread Andy Shevchenko
ight switch to def_bool y instead of two lines. -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: usb HC busted?

2018-06-06 Thread Andy Shevchenko
gt; see: > https://elixir.bootlin.com/linux/v4.14.2/source/drivers/usb/host/xhci- > mem.c#L52 > > prints above are custom traces added right after dma_pool_zalloc() For better understanding it would be good to have dma_pool_free() calls debugged as well. Is it possible t

Re: [PATCH v6 1/5] iommu/vt-d: Add debugfs support for Intel IOMMU internals

2018-01-10 Thread Andy Shevchenko
via > + debugfs. Select this option if you want to export these > internals. > + > + Say Y if you need this. Also I lost a track how this option is being used here. It looks like this part is not related to the patch itself. -- Andy Shevchenko <andriy.shevche...@linux.intel.com> I

Re: [PATCH v6 3/5] iommu/vt-d: Add debugfs support to show register contents

2018-01-10 Thread Andy Shevchenko
x\n", > iommu->name, > +base); Can we get rid of leading '\n'? -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v6 5/5] iommu/vt-d: Add debugfs support for Interrupt remapping

2018-01-10 Thread Andy Shevchenko
of first one, it would be slightly better for my opinion. > + seq_printf(m, "Posted Interrupt supported on IOMMU: > %s\n" > + " IR table address:%p\n", iommu->name, > +iommu->ir_table); Ditto. -- Andy She

Re: [PATCH v6 0/5] Add Intel IOMMU debugfs support

2018-01-10 Thread Andy Shevchenko
nded context patch into > one > - Remove redundant IOMMU null check under for_each_active_iommu > - Update the commit title to be consistent > > Changes since v2: > - Added a macro for seq file operations based on recommendation by > Andy >Shevchenko. The marco can be moved

Re: [PATCH v6 4/5] iommu/vt-d: Add debugfs support to show Pasid table contents

2018-01-10 Thread Andy Shevchenko
el_iommu_get_pts(iommu); > + > + } > +} > +#else /* CONFIG_INTEL_IOMMU_SVM */ > +static void pasid_tbl_entry_show(struct seq_file *m, struct > intel_iommu *iommu) > +{ > +} I think is not a big deal if you put all in one line like static ...

Re: [PATCH v7 0/5] Add Intel IOMMU debugfs support

2018-02-04 Thread Andy Shevchenko
apping in that > order. The > information can be accessed in sysfs at > '/sys/kernel/debug/intel_iommu/'. > > Nice and clean in comparison to v1. Reviewed-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> Joerg, note, that macro, which patch 2 defines privately, lik

Re: [PATCH v5 5/5] iommu/vt-d: Add debugfs support for Interrupt remapping

2017-12-28 Thread Andy Shevchenko
On Thu, 2017-12-21 at 16:32 -0800, Sohil Mehta wrote: > + seq_puts(m, "\n"); seq_putc() > + seq_puts(m, "\n"); Ditto. -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy

Re: [PATCH v5 2/5] iommu/vt-d: Add debugfs support to show context internals

2017-12-28 Thread Andy Shevchenko
OMMU %s: %2s Root Table Addr:%llx\n", > iommu->name, > +ext ? "Extended" : "", rtaddr_reg); Still leading '\n'... -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 2/9] dmapool: cleanup error messages

2018-08-03 Thread Andy Shevchenko
rval) busy Have you checked a history of this? I'm pretty sure this was created in an order to avoid bad looking (and in some cases frightening) "NULL device *" part. If it it's the case, I would rather leave it as is, and even not the case, I'm slightly more bent to the cu

Re: [PATCH v2 4/9] dmapool: improve scalability of dma_pool_alloc

2018-08-03 Thread Andy Shevchenko
st_head page_list[POOL_N_LISTS]; To be consistent with naming scheme and common practice I would rather name the last one as POOL_MAX_IDX 2 > + INIT_LIST_HEAD(>page_list[0]); > + INIT_LIST_HEAD(>page_list[1]); You introduced defines and don't use the

Re: [PATCH v2 2/9] dmapool: cleanup error messages

2018-08-03 Thread Andy Shevchenko
On Fri, Aug 3, 2018 at 6:59 PM, Andy Shevchenko wrote: > On Fri, Aug 3, 2018 at 6:17 PM, Tony Battersby wrote: >> But then I decided to simplify it to just use dev_err(). I still have >> the old version. When I submit v3 of the patchset, which would you prefer? > > JFYI

Re: [PATCH v2 2/9] dmapool: cleanup error messages

2018-08-03 Thread Andy Shevchenko
On Fri, Aug 3, 2018 at 6:17 PM, Tony Battersby wrote: > On 08/03/2018 09:41 AM, Tony Battersby wrote: >> On 08/03/2018 04:56 AM, Andy Shevchenko wrote: >>> On Thu, Aug 2, 2018 at 10:57 PM, Tony Battersby >>> wrote: >>>> Remove code duplication in error

Re: [PATCH 2/3] dmapool: improve scalability of dma_pool_free

2018-07-26 Thread Andy Shevchenko
proper %p extensions for the DMA addresses: https://elixir.bootlin.com/linux/latest/source/Documentation/core-api/printk-formats.rst#L150 -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/3] dmapool: improve scalability of dma_pool_alloc

2018-07-26 Thread Andy Shevchenko
ither 0 or 1 page. In that case what's the point to have a list? -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 2/9] dmapool: cleanup error messages

2018-08-03 Thread Andy Shevchenko
On Fri, Aug 3, 2018 at 8:03 PM, Tony Battersby wrote: > On 08/03/2018 12:22 PM, Matthew Wilcox wrote: >> On Fri, Aug 03, 2018 at 06:59:20PM +0300, Andy Shevchenko wrote: >>>>>> I'm pretty sure this was created in an order to avoid bad looking (and >>>>>

Re: [PATCH 2/3] dmapool: improve scalability of dma_pool_free

2018-07-27 Thread Andy Shevchenko
make the lists singly-linked instead of doubly-linked >> to save space. >> > > I managed to redo my dma_pool_alloc() patch to make avail_page_list > singly-linked instead of doubly-linked. Are you relying on llist.h implementation? Btw, did you see quicklist.h

Re: [PATCH v3 07/10] dmapool: cleanup integer types

2018-08-08 Thread Andy Shevchenko
; the blocks in the entire pool. > else if ((boundary < size) || (boundary & (boundary - 1))) > return NULL; Just a side note: in above it's is_power_of_2() opencoded. -- With Best Regards, Andy Shevchenko ___ iommu maili

Re: [PATCH v3 08/10] dmapool: improve accuracy of debug statistics

2018-08-08 Thread Andy Shevchenko
% boundary) / size; If boundary is guaranteed to be power of 2, this can avoid cost divisions (though it's a slow path anyway). -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 1/5] iommu/amd - Add debugfs support

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 8:54 PM, Gary R Hook <gary.h...@amd.com> wrote: > On 03/13/2018 12:16 PM, Andy Shevchenko wrote: >> On Fri, Mar 9, 2018 at 2:50 AM, Gary R Hook <gary.h...@amd.com> wrote: >>> +#include >>> +#include >>> +#incl

Re: [PATCH v2 5/5] iommu/amd - Add a debugfs entry to specify a IOMMU device table entry

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 8:54 PM, Gary R Hook <gary.h...@amd.com> wrote: > On 03/13/2018 12:20 PM, Andy Shevchenko wrote: >>> + } else if (obuf[0] == '0' && obuf[1] == 'x') { >>> + n = sscanf(obuf, "%x", _iommu_devid); >>>

Re: [PATCH v2 1/5] iommu/amd - Add debugfs support

2018-03-13 Thread Andy Shevchenko
; > + > + n = amd_iommu_count_valid_dtes(0, 0x); > + oboff += OSCNPRINTF("%d\n", n); > + return ret; > +} > @@ -89,6 +89,7 @@ > #define ACPI_DEVFLAG_ATSDIS 0x1000 > > #define LOOP_TIMEOUT 100

Re: [PATCH v2 5/5] iommu/amd - Add a debugfs entry to specify a IOMMU device table entry

2018-03-13 Thread Andy Shevchenko
mp; obuf[1] == 'x') { > + n = sscanf(obuf, "%x", _iommu_devid); > + } else { > + n = sscanf(obuf, "%d", _iommu_devid); > + } kstrtoint() ? -- With Best Regards, Andy Shevchenko ___ i

Re: [PATCH v2 1/5] iommu/amd - Add debugfs support

2018-03-14 Thread Andy Shevchenko
On Wed, Mar 14, 2018 at 5:24 PM, Gary R Hook <gary.h...@amd.com> wrote: > On 03/13/2018 03:23 PM, Andy Shevchenko wrote: >>>>> +#include >>>>> +#include >>>>> +#include >>>> Keep in order? >>> What order woul

Re: dma-mapping: clearing GFP_ZERO flag caused crashes of Ethernet on arc/hsdk board.

2018-03-27 Thread Andy Shevchenko
ce *dev, size_t size, > void *kvaddr; > int need_coh = 1, need_kvaddr = 0; > > - page = alloc_pages(gfp, order); > + page = alloc_pages(gfp | __GFP_ZERO, order); > > if (!page) > return NULL; > ->8--

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Andy Shevchenko
time ago. If I _was_ in Cc list and didn't comment, I'm fine with it. -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Andy Shevchenko
On Tue, Dec 4, 2018 at 11:26 PM Tony Battersby wrote: > > On 12/4/18 3:30 PM, Andy Shevchenko wrote: > > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote: > >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: > >>> Also, Andy had issues with

Re: [PATCH] dcdbas: Fix Intel-IOMMU domain allocation failure

2019-01-24 Thread Andy Shevchenko
above code using it too first, followed by this change in dcdbas. Wait... It sounds to me like a part of arch code where we define arch_setup_pdev_archdata() and use this dummy domain. Though dummy domain definition should come from IOMMU framework. -- With Best Regards, Andy Shevchenko

[PATCH v1] iommu/vt-d: Switch to bitmap_zalloc()

2019-03-04 Thread Andy Shevchenko
Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko --- drivers/iommu/intel_irq_remapping.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v1] dma-mapping: Move debug configuration options to kernel/dma

2019-02-11 Thread Andy Shevchenko
Christoph Hellwig Signed-off-by: Andy Shevchenko --- kernel/dma/Kconfig | 2 ++ kernel/dma/Kconfig.debug | 36 lib/Kconfig.debug| 36 3 files changed, 38 insertions(+), 36 deletions(-) create mode 100644

Re: [PATCH v1] dma-mapping: Move debug configuration options to kernel/dma

2019-02-11 Thread Andy Shevchenko
On Mon, Feb 11, 2019 at 04:54:50PM +0100, Christoph Hellwig wrote: > On Mon, Feb 11, 2019 at 05:54:09PM +0200, Andy Shevchenko wrote: > > This is a follow up to the commit cf65a0f6f6ff > > > > ("dma-mapping: move all DMA mapping code to kernel/dma") > > &

[PATCH v2] dma-mapping: Move debug configuration options to kernel/dma

2019-02-11 Thread Andy Shevchenko
Christoph Hellwig Signed-off-by: Andy Shevchenko --- v2: Move to kernel/dma/Kconfig directly kernel/dma/Kconfig | 36 lib/Kconfig.debug | 36 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/kernel/dma

Re: [PATCH] dcdbas: Fix Intel-IOMMU domain allocation failure

2019-01-25 Thread Andy Shevchenko
ion and could cause issues. What do you think? -- With Best Regards, Andy Shevchenko ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 0/3] Add debugfs support to show scalable mode DMAR table

2019-05-10 Thread Andy Shevchenko
e second patch introduces macros that are used during PASID > table walk and the third patch actually adds support to dump scalable mode > DMAR > table. FWIW, Reviewed-by: Andy Shevchenko Since it's debugfs the format is not carved in stone. > > Sai Praneeth (3): > iommu/

Re: [PATCH v5 16/19] iommu/vt-d: Misc macro clean up for SVM

2019-08-15 Thread Andy Shevchenko
On Thu, Aug 15, 2019 at 11:52 PM Jacob Pan wrote: > > Use combined macros for_each_svm_dev() to simplify SVM device iteration > and error checking. > > Suggested-by: Andy Shevchenko > Signed-off-by: Jacob Pan > Reviewed-by: Eric Auger > --- > dri

Re: [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper

2019-10-01 Thread Andy Shevchenko
On Tue, Oct 01, 2019 at 12:38:54PM +0300, Mika Westerberg wrote: > On Tue, Sep 24, 2019 at 10:37:36PM +0300, Andy Shevchenko wrote: > > There are users outside of ACPI realm which reimplementing the comparator > > function to check if the given device matches to gi

Re: [PATCH v2 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()

2019-10-01 Thread Andy Shevchenko
On Tue, Oct 01, 2019 at 03:37:08PM +0300, Adrian Hunter wrote: > On 24/09/19 10:37 PM, Andy Shevchenko wrote: > > Since we have a generic helper, drop custom implementation in the driver. > > - if (strcmp(hid, "QCOM8051")) > > + if (acpi_dev_hid_uid_match(adev

[PATCH v3 1/6] ACPI / utils: Describe function parameters in kernel-doc

2019-10-01 Thread Andy Shevchenko
parameters where it's appropriate. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- drivers/acpi/utils.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index e3974a8f8fd4..dbd1c4cfd7d1 100644 --- a/drivers/acpi/utils.c +++ b

[PATCH v3 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()

2019-10-01 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- drivers/mmc/host/sdhci-acpi.c | 49 --- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/drivers/mmc/host

[PATCH v3 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match()

2019-10-01 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- drivers/acpi/acpi_lpss.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi

[PATCH v3 0/6] ACPI / utils: add new helper for HID/UID match

2019-10-01 Thread Andy Shevchenko
due to latent issue in the header (lkp) - get rid of match_hid_uid() completely in patch 6 Andy Shevchenko (6): ACPI / utils: Describe function parameters in kernel-doc ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI ACPI / utils: Introduce acpi_dev_hid_uid_match() helper

[PATCH v3 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper

2019-10-01 Thread Andy Shevchenko
There are users outside of ACPI realm which reimplementing the comparator function to check if the given device matches to given HID and UID. For better utilization, introduce a helper for everyone to use. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- drivers/acpi/utils.c

[PATCH v3 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()

2019-10-01 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- drivers/iommu/amd_iommu.c | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b

[PATCH v3 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI

2019-10-01 Thread Andy Shevchenko
oduce acpi_dev_get_first_match_dev() helper") Reported-by: kbuild test robot Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg --- include/acpi/acpi_bus.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_b

[PATCH v1 1/5] ACPI / utils: Describe function parameters in kernel-doc

2019-09-24 Thread Andy Shevchenko
parameters where it's appropriate. Signed-off-by: Andy Shevchenko --- drivers/acpi/utils.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index e3974a8f8fd4..dbd1c4cfd7d1 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -455,6

[PATCH v1 2/5] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper

2019-09-24 Thread Andy Shevchenko
There are users outside of ACPI realm which reimplementing the comparator function to check if the given device matches to given HID and UID. For better utilization, introduce a helper for everyone to use. Signed-off-by: Andy Shevchenko --- drivers/acpi/utils.c| 25

[PATCH v1 4/5] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci-acpi.c | 49 --- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host

[PATCH v1 5/5] iommu/amd: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko --- drivers/iommu/amd_iommu.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 61de81965c44

[PATCH v1 3/5] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko --- drivers/acpi/acpi_lpss.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index d696f165a50e

Re: [PATCH v1 5/5] iommu/amd: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
On Tue, Sep 24, 2019 at 03:01:53PM +0300, Andy Shevchenko wrote: > Since we have a generic helper, drop custom implementation in the driver. Actually we may get rid of match_hid_uid() completely and thus slightly speed up get_acpihid_device_id(). I'll wait for other comments and then send

[PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI

2019-09-24 Thread Andy Shevchenko
oduce acpi_dev_get_first_match_dev() helper") Reported-by: kbuild test robot Signed-off-by: Andy Shevchenko --- include/acpi/acpi_bus.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 175f7b40c585..3f6fddeb7

[PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper

2019-09-24 Thread Andy Shevchenko
There are users outside of ACPI realm which reimplementing the comparator function to check if the given device matches to given HID and UID. For better utilization, introduce a helper for everyone to use. Signed-off-by: Andy Shevchenko --- drivers/acpi/utils.c| 25

[PATCH v2 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci-acpi.c | 49 --- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host

[PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc

2019-09-24 Thread Andy Shevchenko
parameters where it's appropriate. Signed-off-by: Andy Shevchenko --- drivers/acpi/utils.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index e3974a8f8fd4..dbd1c4cfd7d1 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -455,6

[PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match

2019-09-24 Thread Andy Shevchenko
in patch 6 Andy Shevchenko (6): ACPI / utils: Describe function parameters in kernel-doc ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI ACPI / utils: Introduce acpi_dev_hid_uid_match() helper ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() mmc: sdhci-acpi: Switch

[PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko --- drivers/acpi/acpi_lpss.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index d696f165a50e

[PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()

2019-09-24 Thread Andy Shevchenko
Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko --- drivers/iommu/amd_iommu.c | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index

Re: [PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()

2019-10-08 Thread Andy Shevchenko
On Mon, Oct 07, 2019 at 05:28:48PM +0200, Joerg Roedel wrote: > On Tue, Sep 24, 2019 at 10:37:39PM +0300, Andy Shevchenko wrote: > > Since we have a generic helper, drop custom implementation in the driver. > > > > Signed-off-by: Andy Shevchenko > > --- > >

Re: [PATCH v3 0/6] ACPI / utils: add new helper for HID/UID match

2019-10-03 Thread Andy Shevchenko
On Thu, Oct 03, 2019 at 12:00:29PM +0200, Ulf Hansson wrote: > On Tue, 1 Oct 2019 at 16:27, Andy Shevchenko > wrote: > > > > There are few users outside of ACPI realm that re-introduce a custom > > solution to match ACPI device against HID/UID. Add a gen

[PATCH v1 1/3] iommu/vt-d: Unify format of the printed messages

2020-05-07 Thread Andy Shevchenko
Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...). Signed-off-by: Andy Shevchenko --- drivers/iommu/intel-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index

[PATCH v1 3/3] iommu/amd: Unify format of the printed messages

2020-05-07 Thread Andy Shevchenko
Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...). Signed-off-by: Andy Shevchenko --- drivers/iommu/amd_iommu_types.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu

[PATCH v1 2/3] iommu/iova: Unify format of the printed messages

2020-05-07 Thread Andy Shevchenko
Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...). Signed-off-by: Andy Shevchenko --- drivers/iommu/iova.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index 0e6a9536eca62

Re: [PATCH] iommu/amd: Fix get_acpihid_device_id

2020-05-09 Thread Andy Shevchenko
this buffer will be > zeroed. If we pass in a null string, acpi_dev_hid_uid_match will return acpi_dev_hid_uid_match() > false because it will try and match an empty string to the ACPI UID of > the device. Thank you for testing and producing a patch! My comments below, after addressing Reviewe

Re: [PATCH v1] iommu/vt-d: Move intel_iommu_ops to header file

2020-08-31 Thread Andy Shevchenko
On Sat, Aug 29, 2020 at 07:58:46AM +0100, Christoph Hellwig wrote: > On Fri, Aug 28, 2020 at 07:05:02PM +0300, Andy Shevchenko wrote: > > Compiler is not happy about hidden declaration of intel_iommu_ops. > > > > .../drivers/iommu/intel/iommu.c:414:24: warning: sy

  1   2   >