* Re: [PATCH v2] ASoC: fsl_esai: Add ESAI CPU DAI driver
From: Nicolin Chen @ 2014-01-10 16:45 UTC (permalink / raw)
To: Mark Brown
Cc: mark.rutland, devicetree, alsa-devel, shawn.guo, pawel.moll,
ijc+devicetree, tiwai, linux-kernel, linux-doc, timur, lgirdwood,
robh+dt, rob, galak, grant.likely, perex, linuxppc-dev
In-Reply-To: <20140110165229.GP29039@sirena.org.uk>
On Fri, Jan 10, 2014 at 04:52:29PM +0000, Mark Brown wrote:
> On Fri, Jan 10, 2014 at 11:48:25PM +0800, Nicolin Chen wrote:
>
> > I think I start to understand the point here: If a user only needs to playback
> > the default case - 44.1KHz for example, the driver can just configure all the
> > dividers once at the beginning, not every time, so that we can save further
> > register overriding operation or even complicated clock selection and divisor
> > calculation, which obviously makes the procedure clean and reduces the system
> > loading even if it might be just in a slight level.
>
> > Is this the reason, or maybe one of the reasons, to the defaults providing?
>
> The main thing is that if the DAI driver does it then it's less code in
> the machine drivers using it - what tends to happen otherwise is that
> quite a few machine drivers end up replicating the same logic. Hardware
> designers tend to do a lot of cut'n'paste with these things so even if
> the CODEC is different the clocking is often very similar.
Point taken. And it also depends on how common the defaults would be.
I think I should try to figure out a comparably generic template for
the clock selection and its rate settings here and also check other
redundant places.
I learned another lesson today. Thank you indeed.
Nicolin
^ permalink raw reply
* Re: [PATCH v8] clk: corenet: Adds the clock binding
From: Scott Wood @ 2014-01-10 20:19 UTC (permalink / raw)
To: Tang Yuantian; +Cc: mark.rutland, b07421, devicetree, linuxppc-dev
In-Reply-To: <1389320944-2574-1-git-send-email-Yuantian.Tang@freescale.com>
On Fri, 2014-01-10 at 10:29 +0800, Tang Yuantian wrote:
> +- reg: Offset and length of the clock register set
"offset" into what? The containing node is not within the scope of this
binding.
I know that plenty of other bindings are worded this way, and I wouldn't
hold up acceptance if this were the only issue, but it ought to be fixed
to say something like "reg: resource zero represents the clock register
set".
> +Recommended properties:
> +- clock-frequency: Input system clock frequency. Must be present
> + if the device has sub-nodes.
Why only "if the device has sub-nodes"?
> + * "fsl,qoriq-sysclk-1.0": for input system clock (v1.0).
> + It takes parent's clock as its clock.
> + * "fsl,qoriq-sysclk-2.0": for input system clock (v2.0).
> + It takes parent's clock as its clock.
s/parent's clock/parent's clock-frequency/ since the parent isn't
actually exposing a clock as per the clock bindings.
> +Example for clock block and clock provider:
> +/ {
> + clockgen: global-utilities@e1000 {
> + compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
> + ranges = <0x0 0xe1000 0x1000>;
> + clock-frequency = <0>;
It'd be better to show a real clock-frequency here -- this is an example
for the node as the OS sees it, not what goes in the dts as an input to
U-Boot.
-Scott
^ permalink raw reply
* [PATCH] Revert "powerpc/pseries/iommu: remove default window before attempting DDW manipulation"
From: Nishanth Aravamudan @ 2014-01-10 23:09 UTC (permalink / raw)
To: benh; +Cc: michael, linuxppc-dev, paulus, anton
Ben rightfully pointed out that there is a race in the "newer" DDW code.
Presuming we are running on recent enough firmware that supports the
"reset" DDW manipulation call, we currently always remove the base
32-bit DMA window in order to maximize the resources for Phyp when
creating the 64-bit window. However, this can be problematic for the
case where multiple functions are in the same PE (partitionable
endpoint), where some funtions might be 32-bit DMA only. All of a
sudden, the only functional DMA window for such functions is gone. We
will have serious errors in such situations. The best solution is simply
to revert the extension to the DDW code where we ever remove the base
DMA window.
This reverts commit 25ebc45b93452d0bc60271f178237123c4b26808.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index f253361..ed6e553 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -717,21 +717,6 @@ static int __init disable_ddw_setup(char *str)
early_param("disable_ddw", disable_ddw_setup);
-static inline void __remove_ddw(struct device_node *np, const u32 *ddw_avail, u64 liobn)
-{
- int ret;
-
- ret = rtas_call(ddw_avail[2], 1, 1, NULL, liobn);
- if (ret)
- pr_warning("%s: failed to remove DMA window: rtas returned "
- "%d to ibm,remove-pe-dma-window(%x) %llx\n",
- np->full_name, ret, ddw_avail[2], liobn);
- else
- pr_debug("%s: successfully removed DMA window: rtas returned "
- "%d to ibm,remove-pe-dma-window(%x) %llx\n",
- np->full_name, ret, ddw_avail[2], liobn);
-}
-
static void remove_ddw(struct device_node *np)
{
struct dynamic_dma_window_prop *dwp;
@@ -761,7 +746,15 @@ static void remove_ddw(struct device_node *np)
pr_debug("%s successfully cleared tces in window.\n",
np->full_name);
- __remove_ddw(np, ddw_avail, liobn);
+ ret = rtas_call(ddw_avail[2], 1, 1, NULL, liobn);
+ if (ret)
+ pr_warning("%s: failed to remove direct window: rtas returned "
+ "%d to ibm,remove-pe-dma-window(%x) %llx\n",
+ np->full_name, ret, ddw_avail[2], liobn);
+ else
+ pr_debug("%s: successfully removed direct window: rtas returned "
+ "%d to ibm,remove-pe-dma-window(%x) %llx\n",
+ np->full_name, ret, ddw_avail[2], liobn);
delprop:
ret = of_remove_property(np, win64);
@@ -921,12 +914,6 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddw_avail,
return ret;
}
-static void restore_default_window(struct pci_dev *dev,
- u32 ddw_restore_token)
-{
- __restore_default_window(pci_dev_to_eeh_dev(dev), ddw_restore_token);
-}
-
struct failed_ddw_pdn {
struct device_node *pdn;
struct list_head list;
@@ -954,13 +941,9 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
u64 dma_addr, max_addr;
struct device_node *dn;
const u32 *uninitialized_var(ddw_avail);
- const u32 *uninitialized_var(ddw_extensions);
- u32 ddw_restore_token = 0;
struct direct_window *window;
struct property *win64;
struct dynamic_dma_window_prop *ddwprop;
- const void *dma_window = NULL;
- unsigned long liobn, offset, size;
struct failed_ddw_pdn *fpdn;
mutex_lock(&direct_window_init_mutex);
@@ -991,42 +974,9 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
*/
ddw_avail = of_get_property(pdn, "ibm,ddw-applicable", &len);
if (!ddw_avail || len < 3 * sizeof(u32))
- goto out_unlock;
-
- /*
- * the extensions property is only required to exist in certain
- * levels of firmware and later
- * the ibm,ddw-extensions property is a list with the first
- * element containing the number of extensions and each
- * subsequent entry is a value corresponding to that extension
- */
- ddw_extensions = of_get_property(pdn, "ibm,ddw-extensions", &len);
- if (ddw_extensions) {
- /*
- * each new defined extension length should be added to
- * the top of the switch so the "earlier" entries also
- * get picked up
- */
- switch (ddw_extensions[0]) {
- /* ibm,reset-pe-dma-windows */
- case 1:
- ddw_restore_token = ddw_extensions[1];
- break;
- }
- }
+ goto out_failed;
- /*
- * Only remove the existing DMA window if we can restore back to
- * the default state. Removing the existing window maximizes the
- * resources available to firmware for dynamic window creation.
- */
- if (ddw_restore_token) {
- dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
- of_parse_dma_window(pdn, dma_window, &liobn, &offset, &size);
- __remove_ddw(pdn, ddw_avail, liobn);
- }
-
- /*
+ /*
* Query if there is a second window of size to map the
* whole partition. Query returns number of windows, largest
* block assigned to PE (partition endpoint), and two bitmasks
@@ -1035,7 +985,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
dn = pci_device_to_OF_node(dev);
ret = query_ddw(dev, ddw_avail, &query);
if (ret != 0)
- goto out_restore_window;
+ goto out_failed;
if (query.windows_available == 0) {
/*
@@ -1044,7 +994,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
* trading in for a larger page size.
*/
dev_dbg(&dev->dev, "no free dynamic windows");
- goto out_restore_window;
+ goto out_failed;
}
if (be32_to_cpu(query.page_size) & 4) {
page_shift = 24; /* 16MB */
@@ -1055,7 +1005,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
} else {
dev_dbg(&dev->dev, "no supported direct page size in mask %x",
query.page_size);
- goto out_restore_window;
+ goto out_failed;
}
/* verify the window * number of ptes will map the partition */
/* check largest block * page size > max memory hotplug addr */
@@ -1064,14 +1014,14 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
dev_dbg(&dev->dev, "can't map partiton max 0x%llx with %u "
"%llu-sized pages\n", max_addr, query.largest_available_block,
1ULL << page_shift);
- goto out_restore_window;
+ goto out_failed;
}
len = order_base_2(max_addr);
win64 = kzalloc(sizeof(struct property), GFP_KERNEL);
if (!win64) {
dev_info(&dev->dev,
"couldn't allocate property for 64bit dma window\n");
- goto out_restore_window;
+ goto out_failed;
}
win64->name = kstrdup(DIRECT64_PROPNAME, GFP_KERNEL);
win64->value = ddwprop = kmalloc(sizeof(*ddwprop), GFP_KERNEL);
@@ -1133,9 +1083,7 @@ out_free_prop:
kfree(win64->value);
kfree(win64);
-out_restore_window:
- if (ddw_restore_token)
- restore_default_window(dev, ddw_restore_token);
+out_failed:
fpdn = kzalloc(sizeof(*fpdn), GFP_KERNEL);
if (!fpdn)
^ permalink raw reply related
* [PATCH] Revert "pseries/iommu: Remove DDW on kexec"
From: Nishanth Aravamudan @ 2014-01-10 23:10 UTC (permalink / raw)
To: benh; +Cc: michael, linuxppc-dev, paulus, anton
In-Reply-To: <20140110230938.GA12343@linux.vnet.ibm.com>
After reverting 25ebc45b93452d0bc60271f178237123c4b26808
("powerpc/pseries/iommu: remove default window before attempting DDW
manipulation"), we no longer remove the base window in enable_ddw.
Therefore, we no longer need to reset the DMA window state in
find_existing_ddw_windows(). We can instead go back to what was done
before, which simply reuses the previous configuration, if any. Further,
this removes the final caller of the reset-pe-dma-windows call, so
remove those functions.
This fixes an EEH on kdump with the ipr driver. The EEH occurs, because
the initcall removes the DDW configuration (64-bit DMA window), but
doesn't ensure the ops are via the IOMMU -- a DMA operation occurs
during probe (still investigating this) and we EEH.
This reverts commit 14b6f00f8a4fdec5ccd45a0710284de301a61628.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index ed6e553..dc79e7c 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -783,68 +783,33 @@ static u64 find_existing_ddw(struct device_node *pdn)
return dma_addr;
}
-static void __restore_default_window(struct eeh_dev *edev,
- u32 ddw_restore_token)
-{
- u32 cfg_addr;
- u64 buid;
- int ret;
-
- /*
- * Get the config address and phb buid of the PE window.
- * Rely on eeh to retrieve this for us.
- * Retrieve them from the pci device, not the node with the
- * dma-window property
- */
- cfg_addr = edev->config_addr;
- if (edev->pe_config_addr)
- cfg_addr = edev->pe_config_addr;
- buid = edev->phb->buid;
-
- do {
- ret = rtas_call(ddw_restore_token, 3, 1, NULL, cfg_addr,
- BUID_HI(buid), BUID_LO(buid));
- } while (rtas_busy_delay(ret));
- pr_info("ibm,reset-pe-dma-windows(%x) %x %x %x returned %d\n",
- ddw_restore_token, cfg_addr, BUID_HI(buid), BUID_LO(buid), ret);
-}
-
static int find_existing_ddw_windows(void)
{
+ int len;
struct device_node *pdn;
+ struct direct_window *window;
const struct dynamic_dma_window_prop *direct64;
- const u32 *ddw_extensions;
if (!firmware_has_feature(FW_FEATURE_LPAR))
return 0;
for_each_node_with_property(pdn, DIRECT64_PROPNAME) {
- direct64 = of_get_property(pdn, DIRECT64_PROPNAME, NULL);
+ direct64 = of_get_property(pdn, DIRECT64_PROPNAME, &len);
if (!direct64)
continue;
- /*
- * We need to ensure the IOMMU table is active when we
- * return from the IOMMU setup so that the common code
- * can clear the table or find the holes. To that end,
- * first, remove any existing DDW configuration.
- */
- remove_ddw(pdn);
+ window = kzalloc(sizeof(*window), GFP_KERNEL);
+ if (!window || len < sizeof(struct dynamic_dma_window_prop)) {
+ kfree(window);
+ remove_ddw(pdn);
+ continue;
+ }
- /*
- * Second, if we are running on a new enough level of
- * firmware where the restore API is present, use it to
- * restore the 32-bit window, which was removed in
- * create_ddw.
- * If the API is not present, then create_ddw couldn't
- * have removed the 32-bit window in the first place, so
- * removing the DDW configuration should be sufficient.
- */
- ddw_extensions = of_get_property(pdn, "ibm,ddw-extensions",
- NULL);
- if (ddw_extensions && ddw_extensions[0] > 0)
- __restore_default_window(of_node_to_eeh_dev(pdn),
- ddw_extensions[1]);
+ window->device = pdn;
+ window->prop = direct64;
+ spin_lock(&direct_window_list_lock);
+ list_add(&window->list, &direct_window_list);
+ spin_unlock(&direct_window_list_lock);
}
return 0;
^ permalink raw reply related
* [PATCH v2] powerpc/booke-64: fix tlbsrx. path in bolted tlb handler
From: Scott Wood @ 2014-01-10 23:30 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Scott Wood
From: Scott Wood <scott@tyr.buserror.net>
It was branching to the cleanup part of the non-bolted handler,
which would have been bad if there were any chips with tlbsrx.
that use the bolted handler.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
v2: rebase
arch/powerpc/mm/tlb_low_64e.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S
index 75f5d27..16250b1 100644
--- a/arch/powerpc/mm/tlb_low_64e.S
+++ b/arch/powerpc/mm/tlb_low_64e.S
@@ -136,7 +136,7 @@ BEGIN_MMU_FTR_SECTION
*/
PPC_TLBSRX_DOT(0,R16)
ldx r14,r14,r15 /* grab pgd entry */
- beq normal_tlb_miss_done /* tlb exists already, bail */
+ beq tlb_miss_done_bolted /* tlb exists already, bail */
MMU_FTR_SECTION_ELSE
ldx r14,r14,r15 /* grab pgd entry */
ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBRSRV)
@@ -192,6 +192,7 @@ ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBRSRV)
mtspr SPRN_MAS7_MAS3,r15
tlbwe
+tlb_miss_done_bolted:
TLB_MISS_STATS_X(MMSTAT_TLB_MISS_NORM_OK)
tlb_epilog_bolted
rfi
--
1.8.3.2
^ permalink raw reply related
* Re: [PATCH v2 0/9] cpuidle: rework device state count handling
From: Rafael J. Wysocki @ 2014-01-11 0:37 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: linux-samsung-soc, linux-pm, daniel.lezcano, linux-kernel,
kyungmin.park, linuxppc-dev, lenb
In-Reply-To: <1387565251-7051-1-git-send-email-b.zolnierkie@samsung.com>
On Friday, December 20, 2013 07:47:22 PM Bartlomiej Zolnierkiewicz wrote:
> Hi,
>
> Some cpuidle drivers assume that cpuidle core will handle cases where
> device->state_count is smaller than driver->state_count, unfortunately
> currently this is untrue (device->state_count is used only for handling
> cpuidle state sysfs entries and driver->state_count is used for all
> other cases) and will not be fixed in the future as device->state_count
> is planned to be removed [1].
>
> This patchset fixes such drivers (ARM EXYNOS cpuidle driver and ACPI
> cpuidle driver), removes superflous device->state_count initialization
> from drivers for which device->state_count equals driver->state_count
> (POWERPC pseries cpuidle driver and intel_idle driver) and finally
> removes state_count field from struct cpuidle_device.
>
> Additionaly (while at it) this patchset fixes C1E promotion disable
> quirk handling (in intel_idle driver) and converts cpuidle drivers code
> to use the common cpuidle_[un]register() routines (in POWERPC pseries
> cpuidle driver and intel_idle driver).
>
> [1] http://permalink.gmane.org/gmane.linux.power-management.general/36908
>
> Reference to v1:
> http://comments.gmane.org/gmane.linux.power-management.general/37390
>
> Changes since v1:
> - synced patch series with next-20131220
> - added ACKs from Daniel Lezcano
This series breaks boot on one of my test machines with intel_idle, so I'm
not sure how well it has been tested.
I've dropped it entirely for now. If I have the time, I will try to identify
the root cause of the failure, but that may not happen before the merge window.
Sorry about that.
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR
From: Sergei Shtylyov @ 2014-01-11 1:27 UTC (permalink / raw)
To: Alistair Popple, benh; +Cc: linuxppc-dev, linux-usb, Greg KH
In-Reply-To: <1385086116-10972-4-git-send-email-alistair@popple.id.au>
Hello.
On 11/22/2013 05:08 AM, Alistair Popple wrote:
> The IBM Akebono board uses the PPC476GTR SoC which has a OHCI
> compliant USB host interface. This patch adds support for it to the
> OHCI platform driver.
> As we use device tree to pass platform specific data instead of
> platform data we remove the check for platform data and instead
> provide reasonable defaults if no platform data is present. This is
> similar to what is currently done in ehci-platform.c.
>
> Signed-off-by: Alistair Popple <alistair@popple.id.au>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Cc: linux-usb@vger.kernel.org
Greg, why this patch hasn't been merged? Because it wasn't addressed to
you (but BenH)? The other, ehci-platform.c patch didn't even get posted to
linux-usb that time, but this one?
WBR, Sergei
^ permalink raw reply
* Pull request: scottwood/linux.git
From: Scott Wood @ 2014-01-11 0:44 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
Highlights include 32-bit booke relocatable support, e6500 hardware
tablewalk support, various e500 SPE fixes, some new/revived boards, and
e6500 deeper idle and altivec powerdown modes.
The following changes since commit dece8ada993e1764a115bdff0f1effffaa5fc8dc:
Merge branch 'merge' into next (2013-12-30 15:19:31 +1100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git next
for you to fetch changes up to d064f30e5063ec54ab50af08c64fb5055e759bfd:
powerpc/fsl_pci: add versionless pci compatible (2014-01-10 17:38:56 -0600)
----------------------------------------------------------------
Anton Blanchard (1):
drivers/tty: ehv_bytechan fails to build as a module
Christian Engelmayer (1):
powerpc/sysdev: Fix a pci section mismatch for Book E
Diana Craciun (1):
powerpc: Replaced tlbilx with tlbwe in the initialization code
Joseph Myers (6):
powerpc: fix exception clearing in e500 SPE float emulation
powerpc: fix e500 SPE float rounding inexactness detection
math-emu: fix floating-point to integer unsigned saturation
math-emu: fix floating-point to integer overflow detection
powerpc: fix e500 SPE float to integer and fixed-point conversions
powerpc: fix e500 SPE float SIGFPE generation
Kevin Hao (11):
powerpc/85xx: don't init the mpic ipi for the SoC which has doorbell support
powerpc/fsl_booke: protect the access to MAS7
powerpc/fsl_booke: introduce get_phys_addr function
powerpc: introduce macro LOAD_REG_ADDR_PIC
powerpc: enable the relocatable support for the fsl booke 32bit kernel
powerpc/fsl_booke: set the tlb entry for the kernel address in AS1
powerpc: introduce early_get_first_memblock_info
powerpc/fsl_booke: introduce map_mem_in_cams_addr
powerpc/fsl_booke: make sure PAGE_OFFSET map to memstart_addr for relocatable kernel
powerpc/fsl_booke: smp support for booting a relocatable kernel above 64M
powerpc/fsl_booke: enable the relocatable for the kdump kernel
LEROY Christophe (1):
powerpc 8xx: defconfig: slice by 4 is more efficient than the default slice by 8 on Powerpc 8xx.
Lijun Pan (1):
powerpc/85xx: Merge 85xx/p1023_defconfig into mpc85xx_smp and mpc85xx
Mihai Caraman (1):
powerpc/booke64: Add LRAT error exception handler
Paul Gortmaker (1):
powerpc: fix 8xx and 6xx final link failures
Scott Wood (5):
powerpc/fsl-booke: Use SPRN_SPRGn rather than mfsprg/mtsprg
powerpc: add barrier after writing kernel PTE
powerpc/e6500: TLB miss handler with hardware tablewalk support
powerpc/fsl-book3e-64: Use paca for hugetlb TLB1 entry selection
powerpc/booke-64: fix tlbsrx. path in bolted tlb handler
Shaohui Xie (1):
powerpc/85xx: handle the eLBC error interrupt if it exists in dts
Shengzhou Liu (2):
powerpc/85xx/dts: add third elo3 dma component
powerpc/fsl_pci: add versionless pci compatible
Stephen Chivers (1):
powerpc/embedded6xx: Add support for Motorola/Emerson MVME5100
Wang Dongsheng (9):
powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define
powerpc/85xx: add hardware automatically enter altivec idle state
powerpc/85xx: add hardware automatically enter pw20 state
powerpc/85xx: add sysfs for pw20 state and altivec idle
powerpc/p1022ds: fix rtc compatible string
powerpc/p1022ds: add a interrupt for rtc node
powerpc/mpic_timer: fix the time is not accurate caused by GTCRR toggle bit
powerpc/mpic_timer: fix convert ticks to time subtraction overflow
powerpc/dts: fix lbc lack of error interrupt
Xie Xiaobo (2):
powerpc/85xx: Add QE common init function
powerpc/85xx: Add TWR-P1025 board support
Zhao Qiang (3):
powerpc/p1010rdb:update dts to adapt to both old and new p1010rdb
powerpc/p1010rdb:update mtd of nand to adapt to both old and new p1010rdb
powerpc/p1010rdb-pa: modify phy interrupt.
.../devicetree/bindings/video/ssd1289fb.txt | 13 +
arch/powerpc/Kconfig | 5 +-
arch/powerpc/boot/Makefile | 7 +-
arch/powerpc/boot/dts/fsl/elo3-dma-2.dtsi | 82 ++++++
arch/powerpc/boot/dts/fsl/p1020si-post.dtsi | 3 +-
arch/powerpc/boot/dts/fsl/p1021si-post.dtsi | 3 +-
arch/powerpc/boot/dts/fsl/p1022si-post.dtsi | 3 +-
arch/powerpc/boot/dts/fsl/p1023si-post.dtsi | 3 +-
arch/powerpc/boot/dts/mvme5100.dts | 185 ++++++++++++
arch/powerpc/boot/dts/p1010rdb-pa.dts | 23 ++
arch/powerpc/boot/dts/p1010rdb-pa.dtsi | 85 ++++++
.../dts/{p1010rdb_36b.dts => p1010rdb-pa_36b.dts} | 47 +--
arch/powerpc/boot/dts/p1010rdb-pb.dts | 35 +++
arch/powerpc/boot/dts/p1010rdb-pb_36b.dts | 58 ++++
arch/powerpc/boot/dts/p1010rdb.dts | 66 -----
arch/powerpc/boot/dts/p1010rdb.dtsi | 43 +--
arch/powerpc/boot/dts/p1010rdb_32b.dtsi | 79 ++++++
arch/powerpc/boot/dts/p1010rdb_36b.dtsi | 79 ++++++
arch/powerpc/boot/dts/p1022ds.dtsi | 3 +-
arch/powerpc/boot/dts/p1025twr.dts | 95 +++++++
arch/powerpc/boot/dts/p1025twr.dtsi | 280 ++++++++++++++++++
arch/powerpc/boot/mvme5100.c | 27 ++
arch/powerpc/boot/wrapper | 4 +
arch/powerpc/configs/85xx/p1023_defconfig | 188 ------------
arch/powerpc/configs/adder875_defconfig | 1 +
arch/powerpc/configs/ep88xc_defconfig | 1 +
arch/powerpc/configs/mpc85xx_defconfig | 3 +
arch/powerpc/configs/mpc85xx_smp_defconfig | 3 +
arch/powerpc/configs/mpc866_ads_defconfig | 1 +
arch/powerpc/configs/mpc885_ads_defconfig | 1 +
arch/powerpc/configs/mvme5100_defconfig | 144 ++++++++++
arch/powerpc/configs/tqm8xx_defconfig | 1 +
arch/powerpc/include/asm/fsl_lbc.h | 2 +-
arch/powerpc/include/asm/kvm_asm.h | 1 +
arch/powerpc/include/asm/mmu-book3e.h | 13 +
arch/powerpc/include/asm/mmu.h | 21 +-
arch/powerpc/include/asm/paca.h | 6 +
arch/powerpc/include/asm/ppc_asm.h | 13 +
arch/powerpc/include/asm/processor.h | 6 +-
arch/powerpc/include/asm/reg.h | 2 +
arch/powerpc/include/asm/reg_booke.h | 10 +
arch/powerpc/kernel/asm-offsets.c | 9 +
arch/powerpc/kernel/cpu_setup_fsl_booke.S | 54 ++++
arch/powerpc/kernel/exceptions-64e.S | 27 +-
arch/powerpc/kernel/fsl_booke_entry_mapping.S | 2 +
arch/powerpc/kernel/head_fsl_booke.S | 266 +++++++++++++++--
arch/powerpc/kernel/paca.c | 5 +
arch/powerpc/kernel/process.c | 30 +-
arch/powerpc/kernel/prom.c | 41 ++-
arch/powerpc/kernel/setup_64.c | 31 ++
arch/powerpc/kernel/swsusp_booke.S | 32 +--
arch/powerpc/kernel/sysfs.c | 316 +++++++++++++++++++++
arch/powerpc/kvm/bookehv_interrupts.S | 2 +
arch/powerpc/math-emu/math_efp.c | 316 ++++++++++++++++-----
arch/powerpc/mm/fsl_booke_mmu.c | 80 +++++-
arch/powerpc/mm/hugetlbpage-book3e.c | 54 +++-
arch/powerpc/mm/mem.c | 6 +
arch/powerpc/mm/mmu_decl.h | 2 +
arch/powerpc/mm/pgtable_32.c | 1 +
arch/powerpc/mm/pgtable_64.c | 12 +
arch/powerpc/mm/tlb_low_64e.S | 174 +++++++++++-
arch/powerpc/mm/tlb_nohash.c | 93 ++++--
arch/powerpc/mm/tlb_nohash_low.S | 4 +-
arch/powerpc/platforms/85xx/Kconfig | 6 +
arch/powerpc/platforms/85xx/Makefile | 1 +
arch/powerpc/platforms/85xx/common.c | 38 +++
arch/powerpc/platforms/85xx/mpc85xx.h | 6 +
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 29 +-
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 25 +-
arch/powerpc/platforms/85xx/smp.c | 17 +-
arch/powerpc/platforms/85xx/twr_p102x.c | 147 ++++++++++
arch/powerpc/platforms/embedded6xx/Kconfig | 13 +-
arch/powerpc/platforms/embedded6xx/Makefile | 1 +
arch/powerpc/platforms/embedded6xx/mvme5100.c | 221 ++++++++++++++
arch/powerpc/sysdev/fsl_lbc.c | 31 +-
arch/powerpc/sysdev/fsl_pci.c | 3 +-
arch/powerpc/sysdev/indirect_pci.c | 6 +-
arch/powerpc/sysdev/mpic_timer.c | 10 +-
drivers/tty/Kconfig | 2 +-
include/linux/of_fdt.h | 1 +
include/math-emu/op-common.h | 9 +-
81 files changed, 3154 insertions(+), 614 deletions(-)
create mode 100644 Documentation/devicetree/bindings/video/ssd1289fb.txt
create mode 100644 arch/powerpc/boot/dts/fsl/elo3-dma-2.dtsi
create mode 100644 arch/powerpc/boot/dts/mvme5100.dts
create mode 100644 arch/powerpc/boot/dts/p1010rdb-pa.dts
create mode 100644 arch/powerpc/boot/dts/p1010rdb-pa.dtsi
rename arch/powerpc/boot/dts/{p1010rdb_36b.dts => p1010rdb-pa_36b.dts} (64%)
create mode 100644 arch/powerpc/boot/dts/p1010rdb-pb.dts
create mode 100644 arch/powerpc/boot/dts/p1010rdb-pb_36b.dts
delete mode 100644 arch/powerpc/boot/dts/p1010rdb.dts
create mode 100644 arch/powerpc/boot/dts/p1010rdb_32b.dtsi
create mode 100644 arch/powerpc/boot/dts/p1010rdb_36b.dtsi
create mode 100644 arch/powerpc/boot/dts/p1025twr.dts
create mode 100644 arch/powerpc/boot/dts/p1025twr.dtsi
create mode 100644 arch/powerpc/boot/mvme5100.c
delete mode 100644 arch/powerpc/configs/85xx/p1023_defconfig
create mode 100644 arch/powerpc/configs/mvme5100_defconfig
create mode 100644 arch/powerpc/platforms/85xx/twr_p102x.c
create mode 100644 arch/powerpc/platforms/embedded6xx/mvme5100.c
^ permalink raw reply
* Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR
From: Greg KH @ 2014-01-11 0:52 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-dev, Alistair Popple, linux-usb
In-Reply-To: <52D09E19.9030302@cogentembedded.com>
On Sat, Jan 11, 2014 at 04:27:53AM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 11/22/2013 05:08 AM, Alistair Popple wrote:
>
> >The IBM Akebono board uses the PPC476GTR SoC which has a OHCI
> >compliant USB host interface. This patch adds support for it to the
> >OHCI platform driver.
>
> >As we use device tree to pass platform specific data instead of
> >platform data we remove the check for platform data and instead
> >provide reasonable defaults if no platform data is present. This is
> >similar to what is currently done in ehci-platform.c.
> >
> >Signed-off-by: Alistair Popple <alistair@popple.id.au>
> >Acked-by: Alan Stern <stern@rowland.harvard.edu>
> >Cc: linux-usb@vger.kernel.org
>
> Greg, why this patch hasn't been merged? Because it wasn't addressed to
> you (but BenH)? The other, ehci-platform.c patch didn't even get posted to
> linux-usb that time, but this one?
Probably, yes, if it's not sent to me, I'm guessing that the person
doesn't want it applied by me, especially if it's written by someone who
knows what they are doing.
I thought this was going through the PPC tree. My USB patch queue is
empty, and closed, for 3.14-rc1.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR
From: Benjamin Herrenschmidt @ 2014-01-11 1:06 UTC (permalink / raw)
To: Greg KH; +Cc: Alistair Popple, linux-usb, Sergei Shtylyov, linuxppc-dev
In-Reply-To: <20140111005256.GB29302@kroah.com>
On Fri, 2014-01-10 at 16:52 -0800, Greg KH wrote:
> > >Signed-off-by: Alistair Popple <alistair@popple.id.au>
> > >Acked-by: Alan Stern <stern@rowland.harvard.edu>
> > >Cc: linux-usb@vger.kernel.org
> >
> > Greg, why this patch hasn't been merged? Because it wasn't addressed to
> > you (but BenH)? The other, ehci-platform.c patch didn't even get posted to
> > linux-usb that time, but this one?
>
> Probably, yes, if it's not sent to me, I'm guessing that the person
> doesn't want it applied by me, especially if it's written by someone who
> knows what they are doing.
>
> I thought this was going through the PPC tree. My USB patch queue is
> empty, and closed, for 3.14-rc1.
Communication failure then :-) I told Alistair to submit it to the USB
tree and thus was expecting it to be picked up by you but I didn't pay
that much attention. I'll see if I can still put it into my tree based
on invasiveness when I'm finished with travel. Otherwise, it will wait
for the next window.
Ben.
^ permalink raw reply
* [PATCH 2/3] powerpc/eeh: Hotplug improvement
From: Gavin Shan @ 2014-01-12 6:13 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Gavin Shan
In-Reply-To: <1389507226-32002-1-git-send-email-shangw@linux.vnet.ibm.com>
When EEH error comes to one specific PCI device before its driver
is loaded, we will apply hotplug to recover the error. During the
plug time, the PCI device will be probed and its driver is loaded.
Then we wrongly calls to the error handlers if the driver supports
EEH explicitly.
The patch intends to fix by introducing flag EEH_DEV_NO_HANDLER and
set it before we remove the PCI device. In turn, we can avoid wrongly
calls the error handlers of the PCI device after its driver loaded.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/eeh.h | 3 ++-
arch/powerpc/kernel/eeh.c | 15 +++++++++++++++
arch/powerpc/kernel/eeh_driver.c | 10 +++++++---
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index e37db7f..8e31dad 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -90,7 +90,8 @@ struct eeh_pe {
#define EEH_DEV_IRQ_DISABLED (1 << 3) /* Interrupt disabled */
#define EEH_DEV_DISCONNECTED (1 << 4) /* Removing from PE */
-#define EEH_DEV_SYSFS (1 << 8) /* Sysfs created */
+#define EEH_DEV_NO_HANDLER (1 << 8) /* No error handler */
+#define EEH_DEV_SYSFS (1 << 9) /* Sysfs created */
struct eeh_dev {
int mode; /* EEH mode */
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 4bd687d..6a118db 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -921,6 +921,13 @@ void eeh_add_device_late(struct pci_dev *dev)
eeh_sysfs_remove_device(edev->pdev);
edev->mode &= ~EEH_DEV_SYSFS;
+ /*
+ * We definitely should have the PCI device removed
+ * though it wasn't correctly. So we needn't call
+ * into error handler afterwards.
+ */
+ edev->mode |= EEH_DEV_NO_HANDLER;
+
edev->pdev = NULL;
dev->dev.archdata.edev = NULL;
}
@@ -1023,6 +1030,14 @@ void eeh_remove_device(struct pci_dev *dev)
else
edev->mode |= EEH_DEV_DISCONNECTED;
+ /*
+ * We're removing from the PCI subsystem, that means
+ * the PCI device driver can't support EEH or not
+ * well. So we rely on hotplug completely to do recovery
+ * for the specific PCI device.
+ */
+ edev->mode |= EEH_DEV_NO_HANDLER;
+
eeh_addr_cache_rmv_dev(dev);
eeh_sysfs_remove_device(dev);
edev->mode &= ~EEH_DEV_SYSFS;
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index c1e8bb9..fe102c3 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -217,7 +217,8 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata)
if (!driver) return NULL;
if (!driver->err_handler ||
- !driver->err_handler->mmio_enabled) {
+ !driver->err_handler->mmio_enabled ||
+ (edev->mode & EEH_DEV_NO_HANDLER)) {
eeh_pcid_put(dev);
return NULL;
}
@@ -258,7 +259,8 @@ static void *eeh_report_reset(void *data, void *userdata)
eeh_enable_irq(dev);
if (!driver->err_handler ||
- !driver->err_handler->slot_reset) {
+ !driver->err_handler->slot_reset ||
+ (edev->mode & EEH_DEV_NO_HANDLER)) {
eeh_pcid_put(dev);
return NULL;
}
@@ -297,7 +299,9 @@ static void *eeh_report_resume(void *data, void *userdata)
eeh_enable_irq(dev);
if (!driver->err_handler ||
- !driver->err_handler->resume) {
+ !driver->err_handler->resume ||
+ (edev->mode & EEH_DEV_NO_HANDLER)) {
+ edev->mode &= ~EEH_DEV_NO_HANDLER;
eeh_pcid_put(dev);
return NULL;
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 1/3] powerpc/eeh: Handle multiple EEH errors
From: Gavin Shan @ 2014-01-12 6:13 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Gavin Shan
For one PCI error relevant OPAL event, we possibly have multiple
EEH errors for that. For example, multiple frozen PEs detected on
different PHBs. Unfortunately, we didn't cover the case. The patch
enumarates the return value from eeh_ops::next_error() and change
eeh_handle_special_event() and eeh_ops::next_error() to handle all
existing EEH errors.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/eeh.h | 10 ++
arch/powerpc/kernel/eeh_driver.c | 144 ++++++++++++++---------------
arch/powerpc/platforms/powernv/eeh-ioda.c | 31 ++++---
3 files changed, 102 insertions(+), 83 deletions(-)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index d3e5e9b..e37db7f 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -117,6 +117,16 @@ static inline struct pci_dev *eeh_dev_to_pci_dev(struct eeh_dev *edev)
return edev ? edev->pdev : NULL;
}
+/* Return values from eeh_ops::next_error */
+enum {
+ EEH_NEXT_ERR_NONE = 0,
+ EEH_NEXT_ERR_INF,
+ EEH_NEXT_ERR_FROZEN_PE,
+ EEH_NEXT_ERR_FENCED_PHB,
+ EEH_NEXT_ERR_DEAD_PHB,
+ EEH_NEXT_ERR_DEAD_IOC
+};
+
/*
* The struct is used to trace the registered EEH operation
* callback functions. Actually, those operation callback
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 36bed5a..c1e8bb9 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -628,82 +628,82 @@ static void eeh_handle_special_event(void)
struct pci_bus *bus;
struct pci_controller *hose, *tmp;
unsigned long flags;
- int rc = 0;
-
- /*
- * The return value from next_error() has been classified as follows.
- * It might be good to enumerate them. However, next_error() is only
- * supported by PowerNV platform for now. So it would be fine to use
- * integer directly:
- *
- * 4 - Dead IOC 3 - Dead PHB
- * 2 - Fenced PHB 1 - Frozen PE
- * 0 - No error found
- *
- */
- rc = eeh_ops->next_error(&pe);
- if (rc <= 0)
- return;
+ int rc;
+
+
+ do {
+ rc = eeh_ops->next_error(&pe);
+
+ switch (rc) {
+ case EEH_NEXT_ERR_DEAD_IOC:
+ /* Mark all PHBs in dead state */
+ eeh_serialize_lock(&flags);
+ list_for_each_entry_safe(hose, tmp,
+ &hose_list, list_node) {
+ phb_pe = eeh_phb_pe_get(hose);
+ if (!phb_pe) continue;
+
+ eeh_pe_state_mark(phb_pe,
+ EEH_PE_ISOLATED | EEH_PE_PHB_DEAD);
+ }
+ eeh_serialize_unlock(flags);
+
+ /* Purge all events */
+ eeh_remove_event(NULL);
+ break;
+ case EEH_NEXT_ERR_FROZEN_PE:
+ case EEH_NEXT_ERR_FENCED_PHB:
+ case EEH_NEXT_ERR_DEAD_PHB:
+ /* Mark the PE in fenced state */
+ eeh_serialize_lock(&flags);
+ if (rc == EEH_NEXT_ERR_DEAD_PHB)
+ eeh_pe_state_mark(pe,
+ EEH_PE_ISOLATED | EEH_PE_PHB_DEAD);
+ else
+ eeh_pe_state_mark(pe,
+ EEH_PE_ISOLATED | EEH_PE_RECOVERING);
+ eeh_serialize_unlock(flags);
+
+ /* Purge all events of the PHB */
+ eeh_remove_event(pe);
+ break;
+ default:
+ pr_warn("%s: Invalid value %d from next_error()\n",
+ __func__, rc);
+ return;
+ }
- switch (rc) {
- case 4:
- /* Mark all PHBs in dead state */
- eeh_serialize_lock(&flags);
- list_for_each_entry_safe(hose, tmp,
+ /*
+ * For fenced PHB and frozen PE, it's handled as normal
+ * event. We have to remove the affected PHBs for dead
+ * PHB and IOC
+ */
+ if (rc == EEH_NEXT_ERR_FROZEN_PE ||
+ rc == EEH_NEXT_ERR_FENCED_PHB) {
+ eeh_handle_normal_event(pe);
+ } else {
+ list_for_each_entry_safe(hose, tmp,
&hose_list, list_node) {
- phb_pe = eeh_phb_pe_get(hose);
- if (!phb_pe) continue;
-
- eeh_pe_state_mark(phb_pe,
- EEH_PE_ISOLATED | EEH_PE_PHB_DEAD);
+ phb_pe = eeh_phb_pe_get(hose);
+ if (!phb_pe ||
+ !(phb_pe->state & EEH_PE_PHB_DEAD))
+ continue;
+
+ /* Notify all devices to be down */
+ bus = eeh_pe_bus_get(phb_pe);
+ eeh_pe_dev_traverse(pe,
+ eeh_report_failure, NULL);
+ pcibios_remove_pci_devices(bus);
+ }
}
- eeh_serialize_unlock(flags);
-
- /* Purge all events */
- eeh_remove_event(NULL);
- break;
- case 3:
- case 2:
- case 1:
- /* Mark the PE in fenced state */
- eeh_serialize_lock(&flags);
- if (rc == 3)
- eeh_pe_state_mark(pe,
- EEH_PE_ISOLATED | EEH_PE_PHB_DEAD);
- else
- eeh_pe_state_mark(pe,
- EEH_PE_ISOLATED | EEH_PE_RECOVERING);
- eeh_serialize_unlock(flags);
-
- /* Purge all events of the PHB */
- eeh_remove_event(pe);
- break;
- default:
- pr_err("%s: Invalid value %d from next_error()\n",
- __func__, rc);
- return;
- }
- /*
- * For fenced PHB and frozen PE, it's handled as normal
- * event. We have to remove the affected PHBs for dead
- * PHB and IOC
- */
- if (rc == 2 || rc == 1)
- eeh_handle_normal_event(pe);
- else {
- list_for_each_entry_safe(hose, tmp,
- &hose_list, list_node) {
- phb_pe = eeh_phb_pe_get(hose);
- if (!phb_pe || !(phb_pe->state & EEH_PE_PHB_DEAD))
- continue;
-
- bus = eeh_pe_bus_get(phb_pe);
- /* Notify all devices that they're about to go down. */
- eeh_pe_dev_traverse(pe, eeh_report_failure, NULL);
- pcibios_remove_pci_devices(bus);
- }
- }
+ /*
+ * If we have detected dead IOC, we needn't proceed
+ * any more since all PHBs would have been removed
+ */
+ if (rc == EEH_NEXT_ERR_DEAD_IOC)
+ break;
+ } while (rc != EEH_NEXT_ERR_NONE);
}
/**
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index d7ddcee..6971146 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -889,7 +889,7 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
u64 frozen_pe_no;
u16 err_type, severity;
long rc;
- int ret = 1;
+ int ret = EEH_NEXT_ERR_NONE;
/*
* While running here, it's safe to purge the event queue.
@@ -945,12 +945,12 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
}
pr_err("EEH: dead IOC detected\n");
- ret = 4;
- goto out;
+ ret = EEH_NEXT_ERR_DEAD_IOC;
} else if (severity == OPAL_EEH_SEV_INF) {
pr_info("EEH: IOC informative error "
"detected\n");
ioda_eeh_hub_diag(hose);
+ ret = EEH_NEXT_ERR_INF;
}
break;
@@ -962,21 +962,20 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
pr_err("EEH: dead PHB#%x detected\n",
hose->global_number);
phb->eeh_state |= PNV_EEH_STATE_REMOVED;
- ret = 3;
- goto out;
+ ret = EEH_NEXT_ERR_DEAD_PHB;
} else if (severity == OPAL_EEH_SEV_PHB_FENCED) {
if (ioda_eeh_get_phb_pe(hose, pe))
break;
pr_err("EEH: fenced PHB#%x detected\n",
hose->global_number);
- ret = 2;
- goto out;
+ ret = EEH_NEXT_ERR_FENCED_PHB;
} else if (severity == OPAL_EEH_SEV_INF) {
pr_info("EEH: PHB#%x informative error "
"detected\n",
hose->global_number);
ioda_eeh_phb_diag(hose);
+ ret = EEH_NEXT_ERR_INF;
}
break;
@@ -986,13 +985,23 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
(*pe)->addr, (*pe)->phb->global_number);
- ret = 1;
- goto out;
+ ret = EEH_NEXT_ERR_FROZEN_PE;
+ break;
+ default:
+ pr_warn("%s: Unexpected error type %d\n",
+ __func__, err_type);
}
+
+ /*
+ * If we have no errors on the specific PHB or only
+ * informative error there, we continue poking it.
+ * Otherwise, we need actions to be taken by upper
+ * layer.
+ */
+ if (ret > EEH_NEXT_ERR_INF)
+ break;
}
- ret = 0;
-out:
return ret;
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/3] powerpc/eeh: Escalate error on non-existing PE
From: Gavin Shan @ 2014-01-12 6:13 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Gavin Shan
In-Reply-To: <1389507226-32002-1-git-send-email-shangw@linux.vnet.ibm.com>
Sometimes, especially in sinario of loading another kernel with kdump,
we got EEH error on non-existing PE. That means the PEEV / PEST in
the corresponding PHB would be messy and we can't handle that case.
The patch escalates the error to fenced PHB so that the PHB could be
rested in order to revoer the errors on non-existing PEs.
Reported-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Tested-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/eeh-ioda.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 6971146..0bf6b2b 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -980,12 +980,26 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
break;
case OPAL_EEH_PE_ERROR:
- if (ioda_eeh_get_pe(hose, frozen_pe_no, pe))
- break;
+ /*
+ * If we can't find the corresponding PE, the
+ * PEEV / PEST would be messy. So we force an
+ * fenced PHB so that it can be recovered.
+ */
+ if (ioda_eeh_get_pe(hose, frozen_pe_no, pe)) {
+ if (!ioda_eeh_get_phb_pe(hose, pe)) {
+ ret = EEH_NEXT_ERR_FENCED_PHB;
+ pr_err("EEH: Escalated fenced PHB#%x "
+ "detected\n",
+ hose->global_number);
+ } else {
+ ret = EEH_NEXT_ERR_NONE;
+ }
+ } else {
+ pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
+ (*pe)->addr, (*pe)->phb->global_number);
+ ret = EEH_NEXT_ERR_FROZEN_PE;
+ }
- pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
- (*pe)->addr, (*pe)->phb->global_number);
- ret = EEH_NEXT_ERR_FROZEN_PE;
break;
default:
pr_warn("%s: Unexpected error type %d\n",
--
1.7.10.4
^ permalink raw reply related
* [PATCH mmotm/next] powerpc: fix powernv boot breakage on G5???
From: Hugh Dickins @ 2014-01-12 8:46 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Mahesh Salgaonkar, linuxppc-dev
My PowerMac G5 cannot boot mmotm these days: different symptoms
(starting /sbin/init failed? or ATA errors and hang?), with unrelated
bugs adding to the confusion; but a bisection led to b5ff4211a829
"powerpc/book3s: Queue up and process delayed MCE events". Since that
series seems to be mostly about powernv, I tried changing BOOK3S_64
to POWERNV in entry_64.S, which has got it back to working for me.
Signed-off-by: Hugh Dickins <hughd@google.com>
just in case this happens to be right, but it's well beyond me!
---
arch/powerpc/kernel/entry_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- mmotm/arch/powerpc/kernel/entry_64.S 2014-01-10 18:24:56.940448828 -0800
+++ linux/arch/powerpc/kernel/entry_64.S 2014-01-10 18:29:24.276455182 -0800
@@ -184,7 +184,7 @@ syscall_exit:
bl .do_show_syscall_exit
ld r3,RESULT(r1)
#endif
-#ifdef CONFIG_PPC_BOOK3S_64
+#ifdef CONFIG_PPC_POWERNV
BEGIN_FTR_SECTION
bl .machine_check_process_queued_event
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
^ permalink raw reply
* Re: [PATCH mmotm/next] powerpc: fix powernv boot breakage on G5???
From: Benjamin Herrenschmidt @ 2014-01-12 12:34 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Mahesh Salgaonkar, linuxppc-dev
In-Reply-To: <alpine.LSU.2.11.1401120043210.1092@eggly.anvils>
On Sun, 2014-01-12 at 00:46 -0800, Hugh Dickins wrote:
> My PowerMac G5 cannot boot mmotm these days: different symptoms
> (starting /sbin/init failed? or ATA errors and hang?), with unrelated
> bugs adding to the confusion; but a bisection led to b5ff4211a829
> "powerpc/book3s: Queue up and process delayed MCE events". Since that
> series seems to be mostly about powernv, I tried changing BOOK3S_64
> to POWERNV in entry_64.S, which has got it back to working for me.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
> just in case this happens to be right, but it's well beyond me!
Mahesh, I think that code is broken. It calls into C code after R3 is
loaded which will clobber it, thus clobbering the return from syscalls.
Also, are you really adding that overhead to every syscall in the
system ? That doesn't sound great...
Why do you do something in syscall_exit to begin with anyway ? That
doesn't seen like a great way to process delayed mchecks... When do you
want to process them ? Any interruptible code ? Task level ?
The former, you might be better off just shooting something like a local
doorbell and use some IPI message bit or similar to indicate the
presence of a pending mcheck. The local doorbell will trigger whenever
interrupts are enabled.
Ben.
> ---
>
> arch/powerpc/kernel/entry_64.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- mmotm/arch/powerpc/kernel/entry_64.S 2014-01-10 18:24:56.940448828 -0800
> +++ linux/arch/powerpc/kernel/entry_64.S 2014-01-10 18:29:24.276455182 -0800
> @@ -184,7 +184,7 @@ syscall_exit:
> bl .do_show_syscall_exit
> ld r3,RESULT(r1)
> #endif
> -#ifdef CONFIG_PPC_BOOK3S_64
> +#ifdef CONFIG_PPC_POWERNV
> BEGIN_FTR_SECTION
> bl .machine_check_process_queued_event
> END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
^ permalink raw reply
* Re: [PATCH] PPC: KVM: fix VCPU run for HV KVM
From: Alexander Graf @ 2014-01-12 15:44 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: kvm@vger.kernel.org mailing list, Michael S. Tsirkin,
linux-kernel@vger.kernel.org list, kvm-ppc, Paul Mackerras,
linuxppc-dev
In-Reply-To: <1389338467-26303-1-git-send-email-aik@ozlabs.ru>
On 10.01.2014, at 08:21, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> When write to MMIO happens and there is an ioeventfd for that and
> is handled successfully, ioeventfd_write() returns 0 (success) and
> kvmppc_handle_store() returns EMULATE_DONE. Then kvmppc_emulate_mmio()
> converts EMULATE_DONE to RESUME_GUEST_NV and this broke from the loop.
>=20
> This adds handling of RESUME_GUEST_NV in kvmppc_vcpu_run_hv().
>=20
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Suggested-by: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>=20
> This definitely needs a better commit message. Please, help.
> ps. it seems like ioeventfd never worked on ppc64. hm.
>=20
> ---
> arch/powerpc/kvm/book3s_hv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/arch/powerpc/kvm/book3s_hv.c =
b/arch/powerpc/kvm/book3s_hv.c
> index 072287f..24f363f 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -1569,7 +1569,7 @@ static int kvmppc_vcpu_run_hv(struct kvm_run =
*run, struct kvm_vcpu *vcpu)
> vcpu->arch.fault_dar, =
vcpu->arch.fault_dsisr);
> srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx);
> }
> - } while (r =3D=3D RESUME_GUEST);
> + } while ((r =3D=3D RESUME_GUEST_NV) || (r =3D=3D RESUME_GUEST));
How about
while(!(r & RESUME_FLAG_HOST));
That should cover all RESUME_GUEST_XXX cases just fine. Apart from that =
I agree that we should check for ! FLAG_HOST bit rather than the actual =
RESUME_GUEST value in all case where we check for it (read: please =
update all places).
Alex
^ permalink raw reply
* Re: [PATCH 02/13] ppc/cell: use get_unused_fd_flags(0) instead of get_unused_fd()
From: Benjamin Herrenschmidt @ 2014-01-12 23:06 UTC (permalink / raw)
To: Yann Droneaud; +Cc: cbe-oss-dev, linuxppc-dev, linux-kernel
In-Reply-To: <72f6f9ae898a664033f6b958bc7976b994544963.1372777600.git.ydroneaud@opteya.com>
On Tue, 2013-07-02 at 18:39 +0200, Yann Droneaud wrote:
> Macro get_unused_fd() is used to allocate a file descriptor with
> default flags. Those default flags (0) can be "unsafe":
> O_CLOEXEC must be used by default to not leak file descriptor
> across exec().
>
> Instead of macro get_unused_fd(), functions anon_inode_getfd()
> or get_unused_fd_flags() should be used with flags given by userspace.
> If not possible, flags should be set to O_CLOEXEC to provide userspace
> with a default safe behavor.
>
> In a further patch, get_unused_fd() will be removed so that
> new code start using anon_inode_getfd() or get_unused_fd_flags()
> with correct flags.
>
> This patch replaces calls to get_unused_fd() with equivalent call to
> get_unused_fd_flags(0) to preserve current behavor for existing code.
>
> The hard coded flag value (0) should be reviewed on a per-subsystem basis,
> and, if possible, set to O_CLOEXEC.
>
> Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Should I merge this (v5 on patchwork) or let Al do it ?
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/platforms/cell/spufs/inode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
> index f390042..88df441 100644
> --- a/arch/powerpc/platforms/cell/spufs/inode.c
> +++ b/arch/powerpc/platforms/cell/spufs/inode.c
> @@ -301,7 +301,7 @@ static int spufs_context_open(struct path *path)
> int ret;
> struct file *filp;
>
> - ret = get_unused_fd();
> + ret = get_unused_fd_flags(0);
> if (ret < 0)
> return ret;
>
> @@ -518,7 +518,7 @@ static int spufs_gang_open(struct path *path)
> int ret;
> struct file *filp;
>
> - ret = get_unused_fd();
> + ret = get_unused_fd_flags(0);
> if (ret < 0)
> return ret;
>
^ permalink raw reply
* Re: [PATCH v2] powerpc/booke-64: fix tlbsrx. path in bolted tlb handler
From: Benjamin Herrenschmidt @ 2014-01-12 23:27 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <1389396656-27813-1-git-send-email-scottwood@freescale.com>
On Fri, 2014-01-10 at 17:30 -0600, Scott Wood wrote:
> From: Scott Wood <scott@tyr.buserror.net>
>
> It was branching to the cleanup part of the non-bolted handler,
> which would have been bad if there were any chips with tlbsrx.
> that use the bolted handler.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> v2: rebase
Ack.
> arch/powerpc/mm/tlb_low_64e.S | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S
> index 75f5d27..16250b1 100644
> --- a/arch/powerpc/mm/tlb_low_64e.S
> +++ b/arch/powerpc/mm/tlb_low_64e.S
> @@ -136,7 +136,7 @@ BEGIN_MMU_FTR_SECTION
> */
> PPC_TLBSRX_DOT(0,R16)
> ldx r14,r14,r15 /* grab pgd entry */
> - beq normal_tlb_miss_done /* tlb exists already, bail */
> + beq tlb_miss_done_bolted /* tlb exists already, bail */
> MMU_FTR_SECTION_ELSE
> ldx r14,r14,r15 /* grab pgd entry */
> ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBRSRV)
> @@ -192,6 +192,7 @@ ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBRSRV)
> mtspr SPRN_MAS7_MAS3,r15
> tlbwe
>
> +tlb_miss_done_bolted:
> TLB_MISS_STATS_X(MMSTAT_TLB_MISS_NORM_OK)
> tlb_epilog_bolted
> rfi
^ permalink raw reply
* Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR
From: Alistair Popple @ 2014-01-12 23:54 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Greg KH, linux-usb, Sergei Shtylyov, linuxppc-dev
In-Reply-To: <1389402392.4672.87.camel@pasglop>
On Sat, 11 Jan 2014 12:06:32 Benjamin Herrenschmidt wrote:
> On Fri, 2014-01-10 at 16:52 -0800, Greg KH wrote:
> > > >Signed-off-by: Alistair Popple <alistair@popple.id.au>
> > > >Acked-by: Alan Stern <stern@rowland.harvard.edu>
> > > >Cc: linux-usb@vger.kernel.org
> > > >
> > > Greg, why this patch hasn't been merged? Because it wasn't addressed
> > > to
> > >
> > > you (but BenH)? The other, ehci-platform.c patch didn't even get posted
> > > to
> > > linux-usb that time, but this one?
> >
> > Probably, yes, if it's not sent to me, I'm guessing that the person
> > doesn't want it applied by me, especially if it's written by someone who
> > knows what they are doing.
> >
> > I thought this was going through the PPC tree. My USB patch queue is
> > empty, and closed, for 3.14-rc1.
>
> Communication failure then :-) I told Alistair to submit it to the USB
> tree and thus was expecting it to be picked up by you but I didn't pay
> that much attention. I'll see if I can still put it into my tree based
> on invasiveness when I'm finished with travel. Otherwise, it will wait
> for the next window.
Sorry - this is probably my fault. I originally thought they would go via the
PPC tree but as Ben said he asked me to resubmit them to the appropriate
subsystem trees (which I forgot to do). Unless Ben picks them up I will
resubmit them for the next window.
- Alistair
> Ben.
^ permalink raw reply
* Re: [PATCH -V3 1/2] powerpc: mm: Move ppc64 page table range definitions to separate header
From: Benjamin Herrenschmidt @ 2014-01-12 22:46 UTC (permalink / raw)
To: Aneesh Kumar K.V
Cc: aarcange, linuxppc-dev, paulus, kirill.shutemov, linux-mm
In-Reply-To: <87mwj8wn3e.fsf@linux.vnet.ibm.com>
On Tue, 2014-01-07 at 07:49 +0530, Aneesh Kumar K.V wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > On Mon, 2014-01-06 at 14:33 +0530, Aneesh Kumar K.V wrote:
> >> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> >>
> >> This avoid mmu-hash64.h including pagetable-ppc64.h. That inclusion
> >> cause issues like
> >
> > I don't like this. We have that stuff split into too many includes
> > already it's a mess.
>
> I understand. Let me know, if you have any suggestion on cleaning that
> up. I can do that.
>
> >
> > Why do we need to include it from mmu*.h ?
>
> in mmu-hash64.h added by me via 78f1dbde9fd020419313c2a0c3b602ea2427118f
>
> /*
> * This is necessary to get the definition of PGTABLE_RANGE which we
> * need for various slices related matters. Note that this isn't the
> * complete pgtable.h but only a portion of it.
> */
> #include <asm/pgtable-ppc64.h>
For now, instead, just do fwd def of the spinlock, I don't like the
inclusion of spinlock.h there anyway.
Cheers,
Ben,
^ permalink raw reply
* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2014-01-13 1:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev, Linux Kernel list
Hi Linus !
Here's one regression fix for 3.13 that I would appreciate if you could still
pull in. It was an "interesting" one to debug, basically it's an old bug that
got somewhat "exposed" by new code breaking the boot on PA Semi boards (yes,
it does appear that some people are still using these !).
Cheers,
Ben.
The following changes since commit f991db1cf1bdca43675b5d2df0af991719727029:
Merge remote-tracking branch 'agust/merge' into merge (2013-12-30 14:48:27 +1100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge
for you to fetch changes up to 10348f5976830e5d8f74e8abb04a9a057a5e8478:
powerpc: Check return value of instance-to-package OF call (2014-01-13 09:49:17 +1100)
----------------------------------------------------------------
Benjamin Herrenschmidt (1):
powerpc: Check return value of instance-to-package OF call
arch/powerpc/kernel/prom_init.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
^ permalink raw reply
* RE: [PATCH v8] clk: corenet: Adds the clock binding
From: Yuantian Tang @ 2014-01-13 2:40 UTC (permalink / raw)
To: Scott Wood
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1389385170.24905.19.camel@snotra.buserror.net>
VGhhbmtzIGZvciB5b3VyIHJldmlldy4NCg0KVGhhbmtzLA0KWXVhbnRpYW4NCg0KPiAtLS0tLU9y
aWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBXb29kIFNjb3R0LUIwNzQyMQ0KPiBTZW50OiAy
MDE05bm0MeaciDEx5pelIOaYn+acn+WFrSA0OjIwDQo+IFRvOiBUYW5nIFl1YW50aWFuLUIyOTk4
Mw0KPiBDYzogV29vZCBTY290dC1CMDc0MjE7IGdhbGFrQGtlcm5lbC5jcmFzaGluZy5vcmc7IG1h
cmsucnV0bGFuZEBhcm0uY29tOw0KPiBkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZzsgbGludXhw
cGMtZGV2QGxpc3RzLm96bGFicy5vcmc7IExpIFlhbmctTGVvLQ0KPiBSNTg0NzINCj4gU3ViamVj
dDogUmU6IFtQQVRDSCB2OF0gY2xrOiBjb3JlbmV0OiBBZGRzIHRoZSBjbG9jayBiaW5kaW5nDQo+
IA0KPiBPbiBGcmksIDIwMTQtMDEtMTAgYXQgMTA6MjkgKzA4MDAsIFRhbmcgWXVhbnRpYW4gd3Jv
dGU6DQo+ID4gKy0gcmVnOiBPZmZzZXQgYW5kIGxlbmd0aCBvZiB0aGUgY2xvY2sgcmVnaXN0ZXIg
c2V0DQo+IA0KPiAib2Zmc2V0IiBpbnRvIHdoYXQ/ICBUaGUgY29udGFpbmluZyBub2RlIGlzIG5v
dCB3aXRoaW4gdGhlIHNjb3BlIG9mIHRoaXMNCj4gYmluZGluZy4NCj4gDQo+IEkga25vdyB0aGF0
IHBsZW50eSBvZiBvdGhlciBiaW5kaW5ncyBhcmUgd29yZGVkIHRoaXMgd2F5LCBhbmQgSSB3b3Vs
ZG4ndA0KPiBob2xkIHVwIGFjY2VwdGFuY2UgaWYgdGhpcyB3ZXJlIHRoZSBvbmx5IGlzc3VlLCBi
dXQgaXQgb3VnaHQgdG8gYmUgZml4ZWQNCj4gdG8gc2F5IHNvbWV0aGluZyBsaWtlICJyZWc6IHJl
c291cmNlIHplcm8gcmVwcmVzZW50cyB0aGUgY2xvY2sgcmVnaXN0ZXINCj4gc2V0Ii4NCj4gDQpP
Sywgd2lsbCByZWZpbmUgaXQuDQoNCj4gPiArUmVjb21tZW5kZWQgcHJvcGVydGllczoNCj4gPiAr
LSBjbG9jay1mcmVxdWVuY3k6IElucHV0IHN5c3RlbSBjbG9jayBmcmVxdWVuY3kuIE11c3QgYmUg
cHJlc2VudA0KPiA+ICsJaWYgdGhlIGRldmljZSBoYXMgc3ViLW5vZGVzLg0KPiANCj4gV2h5IG9u
bHkgImlmIHRoZSBkZXZpY2UgaGFzIHN1Yi1ub2RlcyI/DQo+IA0KT0ssIHdpbGwgZml4IGl0Lg0K
DQo+ID4gKyAgICAgICAqICJmc2wscW9yaXEtc3lzY2xrLTEuMCI6IGZvciBpbnB1dCBzeXN0ZW0g
Y2xvY2sgKHYxLjApLg0KPiA+ICsgICAgICAgICAgICAgICBJdCB0YWtlcyBwYXJlbnQncyBjbG9j
ayBhcyBpdHMgY2xvY2suDQo+ID4gKyAgICAgICAqICJmc2wscW9yaXEtc3lzY2xrLTIuMCI6IGZv
ciBpbnB1dCBzeXN0ZW0gY2xvY2sgKHYyLjApLg0KPiA+ICsgICAgICAgICAgICAgICBJdCB0YWtl
cyBwYXJlbnQncyBjbG9jayBhcyBpdHMgY2xvY2suDQo+IA0KPiBzL3BhcmVudCdzIGNsb2NrL3Bh
cmVudCdzIGNsb2NrLWZyZXF1ZW5jeS8gc2luY2UgdGhlIHBhcmVudCBpc24ndA0KPiBhY3R1YWxs
eSBleHBvc2luZyBhIGNsb2NrIGFzIHBlciB0aGUgY2xvY2sgYmluZGluZ3MuDQo+IA0KT0suDQoN
Cj4gPiArRXhhbXBsZSBmb3IgY2xvY2sgYmxvY2sgYW5kIGNsb2NrIHByb3ZpZGVyOg0KPiA+ICsv
IHsNCj4gPiArCWNsb2NrZ2VuOiBnbG9iYWwtdXRpbGl0aWVzQGUxMDAwIHsNCj4gPiArCQljb21w
YXRpYmxlID0gImZzbCxwNTAyMC1jbG9ja2dlbiIsICJmc2wscW9yaXEtY2xvY2tnZW4tMS4wIjsN
Cj4gPiArCQlyYW5nZXMgPSA8MHgwIDB4ZTEwMDAgMHgxMDAwPjsNCj4gPiArCQljbG9jay1mcmVx
dWVuY3kgPSA8MD47DQo+IA0KPiBJdCdkIGJlIGJldHRlciB0byBzaG93IGEgcmVhbCBjbG9jay1m
cmVxdWVuY3kgaGVyZSAtLSB0aGlzIGlzIGFuIGV4YW1wbGUNCj4gZm9yIHRoZSBub2RlIGFzIHRo
ZSBPUyBzZWVzIGl0LCBub3Qgd2hhdCBnb2VzIGluIHRoZSBkdHMgYXMgYW4gaW5wdXQgdG8NCj4g
VS1Cb290Lg0KPiANCk9LLCB3aWxsIHJlbW92ZSBpdC4NCg0KPiAtU2NvdHQNCj4gDQoNCg==
^ permalink raw reply
* [PATCH] powerpc/iommu: Don't detach device without IOMMU group
From: Gavin Shan @ 2014-01-13 3:36 UTC (permalink / raw)
To: linuxppc-dev; +Cc: aik, Gavin Shan
Some devices, for example PCI root port, don't have IOMMU table and
group. We needn't detach them from their IOMMU group. Otherwise, it
potentially incurs kernel crash because of referring NULL IOMMU group
as following backtrace indicates:
.iommu_group_remove_device+0x74/0x1b0
.iommu_bus_notifier+0x94/0xb4
.notifier_call_chain+0x78/0xe8
.__blocking_notifier_call_chain+0x7c/0xbc
.blocking_notifier_call_chain+0x38/0x48
.device_del+0x50/0x234
.pci_remove_bus_device+0x88/0x138
.pci_stop_and_remove_bus_device+0x2c/0x40
.pcibios_remove_pci_devices+0xcc/0xfc
.pcibios_remove_pci_devices+0x3c/0xfc
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
arch/powerpc/kernel/iommu.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 572bb5b..8a49424 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1137,6 +1137,17 @@ static int iommu_add_device(struct device *dev)
static void iommu_del_device(struct device *dev)
{
+ /*
+ * Some devices might not have IOMMU table and group
+ * and we needn't detach them from the associated
+ * IOMMU groups
+ */
+ if (!dev->iommu_group) {
+ pr_debug("iommu_tce: skipping device %s with no tbl\n",
+ dev_name(dev));
+ return;
+ }
+
iommu_group_remove_device(dev);
}
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] pseries/cpuidle: Remove redundant call to ppc64_runlatch_off() in cpu idle routines
From: Deepthi Dharwar @ 2014-01-13 3:57 UTC (permalink / raw)
To: Preeti U Murthy; +Cc: linuxppc-dev, paulus
In-Reply-To: <20140109050519.11532.6044.stgit@preeti.in.ibm.com>
On 01/09/2014 10:35 AM, Preeti U Murthy wrote:
> Commit fbd7740fdfdf9475f switched pseries cpu idle handling from complete idle
> loops to ppc_md.powersave functions. Earlier to this switch,
> ppc64_runlatch_off() had to be called in each of the idle routines. But after
> the switch this call is handled in arch_cpu_idle(),just before the call
> to ppc_md.powersave, where platform specific idle routines are called.
>
> As a consequence, the call to ppc64_runlatch_off() got duplicated in the
> arch_cpu_idle() routine as well as in the some of the idle routines in
> pseries and commit fbd7740fdfdf9475f missed to get rid of these redundant
> calls. These calls were carried over subsequent enhancements to the pseries
> cpuidle routines. This patch takes care of eliminating this redundancy.
>
> Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
> ---
Acked-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Preeti, I will include this patch as part of the pseries cpuidle driver
clean-ups series which I have undertaken.
Regards,
Deepthi
> arch/powerpc/platforms/pseries/processor_idle.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
> index a166e38..09e4f56 100644
> --- a/arch/powerpc/platforms/pseries/processor_idle.c
> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
> @@ -17,7 +17,6 @@
> #include <asm/reg.h>
> #include <asm/machdep.h>
> #include <asm/firmware.h>
> -#include <asm/runlatch.h>
> #include <asm/plpar_wrappers.h>
>
> struct cpuidle_driver pseries_idle_driver = {
> @@ -63,7 +62,6 @@ static int snooze_loop(struct cpuidle_device *dev,
> set_thread_flag(TIF_POLLING_NRFLAG);
>
> while ((!need_resched()) && cpu_online(cpu)) {
> - ppc64_runlatch_off();
> HMT_low();
> HMT_very_low();
> }
> @@ -103,7 +101,6 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
> idle_loop_prolog(&in_purr);
> get_lppaca()->donate_dedicated_cpu = 1;
>
> - ppc64_runlatch_off();
> HMT_medium();
> check_and_cede_processor();
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: [PATCH] pseries/cpuidle: Remove redundant call to ppc64_runlatch_off() in cpu idle routines
From: Preeti U Murthy @ 2014-01-13 4:22 UTC (permalink / raw)
To: Deepthi Dharwar; +Cc: linuxppc-dev, paulus
In-Reply-To: <52D3640F.2060805@linux.vnet.ibm.com>
Hi Deepthi,
On 01/13/2014 09:27 AM, Deepthi Dharwar wrote:
> On 01/09/2014 10:35 AM, Preeti U Murthy wrote:
>> Commit fbd7740fdfdf9475f switched pseries cpu idle handling from complete idle
>> loops to ppc_md.powersave functions. Earlier to this switch,
>> ppc64_runlatch_off() had to be called in each of the idle routines. But after
>> the switch this call is handled in arch_cpu_idle(),just before the call
>> to ppc_md.powersave, where platform specific idle routines are called.
>>
>> As a consequence, the call to ppc64_runlatch_off() got duplicated in the
>> arch_cpu_idle() routine as well as in the some of the idle routines in
>> pseries and commit fbd7740fdfdf9475f missed to get rid of these redundant
>> calls. These calls were carried over subsequent enhancements to the pseries
>> cpuidle routines. This patch takes care of eliminating this redundancy.
>>
>> Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
>> ---
>
> Acked-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
>
> Preeti, I will include this patch as part of the pseries cpuidle driver
> clean-ups series which I have undertaken.
Yes that would be great, thanks!
Regards
Preeti U Murthy
>
> Regards,
> Deepthi
>
>> arch/powerpc/platforms/pseries/processor_idle.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
>> index a166e38..09e4f56 100644
>> --- a/arch/powerpc/platforms/pseries/processor_idle.c
>> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
>> @@ -17,7 +17,6 @@
>> #include <asm/reg.h>
>> #include <asm/machdep.h>
>> #include <asm/firmware.h>
>> -#include <asm/runlatch.h>
>> #include <asm/plpar_wrappers.h>
>>
>> struct cpuidle_driver pseries_idle_driver = {
>> @@ -63,7 +62,6 @@ static int snooze_loop(struct cpuidle_device *dev,
>> set_thread_flag(TIF_POLLING_NRFLAG);
>>
>> while ((!need_resched()) && cpu_online(cpu)) {
>> - ppc64_runlatch_off();
>> HMT_low();
>> HMT_very_low();
>> }
>> @@ -103,7 +101,6 @@ static int dedicated_cede_loop(struct cpuidle_device *dev,
>> idle_loop_prolog(&in_purr);
>> get_lppaca()->donate_dedicated_cpu = 1;
>>
>> - ppc64_runlatch_off();
>> HMT_medium();
>> check_and_cede_processor();
>>
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>>
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox