powerpc: Fix little endian lppaca, slb_shadow and dtl_entry
The lppaca, slb_shadow and dtl_entry hypervisor structures are big endian, so we have to byte swap them in little endian builds. LE KVM hosts will also need to be fixed but for now add an #error to remind us. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
c72cd555e8
commit
7ffcf8ec26
@@ -443,8 +443,12 @@ good_area:
|
||||
regs, address);
|
||||
#ifdef CONFIG_PPC_SMLPAR
|
||||
if (firmware_has_feature(FW_FEATURE_CMO)) {
|
||||
u32 page_ins;
|
||||
|
||||
preempt_disable();
|
||||
get_lppaca()->page_ins += (1 << PAGE_FACTOR);
|
||||
page_ins = be32_to_cpu(get_lppaca()->page_ins);
|
||||
page_ins += 1 << PAGE_FACTOR;
|
||||
get_lppaca()->page_ins = cpu_to_be32(page_ins);
|
||||
preempt_enable();
|
||||
}
|
||||
#endif /* CONFIG_PPC_SMLPAR */
|
||||
|
Reference in New Issue
Block a user