]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge ../linux-2.6
authorPaul Mackerras <paulus@samba.org>
Mon, 7 Nov 2005 03:42:09 +0000 (14:42 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 7 Nov 2005 03:42:09 +0000 (14:42 +1100)
42 files changed:
arch/powerpc/kernel/process.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c
arch/powerpc/kernel/time.c
arch/powerpc/lib/locks.c
arch/powerpc/mm/fault.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/init_64.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/pgtable_64.c
arch/powerpc/platforms/iseries/irq.c
arch/powerpc/platforms/iseries/pci.c
arch/powerpc/platforms/iseries/setup.c
arch/powerpc/platforms/iseries/smp.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/plpar_wrappers.h
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/sysdev/i8259.c
arch/powerpc/sysdev/u3_iommu.c
arch/ppc/kernel/misc.S
arch/ppc/kernel/traps.c
arch/ppc/syslib/m8xx_wdt.c
arch/ppc64/Kconfig.debug
arch/ppc64/kernel/idle.c
arch/ppc64/kernel/machine_kexec.c
arch/ppc64/kernel/pci.c
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/prom_init.c
arch/ppc64/kernel/rtas_pci.c
arch/ppc64/kernel/sysfs.c
arch/ppc64/kernel/udbg.c
include/asm-powerpc/machdep.h
include/asm-powerpc/ppc-pci.h
include/asm-powerpc/smp.h
include/asm-ppc/io.h
include/asm-ppc64/pci.h
include/asm-ppc64/ppcdebug.h [deleted file]
include/asm-ppc64/udbg.h

index 7f64f0464d446997756c4fae4c903665d717ea19..de69fb37c7313ce83d450bdbd6f5a15eb621bdd0 100644 (file)
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/prom.h>
+#include <asm/machdep.h>
 #ifdef CONFIG_PPC64
 #include <asm/firmware.h>
 #include <asm/time.h>
-#include <asm/machdep.h>
 #endif
 
 extern unsigned long _get_SP(void);
@@ -203,10 +203,8 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
 
 int set_dabr(unsigned long dabr)
 {
-#ifdef CONFIG_PPC64
        if (ppc_md.set_dabr)
                return ppc_md.set_dabr(dabr);
-#endif
 
        mtspr(SPRN_DABR, dabr);
        return 0;
index b7fc2d884950c2fa31e935ca7628ace355167610..751f5ddea913cc3fb0945bbfab92ed644834e871 100644 (file)
@@ -608,7 +608,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
        return 0;
 }
 
-#ifdef CONFIG_SMP
 /* This version can't take the spinlock, because it never returns */
 
 struct rtas_args rtas_stop_self_args = {
@@ -633,7 +632,6 @@ void rtas_stop_self(void)
 
        panic("Alas, I survived.\n");
 }
-#endif
 
 /*
  * Call early during boot, before mem init or bootmem, to retreive the RTAS
index b0994050024ff0c127dfece85a4e42ade8255387..785fd9d7b3861bb89863a0f247bd256cb6664413 100644 (file)
@@ -41,7 +41,6 @@
 #include <asm/elf.h>
 #include <asm/machdep.h>
 #include <asm/paca.h>
-#include <asm/ppcdebug.h>
 #include <asm/time.h>
 #include <asm/cputable.h>
 #include <asm/sections.h>
@@ -60,6 +59,7 @@
 #include <asm/firmware.h>
 #include <asm/systemcfg.h>
 #include <asm/xmon.h>
+#include <asm/udbg.h>
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
@@ -243,12 +243,6 @@ void __init early_setup(unsigned long dt_ptr)
 
        DBG(" -> early_setup()\n");
 
-       /*
-        * Fill the default DBG level (do we want to keep
-        * that old mecanism around forever ?)
-        */
-       ppcdbg_initialize();
-
        /*
         * Do early initializations using the flattened device
         * tree, like retreiving the physical memory map or
@@ -521,7 +515,6 @@ void __init setup_system(void)
 
        printk("-----------------------------------------------------\n");
        printk("ppc64_pft_size                = 0x%lx\n", ppc64_pft_size);
-       printk("ppc64_debug_switch            = 0x%lx\n", ppc64_debug_switch);
        printk("ppc64_interrupt_controller    = 0x%ld\n", ppc64_interrupt_controller);
        printk("systemcfg                     = 0x%p\n", systemcfg);
        printk("systemcfg->platform           = 0x%x\n", systemcfg->platform);
index 876c57c11365a57ff36e75f5171c865fb5c35e70..081d931eae481e34671818eab5b21a208cb18012 100644 (file)
@@ -44,7 +44,6 @@
 #include <asm/cacheflush.h>
 #ifdef CONFIG_PPC64
 #include "ppc32.h"
-#include <asm/ppcdebug.h>
 #include <asm/unistd.h>
 #include <asm/vdso.h>
 #else
index ec9d0984b6a09118f89abeb7f95675247c293f9f..58194e150711992afe9315d12afcf990964e933f 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm/ucontext.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
-#include <asm/ppcdebug.h>
 #include <asm/unistd.h>
 #include <asm/cacheflush.h>
 #include <asm/vdso.h>
index 6996a593dcb39b91422fa205f2af8057c2109165..1c7ea5e0631146c37b929e552128d55e042b8516 100644 (file)
@@ -61,6 +61,7 @@
 #include <asm/prom.h>
 #include <asm/irq.h>
 #include <asm/div64.h>
+#include <asm/smp.h>
 #ifdef CONFIG_PPC64
 #include <asm/systemcfg.h>
 #include <asm/firmware.h>
@@ -118,10 +119,6 @@ static unsigned adjusting_time = 0;
 unsigned long ppc_proc_freq;
 unsigned long ppc_tb_freq;
 
-#ifdef CONFIG_PPC32    /* XXX for now */
-#define boot_cpuid     0
-#endif
-
 u64 tb_last_jiffy __cacheline_aligned_in_smp;
 unsigned long tb_last_stamp;
 
index 2a912f411eb4af13500c97271e71e2b32d650daf..35bd03c41dd19727601e15f9169bc8807f50fb75 100644 (file)
@@ -23,6 +23,7 @@
 #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
 #include <asm/hvcall.h>
 #include <asm/iseries/hv_call.h>
+#include <asm/smp.h>
 
 void __spin_yield(raw_spinlock_t *lock)
 {
index 841d8b6323a8da26699086273bb4560514bc85f8..93d4fbfdb724a137ee6ab385d880e79e80795f75 100644 (file)
@@ -389,5 +389,22 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
        }
 
        /* kernel has accessed a bad area */
+
+       printk(KERN_ALERT "Unable to handle kernel paging request for ");
+       switch (regs->trap) {
+               case 0x300:
+               case 0x380:
+                       printk("data at address 0x%08lx\n", regs->dar);
+                       break;
+               case 0x400:
+               case 0x480:
+                       printk("instruction fetch\n");
+                       break;
+               default:
+                       printk("unknown fault\n");
+       }
+       printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
+               regs->nip);
+
        die("Kernel access of bad area", regs, sig);
 }
index b2f3dbca695223fc988c1be9cc778243481eb221..37273f518a350712c8dac36cdef4707677f8aca1 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/init.h>
 #include <linux/signal.h>
 
-#include <asm/ppcdebug.h>
 #include <asm/processor.h>
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
@@ -407,12 +406,6 @@ void __init htab_initialize(void)
        htab_size_bytes = htab_get_table_size();
        pteg_count = htab_size_bytes >> 7;
 
-       /* For debug, make the HTAB 1/8 as big as it normally would be. */
-       ifppcdebug(PPCDBG_HTABSIZE) {
-               pteg_count >>= 3;
-               htab_size_bytes = pteg_count << 7;
-       }
-
        htab_hash_mask = pteg_count - 1;
 
        if (systemcfg->platform & PLATFORM_LPAR) {
index dfe7fa37b41a16835b629964d2b21faefe2d97b9..ce974c83d88a6f1decd8341ccf92fbf253133c37 100644 (file)
@@ -57,7 +57,6 @@
 #include <asm/processor.h>
 #include <asm/mmzone.h>
 #include <asm/cputable.h>
-#include <asm/ppcdebug.h>
 #include <asm/sections.h>
 #include <asm/system.h>
 #include <asm/iommu.h>
index 4035cad8d7f19b84482d11f48ce067bb23e53133..da09ba03c424fb6b89ca06c795bbf2c646d5f734 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/machdep.h>
 #include <asm/abs_addr.h>
 #include <asm/system.h>
+#include <asm/smp.h>
 
 static int numa_enabled = 1;
 
index 51b7869409715d8ce9ebf51d31a89b4258460c55..900842451bd33a339676ffddfc540cc8e7f82646 100644 (file)
@@ -59,7 +59,6 @@
 #include <asm/processor.h>
 #include <asm/mmzone.h>
 #include <asm/cputable.h>
-#include <asm/ppcdebug.h>
 #include <asm/sections.h>
 #include <asm/system.h>
 #include <asm/iommu.h>
index c1135912cc055c2df6139a64ebe346a67349c94b..a06603d84a451147d0cd646c40d18d9ef172bc94 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/irq.h>
 #include <linux/spinlock.h>
 
-#include <asm/ppcdebug.h>
 #include <asm/iseries/hv_types.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_call_xm.h>
@@ -227,8 +226,6 @@ static void iSeries_enable_IRQ(unsigned int irq)
        /* Unmask secondary INTA */
        mask = 0x80000000;
        HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask);
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n",
-                       bus, subBus, deviceId, irq);
 }
 
 /* This is called by iSeries_activate_IRQs */
@@ -310,8 +307,6 @@ static void iSeries_disable_IRQ(unsigned int irq)
        /* Mask secondary INTA   */
        mask = 0x80000000;
        HvCallPci_maskInterrupts(bus, subBus, deviceId, mask);
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n",
-                       bus, subBus, deviceId, irq);
 }
 
 /*
index 7d7d5884343fa4a77a355601420a4cd681cf7aa2..4b75131773a698eef0ec7ff1ab38e5b3b9331b97 100644 (file)
@@ -32,7 +32,6 @@
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/pci-bridge.h>
-#include <asm/ppcdebug.h>
 #include <asm/iommu.h>
 #include <asm/abs_addr.h>
 
@@ -207,10 +206,6 @@ static struct device_node *build_device_node(HvBusNumber Bus,
        struct device_node *node;
        struct pci_dn *pdn;
 
-       PPCDBG(PPCDBG_BUSWALK,
-                       "-build_device_node 0x%02X.%02X.%02X Function: %02X\n",
-                       Bus, SubBus, AgentId, Function);
-
        node = kmalloc(sizeof(struct device_node), GFP_KERNEL);
        if (node == NULL)
                return NULL;
@@ -243,8 +238,6 @@ unsigned long __init find_and_init_phbs(void)
        struct pci_controller *phb;
        HvBusNumber bus;
 
-       PPCDBG(PPCDBG_BUSWALK, "find_and_init_phbs Entry\n");
-
        /* Check all possible buses. */
        for (bus = 0; bus < 256; bus++) {
                int ret = HvCallXm_testBus(bus);
@@ -261,9 +254,6 @@ unsigned long __init find_and_init_phbs(void)
                        phb->last_busno = bus;
                        phb->ops = &iSeries_pci_ops;
 
-                       PPCDBG(PPCDBG_BUSWALK, "PCI:Create iSeries pci_controller(%p), Bus: %04X\n",
-                                       phb, bus);
-
                        /* Find and connect the devices. */
                        scan_PHB_slots(phb);
                }
@@ -285,11 +275,9 @@ unsigned long __init find_and_init_phbs(void)
  */
 void iSeries_pcibios_init(void)
 {
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n");
        iomm_table_initialize();
        find_and_init_phbs();
        io_page_mask = -1;
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n");
 }
 
 /*
@@ -301,8 +289,6 @@ void __init iSeries_pci_final_fixup(void)
        struct device_node *node;
        int DeviceCount = 0;
 
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n");
-
        /* Fix up at the device node and pci_dev relationship */
        mf_display_src(0xC9000100);
 
@@ -316,9 +302,6 @@ void __init iSeries_pci_final_fixup(void)
                        ++DeviceCount;
                        pdev->sysdata = (void *)node;
                        PCI_DN(node)->pcidev = pdev;
-                       PPCDBG(PPCDBG_BUSWALK,
-                                       "pdev 0x%p <==> DevNode 0x%p\n",
-                                       pdev, node);
                        allocate_device_bars(pdev);
                        iSeries_Device_Information(pdev, DeviceCount);
                        iommu_devnode_init_iSeries(node);
@@ -333,13 +316,10 @@ void __init iSeries_pci_final_fixup(void)
 
 void pcibios_fixup_bus(struct pci_bus *PciBus)
 {
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup_bus(0x%04X) Entry.\n",
-                       PciBus->number);
 }
 
 void pcibios_fixup_resources(struct pci_dev *pdev)
 {
-       PPCDBG(PPCDBG_BUSWALK, "fixup_resources pdev %p\n", pdev);
 }
 
 /*
@@ -401,9 +381,6 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus,
                        printk("found device at bus %d idsel %d func %d (AgentId %x)\n",
                               bus, IdSel, Function, AgentId);
                        /*  Connect EADs: 0x18.00.12 = 0x00 */
-                       PPCDBG(PPCDBG_BUSWALK,
-                                       "PCI:Connect EADs: 0x%02X.%02X.%02X\n",
-                                       bus, SubBus, AgentId);
                        HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId,
                                        iseries_hv_addr(BridgeInfo),
                                        sizeof(struct HvCallPci_BridgeInfo));
@@ -414,14 +391,6 @@ static void scan_EADS_bridge(HvBusNumber bus, HvSubBusNumber SubBus,
                                        BridgeInfo->maxAgents,
                                        BridgeInfo->maxSubBusNumber,
                                        BridgeInfo->logicalSlotNumber);
-                               PPCDBG(PPCDBG_BUSWALK,
-                                       "PCI: BridgeInfo, Type:0x%02X, SubBus:0x%02X, MaxAgents:0x%02X, MaxSubBus: 0x%02X, LSlot: 0x%02X\n",
-                                       BridgeInfo->busUnitInfo.deviceType,
-                                       BridgeInfo->subBusNumber,
-                                       BridgeInfo->maxAgents,
-                                       BridgeInfo->maxSubBusNumber,
-                                       BridgeInfo->logicalSlotNumber);
-
                                if (BridgeInfo->busUnitInfo.deviceType ==
                                                HvCallPci_BridgeDevice)  {
                                        /* Scan_Bridge_Slot...: 0x18.00.12 */
@@ -454,9 +423,6 @@ static int scan_bridge_slot(HvBusNumber Bus,
 
        /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */
        Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel);
-       PPCDBG(PPCDBG_BUSWALK,
-               "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n",
-               Bus, 0, EADsIdSel, Irq);
 
        /*
         * Connect all functions of any device found.
@@ -482,9 +448,6 @@ static int scan_bridge_slot(HvBusNumber Bus,
                        printk("read vendor ID: %x\n", VendorId);
 
                        /* FoundDevice: 0x18.28.10 = 0x12AE */
-                       PPCDBG(PPCDBG_BUSWALK,
-                              "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n",
-                              Bus, SubBus, AgentId, VendorId, Irq);
                        HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId,
                                                      PCI_INTERRUPT_LINE, Irq);
                        if (HvRc != 0)
index c5207064977db1ac3ae901b6f86762e1a1393fc6..d3e4bf756c8382f4a8b6434787c44018093eaa5f 100644 (file)
@@ -71,8 +71,6 @@ extern void hvlog(char *fmt, ...);
 #endif
 
 /* Function Prototypes */
-extern void ppcdbg_initialize(void);
-
 static void build_iSeries_Memory_Map(void);
 static void iseries_shared_idle(void);
 static void iseries_dedicated_idle(void);
@@ -309,8 +307,6 @@ static void __init iSeries_init_early(void)
 
        ppc64_firmware_features = FW_FEATURE_ISERIES;
 
-       ppcdbg_initialize();
-
        ppc64_interrupt_controller = IC_ISERIES;
 
 #if defined(CONFIG_BLK_DEV_INITRD)
index 3336bad67724e0f6cb30ea775d9e3a6c00e1903b..fcb094ec6aec6efa082879088bf542399c43b23e 100644 (file)
@@ -40,7 +40,6 @@
 #include <asm/paca.h>
 #include <asm/iseries/hv_call.h>
 #include <asm/time.h>
-#include <asm/ppcdebug.h>
 #include <asm/machdep.h>
 #include <asm/cputable.h>
 #include <asm/system.h>
index 513e2723149358c4ff06ed556c449ecc6248be2e..fcc50bfd43fd35d560175b89917bbc51d4c56cfb 100644 (file)
@@ -37,7 +37,6 @@
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/rtas.h>
-#include <asm/ppcdebug.h>
 #include <asm/iommu.h>
 #include <asm/pci-bridge.h>
 #include <asm/machdep.h>
@@ -47,6 +46,7 @@
 #include <asm/firmware.h>
 #include <asm/tce.h>
 #include <asm/ppc-pci.h>
+#include <asm/udbg.h>
 
 #include "plpar_wrappers.h"
 
index ab0c6dd6ec94538beaab0c12e3b9254d224222fe..a50e5f3f396dc177da02deea3cbad714d01be4ce 100644 (file)
 #include <asm/machdep.h>
 #include <asm/abs_addr.h>
 #include <asm/mmu_context.h>
-#include <asm/ppcdebug.h>
 #include <asm/iommu.h>
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
 #include <asm/prom.h>
 #include <asm/abs_addr.h>
 #include <asm/cputable.h>
+#include <asm/udbg.h>
+#include <asm/smp.h>
 
 #include "plpar_wrappers.h"
 
index 382f8c5b0e7c0978892cf5f9a873ab9754477a25..3bd1b3e0600362237c410bbb7f008a67ddd68862 100644 (file)
@@ -107,14 +107,4 @@ static inline long plpar_put_term_char(unsigned long termno, unsigned long len,
                        lbuf[1]);
 }
 
-static inline long plpar_set_xdabr(unsigned long address, unsigned long flags)
-{
-       return plpar_hcall_norets(H_SET_XDABR, address, flags);
-}
-
-static inline long plpar_set_dabr(unsigned long val)
-{
-       return plpar_hcall_norets(H_SET_DABR, val);
-}
-
 #endif /* _PSERIES_PLPAR_WRAPPERS_H */
index 6562ff4b0a8210375270b37b70307ae1a94068a1..fbd214d68b0717573ed443632bde26d055038345 100644 (file)
@@ -48,7 +48,7 @@
 #include <asm/ptrace.h>
 #include <asm/machdep.h>
 #include <asm/rtas.h>
-#include <asm/ppcdebug.h>
+#include <asm/udbg.h>
 
 static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
 static DEFINE_SPINLOCK(ras_log_buf_lock);
index 65bee939eeccce1d5e626f985eee080af08c9c63..e78c39368841ba39251f3f6f219a987f2206a926 100644 (file)
@@ -65,6 +65,7 @@
 #include <asm/ppc-pci.h>
 #include <asm/i8259.h>
 #include <asm/udbg.h>
+#include <asm/smp.h>
 
 #include "plpar_wrappers.h"
 
@@ -353,14 +354,15 @@ static void pSeries_mach_cpu_die(void)
 
 static int pseries_set_dabr(unsigned long dabr)
 {
-       if (firmware_has_feature(FW_FEATURE_XDABR)) {
-               /* We want to catch accesses from kernel and userspace */
-               return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER);
-       }
-
-       return plpar_set_dabr(dabr);
+       return plpar_hcall_norets(H_SET_DABR, dabr);
 }
 
+static int pseries_set_xdabr(unsigned long dabr)
+{
+       /* We want to catch accesses from kernel and userspace */
+       return plpar_hcall_norets(H_SET_XDABR, dabr,
+                       H_DABRX_KERNEL | H_DABRX_USER);
+}
 
 /*
  * Early initialization.  Relocation is on but do not reference unbolted pages
@@ -396,8 +398,10 @@ static void __init pSeries_init_early(void)
                DBG("Hello World !\n");
        }
 
-       if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR))
+       if (firmware_has_feature(FW_FEATURE_DABR))
                ppc_md.set_dabr = pseries_set_dabr;
+       else if (firmware_has_feature(FW_FEATURE_XDABR))
+               ppc_md.set_dabr = pseries_set_xdabr;
 
        iommu_init_early_pSeries();
 
index 90bce6e0c191827e6a91a6ae91d762eee4094633..b7ac32fdd7766f74ceff0d2098df4614eae83701 100644 (file)
@@ -207,6 +207,9 @@ void __init i8259_init(unsigned long intack_addr, int offset)
 
        spin_unlock_irqrestore(&i8259_lock, flags);
 
+       for (i = 0; i < NUM_ISA_INTERRUPTS; ++i)
+               irq_desc[offset + i].handler = &i8259_pic;
+
        /* reserve our resources */
        setup_irq(offset + 2, &i8259_irqaction);
        request_resource(&ioport_resource, &pic1_iores);
@@ -216,6 +219,4 @@ void __init i8259_init(unsigned long intack_addr, int offset)
        if (intack_addr != 0)
                pci_intack = ioremap(intack_addr, 1);
 
-       for (i = 0; i < NUM_ISA_INTERRUPTS; ++i)
-               irq_desc[offset + i].handler = &i8259_pic;
 }
index 607722178c1a6695616c528c0511e8f22e23d41f..543d6590981248ff1ebdff05822c36aaeefe9ca0 100644 (file)
@@ -37,7 +37,6 @@
 #include <linux/vmalloc.h>
 #include <asm/io.h>
 #include <asm/prom.h>
-#include <asm/ppcdebug.h>
 #include <asm/iommu.h>
 #include <asm/pci-bridge.h>
 #include <asm/machdep.h>
index 3056ede2424d6be4f261674a2635484f813ec1ae..ae6af29938a1efc96513a6b8f33d25667d248f4f 100644 (file)
 #include <asm/thread_info.h>
 #include <asm/asm-offsets.h>
 
+#ifdef CONFIG_8xx
+#define ISYNC_8xx isync
+#else
+#define ISYNC_8xx
+#endif
        .text
 
        .align  5
@@ -800,8 +805,18 @@ _GLOBAL(_insb)
        subi    r4,r4,1
        blelr-
 00:    lbz     r5,0(r3)
-       eieio
-       stbu    r5,1(r4)
+01:    eieio
+02:    stbu    r5,1(r4)
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -811,8 +826,18 @@ _GLOBAL(_outsb)
        subi    r4,r4,1
        blelr-
 00:    lbzu    r5,1(r4)
-       stb     r5,0(r3)
-       eieio
+01:    stb     r5,0(r3)
+02:    eieio
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -822,8 +847,18 @@ _GLOBAL(_insw)
        subi    r4,r4,2
        blelr-
 00:    lhbrx   r5,0,r3
-       eieio
-       sthu    r5,2(r4)
+01:    eieio
+02:    sthu    r5,2(r4)
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -833,8 +868,18 @@ _GLOBAL(_outsw)
        subi    r4,r4,2
        blelr-
 00:    lhzu    r5,2(r4)
-       eieio
-       sthbrx  r5,0,r3
+01:    eieio
+02:    sthbrx  r5,0,r3
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -844,8 +889,18 @@ _GLOBAL(_insl)
        subi    r4,r4,4
        blelr-
 00:    lwbrx   r5,0,r3
-       eieio
-       stwu    r5,4(r4)
+01:    eieio
+02:    stwu    r5,4(r4)
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -855,8 +910,18 @@ _GLOBAL(_outsl)
        subi    r4,r4,4
        blelr-
 00:    lwzu    r5,4(r4)
-       stwbrx  r5,0,r3
-       eieio
+01:    stwbrx  r5,0,r3
+02:    eieio
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -867,8 +932,18 @@ _GLOBAL(_insw_ns)
        subi    r4,r4,2
        blelr-
 00:    lhz     r5,0(r3)
-       eieio
-       sthu    r5,2(r4)
+01:    eieio
+02:    sthu    r5,2(r4)
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -879,8 +954,18 @@ _GLOBAL(_outsw_ns)
        subi    r4,r4,2
        blelr-
 00:    lhzu    r5,2(r4)
-       sth     r5,0(r3)
-       eieio
+01:    sth     r5,0(r3)
+02:    eieio
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -891,8 +976,18 @@ _GLOBAL(_insl_ns)
        subi    r4,r4,4
        blelr-
 00:    lwz     r5,0(r3)
-       eieio
-       stwu    r5,4(r4)
+01:    eieio
+02:    stwu    r5,4(r4)
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
@@ -903,8 +998,18 @@ _GLOBAL(_outsl_ns)
        subi    r4,r4,4
        blelr-
 00:    lwzu    r5,4(r4)
-       stw     r5,0(r3)
-       eieio
+01:    stw     r5,0(r3)
+02:    eieio
+       ISYNC_8xx
+       .section .fixup,"ax"
+03:    blr
+       .text
+       .section __ex_table, "a"
+               .align 2
+               .long 00b, 03b
+               .long 01b, 03b
+               .long 02b, 03b
+       .text
        bdnz    00b
        blr
 
index 16adde6b429d2641827eade241cf016c22d2889b..42d980e82bdc021ced1e90bd8b1b420bf5bd9c02 100644 (file)
@@ -159,7 +159,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
  */
 static inline int check_io_access(struct pt_regs *regs)
 {
-#ifdef CONFIG_PPC_PMAC
+#if defined CONFIG_PPC_PMAC || defined CONFIG_8xx
        unsigned long msr = regs->msr;
        const struct exception_table_entry *entry;
        unsigned int *nip = (unsigned int *)regs->nip;
@@ -178,7 +178,11 @@ static inline int check_io_access(struct pt_regs *regs)
                        nip -= 2;
                else if (*nip == 0x4c00012c)    /* isync */
                        --nip;
-               if (*nip == 0x7c0004ac || (*nip >> 26) == 3) {
+               /* eieio from I/O string functions */
+               else if ((*nip) == 0x7c0006ac || *(nip+1) == 0x7c0006ac)
+                       nip += 2;
+               if (*nip == 0x7c0004ac || (*nip >> 26) == 3 ||
+                       (*(nip+1) >> 26) == 3) {
                        /* sync or twi */
                        unsigned int rb;
 
index c5ac5ce5d7d2d29e1cdac44f15cd24ee5e95447d..a21632d37e5ab7263f498664ef08ff448625086e 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <asm/io.h>
 #include <asm/8xx_immap.h>
 #include <syslib/m8xx_wdt.h>
 
@@ -29,8 +30,8 @@ void m8xx_wdt_reset(void)
 {
        volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR;
 
-       out_be16(imap->im_siu_conf.sc_swsr, 0x556c);    /* write magic1 */
-       out_be16(imap->im_siu_conf.sc_swsr, 0xaa39);    /* write magic2 */
+       out_be16(&imap->im_siu_conf.sc_swsr, 0x556c);   /* write magic1 */
+       out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39);   /* write magic2 */
 }
 
 static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs)
@@ -39,7 +40,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs)
 
        m8xx_wdt_reset();
 
-       out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS));   /* clear irq */
+       out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */
 
        return IRQ_HANDLED;
 }
@@ -51,7 +52,7 @@ void __init m8xx_wdt_handler_install(bd_t * binfo)
        u32 sypcr;
        u32 pitrtclk;
 
-       sypcr = in_be32(imap->im_siu_conf.sc_sypcr);
+       sypcr = in_be32(&imap->im_siu_conf.sc_sypcr);
 
        if (!(sypcr & 0x04)) {
                printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n",
@@ -87,9 +88,9 @@ void __init m8xx_wdt_handler_install(bd_t * binfo)
        else
                pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2;
 
-       out_be32(imap->im_sit.sit_pitc, pitc << 16);
+       out_be32(&imap->im_sit.sit_pitc, pitc << 16);
 
-       out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE);
+       out_be16(&imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE);
 
        if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction))
                panic("m8xx_wdt: error setting up the watchdog irq!");
index f16a5030527bd1e8f8818dc7337d49ba049054f3..b258c9314a1bda2b2bdf4f6e962e600a0ce206ba 100644 (file)
@@ -55,10 +55,6 @@ config XMON_DEFAULT
          xmon is normally disabled unless booted with 'xmon=on'.
          Use 'xmon=off' to disable xmon init during runtime.
 
-config PPCDBG
-       bool "Include PPCDBG realtime debugging"
-       depends on DEBUG_KERNEL
-
 config IRQSTACKS
        bool "Use separate kernel stacks when processing interrupts"
        help
index 8abd2ad928325e3cc29876859cddae39577d7542..8fec27469802290251e91f6221e6c883dd31d891 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/time.h>
 #include <asm/systemcfg.h>
 #include <asm/machdep.h>
+#include <asm/smp.h>
 
 extern void power4_idle(void);
 
index ff8679f260f3819a61bcf0f791c36fe677b18757..07ea03598c004774cfed9fde43bf0c587592eec8 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/mmu.h>
 #include <asm/sections.h>      /* _end */
 #include <asm/prom.h>
+#include <asm/smp.h>
 
 #define HASH_GROUP_SIZE 0x80   /* size of each hash group, asm/mmu.h */
 
index 3d2106b022a11f1376947255374278e2b6d30fcb..30247ff74972d3ef3a4048b3baca0d24141e5420 100644 (file)
@@ -295,8 +295,8 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
        }
 }
 
-static struct pci_dev *of_create_pci_dev(struct device_node *node,
-                                        struct pci_bus *bus, int devfn)
+struct pci_dev *of_create_pci_dev(struct device_node *node,
+                                struct pci_bus *bus, int devfn)
 {
        struct pci_dev *dev;
        const char *type;
@@ -354,10 +354,9 @@ static struct pci_dev *of_create_pci_dev(struct device_node *node,
 
        return dev;
 }
+EXPORT_SYMBOL(of_create_pci_dev);
 
-static void of_scan_pci_bridge(struct device_node *node, struct pci_dev *dev);
-
-static void __devinit of_scan_bus(struct device_node *node,
+void __devinit of_scan_bus(struct device_node *node,
                                  struct pci_bus *bus)
 {
        struct device_node *child = NULL;
@@ -381,9 +380,10 @@ static void __devinit of_scan_bus(struct device_node *node,
 
        do_bus_setup(bus);
 }
+EXPORT_SYMBOL(of_scan_bus);
 
-static void __devinit of_scan_pci_bridge(struct device_node *node,
-                                        struct pci_dev *dev)
+void __devinit of_scan_pci_bridge(struct device_node *node,
+                               struct pci_dev *dev)
 {
        struct pci_bus *bus;
        u32 *busrange, *ranges;
@@ -464,9 +464,10 @@ static void __devinit of_scan_pci_bridge(struct device_node *node,
        else if (mode == PCI_PROBE_NORMAL)
                pci_scan_child_bus(bus);
 }
+EXPORT_SYMBOL(of_scan_pci_bridge);
 #endif /* CONFIG_PPC_MULTIPLATFORM */
 
-static void __devinit scan_phb(struct pci_controller *hose)
+void __devinit scan_phb(struct pci_controller *hose)
 {
        struct pci_bus *bus;
        struct device_node *node = hose->arch_data;
index dece31e58bc4b69c4cf8aaf4a05be977584d65cc..0e8961dea3bca0ef72302657462f25285c15f1db 100644 (file)
@@ -46,7 +46,6 @@
 #include <asm/pgtable.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
-#include <asm/ppcdebug.h>
 #include <asm/btext.h>
 #include <asm/sections.h>
 #include <asm/machdep.h>
index a4bbca6dbb8b4624f01d150840ebeff031f0860b..e72b3f9061f018a8b0c32e865a73bfe9a9b2a3e4 100644 (file)
@@ -44,7 +44,6 @@
 #include <asm/pgtable.h>
 #include <asm/pci.h>
 #include <asm/iommu.h>
-#include <asm/ppcdebug.h>
 #include <asm/btext.h>
 #include <asm/sections.h>
 #include <asm/machdep.h>
index 3ad15c90fbbd29f55017735666719c96e79a561c..3c3f19192fcc9e164feab51b342e4d4344c94047 100644 (file)
@@ -440,7 +440,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
        struct device_node *root = of_find_node_by_path("/");
        unsigned int root_size_cells = 0;
        struct pci_controller *phb;
-       struct pci_bus *bus;
        int primary;
 
        root_size_cells = prom_n_size_cells(root);
@@ -456,10 +455,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
        of_node_put(root);
 
        pci_devs_phb_init_dynamic(phb);
-       phb->last_busno = 0xff;
-       bus = pci_scan_bus(phb->first_busno, phb->ops, phb->arch_data);
-       phb->bus = bus;
-       phb->last_busno = bus->subordinate;
+       scan_phb(phb);
 
        return phb;
 }
index 6654b350979cfd3a868c029677fff0239d9972ed..e99ec62c2c52abba20b1e4f36da62e70f4d925bc 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/paca.h>
 #include <asm/lppaca.h>
 #include <asm/machdep.h>
+#include <asm/smp.h>
 
 static DEFINE_PER_CPU(struct cpu, cpu_devices);
 
index d49c3613c8ece531898535748256ec5af39796bb..0d878e72fc449257623c78a778434becd0aa6eda 100644 (file)
  */
 
 #include <stdarg.h>
-#define WANT_PPCDBG_TAB /* Only defined here */
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/console.h>
-#include <asm/ppcdebug.h>
 #include <asm/processor.h>
 
 void (*udbg_putc)(unsigned char c);
@@ -89,59 +87,6 @@ void udbg_printf(const char *fmt, ...)
        va_end(args);
 }
 
-/* PPCDBG stuff */
-
-u64 ppc64_debug_switch;
-
-/* Special print used by PPCDBG() macro */
-void udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...)
-{
-       unsigned long active_debugs = debug_flags & ppc64_debug_switch;
-
-       if (active_debugs) {
-               va_list ap;
-               unsigned char buf[UDBG_BUFSIZE];
-               unsigned long i, len = 0;
-
-               for (i=0; i < PPCDBG_NUM_FLAGS; i++) {
-                       if (((1U << i) & active_debugs) && 
-                           trace_names[i]) {
-                               len += strlen(trace_names[i]); 
-                               udbg_puts(trace_names[i]);
-                               break;
-                       }
-               }
-
-               snprintf(buf, UDBG_BUFSIZE, " [%s]: ", current->comm);
-               len += strlen(buf); 
-               udbg_puts(buf);
-
-               while (len < 18) {
-                       udbg_puts(" ");
-                       len++;
-               }
-
-               va_start(ap, fmt);
-               vsnprintf(buf, UDBG_BUFSIZE, fmt, ap);
-               udbg_puts(buf);
-               va_end(ap);
-       }
-}
-
-unsigned long udbg_ifdebug(unsigned long flags)
-{
-       return (flags & ppc64_debug_switch);
-}
-
-/*
- * Initialize the PPCDBG state.  Called before relocation has been enabled.
- */
-void __init ppcdbg_initialize(void)
-{
-       ppc64_debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */
-       /* PPCDBG_PHBINIT | PPCDBG_MM | PPCDBG_MMINIT | PPCDBG_TCEINIT | PPCDBG_TCE */;
-}
-
 /*
  * Early boot console based on udbg
  */
index fa03864d06eb0d69c528ffa4f25e110d102ca44c..5670f0cd61433e69b1bcb05aff5dd7ea3c7e9f9e 100644 (file)
@@ -82,7 +82,6 @@ struct machdep_calls {
        void            (*iommu_dev_setup)(struct pci_dev *dev);
        void            (*iommu_bus_setup)(struct pci_bus *bus);
        void            (*irq_bus_setup)(struct pci_bus *bus);
-       int             (*set_dabr)(unsigned long dabr);
 #endif
 
        int             (*probe)(int platform);
@@ -158,6 +157,9 @@ struct machdep_calls {
           platform, called once per cpu. */
        void            (*enable_pmcs)(void);
 
+       /* Set DABR for this platform, leave empty for default implemenation */
+       int             (*set_dabr)(unsigned long dabr);
+
 #ifdef CONFIG_PPC32    /* XXX for now */
        /* A general init function, called by ppc_init in init/main.c.
           May be NULL. */
index a88728fba8f68953e81ccef575ea27d67afb8e7d..13aacff755f383ab21c2f7c997fdf10187a21f25 100644 (file)
@@ -34,6 +34,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
 
 void pci_devs_phb_init(void);
 void pci_devs_phb_init_dynamic(struct pci_controller *phb);
+void __devinit scan_phb(struct pci_controller *hose);
 
 /* PCI address cache management routines */
 void pci_addr_cache_insert_device(struct pci_dev *dev);
index 8bcdd0faefea83515934bf141bbb524f95158e82..98581e5a827957712599d215aa8ba7077e494187 100644 (file)
@@ -86,7 +86,6 @@ extern void __cpu_die(unsigned int cpu);
 #else
 /* for UP */
 #define smp_setup_cpu_maps()
-#define smp_release_cpus()
 
 #endif /* CONFIG_SMP */
 
@@ -94,6 +93,9 @@ extern void __cpu_die(unsigned int cpu);
 #define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id)
 #define set_hard_smp_processor_id(CPU, VAL) \
        do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0)
+
+extern void smp_release_cpus(void);
+
 #else
 /* 32-bit */
 #ifndef CONFIG_SMP
index f7f614dfc648170760cc31da3284b20ffcc717b6..2bfdf9c98459e9ee28d98ccb90c3e638f0bc69be 100644 (file)
@@ -237,9 +237,9 @@ static inline void __raw_writel(__u32 b, volatile void __iomem *addr)
 #define outsl(port, buf, nl)   _outsl_ns((port)+___IO_BASE, (buf), (nl))
 
 /*
- * On powermacs, we will get a machine check exception if we
- * try to read data from a non-existent I/O port.  Because the
- * machine check is an asynchronous exception, it isn't
+ * On powermacs and 8xx we will get a machine check exception 
+ * if we try to read data from a non-existent I/O port. Because
+ * the machine check is an asynchronous exception, it isn't
  * well-defined which instruction SRR0 will point to when the
  * exception occurs.
  * With the sequence below (twi; isync; nop), we have found that
@@ -258,7 +258,7 @@ extern __inline__ unsigned int name(unsigned int port)      \
 {                                                      \
        unsigned int x;                                 \
        __asm__ __volatile__(                           \
-                       op "    %0,0,%1\n"              \
+               "0:"    op "    %0,0,%1\n"              \
                "1:     twi     0,%0,0\n"               \
                "2:     isync\n"                        \
                "3:     nop\n"                          \
@@ -269,6 +269,7 @@ extern __inline__ unsigned int name(unsigned int port)      \
                ".previous\n"                           \
                ".section __ex_table,\"a\"\n"           \
                "       .align  2\n"                    \
+               "       .long   0b,5b\n"                \
                "       .long   1b,5b\n"                \
                "       .long   2b,5b\n"                \
                "       .long   3b,5b\n"                \
@@ -282,11 +283,12 @@ extern __inline__ unsigned int name(unsigned int port)    \
 extern __inline__ void name(unsigned int val, unsigned int port) \
 {                                                      \
        __asm__ __volatile__(                           \
-               op " %0,0,%1\n"                         \
+               "0:" op " %0,0,%1\n"                    \
                "1:     sync\n"                         \
                "2:\n"                                  \
                ".section __ex_table,\"a\"\n"           \
                "       .align  2\n"                    \
+               "       .long   0b,2b\n"                \
                "       .long   1b,2b\n"                \
                ".previous"                             \
                : : "r" (val), "r" (port + ___IO_BASE));        \
index 342e2d755550a1de3cf7907352e86b54ce53fcad..fafdf885a3cca595091c3520a4bde7b390b5dceb 100644 (file)
@@ -162,6 +162,14 @@ pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus);
 
 extern struct pci_controller *init_phb_dynamic(struct device_node *dn);
 
+extern struct pci_dev *of_create_pci_dev(struct device_node *node,
+                                       struct pci_bus *bus, int devfn);
+
+extern void of_scan_pci_bridge(struct device_node *node,
+                               struct pci_dev *dev);
+
+extern void of_scan_bus(struct device_node *node, struct pci_bus *bus);
+
 extern int pci_read_irq_line(struct pci_dev *dev);
 
 extern void pcibios_add_platform_entries(struct pci_dev *dev);
diff --git a/include/asm-ppc64/ppcdebug.h b/include/asm-ppc64/ppcdebug.h
deleted file mode 100644 (file)
index fd7f696..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef __PPCDEBUG_H
-#define __PPCDEBUG_H
-/********************************************************************
- * Author: Adam Litke, IBM Corp
- * (c) 2001
- *
- * This file contains definitions and macros for a runtime debugging
- * system for ppc64 (This should also work on 32 bit with a few    
- * adjustments.                                                   
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- ********************************************************************/
-
-#include <linux/config.h>
-#include <linux/types.h>
-#include <asm/udbg.h>
-#include <stdarg.h>
-
-#define PPCDBG_BITVAL(X)     ((1UL)<<((unsigned long)(X)))
-
-/* Defined below are the bit positions of various debug flags in the
- * ppc64_debug_switch variable.
- * -- When adding new values, please enter them into trace names below -- 
- *
- * Values 62 & 63 can be used to stress the hardware page table management
- * code.  They must be set statically, any attempt to change them dynamically
- * would be a very bad idea.
- */
-#define PPCDBG_MMINIT        PPCDBG_BITVAL(0)
-#define PPCDBG_MM            PPCDBG_BITVAL(1)
-#define PPCDBG_SYS32         PPCDBG_BITVAL(2)
-#define PPCDBG_SYS32NI       PPCDBG_BITVAL(3)
-#define PPCDBG_SYS32X       PPCDBG_BITVAL(4)
-#define PPCDBG_SYS32M       PPCDBG_BITVAL(5)
-#define PPCDBG_SYS64         PPCDBG_BITVAL(6)
-#define PPCDBG_SYS64NI       PPCDBG_BITVAL(7)
-#define PPCDBG_SYS64X       PPCDBG_BITVAL(8)
-#define PPCDBG_SIGNAL        PPCDBG_BITVAL(9)
-#define PPCDBG_SIGNALXMON    PPCDBG_BITVAL(10)
-#define PPCDBG_BINFMT32      PPCDBG_BITVAL(11)
-#define PPCDBG_BINFMT64      PPCDBG_BITVAL(12)
-#define PPCDBG_BINFMTXMON    PPCDBG_BITVAL(13)
-#define PPCDBG_BINFMT_32ADDR PPCDBG_BITVAL(14)
-#define PPCDBG_ALIGNFIXUP    PPCDBG_BITVAL(15)
-#define PPCDBG_TCEINIT       PPCDBG_BITVAL(16)
-#define PPCDBG_TCE           PPCDBG_BITVAL(17)
-#define PPCDBG_PHBINIT       PPCDBG_BITVAL(18)
-#define PPCDBG_SMP           PPCDBG_BITVAL(19)
-#define PPCDBG_BOOT          PPCDBG_BITVAL(20)
-#define PPCDBG_BUSWALK       PPCDBG_BITVAL(21)
-#define PPCDBG_PROM         PPCDBG_BITVAL(22)
-#define PPCDBG_RTAS         PPCDBG_BITVAL(23)
-#define PPCDBG_HTABSTRESS    PPCDBG_BITVAL(62)
-#define PPCDBG_HTABSIZE      PPCDBG_BITVAL(63)
-#define PPCDBG_NONE          (0UL)
-#define PPCDBG_ALL           (0xffffffffUL)
-
-/* The default initial value for the debug switch */
-#define PPC_DEBUG_DEFAULT    0 
-/* #define PPC_DEBUG_DEFAULT    PPCDBG_ALL        */
-
-#define PPCDBG_NUM_FLAGS     64
-
-extern u64 ppc64_debug_switch;
-
-#ifdef WANT_PPCDBG_TAB
-/* A table of debug switch names to allow name lookup in xmon 
- * (and whoever else wants it.
- */
-char *trace_names[PPCDBG_NUM_FLAGS] = {
-       /* Known debug names */
-       "mminit",       "mm",
-       "syscall32",    "syscall32_ni", "syscall32x",   "syscall32m",
-       "syscall64",    "syscall64_ni", "syscall64x",
-       "signal",       "signal_xmon",
-       "binfmt32",     "binfmt64",     "binfmt_xmon",  "binfmt_32addr",
-       "alignfixup",   "tceinit",      "tce",          "phb_init",     
-       "smp",          "boot",         "buswalk",      "prom",
-       "rtas"
-};
-#else
-extern char *trace_names[64];
-#endif /* WANT_PPCDBG_TAB */
-
-#ifdef CONFIG_PPCDBG
-/* Macro to conditionally print debug based on debug_switch */
-#define PPCDBG(...) udbg_ppcdbg(__VA_ARGS__)
-
-/* Macro to conditionally call a debug routine based on debug_switch */
-#define PPCDBGCALL(FLAGS,FUNCTION) ifppcdebug(FLAGS) FUNCTION
-
-/* Macros to test for debug states */
-#define ifppcdebug(FLAGS) if (udbg_ifdebug(FLAGS))
-#define ppcdebugset(FLAGS) (udbg_ifdebug(FLAGS))
-#define PPCDBG_BINFMT (test_thread_flag(TIF_32BIT) ? PPCDBG_BINFMT32 : PPCDBG_BINFMT64)
-
-#else
-#define PPCDBG(...) do {;} while (0)
-#define PPCDBGCALL(FLAGS,FUNCTION) do {;} while (0)
-#define ifppcdebug(...) if (0)
-#define ppcdebugset(FLAGS) (0)
-#endif /* CONFIG_PPCDBG */
-
-#endif /*__PPCDEBUG_H */
index 8192fb8541cc424d45d6f7bbfeada93b28ce2574..e3b927991851d357e6efe9d1ce30bda3f6d298ee 100644 (file)
@@ -23,9 +23,6 @@ extern int udbg_read(char *buf, int buflen);
 
 extern void register_early_udbg_console(void);
 extern void udbg_printf(const char *fmt, ...);
-extern void udbg_ppcdbg(unsigned long flags, const char *fmt, ...);
-extern unsigned long udbg_ifdebug(unsigned long flags);
-extern void __init ppcdbg_initialize(void);
 
 extern void udbg_init_uart(void __iomem *comport, unsigned int speed);