Re: [PATCH 47/56] microblaze_v2: device.h param.h topology.h

From: Arnd Bergmann
Date: Sun May 04 2008 - 18:37:45 EST


On Sunday 04 May 2008, monstr@xxxxxxxxx wrote:

> +#ifndef _ASM_MICROBLAZE_DEVICE_H
> +#define _ASM_MICROBLAZE_DEVICE_H
> +
> +struct dma_mapping_ops;
> +struct device_node;
> +
> +struct dev_archdata {
> + /* Optional pointer to an OF device node */
> + struct device_node *of_node;
> +
> + /* DMA operations on that device */
> + struct dma_mapping_ops *dma_ops;
> + void *dma_data;
> +
> + /* NUMA node if applicable */
> + int numa_node;
> +};

microblaze doesn't have NUMA or dma_mapping_ops, afaict, so it should
just be

struct dev_archdata {
/* Optional pointer to an OF device node */
struct device_node *of_node;
};

> --- /dev/null
> +++ b/include/asm-microblaze/param.h
> @@ -0,0 +1,36 @@
> +/*
> + * include/asm-microblaze/param.h
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + *
> + * Copyright (C) 2006 Atmark Techno, Inc.
> + */
> +
> +#ifndef _ASM_MICROBLAZE_PARAM_H
> +#define _ASM_MICROBLAZE_PARAM_H
> +
> +#ifdef __KERNEL__
> +# define HZ 100 /* internal timer frequency */
> +# define USER_HZ 100 /* for user interfaces in "ticks" */
> +# define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */
> +#endif
> +
> +#ifndef NGROUPS
> +#define NGROUPS 32
> +#endif
> +
> +#ifndef NOGROUP
> +#define NOGROUP (-1)
> +#endif
> +
> +#define EXEC_PAGESIZE 4096
> +
> +#ifndef HZ
> +#define HZ 100
> +#endif
> +
> +#define MAXHOSTNAMELEN 64 /* max length of hostname */
> +
> +#endif /* _ASM_MICROBLAZE_PARAM_H */

These parameters are so common that they should become asm-generic/param.h.
4kb page size is of course a HW feature, but it's so universal that it's almost
a natural constant ;-)

> --- /dev/null
> +++ b/include/asm-microblaze/topology.h
> @@ -0,0 +1,119 @@
> +/*
> + * include/asm-microblaze/topology.h

please use the existing asm-generic/topology.h here.

Arnd <><
--
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/