Skip to content

Commit

Permalink
RISC-V: move empty_zero_page definition to C and export it
Browse files Browse the repository at this point in the history
Needed by some modules (exported by other architectures).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
  • Loading branch information
Olof Johansson authored and Palmer Dabbelt committed Nov 30, 2017
1 parent fe2726a commit 83e7b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/riscv/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,3 @@ END(_start)
__PAGE_ALIGNED_BSS
/* Empty zero page */
.balign PAGE_SIZE
ENTRY(empty_zero_page)
.fill (empty_zero_page + PAGE_SIZE) - ., 1, 0x00
END(empty_zero_page)
3 changes: 3 additions & 0 deletions arch/riscv/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
unsigned long va_pa_offset;
unsigned long pfn_base;

unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] __page_aligned_bss;
EXPORT_SYMBOL(empty_zero_page);

/* The lucky hart to first increment this variable will boot the other cores */
atomic_t hart_lottery;

Expand Down

0 comments on commit 83e7b87

Please sign in to comment.