* Re: Gianfar TCP checksumming broken in 2.6.35+
From: Alex Dubov @ 2011-01-18 7:56 UTC (permalink / raw)
To: mlcreech; +Cc: linuxppc-dev, davem
It appears that I'm hitting an exactly the same problem with my MPC8548=0Ar=
ev2.0 (errata number eTSEC 49).=0A=0AConsidering that it's close to 3 month=
now since this most unfortunate=0Abug was reported, was there any resoluti=
on/patch that can fix it for good?=0A=0A=0A=0A
^ permalink raw reply
* RE: [PATCH] ATA: Add FSL sata v2 controller support
From: Zang Roy-R61911 @ 2011-01-18 3:01 UTC (permalink / raw)
To: Sergei Shtylyov, Xu Lei-B33228
Cc: jgarzik@pobox.com, Gala Kumar-B11780,
linuxppc-dev@lists.ozlabs.org, linux-ide@vger.kernel.org
In-Reply-To: <4D342C6E.6000608@ru.mvista.com>
> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@mvista.com]
> Sent: Monday, January 17, 2011 19:48 PM
> To: Xu Lei-B33228
> Cc: linuxppc-dev@lists.ozlabs.org; Gala Kumar-B11780; jgarzik@pobox.com;
> linux-ide@vger.kernel.org; Zang Roy-R61911
> Subject: Re: [PATCH] ATA: Add FSL sata v2 controller support
>=20
> Hello.
>=20
> On 17-01-2011 10:10, Xulei wrote:
>=20
> > In FSL sata v2 block, the snoop bit of PRDT Word3 description
> > information is at bit28 instead of bit22.
>=20
> > This patch adds FSL sata v2 probe and resolve this difference.
>=20
> > Signed-off-by: Xulei <B33228@freescale.com>
>=20
[snip]
> > diff --git a/arch/powerpc/boot/dts/p1022ds.dts
> b/arch/powerpc/boot/dts/p1022ds.dts
> > index 2bbecbb..9ad41dd 100644
> > --- a/arch/powerpc/boot/dts/p1022ds.dts
> > +++ b/arch/powerpc/boot/dts/p1022ds.dts
> > @@ -475,14 +475,14 @@
> > };
> >
> > sata@18000 {
> > - compatible =3D "fsl,mpc8536-sata", "fsl,pq-sata";
> > + compatible =3D "fsl,p1022-sata", "fsl,pq-sata-v2";
> > reg =3D<0x18000 0x1000>;
> > cell-index =3D<1>;
> > interrupts =3D<74 0x2>;
> > };
> >
> > sata@19000 {
> > - compatible =3D "fsl,mpc8536-sata", "fsl,pq-sata";
> > + compatible =3D "fsl,p1022-sata", "fsl,pq-sata-v2";
> > reg =3D<0x19000 0x1000>;
> > cell-index =3D<2>;
> > interrupts =3D<41 0x2>;
>=20
> Please put this into the separate patch and push thru the PPC tree.
I agree to put to them to separate patches, but should we=20
pull in the separate patches to one candidate tree to make
the function work?
Thanks.
Roy
^ permalink raw reply
* 2.6.37-git17 virtual IO boot failure
From: Anton Blanchard @ 2011-01-18 1:31 UTC (permalink / raw)
To: nacc; +Cc: linuxppc-dev
Hi,
I was testing 2.6.37-git17 on a POWER7 with virtual IO and hit this:
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 7446k freed
vio 30000000: Warning: IOMMU dma not supported: mask
0xffffffffffffffff, table unavailable
vio 4000: Warning: IOMMU dma not supported: mask 0xffffffffffffffff,
table unavailable
vio 4001: Warning: IOMMU dma not supported: mask 0xffffffffffffffff,
table unavailable
vio 4002: Warning: IOMMU dma not supported: mask 0xffffffffffffffff,
table unavailable
vio 4004: Warning: IOMMU dma not supported: mask 0xffffffffffffffff,
table unavailable
audit: initializing netlink socket (disabled)
Haven't had a chance to look closer yet.
Anton
^ permalink raw reply
* Re: [PATCH] define binding for fsl mpic interrupt controllers
From: Meador Inge @ 2011-01-18 1:21 UTC (permalink / raw)
To: Stuart Yoder
Cc: Meador Inge, Blanchard, Hollis, devicetree-discuss, linuxppc-dev
In-Reply-To: <AANLkTim5i89k4OpUBWw0UgMoa5vwN5eSZ1MCs34S0VXB@mail.gmail.com>
Hi Stuart,
> From: Stuart Yoder<stuart.yoder@freescale.com>
>
> define the binding for compatible = "fsl,mpic", including
> the definition of 4-cell interrupt specifiers. The
> 3rd and 4th cells are needed to define additional
> types of interrupt source outside the "normal"
> external and internal interrupts in FSL SoCs. Define
> error interrupt, IPIs, and PIC timer sources.
Recently I posted an RFC concerning a binding for the MPIC [1]. I also
submitted a patch based on that feedback today (patch subject '[PATCH
1/2] powerpc: document the MPIC device tree binding'). You provide much
more information concerning the interrupt sources and how interrupt
specifiers are encoded. I had a few more properties listed: 'name',
'device_type', 'protected-sources', and 'no-reset'. The 'no-reset'
property is a proposed addition to the binding, the others are already
in use.
Perhaps we should merge the proposals?
[1] http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-December/087644.html
> Signed-off-by: Stuart Yoder<stuart.yoder@freescale.com>
> ---
> Documentation/powerpc/dts-bindings/fsl/mpic.txt | 158 +++++++++++++++++------
> 1 files changed, 116 insertions(+), 42 deletions(-)
>
> diff --git a/Documentation/powerpc/dts-bindings/fsl/mpic.txt
> b/Documentation/powerpc/dts-bindings/fsl/mpic.txt
> index 71e39cf..e1fe67c 100644
> --- a/Documentation/powerpc/dts-bindings/fsl/mpic.txt
> +++ b/Documentation/powerpc/dts-bindings/fsl/mpic.txt
> @@ -1,42 +1,116 @@
> -* OpenPIC and its interrupt numbers on Freescale's e500/e600 cores
> -
> -The OpenPIC specification does not specify which interrupt source has to
> -become which interrupt number. This is up to the software implementation
> -of the interrupt controller. The only requirement is that every
> -interrupt source has to have an unique interrupt number / vector number.
> -To accomplish this the current implementation assigns the number zero to
> -the first source, the number one to the second source and so on until
> -all interrupt sources have their unique number.
> -Usually the assigned vector number equals the interrupt number mentioned
> -in the documentation for a given core / CPU. This is however not true
> -for the e500 cores (MPC85XX CPUs) where the documentation distinguishes
> -between internal and external interrupt sources and starts counting at
> -zero for both of them.
> -
> -So what to write for external interrupt source X or internal interrupt
> -source Y into the device tree? Here is an example:
> -
> -The memory map for the interrupt controller in the MPC8544[0] shows,
> -that the first interrupt source starts at 0x5_0000 (PIC Register Address
> -Map-Interrupt Source Configuration Registers). This source becomes the
> -number zero therefore:
> - External interrupt 0 = interrupt number 0
> - External interrupt 1 = interrupt number 1
> - External interrupt 2 = interrupt number 2
> - ...
> -Every interrupt number allocates 0x20 bytes register space. So to get
> -its number it is sufficient to shift the lower 16bits to right by five.
> -So for the external interrupt 10 we have:
> - 0x0140>> 5 = 10
> -
> -After the external sources, the internal sources follow. The in core I2C
> -controller on the MPC8544 for instance has the internal source number
> -27. Oo obtain its interrupt number we take the lower 16bits of its memory
> -address (0x5_0560) and shift it right:
> - 0x0560>> 5 = 43
> -
> -Therefore the I2C device node for the MPC8544 CPU has to have the
> -interrupt number 43 specified in the device tree.
> -
> -[0] MPC8544E PowerQUICCTM III, Integrated Host Processor Family
> Reference Manual
> - MPC8544ERM Rev. 1 10/2007
> +=====================================================================
> +Freescale MPIC Interrupt Controller Node
> +Copyright (C) 2010,2011 Freescale Semiconductor Inc.
> +=====================================================================
> +
> +The Freescale MPIC interrupt controller is found on all PowerQUICC
> +and QorIQ processors and is compatible with the Open PIC. The
> +notable difference from Open PIC binding is the addition of 2
> +additional cells in the interrupt specifier defining interrupt type
> +information.
> +
> +PROPERTIES
> +
> + - compatible
> + Usage: required
> + Value type:<string>
> + Definition: Shall include "fsl,mpic". Freescale MPIC
> + controlers compatible with this binding have Block
> + Revision Registers BRR1 and BRR2 at offset 0x0 and
> + 0x10 in the MPIC.
> +
> + - reg
> + Usage: required
> + Value type:<prop-encoded-array>
> + Definition: A standard property. Specifies the physical
> + offset and length of the device's registers within the
> + CCSR address space.
> +
> + - interrupt-controller
> + Usage: required
> + Value type:<empty>
> + Definition: Specifies that this node is an interrupt
> + controller
> +
> + - #interrupt-cells
> + Usage: required
> + Value type:<u32>
> + Definition: Shall be 2 or 4. A value of 2 means that interrupt
> + specifiers do not contain the interrupt-type or type-specific
> + information cells.
> +
> + - #address-cells
> + Usage: required
> + Value type:<u32>
> + Definition: Shall be 0.
> +
> +INTERRUPT SPECIFIER DEFINITION
> +
> + Interrupt specifiers consists of 4 cells encoded as
> + follows:
> +
> +<1st-cell> interrupt-number
> +
> + Identifies the interrupt source. The MPIC
> + contains a block of registers referred
> + to as the "Interrupt Source Configuration
> + Registers". Each source has 32-bytes of
> + registers (vector/priority and destination)
> + in this region. So interrupt 0 is at
> + offset 0x0, interrupt 1 is at offset 0x20,
> + and so on.
> +
> +<2nd-cell> level-sense information, encoded as follows:
> + 0 = low-to-high edge triggered
> + 1 = active low level-sensitive
> + 2 = active high level-sensitive
> + 3 = high-to-low edge triggered
> +
> +<3rd-cell> interrupt-type
> +
> + The following types are supported:
> +
> + 0 = external or normal SoC device interrupt
> +
> + The interrupt-number field contains
> + the SoC device interrupt number. The
> + type-specific cell is undefined.
> +
> + 1 = error interrupt
> +
> + The interrupt-number field contains
> + the SoC device interrupt number for
> + the error interrupt. The type-specific
> + cell identifies the specific error
> + interrupt number.
> +
> + 2 = MPIC inter-processor interrupt (IPI)
> +
> + The interrupt-number field identifies
> + the MPIC IPI number. The type-specific
> + cell is undefined.
> +
> + 3 = MPIC timer interrupt
> +
> + The interrupt-number field identifies
> + the MPIC timer number. The type-specific
> + cell is undefined.
> +
> +<4th-cell> type-specific information
> +
> + The type-specific cell is encoded as follows:
> +
> + - For interrupt-type 1 (error interrupt),
> + the type-specific field contains the
> + bit number of the error interrupt in the
> + Error Interrupt Summary Register.
> +
> +EXAMPLE
> +
> + mpic: pic@40000 {
> + compatible = "fsl,mpic";
> + interrupt-controller;
> + #interrupt-cells =<4>;
> + #address-cells =<0>;
> + reg =<0x40000 0x40000>;
> + };
> --
> 1.7.2.2
>
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
>
>
--
Meador Inge | meador_inge AT mentor.com
Mentor Embedded | http://www.mentor.com/embedded-software
^ permalink raw reply
* [PATCH 2/2] powerpc: make MPIC honor the 'no-reset' device tree property
From: Meador Inge @ 2011-01-18 0:54 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Meador Inge, devicetree-discuss, Blanchard, Hollis
This property, defined in the MPIC binding, tells the kernel not to use
the reset bit in the global configuration register.
Signed-off-by: Meador Inge <meador_inge@mentor.com>
CC: Hollis Blanchard <hollis_blanchard@mentor.com>
---
arch/powerpc/sysdev/mpic.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 30c44e6..44aa2c3 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1157,7 +1157,9 @@ struct mpic * __init mpic_alloc(struct device_node
*node,
mpic_map(mpic, node, paddr, &mpic->tmregs, MPIC_INFO(TIMER_BASE),
0x1000);
/* Reset */
- if (flags & MPIC_WANTS_RESET) {
+ if ((flags & MPIC_WANTS_RESET) &&
+ !of_find_property(node, "no-reset", NULL)) {
+ printk(KERN_DEBUG "mpic: Resetting\n");
mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
| MPIC_GREG_GCONF_RESET);
-- 1.6.3.3
^ permalink raw reply related
* [PATCH 1/2] powerpc: document the MPIC device tree binding
From: Meador Inge @ 2011-01-18 0:52 UTC (permalink / raw)
To: linuxppc-dev; +Cc: minge, devicetree-discuss, Blanchard, Hollis
This binding documents several properties that have been in use for
quite some time, and adds one new property 'no-reset', which controls
whether the MPIC should be reset during runtime initialization.
Signed-off-by: Meador Inge <meador_inge@mentor.com>
CC: Hollis Blanchard <hollis_blanchard@mentor.com>
---
Documentation/powerpc/dts-bindings/mpic.txt | 78
+++++++++++++++++++++++++++
1 files changed, 78 insertions(+), 0 deletions(-)
create mode 100644 Documentation/powerpc/dts-bindings/mpic.txt
diff --git a/Documentation/powerpc/dts-bindings/mpic.txt
b/Documentation/powerpc/dts-bindings/mpic.txt
new file mode 100644
index 0000000..3a67919
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/mpic.txt
@@ -0,0 +1,78 @@
+* MPIC Binding
+
+This binding specifies what properties and child nodes must be available on
+the device tree representation of the "MPIC" interrupt controller. This
+binding is based on the binding defined for Open PIC in [1] and is a
superset
+of that binding.
+
+** Required properties:
+
+ NOTE: Many of these descriptions were paraphrased from [1] to aid
+ readability.
+
+ - name : Specifies the name of the MPIC.
+ - device_type : Specifies the device type of this MPIC. The value
of this
+ property shall be "open-pic".
+ - reg : Specifies the base physical address(s) and size(s) of this
MPIC's
+ addressable register space.
+ - compatible : Specifies the compatibility list for the MPIC. The
property
+ value shall include "chrp,open-pic".
+ - interrupt-controller : The presence of this property identifies
the node
+ as a MPIC. No property value should be
defined.
+ - #address-cells : Specifies the number of cells needed to encode an
+ address. The value of this property shall always
be 0
+ so that 'interrupt-map' nodes do not have to
specify a
+ parent unit address.
+ - #interrupt-cells : Specifies the number of cells needed to encode an
+ interrupt source.
+
+** Optional properties:
+
+ - no-reset : The presence of this property indicates that the MPIC
+ should not be reset during runtime initialization.
+ - protected-sources : Specifies a list of interrupt sources that are
not
+ available for use and whose corresponding vectors
+ should not be initialized. A typical use case for
+ this property is in AMP systems where multiple
+ independent operating systems need to share
the MPIC
+ without clobbering each other.
+
+** Example:
+
+ mpic: pic@40000 {
+ // This is an interrupt controller node.
+ interrupt-controller;
+
+ // No address cells so that 'interrupt-map' nodes which reference
+ // this MPIC node do not need a parent address specifier.
+ #address-cells = <0>;
+
+ // Two cell to encode interrupt sources.
+ #interrupt-cells = <2>;
+
+ // Offset address of 0x40000 and size of 0x40000.
+ reg = <0x40000 0x40000>;
+
+ // Compatible with Open PIC.
+ compatible = "chrp,open-pic";
+
+ // An Open PIC device.
+ device_type = "open-pic";
+
+ // The sources 0xb1 and 0xb2 are off limits for use and should
not be
+ // initialized by the OS.
+ protected-sources = <0xb1 0xb2>;
+
+ // The MPIC should not be reset.
+ no-reset;
+ };
+
+* References
+
+[1] PowerPC Microprocessor Common Hardware Reference Platform (CHRP)
Binding,
+ Version 1.8, 1998. Published by the Open Firmware Working Group.
+ (http://playground.sun.com/1275/bindings/chrp/chrp1_8a.ps)
+[2] Open Firmware Recommended Practice: Interrupt Mapping, Version 0.9.
1996.
+ Published by the Open Firmware Working Group.
+ (http://playground.sun.com/1275/practice/imap/imap0_9d.pdf)
+
-- 1.6.3.3
^ permalink raw reply related
* [PATCH 0/2]: powerpc: MPIC binding and 'no-reset' implementation
From: Meador Inge @ 2011-01-18 0:50 UTC (permalink / raw)
To: linuxppc-dev; +Cc: minge, devicetree-discuss, Blanchard, Hollis
This patch set provides a binding for the MPIC and implements support
for a new property, specified by that binding, called 'no-reset'.
Signed-off-by: Meador Inge <meador_inge@mentor.com>
CC: Hollis Blanchard <hollis_blanchard@mentor.com>
^ permalink raw reply
* [PATCH v3] ppc: update dynamic dma support
From: Nishanth Aravamudan @ 2011-01-18 0:20 UTC (permalink / raw)
To: sonnyrao, miltonm, Benjamin Herrenschmidt, Paul Mackerras,
Grant Likely, Anton Blanchard, linuxppc-dev
In-Reply-To: <20110117173210.GA11085@us.ibm.com>
On 17.01.2011 [09:32:10 -0800], Nishanth Aravamudan wrote:
> On 07.01.2011 [18:53:34 -0800], Nishanth Aravamudan wrote:
> > On 10.12.2010 [16:07:44 -0800], Nishanth Aravamudan wrote:
> > > On 09.12.2010 [11:09:20 -0800], Nishanth Aravamudan wrote:
> > > > On 26.10.2010 [20:35:17 -0700], Nishanth Aravamudan wrote:
> > > > > If firmware allows us to map all of a partition's memory for DMA on a
> > > > > particular bridge, create a 1:1 mapping of that memory. Add hooks for
> > > > > dealing with hotplug events. Dyanmic DMA windows can use larger than the
> > > > > default page size, and we use the largest one possible.
> > > > >
> > > > > Not-yet-signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > > > >
> > > > > ---
> > > > >
> > > > > I've tested this briefly on a machine with suitable firmware/hardware.
> > > > > Things seem to work well, but I want to do more exhaustive I/O testing
> > > > > before asking for upstream merging. I would really appreciate any
> > > > > feedback on the updated approach.
> > > > >
> > > > > Specific questions:
> > > > >
> > > > > Ben, did I hook into the dma_set_mask() platform callback as you
> > > > > expected? Anything I can do better or which perhaps might lead to
> > > > > gotchas later?
> > > > >
> > > > > I've added a disable_ddw option, but perhaps it would be better to
> > > > > just disable the feature if iommu=force?
> > > >
> > > > So for the final version, I probably should document this option in
> > > > kernel-parameters.txt w/ the patch, right?
> > >
> > > Here's an updated version. Ben, think you can pick this up to your tree?
> >
> > Hi Ben,
> >
> > I have a small follow-on patch that tidies up the code a bit and deals
> > with an error condition on dlpar remove of ddw slots. I'm putting it
> > below as a follow-on patch, but I can roll it into the v3 patch and post
> > a v4 if you'd prefer?
>
> Sorry, found a few more cleanups (spaces instead of tabs, etc.).
Sigh, this is just embarassing. Milton pointed out that there is no
reason to clutter the asm/ppc-pci.h with RTAS specific declarations that
only apply to DDW. So I have moved them into iommu.c in this version.
Thanks,
Nish
pseries: ddw cleanups
Use symbolic constants to access RTAS responses.
Disable reconfig notifier's clearing of TCEs and removal of DMA window.
This is handled by firmware currently. If the kernel were to do it, we'd
need a new callback action before the isolation of the slot in question,
or else we'd always get permission errors (firmware revokes the window
automatically).
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 4ba2338..e4050f6 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -285,6 +285,21 @@ struct direct_window {
const struct dynamic_dma_window_prop *prop;
struct list_head list;
};
+
+/* Dynamic DMA Window support */
+struct ddw_query_response {
+ u32 windows_available;
+ u32 largest_available_block;
+ u32 page_size;
+ u32 migration_capable;
+};
+
+struct ddw_create_response {
+ u32 liobn;
+ u32 addr_hi;
+ u32 addr_lo;
+};
+
static LIST_HEAD(direct_window_list);
/* prevents races between memory on/offline and window creation */
static DEFINE_SPINLOCK(direct_window_list_lock);
@@ -323,7 +338,7 @@ static int tce_clearrange_multi_pSeriesLP(unsigned long start_pfn,
dma_offset = next + be64_to_cpu(maprange->dma_base);
rc = plpar_tce_stuff((u64)be32_to_cpu(maprange->liobn),
- (u64)dma_offset,
+ dma_offset,
0, limit);
num_tce -= limit;
} while (num_tce > 0 && !rc);
@@ -383,7 +398,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn,
}
rc = plpar_tce_put_indirect(liobn,
- (u64)dma_offset,
+ dma_offset,
(u64)virt_to_abs(tcep),
limit);
@@ -731,7 +746,8 @@ static u64 dupe_ddw_if_kexec(struct pci_dev *dev, struct device_node *pdn)
return dma_addr;
}
-static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *query)
+static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail,
+ struct ddw_query_response *query)
{
struct device_node *dn;
struct pci_dn *pcidn;
@@ -751,7 +767,7 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *query)
if (pcidn->eeh_pe_config_addr)
cfg_addr = pcidn->eeh_pe_config_addr;
buid = pcidn->phb->buid;
- ret = rtas_call(ddr_avail[0], 3, 5, query,
+ ret = rtas_call(ddr_avail[0], 3, 5, (u32 *)query,
cfg_addr, BUID_HI(buid), BUID_LO(buid));
dev_info(&dev->dev, "ibm,query-pe-dma-windows(%x) %x %x %x"
" returned %d\n", ddr_avail[0], cfg_addr, BUID_HI(buid),
@@ -759,7 +775,9 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *query)
return ret;
}
-static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *create, int page_shift, int window_shift)
+static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail,
+ struct ddw_create_response *create, int page_shift,
+ int window_shift)
{
struct device_node *dn;
struct pci_dn *pcidn;
@@ -782,15 +800,15 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *create, in
do {
/* extra outputs are LIOBN and dma-addr (hi, lo) */
- ret = rtas_call(ddr_avail[1], 5, 4, &create[0], cfg_addr,
+ ret = rtas_call(ddr_avail[1], 5, 4, (u32 *)create, cfg_addr,
BUID_HI(buid), BUID_LO(buid), page_shift, window_shift);
- } while(rtas_busy_delay(ret));
+ } while (rtas_busy_delay(ret));
dev_info(&dev->dev,
"ibm,create-pe-dma-window(%x) %x %x %x %x %x returned %d "
"(liobn = 0x%x starting addr = %x %x)\n", ddr_avail[1],
cfg_addr, BUID_HI(buid), BUID_LO(buid), page_shift,
- window_shift, ret, create[0], create[1], create[2]);
-
+ window_shift, ret, create->liobn, create->addr_hi, create->addr_lo);
+
return ret;
}
@@ -808,7 +826,8 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *create, in
static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
{
int len, ret;
- u32 query[4], create[3];
+ struct ddw_query_response query;
+ struct ddw_create_response create;
int page_shift;
u64 dma_addr, max_addr;
struct device_node *dn;
@@ -846,11 +865,11 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
* of page sizes: supported and supported for migrate-dma.
*/
dn = pci_device_to_OF_node(dev);
- ret = query_ddw(dev, ddr_avail, &query[0]);
+ ret = query_ddw(dev, ddr_avail, &query);
if (ret != 0)
goto out_unlock;
- if (!query[0]) {
+ if (query.windows_available == 0) {
/*
* no additional windows are available for this device.
* We might be able to reallocate the existing window,
@@ -859,23 +878,23 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
dev_dbg(&dev->dev, "no free dynamic windows");
goto out_unlock;
}
- if (query[2] & 4) {
+ if (query.page_size & 4) {
page_shift = 24; /* 16MB */
- } else if (query[2] & 2) {
+ } else if (query.page_size & 2) {
page_shift = 16; /* 64kB */
- } else if (query[2] & 1) {
+ } else if (query.page_size & 1) {
page_shift = 12; /* 4kB */
} else {
dev_dbg(&dev->dev, "no supported direct page size in mask %x",
- query[2]);
+ query.page_size);
goto out_unlock;
}
/* verify the window * number of ptes will map the partition */
/* check largest block * page size > max memory hotplug addr */
max_addr = memory_hotplug_max();
- if (query[1] < (max_addr >> page_shift)) {
+ if (query.largest_available_block < (max_addr >> page_shift)) {
dev_dbg(&dev->dev, "can't map partiton max 0x%llx with %u "
- "%llu-sized pages\n", max_addr, query[1],
+ "%llu-sized pages\n", max_addr, query.largest_available_block,
1ULL << page_shift);
goto out_unlock;
}
@@ -894,19 +913,17 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
goto out_free_prop;
}
- ret = create_ddw(dev, ddr_avail, &create[0], page_shift, len);
+ ret = create_ddw(dev, ddr_avail, &create, page_shift, len);
if (ret != 0)
goto out_free_prop;
- *ddwprop = (struct dynamic_dma_window_prop) {
- .liobn = cpu_to_be32(create[0]),
- .dma_base = cpu_to_be64(((u64)create[1] << 32) + (u64)create[2]),
- .tce_shift = cpu_to_be32(page_shift),
- .window_shift = cpu_to_be32(len)
- };
+ ddwprop->liobn = cpu_to_be32(create.liobn);
+ ddwprop->dma_base = cpu_to_be64(of_read_number(&create.addr_hi, 2));
+ ddwprop->tce_shift = cpu_to_be32(page_shift);
+ ddwprop->window_shift = cpu_to_be32(len);
dev_dbg(&dev->dev, "created tce table LIOBN 0x%x for %s\n",
- create[0], dn->full_name);
+ create.liobn, dn->full_name);
window = kzalloc(sizeof(*window), GFP_KERNEL);
if (!window)
@@ -933,7 +950,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
list_add(&window->list, &direct_window_list);
spin_unlock(&direct_window_list_lock);
- dma_addr = of_read_number(&create[1], 2);
+ dma_addr = of_read_number(&create.addr_hi, 2);
set_dma_offset(&dev->dev, dma_addr);
goto out_unlock;
@@ -1015,7 +1032,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask)
dn = pci_device_to_OF_node(pdev);
dev_dbg(dev, "node is %s\n", dn->full_name);
- /*
+ /*
* the device tree might contain the dma-window properties
* per-device and not neccesarily for the bus. So we need to
* search upwards in the tree until we either hit a dma-window
@@ -1118,7 +1135,15 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
}
spin_unlock(&direct_window_list_lock);
- remove_ddw(np);
+ /*
+ * Because the notifier runs after isolation of the
+ * slot, we are guaranteed any DMA window has already
+ * been revoked and the TCEs have been marked invalid,
+ * so we don't need a call to remove_ddw(np). However,
+ * if an additional notifier action is added before the
+ * isolate call, we should update this code for
+ * completeness with such a call.
+ */
break;
default:
err = NOTIFY_DONE;
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply related
* [PATCH] define binding for fsl mpic interrupt controllers
From: Stuart yoder @ 2011-01-17 23:19 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss; +Cc: Stuart Yoder
From: Stuart Yoder <stuart.yoder@freescale.com>
define the binding for compatible = "fsl,mpic", including
the definition of 4-cell interrupt specifiers. The
3rd and 4th cells are needed to define additional
types of interrupt source outside the "normal"
external and internal interrupts in FSL SoCs. Define
error interrupt, IPIs, and PIC timer sources.
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
Documentation/powerpc/dts-bindings/fsl/mpic.txt | 158 +++++++++++++++++------
1 files changed, 116 insertions(+), 42 deletions(-)
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpic.txt b/Documentation/powerpc/dts-bindings/fsl/mpic.txt
index 71e39cf..e1fe67c 100644
--- a/Documentation/powerpc/dts-bindings/fsl/mpic.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/mpic.txt
@@ -1,42 +1,116 @@
-* OpenPIC and its interrupt numbers on Freescale's e500/e600 cores
-
-The OpenPIC specification does not specify which interrupt source has to
-become which interrupt number. This is up to the software implementation
-of the interrupt controller. The only requirement is that every
-interrupt source has to have an unique interrupt number / vector number.
-To accomplish this the current implementation assigns the number zero to
-the first source, the number one to the second source and so on until
-all interrupt sources have their unique number.
-Usually the assigned vector number equals the interrupt number mentioned
-in the documentation for a given core / CPU. This is however not true
-for the e500 cores (MPC85XX CPUs) where the documentation distinguishes
-between internal and external interrupt sources and starts counting at
-zero for both of them.
-
-So what to write for external interrupt source X or internal interrupt
-source Y into the device tree? Here is an example:
-
-The memory map for the interrupt controller in the MPC8544[0] shows,
-that the first interrupt source starts at 0x5_0000 (PIC Register Address
-Map-Interrupt Source Configuration Registers). This source becomes the
-number zero therefore:
- External interrupt 0 = interrupt number 0
- External interrupt 1 = interrupt number 1
- External interrupt 2 = interrupt number 2
- ...
-Every interrupt number allocates 0x20 bytes register space. So to get
-its number it is sufficient to shift the lower 16bits to right by five.
-So for the external interrupt 10 we have:
- 0x0140 >> 5 = 10
-
-After the external sources, the internal sources follow. The in core I2C
-controller on the MPC8544 for instance has the internal source number
-27. Oo obtain its interrupt number we take the lower 16bits of its memory
-address (0x5_0560) and shift it right:
- 0x0560 >> 5 = 43
-
-Therefore the I2C device node for the MPC8544 CPU has to have the
-interrupt number 43 specified in the device tree.
-
-[0] MPC8544E PowerQUICCTM III, Integrated Host Processor Family Reference Manual
- MPC8544ERM Rev. 1 10/2007
+=====================================================================
+Freescale MPIC Interrupt Controller Node
+Copyright (C) 2010,2011 Freescale Semiconductor Inc.
+=====================================================================
+
+The Freescale MPIC interrupt controller is found on all PowerQUICC
+and QorIQ processors and is compatible with the Open PIC. The
+notable difference from Open PIC binding is the addition of 2
+additional cells in the interrupt specifier defining interrupt type
+information.
+
+PROPERTIES
+
+ - compatible
+ Usage: required
+ Value type: <string>
+ Definition: Shall include "fsl,mpic". Freescale MPIC
+ controlers compatible with this binding have Block
+ Revision Registers BRR1 and BRR2 at offset 0x0 and
+ 0x10 in the MPIC.
+
+ - reg
+ Usage: required
+ Value type: <prop-encoded-array>
+ Definition: A standard property. Specifies the physical
+ offset and length of the device's registers within the
+ CCSR address space.
+
+ - interrupt-controller
+ Usage: required
+ Value type: <empty>
+ Definition: Specifies that this node is an interrupt
+ controller
+
+ - #interrupt-cells
+ Usage: required
+ Value type: <u32>
+ Definition: Shall be 2 or 4. A value of 2 means that interrupt
+ specifiers do not contain the interrupt-type or type-specific
+ information cells.
+
+ - #address-cells
+ Usage: required
+ Value type: <u32>
+ Definition: Shall be 0.
+
+INTERRUPT SPECIFIER DEFINITION
+
+ Interrupt specifiers consists of 4 cells encoded as
+ follows:
+
+ <1st-cell> interrupt-number
+
+ Identifies the interrupt source. The MPIC
+ contains a block of registers referred
+ to as the "Interrupt Source Configuration
+ Registers". Each source has 32-bytes of
+ registers (vector/priority and destination)
+ in this region. So interrupt 0 is at
+ offset 0x0, interrupt 1 is at offset 0x20,
+ and so on.
+
+ <2nd-cell> level-sense information, encoded as follows:
+ 0 = low-to-high edge triggered
+ 1 = active low level-sensitive
+ 2 = active high level-sensitive
+ 3 = high-to-low edge triggered
+
+ <3rd-cell> interrupt-type
+
+ The following types are supported:
+
+ 0 = external or normal SoC device interrupt
+
+ The interrupt-number field contains
+ the SoC device interrupt number. The
+ type-specific cell is undefined.
+
+ 1 = error interrupt
+
+ The interrupt-number field contains
+ the SoC device interrupt number for
+ the error interrupt. The type-specific
+ cell identifies the specific error
+ interrupt number.
+
+ 2 = MPIC inter-processor interrupt (IPI)
+
+ The interrupt-number field identifies
+ the MPIC IPI number. The type-specific
+ cell is undefined.
+
+ 3 = MPIC timer interrupt
+
+ The interrupt-number field identifies
+ the MPIC timer number. The type-specific
+ cell is undefined.
+
+ <4th-cell> type-specific information
+
+ The type-specific cell is encoded as follows:
+
+ - For interrupt-type 1 (error interrupt),
+ the type-specific field contains the
+ bit number of the error interrupt in the
+ Error Interrupt Summary Register.
+
+EXAMPLE
+
+ mpic: pic@40000 {
+ compatible = "fsl,mpic";
+ interrupt-controller;
+ #interrupt-cells = <4>;
+ #address-cells = <0>;
+ reg = <0x40000 0x40000>;
+ };
--
1.7.2.2
^ permalink raw reply related
* [PATCH] powerpc/mpic: fix mask/unmask timeout message
From: Scott Wood @ 2011-01-17 22:10 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
Don't say that enable timed out when it was disable, and
show which IRQ had the problem.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/sysdev/mpic.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 7c13426..b0c8469 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -674,7 +674,8 @@ void mpic_unmask_irq(unsigned int irq)
/* make sure mask gets to controller before we return to user */
do {
if (!loops--) {
- printk(KERN_ERR "mpic_enable_irq timeout\n");
+ printk(KERN_ERR "%s: timeout on hwirq %u\n",
+ __func__, src);
break;
}
} while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
@@ -695,7 +696,8 @@ void mpic_mask_irq(unsigned int irq)
/* make sure mask gets to controller before we return to user */
do {
if (!loops--) {
- printk(KERN_ERR "mpic_enable_irq timeout\n");
+ printk(KERN_ERR "%s: timeout on hwirq %u\n",
+ __func__, src);
break;
}
} while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
--
1.7.0.4
^ permalink raw reply related
* [PATCH] watchdog: booke_wdt: clean up status messages
From: Timur Tabi @ 2011-01-17 21:29 UTC (permalink / raw)
To: linuxppc-dev, wim, linux-watchdog
Improve the status messages that are displayed during some operations of the
PowerPC watchdog timer driver. When the watchdog is enabled, the timeout is
displayed as a number of seconds, instead of an obscure "period". The "period"
is the position of a bit in a 64-bit timer register. The higher the value,
the quicker the watchdog timeout occurs. Some people chose a high "period"
value for the timer and get confused as to why the board resets within a
few seconds.
Messages displayed during open and close are now debug messages, so that they
don't clutter the console by default. Finally, printk() is replaced with the
pr_xxx() equivalent.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
drivers/watchdog/booke_wdt.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 7e7ec9c..935d0dd 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -221,9 +221,8 @@ static int booke_wdt_open(struct inode *inode, struct file *file)
if (booke_wdt_enabled == 0) {
booke_wdt_enabled = 1;
on_each_cpu(__booke_wdt_enable, NULL, 0);
- printk(KERN_INFO
- "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
- booke_wdt_period);
+ pr_debug("booke_wdt: watchdog enabled (timeout = %llu sec)\n",
+ period_to_sec(booke_wdt_period));
}
spin_unlock(&booke_wdt_lock);
@@ -240,6 +239,7 @@ static int booke_wdt_release(struct inode *inode, struct file *file)
*/
on_each_cpu(__booke_wdt_disable, NULL, 0);
booke_wdt_enabled = 0;
+ pr_debug("booke_wdt: watchdog disabled\n",
#endif
clear_bit(0, &wdt_is_active);
@@ -271,21 +271,20 @@ static int __init booke_wdt_init(void)
{
int ret = 0;
- printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n");
+ pr_info("PowerPC Book-E Watchdog Timer Loaded\n");
ident.firmware_version = cur_cpu_spec->pvr_value;
ret = misc_register(&booke_wdt_miscdev);
if (ret) {
- printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n",
- WATCHDOG_MINOR, ret);
+ pr_err("booke_wdt: cannot register device (minor=%u, ret=%i)\n",
+ WATCHDOG_MINOR, ret);
return ret;
}
spin_lock(&booke_wdt_lock);
if (booke_wdt_enabled == 1) {
- printk(KERN_INFO
- "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
- booke_wdt_period);
+ pr_info("booke_wdt: watchdog enabled (timeout = %llu sec)\n",
+ period_to_sec(booke_wdt_period));
on_each_cpu(__booke_wdt_enable, NULL, 0);
}
spin_unlock(&booke_wdt_lock);
--
1.7.3.4
^ permalink raw reply related
* [PATCH] watchdog: booke_wdt: clean up status messages
From: Timur Tabi @ 2011-01-17 21:28 UTC (permalink / raw)
To: linuxppc-dev, wim, watchdog
Improve the status messages that are displayed during some operations of the
PowerPC watchdog timer driver. When the watchdog is enabled, the timeout is
displayed as a number of seconds, instead of an obscure "period". The "period"
is the position of a bit in a 64-bit timer register. The higher the value,
the quicker the watchdog timeout occurs. Some people chose a high "period"
value for the timer and get confused as to why the board resets within a
few seconds.
Messages displayed during open and close are now debug messages, so that they
don't clutter the console by default. Finally, printk() is replaced with the
pr_xxx() equivalent.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
drivers/watchdog/booke_wdt.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 7e7ec9c..935d0dd 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -221,9 +221,8 @@ static int booke_wdt_open(struct inode *inode, struct file *file)
if (booke_wdt_enabled == 0) {
booke_wdt_enabled = 1;
on_each_cpu(__booke_wdt_enable, NULL, 0);
- printk(KERN_INFO
- "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
- booke_wdt_period);
+ pr_debug("booke_wdt: watchdog enabled (timeout = %llu sec)\n",
+ period_to_sec(booke_wdt_period));
}
spin_unlock(&booke_wdt_lock);
@@ -240,6 +239,7 @@ static int booke_wdt_release(struct inode *inode, struct file *file)
*/
on_each_cpu(__booke_wdt_disable, NULL, 0);
booke_wdt_enabled = 0;
+ pr_debug("booke_wdt: watchdog disabled\n",
#endif
clear_bit(0, &wdt_is_active);
@@ -271,21 +271,20 @@ static int __init booke_wdt_init(void)
{
int ret = 0;
- printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n");
+ pr_info("PowerPC Book-E Watchdog Timer Loaded\n");
ident.firmware_version = cur_cpu_spec->pvr_value;
ret = misc_register(&booke_wdt_miscdev);
if (ret) {
- printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n",
- WATCHDOG_MINOR, ret);
+ pr_err("booke_wdt: cannot register device (minor=%u, ret=%i)\n",
+ WATCHDOG_MINOR, ret);
return ret;
}
spin_lock(&booke_wdt_lock);
if (booke_wdt_enabled == 1) {
- printk(KERN_INFO
- "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
- booke_wdt_period);
+ pr_info("booke_wdt: watchdog enabled (timeout = %llu sec)\n",
+ period_to_sec(booke_wdt_period));
on_each_cpu(__booke_wdt_enable, NULL, 0);
}
spin_unlock(&booke_wdt_lock);
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Peter Zijlstra @ 2011-01-17 20:43 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, H. Peter Anvin,
Heiko Carstens, Paul Mackerras, Helge Deller, sparclinux,
Linux-Arch, linux-s390, Jesper Nilsson, Jeremy Fitzhardinge,
Russell King, Hirokazu Takata, x86, James E.J. Bottomley,
virtualization, Ingo Molnar, Matt Turner, Fenghua Yu,
Mike Frysinger, user-mode-linux-devel, Konrad Rzeszutek Wilk,
Jeff Dike, Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
David S. Miller
In-Reply-To: <1295296310.2148.29.camel@pasglop>
On Tue, 2011-01-18 at 07:31 +1100, Benjamin Herrenschmidt wrote:
>=20
> Beware of false positive, I've used "fake" reschedule IPIs in the past
> for other things (like kicking a CPU out of sleep state for unrelated
> reasons). Nothing that I know that is upstream today but some of that
> might come back. I'd like to avoid having to add an atomic to know if
> it's a real reschedule, will the scheduler be smart enough to not bother
> with false positives ?=20
Yes it can deal with that, some will be for reschedules, some will be
for ttwu tail ends and x86 too uses this ipi for a few random other
things like kicking kvm out of guest context..
^ permalink raw reply
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Benjamin Herrenschmidt @ 2011-01-17 20:31 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, H. Peter Anvin,
Heiko Carstens, Paul Mackerras, Helge Deller, sparclinux,
Linux-Arch, linux-s390, Jesper Nilsson, Jeremy Fitzhardinge,
Russell King, Hirokazu Takata, x86, James E.J. Bottomley,
virtualization, Ingo Molnar, Matt Turner, Fenghua Yu,
Mike Frysinger, user-mode-linux-devel, Konrad Rzeszutek Wilk,
Jeff Dike, Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
David S. Miller
In-Reply-To: <1295262433.30950.53.camel@laptop>
On Mon, 2011-01-17 at 12:07 +0100, Peter Zijlstra wrote:
> For future rework of try_to_wake_up() we'd like to push part of that
> onto the CPU the task is actually going to run on, in order to do so we
> need a generic callback from the existing scheduler IPI.
>
> This patch introduces such a generic callback: scheduler_ipi() and
> implements it as a NOP.
>
> I visited existing smp_send_reschedule() implementations and tried to
> add a call to scheduler_ipi() in their handler part, but esp. for MIPS
> I'm not quite sure I actually got all of them.
>
> Also, while reading through all this, I noticed the blackfin SMP code
> looks to be broken, it simply discards any IPI when low on memory.
Beware of false positive, I've used "fake" reschedule IPIs in the past
for other things (like kicking a CPU out of sleep state for unrelated
reasons). Nothing that I know that is upstream today but some of that
might come back. I'd like to avoid having to add an atomic to know if
it's a real reschedule, will the scheduler be smart enough to not bother
with false positives ?
Cheers,
Ben.
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
> arch/alpha/kernel/smp.c | 1 +
> arch/arm/kernel/smp.c | 1 +
> arch/blackfin/mach-common/smp.c | 3 ++-
> arch/cris/arch-v32/kernel/smp.c | 13 ++++++++-----
> arch/ia64/kernel/irq_ia64.c | 2 ++
> arch/ia64/xen/irq_xen.c | 10 +++++++++-
> arch/m32r/kernel/smp.c | 2 +-
> arch/mips/kernel/smtc.c | 1 +
> arch/mips/sibyte/bcm1480/smp.c | 7 +++----
> arch/mips/sibyte/sb1250/smp.c | 7 +++----
> arch/mn10300/kernel/smp.c | 2 +-
> arch/parisc/kernel/smp.c | 1 +
> arch/powerpc/kernel/smp.c | 1 +
> arch/s390/kernel/smp.c | 6 +++---
> arch/sh/kernel/smp.c | 2 ++
> arch/sparc/kernel/smp_32.c | 2 +-
> arch/sparc/kernel/smp_64.c | 1 +
> arch/tile/kernel/smp.c | 1 +
> arch/um/kernel/smp.c | 2 +-
> arch/x86/kernel/smp.c | 1 +
> arch/x86/xen/smp.c | 1 +
> include/linux/sched.h | 1 +
> 22 files changed, 46 insertions(+), 22 deletions(-)
>
> diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
> index 42aa078..c4a570b 100644
> --- a/arch/alpha/kernel/smp.c
> +++ b/arch/alpha/kernel/smp.c
> @@ -587,6 +587,7 @@ handle_ipi(struct pt_regs *regs)
> case IPI_RESCHEDULE:
> /* Reschedule callback. Everything to be done
> is done by the interrupt return path. */
> + scheduler_ipi();
> break;
>
> case IPI_CALL_FUNC:
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index 9066473..ffde790 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -579,6 +579,7 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs)
> * nothing more to do - eveything is
> * done on the interrupt return path
> */
> + scheduler_ipi();
> break;
>
> case IPI_CALL_FUNC:
> diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
> index a17107a..e210f8a 100644
> --- a/arch/blackfin/mach-common/smp.c
> +++ b/arch/blackfin/mach-common/smp.c
> @@ -156,6 +156,7 @@ static irqreturn_t ipi_handler(int irq, void *dev_instance)
> case BFIN_IPI_RESCHEDULE:
> /* That's the easiest one; leave it to
> * return_from_int. */
> + scheduler_ipi();
> kfree(msg);
> break;
> case BFIN_IPI_CALL_FUNC:
> @@ -301,7 +302,7 @@ void smp_send_reschedule(int cpu)
>
> msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
> if (!msg)
> - return;
> + return; /* XXX unreliable needs fixing ! */
> INIT_LIST_HEAD(&msg->list);
> msg->type = BFIN_IPI_RESCHEDULE;
>
> diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
> index 84fed3b..86e3c76 100644
> --- a/arch/cris/arch-v32/kernel/smp.c
> +++ b/arch/cris/arch-v32/kernel/smp.c
> @@ -340,15 +340,18 @@ irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id)
>
> ipi = REG_RD(intr_vect, irq_regs[smp_processor_id()], rw_ipi);
>
> + if (ipi.vector & IPI_SCHEDULE) {
> + scheduler_ipi();
> + }
> if (ipi.vector & IPI_CALL) {
> - func(info);
> + func(info);
> }
> if (ipi.vector & IPI_FLUSH_TLB) {
> - if (flush_mm == FLUSH_ALL)
> - __flush_tlb_all();
> - else if (flush_vma == FLUSH_ALL)
> + if (flush_mm == FLUSH_ALL)
> + __flush_tlb_all();
> + else if (flush_vma == FLUSH_ALL)
> __flush_tlb_mm(flush_mm);
> - else
> + else
> __flush_tlb_page(flush_vma, flush_addr);
> }
>
> diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
> index 9a26015..a580230 100644
> --- a/arch/ia64/kernel/irq_ia64.c
> +++ b/arch/ia64/kernel/irq_ia64.c
> @@ -31,6 +31,7 @@
> #include <linux/irq.h>
> #include <linux/ratelimit.h>
> #include <linux/acpi.h>
> +#include <linux/sched.h>
>
> #include <asm/delay.h>
> #include <asm/intrinsics.h>
> @@ -496,6 +497,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
> smp_local_flush_tlb();
> kstat_incr_irqs_this_cpu(irq, desc);
> } else if (unlikely(IS_RESCHEDULE(vector))) {
> + scheduler_ipi();
> kstat_incr_irqs_this_cpu(irq, desc);
> } else {
> ia64_setreg(_IA64_REG_CR_TPR, vector);
> diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
> index a3fb7cf..2f235a3 100644
> --- a/arch/ia64/xen/irq_xen.c
> +++ b/arch/ia64/xen/irq_xen.c
> @@ -92,6 +92,8 @@ static unsigned short saved_irq_cnt;
> static int xen_slab_ready;
>
> #ifdef CONFIG_SMP
> +#include <linux/sched.h>
> +
> /* Dummy stub. Though we may check XEN_RESCHEDULE_VECTOR before __do_IRQ,
> * it ends up to issue several memory accesses upon percpu data and
> * thus adds unnecessary traffic to other paths.
> @@ -99,7 +101,13 @@ static int xen_slab_ready;
> static irqreturn_t
> xen_dummy_handler(int irq, void *dev_id)
> {
> + return IRQ_HANDLED;
> +}
>
> +static irqreturn_t
> +xen_resched_handler(int irq, void *dev_id)
> +{
> + scheduler_ipi();
> return IRQ_HANDLED;
> }
>
> @@ -110,7 +118,7 @@ static struct irqaction xen_ipi_irqaction = {
> };
>
> static struct irqaction xen_resched_irqaction = {
> - .handler = xen_dummy_handler,
> + .handler = xen_resched_handler,
> .flags = IRQF_DISABLED,
> .name = "resched"
> };
> diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
> index 31cef20..f0ecc3f 100644
> --- a/arch/m32r/kernel/smp.c
> +++ b/arch/m32r/kernel/smp.c
> @@ -138,7 +138,7 @@ void smp_send_reschedule(int cpu_id)
> *==========================================================================*/
> void smp_reschedule_interrupt(void)
> {
> - /* nothing to do */
> + scheduler_ipi();
> }
>
> /*==========================================================================*
> diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
> index 39c0825..0443e91 100644
> --- a/arch/mips/kernel/smtc.c
> +++ b/arch/mips/kernel/smtc.c
> @@ -931,6 +931,7 @@ static void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
> static void ipi_resched_interrupt(void)
> {
> /* Return from interrupt should be enough to cause scheduler check */
> + scheduler_ipi();
> }
>
> static void ipi_call_interrupt(void)
> diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c
> index 47b347c..513a301 100644
> --- a/arch/mips/sibyte/bcm1480/smp.c
> +++ b/arch/mips/sibyte/bcm1480/smp.c
> @@ -20,6 +20,7 @@
> #include <linux/delay.h>
> #include <linux/smp.h>
> #include <linux/kernel_stat.h>
> +#include <linux/sched.h>
>
> #include <asm/mmu_context.h>
> #include <asm/io.h>
> @@ -189,10 +190,8 @@ void bcm1480_mailbox_interrupt(void)
> /* Clear the mailbox to clear the interrupt */
> __raw_writeq(((u64)action)<<48, mailbox_0_clear_regs[cpu]);
>
> - /*
> - * Nothing to do for SMP_RESCHEDULE_YOURSELF; returning from the
> - * interrupt will do the reschedule for us
> - */
> + if (actione & SMP_RESCHEDULE_YOURSELF)
> + scheduler_ipi();
>
> if (action & SMP_CALL_FUNCTION)
> smp_call_function_interrupt();
> diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c
> index c00a5cb..38e7f6b 100644
> --- a/arch/mips/sibyte/sb1250/smp.c
> +++ b/arch/mips/sibyte/sb1250/smp.c
> @@ -21,6 +21,7 @@
> #include <linux/interrupt.h>
> #include <linux/smp.h>
> #include <linux/kernel_stat.h>
> +#include <linux/sched.h>
>
> #include <asm/mmu_context.h>
> #include <asm/io.h>
> @@ -177,10 +178,8 @@ void sb1250_mailbox_interrupt(void)
> /* Clear the mailbox to clear the interrupt */
> ____raw_writeq(((u64)action) << 48, mailbox_clear_regs[cpu]);
>
> - /*
> - * Nothing to do for SMP_RESCHEDULE_YOURSELF; returning from the
> - * interrupt will do the reschedule for us
> - */
> + if (action & SMP_RESCHEDULE_YOURSELF)
> + scheduler_ipi();
>
> if (action & SMP_CALL_FUNCTION)
> smp_call_function_interrupt();
> diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c
> index 0dcd1c6..17f16ca 100644
> --- a/arch/mn10300/kernel/smp.c
> +++ b/arch/mn10300/kernel/smp.c
> @@ -471,7 +471,7 @@ void smp_send_stop(void)
> */
> static irqreturn_t smp_reschedule_interrupt(int irq, void *dev_id)
> {
> - /* do nothing */
> + scheduler_ipi();
> return IRQ_HANDLED;
> }
>
> diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
> index 69d63d3..f8f7970 100644
> --- a/arch/parisc/kernel/smp.c
> +++ b/arch/parisc/kernel/smp.c
> @@ -155,6 +155,7 @@ ipi_interrupt(int irq, void *dev_id)
>
> case IPI_RESCHEDULE:
> smp_debug(100, KERN_DEBUG "CPU%d IPI_RESCHEDULE\n", this_cpu);
> + scheduler_ipi();
> /*
> * Reschedule callback. Everything to be
> * done is done by the interrupt return path.
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 68034bb..7ee0fc3 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -128,6 +128,7 @@ static irqreturn_t call_function_action(int irq, void *data)
> static irqreturn_t reschedule_action(int irq, void *data)
> {
> /* we just need the return path side effect of checking need_resched */
> + scheduler_ipi();
> return IRQ_HANDLED;
> }
>
> diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
> index 94cf510..61789e8 100644
> --- a/arch/s390/kernel/smp.c
> +++ b/arch/s390/kernel/smp.c
> @@ -163,12 +163,12 @@ static void do_ext_call_interrupt(unsigned int ext_int_code,
>
> /*
> * handle bit signal external calls
> - *
> - * For the ec_schedule signal we have to do nothing. All the work
> - * is done automatically when we return from the interrupt.
> */
> bits = xchg(&S390_lowcore.ext_call_fast, 0);
>
> + if (test_bit(ec_schedule, &bits))
> + scheduler_ipi();
> +
> if (test_bit(ec_call_function, &bits))
> generic_smp_call_function_interrupt();
>
> diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
> index 509b36b..6207561 100644
> --- a/arch/sh/kernel/smp.c
> +++ b/arch/sh/kernel/smp.c
> @@ -20,6 +20,7 @@
> #include <linux/module.h>
> #include <linux/cpu.h>
> #include <linux/interrupt.h>
> +#include <linux/sched.h>
> #include <asm/atomic.h>
> #include <asm/processor.h>
> #include <asm/system.h>
> @@ -323,6 +324,7 @@ void smp_message_recv(unsigned int msg)
> generic_smp_call_function_interrupt();
> break;
> case SMP_MSG_RESCHEDULE:
> + scheduler_ipi();
> break;
> case SMP_MSG_FUNCTION_SINGLE:
> generic_smp_call_function_single_interrupt();
> diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c
> index 91c10fb..042d8c9 100644
> --- a/arch/sparc/kernel/smp_32.c
> +++ b/arch/sparc/kernel/smp_32.c
> @@ -125,7 +125,7 @@ struct linux_prom_registers smp_penguin_ctable __cpuinitdata = { 0 };
>
> void smp_send_reschedule(int cpu)
> {
> - /* See sparc64 */
> + scheduler_ipi();
> }
>
> void smp_send_stop(void)
> diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
> index b6a2b8f..68e26e2 100644
> --- a/arch/sparc/kernel/smp_64.c
> +++ b/arch/sparc/kernel/smp_64.c
> @@ -1369,6 +1369,7 @@ void smp_send_reschedule(int cpu)
> void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs)
> {
> clear_softint(1 << irq);
> + scheduler_ipi();
> }
>
> /* This is a nop because we capture all other cpus
> diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c
> index 9575b37..91a1ddf 100644
> --- a/arch/tile/kernel/smp.c
> +++ b/arch/tile/kernel/smp.c
> @@ -190,6 +190,7 @@ static irqreturn_t handle_reschedule_ipi(int irq, void *token)
> * profiler count in the meantime.
> */
> __get_cpu_var(irq_stat).irq_resched_count++;
> + scheduler_ipi();
>
> return IRQ_HANDLED;
> }
> diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
> index 106bf27..eefb107 100644
> --- a/arch/um/kernel/smp.c
> +++ b/arch/um/kernel/smp.c
> @@ -173,7 +173,7 @@ void IPI_handler(int cpu)
> break;
>
> case 'R':
> - set_tsk_need_resched(current);
> + scheduler_ipi();
> break;
>
> case 'S':
> diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
> index 513deac..e38c2d8 100644
> --- a/arch/x86/kernel/smp.c
> +++ b/arch/x86/kernel/smp.c
> @@ -202,6 +202,7 @@ void smp_reschedule_interrupt(struct pt_regs *regs)
> {
> ack_APIC_irq();
> inc_irq_stat(irq_resched_count);
> + scheduler_ipi();
> /*
> * KVM uses this interrupt to force a cpu out of guest mode
> */
> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index 72a4c79..6196fb1 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -53,6 +53,7 @@ static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id);
> static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)
> {
> inc_irq_stat(irq_resched_count);
> + scheduler_ipi();
>
> return IRQ_HANDLED;
> }
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 341acbb..aa458dc 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -2183,6 +2183,7 @@ extern void set_task_comm(struct task_struct *tsk, char *from);
> extern char *get_task_comm(char *to, struct task_struct *tsk);
>
> #ifdef CONFIG_SMP
> +static inline void scheduler_ipi(void) { }
> extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
> #else
> static inline unsigned long wait_task_inactive(struct task_struct *p,
^ permalink raw reply
* [PATCH] powerpc/fsl_msi: Handle msi-available-ranges better
From: Scott Wood @ 2011-01-17 20:25 UTC (permalink / raw)
To: galak; +Cc: devicetree-discuss, linuxppc-dev
Now handles multiple ranges, doesn't make assumptions about interrupt
specifier format, and doesn't claim interrupts that don't correspond to an
available range.
Also has some better error checking.
The device tree binding is updated to clarify some existing assumptions.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
Documentation/powerpc/dts-bindings/fsl/msi-pic.txt | 9 ++-
arch/powerpc/sysdev/fsl_msi.c | 92 ++++++++++++--------
2 files changed, 64 insertions(+), 37 deletions(-)
diff --git a/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt b/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt
index bcc30ba..c0d80fb 100644
--- a/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt
@@ -5,14 +5,21 @@ Required properties:
first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572,
etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on
the parent type.
+
- reg : should contain the address and the length of the shared message
interrupt register set.
+
- msi-available-ranges: use <start count> style section to define which
msi interrupt can be used in the 256 msi interrupts. This property is
optional, without this, all the 256 MSI interrupts can be used.
+ Each available range must begin and end on a multiple of 32 (i.e.
+ no splitting an individual MSI register or the associated PIC interrupt).
+
- interrupts : each one of the interrupts here is one entry per 32 MSIs,
and routed to the host interrupt controller. the interrupts should
- be set as edge sensitive.
+ be set as edge sensitive. If msi-available-ranges is present, only
+ the interrupts that correspond to available ranges shall be present.
+
- interrupt-parent: the phandle for the interrupt controller
that services interrupts for this device. for 83xx cpu, the interrupts
are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 108d76f..46e27ac 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2010 Freescale Semiconductor, Inc.
+ * Copyright (C) 2007-2011 Freescale Semiconductor, Inc.
*
* Author: Tony Li <tony.li@freescale.com>
* Jason Jin <Jason.jin@freescale.com>
@@ -273,19 +273,47 @@ static int fsl_of_msi_remove(struct platform_device *ofdev)
return 0;
}
+static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
+ struct platform_device *dev,
+ int offset, int irq_index)
+{
+ struct fsl_msi_cascade_data *cascade_data = NULL;
+ int virt_msir;
+
+ virt_msir = irq_of_parse_and_map(dev->dev.of_node, irq_index);
+ if (virt_msir == NO_IRQ) {
+ dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
+ __func__, irq_index);
+ return 0;
+ }
+
+ cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
+ if (!cascade_data) {
+ dev_err(&dev->dev, "No memory for MSI cascade data\n");
+ return -ENOMEM;
+ }
+
+ msi->msi_virqs[irq_index] = virt_msir;
+ cascade_data->index = offset + irq_index;
+ cascade_data->msi_data = msi;
+ set_irq_data(virt_msir, cascade_data);
+ set_irq_chained_handler(virt_msir, fsl_msi_cascade);
+
+ return 0;
+}
+
static int __devinit fsl_of_msi_probe(struct platform_device *dev,
const struct of_device_id *match)
{
struct fsl_msi *msi;
struct resource res;
- int err, i, count;
+ int err, i, j, irq_index, count;
int rc;
- int virt_msir;
const u32 *p;
struct fsl_msi_feature *features = match->data;
- struct fsl_msi_cascade_data *cascade_data = NULL;
int len;
u32 offset;
+ static const u32 all_avail[] = { 0, NR_MSI_IRQS };
printk(KERN_DEBUG "Setting up Freescale MSI support\n");
@@ -332,42 +360,34 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev,
goto error_out;
}
- p = of_get_property(dev->dev.of_node, "interrupts", &count);
- if (!p) {
- dev_err(&dev->dev, "no interrupts property found on %s\n",
- dev->dev.of_node->full_name);
- err = -ENODEV;
- goto error_out;
- }
- if (count % 8 != 0) {
- dev_err(&dev->dev, "Malformed interrupts property on %s\n",
- dev->dev.of_node->full_name);
+ p = of_get_property(dev->dev.of_node, "msi-available-ranges", &len);
+ if (p && len % (2 * sizeof(u32)) != 0) {
+ dev_err(&dev->dev, "%s: Malformed msi-available-ranges property\n",
+ __func__);
err = -EINVAL;
goto error_out;
}
- offset = 0;
- p = of_get_property(dev->dev.of_node, "msi-available-ranges", &len);
- if (p)
- offset = *p / IRQS_PER_MSI_REG;
-
- count /= sizeof(u32);
- for (i = 0; i < min(count / 2, NR_MSI_REG); i++) {
- virt_msir = irq_of_parse_and_map(dev->dev.of_node, i);
- if (virt_msir != NO_IRQ) {
- cascade_data = kzalloc(
- sizeof(struct fsl_msi_cascade_data),
- GFP_KERNEL);
- if (!cascade_data) {
- dev_err(&dev->dev,
- "No memory for MSI cascade data\n");
- err = -ENOMEM;
+
+ if (!p)
+ p = all_avail;
+
+ for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) {
+ if (p[i * 2] % IRQS_PER_MSI_REG ||
+ p[i * 2 + 1] % IRQS_PER_MSI_REG) {
+ printk(KERN_WARNING "%s: %s: msi available range of %u at %u is not IRQ-aligned\n",
+ __func__, dev->dev.of_node->full_name,
+ p[i * 2 + 1], p[i * 2]);
+ err = -EINVAL;
+ goto error_out;
+ }
+
+ offset = p[i * 2] / IRQS_PER_MSI_REG;
+ count = p[i * 2 + 1] / IRQS_PER_MSI_REG;
+
+ for (j = 0; j < count; j++, irq_index++) {
+ err = fsl_msi_setup_hwirq(msi, dev, offset, irq_index);
+ if (err)
goto error_out;
- }
- msi->msi_virqs[i] = virt_msir;
- cascade_data->index = i + offset;
- cascade_data->msi_data = msi;
- set_irq_data(virt_msir, (void *)cascade_data);
- set_irq_chained_handler(virt_msir, fsl_msi_cascade);
}
}
--
1.7.0.4
^ permalink raw reply related
* Re: [uclinux-dist-devel] [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Peter Zijlstra @ 2011-01-17 20:16 UTC (permalink / raw)
To: Mike Frysinger
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, H. Peter Anvin,
Heiko Carstens, Paul Mackerras, Helge Deller, sparclinux,
Linux-Arch, linux-s390, Jesper Nilsson, Jeremy Fitzhardinge,
Russell King, Hirokazu Takata, x86, James E.J. Bottomley,
virtualization, Ingo Molnar, Matt Turner, Fenghua Yu,
user-mode-linux-devel, Konrad Rzeszutek Wilk, Jeff Dike,
Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
David S. Miller
In-Reply-To: <AANLkTik3hE=_34Lbs944MzKpkNzqY+kCxpxmncUM2HB7@mail.gmail.com>
On Mon, 2011-01-17 at 14:49 -0500, Mike Frysinger wrote:
> On Mon, Jan 17, 2011 at 06:07, Peter Zijlstra wrote:
> > Also, while reading through all this, I noticed the blackfin SMP code
> > looks to be broken, it simply discards any IPI when low on memory.
>=20
> not really. see changelog of commit 73a400646b8e26615f3ef1a0a4bc0cd0d5bd=
284c.
Ah, indeed, it appears my tree was simply out of date, very good!
^ permalink raw reply
* Re: [uclinux-dist-devel] [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Mike Frysinger @ 2011-01-17 19:49 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, H. Peter Anvin,
Heiko Carstens, Paul Mackerras, Helge Deller, sparclinux,
Linux-Arch, linux-s390, Jesper Nilsson, Jeremy Fitzhardinge,
Russell King, Hirokazu Takata, x86, James E.J. Bottomley,
virtualization, Ingo Molnar, Matt Turner, Fenghua Yu,
user-mode-linux-devel, Konrad Rzeszutek Wilk, Jeff Dike,
Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
David S. Miller
In-Reply-To: <1295262433.30950.53.camel@laptop>
On Mon, Jan 17, 2011 at 06:07, Peter Zijlstra wrote:
> Also, while reading through all this, I noticed the blackfin SMP code
> looks to be broken, it simply discards any IPI when low on memory.
not really. see changelog of commit 73a400646b8e26615f3ef1a0a4bc0cd0d5bd284c.
-mike
^ permalink raw reply
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: David Daney @ 2011-01-17 19:18 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, Heiko Carstens,
Paul Mackerras, H. Peter Anvin, sparclinux, Linux-Arch,
linux-s390, Jesper Nilsson, Jeremy Fitzhardinge, Russell King,
Hirokazu Takata, x86, James E.J. Bottomley, virtualization,
Ingo Molnar, Matt Turner, Fenghua Yu, Mike Frysinger,
user-mode-linux-devel, Konrad Rzeszutek Wilk, Jeff Dike,
Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, David S. Miller, Kyle McMartin, Paul Mundt,
linux-alpha, Martin Schwidefsky, linux390, Koichi Yasutake,
linuxppc-dev, Helge Deller
In-Reply-To: <1295262433.30950.53.camel@laptop>
On 01/17/2011 03:07 AM, Peter Zijlstra wrote:
> For future rework of try_to_wake_up() we'd like to push part of that
> onto the CPU the task is actually going to run on, in order to do so we
> need a generic callback from the existing scheduler IPI.
>
> This patch introduces such a generic callback: scheduler_ipi() and
> implements it as a NOP.
>
> I visited existing smp_send_reschedule() implementations and tried to
> add a call to scheduler_ipi() in their handler part, but esp. for MIPS
> I'm not quite sure I actually got all of them.
>
> Also, while reading through all this, I noticed the blackfin SMP code
> looks to be broken, it simply discards any IPI when low on memory.
>
> Signed-off-by: Peter Zijlstra<a.p.zijlstra@chello.nl>
> ---
> arch/alpha/kernel/smp.c | 1 +
> arch/arm/kernel/smp.c | 1 +
> arch/blackfin/mach-common/smp.c | 3 ++-
> arch/cris/arch-v32/kernel/smp.c | 13 ++++++++-----
> arch/ia64/kernel/irq_ia64.c | 2 ++
> arch/ia64/xen/irq_xen.c | 10 +++++++++-
> arch/m32r/kernel/smp.c | 2 +-
> arch/mips/kernel/smtc.c | 1 +
> arch/mips/sibyte/bcm1480/smp.c | 7 +++----
> arch/mips/sibyte/sb1250/smp.c | 7 +++----
[...]
Peter,
You will also have to patch the mailbox_interrupt() function in
arch/mips/cavium-octeon/smp.c
David Daney.
^ permalink raw reply
* Re: [PATCH] powerpc: perf: Fix frequency calculation for overflowing counters
From: Peter Zijlstra @ 2011-01-17 17:38 UTC (permalink / raw)
To: Scott Wood
Cc: linux-kernel, Paul Mackerras, Anton Blanchard,
Arnaldo Carvalho de Melo, Ingo Molnar, linuxppc-dev
In-Reply-To: <20110117113250.48098aaa@udp111988uds.am.freescale.net>
On Mon, 2011-01-17 at 11:32 -0600, Scott Wood wrote:
> > diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/per=
f_event.c
> > index 5674807..ab6f6be 100644
> > --- a/arch/powerpc/kernel/perf_event.c
> > +++ b/arch/powerpc/kernel/perf_event.c
> > @@ -1212,6 +1212,7 @@ static void record_and_restart(struct perf_event =
*event, unsigned long val,
> > if (left <=3D 0)
> > left =3D period;
> > record =3D 1;
> > + event->hw.last_period =3D event->hw.sample_period=
;
> > }
> > if (left < 0x80000000LL)
> > val =3D 0x80000000LL - left;
> Does perf_event_fsl_emb.c need this as well (it has almost the same
> record_and_restart code)?=20
I would think so.
^ permalink raw reply
* Re: [PATCH] powerpc: perf: Fix frequency calculation for overflowing counters
From: Scott Wood @ 2011-01-17 17:32 UTC (permalink / raw)
To: Anton Blanchard
Cc: Peter Zijlstra, linux-kernel, Paul Mackerras,
Arnaldo Carvalho de Melo, Ingo Molnar, linuxppc-dev
In-Reply-To: <20110117161742.5feb3761@kryten>
On Mon, 17 Jan 2011 16:17:42 +1100
Anton Blanchard <anton@samba.org> wrote:
>
> When profiling a benchmark that is almost 100% userspace, I noticed some
> wildly inaccurate profiles that showed almost all time spent in the kernel.
> Closer examination shows we were programming a tiny number of cycles into
> the PMU after each overflow (about ~200 away from the next overflow). This
> gets us stuck in a loop which we eventually break out of by throttling the
> PMU (there are regular throttle/unthrottle events in the log).
>
> It looks like we aren't setting event->hw.last_period to something same
> and the frequency to period calculations in perf are going haywire. With
> the following patch we find the correct period after a few interrupts and
> stay there. I also see no more throttle events.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
>
> diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
> index 5674807..ab6f6be 100644
> --- a/arch/powerpc/kernel/perf_event.c
> +++ b/arch/powerpc/kernel/perf_event.c
> @@ -1212,6 +1212,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
> if (left <= 0)
> left = period;
> record = 1;
> + event->hw.last_period = event->hw.sample_period;
> }
> if (left < 0x80000000LL)
> val = 0x80000000LL - left;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
Does perf_event_fsl_emb.c need this as well (it has almost the same
record_and_restart code)?
-Scott
^ permalink raw reply
* [PATCH v2] ppc: update dynamic dma support
From: Nishanth Aravamudan @ 2011-01-17 17:32 UTC (permalink / raw)
To: sonnyrao, miltonm, Benjamin Herrenschmidt, Paul Mackerras,
Grant Likely, Anton Blanchard, linuxppc-dev
In-Reply-To: <20110108025334.GA13468@us.ibm.com>
On 07.01.2011 [18:53:34 -0800], Nishanth Aravamudan wrote:
> On 10.12.2010 [16:07:44 -0800], Nishanth Aravamudan wrote:
> > On 09.12.2010 [11:09:20 -0800], Nishanth Aravamudan wrote:
> > > On 26.10.2010 [20:35:17 -0700], Nishanth Aravamudan wrote:
> > > > If firmware allows us to map all of a partition's memory for DMA on a
> > > > particular bridge, create a 1:1 mapping of that memory. Add hooks for
> > > > dealing with hotplug events. Dyanmic DMA windows can use larger than the
> > > > default page size, and we use the largest one possible.
> > > >
> > > > Not-yet-signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > > >
> > > > ---
> > > >
> > > > I've tested this briefly on a machine with suitable firmware/hardware.
> > > > Things seem to work well, but I want to do more exhaustive I/O testing
> > > > before asking for upstream merging. I would really appreciate any
> > > > feedback on the updated approach.
> > > >
> > > > Specific questions:
> > > >
> > > > Ben, did I hook into the dma_set_mask() platform callback as you
> > > > expected? Anything I can do better or which perhaps might lead to
> > > > gotchas later?
> > > >
> > > > I've added a disable_ddw option, but perhaps it would be better to
> > > > just disable the feature if iommu=force?
> > >
> > > So for the final version, I probably should document this option in
> > > kernel-parameters.txt w/ the patch, right?
> >
> > Here's an updated version. Ben, think you can pick this up to your tree?
>
> Hi Ben,
>
> I have a small follow-on patch that tidies up the code a bit and deals
> with an error condition on dlpar remove of ddw slots. I'm putting it
> below as a follow-on patch, but I can roll it into the v3 patch and post
> a v4 if you'd prefer?
Sorry, found a few more cleanups (spaces instead of tabs, etc.).
pseries: ddw cleanups
Use symbolic constants to access RTAS responses.
Disable reconfig notifier's clearing of TCEs and removal of DMA window.
This is handled by firmware currently. If the kernel were to do it, we'd
need a new callback action before the isolation of the slot in question,
or else we'd always get permission errors (firmware revokes the window
automatically).
Fix-up a few whitespace issues.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index 43268f1..ab37004 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -47,6 +47,20 @@ extern int rtas_setup_phb(struct pci_controller *phb);
extern unsigned long pci_probe_only;
+/* Dynamic DMA Window support */
+struct ddw_query_response {
+ u32 windows_available;
+ u32 largest_available_block;
+ u32 page_size;
+ u32 migration_capable;
+};
+
+struct ddw_create_response {
+ u32 liobn;
+ u32 addr_hi;
+ u32 addr_lo;
+};
+
/* ---- EEH internal-use-only related routines ---- */
#ifdef CONFIG_EEH
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 4ba2338..28cf227 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -323,7 +323,7 @@ static int tce_clearrange_multi_pSeriesLP(unsigned long start_pfn,
dma_offset = next + be64_to_cpu(maprange->dma_base);
rc = plpar_tce_stuff((u64)be32_to_cpu(maprange->liobn),
- (u64)dma_offset,
+ dma_offset,
0, limit);
num_tce -= limit;
} while (num_tce > 0 && !rc);
@@ -383,7 +383,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn,
}
rc = plpar_tce_put_indirect(liobn,
- (u64)dma_offset,
+ dma_offset,
(u64)virt_to_abs(tcep),
limit);
@@ -731,7 +731,8 @@ static u64 dupe_ddw_if_kexec(struct pci_dev *dev, struct device_node *pdn)
return dma_addr;
}
-static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *query)
+static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail,
+ struct ddw_query_response *query)
{
struct device_node *dn;
struct pci_dn *pcidn;
@@ -751,7 +752,7 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *query)
if (pcidn->eeh_pe_config_addr)
cfg_addr = pcidn->eeh_pe_config_addr;
buid = pcidn->phb->buid;
- ret = rtas_call(ddr_avail[0], 3, 5, query,
+ ret = rtas_call(ddr_avail[0], 3, 5, (u32 *)query,
cfg_addr, BUID_HI(buid), BUID_LO(buid));
dev_info(&dev->dev, "ibm,query-pe-dma-windows(%x) %x %x %x"
" returned %d\n", ddr_avail[0], cfg_addr, BUID_HI(buid),
@@ -759,7 +760,9 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *query)
return ret;
}
-static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *create, int page_shift, int window_shift)
+static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail,
+ struct ddw_create_response *create, int page_shift,
+ int window_shift)
{
struct device_node *dn;
struct pci_dn *pcidn;
@@ -782,15 +785,15 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *create, in
do {
/* extra outputs are LIOBN and dma-addr (hi, lo) */
- ret = rtas_call(ddr_avail[1], 5, 4, &create[0], cfg_addr,
+ ret = rtas_call(ddr_avail[1], 5, 4, (u32 *)create, cfg_addr,
BUID_HI(buid), BUID_LO(buid), page_shift, window_shift);
- } while(rtas_busy_delay(ret));
+ } while (rtas_busy_delay(ret));
dev_info(&dev->dev,
"ibm,create-pe-dma-window(%x) %x %x %x %x %x returned %d "
"(liobn = 0x%x starting addr = %x %x)\n", ddr_avail[1],
cfg_addr, BUID_HI(buid), BUID_LO(buid), page_shift,
- window_shift, ret, create[0], create[1], create[2]);
-
+ window_shift, ret, create->liobn, create->addr_hi, create->addr_lo);
+
return ret;
}
@@ -808,7 +811,8 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddr_avail, u32 *create, in
static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
{
int len, ret;
- u32 query[4], create[3];
+ struct ddw_query_response query;
+ struct ddw_create_response create;
int page_shift;
u64 dma_addr, max_addr;
struct device_node *dn;
@@ -846,11 +850,11 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
* of page sizes: supported and supported for migrate-dma.
*/
dn = pci_device_to_OF_node(dev);
- ret = query_ddw(dev, ddr_avail, &query[0]);
+ ret = query_ddw(dev, ddr_avail, &query);
if (ret != 0)
goto out_unlock;
- if (!query[0]) {
+ if (query.windows_available == 0) {
/*
* no additional windows are available for this device.
* We might be able to reallocate the existing window,
@@ -859,23 +863,23 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
dev_dbg(&dev->dev, "no free dynamic windows");
goto out_unlock;
}
- if (query[2] & 4) {
+ if (query.page_size & 4) {
page_shift = 24; /* 16MB */
- } else if (query[2] & 2) {
+ } else if (query.page_size & 2) {
page_shift = 16; /* 64kB */
- } else if (query[2] & 1) {
+ } else if (query.page_size & 1) {
page_shift = 12; /* 4kB */
} else {
dev_dbg(&dev->dev, "no supported direct page size in mask %x",
- query[2]);
+ query.page_size);
goto out_unlock;
}
/* verify the window * number of ptes will map the partition */
/* check largest block * page size > max memory hotplug addr */
max_addr = memory_hotplug_max();
- if (query[1] < (max_addr >> page_shift)) {
+ if (query.largest_available_block < (max_addr >> page_shift)) {
dev_dbg(&dev->dev, "can't map partiton max 0x%llx with %u "
- "%llu-sized pages\n", max_addr, query[1],
+ "%llu-sized pages\n", max_addr, query.largest_available_block,
1ULL << page_shift);
goto out_unlock;
}
@@ -894,19 +898,17 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
goto out_free_prop;
}
- ret = create_ddw(dev, ddr_avail, &create[0], page_shift, len);
+ ret = create_ddw(dev, ddr_avail, &create, page_shift, len);
if (ret != 0)
goto out_free_prop;
- *ddwprop = (struct dynamic_dma_window_prop) {
- .liobn = cpu_to_be32(create[0]),
- .dma_base = cpu_to_be64(((u64)create[1] << 32) + (u64)create[2]),
- .tce_shift = cpu_to_be32(page_shift),
- .window_shift = cpu_to_be32(len)
- };
+ ddwprop->liobn = cpu_to_be32(create.liobn);
+ ddwprop->dma_base = cpu_to_be64(of_read_number(&create.addr_hi, 2));
+ ddwprop->tce_shift = cpu_to_be32(page_shift);
+ ddwprop->window_shift = cpu_to_be32(len);
dev_dbg(&dev->dev, "created tce table LIOBN 0x%x for %s\n",
- create[0], dn->full_name);
+ create.liobn, dn->full_name);
window = kzalloc(sizeof(*window), GFP_KERNEL);
if (!window)
@@ -933,7 +935,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
list_add(&window->list, &direct_window_list);
spin_unlock(&direct_window_list_lock);
- dma_addr = of_read_number(&create[1], 2);
+ dma_addr = of_read_number(&create.addr_hi, 2);
set_dma_offset(&dev->dev, dma_addr);
goto out_unlock;
@@ -1015,7 +1017,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask)
dn = pci_device_to_OF_node(pdev);
dev_dbg(dev, "node is %s\n", dn->full_name);
- /*
+ /*
* the device tree might contain the dma-window properties
* per-device and not neccesarily for the bus. So we need to
* search upwards in the tree until we either hit a dma-window
@@ -1118,7 +1120,15 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
}
spin_unlock(&direct_window_list_lock);
- remove_ddw(np);
+ /*
+ * Because the notifier runs after isolation of the
+ * slot, we are guaranteed any DMA window has already
+ * been revoked and the TCEs have been marked invalid,
+ * so we don't need a call to remove_ddw(np). However,
+ * if an additional notifier action is added before the
+ * isolate call, we should update this code for
+ * completeness with such a call.
+ */
break;
default:
err = NOTIFY_DONE;
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply related
* Re: [PATCH 5/7] powerpc: add the mpic timer support
From: Jean-Michel Hautbois @ 2011-01-17 16:24 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev
In-Reply-To: <1291379651-8822-5-git-send-email-leoli@freescale.com>
Hi,
I am interested by this implementation.
> +static ssize_t mpic_tm_timeout_store(struct device *dev,
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct device_attribute *attr,
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 const char *buf, size_t count)
> +{
<snip>
> +
> + =C2=A0 =C2=A0 =C2=A0 spin_lock_irq(&priv->lock);
> +
> + =C2=A0 =C2=A0 =C2=A0 /* stop timer 0 */
> + =C2=A0 =C2=A0 =C2=A0 temp =3D in_be32(&priv->regs->gtbcr);
> + =C2=A0 =C2=A0 =C2=A0 temp |=3D MPIC_TIMER_STOP; /* counting inhibited *=
/
> + =C2=A0 =C2=A0 =C2=A0 out_be32(&priv->regs->gtbcr, temp);
> +
> + =C2=A0 =C2=A0 =C2=A0 if (interval !=3D 0) {
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* start timer */
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&priv->regs->=
gtbcr, interval | MPIC_TIMER_STOP);
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&priv->regs->=
gtbcr, interval);
> + =C2=A0 =C2=A0 =C2=A0 }
> +
> + =C2=A0 =C2=A0 =C2=A0 spin_unlock_irq(&priv->lock);
> + =C2=A0 =C2=A0 =C2=A0 return count;
> +}
What is the delay when doing that stop/start thing ?
Is this delay variable and/or big or not ?
I would imagine a timer which would see its interval regularly
corrected, and I would like to know if this is really really fast
(say, less than some ticks) or not.
Thanks in advance for any answer !
Regards,
JM
^ permalink raw reply
* Re: [PATCH] ATA: Add FSL sata v2 controller support
From: Kumar Gala @ 2011-01-17 14:57 UTC (permalink / raw)
To: Aggrwal Poonam-B10812
Cc: Xu Lei-B33228, Sergei Shtylyov, linuxppc-dev@lists.ozlabs.org,
linux-ide@vger.kernel.org, Gala Kumar-B11780, jgarzik@pobox.com
In-Reply-To: <45903308677306428B6EE7E6FF5A520408654D@039-SN1MPN1-004.039d.mgd.msft.net>
On Jan 17, 2011, at 5:58 AM, Aggrwal Poonam-B10812 wrote:
>
>
>> -----Original Message-----
>> From: linuxppc-dev-bounces+poonam.aggrwal=freescale.com@lists.ozlabs.org
>> [mailto:linuxppc-dev-
>> bounces+poonam.aggrwal=freescale.com@lists.ozlabs.org] On Behalf Of
>> Sergei Shtylyov
>> Sent: Monday, January 17, 2011 5:18 PM
>> To: Xu Lei-B33228
>> Cc: jgarzik@pobox.com; Gala Kumar-B11780; linuxppc-dev@lists.ozlabs.org;
>> linux-ide@vger.kernel.org
>> Subject: Re: [PATCH] ATA: Add FSL sata v2 controller support
>>
>> Hello.
>>
>> On 17-01-2011 10:10, Xulei wrote:
>>
>>> In FSL sata v2 block, the snoop bit of PRDT Word3 description
>>> information is at bit28 instead of bit22.
>>
>>> This patch adds FSL sata v2 probe and resolve this difference.
>>
>>> Signed-off-by: Xulei <B33228@freescale.com>
>>
>> AFAIK, full name is required.
>>
>>> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
>> [...]
>>
>>> diff --git a/arch/powerpc/boot/dts/p1022ds.dts
>>> b/arch/powerpc/boot/dts/p1022ds.dts
>>> index 2bbecbb..9ad41dd 100644
>>> --- a/arch/powerpc/boot/dts/p1022ds.dts
>>> +++ b/arch/powerpc/boot/dts/p1022ds.dts
>>> @@ -475,14 +475,14 @@
>>> };
>>>
>>> sata@18000 {
>>> - compatible = "fsl,mpc8536-sata", "fsl,pq-sata";
>>> + compatible = "fsl,p1022-sata", "fsl,pq-sata-v2";
>
> Can we fix this compatibity at run time by u-boot?
We can, but its not reason not to update the .dts as well.
- k
^ permalink raw reply
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Jesper Nilsson @ 2011-01-17 13:58 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org,
linux-sh@vger.kernel.org, H. Peter Anvin, Heiko Carstens,
Paul Mackerras, Helge Deller, sparclinux@vger.kernel.org,
Linux-Arch, linux-s390@vger.kernel.org, Jeremy Fitzhardinge,
Russell King - ARM Linux, Hirokazu Takata, x86@kernel.org,
James E.J. Bottomley, virtualization@lists.osdl.org, Ingo Molnar,
Matt Turner, Fenghua Yu, Mike Frysinger,
user-mode-linux-devel@lists.sourceforge.net,
Konrad Rzeszutek Wilk, Jeff Dike, Chris Metcalf, Mikael Starvik,
xen-devel@lists.xensource.com, Ivan Kokshaysky,
user-mode-linux-user@lists.sourceforge.net,
uclinux-dist-devel@blackfin.uclinux.org, Thomas Gleixner,
Richard Henderson, Tony Luck, linux-parisc@vger.kernel.org,
linux-cris-kernel, linux-kernel@vger.kernel.org, Ralf Baechle,
Kyle McMartin, Paul Mundt, linux-alpha@vger.kernel.org,
Martin Schwidefsky, linux390@de.ibm.com, Koichi Yasutake,
linuxppc-dev@lists.ozlabs.org, David S. Miller
In-Reply-To: <1295264509.30950.59.camel@laptop>
On Mon, Jan 17, 2011 at 12:41:49PM +0100, Peter Zijlstra wrote:
> Index: linux-2.6/arch/cris/arch-v32/kernel/smp.c
> ===================================================================
> --- linux-2.6.orig/arch/cris/arch-v32/kernel/smp.c
> +++ linux-2.6/arch/cris/arch-v32/kernel/smp.c
> @@ -340,15 +340,18 @@ irqreturn_t crisv32_ipi_interrupt(int ir
>
> ipi = REG_RD(intr_vect, irq_regs[smp_processor_id()], rw_ipi);
>
> + if (ipi.vector & IPI_SCHEDULE) {
> + scheduler_ipi();
> + }
> if (ipi.vector & IPI_CALL) {
> - func(info);
> + func(info);
> }
> if (ipi.vector & IPI_FLUSH_TLB) {
> - if (flush_mm == FLUSH_ALL)
> - __flush_tlb_all();
> - else if (flush_vma == FLUSH_ALL)
> + if (flush_mm == FLUSH_ALL)
> + __flush_tlb_all();
> + else if (flush_vma == FLUSH_ALL)
> __flush_tlb_mm(flush_mm);
> - else
> + else
> __flush_tlb_page(flush_vma, flush_addr);
> }
>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Chris Metcalf @ 2011-01-17 13:52 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linux-mips, linux-ia64, linux-sh, Heiko Carstens, Paul Mackerras,
H. Peter Anvin, sparclinux, Linux-Arch, linux-s390,
Jesper Nilsson, Jeremy Fitzhardinge, Russell King - ARM Linux,
Hirokazu Takata, x86, James E.J. Bottomley, virtualization,
Ingo Molnar, Matt Turner, Fenghua Yu, Mike Frysinger,
user-mode-linux-devel, Konrad Rzeszutek Wilk, Jeff Dike,
Mikael Starvik, xen-devel, Ivan Kokshaysky, user-mode-linux-user,
uclinux-dist-devel, Thomas Gleixner, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-kernel, Ralf Baechle,
David S. Miller, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
Helge Deller
In-Reply-To: <1295264509.30950.59.camel@laptop>
On 1/17/2011 6:41 AM, Peter Zijlstra wrote:
> Index: linux-2.6/arch/tile/kernel/smp.c
> ===================================================================
> --- linux-2.6.orig/arch/tile/kernel/smp.c
> +++ linux-2.6/arch/tile/kernel/smp.c
> @@ -184,12 +184,8 @@ void flush_icache_range(unsigned long st
> /* Called when smp_send_reschedule() triggers IRQ_RESCHEDULE. */
> static irqreturn_t handle_reschedule_ipi(int irq, void *token)
> {
> - /*
> - * Nothing to do here; when we return from interrupt, the
> - * rescheduling will occur there. But do bump the interrupt
> - * profiler count in the meantime.
> - */
> __get_cpu_var(irq_stat).irq_resched_count++;
> + scheduler_ipi();
>
> return IRQ_HANDLED;
> }
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ 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