diff options
| author | Helge Deller <deller@gmx.de> | 2024-01-03 21:02:16 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-31 16:16:59 -0800 |
| commit | 71602d95ae6401382a359ca7fced6c7a9dda0104 (patch) | |
| tree | 817a343a5371044e610c9924168df5b24b80cc7a /arch/parisc/kernel | |
| parent | 0b093176fd0967a5f56e2c86b0d48247f6c0fa0f (diff) | |
| download | linux-71602d95ae6401382a359ca7fced6c7a9dda0104.tar.gz linux-71602d95ae6401382a359ca7fced6c7a9dda0104.tar.bz2 linux-71602d95ae6401382a359ca7fced6c7a9dda0104.zip | |
parisc/firmware: Fix F-extend for PDC addresses
commit 735ae74f73e55c191d48689bd11ff4a06ea0508f upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc/kernel')
| -rw-r--r-- | arch/parisc/kernel/firmware.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 3e051a973e9b..92276bcf19d7 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -123,10 +123,10 @@ static unsigned long f_extend(unsigned long address) #ifdef CONFIG_64BIT if(unlikely(parisc_narrow_firmware)) { if((address & 0xff000000) == 0xf0000000) - return 0xf0f0f0f000000000UL | (u32)address; + return (0xfffffff0UL << 32) | (u32)address; if((address & 0xf0000000) == 0xf0000000) - return 0xffffffff00000000UL | (u32)address; + return (0xffffffffUL << 32) | (u32)address; } #endif return address; |
