From patchwork Mon May 30 06:18:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 627610 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rJ61008MPz9s4q for ; Mon, 30 May 2016 16:20:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=vslw8leR; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3rJ60z678VzDqbZ for ; Mon, 30 May 2016 16:20:03 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=vslw8leR; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x244.google.com (mail-pa0-x244.google.com [IPv6:2607:f8b0:400e:c03::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rJ5zL07F1zDqBs for ; Mon, 30 May 2016 16:18:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=vslw8leR; dkim-atps=neutral Received: by mail-pa0-x244.google.com with SMTP id x1so4002491pav.1 for ; Sun, 29 May 2016 23:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=p+0NNDOZKHyg39YfaJM2Vqda/QI0H+aMTPNGteBg6hc=; b=vslw8leRE0jBdtjUHq3AGn5gz4g3E/u4JUjWubMhyvCUX6nnrsPEIaRjrwKjY5LvuA RHEGM5KxlduaY+qI0U/DiaPtbSzjn6TDeIuyFPduO+24omPlhnKCjyMwEc5kdn0oYE48 wrxpRUVl6tMuv3NSNJjOWJUQ9kd0zjBNUHH7Txycr+WHqvlnL9sBqaVmKkF1MxbrG7JT wwAEtwPNs/pUerGNoOtuXXKhRde+wlzpUvCEStzobg4AfZMViH12aEXkG4Y3Y83ggmD/ j1y9TaxZ1yQnzCZ+FcRmknwjvKYLK68x/jTISSMQ7MVZjbab+jCHQ+cYVGkoaSAPGtCW hELw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=p+0NNDOZKHyg39YfaJM2Vqda/QI0H+aMTPNGteBg6hc=; b=QDFsFoO1p1JHWoFmknQQ2vHBRQMBm4TNx7ugFACYcCtRIqUv4FNtA6VR1uyibUqjZH zb6LfosFJi/eDuss0mpJff2oASpTizgebs0j1AnjKab5+wHmN9ARfvk/YbEI8QsSxSVo khhxdwwRKqRwmbNmuFLhn+sC06kAnHo6oPK2Hfdj3AliiX7uEX7ogTORemkyCc9Eq1v2 qi6cpmXx+PRfZ1byOHUsiQO35NgpzLdT0r3fwHz0a/B7eSfsYZ56UXyCwL0USQh/ySv5 88Vouy8cPD0CU7S5k+56Z/X6aGC6g3dtnHaCwhDYPn3H1c08iLZWsjrb6Y6SqwgFhHP0 Iwkw== X-Gm-Message-State: ALyK8tIazuV2OH8d5ieLXZvgYeb7CvFlCTG/J7Oge3QpCD1aE0Oi9xZF5UIuHwlXyDPDxg== X-Received: by 10.66.47.196 with SMTP id f4mr42804113pan.126.1464589115478; Sun, 29 May 2016 23:18:35 -0700 (PDT) Received: from circle.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id m81sm16432256pfi.51.2016.05.29.23.18.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 May 2016 23:18:34 -0700 (PDT) From: Rashmica Gupta To: mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, nfont@linux.vnet.ibm.com Subject: [PATCH 1/5] powerpc/pseries: Drop support for MPIC in pseries Date: Mon, 30 May 2016 16:18:11 +1000 Message-Id: <1464589095-442-1-git-send-email-rashmicy@gmail.com> X-Mailer: git-send-email 2.5.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- arch/powerpc/platforms/pseries/setup.c | 77 +++------------------------------- 1 file changed, 5 insertions(+), 72 deletions(-) diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 9883bc7ea007..f83ac9be7f34 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -57,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -77,8 +76,6 @@ EXPORT_SYMBOL(CMO_PageSize); int fwnmi_active; /* TRUE if an FWNMI handler is present */ -static struct device_node *pSeries_mpic_node; - static void pSeries_show_cpuinfo(struct seq_file *m) { struct device_node *root; @@ -172,48 +169,7 @@ static void __init pseries_setup_i8259_cascade(void) irq_set_chained_handler(cascade, pseries_8259_cascade); } -static void __init pseries_mpic_init_IRQ(void) -{ - struct device_node *np; - const unsigned int *opprop; - unsigned long openpic_addr = 0; - int naddr, n, i, opplen; - struct mpic *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++) { - unsigned long isuaddr = 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(); -} - -static void __init pseries_xics_init_IRQ(void) +static void __init pSeries_init_IRQ(void) { xics_init(); pseries_setup_i8259_cascade(); @@ -228,32 +184,6 @@ static void pseries_lpar_enable_pmcs(void) plpar_hcall_norets(H_PERFMON, set, reset); } -static void __init pseries_discover_pic(void) -{ - struct device_node *np; - const char *typep; - - for_each_node_by_name(np, "interrupt-controller") { - typep = of_get_property(np, "compatible", NULL); - if (!typep) - continue; - if (strstr(typep, "open-pic")) { - pSeries_mpic_node = of_node_get(np); - ppc_md.init_IRQ = pseries_mpic_init_IRQ; - setup_kexec_cpu_down_mpic(); - smp_init_pseries_mpic(); - return; - } else if (strstr(typep, "ppc-xicp")) { - ppc_md.init_IRQ = pseries_xics_init_IRQ; - setup_kexec_cpu_down_xics(); - smp_init_pseries_xics(); - return; - } - } - printk(KERN_ERR "pSeries_discover_pic: failed to recognize" - " interrupt-controller\n"); -} - static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *data) { struct of_reconfig_data *rd = data; @@ -506,7 +436,9 @@ static void __init pSeries_setup_arch(void) set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT); /* Discover PIC type and setup ppc_md accordingly */ - pseries_discover_pic(); + setup_kexec_cpu_down_xics(); + smp_init_pseries_xics(); + /* openpic global configuration register (64-bit format). */ /* openpic Interrupt Source Unit pointer (64-bit format). */ @@ -838,6 +770,7 @@ define_machine(pseries) { .probe = pSeries_probe, .setup_arch = pSeries_setup_arch, .init_early = pSeries_init_early, + .init_IRQ = pSeries_init_IRQ, .show_cpuinfo = pSeries_show_cpuinfo, .log_error = pSeries_log_error, .pcibios_fixup = pSeries_final_fixup,