mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/11] PPC64: remove interrupt_controller from naca
Date: Tue, 4 Jan 2005 15:12:29 +1100	[thread overview]
Message-ID: <20050104151229.521e8083.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20050104150833.5d3f3722.sfr@canb.auug.org.au>


[-- Attachment #1.1: Type: text/plain, Size: 8301 bytes --]

Hi Andrew,

This patch just moves the interrupt_controller field of the naca into a
global variable.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN linus-bk-naca.2/arch/ppc64/kernel/irq.c linus-bk-naca.3/arch/ppc64/kernel/irq.c
--- linus-bk-naca.2/arch/ppc64/kernel/irq.c	2004-10-21 07:17:18.000000000 +1000
+++ linus-bk-naca.3/arch/ppc64/kernel/irq.c	2004-12-31 14:53:21.000000000 +1100
@@ -65,6 +65,7 @@
 int __irq_offset_value;
 int ppc_spurious_interrupts;
 unsigned long lpevent_count;
+u64 ppc64_interrupt_controller;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
@@ -360,7 +361,7 @@
 	unsigned int virq, first_virq;
 	static int warned;
 
-	if (naca->interrupt_controller == IC_OPEN_PIC)
+	if (ppc64_interrupt_controller == IC_OPEN_PIC)
 		return real_irq;	/* no mapping for openpic (for now) */
 
 	/* don't map interrupts < MIN_VIRT_IRQ */
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/maple_setup.c linus-bk-naca.3/arch/ppc64/kernel/maple_setup.c
--- linus-bk-naca.2/arch/ppc64/kernel/maple_setup.c	2004-10-30 08:33:22.000000000 +1000
+++ linus-bk-naca.3/arch/ppc64/kernel/maple_setup.c	2004-12-31 14:53:21.000000000 +1100
@@ -155,7 +155,7 @@
 	}
 
 	/* Setup interrupt mapping options */
-	naca->interrupt_controller = IC_OPEN_PIC;
+	ppc64_interrupt_controller = IC_OPEN_PIC;
 
 	DBG(" <- maple_init_early\n");
 }
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pSeries_pci.c linus-bk-naca.3/arch/ppc64/kernel/pSeries_pci.c
--- linus-bk-naca.2/arch/ppc64/kernel/pSeries_pci.c	2004-11-16 16:05:10.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/pSeries_pci.c	2004-12-31 14:53:21.000000000 +1100
@@ -353,7 +353,7 @@
 	unsigned int *opprop = NULL;
 	struct device_node *root = of_find_node_by_path("/");
 
-	if (naca->interrupt_controller == IC_OPEN_PIC) {
+	if (ppc64_interrupt_controller == IC_OPEN_PIC) {
 		opprop = (unsigned int *)get_property(root,
 				"platform-open-pic", NULL);
 	}
@@ -375,7 +375,7 @@
 		pci_process_bridge_OF_ranges(phb, node);
 		pci_setup_phb_io(phb, index == 0);
 
-		if (naca->interrupt_controller == IC_OPEN_PIC && pSeries_mpic) {
+		if (ppc64_interrupt_controller == IC_OPEN_PIC && pSeries_mpic) {
 			int addr = root_size_cells * (index + 2) - 1;
 			mpic_assign_isu(pSeries_mpic, index, opprop[addr]);
 		}
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pSeries_setup.c linus-bk-naca.3/arch/ppc64/kernel/pSeries_setup.c
--- linus-bk-naca.2/arch/ppc64/kernel/pSeries_setup.c	2004-12-14 04:07:06.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/pSeries_setup.c	2004-12-31 15:22:17.000000000 +1100
@@ -196,7 +196,7 @@
 static void __init pSeries_setup_arch(void)
 {
 	/* Fixup ppc_md depending on the type of interrupt controller */
-	if (naca->interrupt_controller == IC_OPEN_PIC) {
+	if (ppc64_interrupt_controller == IC_OPEN_PIC) {
 		ppc_md.init_IRQ       = pSeries_init_mpic; 
 		ppc_md.get_irq        = mpic_get_irq;
 		/* Allocate the mpic now, so that find_and_init_phbs() can
@@ -308,13 +308,13 @@
 	 * to properly parse the OF interrupt tree & do the virtual irq mapping
 	 */
 	__irq_offset_value = NUM_ISA_INTERRUPTS;
-	naca->interrupt_controller = IC_INVALID;
+	ppc64_interrupt_controller = IC_INVALID;
 	for (np = NULL; (np = of_find_node_by_name(np, "interrupt-controller"));) {
 		typep = (char *)get_property(np, "compatible", NULL);
 		if (strstr(typep, "open-pic"))
-			naca->interrupt_controller = IC_OPEN_PIC;
+			ppc64_interrupt_controller = IC_OPEN_PIC;
 		else if (strstr(typep, "ppc-xicp"))
-			naca->interrupt_controller = IC_PPC_XIC;
+			ppc64_interrupt_controller = IC_PPC_XIC;
 		else
 			printk("initialize_naca: failed to recognize"
 			       " interrupt-controller\n");
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pSeries_smp.c linus-bk-naca.3/arch/ppc64/kernel/pSeries_smp.c
--- linus-bk-naca.2/arch/ppc64/kernel/pSeries_smp.c	2004-12-14 04:07:06.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/pSeries_smp.c	2004-12-31 15:22:45.000000000 +1100
@@ -348,7 +348,7 @@
 
 	DBG(" -> smp_init_pSeries()\n");
 
-	if (naca->interrupt_controller == IC_OPEN_PIC)
+	if (ppc64_interrupt_controller == IC_OPEN_PIC)
 		smp_ops = &pSeries_mpic_smp_ops;
 	else
 		smp_ops = &pSeries_xics_smp_ops;
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pmac_setup.c linus-bk-naca.3/arch/ppc64/kernel/pmac_setup.c
--- linus-bk-naca.2/arch/ppc64/kernel/pmac_setup.c	2004-12-31 14:52:14.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/pmac_setup.c	2004-12-31 14:53:21.000000000 +1100
@@ -70,7 +70,6 @@
 #include <asm/time.h>
 #include <asm/of_device.h>
 #include <asm/lmb.h>
-#include <asm/naca.h>
 
 #include "pmac.h"
 #include "mpic.h"
@@ -316,7 +315,7 @@
 	}
 
 	/* Setup interrupt mapping options */
-	naca->interrupt_controller = IC_OPEN_PIC;
+	ppc64_interrupt_controller = IC_OPEN_PIC;
 
 	DBG(" <- pmac_init_early\n");
 }
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/prom.c linus-bk-naca.3/arch/ppc64/kernel/prom.c
--- linus-bk-naca.2/arch/ppc64/kernel/prom.c	2004-12-31 14:52:56.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/prom.c	2004-12-31 14:53:21.000000000 +1100
@@ -44,7 +44,6 @@
 #include <asm/system.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/naca.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
 #include <asm/bootinfo.h>
@@ -557,7 +556,7 @@
 
 	DBG(" -> finish_device_tree\n");
 
-	if (naca->interrupt_controller == IC_INVALID) {
+	if (ppc64_interrupt_controller == IC_INVALID) {
 		DBG("failed to configure interrupt controller type\n");
 		panic("failed to configure interrupt controller type\n");
 	}
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/setup.c linus-bk-naca.3/arch/ppc64/kernel/setup.c
--- linus-bk-naca.2/arch/ppc64/kernel/setup.c	2004-12-31 16:22:49.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/setup.c	2004-12-31 16:23:03.000000000 +1100
@@ -664,7 +664,7 @@
 	printk("naca                          = 0x%p\n", naca);
 	printk("ppc64_pft_size                = 0x%lx\n", ppc64_pft_size);
 	printk("naca->debug_switch            = 0x%lx\n", naca->debug_switch);
-	printk("naca->interrupt_controller    = 0x%ld\n", naca->interrupt_controller);
+	printk("ppc64_interrupt_controller    = 0x%ld\n", ppc64_interrupt_controller);
 	printk("systemcfg                     = 0x%p\n", systemcfg);
 	printk("systemcfg->platform           = 0x%x\n", systemcfg->platform);
 	printk("systemcfg->processorCount     = 0x%lx\n", systemcfg->processorCount);
diff -ruN linus-bk-naca.2/arch/ppc64/kernel/xics.c linus-bk-naca.3/arch/ppc64/kernel/xics.c
--- linus-bk-naca.2/arch/ppc64/kernel/xics.c	2004-12-14 04:07:06.000000000 +1100
+++ linus-bk-naca.3/arch/ppc64/kernel/xics.c	2004-12-31 15:24:20.000000000 +1100
@@ -24,7 +24,6 @@
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/smp.h>
-#include <asm/naca.h>
 #include <asm/rtas.h>
 #include <asm/xics.h>
 #include <asm/hvcall.h>
@@ -575,7 +574,7 @@
  */
 static int __init xics_setup_i8259(void)
 {
-	if (naca->interrupt_controller == IC_PPC_XIC &&
+	if (ppc64_interrupt_controller == IC_PPC_XIC &&
 	    xics_irq_8259_cascade != -1) {
 		if (request_irq(irq_offset_up(xics_irq_8259_cascade),
 				no_action, 0, "8259 cascade", NULL))
diff -ruN linus-bk-naca.2/include/asm-ppc64/naca.h linus-bk-naca.3/include/asm-ppc64/naca.h
--- linus-bk-naca.2/include/asm-ppc64/naca.h	2004-12-31 14:52:56.000000000 +1100
+++ linus-bk-naca.3/include/asm-ppc64/naca.h	2004-12-31 14:53:21.000000000 +1100
@@ -25,7 +25,6 @@
 	u64 banner;                     /* Ptr to banner string      0x28 */
 	u64 log;                        /* Ptr to log buffer         0x30 */
 	u64 serialPortAddr;		/* Phy addr of serial port   0x38 */
-	u64 interrupt_controller;	/* Type of int controller    0x40 */ 
 };
 
 extern struct naca_struct *naca;
diff -ruN linus-bk-naca.2/include/asm-ppc64/processor.h linus-bk-naca.3/include/asm-ppc64/processor.h
--- linus-bk-naca.2/include/asm-ppc64/processor.h	2004-12-31 15:01:17.000000000 +1100
+++ linus-bk-naca.3/include/asm-ppc64/processor.h	2004-12-31 15:25:17.000000000 +1100
@@ -484,6 +484,7 @@
 #ifdef __KERNEL__
 
 extern int have_of;
+extern u64 ppc64_interrupt_controller;
 
 struct task_struct;
 void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp);


[-- Attachment #1.2: 00000000.mimetmp --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-01-04  4:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-04  3:53 PPC64 cleanups 0/11 Stephen Rothwell
2005-01-04  4:04 ` [PATCH 1/11] PPC64: Consolidate cache sizing variables Stephen Rothwell
2005-01-04  4:08   ` [PATCH 2/11] PPC64: remove the page table size from the naca Stephen Rothwell
2005-01-04  4:12     ` Stephen Rothwell [this message]
2005-01-04  4:19       ` [PATCH 4/11] PPC64: remove /proc/ppc64/{naca,paca/xx} Stephen Rothwell
2005-01-04  4:23         ` [PATCH 5/11] PPC64: remove the paca pointer form the naca Stephen Rothwell
2005-01-04  4:27           ` [PATCH 6/11] PPC64: remove serialPortAddr from " Stephen Rothwell
2005-01-04  4:31             ` [PATCH 7/11] PPC64: remove debug_switch " Stephen Rothwell
2005-01-04  4:34               ` [PATCH 8/11] PPC64: remove the naca from all but iSeries Stephen Rothwell
2005-01-04  4:37                 ` [PATCH 9/11] PPC64: use xPMCRegsInUse Stephen Rothwell
2005-01-04  4:40                   ` [PATCH 10/11] PPC64: move the lppaca defining header file Stephen Rothwell
2005-01-04  4:43                     ` [PATCH 11/11] PPC64: remove StudlyCaps from lppaca structure Stephen Rothwell
2005-01-04 11:58                       ` [PATCH] PPC64: use c99 initializers Stephen Rothwell
2005-01-04 12:05                         ` [PATCH] PPC64: tidy up the htab_data structure Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050104151229.521e8083.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®