mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
parisc/firmware: Fix F-extend for PDC addresses
commit 735ae74f73
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>
This commit is contained in:
parent
0b093176fd
commit
71602d95ae
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue