[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <340098510.UosBEPkrGv@fb07-iapwap2>
Date: Fri, 08 Feb 2013 13:29:14 +0100
From: Marc Dietrich <marvin24@....de>
To: Hiroshi Doyu <hdoyu@...dia.com>
Cc: linux-tegra@...r.kernel.org, arnd@...db.de,
Stephen Warren <swarren@...dotorg.org>,
Russell King <linux@....linux.org.uk>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] ARM: tegra: Unify tegra{20,30,114}_init_early()
Hiroshi,
Am Freitag, 8. Februar 2013, 09:29:31 schrieb Hiroshi Doyu:
> Refactored tegra{20,30,114}_init_early() so that we have the unified
> tegra_init_early().
>
> Signed-off-by: Hiroshi Doyu <hdoyu@...dia.com>
[...]
> diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
> index a599f6e..9bcecb8 100644
> --- a/arch/arm/mach-tegra/hotplug.c
> +++ b/arch/arm/mach-tegra/hotplug.c
> @@ -1,8 +1,7 @@
> /*
> - *
> * Copyright (C) 2002 ARM Ltd.
> * All Rights Reserved
> - * Copyright (c) 2010, 2012 NVIDIA Corporation. All rights reserved.
> + * Copyright (c) 2010, 2012-2013, NVIDIA Corporation. All rights reserved.
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License version 2 as
> @@ -15,6 +14,7 @@
> #include <asm/cacheflush.h>
> #include <asm/smp_plat.h>
>
> +#include "fuse.h"
> #include "sleep.h"
>
> static void (*tegra_hotplug_shutdown)(void);
> @@ -56,18 +56,21 @@ int tegra_cpu_disable(unsigned int cpu)
> return cpu == 0 ? -EPERM : 0;
> }
>
> -#ifdef CONFIG_ARCH_TEGRA_2x_SOC
> -extern void tegra20_hotplug_shutdown(void);
> -void __init tegra20_hotplug_init(void)
> +void __init tegra_hotplug_init(void)
> {
> - tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
> -}
> + switch (tegra_chip_id) {
> +#ifdef CONFIG_ARCH_TEGRA_2x_SOC
> + case TEGRA20:
> + tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
> + break;
> #endif
> -
> -#ifdef CONFIG_ARCH_TEGRA_3x_SOC
> -extern void tegra30_hotplug_shutdown(void);
> -void __init tegra30_hotplug_init(void)
> -{
> - tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
> -}
> +#if defined(CONFIG_ARCH_TEGRA_3x_SOC)
> + case TEGRA30:
> + tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
> + break;
> #endif
> + default:
> + BUG_ON(IS_ENABLED(CONFIG_HOTPLUG_CPU));
> + break;
> + }
> +}
are these ifdefs really needed? Multisoc kernels will enable them all anyway
and there is a case structure which protects the assignments. Also the hotplug
functions are very tiny, so there shouldn't be a big loss.
Marc
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists