* [PATCH v4 0/6] Krait L1/L2 EDAC driver
@ 2013-12-30 20:14 Stephen Boyd
[not found] ` <1388434457-4194-1-git-send-email-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-01-04 10:19 ` [PATCH v4 0/6] Krait L1/L2 EDAC driver Borislav Petkov
0 siblings, 2 replies; 9+ messages in thread
From: Stephen Boyd @ 2013-12-30 20:14 UTC (permalink / raw)
To: linux-edac
Cc: Mark Rutland, devicetree, Lorenzo Pieralisi, Russell King,
linux-arm-msm, Kumar Gala, linux-kernel, Stepan Moskovchenko,
Doug Thompson, David Brown, linux-arm-kernel
This patchset adds support for the Krait L1/L2 cache error detection
hardware. The first patch fixes a generic framework bug. The next
two patches lay the groundwork for this driver to be added by
exporting percpu irq functions as well as adding the Krait l2 indirection
register code. The next two patches add the driver and the binding and
the final patch hooks it all up by adding the device tree node.
I'm not sure which tree this is supposed to go through. Ideally we could
send the first 3 plus the 5th one through an edac tree. The final dts changes
could go through arm-soc via davidb's tree and the Documentation patch could
go through the devicetree tree.
Changes since v3:
* Fixed l1_irq handler to properly dereference dev_id
Changes since v2:
* Picked up acks
* s/an/a/ in DT binding
Changes since v1:
* Moved binding into cpus node
* Picked up acks on first two patches
* Commented krait l2 accessor functions
Stephen Boyd (6):
edac: Don't try to cancel workqueue when it's never setup
genirq: export percpu irq functions for module usage
ARM: Add Krait L2 accessor functions
devicetree: bindings: Document Krait L1/L2 EDAC
edac: Add support for Krait CPU cache error detection
ARM: dts: msm: Add Krait CPU/L2 nodes
Documentation/devicetree/bindings/arm/cpus.txt | 72 +++++
arch/arm/boot/dts/qcom-msm8974.dtsi | 41 +++
arch/arm/common/Kconfig | 3 +
arch/arm/common/Makefile | 1 +
arch/arm/common/krait-l2-accessors.c | 58 +++++
arch/arm/include/asm/krait-l2-accessors.h | 20 ++
drivers/edac/Kconfig | 8 +
drivers/edac/Makefile | 2 +
drivers/edac/edac_device.c | 3 +
drivers/edac/krait_edac.c | 346 +++++++++++++++++++++++++
kernel/irq/manage.c | 2 +
11 files changed, 556 insertions(+)
create mode 100644 arch/arm/common/krait-l2-accessors.c
create mode 100644 arch/arm/include/asm/krait-l2-accessors.h
create mode 100644 drivers/edac/krait_edac.c
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC
[not found] ` <1388434457-4194-1-git-send-email-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2013-12-30 20:14 ` Stephen Boyd
2014-01-07 10:54 ` Lorenzo Pieralisi
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2013-12-30 20:14 UTC (permalink / raw)
To: linux-edac-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Lorenzo Pieralisi, Mark Rutland, Kumar Gala,
devicetree-u79uwXL29TY76Z2rM5mHXA
The Krait L1/L2 error reporting device is made up of two
interrupts, one per-CPU interrupt for the L1 caches and one
interrupt for the L2 cache.
Cc: Lorenzo Pieralisi <lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Signed-off-by: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
Documentation/devicetree/bindings/arm/cpus.txt | 72 ++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 9130435..54de94b 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -191,6 +191,35 @@ nodes to be present and contain the properties described below.
property identifying a 64-bit zero-initialised
memory location.
+ - interrupts
+ Usage: required for cpus with compatible string "qcom,krait".
+ Value type: <prop-encoded-array>
+ Definition: L1/CPU error interrupt
+
+ - next-level-cache
+ Usage: optional
+ Value type: <phandle>
+ Definition: phandle pointing to the next level cache
+
+- cache node
+
+ Description: Describes a cache in an ARM based system
+
+ - compatible
+ Usage: required
+ Value type: <string>
+ Definition: shall contain at least "cache"
+
+ - cache-level
+ Usage: required
+ Value type: <u32>
+ Definition: level in the cache heirachy
+
+ - interrupts
+ Usage: required for cpus with compatible string "qcom,krait"
+ Value type: <prop-encoded-array>
+ Definition: the L2 error interrupt
+
Example 1 (dual-cluster big.LITTLE system 32-bit):
cpus {
@@ -382,3 +411,46 @@ cpus {
cpu-release-addr = <0 0x20000000>;
};
};
+
+
+Example 5 (Krait 32-bit system):
+
+cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts = <1 9 0xf04>;
+
+ cpu@0 {
+ device_type = "cpu";
+ compatible = "qcom,krait";
+ reg = <0>;
+ next-level-cache = <&L2>;
+ };
+
+ cpu@1 {
+ device_type = "cpu";
+ compatible = "qcom,krait";
+ reg = <1>;
+ next-level-cache = <&L2>;
+ };
+
+ cpu@2 {
+ device_type = "cpu";
+ compatible = "qcom,krait";
+ reg = <2>;
+ next-level-cache = <&L2>;
+ };
+
+ cpu@3 {
+ device_type = "cpu";
+ compatible = "qcom,krait";
+ reg = <3>;
+ next-level-cache = <&L2>;
+ };
+
+ L2: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ interrupts = <0 2 0x4>;
+ };
+};
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v4 0/6] Krait L1/L2 EDAC driver
2013-12-30 20:14 [PATCH v4 0/6] Krait L1/L2 EDAC driver Stephen Boyd
[not found] ` <1388434457-4194-1-git-send-email-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2014-01-04 10:19 ` Borislav Petkov
[not found] ` <20140104101901.GA4439-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
1 sibling, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2014-01-04 10:19 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-edac, linux-kernel, linux-arm-msm, linux-arm-kernel,
devicetree, Doug Thompson, Russell King, Stepan Moskovchenko,
David Brown, Mark Rutland, Kumar Gala, Lorenzo Pieralisi
On Mon, Dec 30, 2013 at 12:14:11PM -0800, Stephen Boyd wrote:
> This patchset adds support for the Krait L1/L2 cache error detection
> hardware. The first patch fixes a generic framework bug. The next
> two patches lay the groundwork for this driver to be added by
> exporting percpu irq functions as well as adding the Krait l2 indirection
> register code. The next two patches add the driver and the binding and
> the final patch hooks it all up by adding the device tree node.
>
> I'm not sure which tree this is supposed to go through. Ideally we could
> send the first 3 plus the 5th one through an edac tree.
Sure, I can take a look at the drivers/edac/ changes but I'd need an ack
for the arch/arm/ stuff before/if I pick it up, i.e. patch 3.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 0/6] Krait L1/L2 EDAC driver
[not found] ` <20140104101901.GA4439-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
@ 2014-01-06 22:09 ` Stephen Boyd
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2014-01-06 22:09 UTC (permalink / raw)
To: Borislav Petkov, Russell King, Mark Rutland
Cc: linux-edac-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA, Doug Thompson,
Stepan Moskovchenko, David Brown, Kumar Gala, Lorenzo Pieralisi
On 01/04/14 02:19, Borislav Petkov wrote:
> On Mon, Dec 30, 2013 at 12:14:11PM -0800, Stephen Boyd wrote:
>> This patchset adds support for the Krait L1/L2 cache error detection
>> hardware. The first patch fixes a generic framework bug. The next
>> two patches lay the groundwork for this driver to be added by
>> exporting percpu irq functions as well as adding the Krait l2 indirection
>> register code. The next two patches add the driver and the binding and
>> the final patch hooks it all up by adding the device tree node.
>>
>> I'm not sure which tree this is supposed to go through. Ideally we could
>> send the first 3 plus the 5th one through an edac tree.
> Sure, I can take a look at the drivers/edac/ changes but I'd need an ack
> for the arch/arm/ stuff before/if I pick it up, i.e. patch 3.
Ok great. Perhaps Russell King or Mark Rutland can ack the arch/arm patch.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC
2013-12-30 20:14 ` [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC Stephen Boyd
@ 2014-01-07 10:54 ` Lorenzo Pieralisi
2014-01-07 20:12 ` Stephen Boyd
0 siblings, 1 reply; 9+ messages in thread
From: Lorenzo Pieralisi @ 2014-01-07 10:54 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Mark Rutland, Kumar Gala,
devicetree@vger.kernel.org
On Mon, Dec 30, 2013 at 08:14:15PM +0000, Stephen Boyd wrote:
> The Krait L1/L2 error reporting device is made up of two
> interrupts, one per-CPU interrupt for the L1 caches and one
> interrupt for the L2 cache.
>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: <devicetree@vger.kernel.org>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
> Documentation/devicetree/bindings/arm/cpus.txt | 72 ++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
> index 9130435..54de94b 100644
> --- a/Documentation/devicetree/bindings/arm/cpus.txt
> +++ b/Documentation/devicetree/bindings/arm/cpus.txt
> @@ -191,6 +191,35 @@ nodes to be present and contain the properties described below.
> property identifying a 64-bit zero-initialised
> memory location.
>
> + - interrupts
> + Usage: required for cpus with compatible string "qcom,krait".
> + Value type: <prop-encoded-array>
> + Definition: L1/CPU error interrupt
> +
> + - next-level-cache
> + Usage: optional
> + Value type: <phandle>
> + Definition: phandle pointing to the next level cache
> +
> +- cache node
Not sure this binding (cache node) belongs in cpus.txt
I am working on defining cache bindings for ARM within the C-state
standardization effort:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/215543.html
> +
> + Description: Describes a cache in an ARM based system
> +
> + - compatible
> + Usage: required
> + Value type: <string>
> + Definition: shall contain at least "cache"
It is a bit vague, can't we just follow the ePAPR compatible definition ?
See posting above.
> +
> + - cache-level
> + Usage: required
> + Value type: <u32>
> + Definition: level in the cache heirachy
"hierarchy". I have a problem with the cache level definition, and in
particular the numbering, ie what the level number represents. If we
mean the cache level seen through the CLIDR and co., it is hard to use
it for shared caches since the level seen by different CPUs can actually
be different, or put it differently the level number might not be unique for
a shared cache. I need to think about a proper way to sort this out.
Lorenzo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC
2014-01-07 10:54 ` Lorenzo Pieralisi
@ 2014-01-07 20:12 ` Stephen Boyd
2014-01-08 10:05 ` Lorenzo Pieralisi
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2014-01-07 20:12 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Mark Rutland, Kumar Gala,
devicetree@vger.kernel.org
On 01/07, Lorenzo Pieralisi wrote:
>
> Not sure this binding (cache node) belongs in cpus.txt
>
> I am working on defining cache bindings for ARM within the C-state
> standardization effort:
>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/215543.html
Thanks I'll take a look.
>
> > +
> > + Description: Describes a cache in an ARM based system
> > +
> > + - compatible
> > + Usage: required
> > + Value type: <string>
> > + Definition: shall contain at least "cache"
>
> It is a bit vague, can't we just follow the ePAPR compatible definition ?
> See posting above.
Hm.. I thought this did follow the ePAPR spec. I see 'compatible,
required, string, A standard property. The value shall include
the string "cache".' Looks the same?
And I see 'cache-level, required, u32, Specifies the level in the
cache hierarchy. For example, a level 2 cache has a value of
<2>.'
>
> > +
> > + - cache-level
> > + Usage: required
> > + Value type: <u32>
> > + Definition: level in the cache heirachy
>
> "hierarchy".
Thanks.
> I have a problem with the cache level definition, and in
> particular the numbering, ie what the level number represents. If we
> mean the cache level seen through the CLIDR and co., it is hard to use
> it for shared caches since the level seen by different CPUs can actually
> be different, or put it differently the level number might not be unique for
> a shared cache. I need to think about a proper way to sort this out.
>
Ok. I don't even use this property in my driver. All I really
need is the phandle from cpus pointing to the L2 and the
interrupts property in the L2 node.
How do you want to proceed here? If your cache binding goes
through I would just need to add the interrupts part. Or you
could even add that part in the same patch, you could have my
signed-off-by for that.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC
2014-01-07 20:12 ` Stephen Boyd
@ 2014-01-08 10:05 ` Lorenzo Pieralisi
2014-01-09 20:52 ` Stephen Boyd
0 siblings, 1 reply; 9+ messages in thread
From: Lorenzo Pieralisi @ 2014-01-08 10:05 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Mark Rutland, Kumar Gala,
devicetree@vger.kernel.org
On Tue, Jan 07, 2014 at 08:12:39PM +0000, Stephen Boyd wrote:
> On 01/07, Lorenzo Pieralisi wrote:
> >
> > Not sure this binding (cache node) belongs in cpus.txt
> >
> > I am working on defining cache bindings for ARM within the C-state
> > standardization effort:
> >
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/215543.html
>
> Thanks I'll take a look.
>
> >
> > > +
> > > + Description: Describes a cache in an ARM based system
> > > +
> > > + - compatible
> > > + Usage: required
> > > + Value type: <string>
> > > + Definition: shall contain at least "cache"
> >
> > It is a bit vague, can't we just follow the ePAPR compatible definition ?
> > See posting above.
>
> Hm.. I thought this did follow the ePAPR spec. I see 'compatible,
> required, string, A standard property. The value shall include
> the string "cache".' Looks the same?
Sorry, my bad, you are right.
> And I see 'cache-level, required, u32, Specifies the level in the
> cache hierarchy. For example, a level 2 cache has a value of
> <2>.'
We need to define it properly for ARM, I am not sure we can use level
as defined in CLIDR, I need to think more about this.
> >
> > > +
> > > + - cache-level
> > > + Usage: required
> > > + Value type: <u32>
> > > + Definition: level in the cache heirachy
> >
> > "hierarchy".
>
> Thanks.
>
> > I have a problem with the cache level definition, and in
> > particular the numbering, ie what the level number represents. If we
> > mean the cache level seen through the CLIDR and co., it is hard to use
> > it for shared caches since the level seen by different CPUs can actually
> > be different, or put it differently the level number might not be unique for
> > a shared cache. I need to think about a proper way to sort this out.
> >
>
> Ok. I don't even use this property in my driver. All I really
> need is the phandle from cpus pointing to the L2 and the
> interrupts property in the L2 node.
>
> How do you want to proceed here? If your cache binding goes
> through I would just need to add the interrupts part. Or you
> could even add that part in the same patch, you could have my
> signed-off-by for that.
Ok, I will try to update the bindings with the interrupt part and copy
you in, even though the level definition worries me a bit, it is an
important property for power management and I need to find a proper
solution before bindings can get accepted (basically the problem is:
if different CPUs can see a cache at different levels as defined in the
CLIDR we cannot describe a cache with a single cache level or put it
differently, level can not represent the value in the CLIDR hence we
need to describe it differently).
Lorenzo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC
2014-01-08 10:05 ` Lorenzo Pieralisi
@ 2014-01-09 20:52 ` Stephen Boyd
2014-01-10 10:54 ` Lorenzo Pieralisi
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2014-01-09 20:52 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Mark Rutland, Kumar Gala,
devicetree@vger.kernel.org
On 01/08/14 02:05, Lorenzo Pieralisi wrote:
> On Tue, Jan 07, 2014 at 08:12:39PM +0000, Stephen Boyd wrote:
>> On 01/07, Lorenzo Pieralisi wrote:
>>
>>> I have a problem with the cache level definition, and in
>>> particular the numbering, ie what the level number represents. If we
>>> mean the cache level seen through the CLIDR and co., it is hard to use
>>> it for shared caches since the level seen by different CPUs can actually
>>> be different, or put it differently the level number might not be unique for
>>> a shared cache. I need to think about a proper way to sort this out.
>>>
>> Ok. I don't even use this property in my driver. All I really
>> need is the phandle from cpus pointing to the L2 and the
>> interrupts property in the L2 node.
>>
>> How do you want to proceed here? If your cache binding goes
>> through I would just need to add the interrupts part. Or you
>> could even add that part in the same patch, you could have my
>> signed-off-by for that.
> Ok, I will try to update the bindings with the interrupt part and copy
> you in, even though the level definition worries me a bit, it is an
> important property for power management and I need to find a proper
> solution before bindings can get accepted (basically the problem is:
> if different CPUs can see a cache at different levels as defined in the
> CLIDR we cannot describe a cache with a single cache level or put it
> differently, level can not represent the value in the CLIDR hence we
> need to describe it differently).
Ok. I've dropped the cache part from this patch. I left the example as
is minus the cache-level attribute.
Understanding how the cache-level value would be used might help. I
wonder if the cache-level can just be a number that describes the
largest value that the cache could be assigned. Then if you have
different CPUs seeing different levels of cache they can traverse from
their CPU node to the cache and count how many phandles they went through.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC
2014-01-09 20:52 ` Stephen Boyd
@ 2014-01-10 10:54 ` Lorenzo Pieralisi
0 siblings, 0 replies; 9+ messages in thread
From: Lorenzo Pieralisi @ 2014-01-10 10:54 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Mark Rutland, Kumar Gala,
devicetree@vger.kernel.org
On Thu, Jan 09, 2014 at 08:52:21PM +0000, Stephen Boyd wrote:
> On 01/08/14 02:05, Lorenzo Pieralisi wrote:
> > On Tue, Jan 07, 2014 at 08:12:39PM +0000, Stephen Boyd wrote:
> >> On 01/07, Lorenzo Pieralisi wrote:
> >>
> >>> I have a problem with the cache level definition, and in
> >>> particular the numbering, ie what the level number represents. If we
> >>> mean the cache level seen through the CLIDR and co., it is hard to use
> >>> it for shared caches since the level seen by different CPUs can actually
> >>> be different, or put it differently the level number might not be unique for
> >>> a shared cache. I need to think about a proper way to sort this out.
> >>>
> >> Ok. I don't even use this property in my driver. All I really
> >> need is the phandle from cpus pointing to the L2 and the
> >> interrupts property in the L2 node.
> >>
> >> How do you want to proceed here? If your cache binding goes
> >> through I would just need to add the interrupts part. Or you
> >> could even add that part in the same patch, you could have my
> >> signed-off-by for that.
> > Ok, I will try to update the bindings with the interrupt part and copy
> > you in, even though the level definition worries me a bit, it is an
> > important property for power management and I need to find a proper
> > solution before bindings can get accepted (basically the problem is:
> > if different CPUs can see a cache at different levels as defined in the
> > CLIDR we cannot describe a cache with a single cache level or put it
> > differently, level can not represent the value in the CLIDR hence we
> > need to describe it differently).
>
> Ok. I've dropped the cache part from this patch. I left the example as
> is minus the cache-level attribute.
>
> Understanding how the cache-level value would be used might help. I
> wonder if the cache-level can just be a number that describes the
> largest value that the cache could be assigned. Then if you have
> different CPUs seeing different levels of cache they can traverse from
> their CPU node to the cache and count how many phandles they went through.
Yes, that's one of the solutions I envisaged, and likely to be the one
that I will put forward since it requires almost no changes. If we go that way
cache-level becomes pretty useless though (which might be a good thing) and I
do not like the implicit cache level obtained by counting phandles.
Another option would be making cache-level a list and add a property
"cache-level-affinity" as 1:1 map list of phandles to cpu-map node to define for
each CPU the level at which that cache is mapped, somthing like the bindings
described here for IRQ affinity:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-April/162466.html
I would say I tend to prefer the latter option, since I do not like relying
on unwritten rules (implicit level numbering implied by phandle traversal) but
I am open to suggestions.
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-10 10:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-30 20:14 [PATCH v4 0/6] Krait L1/L2 EDAC driver Stephen Boyd
[not found] ` <1388434457-4194-1-git-send-email-sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-12-30 20:14 ` [PATCH v4 4/6] devicetree: bindings: Document Krait L1/L2 EDAC Stephen Boyd
2014-01-07 10:54 ` Lorenzo Pieralisi
2014-01-07 20:12 ` Stephen Boyd
2014-01-08 10:05 ` Lorenzo Pieralisi
2014-01-09 20:52 ` Stephen Boyd
2014-01-10 10:54 ` Lorenzo Pieralisi
2014-01-04 10:19 ` [PATCH v4 0/6] Krait L1/L2 EDAC driver Borislav Petkov
[not found] ` <20140104101901.GA4439-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2014-01-06 22:09 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).