Christophe Leroy <christophe.le...@c-s.fr> writes:

> diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c
> new file mode 100644
> index 000000000000..5d2645193568
> --- /dev/null
> +++ b/arch/powerpc/mm/ioremap.c
> @@ -0,0 +1,350 @@
> +/*
> + * This file contains the routines for mapping IO areas
> + *
> + *  Derived from arch/powerpc/mm/pgtable_32.c and
> + *  arch/powerpc/mm/pgtable_64.c
> + *
> + * SPDX-License-Identifier: GPL-2.0

This goes at the top of the file as:

// SPDX-License-Identifier: GPL-2.0

See:

  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst?#n56

> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/types.h>
> +#include <linux/mm.h>
> +#include <linux/vmalloc.h>
> +#include <linux/init.h>
> +#include <linux/highmem.h>
> +#include <linux/memblock.h>
> +#include <linux/slab.h>
> +
> +#include <asm/pgtable.h>
> +#include <asm/pgalloc.h>
> +#include <asm/fixmap.h>
> +#include <asm/io.h>
> +#include <asm/setup.h>
> +#include <asm/sections.h>

I needed:

+#include <asm/machdep.h>

To fix:

../arch/powerpc/mm/ioremap.c: In function ‘ioremap_wc’:
../arch/powerpc/mm/ioremap.c:290:6: error: ‘ppc_md’ undeclared (first use in 
this function)
  if (ppc_md.ioremap)
      ^~~~~~

cheers

Reply via email to