Re: [PATCH] scripts/faddr2line: Fix regression in name resolution on ppc64le

2022-09-27 Thread Thadeu Lima de Souza Cascardo
;libbpf: Fix readelf output parsing for Fedora") > > Fixes: 1d1a0e7c5100 ("scripts/faddr2line: Fix overlapping text section > failures") > Reference: https://lore.kernel.org/bpf/20191211160133.GB4580@calabresa/ > Cc: "Naveen N. Rao" > Cc: Jiri Olsa &

[PATCH] selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

2021-12-07 Thread Thadeu Lima de Souza Cascardo
on, simply skip whenever the detected miss_percent is the expected one for a fully mitigated system, that is, above 95%. Signed-off-by: Thadeu Lima de Souza Cascardo --- tools/testing/selftests/powerpc/security/spectre_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/too

coherency issue observed after hotplug on POWER8

2021-09-21 Thread Thadeu Lima de Souza Cascardo
different offset. Is this a case of a bug in the micro-architecture or the firmware when doing the hotplug? Can someone chime in? Notice that we can't reproduce the same issue on a POWER9 system. Thanks. Cascardo. [1] https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1927076 [2]

[PATCH] powerpc/perf: prevent mixed EBB and non-EBB events

2021-02-24 Thread Thadeu Lima de Souza Cascardo
B and non-EBB events from being add to the same PMU will just revert to the previous behavior and the test will succeed. Fixes: 1908dc911792 (perf: Tweak perf_event_attr::exclusive semantics) Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/perf/core-book3s.c | 20

Re: [PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-09-17 Thread Thadeu Lima de Souza Cascardo
On Thu, Sep 17, 2020 at 03:37:16PM -0700, Kees Cook wrote: > On Sun, Sep 13, 2020 at 10:34:23PM +1000, Michael Ellerman wrote: > > Thadeu Lima de Souza Cascardo writes: > > > On Tue, Sep 08, 2020 at 04:18:17PM -0700, Kees Cook wrote: > > >> On Tue, Jun 30, 2020 at 01

[PATCH v2] selftests/seccomp: fix ptrace tests on powerpc

2020-09-11 Thread Thadeu Lima de Souza Cascardo
Souza Cascardo --- tools/testing/selftests/seccomp/seccomp_bpf.c | 81 --- 1 file changed, 53 insertions(+), 28 deletions(-) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index 7a6d40286a42..0ddc0846e9c0 100644 --- a

Re: [PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-09-11 Thread Thadeu Lima de Souza Cascardo
On Tue, Sep 08, 2020 at 04:18:17PM -0700, Kees Cook wrote: > On Tue, Jun 30, 2020 at 01:47:39PM -0300, Thadeu Lima de Souza Cascardo wrote: > > As pointed out by Michael Ellerman, the ptrace ABI on powerpc does not > > allow or require the return code to be set on syscall entry wh

Re: [PATCH] KVM: PPC: Don't return -ENOTSUPP to userspace in ioctls

2020-09-11 Thread Thadeu Lima de Souza Cascardo
GET_DIRTY_LOG. > > [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html > > Signed-off-by: Greg Kurz Agreed. ENOTSUPP should never be returned to userspace. Acked-by: Thadeu Lima de Souza Cascardo > --- > arch/powerpc/kvm/book3s.c |4 ++-- &g

Please apply commit 0828137e8f16 ("powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()") to v4.14.y, v4.19.y, v5.4.y, v5.7.y

2020-08-25 Thread Thadeu Lima de Souza Cascardo
se the facility unavailable interrupt won't trigger. Applying 0828137e8f16721842468e33df0460044a0c588b ("powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()") will fix it. Cascardo.

Re: [PATCH v2] powerpc/vio: drop bus_type from parent device

2020-07-30 Thread Thadeu Lima de Souza Cascardo
On Thu, Jul 30, 2020 at 07:37:16AM +0200, Greg KH wrote: > On Thu, Jul 30, 2020 at 11:28:38AM +1000, Michael Ellerman wrote: > > [ Added Peter & Greg to Cc ] > > > > Thadeu Lima de Souza Cascardo writes: > > > Commit df44b479654f62b478c18ee4d8bc4e9f897a9844 (&q

[PATCH] selftests/powerpc: return skip code for spectre_v2

2020-07-28 Thread Thadeu Lima de Souza Cascardo
ts as Vulnerable. Signed-off-by: Thadeu Lima de Souza Cascardo --- tools/testing/selftests/powerpc/security/spectre_v2.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/powerpc/security/spectre_v2.c b/tools/testing/selftests/powerpc/security/spectre_v2.c index 8c6b982

[PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-06-30 Thread Thadeu Lima de Souza Cascardo
Souza Cascardo --- tools/testing/selftests/seccomp/seccomp_bpf.c | 24 +++ 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index 252140a52553..b90a9190ba88 100644 --- a

[PATCH v2] powerpc/vio: drop bus_type from parent device

2020-04-06 Thread Thadeu Lima de Souza Cascardo
io devices don't change after this fix, they still contain MODALIAS. Signed-off-by: Thadeu Lima de Souza Cascardo Fixes: df44b479654f ("kobject: return error code if writing /sys/.../uevent fails") --- arch/powerpc/platforms/pseries/vio.c | 1 - 1 file changed, 1 deletion(-)

[PATCH v2] powerpc/ptrace: Do not return ENOSYS if invalid syscall

2020-03-29 Thread Thadeu Lima de Souza Cascardo
tests complete just fine, as the failing test was using ptrace to change the syscall to return an error or a fake value, but were failing as it was always returning -ENOSYS. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH] libbpf: Fix readelf output parsing for Fedora

2019-12-13 Thread Thadeu Lima de Souza Cascardo
field, as it always comes inside brackets. Cc: Aurelien Jarno Fixes: 3464afdf11f9 (libbpf: Fix readelf output parsing on powerpc with recent binutils) Reported-by: Justin Forbes Signed-off-by: Thadeu Lima de Souza Cascardo --- tools/lib/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+) di

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-11 Thread Thadeu Lima de Souza Cascardo
On Wed, Dec 11, 2019 at 09:33:53AM -0600, Justin Forbes wrote: > On Tue, Dec 10, 2019 at 4:26 PM Thadeu Lima de Souza Cascardo > wrote: > > > > On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: > > > On Mon, Dec 2, 2019 at 3:37 AM Daniel Borkmann > >

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-10 Thread Thadeu Lima de Souza Cascardo
ails, with x86/arm/aarch64/s390 all > building fine. Reverting this patch allows successful build across > all arches. > > Justin Well, I ended up debugging this same issue and had the same fix as Jarno's when I noticed his fix was already applied. I just installed a system with the latest binutils, 2.33.1, and it still breaks without such fix. Can you tell what is the output of the following command on your system? readelf -s --wide tools/lib/bpf/sharedobjs/libbpf-in.o | cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $0}' Cascardo.

[PATCH] powerpc/vio: drop bus_type from parent device

2019-09-27 Thread Thadeu Lima de Souza Cascardo
io devices don't change after this fix, they still contain MODALIAS. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/platforms/pseries/vio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c ind

Re: [PATCH] powerpc/ptrace: Do not return ENOSYS if invalid syscall

2019-09-26 Thread Thadeu Lima de Souza Cascardo
On Tue, Sep 10, 2019 at 10:01:22PM -0300, Thadeu Lima de Souza Cascardo wrote: > If a tracer sets the syscall number to an invalid one, allow the return > value set by the tracer to be returned the tracee. > > The test for NR_syscalls is already at entry_64.S, and it's at > do

[PATCH] powerpc/ptrace: Do not return ENOSYS if invalid syscall

2019-09-10 Thread Thadeu Lima de Souza Cascardo
e, as the failing test was using ptrace to change the syscall to return an error or a fake value, but were failing as it was always returning -ENOSYS. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [PATCH v3] ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit.

2017-11-29 Thread Thadeu Lima de Souza Cascardo
Ping. Any further reviews/comments? Or any chance of this getting applied soon? Thanks. Cascardo.

Re: [PATCH v3] ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit.

2017-11-17 Thread Thadeu Lima de Souza Cascardo
On Thu, Nov 16, 2017 at 07:26:43PM -0200, Guilherme G. Piccoli wrote: > On 11/06/2017 03:34 PM, Thadeu Lima de Souza Cascardo wrote: > > From: Mahesh Salgaonkar > > > > The kernel boot parameter 'nr_cpus=' allows one to specify number of > > possible cpus

[PATCH v3] ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit.

2017-11-06 Thread Thadeu Lima de Souza Cascardo
cpu_maps() to accommodate boot cpu for the case where boot_cpuid > nr_cpu_ids. This change would help to reduce the memory reservation requirement for kdump on ppc64. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Thadeu Lima de Souza Cascardo --- v3: fixup signedness or nr_cpus to match nr_cpu_

[PATCH v2] powerpc: make /proc/self/stack always print the current stack

2017-03-27 Thread Thadeu Lima de Souza Cascardo
, while it's not, which some may consider as a bug. This is also consistent with some other architectures, like x86 and arm, at least. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/stacktrace.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --

[PATCH] powerpc: fix /proc/self/stack

2017-03-17 Thread Thadeu Lima de Souza Cascardo
For the current task, the kernel stack would only tell the last time the process was rescheduled, if ever. Use the current stack pointer for the current task. This is also consistent with some other architectures. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel

Re: [PATCHv2 1/7] ppc bpf/jit: Disable classic BPF JIT on ppc64le

2016-06-22 Thread Thadeu Lima de Souza Cascardo
u Lima de Souza Cascardo > > Cc: sta...@vger.kernel.org > Cc: Matt Evans > Cc: Denis Kirjanov > Cc: Michael Ellerman > Cc: Paul Mackerras > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth N Mavinakayanahalli &

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-21 Thread Thadeu Lima de Souza Cascardo
On Tue, Jun 21, 2016 at 09:15:48PM +1000, Michael Ellerman wrote: > On Tue, 2016-06-21 at 14:28 +0530, Naveen N. Rao wrote: > > On 2016/06/20 03:56PM, Thadeu Lima de Souza Cascardo wrote: > > > On Sun, Jun 19, 2016 at 11:19:14PM +0530, Naveen N. Rao wrote: > > > >

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-20 Thread Thadeu Lima de Souza Cascardo
On Sun, Jun 19, 2016 at 11:19:14PM +0530, Naveen N. Rao wrote: > On 2016/06/17 10:00AM, Thadeu Lima de Souza Cascardo wrote: > > On Fri, Jun 17, 2016 at 10:53:21PM +1000, Michael Ellerman wrote: > > > On Tue, 2016-07-06 at 13:32:23 UTC, "Naveen N. Rao" wrote: > >

[PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-17 Thread Thadeu Lima de Souza Cascardo
w before I noticed Naveen's patchset and the latest changes in ppc tree for a better way to check for ABI versions. However, since the issue described below affect mainline and stable kernels, would you consider applying it before merging your two patchsets, so that we can more easily backport t

Re: Generic IOMMU pooled allocator

2015-03-25 Thread cascardo
res do no work at all when dma_map/unmap is called. Hope that helps consider the best strategy for the DMA space allocation as of now. Regards. Cascardo. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v3 1/2] PCI: One more parameter to pci_set_pcie_reset_state()

2015-03-23 Thread cascardo
ly why we have pci_reset_slot() and pci_reset_bus(), so > that the caller can manage the scope of the reset. You cannot change > the semantics of pci_reset_function() simply because it's convenient for > your implementation. This series is wrong and should not be applied. > Thanks, &g

Re: [PATCH 0/4] Support registering specific reset handler

2015-02-19 Thread cascardo
is that we should consider doing this on all platforms and for all adapters, because this is not specific to Power and this is not specific to this particular set of adapters. Otherwise, one can simply program one adapter in the guest to write to host memory, shutdown, and since no reset wil

Re: [PATCH 0/4] Support registering specific reset handler

2015-02-16 Thread cascardo
reset, where we would reset all the devices on the same group, and use that on vfio. Grouping the devices would then be made platform-dependent, as well as the reset method. On powernv, we would group by IOMMU group and issue a fundamental reset. Cascardo. > Gavin Shan (4): > PCI: Re

Re: [PATCH resend] powernv/iommu: disable IOMMU bypass with param iommu=nobypass

2015-01-22 Thread cascardo
On Thu, Jan 22, 2015 at 12:05:31PM +1100, Michael Ellerman wrote: > On Wed, 2015-01-21 at 13:23 -0200, Thadeu Lima de Souza Cascardo wrote: > > When IOMMU bypass is enabled, a PCI device can read and write memory > > that was not mapped by the driver without causing an EEH. That

[PATCH resend] powernv/iommu: disable IOMMU bypass with param iommu=nobypass

2015-01-21 Thread Thadeu Lima de Souza Cascardo
such issues. Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: Gavin Shan --- Documentation/kernel-parameters.txt |2 ++ arch/powerpc/platforms/powernv/pci-ioda.c | 24 +++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Documentation

[PATCH v2] powernv/iommu: disable IOMMU bypass with param iommu=nobypass

2014-10-23 Thread Thadeu Lima de Souza Cascardo
such issues. Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: Gavin Shan --- Documentation/kernel-parameters.txt |2 ++ arch/powerpc/platforms/powernv/pci-ioda.c | 24 +++- 2 files changed, 25 insertions(+), 1 deletions(-) diff --git a/Documentation

[PATCH] powernv/iommu: disable IOMMU bypass with param iommu=nobypass

2014-10-21 Thread Thadeu Lima de Souza Cascardo
such issues. Signed-off-by: Thadeu Lima de Souza Cascardo --- Documentation/kernel-parameters.txt |2 ++ arch/powerpc/platforms/powernv/pci-ioda.c | 24 +++- 2 files changed, 25 insertions(+), 1 deletions(-) diff --git a/Documentation/kernel-parameters.txt b

Re: [PATCH v2] deb-pkg: Add support for powerpc little endian

2014-09-05 Thread Thadeu Lima de Souza Cascardo
gt; > > Huh? ppc64le or ppc64el? > > ppc64el. Commit message is wrong. Fixed below. > > Mikey > > What about ppc64? Also, I sent that already a month ago. Both linuxppc-dev and Michal Marek were on cc. http://marc.info/?l=linux-kernel&m=140744360328562&w=

[PATCH] deb-pkg: support ppc64 and ppc64el Debian archs

2014-08-07 Thread Thadeu Lima de Souza Cascardo
Signed-off-by: Thadeu Lima de Souza Cascardo --- scripts/package/builddeb |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 35d5a58..c26c28b 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb

Re: [RFC PATCH] vfio-pci: avoid deadlock between unbind and VFIO_DEVICE_RESET

2014-03-03 Thread Thadeu Lima de Souza Cascardo
On Mon, Mar 03, 2014 at 08:09:22AM -0700, Alex Williamson wrote: > On Mon, 2014-03-03 at 11:33 -0300, Thadeu Lima de Souza Cascardo wrote: > > When we unbind vfio-pci from a device, while running a guest, we might > > have a deadlock when such a guest reboots. > > > >

[RFC PATCH] vfio-pci: avoid deadlock between unbind and VFIO_DEVICE_RESET

2014-03-03 Thread Thadeu Lima de Souza Cascardo
already taken, and avoid this situation. Signed-off-by: Thadeu Lima de Souza Cascardo --- Not tested yet, but I would like some comments now, like would it be better to have a pci_try_reset_function, or do trylock on pci_reset_function itself? --- drivers/vfio/pci/vfio_pci.c | 14 -- 1

Re: [PATCH v2] powerpc/eeh: drop taken reference to driver on eeh_rmv_device

2014-02-05 Thread Thadeu Lima de Souza Cascardo
On Wed, Feb 05, 2014 at 10:43:38AM -0800, Nishanth Aravamudan wrote: > On 05.02.2014 [16:20:45 -0200], Thadeu Lima de Souza Cascardo wrote: > > Commit f5c57710dd62dd06f176934a8b4b8accbf00f9f8 ("powerpc/eeh: Use > > partial hotplug for EEH unaware drivers") introduces eeh_

[PATCH v2] powerpc/eeh: drop taken reference to driver on eeh_rmv_device

2014-02-05 Thread Thadeu Lima de Souza Cascardo
atch drops the reference if it was taken. Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Gavin Shan --- arch/powerpc/kernel/eeh_driver.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c ind

Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu

2014-02-04 Thread Thadeu Lima de Souza Cascardo
ale, report it to Freescale. If you can run a mainline kernel (best now would be 3.14-rc1) and reproduce that, then best place would be linux-...@vger.kernel.org. Hope that helps. Cascardo. > > > saucy)root@(none):/work/svy/tools# * Stopping MD monitoring service mdadm > --monitor >

Re: [PATCH] powerpc/eeh: drop taken reference to driver on eeh_rmv_device

2014-01-31 Thread Thadeu Lima de Souza Cascardo
On Fri, Jan 31, 2014 at 08:46:11AM +0800, Gavin Shan wrote: > On Thu, Jan 30, 2014 at 11:00:48AM -0200, Thadeu Lima de Souza Cascardo wrote: > >Commit f5c57710dd62dd06f176934a8b4b8accbf00f9f8 ("powerpc/eeh: Use > >partial hotplug for EEH unaware drivers") introduces eeh

[PATCH] powerpc/eeh: drop taken reference to driver on eeh_rmv_device

2014-01-30 Thread Thadeu Lima de Souza Cascardo
atch drops the reference in either exit path if it was taken. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/eeh_driver.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c ind

[PATCH] powernv: fix VFIO support with PHB3

2013-12-09 Thread Thadeu Lima de Souza Cascardo
iommu_groups under /sys/kernel/iommu_groups/, and can also bind vfio-pci to an adapter, which gives me a device at /dev/vfio/. Signed-off-by: Thadeu Lima de Souza Cascardo --- This is now applied on top of benh's tree, branch next. Alexey, is this now OK for you? Thanks. Cascardo. ---

Re: [PATCH] powernv: fix VFIO support with PHB3

2013-12-07 Thread Thadeu Lima de Souza Cascardo
On Sat, Dec 07, 2013 at 11:58:44AM +1100, Alexey Kardashevskiy wrote: > On 12/06/2013 11:21 PM, Thadeu Lima de Souza Cascardo wrote: > > I have recently found out that no iommu_groups could be found under > > /sys/ on a P8. That prevents PCI passthrough from working. >

[PATCH] powernv: fix VFIO support with PHB3

2013-12-06 Thread Thadeu Lima de Souza Cascardo
iommu_groups under /sys/kernel/iommu_groups/, and can also bind vfio-pci to an adapter, which gives me a device at /dev/vfio/. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/platforms/powernv/pci-ioda.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch

Re: [PATCH] powerpc/iommu: use GFP_KERNEL instead of GFP_ATOMIC in iommu_init_table()

2013-10-02 Thread Thadeu Lima de Souza Cascardo
cate %ld bytes\n", sz); > tbl->it_map = page_address(page); I didn't respond to the previous message, but also checked if there were any history on the logs, and found this was as it is from the start. I also found no other reasons why it needs to be atomic. Ther

[PATCH] KVM: PPC: Book3S PR: return appropriate error when allocation fails

2013-07-17 Thread Thadeu Lima de Souza Cascardo
err was overwritten by a previous function call, and checked to be 0. If the following page allocation fails, 0 is going to be returned instead of -ENOMEM. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kvm/book3s_pr.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions

[PATCH] eeh: add eeh_dev to the cache during boot

2013-06-27 Thread Thadeu Lima de Souza Cascardo
build adds the addresses to the cache, but eeh_dev for the giving pci_device is not set yet. Just reordering the call to eeh_addr_cache_insert_dev works fine. The ordering is similar to the one in eeh_add_device_late. Signed-off-by: Thadeu Lima de Souza Cascardo --- Note that this is broken sinc

Re: [PATCH 2/2] ppc64: Add arch-specific pcie_get_speed_cap_mask

2013-03-14 Thread Thadeu Lima de Souza Cascardo
k-speed-stats property\n"); > + return -EINVAL; > + } > + > + switch (pcie_link_speed_stats[0]) { > + case 0x02: > + *mask |= PCIE_SPEED_50; > + case 0x01: > + *mask |= PCIE_SPEED

Re: [PATCH v2] ppc/iommu: use find_first_bit to look up entries in the iommu table

2013-01-30 Thread Thadeu Lima de Souza Cascardo
On Tue, Jan 29, 2013 at 11:35:56AM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2013-01-10 at 17:33 -0200, Thadeu Lima de Souza Cascardo wrote: > > Signed-off-by: Thadeu Lima de Souza Cascardo > > --- > > v2: > > Remove the unneeded extra variable i, which caused bu

[PATCH v2] ppc/iommu: use find_first_bit to look up entries in the iommu table

2013-01-10 Thread Thadeu Lima de Souza Cascardo
Signed-off-by: Thadeu Lima de Souza Cascardo --- v2: Remove the unneeded extra variable i, which caused build failure. --- arch/powerpc/kernel/iommu.c |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index

[PATCH 2/2] ppc/EEH: fix crash when adding a device in a slot with DDW

2012-12-28 Thread Thadeu Lima de Souza Cascardo
the system. So, a new function is needed to add such files only after pci_bus_add_devices have been called. Cc: sta...@vger.kernel.org Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/include/asm/eeh.h |3 +++ arch/powerpc/kernel/of_platform.c|3 +++ arch/powerpc/

[PATCH 1/2] EEH/OF: checking for CONFIG_EEH is not needed

2012-12-28 Thread Thadeu Lima de Souza Cascardo
The functions used are already defined as empty inline functions for the case where EEH is disabled. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/of_platform.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/of_platform.c

[PATCH 2/2] ppc/iommu: use find_first_bit to look up entries in the iommu table

2012-12-28 Thread Thadeu Lima de Souza Cascardo
Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/iommu.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 6d48ff8..91e2b99 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc

[PATCH 1/2] ppc/iommu: prevent false TCE leak message

2012-12-28 Thread Thadeu Lima de Souza Cascardo
s not cleared, a message is printed, warning of such a leak. Check for the reservation, and clear it before checking for any other standing mappings. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/iommu.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --

Re: [PATCH] ppc/iommu: prevent false TCE leak message

2012-12-28 Thread Thadeu Lima de Souza Cascardo
On Fri, Dec 28, 2012 at 01:21:35PM +0800, Gavin Shan wrote: > On Thu, Dec 27, 2012 at 02:28:06PM -0200, Thadeu Lima de Souza Cascardo wrote: > >When a device DMA window includes the address 0, it's reserved in the > >TCE bitmap to avoid returning that address to drivers. >

Re: [PATCH] ppc/EEH: fix crash when adding a device in a slot with DDW

2012-12-28 Thread Thadeu Lima de Souza Cascardo
On Fri, Dec 28, 2012 at 01:18:24PM +0800, Gavin Shan wrote: > On Thu, Dec 27, 2012 at 02:34:00PM -0200, Thadeu Lima de Souza Cascardo wrote: > >The DDW code uses a eeh_dev struct from the pci_dev. However, this is > >not set until eeh_add_device_late is called. > > > >S

[PATCH] ppc/EEH: fix crash when adding a device in a slot with DDW

2012-12-27 Thread Thadeu Lima de Souza Cascardo
the system. So, a new function is needed to add such files only after pci_bus_add_devices have been called. Cc: sta...@vger.kernel.org Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/include/asm/eeh.h |3 +++ arch/powerpc/kernel/pci-common.c |7 +-- arch/powerpc

[PATCH] ppc/iommu: prevent false TCE leak message

2012-12-27 Thread Thadeu Lima de Souza Cascardo
s not cleared, a message is printed, warning of such a leak. Check for the reservation, and clear it before checking for any other standing mappings. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/kernel/iommu.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --

Re: [PATCH] mlx4_en: map entire pages to increase throughput

2012-07-16 Thread Thadeu Lima de Souza Cascardo
On Mon, Jul 16, 2012 at 11:43:33PM +0300, Or Gerlitz wrote: > On Mon, Jul 16, 2012 at 10:42 PM, Rick Jones wrote: > > > I was thinking more along the lines of an additional comparison, > > explicitly using netperf TCP_RR or something like it, not just the packets > > per second from a bulk transf

Re: [PATCH] mlx4_en: map entire pages to increase throughput

2012-07-16 Thread Thadeu Lima de Souza Cascardo
On Mon, Jul 16, 2012 at 12:42:41PM -0700, Rick Jones wrote: > On 07/16/2012 12:06 PM, Thadeu Lima de Souza Cascardo wrote: > >On Mon, Jul 16, 2012 at 10:27:57AM -0700, Rick Jones wrote: > > > >>What is the effect on packet-per-second performance? (eg aggregate, > >&

Re: [PATCH] mlx4_en: map entire pages to increase throughput

2012-07-16 Thread Thadeu Lima de Souza Cascardo
On Mon, Jul 16, 2012 at 10:27:57AM -0700, Rick Jones wrote: > On 07/16/2012 10:01 AM, Thadeu Lima de Souza Cascardo wrote: > >In its receive path, mlx4_en driver maps each page chunk that it pushes > >to the hardware and unmaps it when pushing it up the stack. This limits > &g

Re: cpuidle: Default y for pseries

2012-01-11 Thread Thadeu Lima de Souza Cascardo
_cpu at platforms/pseries/smp.c), this requires some rework in these interactions or we should simply disable PSERIES_IDLE to be built as a module for now. Regards. Cascardo. > > diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig > index 7dbc4a8..62ca70d 100644 > --- a/d

[PATCH] ppc/eeh: fix crash when error happens during device probe

2012-01-11 Thread Thadeu Lima de Souza Cascardo
NULL before accessing the driver's name. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/include/asm/ppc-pci.h |5 + arch/powerpc/platforms/pseries/eeh.c |4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b

Re: [PATCH] mlx4_en: fix endianness with blue frame support

2011-10-10 Thread Thadeu Lima de Souza Cascardo
On Mon, Oct 10, 2011 at 01:42:23PM -0300, Thadeu Lima de Souza Cascardo wrote: > The doorbell register was being unconditionally swapped. In x86, that > meant it was being swapped to BE and written to the descriptor and to > memory, depending on the case of blue frame support or w

[PATCH] mlx4_en: fix endianness with blue frame support

2011-10-10 Thread Thadeu Lima de Souza Cascardo
while writing to the register. But in the blue frame case, it was being written as LE to the descriptor. The fix is not to swap doorbell unconditionally, write it to the register as BE and convert it to BE when writing it to the descriptor. Signed-off-by: Thadeu Lima de Souza Cascardo Reported

Re: [PATCH] mlx4_en: fix transmit of packages when blue frame isenabled

2011-10-07 Thread Thadeu Lima de Souza Cascardo
, 8 and 16 ping size, all OK. Removed the ARP entries, the ARP responses did not get to the other side. So, I did a pretty nasty hack to not use BF for ARP packets and after cleaning up the ARP table, everything seems to be working fine. What follows is my patch, just for reference. Regards, Casca

Re: [PATCH] mlx4_en: fix transmit of packages when blue frame is enabled

2011-10-04 Thread Thadeu Lima de Souza Cascardo
On Tue, Oct 04, 2011 at 08:02:12AM +0200, Benjamin Herrenschmidt wrote: > On Mon, 2011-10-03 at 17:53 -0300, Thadeu Lima de Souza Cascardo wrote: > > .../... > > > > Can you also send me the output of ethtool -i? > > > It seems that there is a problem

Re: [PATCH] mlx4_en: fix transmit of packages when blue frame is enabled

2011-10-03 Thread Thadeu Lima de Souza Cascardo
s was really not the proper fix, but thought it would be > > better to send it than just guess. Any clues what the problem might be? > > Perhaps, we would have to disable blue frame for this particular device? > > > > Regards, > > Cascardo. > > > > --- > &

[PATCH v2] powerpc: reserve iommu page 0

2011-09-21 Thread Thadeu Lima de Souza Cascardo
Cascardo Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org --- Resending, since it was recommended to add a comment about this particular code. --- arch/powerpc/kernel/iommu.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/powerpc

[PATCH] powerpc: reserve iommu page 0

2011-09-20 Thread Thadeu Lima de Souza Cascardo
this kind of error from happening is reserve the page addressed as 0 so it cannot be allocated for a DMA mapping. Ben Herrenschmidt deserves the credit for this patch. He pointed out the solution and what code would do the job. Signed-off-by: Thadeu Lima de Souza Cascardo Cc: Benjamin Herrenschmidt

[PATCH] powerpc/eeh: fix /proc/ppc64/eeh creation

2011-08-26 Thread Thadeu Lima de Souza Cascardo
problem and maintain the compatibility intended with the ppc64 symlink. Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/platforms/pseries/eeh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms

[PATCH] trivial: fix typo s/leve/level/ in powerpc arch

2010-01-17 Thread Thadeu Lima de Souza Cascardo
Signed-off-by: Thadeu Lima de Souza Cascardo --- arch/powerpc/mm/tlb_low_64e.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S index f288279..8b04c54 100644 --- a/arch/powerpc/mm/tlb_low_64e.S +++ b/arch