* [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware
@ 2013-10-29 21:05 Helge Deller
2013-10-29 21:10 ` John David Anglin
2013-10-29 21:26 ` James Bottomley
0 siblings, 2 replies; 5+ messages in thread
From: Helge Deller @ 2013-10-29 21:05 UTC (permalink / raw)
To: linux-parisc, James Bottomley
Our value of SHMLBA is hardcoded to 4MB on parisc due to aliasing restrictions
of the platform. The firmware function PDC_CACHE does return the machine
dependend value of this aliasing requirement.
So, if there is a difference between those two - which we don't expect - let's
report it at least.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index c035673..3523e20 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -142,6 +142,15 @@ parisc_cache_init(void)
if (pdc_cache_info(&cache_info) < 0)
panic("parisc_cache_init: pdc_cache_info failed");
+ /*
+ * The alias field returned by PDC_CACHE specifies the aliasing
+ * boundaries for virtual addresses. So, let's verify if our hardcoded
+ * value of SHMLBA (4 MB) is correct for this machine.
+ */
+ if ((4096UL << (cache_info.dc_conf.cc_alias-1)) != SHMLBA)
+ pr_warn("WARNING: PDC_CACHE returns aliasing of %lu kB.\n",
+ (4UL << (cache_info.dc_conf.cc_alias-1)));
+
#if 0
printk("ic_size %lx dc_size %lx it_size %lx\n",
cache_info.ic_size,
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware
2013-10-29 21:05 [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware Helge Deller
@ 2013-10-29 21:10 ` John David Anglin
2013-10-29 21:11 ` Helge Deller
2013-10-29 21:26 ` James Bottomley
1 sibling, 1 reply; 5+ messages in thread
From: John David Anglin @ 2013-10-29 21:10 UTC (permalink / raw)
To: Helge Deller, linux-parisc, James Bottomley
I seem to recall the aliasing boundary value returned by my rp3440 is
"unknown".
On 10/29/2013 5:05 PM, Helge Deller wrote:
> Our value of SHMLBA is hardcoded to 4MB on parisc due to aliasing restrictions
> of the platform. The firmware function PDC_CACHE does return the machine
> dependend value of this aliasing requirement.
> So, if there is a difference between those two - which we don't expect - let's
> report it at least.
>
> Signed-off-by: Helge Deller <deller@gmx.de>
>
> diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
> index c035673..3523e20 100644
> --- a/arch/parisc/kernel/cache.c
> +++ b/arch/parisc/kernel/cache.c
> @@ -142,6 +142,15 @@ parisc_cache_init(void)
> if (pdc_cache_info(&cache_info) < 0)
> panic("parisc_cache_init: pdc_cache_info failed");
>
> + /*
> + * The alias field returned by PDC_CACHE specifies the aliasing
> + * boundaries for virtual addresses. So, let's verify if our hardcoded
> + * value of SHMLBA (4 MB) is correct for this machine.
> + */
> + if ((4096UL << (cache_info.dc_conf.cc_alias-1)) != SHMLBA)
> + pr_warn("WARNING: PDC_CACHE returns aliasing of %lu kB.\n",
> + (4UL << (cache_info.dc_conf.cc_alias-1)));
> +
> #if 0
> printk("ic_size %lx dc_size %lx it_size %lx\n",
> cache_info.ic_size,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware
2013-10-29 21:10 ` John David Anglin
@ 2013-10-29 21:11 ` Helge Deller
0 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2013-10-29 21:11 UTC (permalink / raw)
To: John David Anglin, linux-parisc, James Bottomley
On 10/29/2013 10:10 PM, John David Anglin wrote:
> I seem to recall the aliasing boundary value returned by my rp3440 is "unknown".
Even better, then it would be interesting to see what this patch reports on
your machine....
>
> On 10/29/2013 5:05 PM, Helge Deller wrote:
>> Our value of SHMLBA is hardcoded to 4MB on parisc due to aliasing restrictions
>> of the platform. The firmware function PDC_CACHE does return the machine
>> dependend value of this aliasing requirement.
>> So, if there is a difference between those two - which we don't expect - let's
>> report it at least.
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>>
>> diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
>> index c035673..3523e20 100644
>> --- a/arch/parisc/kernel/cache.c
>> +++ b/arch/parisc/kernel/cache.c
>> @@ -142,6 +142,15 @@ parisc_cache_init(void)
>> if (pdc_cache_info(&cache_info) < 0)
>> panic("parisc_cache_init: pdc_cache_info failed");
>> + /*
>> + * The alias field returned by PDC_CACHE specifies the aliasing
>> + * boundaries for virtual addresses. So, let's verify if our hardcoded
>> + * value of SHMLBA (4 MB) is correct for this machine.
>> + */
>> + if ((4096UL << (cache_info.dc_conf.cc_alias-1)) != SHMLBA)
>> + pr_warn("WARNING: PDC_CACHE returns aliasing of %lu kB.\n",
>> + (4UL << (cache_info.dc_conf.cc_alias-1)));
>> +
>> #if 0
>> printk("ic_size %lx dc_size %lx it_size %lx\n",
>> cache_info.ic_size,
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware
2013-10-29 21:05 [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware Helge Deller
2013-10-29 21:10 ` John David Anglin
@ 2013-10-29 21:26 ` James Bottomley
2013-10-29 21:28 ` Helge Deller
1 sibling, 1 reply; 5+ messages in thread
From: James Bottomley @ 2013-10-29 21:26 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-parisc
On Tue, 2013-10-29 at 22:05 +0100, Helge Deller wrote:
> Our value of SHMLBA is hardcoded to 4MB on parisc due to aliasing restrictions
> of the platform. The firmware function PDC_CACHE does return the machine
> dependend value of this aliasing requirement.
> So, if there is a difference between those two - which we don't expect - let's
> report it at least.
We know that architecturally it's defined to be 16MB. However, we also
know from the chip architects that the greatest stride ever done or
planned was 4MB, which is why we use it. HPUX does the same, so there's
not much point issuing a warning, because it's likely that IODC isn't
setting up the values correctly and there's nothing a warning will
achieve except worrying the users if they bother to read it.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware
2013-10-29 21:26 ` James Bottomley
@ 2013-10-29 21:28 ` Helge Deller
0 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2013-10-29 21:28 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-parisc
On 10/29/2013 10:26 PM, James Bottomley wrote:
> On Tue, 2013-10-29 at 22:05 +0100, Helge Deller wrote:
>> Our value of SHMLBA is hardcoded to 4MB on parisc due to aliasing restrictions
>> of the platform. The firmware function PDC_CACHE does return the machine
>> dependend value of this aliasing requirement.
>> So, if there is a difference between those two - which we don't expect - let's
>> report it at least.
>
> We know that architecturally it's defined to be 16MB. However, we also
> know from the chip architects that the greatest stride ever done or
> planned was 4MB, which is why we use it. HPUX does the same, so there's
> not much point issuing a warning, because it's likely that IODC isn't
> setting up the values correctly and there's nothing a warning will
> achieve except worrying the users if they bother to read it.
Ok, thanks for this info.
I'll drop that patch.
Helge
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-29 21:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 21:05 [PATCH] parisc: check hardcoded value of SHMLBA against value reported by firmware Helge Deller
2013-10-29 21:10 ` John David Anglin
2013-10-29 21:11 ` Helge Deller
2013-10-29 21:26 ` James Bottomley
2013-10-29 21:28 ` Helge Deller
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).