[PATCH 1/3] powerpc: Simplify do_sigbus

2014-09-24 Thread Anton Blanchard
Exit out early for a kernel fault, avoiding indenting of most of the function. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 51ab9e7..ab

[PATCH 2/3] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler

2014-09-24 Thread Anton Blanchard
do_page_fault was missing knowledge of HWPOISON, and we would oops if userspace tried to access a poisoned page: kernel BUG at arch/powerpc/mm/fault.c:180! Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff -

[PATCH 3/3] powerpc: Fill in si_addr_lsb siginfo field

2014-09-24 Thread Anton Blanchard
Fill in the si_addr_lsb siginfo field so the hwpoison code can pass to userspace the length of memory that has been corrupted. Signed-off-by: Anton Blanchard --- arch/powerpc/mm/fault.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c

Re: [PATCH 1/2] powerpc: Add VM_FAULT_HWPOISON handling to powerpc page fault handler

2014-09-24 Thread Anton Blanchard
Hi Stephen, > If you had done this as 2 patches (one to remove the indent and a > second to fix the actual problem), it would have been much easier to > review ... Good idea, I separated it out and resubmitted. Anton ___ Linuxppc-dev mailing list Linu

[PATCH] powerpc/8xx: Remove Kconfig symbol FADS

2014-09-24 Thread Paul Bolle
Commit 39eb56da2b53 ("pcmcia: Remove m8xx_pcmcia driver") removed the only driver that used CONFIG_FADS. Setting the Kconfig symbol FADS is pointless since that commit. Remove it. Signed-off-by: Paul Bolle --- Done on top of next-20140923. Tested with "git grep" only. Another cleanup might be to

Re: [PATCH v4 04/11] drivers: base: support cpu cache information interface to userspace via sysfs

2014-09-24 Thread Greg Kroah-Hartman
On Wed, Sep 17, 2014 at 12:00:48PM -0700, Greg Kroah-Hartman wrote: > On Wed, Sep 17, 2014 at 06:25:10PM +0100, Sudeep Holla wrote: > > Hi Greg, > > > > On 03/09/14 18:00, Sudeep Holla wrote: > > >From: Sudeep Holla > > > > > >This patch adds initial support for providing processor cache informat

[PATCH 1/5] char: hw_random: Remove .owner field for driver

2014-09-24 Thread Kiran Padwal
There is no need to init .owner field. Based on the patch from Peter Griffin "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register a

[PATCHv8 3/6] ppc/cell: trivial: replace get_unused_fd() by get_unused_fd_flags(0)

2014-09-24 Thread Yann Droneaud
This patch replaces calls to get_unused_fd() with equivalent call to get_unused_fd_flags(0) to preserve current behavor for existing code. In a further patch, get_unused_fd() will be removed so that new code start using get_unused_fd_flags(), with the hope O_CLOEXEC could be used, either by defaul

[PATCHv8 0/6] Getting rid of get_unused_fd() / enable close-on-exec

2014-09-24 Thread Yann Droneaud
Stinner since it has lot more background information on file descriptor leaking. One would also like to read "Excuse me son, but your code is leaking !!!" [4] by Dan Walsh for advice. [1] http://lwn.net/Articles/412131/ [2] http://udrepper.livejournal.com/20407.html [3] http://www.pytho

[PATCH v2 2/4] Simplify catalog_read()

2014-09-24 Thread Sukadev Bhattiprolu
catalog_read() implements the read interface for the sysfs file /sys/bus/event_source/devices/hv_24x7/interface/catalog It essentially takes a buffer, an offset and count as parameters to the read() call. It makes a hypervisor call to read a specific page from the catalog and copy the re

[PATCH v2 1/4] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Ian pointed out the use of __aligned(4096) caused rather large stack consumption in single_24x7_request(), so use the kmem_cache hv_page_cache (which we've already got set up for other allocations) insead of allocating locally. CC: Sukadev Bhattiprolu CC: Haren Myneni CC:

[PATCH v2 0/4] powerpc/perf: Miscellaneous fixes

2014-09-24 Thread Sukadev Bhattiprolu
Miscellaenous fixes for perf and 24x7 counters in powerpc. Patches 1,3,4 were submitted earlier as a part of the parametrized events for 24x7 counters. But they are not directly related to the parametrized events. Patch 2 simplifies and fixes a bug in catalog_read() which causes the catalog file

[PATCH v2 3/4] perf Documentation: sysfs events/ interfaces

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Add documentation for the , .scale, and .unit files in sysfs. .scale and .unit were undocumented. was previously documented only for specific powerpc pmu events. CC: Sukadev Bhattiprolu CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer --- .../testing/

[PATCH v2 4/4] perf Documentation: remove duplicated docs for powerpc cpu specific events

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Listing specific events doesn't actually help us at all here because: - these events actually vary between different ppc processors, they aren't garunteed to be present. - the documentation of the (generic) file contents is now superceded by the docs for arbitrary eve

[PATCH v4 00/10] Add support for parameterized events from sysfs

2014-09-24 Thread Sukadev Bhattiprolu
What this patchset does: - the first patch (override sysfs in tools/perf via SYSFS_PATH) was sent out previously, but needed a resend anyhow. Having it is useful for testing the later changes to tools/perf. - the second patch is a bugfix to the powerpc hv-24x7 code which was previously

[PATCH v4 01/10] tools/perf: support parsing parameterized events

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Enable event specification like: pmu/event_name,param1=0x1,param2=0x4/ Assuming that /sys/bus/event_source/devices/pmu/events/event_name Contains something like param2=foo,bar=1,param1=baz Changelog[v4]: [Jiri Olsa] Merge to recent perf-c

[PATCH v4 02/10] tools/perf: extend format_alias() to include event parameters

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer This causes `perf list pmu` to show parameters for parameterized events like follows: pmu/event_name,param1=?,param2=?/ [Kernel PMU event] An example: hv_gpci/dispatch_timebase_by_processor_processor_time_in_timebase_cycles,phys_processor_idx=?/ [Kernel PMU event] C

[PATCH v4 04/10] powerpc/perf/hv-24x7: parse catalog and populate sysfs with events

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Retrieves and parses the 24x7 catalog on POWER systems that supply it (right now, only POWER 8). Events are exposed via sysfs in the standard fashion, and are all parameterized. Catalog is (at the moment) only parsed on boot. It needs re-parsing when a some hypervisor events

[PATCH v4 03/10] perf: provide sysfs_show for struct perf_pmu_events_attr

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer (struct perf_pmu_events_attr) is defined in include/linux/perf_event.h, but the only "show" for it is in x86 and contains x86 specific stuff. Make a generic one for those of us who are just using the event_str. CC: Sukadev Bhattiprolu CC: Haren Myneni CC: Cody P Schafer

[PATCH v4 05/10] perf: add PMU_EVENT_ATTR_STRING() helper

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Helper for constructing static struct perf_pmu_events_attr s. CC: Sukadev Bhattiprolu CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer --- include/linux/perf_event.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/perf_event.h b

[PATCH v4 06/10] powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer This adds (in req-gen/) a framework for defining gpci counter requests. It uses macro magic similar to ftrace. Also convert the existing hv-gpci request structures and enum values to use the new framework (and adjust old users of the structs and enum values to cope with chan

[PATCH v4 07/10] powerpc/perf/hv-gpci: add the remaining gpci requests

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Add the remaining gpci requests that contain counters suitable for use by perf. Omit those that don't contain any counters (but note their ommision). CC: Sukadev Bhattiprolu CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-gpci-

[PATCH v4 09/10] tools/perf: Document parameterized and symbolic events

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Changelog[v6]: - [Sukadev Bhattiprolu]: Update documentation of perf-list and perf-record; Added documentation for perf-stat. CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu --- tools/perf/Documentat

[PATCH v4 08/10] perf Documentation: add event parameters

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer Event parameters are a basic way for partial events to be specified in sysfs with per-event names given to the fields that need to be filled in when using a particular event. It is intended for supporting cases where the single 'cpu' parameter is insufficient. For example, P

[PATCH v4 10/10] powerpc/perf/hv-24x7: Document sysfs event description entries

2014-09-24 Thread Sukadev Bhattiprolu
From: Cody P Schafer CC: Sukadev Bhattiprolu CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 22 ++ 1 file changed, 22 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-d

Re: [PATCH v2 1/3] pseries: Make CPU hotplug path endian safe

2014-09-24 Thread Nathan Fontenot
On 09/16/2014 03:15 PM, Thomas Falcon wrote: > From: Bharata B Rao > > - ibm,rtas-configure-connector should treat the RTAS data as big endian. > - Treat ibm,ppc-interrupt-server#s as big-endian when setting > smp_processor_id during hotplug. > > Signed-off-by: Bharata B Rao > Signed-off-by:

Re: [PATCH v2 2/3] pseries: Fix endian issues in onlining cpu threads

2014-09-24 Thread Nathan Fontenot
On 09/16/2014 03:15 PM, Thomas Falcon wrote: > The ibm,ppc-interrupt-server#s property is in big endian format. > These values need to be converted when used by little endian > architectures. > > Signed-off-by: Thomas Falcon Acked-by: Nathan Fontenot > --- > Changes in v2: > > Followed sugge

Re: [PATCH v3 3/3] pseries: Fix endian issues in cpu hot-removal

2014-09-24 Thread Nathan Fontenot
On 09/16/2014 03:15 PM, Thomas Falcon wrote: > When removing a cpu, this patch makes sure that values > gotten from or passed to firmware are in the correct > endian format. > > Signed-off-by: Thomas Falcon Acked-by: Nathan Fontenot > --- > Changes in v3: > > drc_index in dlpar_cpu_release i

Re: [4/5] pseries: Implement memory hotplug add in the kernel

2014-09-24 Thread Nathan Fontenot
On 09/17/2014 02:07 AM, Michael Ellerman wrote: > > On Mon, 2014-09-15 at 15:32 -0500, Nathan Fontenot wrote: >> This patch adds the ability to do memory hotplug adding in the kernel. >> >> Currently the hotplug add/remove of memory is handled by the drmgr >> command. The drmgr command performs th

Re: powerpc: Fix build failure when MEMORY_HOTPLUG=y

2014-09-24 Thread Michael Ellerman
On Tue, 2014-19-08 at 21:01:05 UTC, Pranith Kumar wrote: > ARCH_ENABLE_MEMORY_HOTPLUG is enabled by default for powerpc. This causes > build > failures when SPARSEMEM=n as memory hotplug needs definition which are defined > only when SPARSEMEM=y. The error is as follows: > arch/powerpc/platforms/

Re: fadump: fix endianess issues in firmware assisted dump handling

2014-09-24 Thread Michael Ellerman
On Wed, 2014-03-09 at 12:29:48 UTC, Hari Bathini wrote: > Firmware-assisted dump (fadump) kernel code is not LE compliant. The > below patch tries to fix this issue. Tested this patch with upstream > kernel. Did some sanity testing for the LE fadump vmcore generated. > Below output shows crash too

[PATCH 2/3] qe_common: add qe common functions to qe_common.c

2014-09-24 Thread Zhao Qiang
qe need to call some common functions, move them into public directory, add a new file drivers/soc/qe/qe_common.c for them. Signed-off-by: Zhao Qiang --- drivers/soc/qe/Makefile| 2 +- drivers/soc/qe/qe_common.c | 185 + include/linux/fsl/qe.h

[PATCH 3/3] rheap: move rheap.c from arch/powerpc/lib/ to lib/

2014-09-24 Thread Zhao Qiang
qe need to use the rheap, so move it to public directory. Signed-off-by: Zhao Qiang --- arch/powerpc/Kconfig| 3 --- arch/powerpc/include/asm/fsl_85xx_cache_sram.h | 2 +- arch/powerpc/lib/Makefile | 2 -- arch/powerpc/pl

[PATCH v2 07/22] PCI/MSI: Refactor struct msi_chip to make it become more common

2014-09-24 Thread Yijing Wang
Now there are a lot of __weak arch functions in MSI code. These functions make MSI driver complex. Thierry Reding Introduced a new MSI chip framework to configure MSI/MSI-X irq in ARM. Use the new MSI chip framework to refactor all other platform MSI arch code to eliminate weak arch MSI functions.

[PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-24 Thread Yijing Wang
Introduce weak arch_find_msi_chip() to find the match msi_chip. Currently, MSI chip associates pci bus to msi_chip. Because in ARM platform, there may be more than one MSI controller in system. Associate pci bus to msi_chip help pci device to find the match msi_chip and setup MSI/MSI-X irq correctl

[PATCH v2 05/22] s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq()

2014-09-24 Thread Yijing Wang
Now only s390/MSI use default_msi_mask_irq() and default_msix_mask_irq(), replace them with the common msi mask irq functions __msi_mask_irq() and __msix_mask_irq(). Remove default_msi_mask_irq() and default_msix_mask_irq(). Signed-off-by: Yijing Wang --- arch/s390/pci/pci.c |4 ++-- include

[PATCH v2 02/22] PCI/MSI: Remove useless bus->msi assignment

2014-09-24 Thread Yijing Wang
Currently, PCI drivers will initialize bus->msi in pcibios_add_bus(). pcibios_add_bus() will be called in every pci bus initialization. So the bus->msi assignment in pci_alloc_child_bus() is useless. Signed-off-by: Yijing Wang CC: Thierry Reding CC: Thomas Petazzoni --- drivers/pci/probe.c |

[PATCH v2 10/22] Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- drivers/iommu/irq_remapping.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/iommu/irq_rem

[PATCH v2 09/22] x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Tested-by: Konrad Rzeszutek Wilk Signed-off-by: Yijing Wang Acked-by: David Vrabel Reviewed-by: Konrad Rzeszutek Wilk CC: Konrad Rzeszutek Wilk --- arch/x86

[PATCH v2 01/22] PCI/MSI: Clean up struct msi_chip argument

2014-09-24 Thread Yijing Wang
Msi_chip functions setup_irq/teardown_irq rarely use msi_chip argument. We can look up msi_chip pointer by the device pointer or irq number, so clean up msi_chip argument. Signed-off-by: Yijing Wang CC: Thierry Reding CC: Thomas Petazzoni --- drivers/irqchip/irq-armada-370-xp.c |8 +++-

[PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-24 Thread Yijing Wang
This series is based Bjorn's pci/msi branch git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/msi Currently, there are a lot of weak arch functions in MSI code. Thierry Reding Introduced MSI chip framework to configure MSI/MSI-X in arm. This series use MSI chip framework to refacto

[PATCH v2 13/22] MIPS/Xlp: Remove the dead function destroy_irq() to fix build error

2014-09-24 Thread Yijing Wang
Commit 465665f78a7 ("mips: Kill pointless destroy_irq()") removed the destroy_irq(). So remove the leftover one in xlp_setup_msix() to fix build error. arch/mips/pci/msi-xlp.c: In function 'xlp_setup_msix': arch/mips/pci/msi-xlp.c:447:3: error: implicit declaration of function 'destroy_irq'.. cc1

[PATCH v2 11/22] x86/MSI: Remove unused MSI weak arch functions

2014-09-24 Thread Yijing Wang
Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang --- arch/x86/include/asm/pci.h |3 --- arch/x86/include/asm/x86_init.h |4 arch/x86/kernel/apic/io_apic.c |2 +- arch/x86/kernel/x86_init.c | 24 drivers/iommu/ir

[PATCH v2 14/22] MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/mips/pci/msi-xlp.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/msi-

[PATCH v2 04/22] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-09-24 Thread Yijing Wang
Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() and arch_msi_mask_irq() to fix a bug found when running xen in x86. Introduced these two funcntions make MSI code complex. And mask/unmask is the irq actions related to interrupt controller, should not use weak arch functions to

[PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data()

2014-09-24 Thread Yijing Wang
Currently, pcie-designware, pcie-rcar, pci-tegra drivers use irq chip_data to save the msi_chip pointer. They already call irq_set_chip_data() in their own MSI irq map functions. So irq_set_chip_data() in arch_setup_msi_irq() is useless. Signed-off-by: Yijing Wang --- drivers/pci/msi.c |5 ++

[PATCH v2 16/22] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang Acked-by: Michael Ellerman --- arch/powerpc/kernel/msi.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) d

[PATCH v2 12/22] MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/mips/pci/msi-octeon.c | 35 ++- 1 files changed, 22 insertions(+), 13 deletions(-) diff -

[PATCH v2 18/22] arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/arm/mach-iop13xx/include/mach/pci.h |2 ++ arch/arm/mach-iop13xx/iq81340mc.c|1 + arch/arm/mach-iop13xx/iq81

[PATCH v2 15/22] MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/mips/pci/pci-xlr.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/pci

[PATCH v2 17/22] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang Acked-by: Sebastian Ott --- arch/s390/pci/pci.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git

[PATCH v2 19/22] IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/ia64/kernel/msi_ia64.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/ia64/

[PATCH v2 20/22] Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/sparc/kernel/pci.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/

[PATCH v2 21/22] tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/tile/kernel/pci_gx.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/tile/kernel

[PATCH v2 22/22] PCI/MSI: Clean up unused MSI arch functions

2014-09-24 Thread Yijing Wang
Now we use struct msi_chip in all platforms to configure MSI/MSI-X. We can clean up the unused arch functions. Signed-off-by: Yijing Wang Reviewed-by: Lucas Stach --- drivers/iommu/irq_remapping.c |2 +- drivers/pci/msi.c | 100 +++- include/

[PATCH v2 08/22] x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/x86/include/asm/pci.h |1 + arch/x86/kernel/apic/io_apic.c | 12 2 files changed, 13 insertions(+), 0

Re: [2/5] powerpc/eeh: Add eeh_pe_state sysfs entry

2014-09-24 Thread Michael Ellerman
On Sun, 2014-17-08 at 03:02:26 UTC, Gavin Shan wrote: > The patch adds sysfs entry "eeh_pe_state". Reading on it returns > the PE's state while writing to it clears the frozen state. It's > used to check or clear the PE frozen state from userland for > debugging purpose. > > diff --git a/arch/powe

[PATCH 1/3] powerpc/eeh: Dump PCI config space for all child devices

2014-09-24 Thread Gavin Shan
The PEs can be organized as nested. Current implementation doesn't dump PCI config space for subordinate devices of child PEs. However, the frozen PE could be caused by those subordinate devices of its child PEs. The patch dumps PCI config space for all subordinate devices of the problematic PE.

[PATCH 2/3] powerpc/powernv: Fetch frozen PE on top level

2014-09-24 Thread Gavin Shan
It should have been part of commit 1ad7a72c5 ("powerpc/eeh: Report frozen parent PE prior to child PE"). There are 2 ways to report EEH errors: proactively polling triggered by PCI config or IO accesses, or interrupt driven event. We missed to report and handle parent frozen PE prior to child froze

[RFC PATCH] powerpc/powernv: Fix dma_ops for bypass window

2014-09-24 Thread Gavin Shan
When using bypass window on IODA2, the incorrect DMA operations "dma_iommu_ops" is used by devices. The device driver calls dma_get_required_mask() to determine using 32-bits or bypass DMA window. Unfortunately, the returned DMA mask always forces the driver to use 32-bits DMA window. The problem w

Re: [1/4] powerpc/powernv: Sync header with firmware

2014-09-24 Thread Michael Ellerman
On Tue, 2014-26-08 at 07:56:16 UTC, Gavin Shan wrote: > From: Mike Qiu > > The patch synchronizes firmware header file (opal.h) for PCI error > injection. > > diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h > index 4593a93..9113653 100644 > --- a/arch/powerpc/inclu

Re: [2/5] powerpc/eeh: Add eeh_pe_state sysfs entry

2014-09-24 Thread Gavin Shan
On Thu, Sep 25, 2014 at 02:09:58PM +1000, Michael Ellerman wrote: >On Sun, 2014-17-08 at 03:02:26 UTC, Gavin Shan wrote: >> The patch adds sysfs entry "eeh_pe_state". Reading on it returns >> the PE's state while writing to it clears the frozen state. It's >> used to check or clear the PE frozen st

Re: [1/4] powerpc/powernv: Sync header with firmware

2014-09-24 Thread Gavin Shan
On Thu, Sep 25, 2014 at 02:27:47PM +1000, Michael Ellerman wrote: >On Tue, 2014-26-08 at 07:56:16 UTC, Gavin Shan wrote: >> From: Mike Qiu >> >> The patch synchronizes firmware header file (opal.h) for PCI error >> injection. >> >> diff --git a/arch/powerpc/include/asm/opal.h >> b/arch/powerpc/

[PATCH] powerpc: Print instruction when logging unhandled exceptions

2014-09-24 Thread Anton Blanchard
It is often useful to see the instruction that caused an unhandled exception. Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/traps.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 0dc4

Re: [PATCH v2 03/13] powerpc/spapr: vfio: Implement spapr_tce_iommu_ops

2014-09-24 Thread Alexey Kardashevskiy
On 09/24/2014 06:42 AM, Alex Williamson wrote: > On Tue, 2014-09-23 at 13:00 +1000, Alexey Kardashevskiy wrote: >> Modern IBM POWERPC systems support multiple IOMMU tables per PE >> so we need a more reliable way (compared to container_of()) to get >> a PE pointer from the iommu_table struct pointe

Re: [RFC PATCH] powerpc/powernv: Fix dma_ops for bypass window

2014-09-24 Thread Gavin Shan
On Thu, Sep 25, 2014 at 02:14:20PM +1000, Gavin Shan wrote: Please ignore this. I was told by Ben some drivers don't call set_dev_mask(). So I have to fix it in another way. Thanks, Gavin >When using bypass window on IODA2, the incorrect DMA operations >"dma_iommu_ops" is used by devices. The de

[PATCH v3] powerpc/iommu/ddw: Fix endianness

2014-09-24 Thread Alexey Kardashevskiy
rtas_call() accepts and returns values in CPU endianness. The ddw_query_response and ddw_create_response structs members are defined and treated as BE but as they are passed to rtas_call() as (u32 *) and they get byteswapped automatically, the data is CPU-endian. This fixes ddw_query_response and d

[PATCH v2 0/3] fix bugs in mobility RTAS calls

2014-09-24 Thread Cyril Bur
This patchset addresses endian issues and bugs in device tree update for ibm,update-nodes and ibm,update-properties RTAS calls. A subseqent patchset will deal with issues in device tree node addition (ibm,configure-connector RTAS call) as well as more robust handling of deleting critical device tr

[PATCH v2 1/3] drivers/of: add of_changeset_apply_locked

2014-09-24 Thread Cyril Bur
Due to the requirement of of_changesets that of_changeset_apply be called holding the of_mutex and that the of_mutex cannot be accessed nicely outside the of code, added a wrapper which grabs the lock and called of_changeset_apply. Signed-off-by: Cyril Bur --- drivers/of/dynamic.c | 11 +

[PATCH v2 3/3] powerpc/pseries: fix bugs in mobility RTAS calls

2014-09-24 Thread Cyril Bur
These calls use a shared memory buffer to communicate device tree updates and PAPR specifies that RTAS buffers are to be written in big endian. Used the rtas buffer accessor to help solve both endian problems and standard buffer access problems. It seems more sane to stop trying to parse a buffer

[PATCH v2 2/3] powerpc/pseries: create rtas buffer accessor

2014-09-24 Thread Cyril Bur
Added simple accessor functions for rtas in memory buffers which performs accesses of appropriate type and performs endian conversions. Signed-off-by: Cyril Bur --- arch/powerpc/platforms/pseries/Makefile | 4 +- arch/powerpc/platforms/pseries/pseries.h | 41 + arch/powerpc/p

[PATCH] selftests/powerpc: Add test of load_unaligned_zero_pad()

2014-09-24 Thread Michael Ellerman
It is a rarely exercised case, so we want to have a test to ensure it works as required. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/word-at-a-time.h | 13 +- tools/testing/selftests/powerpc/Makefile | 2 +- .../testing/selft