This warning has been printed in of_numa_parse_cpu_nodes before.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index c1bd62c..625b057 100644
--- a
To make each percpu area allocated from its local numa node. Without this
patch, all percpu areas will be allocated from the node which cpu0 belongs
to.
Signed-off-by: Zhen Lei
---
arch/arm64/Kconfig | 8
arch/arm64/mm/numa.c | 52
1. Remove the old binding code.
2. Read the nid of cpu0 from dts.
3. Fallback the nid of cpu0 to 0 when numa=off is set in bootargs.
Signed-off-by: Zhen Lei
---
arch/arm64/kernel/smp.c | 1 +
arch/arm64/mm/numa.c| 16 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff
ction __node_distance quicker than before.
Signed-off-by: Zhen Lei
---
arch/arm64/include/asm/numa.h | 1 -
arch/arm64/mm/numa.c | 74 +++
2 files changed, 5 insertions(+), 70 deletions(-)
diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/includ
At present, the distances must equal in both direction for each node
pairs. For example: the distance of node B->A must the same to A->B.
But we really don't have to do this.
Signed-off-by: Zhen Lei
---
Documentation/devicetree/bindings/numa.txt | 12
1 file changed, 8
From: Kefeng Wang
Use of_get_next_parent() instead of open-code.
Signed-off-by: Kefeng Wang
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 625b057..0d7459b 100644
--- a/d
When the deleted code is executed, only the bit of cpu0 was set on
cpu_possible_mask. So that, only set_cpu_numa_node(0, NUMA_NO_NODE); will
be executed. And map_cpu_to_node(0, 0) will soon be called. So these code
can be safely removed.
Signed-off-by: Zhen Lei
---
arch/arm64/mm/numa.c | 4
n specified, assign it to the other direction.
3. If none of the two direction specified, both are assigned to
REMOTE_DISTANCE.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a
numa_init may return error because of numa configuration error. So "No
NUMA configuration found" is inaccurate. In fact, specific configuration
error information should be immediately printed by the testing branch.
Signed-off-by: Zhen Lei
---
arch/arm64/kernel/acpi_numa.c | 4 +++-
If the numa-id which was configured in memory@ devicetree node is greater
than MAX_NUMNODES, we should report a warning. We have done this for cpus
and distance-map dt nodes, this patch help them to be consistent.
Signed-off-by: Zhen Lei
---
drivers/of/of_numa.c | 5 +
1 file changed, 5
From: Kefeng Wang
Use pr_fmt to prefix kernel output.
Signed-off-by: Kefeng Wang
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 0d7459b..f63d4b0d 10064
If HAVE_MEMORYLESS_NODES is selected, and some memoryless numa nodes are
actually exist. The percpu variable areas and numa control blocks of that
memoryless numa nodes must be allocated from the nearest available node
to improve performance.
Signed-off-by: Zhen Lei
---
include/linux/memblock.h
-by: Zhen Lei
---
arch/arm64/Kconfig | 4
arch/arm64/mm/numa.c | 11 ++-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2815af6..3a2b6ed 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -611,6 +611,10
So
that it looks more clear.
3. Rewrote patch 5 because some scenes were not considered before.
Kefeng Wang (3):
of_numa: Use of_get_next_parent to simplify code
of_numa: Use pr_fmt()
arm64: numa: Use pr_fmt()
Zhen Lei (13):
of/numa: remove a duplicated pr_debug information
of/numa: fix
From: Kefeng Wang
Use pr_fmt to prefix kernel output, and remove duplicated msg
of NUMA turned off.
Signed-off-by: Kefeng Wang
---
arch/arm64/mm/numa.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/
For a normal memory@ devicetree node, its reg property can contains more
memory blocks.
Because we don't known how many memory blocks maybe contained, so we try
from index=0, increase 1 until error returned(the end).
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c
This information will be printed in the subfunction numa_add_memblk.
They are not the same, but very similar.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index ed5a097
Update documentation. This limit is unneccessary.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
Documentation/devicetree/bindings/numa.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/numa.txt
b/Documentation/devicetree/bindings/numa.txt
index
This information will be printed in the subfunction numa_add_memblk.
They are not the same, but very similar.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index ed5a097
From: Kefeng Wang
Use pr_fmt to prefix kernel output.
Signed-off-by: Kefeng Wang
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index ed7bd22..019738f 100644
--
numa_init(of_numa_init) may returned error because of numa configuration
error. So "No NUMA configuration found" is inaccurate. In fact, specific
configuration error information should be immediately printed by the
testing branch.
Signed-off-by: Zhen Lei
---
arch/arm64/mm/numa.c | 6
This warning has been printed in of_numa_parse_cpu_nodes before.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 7b3fbdc..3157130 100644
--- a
To make each percpu area allocated from its local numa node. Without this
patch, all percpu areas will be allocated from the node which cpu0 belongs
to.
Signed-off-by: Zhen Lei
---
arch/arm64/Kconfig | 8
arch/arm64/mm/numa.c | 56
Use the same tactic to cpu and numa-distance nodes.
Signed-off-by: Zhen Lei
---
arch/arm64/mm/numa.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index c7fe3ec..2601660 100644
--- a/arch/arm64/mm/numa.c
+++ b/arch/arm64/mm/numa.c
@@ -141,6
s://lkml.org/lkml/2016/5/24/679
2. Rewrote of_numa_parse_memory_nodes according to Rob Herring's advice. So
that it looks more clear.
3. Rewrote patch 5 because some scenes were not considered before.
Kefeng Wang (3):
of_numa: Use of_get_next_parent to simplify code
of_numa: Use pr_fmt()
ction __node_distance quicker than before.
Signed-off-by: Zhen Lei
---
arch/arm64/include/asm/numa.h | 1 -
arch/arm64/mm/numa.c | 74 +++
2 files changed, 5 insertions(+), 70 deletions(-)
diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/includ
n specified, assign it to the other direction.
3. If none of the two direction specified, both are assigned to
REMOTE_DISTANCE.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a
From: Kefeng Wang
Use pr_fmt to prefix kernel output, and remove duplicated msg
of NUMA turned off.
Signed-off-by: Kefeng Wang
---
arch/arm64/mm/numa.c | 42 +-
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/arch/arm64/mm/numa.c b/arch/a
From: Kefeng Wang
Use of_get_next_parent() instead of open-code.
Signed-off-by: Kefeng Wang
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 3157130..ed7bd22 100644
--- a/d
1. Currently only cpu0 set on cpu_possible_mask and percpu areas have not
been initialized.
2. No reason to limit cpu0 must belongs to node0.
Signed-off-by: Zhen Lei
---
arch/arm64/mm/numa.c | 8
1 file changed, 8 deletions(-)
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm
For a normal memory@ devicetree node, its reg property can contains more
memory blocks.
Because we don't known how many memory blocks maybe contained, so we try
from index=0, increase 1 until error returned(the end).
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c
-by: Zhen Lei
---
arch/arm64/Kconfig | 4
arch/arm64/kernel/smp.c | 1 +
arch/arm64/mm/numa.c| 43 +--
3 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 05c1bf1..5904a62 100644
--- a
To make each percpu area allocated from its local numa node. Without this
patch, all percpu areas will be allocated from the node which cpu0 belongs
to.
Signed-off-by: Zhen Lei
---
arch/arm64/Kconfig | 8
arch/arm64/mm/numa.c | 55
1. Currently only cpu0 set on cpu_possible_mask and percpu areas have not
been initialized.
2. No reason to limit cpu0 must belongs to node0.
Signed-off-by: Zhen Lei
---
arch/arm64/mm/numa.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/mm
numa_init(of_numa_init) may returned error because of numa configuration
error. So "No NUMA configuration found" is inaccurate. In fact, specific
configuration error information should be immediately printed by the
testing branch.
Signed-off-by: Zhen Lei
---
arch/arm64/mm/numa.c | 6
ction __node_distance quicker than before.
Signed-off-by: Zhen Lei
---
arch/arm64/include/asm/numa.h | 1 -
arch/arm64/mm/numa.c | 74 +++
2 files changed, 5 insertions(+), 70 deletions(-)
diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/includ
From: Kefeng Wang
Use of_get_next_parent() instead of open-code.
Signed-off-by: Kefeng Wang
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 8723f64..ed103e6 100644
--- a/d
From: Kefeng Wang
Use pr_fmt to prefix kernel output.
Signed-off-by: Kefeng Wang
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index ed103e6..1234b4a 100644
From: Kefeng Wang
Use pr_fmt to prefix kernel output, and remove duplicated msg
of NUMA turned off.
Signed-off-by: Kefeng Wang
---
arch/arm64/mm/numa.c | 40
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/arch/arm64/mm/numa.c b/arch/arm
n specified, assign it to the other direction.
3. If none of the two direction specified, both are assigned to
REMOTE_DISTANCE.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a
Update documentation. This limit is unneccessary.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
Documentation/devicetree/bindings/numa.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/numa.txt
b/Documentation/devicetree/bindings/numa.txt
index
This information will be printed in the subfunction numa_add_memblk.
They are not the same, but very similar.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index ed5a097
Use the same tactic to cpu and numa-distance nodes.
Signed-off-by: Zhen Lei
---
drivers/of/of_numa.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index 7b3fbdc..afaeb9c 100644
--- a/drivers/of/of_numa.c
+++ b/drivers/of/of_numa.c
@@ -75,6
This warning has been printed in of_numa_parse_cpu_nodes before.
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
index afaeb9c..8723f64 100644
--- a
-by: Zhen Lei
---
arch/arm64/Kconfig | 4
arch/arm64/kernel/smp.c | 1 +
arch/arm64/mm/numa.c| 43 +--
3 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2815af6..3a2b6ed 100644
--- a
For a normal memory@ devicetree node, its reg property can contains more
memory blocks.
Because we don't known how many memory blocks maybe contained, so we try
from index=0, increase 1 until error returned(the end).
Signed-off-by: Zhen Lei
Acked-by: Rob Herring
---
drivers/of/of_numa.c
plify code
of_numa: Use pr_fmt()
arm64: numa: Use pr_fmt()
Zhen Lei (11):
of/numa: remove a duplicated pr_debug information
of/numa: fix a memory@ node can only contains one memory block
arm64/numa: add nid check for memory block
of/numa: remove a duplicated warning
arm64/numa: avoid
This function is protected by spinlock, and the latter will do memory
barrier implicitly. So that we can safely use writel_relaxed. In fact, the
dmb operation will lengthen the time protected by lock, which indirectly
increase the locking confliction in the stress scene.
Signed-off-by: Zhen Lei
documentation and numactl manual have not described it clear.
I sent a mail to ask for help, and Michal Hocko replied
that he preferred to print online cpus because it doesn't really make much
sense to bind anything on offline nodes.
Signed-off-by: Zhen Lei
---
drivers/base/node.c | 6
For a memoryless node, the output of get_pfn_range_for_nid are all zero.
It will display mem from 0 to -1.
Signed-off-by: Zhen Lei
---
mm/page_alloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b5240b..5839f31 100644
--- a/mm
This patch eliminate the strong dependence on Laurent's series(to support
probe deferral). That means, no matter whether Laurent's series upstreamed
or not, the smmu-v3 driver will always work well.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 20 ++
Remove the word "pci", to make this function can also be used by
non-pci devices.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 3a54af
Only support #iommu-cells = <1>.
Signed-off-by: Zhen Lei
---
Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
t probe deferral.
patch 7/9 according to Robin Murphy's suggestion, remove global variable
arm_smmu_devices, thanks.
patch 9/9 add support for a master with multiple stream IDs.
Zhen Lei (5):
iommu/arm-smmu: to support probe deferral
iommu/arm-smmu: rename __arm_smmu_get_pci_sid
iommu/
This patch support a master with multiple stream IDs, but doesn't support a
master behinds more than one SMMUs.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 40 ++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/drivers/iomm
*/
if (!root->archdata.iommu)
return -ENODEV;
__arm_smmu_add_pci_device(pdev, root->archdata.iommu);
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 110 +---
1 file changed, 83 insertions(+), 27 deletions(-)
diff --g
virtual address 0f97b000
..
Call trace:
[] __asan_storeN+0x174/0x1a8
[] memset+0x24/0x48
[] layout_and_allocate+0xcd8/0x1800
[] load_module+0x190/0x23e8
[] SyS_finit_module+0x148/0x180
Signed-off-by: Zhen Lei
---
mm/kasan/kasan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff
.flush_iotlb_all can not just wait for previous tlbi operations to be
completed, but should also invalid all TLBs of the related domain.
Signed-off-by: Zhen Lei
Reviewed-by: Robin Murphy
---
drivers/iommu/arm-smmu-v3.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
Depending on the argument 'add', uprobe_apply() may be registering or
unregistering a probe. The current comment misses the description of the
registration.
Signed-off-by: Zhen Lei
---
kernel/events/uprobes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ker
Zhen Lei (3):
list: add hlist_cut_number()
list: test: Add a test for hlist_cut_number()
debugobjects: Use hlist_cut_number() to optimize performance and
improve readability
include/linux/list.h | 44 +
lib/debugobjects.c | 115
longer split and then spliced into the new list one by one, this
also enhances readability.
Signed-off-by: Zhen Lei
---
include/linux/list.h | 44
1 file changed, 44 insertions(+)
diff --git a/include/linux/list.h b/include/linux/list.h
index
Test cases cover all possible situations:
1. The cut number is invalid: zero or negative
2. Partially cut.
3. Cut all.
4. The cut number is greater than the number of nodes in the old list.
5. The old list is empty.
Signed-off-by: Zhen Lei
---
lib/list-test.c | 51
hlist_cut_number() in __free_object(), the result is
obviously positive, the check of the return value is omitted.
Signed-off-by: Zhen Lei
---
lib/debugobjects.c | 115 +++--
1 file changed, 48 insertions(+), 67 deletions(-)
diff --git a/lib/debugobjects.c b/lib
Hulk Robot
Signed-off-by: Zhen Lei
---
drivers/ide/piix.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c
index a671cead6ae72b7..b512d2dc9108cf6 100644
--- a/drivers/ide/piix.c
+++ b/drivers/ide/piix.c
@@ -143,13 +143,11 @@ static void piix_set_dma_mode(
Fixes the following W=1 kernel build warning:
drivers/char/agp/via-agp.c: In function ‘via_configure_agp3’:
drivers/char/agp/via-agp.c:131:28: warning: variable ‘current_size’ set but not
used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: Zhen Lei
---
drivers/char/agp
Ensure that all "goto out" error branches return correct error codes.
Currently, always returns 0.
Reported-by: Hulk Robot
Signed-off-by: Zhen Lei
---
drivers/message/fusion/mptctl.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drive
Fixes the following W=1 kernel build warning:
drivers/message/fusion/mptctl.c: In function ‘mptctl_gettargetinfo
drivers/message/fusion/mptctl.c:1372:7: warning: variable ‘port’ set but not
used [-Wunused-but-set-variable]
Reported-by: Hulk Robot
Signed-off-by: Zhen Lei
---
drivers/message
:8: warning: variable ‘retval’ set but not
used [-Wunused-but-set-variable]
2337 | int retval;
|^~
Zhen Lei (3):
scsi: mptfusion: Remove unused local variable 'time_count'
scsi: mptfusion: Remove unused local variable 'port'
scsi: mptfusion: Fix
error handling.")
Reported-by: Hulk Robot
Signed-off-by: Zhen Lei
---
drivers/message/fusion/mptctl.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 24aebad60366..0a9321239e76 100644
--- a/drivers/message/fusio
Hulk Robot
Signed-off-by: Zhen Lei
---
lib/decompress_unlzo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index 1f439a622076c10..64c1358500ce4e9 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -43,7 +43,6
Acutally, "Interrupt Collections" and "Physical Processors" is the
same thing.
Signed-off-by: Zhen Lei
---
drivers/irqchip/irq-gic-v3-its.c | 2 +-
include/linux/irqchip/arm-gic-v3.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchi
irst time, the value of local variable "psz"
will drop to 4K, but we have not reinitialize it again in the loop.
So, further process 16K read-only "Page Size" will report error.
In this patch, detect all the read-only fields first. So that, no need
to try over and over again
1. We don't known how many memory needed by type reserved. It's good to
take no care about it.
2. Remove unused macro definition and name of type reserved.
Signed-off-by: Zhen Lei
---
drivers/irqchip/irq-gic-v3-its.c | 19 +++
include/linux/irqchip/arm-gic-v3.h |
In the latest specification(version 24.0), clause 5.12.13 GITS_BASERn.
The meaning of value=0x3 in "Type" field was revised to reserved. As
below:
0x3. Reserved.
In the early versions(like 19.0), it defined as below:
0x3. Physical Processors.
Signed-off-by: Zhen Lei
---
drivers/irqch
Test hardware irq number from small to large, and add a blank above
each comment. To make it more clear.
Signed-off-by: Zhen Lei
---
drivers/irqchip/irq-gic-v3.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip
No functional changes.
Signed-off-by: Zhen Lei
---
drivers/iommu/dma-iommu.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index ddcbbdb..4e885f7 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu
1:17: warning: array subscript is below array bounds
[-Warray-bounds]
hist->fc_chunks[index]++;
^
fs/ocfs2/ioctl.c:411:17: warning: array subscript is below array bounds
[-Warray-bounds]
Signed-off-by: Zhen Lei
---
fs/ocfs2/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 d
sources
when the SMMUv3 driver has reserved the conflict resources before. Instead, the
PMCG
driver only performs devm_ioremap() to ensure that it can work properly.
Zhen Lei (2):
perf/smmuv3: Don't reserve the PMCG register spaces
iommu/arm-smmu-v3: Reserving the entire SMMU register space
dr
register space. When both the SMMU and PMCG drivers reserve
their own resources, a resource conflict occurs.
To avoid this conflict, don't reserve the PMCG regions.
Suggested-by: Robin Murphy
Signed-off-by: Zhen Lei
---
drivers/perf/arm_smmuv3_pmu.c | 25 +++--
1 file ch
ng on
SMMU_IDR6.CMDQ_CONTROL_PAGE_LOG2NUMQ. Processing its resource reservation
to avoid resource conflict with PMCG is a bit more complicated.
Therefore, the resources of the PMCG are not reserved, and the entire SMMU
resources are reserved.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu-v3/arm
igned long by adding a middle-tier function.
For example:
-static void l2c220_inv_range(unsigned long start, unsigned long end)
+static void __l2c220_inv_range(unsigned long start, unsigned long end)
{
...
}
+static void l2c220_inv_range(phys_addr_t start, phys_addr_t end)
+{
+ __l2c220_inv_range(
Note that the outercache functions have been doing this cast before this
patch. So now, the cast is just moved into the outercache hook functions.
No functional change.
Signed-off-by: Zhen Lei
Reviewed-by: Arnd Bergmann
---
arch/arm/include/asm/outercache.h | 6 ++--
arch/arm/mm/cache-feroceo
range, the upper 30 bits of
the physical address are recorded in registers L3_MAINT_START and
L3_MAINT_END, and ignore the lower 6 bits cacheline offset.
Signed-off-by: Zhen Lei
---
arch/arm/mm/Kconfig| 10 ++
arch/arm/mm/Makefile | 1 +
arch/arm/mm/cache-kunpeng-l3.c
Enable support for the Hisilicon Kunpeng506 and Kunpeng509 SoC.
Signed-off-by: Zhen Lei
---
arch/arm/mach-hisi/Kconfig | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 2e980f834a6aa1b..a004eac24b243af 100644
--- a/arch/arm
Add devicetree binding for Hisilicon Kunpeng L3 cache controller.
Signed-off-by: Zhen Lei
Reviewed-by: Arnd Bergmann
---
.../arm/hisilicon/kunpeng-l3cache.yaml| 40 +++
1 file changed, 40 insertions(+)
create mode 100644
Documentation/devicetree/bindings/arm/hisilicon
register space. When both the SMMU and PMCG drivers reserve
their own resources, a resource conflict occurs.
To avoid this conflict, don't reserve the PMCG regions.
Suggested-by: Robin Murphy
Signed-off-by: Zhen Lei
Reviewed-by: Robin Murphy
---
drivers/perf/arm_smmuv3_pmu.c
s: If the PMCG register resources are located in
the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict
resources
when the SMMUv3 driver has reserved the conflict resources before. Instead, the
PMCG
driver only performs devm_ioremap() to ensure that it can work properly.
Zhen Lei
Note that the outercache functions have been doing this cast before this
patch. So now, the cast is just moved into the outercache hook functions.
No functional change.
Signed-off-by: Zhen Lei
Reviewed-by: Arnd Bergmann
---
arch/arm/include/asm/outercache.h | 6 ++--
arch/arm/mm/cache-feroceo
d)
+static void __l2c220_inv_range(unsigned long start, unsigned long end)
{
...
}
+static void l2c220_inv_range(phys_addr_t start, phys_addr_t end)
+{
+ __l2c220_inv_range(start, end);
+}
Zhen Lei (4):
ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache
hooks
ARM: hisi: add
Enable support for the Hisilicon Kunpeng506 and Kunpeng509 SoC.
Signed-off-by: Zhen Lei
Reviewed-by: Arnd Bergmann
---
arch/arm/mach-hisi/Kconfig | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 2e980f834a6aa1b
range, the upper 30 bits of
the physical address are recorded in registers L3_MAINT_START and
L3_MAINT_END, and ignore the lower 6 bits cacheline offset.
Signed-off-by: Zhen Lei
Reviewed-by: Arnd Bergmann
---
arch/arm/mm/Kconfig| 10 ++
arch/arm/mm/Makefile | 1 +
arch
Add devicetree binding for Hisilicon Kunpeng L3 cache controller.
Signed-off-by: Zhen Lei
Reviewed-by: Arnd Bergmann
---
.../arm/hisilicon/kunpeng-l3cache.yaml| 40 +++
1 file changed, 40 insertions(+)
create mode 100644
Documentation/devicetree/bindings/arm/hisilicon
comes the same to 1).
So the above code snippet can be reduced to one statement:
nd_region->flush = ndr_desc->flush;
No functional change.
Signed-off-by: Zhen Lei
---
drivers/nvdimm/region_devs.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvd
zeof(void *);
}
Obviously, the above code snippet can be reduced to one statement:
flush_data_size += (nvdimm->num_flush + 1) * sizeof(void *);
No functional change.
Signed-off-by: Zhen Lei
---
drivers/nvdimm/region_devs.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dr
Move EXPORT_SYMBOL_GPL(nvdimm_flush) close to nvdimm_flush(), currently
it's near to generic_nvdimm_flush().
Signed-off-by: Zhen Lei
---
drivers/nvdimm/region_devs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_d
The type of "nfree" is u32, so "nfree - 1" can only be overflowed when
"nfree" is zero. Replace "if (nfree - 1 > nfree)" with "if (nfree == 0)"
seems more clear. And remove the assignment "nfree = 0", no need for it.
Signed-off-
;bus_desc.provider_name, because strdup()
maybe failed. Patch 3 is a trivial source code optimization.
Zhen Lei (7):
libnvdimm: fix memory leaks in of_pmem.c
libnvdimm: add sanity check for provider_name in
of_pmem_region_probe()
libnvdimm: simplify walk_to_nvdimm_bus()
libnvdimm: redu
Currently, in the last error path of of_pmem_region_probe() and in
of_pmem_region_remove(), free the memory allocated by kstrdup() is
missing. Add kfree(priv->bus_desc.provider_name) to fix it.
Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus
provider")
Signed
kstrdup() may return NULL because of no memory, check it.
Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus
provider")
Signed-off-by: Zhen Lei
---
drivers/nvdimm/of_pmem.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/nvdimm/of_pmem.c b/driv
Return as soon as nvdimm_bus device has been found, make us no need to
check "dev" or "!dev" in subsequent code.
No functional change.
Signed-off-by: Zhen Lei
---
drivers/nvdimm/bus.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/nv
1 - 100 of 674 matches
Mail list logo