xen/arm64: Drop relocate_and_switch_ttbr() stub
PATCH 1/1 xen/arm64: Drop relocate_and_switch_ttbr() stub
In the original patch e7a80636f16e ("xen/arm: add cache coloring support for Xen image"), the stub was added under wrong assumption that DCE won't remove the function call if it's not static. This assumption is incorrect as we already rely on DCE for cases like this one. Therefore drop the stub, that otherwise would be a place potentially prone to errors in the future.
---
As suggested by Julien, we should have it for 4.20. Leaving a stub like that without something like BUG_ON inside can potentially lead to problems in the future provided the function misuse slipped through the review process.
--- xen/arch/arm/arm64/mmu/mm.c | 2 -- 1 file changed, 2 deletions(-)
xen/arch/arm/arm64/mmu/mm.c +0 -2
@@ -171,8 +171,6 @@ void __init relocate_and_switch_ttbr(uint64_t ttbr)*/ update_identity_mapping(false); } -#else -void __init relocate_and_switch_ttbr (uint64_t ttbr) {}#endif void __init switch_ttbr (uint64_t ttbr)
Signature · 1 line
2.25.1
Quoted 11 lines · Michal Orzel
In the original patch
e7a80636f16e("xen/arm: add cache coloring support for Xen image"), the stub was added under wrong assumption that DCE won't remove the function call if it's not static. This assumption is incorrect as we already rely on DCE for cases like this one. Therefore drop the stub, that otherwise would be a place potentially prone to errors in the future.
Quoted 3 lines
Suggested-by Julien Grall <[email protected]>Signed-off-by Michal Orzel <[email protected]>---
Luca Fancellu
Reviewed-byQuoted 15 lines · Luca Fancellu
Quoted 12 lines · Michal Orzel
In the original patch
e7a80636f16e("xen/arm: add cache coloring support for Xen image"), the stub was added under wrong assumption that DCE won't remove the function call if it's not static. This assumption is incorrect as we already rely on DCE for cases like this one. Therefore drop the stub, that otherwise would be a place potentially prone to errors in the future.
Quoted 5 lines
Quoted 3 lines
Suggested-by Julien Grall <[email protected]>Signed-off-by Michal Orzel <[email protected]>---
Reviewed-by Luca Fancellu <[email protected]>
Apologies, I meant:
Quoted 3 lines
Quoted 7 lines · Michal Orzel
In the original patch
e7a80636f16e("xen/arm: add cache coloring support for Xen image"), the stub was added under wrong assumption that DCE won't remove the function call if it's not static. This assumption is incorrect as we already rely on DCE for cases like this one. Therefore drop the stub, that otherwise would be a place potentially prone to errors in the future.
Quoted 7 lines
Suggested-by Julien Grall<[email protected]>Signed-off-by Michal Orzel<[email protected]>---
As suggested by Julien, we should have it for 4.20. Leaving a stub like that without something likeBUG_ONinside can potentially lead to problems in the future provided the function misuse slipped through the review process.
---
~ Oleksii
Quoted 16 lines
xen/arch/arm/arm64/mmu/mm.c | 2 -- 1 file changed, 2 deletions(-)xen/arch/arm/arm64/mmu/mm.c +0
-2@@ -171,8 +171,6 @@ void __init relocate_and_switch_ttbr(uint64_t ttbr)*/ update_identity_mapping(false); } -#else -void __init relocate_and_switch_ttbr (uint64_t ttbr) {}#endif void __init switch_ttbr (uint64_t ttbr)
Hi Michal
Quoted 11 lines · Michal Orzel
In the original patch
e7a80636f16e("xen/arm: add cache coloring support for Xen image"), the stub was added under wrong assumption that DCE won't remove the function call if it's not static. This assumption is incorrect as we already rely on DCE for cases like this one. Therefore drop the stub, that otherwise would be a place potentially prone to errors in the future.Suggested-by Julien Grall <[email protected]>Signed-off-by Michal Orzel <[email protected]>
Cheers
Bertrand
Quoted 24 lines
---
As suggested by Julien, we should have it for 4.20. Leaving a stub like that without something likeBUG_ONinside can potentially lead to problems in the future provided the function misuse slipped through the review process.
---xen/arch/arm/arm64/mmu/mm.c| 2 --1 file changed, 2 deletions(-)xen/arch/arm/arm64/mmu/mm.c +0
-2@@ -171,8 +171,6 @@ void __init relocate_and_switch_ttbr(uint64_t ttbr)*/ update_identity_mapping(false); } -#else -void __init relocate_and_switch_ttbr (uint64_t ttbr) {}#endif void __init switch_ttbr (uint64_t ttbr)Signature · 1 line
2.25.1