Re: [RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-04 Thread Hanjun Guo

On 2013年12月04日 01:13, Mark Rutland wrote:

On Tue, Dec 03, 2013 at 04:36:46PM +, Hanjun Guo wrote:

ACPI requires a cpu.h, add a dummy one copied from arm. This will need
updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

What exactly requires cpu.h, and why?


CPI core will include this file and can not be compiled without it.

ACPI based CPU hotplug needs some functions below:
#ifdef CONFIG_HOTPLUG_CPU
extern int arch_register_cpu(int num);
extern void arch_unregister_cpu(int);
#endif



Why copy the file verbatim rather than factoring it out?


ACPI based cpu hotplug is not implemented in this patch
set and will send out as drivers, so will factoring it
out at that time.
 


Signed-off-by: Graeme Gregory 
Signed-off-by: Hanjun Guo 
---
  arch/arm64/include/asm/cpu.h |   25 +
  1 file changed, 25 insertions(+)
  create mode 100644 arch/arm64/include/asm/cpu.h

diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
new file mode 100644
index 000..dbeb98d
--- /dev/null
+++ b/arch/arm64/include/asm/cpu.h
@@ -0,0 +1,25 @@
+/*
+ *  Copyright (C) 2004-2005 ARM Ltd.
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARM_CPU_H
+#define __ASM_ARM_CPU_H
+
+#include 
+#include 
+#include 
+
+struct cpuinfo_arm {
+   struct cpu  cpu;
+   u32 cpuid;

We use a u64 elsewhere for the mpidr_el1 in arm64.


Good catch, will fix it

Thanks
Hanjun

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


Re: [RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-04 Thread Hanjun Guo

On 2013年12月04日 01:13, Mark Rutland wrote:

On Tue, Dec 03, 2013 at 04:36:46PM +, Hanjun Guo wrote:

ACPI requires a cpu.h, add a dummy one copied from arm. This will need
updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

What exactly requires cpu.h, and why?


CPI core will include this file and can not be compiled without it.

ACPI based CPU hotplug needs some functions below:
#ifdef CONFIG_HOTPLUG_CPU
extern int arch_register_cpu(int num);
extern void arch_unregister_cpu(int);
#endif



Why copy the file verbatim rather than factoring it out?


ACPI based cpu hotplug is not implemented in this patch
set and will send out as drivers, so will factoring it
out at that time.
 


Signed-off-by: Graeme Gregory graeme.greg...@linaro.org
Signed-off-by: Hanjun Guo hanjun@linaro.org
---
  arch/arm64/include/asm/cpu.h |   25 +
  1 file changed, 25 insertions(+)
  create mode 100644 arch/arm64/include/asm/cpu.h

diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
new file mode 100644
index 000..dbeb98d
--- /dev/null
+++ b/arch/arm64/include/asm/cpu.h
@@ -0,0 +1,25 @@
+/*
+ *  Copyright (C) 2004-2005 ARM Ltd.
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARM_CPU_H
+#define __ASM_ARM_CPU_H
+
+#include linux/percpu.h
+#include linux/cpu.h
+#include linux/topology.h
+
+struct cpuinfo_arm {
+   struct cpu  cpu;
+   u32 cpuid;

We use a u64 elsewhere for the mpidr_el1 in arm64.


Good catch, will fix it

Thanks
Hanjun

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


Re: [RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-03 Thread Mark Brown
On Wed, Dec 04, 2013 at 12:36:46AM +0800, Hanjun Guo wrote:
> ACPI requires a cpu.h, add a dummy one copied from arm. This will need
> updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

We're going to need the same thing for CPU topology, I've got a similar
addition as part of a series to introduce that (which is going to want
an ACPI back end at some point I guess) at which point it'll stop being
a dummy.  I should be posting this week all being well.


signature.asc
Description: Digital signature


Re: [RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-03 Thread Mark Rutland
On Tue, Dec 03, 2013 at 04:36:46PM +, Hanjun Guo wrote:
> ACPI requires a cpu.h, add a dummy one copied from arm. This will need
> updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

What exactly requires cpu.h, and why?

Why copy the file verbatim rather than factoring it out?

> 
> Signed-off-by: Graeme Gregory 
> Signed-off-by: Hanjun Guo 
> ---
>  arch/arm64/include/asm/cpu.h |   25 +
>  1 file changed, 25 insertions(+)
>  create mode 100644 arch/arm64/include/asm/cpu.h
> 
> diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
> new file mode 100644
> index 000..dbeb98d
> --- /dev/null
> +++ b/arch/arm64/include/asm/cpu.h
> @@ -0,0 +1,25 @@
> +/*
> + *  Copyright (C) 2004-2005 ARM Ltd.
> + *
> + * 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
> + * published by the Free Software Foundation.
> + */
> +#ifndef __ASM_ARM_CPU_H
> +#define __ASM_ARM_CPU_H
> +
> +#include 
> +#include 
> +#include 
> +
> +struct cpuinfo_arm {
> + struct cpu  cpu;
> + u32 cpuid;

We use a u64 elsewhere for the mpidr_el1 in arm64.

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


[RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-03 Thread Hanjun Guo
ACPI requires a cpu.h, add a dummy one copied from arm. This will need
updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

Signed-off-by: Graeme Gregory 
Signed-off-by: Hanjun Guo 
---
 arch/arm64/include/asm/cpu.h |   25 +
 1 file changed, 25 insertions(+)
 create mode 100644 arch/arm64/include/asm/cpu.h

diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
new file mode 100644
index 000..dbeb98d
--- /dev/null
+++ b/arch/arm64/include/asm/cpu.h
@@ -0,0 +1,25 @@
+/*
+ *  Copyright (C) 2004-2005 ARM Ltd.
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARM_CPU_H
+#define __ASM_ARM_CPU_H
+
+#include 
+#include 
+#include 
+
+struct cpuinfo_arm {
+   struct cpu  cpu;
+   u32 cpuid;
+#ifdef CONFIG_SMP
+   unsigned intloops_per_jiffy;
+#endif
+};
+
+DECLARE_PER_CPU(struct cpuinfo_arm, cpu_data);
+
+#endif
-- 
1.7.9.5

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


[RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-03 Thread Hanjun Guo
ACPI requires a cpu.h, add a dummy one copied from arm. This will need
updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

Signed-off-by: Graeme Gregory graeme.greg...@linaro.org
Signed-off-by: Hanjun Guo hanjun@linaro.org
---
 arch/arm64/include/asm/cpu.h |   25 +
 1 file changed, 25 insertions(+)
 create mode 100644 arch/arm64/include/asm/cpu.h

diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
new file mode 100644
index 000..dbeb98d
--- /dev/null
+++ b/arch/arm64/include/asm/cpu.h
@@ -0,0 +1,25 @@
+/*
+ *  Copyright (C) 2004-2005 ARM Ltd.
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARM_CPU_H
+#define __ASM_ARM_CPU_H
+
+#include linux/percpu.h
+#include linux/cpu.h
+#include linux/topology.h
+
+struct cpuinfo_arm {
+   struct cpu  cpu;
+   u32 cpuid;
+#ifdef CONFIG_SMP
+   unsigned intloops_per_jiffy;
+#endif
+};
+
+DECLARE_PER_CPU(struct cpuinfo_arm, cpu_data);
+
+#endif
-- 
1.7.9.5

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


Re: [RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-03 Thread Mark Rutland
On Tue, Dec 03, 2013 at 04:36:46PM +, Hanjun Guo wrote:
 ACPI requires a cpu.h, add a dummy one copied from arm. This will need
 updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

What exactly requires cpu.h, and why?

Why copy the file verbatim rather than factoring it out?

 
 Signed-off-by: Graeme Gregory graeme.greg...@linaro.org
 Signed-off-by: Hanjun Guo hanjun@linaro.org
 ---
  arch/arm64/include/asm/cpu.h |   25 +
  1 file changed, 25 insertions(+)
  create mode 100644 arch/arm64/include/asm/cpu.h
 
 diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
 new file mode 100644
 index 000..dbeb98d
 --- /dev/null
 +++ b/arch/arm64/include/asm/cpu.h
 @@ -0,0 +1,25 @@
 +/*
 + *  Copyright (C) 2004-2005 ARM Ltd.
 + *
 + * 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
 + * published by the Free Software Foundation.
 + */
 +#ifndef __ASM_ARM_CPU_H
 +#define __ASM_ARM_CPU_H
 +
 +#include linux/percpu.h
 +#include linux/cpu.h
 +#include linux/topology.h
 +
 +struct cpuinfo_arm {
 + struct cpu  cpu;
 + u32 cpuid;

We use a u64 elsewhere for the mpidr_el1 in arm64.

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


Re: [RFC part1 PATCH 2/7] ARM64 : Add dummy asm/cpu.h

2013-12-03 Thread Mark Brown
On Wed, Dec 04, 2013 at 12:36:46AM +0800, Hanjun Guo wrote:
 ACPI requires a cpu.h, add a dummy one copied from arm. This will need
 updated or replaced as ACPI based cpu hotplug for armv8 is worked out.

We're going to need the same thing for CPU topology, I've got a similar
addition as part of a series to introduce that (which is going to want
an ACPI back end at some point I guess) at which point it'll stop being
a dummy.  I should be posting this week all being well.


signature.asc
Description: Digital signature