forked from Minki/linux
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: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
7e0b2be94c
commit
1e93848a38
@ -83,7 +83,7 @@ extern unsigned long pdc_result2[NUM_PDC_RESULT];
|
||||
|
||||
/* Firmware needs to be initially set to narrow to determine the
|
||||
* actual firmware width. */
|
||||
int parisc_narrow_firmware __ro_after_init = 1;
|
||||
int parisc_narrow_firmware __ro_after_init = 2;
|
||||
#endif
|
||||
|
||||
/* On most currently-supported platforms, IODC I/O calls are 32-bit calls
|
||||
@ -174,6 +174,11 @@ void set_firmware_width_unlocked(void)
|
||||
void set_firmware_width(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
/* already initialized? */
|
||||
if (parisc_narrow_firmware != 2)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&pdc_lock, flags);
|
||||
set_firmware_width_unlocked();
|
||||
spin_unlock_irqrestore(&pdc_lock, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user