Re: [PATCH 10/17] tile: Remove tile-specific _sinitdata and_einitdata

From: Geert Uytterhoeven
Date: Thu Nov 14 2013 - 03:31:20 EST


Hi Chris,

On Wed, 13 Nov 2013, Chris Metcalf wrote:
> On 11/12/2013 2:42 PM, Geert Uytterhoeven wrote:
> > Use standard __init_begin and __init_end instead.
> >
> > Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx>
> [...]
> > @@ -534,7 +534,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
> >
> > BUG_ON(address != (unsigned long)_text);
> > pte = NULL;
> > - for (; address < (unsigned long)_einittext;
> > + for (; address < (unsigned long)__init_end;
> > pfn++, address += PAGE_SIZE) {
> > pte_ofs = pte_index(address);
> > if (pte_ofs == 0) {
> > @@ -572,7 +572,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
> > else
> > pteval = hv_pte_set_mode(pteval,
> > HV_PTE_MODE_CACHE_NO_L3);
> > - for (; address < (unsigned long)_einittext;
> > + for (; address < (unsigned long)__init_end;
> > pfn += PFN_DOWN(HPAGE_SIZE), address += HPAGE_SIZE)
> > *(pte_t *)(pmd++) = pfn_pte(pfn, pteval);
> > }
> > @@ -632,9 +632,9 @@ int devmem_is_allowed(unsigned long pagenr)
> > {
> > return pagenr < kaddr_to_pfn(_end) &&
> > !(pagenr >= kaddr_to_pfn(&init_thread_union) ||
> > - pagenr < kaddr_to_pfn(_einitdata)) &&
> > + pagenr < kaddr_to_pfn(__init_end)) &&
> > !(pagenr >= kaddr_to_pfn(_sinittext) ||
> > - pagenr <= kaddr_to_pfn(_einittext-1));
> > + pagenr <= kaddr_to_pfn(__init_end-1));
> > }
> >
> > #ifdef CONFIG_HIGHMEM
> [...]
> > @@ -984,7 +984,7 @@ void free_initmem(void)
> > */
> > free_init_pages("unused kernel text",
> > (unsigned long)_sinittext - text_delta,
> > - (unsigned long)_einittext - text_delta);
> > + (unsigned long)__init_end - text_delta);
> > /* Do a global TLB flush so everyone sees the changes. */
> > flush_tlb_all();
> > }
>
> These changes are touching _einittext, and they shouldn't. Only bomb _einitdata (and _sinitdata).

Woops, that's a serious brain fart. Sorry about that, and thanks for
noticing!

> With those changes removed:
>
> Acked-by: Chris Metcalf <cmetcalf@xxxxxxxxxx>
>
> or let me know if you'd rather I staged your v2 change into the tile tree.

Feel free to take v2 below. Thanks!