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
Hi, there. We have been investigating an issue we have observed on POWER8 POWERNV systems. When running the kernel selftests reuseport_bpf_cpu after a CPU hotplug, we see crashes, in different forms. [1] I managed to get xmon on that trap, and did some debugging. [2] I tried to dump the BPF JIT c

[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
still sets the return code on entry, which is overridden on powerpc, and it will always repeat the same on exit. Also, on powerpc, the errno is not inverted, and depends on ccr.so being set. This has been tested on powerpc and amd64. Cc: Michael Ellerman Cc: Kees Cook Signed-off-by: Thadeu Lima de

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
After commit 912c0a7f2b5daa3cbb2bc10f303981e493de73bd ("powerpc/64s: Save FSCR to init_task.thread.fscr after feature init"), which has been applied to the referred branches, when userspace sets the user DSCR MSR, it won't be inherited or restored during context switch, because the facility unavail

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
still sets the return code on entry, which is overridden on powerpc, and it will always repeat the same on exit. Also, on powerpc, the errno is not inverted, and depends on ccr.so being set. This has been tested on powerpc and amd64. Cc: Michael Ellerman Cc: Kees Cook Signed-off-by: Thadeu Lima de

[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
On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: > On Mon, Dec 2, 2019 at 3:37 AM Daniel Borkmann wrote: > > > > On Mon, Dec 02, 2019 at 04:53:26PM +1100, Michael Ellerman wrote: > > > Aurelien Jarno writes: > > > > On powerpc with recent versions of binutils, readelf outputs an ext

[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

[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
On Fri, Sep 05, 2014 at 05:55:18PM +1000, Michael Neuling wrote: > On Fri, 2014-09-05 at 09:13 +0200, Gabriel Paubert wrote: > > On Fri, Sep 05, 2014 at 03:28:47PM +1000, Michael Neuling wrote: > > > The Debian powerpc little endian architecture is called ppc64le. This > > > > Huh? ppc64le or ppc

[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
On Tue, Feb 04, 2014 at 08:47:14AM -0600, John Donnelly wrote: > Hi, > Where is a appropriate place to file a bug for this : This is the second > occurrence I have seen. > If this is a Ubuntu kernel, probably report it at Canonical's Launchpad. If it is provided by Freescale, report it to Freesc

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
On Thu, Mar 14, 2013 at 02:45:47PM -0300, luca...@linux.vnet.ibm.com wrote: > From: Lucas Kannebley Tavares > > Betters support for gen2 speed detections on PCI buses on ppc64 > architectures. > > Signed-off-by: Lucas Kannebley Tavares > --- > arch/powerpc/platforms/pseries/pci.c | 32 ++

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
On Tue, Jan 10, 2012 at 03:05:35PM -, Benjamin Herrenschmidt wrote: > We just replaced the pseries platform idle loops with a cpuidle backend, > however that means that you won't get any power saving and won't return > any unused idle time to the hypervisor unless cpuidle is enabled. > > Thus

[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
On Thu, Oct 06, 2011 at 03:10:28PM +0100, David Laight wrote: > > > static void mlx4_bf_copy(unsigned long *dst, unsigned long *src, > unsigned bytecnt) { > > + int i; > > + __le32 *psrc = (__le32 *)src; > > + > > + /* > > +* the buffer is already in big endian. For little endian > mac

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
On Mon, Oct 03, 2011 at 02:56:08PM +, Yevgeny Petrilin wrote: > > Hello, Yevgeny. > > > > We use a MT26448 (lspci -v output bellow) on a POWER7. Any other > > information, tests or debug patches you want me to try, just tell me. > > > > I expected this was really not the proper fix, but thoug

[PATCH v2] powerpc: reserve iommu page 0

2011-09-21 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. v2: Add a comment in the code. Signed-off-by: Thadeu Lima de Souza

[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