Skip to content

Commit 9f5989d

Browse files
committed
parisc/firmware: Use PDC constants for narrow/wide firmware
PDC uses the PDC_MODEL_OS64 and PDC_MODEL_OS32 constants, so use those constants for the internal WIDE_FIRMWARE/NARROW_FIRMWARE too. Signed-off-by: Helge Deller <[email protected]>
1 parent 06a2e49 commit 9f5989d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/parisc/kernel/firmware.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ static unsigned long pdc_result[NUM_PDC_RESULT] __aligned(8);
7878
static unsigned long pdc_result2[NUM_PDC_RESULT] __aligned(8);
7979

8080
#ifdef CONFIG_64BIT
81-
#define WIDE_FIRMWARE 0x1
82-
#define NARROW_FIRMWARE 0x2
81+
#define WIDE_FIRMWARE PDC_MODEL_OS64
82+
#define NARROW_FIRMWARE PDC_MODEL_OS32
8383

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

8989
/* On most currently-supported platforms, IODC I/O calls are 32-bit calls
@@ -166,10 +166,10 @@ void set_firmware_width_unlocked(void)
166166
if (pdc_result[0] != NARROW_FIRMWARE)
167167
parisc_narrow_firmware = 0;
168168
}
169-
169+
170170
/**
171171
* set_firmware_width - Determine if the firmware is wide or narrow.
172-
*
172+
*
173173
* This function must be called before any pdc_* function that uses the
174174
* convert_to_wide function.
175175
*/
@@ -178,7 +178,7 @@ void set_firmware_width(void)
178178
unsigned long flags;
179179

180180
/* already initialized? */
181-
if (parisc_narrow_firmware != 2)
181+
if (parisc_narrow_firmware != NARROW_FIRMWARE)
182182
return;
183183

184184
spin_lock_irqsave(&pdc_lock, flags);

0 commit comments

Comments
 (0)