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

From: Chris Metcalf
Date: Wed Nov 13 2013 - 19:09:22 EST


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).

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.

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/