Skip to content

Commit 735ae74

Browse files
committed
parisc/firmware: Fix F-extend for PDC addresses
When running with narrow firmware (64-bit kernel using a 32-bit firmware), extend PDC addresses into the 0xfffffff0.00000000 region instead of the 0xf0f0f0f0.00000000 region. This fixes the power button on the C3700 machine in qemu (64-bit CPU with 32-bit firmware), and my assumption is that the previous code was really never used (because most 64-bit machines have a 64-bit firmware), or it just worked on very old machines because they may only decode 40-bit of virtual addresses. Cc: stable@vger.kernel.org Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 0dd3ee3 commit 735ae74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/parisc/kernel/firmware.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ static unsigned long f_extend(unsigned long address)
123123
#ifdef CONFIG_64BIT
124124
if(unlikely(parisc_narrow_firmware)) {
125125
if((address & 0xff000000) == 0xf0000000)
126-
return 0xf0f0f0f000000000UL | (u32)address;
126+
return (0xfffffff0UL << 32) | (u32)address;
127127

128128
if((address & 0xf0000000) == 0xf0000000)
129-
return 0xffffffff00000000UL | (u32)address;
129+
return (0xffffffffUL << 32) | (u32)address;
130130
}
131131
#endif
132132
return address;

0 commit comments

Comments
 (0)