forked from Minki/linux
b611303811
Resume from hibernate needs to clean any text executed by the kernel with the MMU off to the PoC. Collect these functions together into the .idmap.text section as all this code is tightly coupled and also needs the same cleaning after resume. Data is more complicated, secondary_holding_pen_release is written with the MMU on, clean and invalidated, then read with the MMU off. In contrast __boot_cpu_mode is written with the MMU off, the corresponding cache line is invalidated, so when we read it with the MMU on we don't get stale data. These cache maintenance operations conflict with each other if the values are within a Cache Writeback Granule (CWG) of each other. Collect the data into two sections .mmuoff.data.read and .mmuoff.data.write, the linker script ensures mmuoff.data.write section is aligned to the architectural maximum CWG of 2KB. Signed-off-by: James Morse <james.morse@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
31 lines
1.2 KiB
C
31 lines
1.2 KiB
C
/*
|
|
* Copyright (C) 2016 ARM Limited
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef __ASM_SECTIONS_H
|
|
#define __ASM_SECTIONS_H
|
|
|
|
#include <asm-generic/sections.h>
|
|
|
|
extern char __alt_instructions[], __alt_instructions_end[];
|
|
extern char __exception_text_start[], __exception_text_end[];
|
|
extern char __hibernate_exit_text_start[], __hibernate_exit_text_end[];
|
|
extern char __hyp_idmap_text_start[], __hyp_idmap_text_end[];
|
|
extern char __hyp_text_start[], __hyp_text_end[];
|
|
extern char __idmap_text_start[], __idmap_text_end[];
|
|
extern char __irqentry_text_start[], __irqentry_text_end[];
|
|
extern char __mmuoff_data_start[], __mmuoff_data_end[];
|
|
|
|
#endif /* __ASM_SECTIONS_H */
|