Re: [PATCH] dma-mapping: Use 'bitmap_zalloc()' when applicable

2021-10-24 Thread Joe Perches
On Sun, 2021-10-24 at 19:40 +0200, Christophe JAILLET wrote: > 'dma_mem->bitmap' is a bitmap. So use 'bitmap_zalloc()' to simplify code, > improve the semantic and avoid some open-coded arithmetic in allocator > arguments. There is a cocci script for some of these.

Re: [PATCH v9 03/17] vdpa: Fix code indentation

2021-07-14 Thread Joe Perches
On Tue, 2021-07-13 at 16:46 +0800, Xie Yongji wrote: > Use tabs to indent the code instead of spaces. There are a lot more of these in this file. $ ./scripts/checkpatch.pl --fix-inplace --strict include/linux/vdpa.h and a little typing gives: --- include/linux/vdpa.h | 50

Re: [PATCH v2] iommu/amd: Fix extended features logging

2021-04-19 Thread Joe Perches
On Mon, 2021-04-19 at 22:23 +0300, Alexander Monakov wrote: > On Sun, 11 Apr 2021, Joe Perches wrote: > > > > v2: avoid pr_info(""), change pci_info() to pr_info() for a nicer > > > solution > > > > > >  drivers/iommu/amd/init.c | 4 ++--

Re: [PATCH v2] iommu/amd: Fix extended features logging

2021-04-11 Thread Joe Perches
On Mon, 2021-04-12 at 00:13 +0300, Alexander Monakov wrote: > print_iommu_info prints the EFR register and then the decoded list of > features on a separate line: > > pci :00:00.2: AMD-Vi: Extended features (0x206d73ef22254ade): >  PPR X2APIC NX GT IA GA PC GA_vAPIC > > The second line is

Re: [PATCH] iommu/amd: Fix extended features logging

2021-04-11 Thread Joe Perches
On Sun, 2021-04-11 at 21:52 +0200, John Ogness wrote: > I'd rather fix dev_info callers to allow pr_cont and then fix any code > that is using this workaround. Assuming you mean all dev_() uses, me too. > And if the print maintainers agree it is OK to encourage > pr_cont(LOGLEVEL "...") usage,

Re: [PATCH] iommu/amd: Fix extended features logging

2021-04-11 Thread Joe Perches
(cc'ing the printk maintainers) On Sun, 2021-04-11 at 00:11 +0300, Alexander Monakov wrote: > print_iommu_info prints the EFR register and then the decoded list of > features on a separate line: > > pci :00:00.2: AMD-Vi: Extended features (0x206d73ef22254ade): >  PPR X2APIC NX GT IA GA PC

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Joe Perches
On Thu, 2020-09-10 at 15:21 +0100, Robin Murphy wrote: > On 2020-09-09 21:06, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple break; when > > the ne

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
On Wed, 2020-09-09 at 19:36 -0300, Jason Gunthorpe wrote: > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple break; wh

[trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Joe Perches
"fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * Miscellanea: o Move or coalesce a couple label blocks above a default: block. Signed-off-by: Joe Perches --- Compiled allyesconfig x86-64 only. A few files for other arches were not compiled. arch/arm/mach-mmp/p

[Possible PATCH] iommu/qcom: Change CONFIG_BIG_ENDIAN to CONFIG_CPU_BIG_ENDIAN

2020-06-06 Thread Joe Perches
CONFIG_BIG_ENDIAN does not exist as a Kconfig symbol. Signed-off-by: Joe Perches --- I don't have the hardware, so I can't tell if this is a correct change, but it is a logical one. Found by a test script that looks for IS_ENABLED(FOO) where FOO must also exist in Kconfig files. drivers

Re: [PATCH 5.6 61/73] iommu/vt-d: Use right Kconfig option name

2020-05-04 Thread Joe Perches
On Mon, 2020-05-04 at 19:58 +0200, Greg Kroah-Hartman wrote: > From: Lu Baolu > > commit ba61c3da00f4a5bf8805aeca1ba5ac3c9bd82e96 upstream. > > The CONFIG_ prefix should be added in the code. > > Fixes: 046182525db61 ("iommu/vt-d: Add Kconfig option to enable/disable > scalable mode") >

Re: [PATCH] treewide: Rename "unencrypted" to "decrypted"

2020-03-17 Thread Joe Perches
On Tue, 2020-03-17 at 14:24 -0700, Dave Hansen wrote: > On 3/17/20 2:06 PM, Borislav Petkov wrote: > > On Tue, Mar 17, 2020 at 01:35:12PM -0700, Dave Hansen wrote: > > > On 3/17/20 4:18 AM, Borislav Petkov wrote: > > > > Back then when the whole SME machinery started getting mainlined, it > > > >

[PATCH -next 000/491] treewide: use fallthrough;

2020-03-11 Thread Joe Perches
ough.commit_msg") or die "$0: can't create temporary file: $!\n"; print $fh <https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git@perches.com/ EOF ; close $fh; `git commit -s -a -F cvt_fallthrough.commit_msg`; } Joe Perches (491): MELLANOX ETHERNET INNOV

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

2019-12-02 Thread Joe Perches
On Mon, 2019-12-02 at 11:58 -0800, Jacob Pan wrote: > Use combined macros for_each_svm_dev() to simplify SVM device iteration > and error checking. [] > diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c [] > @@ -427,40 +430,36 @@ int intel_svm_unbind_mm(struct device *dev, int

Re: [PATCH v4 8/8] iommu/vt-d: Misc macro clean up for SVM

2019-12-02 Thread Joe Perches
On Mon, 2019-12-02 at 10:15 -0800, Jacob Pan wrote: > On Thu, 21 Nov 2019 13:37:10 -0800 > Joe Perches wrote: > > > On Thu, 2019-11-21 at 13:26 -0800, Jacob Pan wrote: > > > Use combined macros for_each_svm_dev() to simplify SVM device > > > iteration and er

Re: [PATCH v2] iommu/iova: silence warnings under memory pressure

2019-11-22 Thread Joe Perches
On Fri, 2019-11-22 at 11:46 -0500, Qian Cai wrote: > On Fri, 2019-11-22 at 08:28 -0800, Joe Perches wrote: > > On Fri, 2019-11-22 at 09:59 -0500, Qian Cai wrote: > > > On Thu, 2019-11-21 at 20:37 -0800, Joe Perches wrote: > > > > On Thu, 2019-11-21 at 21:55 -0500,

Re: [PATCH v2] iommu/iova: silence warnings under memory pressure

2019-11-22 Thread Joe Perches
On Fri, 2019-11-22 at 09:59 -0500, Qian Cai wrote: > On Thu, 2019-11-21 at 20:37 -0800, Joe Perches wrote: > > On Thu, 2019-11-21 at 21:55 -0500, Qian Cai wrote: > > > When running heavy memory pressure workloads, this 5+ old system is > > > throwing endless warnings b

Re: [PATCH v2] iommu/iova: silence warnings under memory pressure

2019-11-21 Thread Joe Perches
On Thu, 2019-11-21 at 21:55 -0500, Qian Cai wrote: > When running heavy memory pressure workloads, this 5+ old system is > throwing endless warnings below because disk IO is too slow to recover > from swapping. Since the volume from alloc_iova_fast() could be large, > once it calls printk(), it

Re: [PATCH v4 8/8] iommu/vt-d: Misc macro clean up for SVM

2019-11-21 Thread Joe Perches
On Thu, 2019-11-21 at 13:26 -0800, Jacob Pan wrote: > Use combined macros for_each_svm_dev() to simplify SVM device iteration > and error checking. [] > diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c [] > +#define for_each_svm_dev(sdev, svm, d) \ > +

Re: [PATCH 1/4] dma-debug: Use pr_fmt()

2018-12-04 Thread Joe Perches
On Mon, 2018-12-03 at 17:28 +, Robin Murphy wrote: > Use pr_fmt() to generate the "DMA-API: " prefix consistently. This > results in it being added to a couple of pr_*() messages which were > missing it before, and for the err_printk() calls moves it to the actual > start of the message

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 18:57 +0200, Walter Harms wrote: > It is only cosmetics but even the author got lost about the loose bracket. > I would suggest to remove all the brackets or if needed to move the [ in the > message. We have enought memory this days. My suggestion would be to remove the

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: > On 07/03/2018 05:07 AM, Joe Perches wrote: > > On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: > > > Currently tag is being assigned but not used, it is missing from > > > the dev_err message, so add it in. &

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 11:27 -0500, Hook, Gary wrote: > On 7/3/2018 11:24 AM, Colin Ian King wrote: > > On 03/07/18 17:21, Hook, Gary wrote: > > > On 7/3/2018 10:55 AM, Joe Perches wrote: > > > > On Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: > > >

Re: [PATCH] iommu/amd: fix missing tag from dev_err message

2018-07-03 Thread Joe Perches
On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: > Currently tag is being assigned but not used, it is missing from > the dev_err message, so add it in. > > Cleans up clang warning: > warning: variable 'tag' set but not used [-Wunused-but-set-variable] [] > diff --git

[PATCH 00/18] Convert default pr_fmt from empty to KBUILD_MODNAME

2018-05-10 Thread Joe Perches
ries is applied. The above script output diff is currently: 1198 files changed, 70 insertions(+), 2241 deletions(-) Joe Perches (18): kernel: Use pr_fmt lib: Use pr_fmt printk: Convert pr_fmt from blank define to KBUILD_MODNAME x86: Remove pr_fmt duplicate logging prefixes x86/mtrr: Rename

[PATCH 02/18] lib: Use pr_fmt

2018-05-10 Thread Joe Perches
neatening o Use %s, __func__ instead of embedding function names as strings o Add missing newline terminations Signed-off-by: Joe Perches <j...@perches.com> --- lib/cpu_rmap.c | 15 +--- lib/crc32test.c | 2 ++ lib/earlycpio.c | 5 ++-- lib/find_bit_bench

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Joe Perches
On Tue, 2018-05-08 at 15:07 -0500, Gary R Hook wrote: > On 05/08/2018 01:48 PM, Joe Perches wrote: > > On Tue, 2018-05-08 at 12:08 -0500, Hook, Gary wrote: > > > On 5/7/2018 6:47 PM, kbuild test robot wrote: > > > > > > >

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Joe Perches
On Tue, 2018-05-08 at 12:08 -0500, Hook, Gary wrote: > On 5/7/2018 6:47 PM, kbuild test robot wrote: > > Hi Gary, > > > > I imagine these questions have been asked before, so I'll ask for > forgiveness up front. > > > > Thank you for the patch! Yet something to improve: > > > > [auto build

Re: [PATCH] fix double ;;s in code

2018-02-20 Thread Joe Perches
On Tue, 2018-02-20 at 17:19 +1100, Michael Ellerman wrote: > Daniel Vetter writes: > > On Sun, Feb 18, 2018 at 11:00:56AM +0100, Christophe LEROY wrote: > > > Le 17/02/2018 à 22:19, Pavel Machek a écrit : > > > > > > > > Fix double ;;'s in code. > > > > > > > > Signed-off-by:

Re: [PATCH] Intel-IOMMU: Delete an error message for a failed memory allocation in init_dmars()

2018-01-21 Thread Joe Perches
On Sun, 2018-01-21 at 08:19 +0100, Jörg Rödel wrote: > On Sat, Jan 20, 2018 at 05:37:52PM -0800, Joe Perches wrote: > > While Markus' commit messages are nearly universally terrible, > > is there really any signficant value in knowing when any > > particular OOM condit

Re: [PATCH] Intel-IOMMU: Delete an error message for a failed memory allocation in init_dmars()

2018-01-21 Thread Joe Perches
On Sat, 2018-01-20 at 20:40 +0100, Jörg Rödel wrote: > On Sat, Jan 20, 2018 at 03:55:37PM +0100, SF Markus Elfring wrote: > > Do you need any more background information for this general > > transformation pattern? > > No. > > > Do you find the Linux allocation failure report insufficient for

Re: [PATCH v10 1/9] perf/amd/iommu: Declare pr_fmt and remove unnecessary pr_debug

2017-02-16 Thread Joe Perches
On Wed, 2017-02-15 at 14:56 -0600, Suravee Suthikulpanit wrote: > Declare pr_fmt for perf/amd_iommu and remove unnecessary pr_debug. [] > diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c [] > @@ -11,6 +11,8 @@ > * published by the Free Software Foundation. > */ > >

Re: [PATCH v2 1/2] iommu/vt-d: Ratelimit fault handler

2016-03-19 Thread Joe Perches
On Thu, 2016-03-17 at 14:12 -0600, Alex Williamson wrote: > Fault rates can easily overwhelm the console and make the system > unresponsive.  Ratelimit to allow an opportunity for maintenance. [] > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c [] > @@ -1602,10 +1602,17 @@ irqreturn_t

Re: [PATCH v2 0/2] iommu/vt-d: Fault logging improvements

2016-03-19 Thread Joe Perches
On Thu, 2016-03-17 at 14:12 -0600, Alex Williamson wrote: > Ratelimit and improve formatting. Makes sense, thanks. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Joe Perches
On Tue, 2016-03-15 at 10:35 -0600, Alex Williamson wrote: > Fault rates can easily overwhelm the console and make the system > unresponsive.  Ratelimit to allow an opportunity for maintenance. A few suggestions: o Use a single ratelimit state. o The multiple lines output are unnecessary and hard

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Joe Perches
On Tue, 2016-03-15 at 10:10 -0700, Joe Perches wrote: > o Use a single ratelimit state. [] > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c [] > + if (__ratelimit()) > + return 0; That of course should be: if (!__ratelimit())

Re: [PATCH] iommu: Update my email address

2015-02-05 Thread Joe Perches
On Wed, 2015-02-04 at 16:17 +0100, Joerg Roedel wrote: The AMD address is dead for a long time already, replace it with a working one. Maybe add a .mailmap entry too. ___ iommu mailing list iommu@lists.linux-foundation.org

Re: [PATCH 06/28] iommu/amd: Move informational prinks out of iommu_enable

2012-07-05 Thread Joe Perches
On Thu, 2012-07-05 at 14:36 +0200, Joerg Roedel wrote: This function will be called before the PCI subsystem is initialized. Therefore dev_name doen't work and IOMMU information can't be printed to the klog as before. Move the code to print that information to a later point where PCI

Re: [PATCH 1/2] iommu: dmar: replace printks with appropriate pr_*()

2012-06-04 Thread Joe Perches
On Mon, 2012-06-04 at 17:29 -0400, Donald Dutile wrote: Replace printk(KERN_* with pr_*() functions. Please add #define pr_fmt(fmt) KBUILD_MODNAME : fmt before any include and remove the embedded PREFIX from each printk diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c []