MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
Signed-off-by: Rashmica Gupta <redacted>
---
arch/powerpc/platforms/pseries/setup.c | 77 +++-------------------------------
1 file changed, 5 insertions(+), 72 deletions(-)
@@ -77,8 +76,6 @@ EXPORT_SYMBOL(CMO_PageSize);intfwnmi_active;/* TRUE if an FWNMI handler is present */-staticstructdevice_node*pSeries_mpic_node;-staticvoidpSeries_show_cpuinfo(structseq_file*m){structdevice_node*root;
@@ -172,48 +169,7 @@ static void __init pseries_setup_i8259_cascade(void)irq_set_chained_handler(cascade,pseries_8259_cascade);}-staticvoid__initpseries_mpic_init_IRQ(void)-{-structdevice_node*np;-constunsignedint*opprop;-unsignedlongopenpic_addr=0;-intnaddr,n,i,opplen;-structmpic*mpic;--np=of_find_node_by_path("/");-naddr=of_n_addr_cells(np);-opprop=of_get_property(np,"platform-open-pic",&opplen);-if(opprop!=NULL){-openpic_addr=of_read_number(opprop,naddr);-printk(KERN_DEBUG"OpenPIC addr: %lx\n",openpic_addr);-}-of_node_put(np);--BUG_ON(openpic_addr==0);--/* Setup the openpic driver */-mpic=mpic_alloc(pSeries_mpic_node,openpic_addr,-MPIC_NO_RESET,16,0," MPIC ");-BUG_ON(mpic==NULL);--/* Add ISUs */-opplen/=sizeof(u32);-for(n=0,i=naddr;i<opplen;i+=naddr,n++){-unsignedlongisuaddr=of_read_number(opprop+i,naddr);-mpic_assign_isu(mpic,n,isuaddr);-}--/* Setup top-level get_irq */-ppc_md.get_irq=mpic_get_irq;--/* All ISUs are setup, complete initialization */-mpic_init(mpic);--/* Look for cascade */-pseries_setup_i8259_cascade();-}--staticvoid__initpseries_xics_init_IRQ(void)+staticvoid__initpSeries_init_IRQ(void){xics_init();pseries_setup_i8259_cascade();
MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.
Signed-off-by: Rashmica Gupta <redacted>
---
arch/powerpc/platforms/pseries/pseries.h | 6 ++----
arch/powerpc/platforms/pseries/setup.c | 2 +-
arch/powerpc/platforms/pseries/smp.c | 31 +++++--------------------------
3 files changed, 8 insertions(+), 31 deletions(-)
@@ -207,28 +206,22 @@ static __init void pSeries_smp_probe(void)}}-staticstructsmp_ops_tpSeries_mpic_smp_ops={-.message_pass=smp_mpic_message_pass,-.probe=smp_mpic_probe,-.kick_cpu=smp_pSeries_kick_cpu,-.setup_cpu=smp_mpic_setup_cpu,-};--staticstructsmp_ops_tpSeries_xics_smp_ops={+staticstructsmp_ops_tpSeries_smp_ops={.message_pass=NULL,/* Use smp_muxed_ipi_message_pass */.cause_ipi=NULL,/* Filled at runtime by pSeries_smp_probe() */.probe=pSeries_smp_probe,.kick_cpu=smp_pSeries_kick_cpu,-.setup_cpu=smp_xics_setup_cpu,+.setup_cpu=smp_setup_cpu,.cpu_bootable=smp_generic_cpu_bootable,};/* This is called very early */-staticvoid__initsmp_init_pseries(void)+void__initsmp_init_pseries(void){inti;pr_debug(" -> smp_init_pSeries()\n");+smp_ops=&pSeries_smp_ops;alloc_bootmem_cpumask_var(&of_spin_mask);
MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.
Signed-off-by: Rashmica Gupta <redacted>
---
arch/powerpc/platforms/pseries/kexec.c | 23 +----------------------
arch/powerpc/platforms/pseries/pseries.h | 8 +-------
arch/powerpc/platforms/pseries/setup.c | 2 +-
3 files changed, 3 insertions(+), 30 deletions(-)
MPIC was only used by Power3 which is now unsupported, so remove MPIC
code.
Signed-off-by: Rashmica Gupta <redacted>
---
arch/powerpc/platforms/pseries/hotplug-cpu.c | 13 -------------
1 file changed, 13 deletions(-)
@@ -903,8 +903,6 @@ static int parse_cede_parameters(void)staticint__initpseries_cpu_hotplug_init(void){-structdevice_node*np;-constchar*typep;intcpu;intqcss_tok;
@@ -913,17 +911,6 @@ static int __init pseries_cpu_hotplug_init(void)ppc_md.cpu_release=dlpar_cpu_release;#endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */-for_each_node_by_name(np,"interrupt-controller"){-typep=of_get_property(np,"compatible",NULL);-if(strstr(typep,"open-pic")){-of_node_put(np);--printk(KERN_INFO"CPU Hotplug not supported on "-"systems using MPIC\n");-return0;-}-}-rtas_stop_self_token=rtas_token("stop-self");qcss_tok=rtas_token("query-cpu-stopped-state");
MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.
Signed-off-by: Rashmica Gupta <redacted>
---
arch/powerpc/platforms/pseries/event_sources.c | 53 +++++++-------------------
1 file changed, 13 insertions(+), 40 deletions(-)
@@ -26,48 +26,21 @@ void request_event_sources_irqs(struct device_node *np,{inti,index,count=0;structof_phandle_argsoirq;-constu32*opicprop;-unsignedintopicplen;unsignedintvirqs[16];-/* Check for obsolete "open-pic-interrupt" property. If present, then-*mapthoseinterruptsusingthedefaultinterrupthostanddefault-*trigger-*/-opicprop=of_get_property(np,"open-pic-interrupt",&opicplen);-if(opicprop){-opicplen/=sizeof(u32);-for(i=0;i<opicplen;i++){-if(count>15)-break;-virqs[count]=irq_create_mapping(NULL,*(opicprop++));-if(virqs[count]==NO_IRQ){-pr_err("event-sources: Unable to allocate "-"interrupt number for %s\n",-np->full_name);-WARN_ON(1);-}-else-count++;--}-}-/* Else use normal interrupt tree parsing */-else{-/* First try to do a proper OF tree parsing */-for(index=0;of_irq_parse_one(np,index,&oirq)==0;-index++){-if(count>15)-break;-virqs[count]=irq_create_of_mapping(&oirq);-if(virqs[count]==NO_IRQ){-pr_err("event-sources: Unable to allocate "-"interrupt number for %s\n",-np->full_name);-WARN_ON(1);-}-else-count++;+/* First try to do a proper OF tree parsing */+for(index=0;of_irq_parse_one(np,index,&oirq)==0;+index++){+if(count>15)+break;+virqs[count]=irq_create_of_mapping(&oirq);+if(virqs[count]==NO_IRQ){+pr_err("event-sources: Unable to allocate "+"interrupt number for %s\n",+np->full_name);+WARN_ON(1);+}else{+count++;}}
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2016-05-30 07:32:40
On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
The second half I'm not sure ... XIVE is around the corner...
Cheers,
Ben.
On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
quoted
MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
The second half I'm not sure ... XIVE is around the corner...
Cheers,
Ben.
I thought XIVE was replacing XICS? And so then we can just simply replace all the specific XICS code such as xics_init() and xics_smp_probe() with the relevant XIVE functions?
By "make the XICS functions generic" I meant that if there is only one interrupt controller for pseries then we don't need to have both static void __init pseries_xics_init_IRQ(void) and static void __init pSeries_init_IRQ(void), etc.
On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
quoted
MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
The second half I'm not sure ... XIVE is around the corner...
Cheers,
Ben.
I thought XIVE was replacing XICS? And so then we can just simply replace all the specific XICS code such as xics_init() and xics_smp_probe() with the relevant XIVE functions?
By "make the XICS functions generic" I meant that if there is only one interrupt controller for pseries then we don't need to have both static void __init pseries_xics_init_IRQ(void) and static void __init pSeries_init_IRQ(void), etc.
Oliver just informed me that it is only replacing XICS for p9. Should I leave this for the person adding in the XIVE code?
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2016-05-31 03:01:14
On Tue, 2016-05-31 at 11:34 +1000, Rashmica wrote:
On 30/05/16 17:32, Benjamin Herrenschmidt wrote:
quoted
On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
quoted
MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
The second half I'm not sure ... XIVE is around the corner...
Cheers,
Ben.
I thought XIVE was replacing XICS? And so then we can just simply
replace all the specific XICS code such as xics_init() and
xics_smp_probe() with the relevant XIVE functions?
We still need to boot on P8 that doesn't have XIVE, so we need to
support both. IE, the same way we had to chose at runtime between MPIC
and XICS, we'll now have to chose between XICS and XIVE.
By "make the XICS functions generic" I meant that if there is only one
interrupt controller for pseries then we don't need to have both static
void __init pseries_xics_init_IRQ(void) and static void __init
pSeries_init_IRQ(void), etc.
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-05-31 05:04:29
On Tue, 2016-05-31 at 12:48 +1000, Rashmica wrote:
On 31/05/16 11:34, Rashmica wrote:
quoted
On 30/05/16 17:32, Benjamin Herrenschmidt wrote:
quoted
On Mon, 2016-05-30 at 16:18 +1000, Rashmica Gupta wrote:
quoted
MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
The second half I'm not sure ... XIVE is around the corner...
I thought XIVE was replacing XICS? And so then we can just simply
replace all the specific XICS code such as xics_init() and
xics_smp_probe() with the relevant XIVE functions?
By "make the XICS functions generic" I meant that if there is only one
interrupt controller for pseries then we don't need to have both
static void __init pseries_xics_init_IRQ(void) and static void __init
pSeries_init_IRQ(void), etc.
Oliver just informed me that it is only replacing XICS for p9. Should I
leave this for the person adding in the XIVE code?
I haven't heard of this "XIVE" thing but anyway ..
I would hope we can come up with a better abstraction than this for XICS/XIVE,
so I'm inclined to merge this anyway. Worst case we end up putting some of it
back.
cheers
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2016-05-31 05:30:52
On Tue, 2016-05-31 at 15:04 +1000, Michael Ellerman wrote:
I haven't heard of this "XIVE" thing but anyway ..
I would hope we can come up with a better abstraction than this for XICS/XIVE,
so I'm inclined to merge this anyway. Worst case we end up putting some of it
back.
Just merge it, I'll sort it out. If you haven't heard from XIVE, you
have better noise cancelling headphones than I thought ;-)
Cheers,
Ben.
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-06-15 12:39:11
On Mon, 2016-30-05 at 06:18:11 UTC, Rashmica Gupta wrote:
MPIC was only used by Power3 which is now unsupported, so drop support
for MPIC. XICS is now the only supported interrupt controller for
pSeries so make the XICS functions generic.
Signed-off-by: Rashmica Gupta <redacted>