Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] N32 needs to use the compat version of sys_nfsservctl.
[MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts.
[MIPS] Sibyte: Fix name of clocksource.
[MIPS] SNI: s/achknowledge/acknowledge/
[MIPS] Makefile: Fix canonical system names
[MIPS] vpe: handle halting TCs in an errata safe way.
[MIPS] Sibyte: Stop timers before programming next even.
[MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks.
[MIPS] Lasat: Fix overlap of interrupt number ranges.
[MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1
[MIPS] Fix shadow register support.
[MIPS] Change get_cycles to always return 0.
[MIPS] Fix typo in R3000 TRACE_IRQFLAGS code
[MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR.
[MIPS] iounmap if in vr41xx_pciu_init() pci clock is over 33MHz
[MIPS] BCM1480: Remove duplicate acknowledge of timer interrupt.
[MIPS] Sibyte: pin timer interrupt to their cores.
[MIPS] Qemu: Add early printk, your friend in a cold night.
[MIPS] Convert reference to mem_map to pfn_to_page().
[MIPS] Sibyte: resurrect old cache hack.

+157 -144
+1 -10
arch/mips/Kconfig
··· 361 361 select PCSPEAKER 362 362 select SWAP_IO_SPACE 363 363 select SYS_HAS_CPU_MIPS32_R1 364 + select SYS_HAS_EARLY_PRINTK 364 365 select SYS_SUPPORTS_32BIT_KERNEL 365 366 select SYS_SUPPORTS_BIG_ENDIAN 366 367 select SYS_SUPPORTS_LITTLE_ENDIAN 367 - select ARCH_SPARSEMEM_ENABLE 368 368 select GENERIC_HARDIRQS_NO__DO_IRQ 369 369 select NR_CPUS_DEFAULT_1 370 370 select SYS_SUPPORTS_SMP ··· 1409 1409 depends on SYS_SUPPORTS_MULTITHREADING 1410 1410 select CPU_MIPSR2_IRQ_VI 1411 1411 select CPU_MIPSR2_IRQ_EI 1412 - select CPU_MIPSR2_SRS 1413 1412 select MIPS_MT 1414 1413 select NR_CPUS_DEFAULT_2 1415 1414 select SMP ··· 1425 1426 select GENERIC_CLOCKEVENTS_BROADCAST 1426 1427 select CPU_MIPSR2_IRQ_VI 1427 1428 select CPU_MIPSR2_IRQ_EI 1428 - select CPU_MIPSR2_SRS 1429 1429 select MIPS_MT 1430 1430 select NR_CPUS_DEFAULT_8 1431 1431 select SMP ··· 1451 1453 depends on SYS_SUPPORTS_MULTITHREADING 1452 1454 select CPU_MIPSR2_IRQ_VI 1453 1455 select CPU_MIPSR2_IRQ_EI 1454 - select CPU_MIPSR2_SRS 1455 1456 select MIPS_MT 1456 1457 help 1457 1458 Includes a loader for loading an elf relocatable object ··· 1577 1580 # Extended interrupt mode is an R2 feature 1578 1581 # 1579 1582 config CPU_MIPSR2_IRQ_EI 1580 - bool 1581 - 1582 - # 1583 - # Shadow registers are an R2 feature 1584 - # 1585 - config CPU_MIPSR2_SRS 1586 1583 bool 1587 1584 1588 1585 config CPU_HAS_SYNC
+1 -1
arch/mips/Makefile
··· 44 44 45 45 ifneq ($(SUBARCH),$(ARCH)) 46 46 ifeq ($(CROSS_COMPILE),) 47 - CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-gnu-linux- $(tool-archpref)-unknown-gnu-linux-) 47 + CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-linux-gnu- $(tool-archpref)-unknown-linux-gnu-) 48 48 endif 49 49 endif 50 50
+5 -1
arch/mips/kernel/cevt-bcm1480.c
··· 75 75 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); 76 76 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); 77 77 78 + __raw_writeq(0, cfg); 78 79 __raw_writeq(delta - 1, init); 79 80 __raw_writeq(M_SCD_TIMER_ENABLE, cfg); 80 81 ··· 123 122 CLOCK_EVT_FEAT_ONESHOT; 124 123 clockevent_set_clock(cd, V_SCD_TIMER_FREQ); 125 124 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); 126 - cd->min_delta_ns = clockevent_delta2ns(1, cd); 125 + cd->min_delta_ns = clockevent_delta2ns(2, cd); 127 126 cd->rating = 200; 128 127 cd->irq = irq; 129 128 cd->cpumask = cpumask_of_cpu(cpu); ··· 144 143 145 144 action->handler = sibyte_counter_handler; 146 145 action->flags = IRQF_DISABLED | IRQF_PERCPU; 146 + action->mask = cpumask_of_cpu(cpu); 147 147 action->name = name; 148 148 action->dev_id = cd; 149 + 150 + irq_set_affinity(irq, cpumask_of_cpu(cpu)); 149 151 setup_irq(irq, action); 150 152 }
+5 -1
arch/mips/kernel/cevt-sb1250.c
··· 73 73 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); 74 74 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); 75 75 76 + __raw_writeq(0, cfg); 76 77 __raw_writeq(delta - 1, init); 77 78 __raw_writeq(M_SCD_TIMER_ENABLE, cfg); 78 79 ··· 122 121 CLOCK_EVT_FEAT_ONESHOT; 123 122 clockevent_set_clock(cd, V_SCD_TIMER_FREQ); 124 123 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); 125 - cd->min_delta_ns = clockevent_delta2ns(1, cd); 124 + cd->min_delta_ns = clockevent_delta2ns(2, cd); 126 125 cd->rating = 200; 127 126 cd->irq = irq; 128 127 cd->cpumask = cpumask_of_cpu(cpu); ··· 143 142 144 143 action->handler = sibyte_counter_handler; 145 144 action->flags = IRQF_DISABLED | IRQF_PERCPU; 145 + action->mask = cpumask_of_cpu(cpu); 146 146 action->name = name; 147 147 action->dev_id = cd; 148 + 149 + irq_set_affinity(irq, cpumask_of_cpu(cpu)); 148 150 setup_irq(irq, action); 149 151 }
+5
arch/mips/kernel/cpu-probe.c
··· 943 943 } 944 944 945 945 __cpu_name[cpu] = cpu_to_name(c); 946 + 947 + if (cpu_has_mips_r2) 948 + c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; 949 + else 950 + c->srsets = 1; 946 951 } 947 952 948 953 __init void cpu_report(void)
+1 -1
arch/mips/kernel/csrc-sb1250.c
··· 43 43 } 44 44 45 45 struct clocksource bcm1250_clocksource = { 46 - .name = "MIPS", 46 + .name = "bcm1250-counter-3", 47 47 .rating = 200, 48 48 .read = sb1250_hpt_read, 49 49 .mask = CLOCKSOURCE_MASK(23),
+1 -1
arch/mips/kernel/genex.S
··· 146 146 and k0, ST0_IEP 147 147 bnez k0, 1f 148 148 149 - mfc0 k0, EP0_EPC 149 + mfc0 k0, CP0_EPC 150 150 .set noreorder 151 151 j k0 152 152 rfe
+1 -1
arch/mips/kernel/irq-rm7000.c
··· 44 44 45 45 for (i = base; i < base + 4; i++) 46 46 set_irq_chip_and_handler(i, &rm7k_irq_controller, 47 - handle_level_irq); 47 + handle_percpu_irq); 48 48 }
+1 -1
arch/mips/kernel/irq-rm9000.c
··· 104 104 105 105 rm9000_perfcount_irq = base + 1; 106 106 set_irq_chip_and_handler(rm9000_perfcount_irq, &rm9k_perfcounter_irq, 107 - handle_level_irq); 107 + handle_percpu_irq); 108 108 }
+1 -1
arch/mips/kernel/irq_cpu.c
··· 116 116 117 117 for (i = irq_base + 2; i < irq_base + 8; i++) 118 118 set_irq_chip_and_handler(i, &mips_cpu_irq_controller, 119 - handle_level_irq); 119 + handle_percpu_irq); 120 120 }
+2
arch/mips/kernel/proc.c
··· 60 60 cpu_has_dsp ? " dsp" : "", 61 61 cpu_has_mipsmt ? " mt" : "" 62 62 ); 63 + seq_printf(m, "shadow register sets\t: %d\n", 64 + cpu_data[n].srsets); 63 65 64 66 sprintf(fmt, "VCE%%c exceptions\t\t: %s\n", 65 67 cpu_has_vce ? "%u" : "not available");
+1 -1
arch/mips/kernel/scall64-n32.S
··· 293 293 PTR sys_ni_syscall /* 6170, was get_kernel_syms */ 294 294 PTR sys_ni_syscall /* was query_module */ 295 295 PTR sys_quotactl 296 - PTR sys_nfsservctl 296 + PTR compat_sys_nfsservctl 297 297 PTR sys_ni_syscall /* res. for getpmsg */ 298 298 PTR sys_ni_syscall /* 6175 for putpmsg */ 299 299 PTR sys_ni_syscall /* res. for afs_syscall */
+3 -65
arch/mips/kernel/traps.c
··· 1100 1100 return (void *)old_handler; 1101 1101 } 1102 1102 1103 - #ifdef CONFIG_CPU_MIPSR2_SRS 1104 - /* 1105 - * MIPSR2 shadow register set allocation 1106 - * FIXME: SMP... 1107 - */ 1108 - 1109 - static struct shadow_registers { 1110 - /* 1111 - * Number of shadow register sets supported 1112 - */ 1113 - unsigned long sr_supported; 1114 - /* 1115 - * Bitmap of allocated shadow registers 1116 - */ 1117 - unsigned long sr_allocated; 1118 - } shadow_registers; 1119 - 1120 - static void mips_srs_init(void) 1121 - { 1122 - shadow_registers.sr_supported = ((read_c0_srsctl() >> 26) & 0x0f) + 1; 1123 - printk(KERN_INFO "%ld MIPSR2 register sets available\n", 1124 - shadow_registers.sr_supported); 1125 - shadow_registers.sr_allocated = 1; /* Set 0 used by kernel */ 1126 - } 1127 - 1128 - int mips_srs_max(void) 1129 - { 1130 - return shadow_registers.sr_supported; 1131 - } 1132 - 1133 - int mips_srs_alloc(void) 1134 - { 1135 - struct shadow_registers *sr = &shadow_registers; 1136 - int set; 1137 - 1138 - again: 1139 - set = find_first_zero_bit(&sr->sr_allocated, sr->sr_supported); 1140 - if (set >= sr->sr_supported) 1141 - return -1; 1142 - 1143 - if (test_and_set_bit(set, &sr->sr_allocated)) 1144 - goto again; 1145 - 1146 - return set; 1147 - } 1148 - 1149 - void mips_srs_free(int set) 1150 - { 1151 - struct shadow_registers *sr = &shadow_registers; 1152 - 1153 - clear_bit(set, &sr->sr_allocated); 1154 - } 1155 - 1156 1103 static asmlinkage void do_default_vi(void) 1157 1104 { 1158 1105 show_regs(get_irq_regs()); ··· 1110 1163 { 1111 1164 unsigned long handler; 1112 1165 unsigned long old_handler = vi_handlers[n]; 1166 + int srssets = current_cpu_data.srsets; 1113 1167 u32 *w; 1114 1168 unsigned char *b; 1115 1169 ··· 1126 1178 1127 1179 b = (unsigned char *)(ebase + 0x200 + n*VECTORSPACING); 1128 1180 1129 - if (srs >= mips_srs_max()) 1181 + if (srs >= srssets) 1130 1182 panic("Shadow register set %d not supported", srs); 1131 1183 1132 1184 if (cpu_has_veic) { ··· 1134 1186 board_bind_eic_interrupt(n, srs); 1135 1187 } else if (cpu_has_vint) { 1136 1188 /* SRSMap is only defined if shadow sets are implemented */ 1137 - if (mips_srs_max() > 1) 1189 + if (srssets > 1) 1138 1190 change_c0_srsmap(0xf << n*4, srs << n*4); 1139 1191 } 1140 1192 ··· 1200 1252 { 1201 1253 return set_vi_srs_handler(n, addr, 0); 1202 1254 } 1203 - 1204 - #else 1205 - 1206 - static inline void mips_srs_init(void) 1207 - { 1208 - } 1209 - 1210 - #endif /* CONFIG_CPU_MIPSR2_SRS */ 1211 1255 1212 1256 /* 1213 1257 * This is used by native signal handling ··· 1442 1502 ebase = (unsigned long) alloc_bootmem_low_pages(0x200 + VECTORSPACING*64); 1443 1503 else 1444 1504 ebase = CAC_BASE; 1445 - 1446 - mips_srs_init(); 1447 1505 1448 1506 per_cpu_trap_init(); 1449 1507
+10 -4
arch/mips/kernel/vpe.c
··· 1003 1003 write_tc_c0_tcstatus(tmp); 1004 1004 1005 1005 write_tc_c0_tchalt(TCHALT_H); 1006 + mips_ihb(); 1006 1007 1007 1008 /* bind it to anything other than VPE1 */ 1008 1009 // write_tc_c0_tcbind(read_tc_c0_tcbind() & ~TCBIND_CURVPE); // | TCBIND_CURVPE ··· 1236 1235 settc(t->index); 1237 1236 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA); 1238 1237 1239 - /* mark the TC unallocated and halt'ed */ 1240 - write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A); 1238 + /* halt the TC */ 1241 1239 write_tc_c0_tchalt(TCHALT_H); 1240 + mips_ihb(); 1241 + 1242 + /* mark the TC unallocated */ 1243 + write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A); 1242 1244 1243 1245 v->state = VPE_STATE_UNUSED; 1244 1246 ··· 1537 1533 t->pvpe = get_vpe(0); /* set the parent vpe */ 1538 1534 } 1539 1535 1536 + /* halt the TC */ 1537 + write_tc_c0_tchalt(TCHALT_H); 1538 + mips_ihb(); 1539 + 1540 1540 tmp = read_tc_c0_tcstatus(); 1541 1541 1542 1542 /* mark not activated and not dynamically allocatable */ 1543 1543 tmp &= ~(TCSTATUS_A | TCSTATUS_DA); 1544 1544 tmp |= TCSTATUS_IXMT; /* interrupt exempt */ 1545 1545 write_tc_c0_tcstatus(tmp); 1546 - 1547 - write_tc_c0_tchalt(TCHALT_H); 1548 1546 } 1549 1547 } 1550 1548
+14 -8
arch/mips/lasat/interrupt.c
··· 19 19 * Lasat boards. 20 20 */ 21 21 #include <linux/init.h> 22 - #include <linux/irq.h> 23 - #include <linux/sched.h> 24 - #include <linux/slab.h> 25 22 #include <linux/interrupt.h> 26 - #include <linux/kernel_stat.h> 23 + #include <linux/irq.h> 27 24 28 25 #include <asm/bootinfo.h> 29 26 #include <asm/irq_cpu.h> 30 27 #include <asm/lasat/lasatint.h> 31 - #include <asm/time.h> 32 - #include <asm/gdb-stub.h> 28 + 29 + #include <irq.h> 33 30 34 31 static volatile int *lasat_int_status; 35 32 static volatile int *lasat_int_mask; ··· 94 97 95 98 /* if int_status == 0, then the interrupt has already been cleared */ 96 99 if (int_status) { 97 - irq = LASATINT_BASE + ls1bit32(int_status); 100 + irq = LASAT_IRQ_BASE + ls1bit32(int_status); 98 101 99 102 do_IRQ(irq); 100 103 } 101 104 } 105 + 106 + static struct irqaction cascade = { 107 + .handler = no_action, 108 + .mask = CPU_MASK_NONE, 109 + .name = "cascade", 110 + }; 102 111 103 112 void __init arch_init_irq(void) 104 113 { ··· 130 127 } 131 128 132 129 mips_cpu_irq_init(); 133 - for (i = LASATINT_BASE; i <= LASATINT_END; i++) 130 + 131 + for (i = LASAT_IRQ_BASE; i <= LASAT_IRQ_END; i++) 134 132 set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq); 133 + 134 + setup_irq(LASAT_CASCADE_IRQ, &cascade); 135 135 }
+6 -1
arch/mips/mm/c-r4k.c
··· 7 7 * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org) 8 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 9 9 */ 10 + #include <linux/hardirq.h> 10 11 #include <linux/init.h> 11 12 #include <linux/highmem.h> 12 13 #include <linux/kernel.h> ··· 508 507 509 508 static void r4k_flush_data_cache_page(unsigned long addr) 510 509 { 511 - r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1); 510 + if (in_atomic()) 511 + local_r4k_flush_data_cache_page((void *)addr); 512 + else 513 + r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 514 + 1, 1); 512 515 } 513 516 514 517 struct flush_icache_range_args {
+3 -3
arch/mips/mm/cerr-sb1.c
··· 154 154 if (status & ~(1UL << 31)) { 155 155 l2_err = csr_in32(IOADDR(A_BUS_L2_ERRORS)); 156 156 #ifdef DUMP_L2_ECC_TAG_ON_ERROR 157 - l2_tag = in64(IO_SPACE_BASE | A_L2_ECC_TAG); 157 + l2_tag = in64(IOADDR(A_L2_ECC_TAG)); 158 158 #endif 159 159 memio_err = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS)); 160 160 printk("Bus watcher error counters: %08x %08x\n", l2_err, memio_err); ··· 183 183 #ifdef CONFIG_SIBYTE_BW_TRACE 184 184 /* Freeze the trace buffer now */ 185 185 #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) 186 - csr_out32(M_BCM1480_SCD_TRACE_CFG_FREEZE, IO_SPACE_BASE | A_SCD_TRACE_CFG); 186 + csr_out32(M_BCM1480_SCD_TRACE_CFG_FREEZE, IOADDR(A_SCD_TRACE_CFG)); 187 187 #else 188 - csr_out32(M_SCD_TRACE_CFG_FREEZE, IO_SPACE_BASE | A_SCD_TRACE_CFG); 188 + csr_out32(M_SCD_TRACE_CFG_FREEZE, IOADDR(A_SCD_TRACE_CFG)); 189 189 #endif 190 190 printk("Trace buffer frozen\n"); 191 191 #endif
+1 -1
arch/mips/mm/init.c
··· 426 426 427 427 #ifdef CONFIG_HIGHMEM 428 428 for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) { 429 - struct page *page = mem_map + tmp; 429 + struct page *page = pfn_to_page(tmp); 430 430 431 431 if (!page_is_ram(tmp)) { 432 432 SetPageReserved(page);
+22 -1
arch/mips/pci/fixup-sni.c
··· 113 113 { 0, INTA, INTB, INTC, INTD }, /* Slot 5 */ 114 114 }; 115 115 116 + static char irq_tab_pcit_cplus[13][5] __initdata = { 117 + /* INTA INTB INTC INTD */ 118 + { 0, 0, 0, 0, 0 }, /* HOST bridge */ 119 + { 0, INTB, INTC, INTD, INTA }, /* PCI Slot 9 */ 120 + { 0, 0, 0, 0, 0 }, /* PCI-EISA */ 121 + { 0, 0, 0, 0, 0 }, /* Unused */ 122 + { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */ 123 + { 0, INTB, INTC, INTD, INTA }, /* fixup */ 124 + }; 125 + 116 126 static inline int is_rm300_revd(void) 117 127 { 118 128 unsigned char csmsr = *(volatile unsigned char *)PCIMT_CSMSR; ··· 133 123 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 134 124 { 135 125 switch (sni_brd_type) { 136 - case SNI_BRD_PCI_TOWER: 137 126 case SNI_BRD_PCI_TOWER_CPLUS: 127 + if (slot == 4) { 128 + /* 129 + * SNI messed up interrupt wiring for onboard 130 + * PCI bus 1; we need to fix this up here 131 + */ 132 + while (dev && dev->bus->number != 1) 133 + dev = dev->bus->self; 134 + if (dev && dev->devfn >= PCI_DEVFN(4, 0)) 135 + slot = 5; 136 + } 137 + return irq_tab_pcit_cplus[slot][pin]; 138 + case SNI_BRD_PCI_TOWER: 138 139 return irq_tab_pcit[slot][pin]; 139 140 140 141 case SNI_BRD_PCI_MTOWER:
+17 -15
arch/mips/pci/pci-lasat.c
··· 5 5 * 6 6 * Copyright (C) 2000, 2001, 04 Keith M Wesolowski 7 7 */ 8 - #include <linux/kernel.h> 9 8 #include <linux/init.h> 9 + #include <linux/kernel.h> 10 10 #include <linux/pci.h> 11 11 #include <linux/types.h> 12 + 12 13 #include <asm/bootinfo.h> 13 - #include <asm/lasat/lasatint.h> 14 + 15 + #include <irq.h> 14 16 15 17 extern struct pci_ops nile4_pci_ops; 16 18 extern struct pci_ops gt64xxx_pci0_ops; ··· 57 55 58 56 arch_initcall(lasat_pci_setup); 59 57 60 - #define LASATINT_ETH1 (LASATINT_BASE + 0) 61 - #define LASATINT_ETH0 (LASATINT_BASE + 1) 62 - #define LASATINT_HDC (LASATINT_BASE + 2) 63 - #define LASATINT_COMP (LASATINT_BASE + 3) 64 - #define LASATINT_HDLC (LASATINT_BASE + 4) 65 - #define LASATINT_PCIA (LASATINT_BASE + 5) 66 - #define LASATINT_PCIB (LASATINT_BASE + 6) 67 - #define LASATINT_PCIC (LASATINT_BASE + 7) 68 - #define LASATINT_PCID (LASATINT_BASE + 8) 58 + #define LASAT_IRQ_ETH1 (LASAT_IRQ_BASE + 0) 59 + #define LASAT_IRQ_ETH0 (LASAT_IRQ_BASE + 1) 60 + #define LASAT_IRQ_HDC (LASAT_IRQ_BASE + 2) 61 + #define LASAT_IRQ_COMP (LASAT_IRQ_BASE + 3) 62 + #define LASAT_IRQ_HDLC (LASAT_IRQ_BASE + 4) 63 + #define LASAT_IRQ_PCIA (LASAT_IRQ_BASE + 5) 64 + #define LASAT_IRQ_PCIB (LASAT_IRQ_BASE + 6) 65 + #define LASAT_IRQ_PCIC (LASAT_IRQ_BASE + 7) 66 + #define LASAT_IRQ_PCID (LASAT_IRQ_BASE + 8) 69 67 70 68 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 71 69 { ··· 73 71 case 1: 74 72 case 2: 75 73 case 3: 76 - return LASATINT_PCIA + (((slot-1) + (pin-1)) % 4); 74 + return LASAT_IRQ_PCIA + (((slot-1) + (pin-1)) % 4); 77 75 case 4: 78 - return LASATINT_ETH1; /* Ethernet 1 (LAN 2) */ 76 + return LASAT_IRQ_ETH1; /* Ethernet 1 (LAN 2) */ 79 77 case 5: 80 - return LASATINT_ETH0; /* Ethernet 0 (LAN 1) */ 78 + return LASAT_IRQ_ETH0; /* Ethernet 0 (LAN 1) */ 81 79 case 6: 82 - return LASATINT_HDC; /* IDE controller */ 80 + return LASAT_IRQ_HDC; /* IDE controller */ 83 81 default: 84 82 return 0xff; /* Illegal */ 85 83 }
+1
arch/mips/pci/pci-vr41xx.c
··· 154 154 pciu_write(PCICLKSELREG, QUARTER_VTCLOCK); 155 155 else { 156 156 printk(KERN_ERR "PCI Clock is over 33MHz.\n"); 157 + iounmap(pciu_base); 157 158 return -EINVAL; 158 159 } 159 160
+2 -1
arch/mips/qemu/Makefile
··· 4 4 5 5 obj-y = q-firmware.o q-irq.o q-mem.o q-setup.o q-reset.o 6 6 7 - obj-$(CONFIG_SMP) += q-smp.o 7 + obj-$(CONFIG_EARLY_PRINTK) += q-console.o 8 + obj-$(CONFIG_SMP) += q-smp.o 8 9 9 10 EXTRA_CFLAGS += -Werror
+26
arch/mips/qemu/q-console.c
··· 1 + #include <linux/console.h> 2 + #include <linux/init.h> 3 + #include <linux/serial_reg.h> 4 + #include <asm/io.h> 5 + 6 + #define PORT(offset) (0x3f8 + (offset)) 7 + 8 + static inline unsigned int serial_in(int offset) 9 + { 10 + return inb(PORT(offset)); 11 + } 12 + 13 + static inline void serial_out(int offset, int value) 14 + { 15 + outb(value, PORT(offset)); 16 + } 17 + 18 + int prom_putchar(char c) 19 + { 20 + while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0) 21 + ; 22 + 23 + serial_out(UART_TX, c); 24 + 25 + return 1; 26 + }
+6
arch/mips/qemu/q-firmware.c
··· 2 2 #include <linux/string.h> 3 3 #include <asm/addrspace.h> 4 4 #include <asm/bootinfo.h> 5 + #include <asm/io.h> 6 + 7 + #define QEMU_PORT_BASE 0xb4000000 5 8 6 9 void __init prom_init(void) 7 10 { ··· 18 15 } else { 19 16 add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM); 20 17 } 18 + 19 + 20 + set_io_port_base(QEMU_PORT_BASE); 21 21 }
-3
arch/mips/qemu/q-setup.c
··· 6 6 7 7 extern void qemu_reboot_setup(void); 8 8 9 - #define QEMU_PORT_BASE 0xb4000000 10 - 11 9 const char *get_system_type(void) 12 10 { 13 11 return "Qemu"; ··· 18 20 19 21 void __init plat_mem_setup(void) 20 22 { 21 - set_io_port_base(QEMU_PORT_BASE); 22 23 qemu_reboot_setup(); 23 24 }
+5 -16
arch/mips/sibyte/bcm1480/irq.c
··· 370 370 #endif 371 371 /* Setup uart 1 settings, mapper */ 372 372 /* QQQ FIXME */ 373 - __raw_writeq(M_DUART_IMR_BRK, IO_SPACE_BASE + A_DUART_IMRREG(kgdb_port)); 373 + __raw_writeq(M_DUART_IMR_BRK, IOADDR(A_DUART_IMRREG(kgdb_port))); 374 374 375 375 __raw_writeq(IMR_IP6_VAL, 376 - IO_SPACE_BASE + A_BCM1480_IMR_REGISTER(0, R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + 377 - (kgdb_irq<<3)); 376 + IOADDR(A_BCM1480_IMR_REGISTER(0, R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + 377 + (kgdb_irq << 3))); 378 378 bcm1480_unmask_irq(0, kgdb_irq); 379 379 380 380 #ifdef CONFIG_GDB_CONSOLE ··· 412 412 413 413 extern void bcm1480_mailbox_interrupt(void); 414 414 415 - static inline void dispatch_ip4(void) 416 - { 417 - int cpu = smp_processor_id(); 418 - int irq = K_BCM1480_INT_TIMER_0 + cpu; 419 - 420 - /* Reset the timer */ 421 - __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, 422 - IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); 423 - 424 - do_IRQ(irq); 425 - } 426 - 427 415 static inline void dispatch_ip2(void) 428 416 { 429 417 unsigned long long mask_h, mask_l; ··· 439 451 440 452 asmlinkage void plat_irq_dispatch(void) 441 453 { 454 + unsigned int cpu = smp_processor_id(); 442 455 unsigned int pending; 443 456 444 457 #ifdef CONFIG_SIBYTE_BCM1480_PROF ··· 456 467 #endif 457 468 458 469 if (pending & CAUSEF_IP4) 459 - dispatch_ip4(); 470 + do_IRQ(K_BCM1480_INT_TIMER_0 + cpu); 460 471 #ifdef CONFIG_SMP 461 472 else if (pending & CAUSEF_IP3) 462 473 bcm1480_mailbox_interrupt();
+1 -1
arch/mips/sni/pcimt.c
··· 244 244 if (pend & IT_EISA) { 245 245 int irq; 246 246 /* 247 - * Note: ASIC PCI's builtin interrupt achknowledge feature is 247 + * Note: ASIC PCI's builtin interrupt acknowledge feature is 248 248 * broken. Using it may result in loss of some or all i8259 249 249 * interrupts, so don't use PCIMT_INT_ACKNOWLEDGE ... 250 250 */
+1
include/asm-mips/cpu-info.h
··· 54 54 struct cache_desc dcache; /* Primary D or combined I/D cache */ 55 55 struct cache_desc scache; /* Secondary cache */ 56 56 struct cache_desc tcache; /* Tertiary/split secondary cache */ 57 + int srsets; /* Shadow register sets */ 57 58 #if defined(CONFIG_MIPS_MT_SMTC) 58 59 /* 59 60 * In the MIPS MT "SMTC" model, each TC is considered
-5
include/asm-mips/lasat/lasatint.h
··· 1 1 #ifndef __ASM_LASAT_LASATINT_H 2 2 #define __ASM_LASAT_LASATINT_H 3 3 4 - #include <linux/irq.h> 5 - 6 - #define LASATINT_BASE MIPS_CPU_IRQ_BASE 7 - #define LASATINT_END (LASATINT_BASE + 16) 8 - 9 4 /* lasat 100 */ 10 5 #define LASAT_INT_STATUS_REG_100 (KSEG1ADDR(0x1c880000)) 11 6 #define LASAT_INT_MASK_REG_100 (KSEG1ADDR(0x1c890000))
+13
include/asm-mips/mach-lasat/irq.h
··· 1 + #ifndef _ASM_MACH_LASAT_IRQ_H 2 + #define _ASM_MACH_LASAT_IRQ_H 3 + 4 + #define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 0) 5 + 6 + #define LASAT_IRQ_BASE 8 7 + #define LASAT_IRQ_END 23 8 + 9 + #define NR_IRQS 24 10 + 11 + #include_next <irq.h> 12 + 13 + #endif /* _ASM_MACH_LASAT_IRQ_H */
+1 -1
include/asm-mips/timex.h
··· 35 35 36 36 static inline cycles_t get_cycles(void) 37 37 { 38 - return read_c0_count(); 38 + return 0; 39 39 } 40 40 41 41 #endif /* __KERNEL__ */