Skip to content

Commit 1e93848

Browse files
committed
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>
1 parent 7e0b2be commit 1e93848

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arch/parisc/kernel/firmware.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ extern unsigned long pdc_result2[NUM_PDC_RESULT];
8383

8484
/* Firmware needs to be initially set to narrow to determine the
8585
* actual firmware width. */
86-
int parisc_narrow_firmware __ro_after_init = 1;
86+
int parisc_narrow_firmware __ro_after_init = 2;
8787
#endif
8888

8989
/* On most currently-supported platforms, IODC I/O calls are 32-bit calls
@@ -174,6 +174,11 @@ void set_firmware_width_unlocked(void)
174174
void set_firmware_width(void)
175175
{
176176
unsigned long flags;
177+
178+
/* already initialized? */
179+
if (parisc_narrow_firmware != 2)
180+
return;
181+
177182
spin_lock_irqsave(&pdc_lock, flags);
178183
set_firmware_width_unlocked();
179184
spin_unlock_irqrestore(&pdc_lock, flags);

0 commit comments

Comments
 (0)