* [PATCH] ia64: allow user to skip_check_sal_cache_flush
@ 2008-05-07 23:36 Alex Chiang
2008-05-08 0:01 ` Luck, Tony
2008-05-08 20:03 ` Alex Chiang
0 siblings, 2 replies; 3+ messages in thread
From: Alex Chiang @ 2008-05-07 23:36 UTC (permalink / raw)
To: linux-ia64
Hi Tony,
A long time ago, when check_sal_cache_flush() was added to work
around some broken HP firmware, that workaround broke some other
HP platforms with different broken firmware (notably, the
rx2600). :-/
There's a firmware fix for the machines in that second category,
but if the fix isn't applied and the user attempts to boot a
modern kernel, they'll hang.
We also have some HP protos that were never shipped, who will
never get an updated firmware, but are actually still useful,
assuming we can get them to boot. ;)
It would be nice to get this patch in mainline, so people with
known broken firmware can avoid the logic in check_sal_cache_flush
if necessary.
Thanks.
/ac
From: Alex Chiang <achiang@hp.com>
The sequence executed in check_sal_cache_flush:
- pend a timer interrupt
- call SAL_CACHE_FLUSH
- see if interrupt is still pending
can hang HP machines with buggy SAL_CACHE_FLUSH implementations.
Provide a kernel command-line argument to allow users skip this
check if desired.
Signed-off-by: Alex Chiang <achiang@hp.com>
---
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c
index a3022dc..65163b7 100644
--- a/arch/ia64/kernel/sal.c
+++ b/arch/ia64/kernel/sal.c
@@ -229,6 +229,14 @@ static void __init sal_desc_ap_wakeup(void *p) { }
*/
static int sal_cache_flush_drops_interrupts;
+static int __init
+skip_check_sal_cache_flush(char *str)
+{
+ sal_cache_flush_drops_interrupts = 1;
+ return 0;
+}
+early_param("skip_check_sal_cache_flush", skip_check_sal_cache_flush);
+
void __init
check_sal_cache_flush (void)
{
@@ -237,6 +245,9 @@ check_sal_cache_flush (void)
u64 vector, cache_type = 3;
struct ia64_sal_retval isrv;
+ if (sal_cache_flush_drops_interrupts)
+ return;
+
cpu = get_cpu();
local_irq_save(flags);
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH] ia64: allow user to skip_check_sal_cache_flush
2008-05-07 23:36 [PATCH] ia64: allow user to skip_check_sal_cache_flush Alex Chiang
@ 2008-05-08 0:01 ` Luck, Tony
2008-05-08 20:03 ` Alex Chiang
1 sibling, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2008-05-08 0:01 UTC (permalink / raw)
To: linux-ia64
> +early_param("skip_check_sal_cache_flush", skip_check_sal_cache_flush);
Please document this in Documentation/kernel-paramters.txt
Perhaps this would set the record for the longest kenrel parameter,
but I don't think this is a good thing. Can you abbreviate while
still being descriptive?
-Tony
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ia64: allow user to skip_check_sal_cache_flush
2008-05-07 23:36 [PATCH] ia64: allow user to skip_check_sal_cache_flush Alex Chiang
2008-05-08 0:01 ` Luck, Tony
@ 2008-05-08 20:03 ` Alex Chiang
1 sibling, 0 replies; 3+ messages in thread
From: Alex Chiang @ 2008-05-08 20:03 UTC (permalink / raw)
To: linux-ia64
* Luck, Tony <tony.luck@intel.com>:
> > +early_param("skip_check_sal_cache_flush", skip_check_sal_cache_flush);
>
> Please document this in Documentation/kernel-paramters.txt
>
> Perhaps this would set the record for the longest kenrel parameter,
> but I don't think this is a good thing. Can you abbreviate while
> still being descriptive?
Sure, how about force_pal_cache_flush? It saves 5 chars and is
more explicit about what you're doing.
/ac
From: Alex Chiang <achiang@hp.com>
Subject: ia64: allow user to force_pal_cache_flush
The sequence executed in check_sal_cache_flush:
- pend a timer interrupt
- call SAL_CACHE_FLUSH
- see if interrupt is still pending
can hang HP machines with buggy SAL_CACHE_FLUSH implementations.
Provide a kernel command-line argument to allow users skip this
check if desired. Using this parameter will force ia64_sal_cache_flush
to call ia64_pal_cache_flush() instead of SAL_CACHE_FLUSH.
Signed-off-by: Alex Chiang <achiang@hp.com>
---
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index cdd5b93..654d630 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -689,6 +689,12 @@ and is between 256 and 4096 characters. It is defined in the file
floppy= [HW]
See Documentation/floppy.txt.
+ force_pal_cache_flush
+ [IA-64] Avoid check_sal_cache_flush which may hang on
+ buggy SAL_CACHE_FLUSH implementations. Using this
+ parameter will force ia64_sal_cache_flush to call
+ ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
+
gamecon.map[2|3] [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
support via parallel port (up to 5 devices per port)
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c
index a3022dc..7e02597 100644
--- a/arch/ia64/kernel/sal.c
+++ b/arch/ia64/kernel/sal.c
@@ -229,6 +229,14 @@ static void __init sal_desc_ap_wakeup(void *p) { }
*/
static int sal_cache_flush_drops_interrupts;
+static int __init
+force_pal_cache_flush(char *str)
+{
+ sal_cache_flush_drops_interrupts = 1;
+ return 0;
+}
+early_param("force_pal_cache_flush", force_pal_cache_flush);
+
void __init
check_sal_cache_flush (void)
{
@@ -237,6 +245,9 @@ check_sal_cache_flush (void)
u64 vector, cache_type = 3;
struct ia64_sal_retval isrv;
+ if (sal_cache_flush_drops_interrupts)
+ return;
+
cpu = get_cpu();
local_irq_save(flags);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-08 20:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07 23:36 [PATCH] ia64: allow user to skip_check_sal_cache_flush Alex Chiang
2008-05-08 0:01 ` Luck, Tony
2008-05-08 20:03 ` Alex Chiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox