* [PATCH] MIPS: Add P5600 PRid and probe support
@ 2014-01-21 14:50 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2014-01-21 14:50 UTC (permalink / raw)
To: Ralf Baechle, linux-mips; +Cc: James Hogan
Add a Processor ID for the P5600 core and a case in cpu_probe_mips() for
it. The cputype is set to CPU_PROAPTIV for now as it is in the same
range of cores as proAptiv and doesn't currently need to be
distinguished from it in the kernel.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
arch/mips/include/asm/cpu.h | 1 +
arch/mips/kernel/cpu-probe.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 76411df3d971..b69e7306cdb1 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -115,6 +115,7 @@
#define PRID_IMP_INTERAPTIV_MP 0xa100
#define PRID_IMP_PROAPTIV_UP 0xa200
#define PRID_IMP_PROAPTIV_MP 0xa300
+#define PRID_IMP_P5600 0xa800
/*
* These are the PRID's for when 23:16 == PRID_COMP_SIBYTE
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 530f832de02c..7bf4634ff045 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -825,6 +825,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
c->cputype = CPU_PROAPTIV;
__cpu_name[cpu] = "MIPS proAptiv (multi)";
break;
+ case PRID_IMP_P5600:
+ c->cputype = CPU_PROAPTIV;
+ __cpu_name[cpu] = "MIPS P5600";
+ break;
}
decode_configs(c);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] MIPS: Add P5600 PRid and probe support
@ 2014-01-21 14:50 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2014-01-21 14:50 UTC (permalink / raw)
To: Ralf Baechle, linux-mips; +Cc: James Hogan
Add a Processor ID for the P5600 core and a case in cpu_probe_mips() for
it. The cputype is set to CPU_PROAPTIV for now as it is in the same
range of cores as proAptiv and doesn't currently need to be
distinguished from it in the kernel.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
arch/mips/include/asm/cpu.h | 1 +
arch/mips/kernel/cpu-probe.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 76411df3d971..b69e7306cdb1 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -115,6 +115,7 @@
#define PRID_IMP_INTERAPTIV_MP 0xa100
#define PRID_IMP_PROAPTIV_UP 0xa200
#define PRID_IMP_PROAPTIV_MP 0xa300
+#define PRID_IMP_P5600 0xa800
/*
* These are the PRID's for when 23:16 == PRID_COMP_SIBYTE
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 530f832de02c..7bf4634ff045 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -825,6 +825,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
c->cputype = CPU_PROAPTIV;
__cpu_name[cpu] = "MIPS proAptiv (multi)";
break;
+ case PRID_IMP_P5600:
+ c->cputype = CPU_PROAPTIV;
+ __cpu_name[cpu] = "MIPS P5600";
+ break;
}
decode_configs(c);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: Add P5600 PRid and probe support
2014-01-21 14:50 ` James Hogan
(?)
@ 2014-01-21 16:52 ` John Crispin
2014-01-21 17:13 ` James Hogan
-1 siblings, 1 reply; 5+ messages in thread
From: John Crispin @ 2014-01-21 16:52 UTC (permalink / raw)
To: linux-mips
Hi,
> Add a Processor ID for the P5600 core and a case in cpu_probe_mips() for
> it. The cputype is set to CPU_PROAPTIV for now as it is in the same
> range of cores as proAptiv and doesn't currently need to be
> distinguished from it in the kernel.
The "currently" in that sentence tells me that you expect there to be a
need to distinguish it in future ?
If this is the case, then the code should be added now rather than
correcting the code later.
I immediately had to think of the 1074k vs 74k patch that is in
linux-mti-3.10 and was posted a few days ago.
John
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> ---
> arch/mips/include/asm/cpu.h | 1 +
> arch/mips/kernel/cpu-probe.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
> index 76411df3d971..b69e7306cdb1 100644
> --- a/arch/mips/include/asm/cpu.h
> +++ b/arch/mips/include/asm/cpu.h
> @@ -115,6 +115,7 @@
> #define PRID_IMP_INTERAPTIV_MP 0xa100
> #define PRID_IMP_PROAPTIV_UP 0xa200
> #define PRID_IMP_PROAPTIV_MP 0xa300
> +#define PRID_IMP_P5600 0xa800
>
> /*
> * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE
> diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
> index 530f832de02c..7bf4634ff045 100644
> --- a/arch/mips/kernel/cpu-probe.c
> +++ b/arch/mips/kernel/cpu-probe.c
> @@ -825,6 +825,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
> c->cputype = CPU_PROAPTIV;
> __cpu_name[cpu] = "MIPS proAptiv (multi)";
> break;
> + case PRID_IMP_P5600:
> + c->cputype = CPU_PROAPTIV;
> + __cpu_name[cpu] = "MIPS P5600";
> + break;
> }
>
> decode_configs(c);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: Add P5600 PRid and probe support
@ 2014-01-21 17:13 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2014-01-21 17:13 UTC (permalink / raw)
To: John Crispin; +Cc: linux-mips
Hi John,
On 21/01/14 16:52, John Crispin wrote:
>> Add a Processor ID for the P5600 core and a case in cpu_probe_mips() for
>> it. The cputype is set to CPU_PROAPTIV for now as it is in the same
>> range of cores as proAptiv and doesn't currently need to be
>> distinguished from it in the kernel.
> The "currently" in that sentence tells me that you expect there to be a
> need to distinguish it in future ?
More an "I don't know at this stage whether there'll be a need to
distinguish them in future". Even glancing at perf counters they look
the same (but I haven't checked every one).
> If this is the case, then the code should be added now rather than
> correcting the code later.
> I immediately had to think of the 1074k vs 74k patch that is in
> linux-mti-3.10 and was posted a few days ago.
Okay, fair enough, It does no real harm to re-do with a different CPU id.
Thanks
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: Add P5600 PRid and probe support
@ 2014-01-21 17:13 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2014-01-21 17:13 UTC (permalink / raw)
To: John Crispin; +Cc: linux-mips
Hi John,
On 21/01/14 16:52, John Crispin wrote:
>> Add a Processor ID for the P5600 core and a case in cpu_probe_mips() for
>> it. The cputype is set to CPU_PROAPTIV for now as it is in the same
>> range of cores as proAptiv and doesn't currently need to be
>> distinguished from it in the kernel.
> The "currently" in that sentence tells me that you expect there to be a
> need to distinguish it in future ?
More an "I don't know at this stage whether there'll be a need to
distinguish them in future". Even glancing at perf counters they look
the same (but I haven't checked every one).
> If this is the case, then the code should be added now rather than
> correcting the code later.
> I immediately had to think of the 1074k vs 74k patch that is in
> linux-mti-3.10 and was posted a few days ago.
Okay, fair enough, It does no real harm to re-do with a different CPU id.
Thanks
James
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-21 17:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 14:50 [PATCH] MIPS: Add P5600 PRid and probe support James Hogan
2014-01-21 14:50 ` James Hogan
2014-01-21 16:52 ` John Crispin
2014-01-21 17:13 ` James Hogan
2014-01-21 17:13 ` James Hogan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.