[PATCH] powerpc: New DCR access methods

Christoph Hellwig hch at lst.de
Mon Oct 16 18:17:48 EST 2006


On Mon, Oct 16, 2006 at 05:44:58PM +1000, Benjamin Herrenschmidt wrote:
> This patch adds new dcr_map/dcr_read/dcr_write accessors for DCRs that
> can be used by drivers to transparently address either native DCRs or
> memory mapped DCRs. The implementation for memory mapped DCRs is done
> after the binding being currently worked on for SLOF and the Axon
> chipset. This patch enables it for the cell native platform
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> 
> Index: linux-cell/include/asm-powerpc/dcr.h
> ===================================================================
> --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> +++ linux-cell/include/asm-powerpc/dcr.h	2006-10-16 16:42:32.000000000 +1000
> @@ -0,0 +1,42 @@
> +/*
> + * (c) Copyright 2006 Benjamin Herrenschmidt, IBM Corp.
> + *                    <benh at kernel.crashing.org>
> + *
> + *   This program is free software;  you can redistribute it and/or modify
> + *   it under the terms of the GNU General Public License as published by
> + *   the Free Software Foundation; either version 2 of the License, or
> + *   (at your option) any later version.
> + *
> + *   This program is distributed in the hope that it will be useful,
> + *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
> + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
> + *   the GNU General Public License for more details.
> + *
> + *   You should have received a copy of the GNU General Public License
> + *   along with this program;  if not, write to the Free Software
> + *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + */
> +
> +#ifndef _ASM_POWERPC_DCR_H
> +#define _ASM_POWERPC_DCR_H
> +#ifdef __KERNEL__
> +
> +#ifdef CONFIG_PPC_DCR_NATIVE
> +#include <asm/dcr-native.h>
> +#else
> +#include <asm/dcr-mmio.h>
> +#endif

Having this as a compile-time switch seems broken.  I thought the plan was
to support all different 64bit kernels with a single kernel binary?




More information about the Linuxppc-dev mailing list