Commit 1e93848a authored by Helge Deller's avatar Helge Deller

parisc: Ensure set_firmware_width() is called only once

Call set_firmware_width() only once at runtime.
This prevents that hotplugged CPUs will get stuck in spinlocks later on.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 7e0b2be9
...@@ -83,7 +83,7 @@ extern unsigned long pdc_result2[NUM_PDC_RESULT]; ...@@ -83,7 +83,7 @@ extern unsigned long pdc_result2[NUM_PDC_RESULT];
/* Firmware needs to be initially set to narrow to determine the /* Firmware needs to be initially set to narrow to determine the
* actual firmware width. */ * actual firmware width. */
int parisc_narrow_firmware __ro_after_init = 1; int parisc_narrow_firmware __ro_after_init = 2;
#endif #endif
/* On most currently-supported platforms, IODC I/O calls are 32-bit calls /* On most currently-supported platforms, IODC I/O calls are 32-bit calls
...@@ -174,6 +174,11 @@ void set_firmware_width_unlocked(void) ...@@ -174,6 +174,11 @@ void set_firmware_width_unlocked(void)
void set_firmware_width(void) void set_firmware_width(void)
{ {
unsigned long flags; unsigned long flags;
/* already initialized? */
if (parisc_narrow_firmware != 2)
return;
spin_lock_irqsave(&pdc_lock, flags); spin_lock_irqsave(&pdc_lock, flags);
set_firmware_width_unlocked(); set_firmware_width_unlocked();
spin_unlock_irqrestore(&pdc_lock, flags); spin_unlock_irqrestore(&pdc_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment