From 1efc81fdf0ef9f1f1e7a7d27381f7685009c129d Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 2 Jan 2008 12:00:24 -0800 Subject: [PATCH] --- yaml --- r: 75294 b: refs/heads/master c: ed96f2470bf5d315770dc199f0250c1b8d3c2f3c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/MAINTAINERS | 2 +- trunk/arch/arm/mach-at91/board-ek.c | 9 ---- trunk/arch/arm/mach-pxa/pxa25x.c | 13 +---- trunk/arch/mips/Kconfig | 4 +- trunk/arch/mips/au1000/common/pci.c | 8 +-- trunk/arch/mips/kernel/head.S | 3 +- trunk/arch/mips/kernel/time.c | 4 +- trunk/arch/mips/pci/ops-au1000.c | 53 ++++++++++--------- trunk/arch/mips/pci/ops-mace.c | 7 --- trunk/arch/mips/pci/pci-ip32.c | 4 +- trunk/arch/mips/sgi-ip32/ip32-irq.c | 1 + trunk/arch/mips/sgi-ip32/ip32-platform.c | 20 +++---- trunk/drivers/media/video/bt8xx/bttv-driver.c | 4 +- trunk/drivers/media/video/ivtv/ivtv-driver.c | 4 -- trunk/drivers/media/video/ivtv/ivtv-i2c.c | 5 +- trunk/fs/binfmt_elf.c | 4 +- trunk/kernel/acct.c | 2 +- trunk/sound/pci/hda/hda_intel.c | 3 +- 19 files changed, 62 insertions(+), 90 deletions(-) diff --git a/[refs] b/[refs] index df2d8b7920ca..55fc7f9085ef 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d238998fbfa49f30b02f0a5de5294ca53c58348c +refs/heads/master: ed96f2470bf5d315770dc199f0250c1b8d3c2f3c diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 79c711e6074b..56e6159a1b5d 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -1919,7 +1919,7 @@ INFINIBAND SUBSYSTEM P: Roland Dreier M: rolandd@cisco.com P: Sean Hefty -M: mshefty@ichips.intel.com +M: sean.hefty@intel.com P: Hal Rosenstock M: hal.rosenstock@gmail.com L: general@lists.openfabrics.org diff --git a/trunk/arch/arm/mach-at91/board-ek.c b/trunk/arch/arm/mach-at91/board-ek.c index 53a5ef9e72ee..d05b1b2be9fb 100644 --- a/trunk/arch/arm/mach-at91/board-ek.c +++ b/trunk/arch/arm/mach-at91/board-ek.c @@ -109,15 +109,6 @@ static struct spi_board_info ek_spi_devices[] = { #endif }; -static struct i2c_board_info __initdata ek_i2c_devices[] = { - { - I2C_BOARD_INFO("ics1523", 0x26), - }, - { - I2C_BOARD_INFO("dac3550", 0x4d), - } -}; - #define EK_FLASH_BASE AT91_CHIPSELECT_0 #define EK_FLASH_SIZE 0x200000 diff --git a/trunk/arch/arm/mach-pxa/pxa25x.c b/trunk/arch/arm/mach-pxa/pxa25x.c index 9732d5d9466b..dcd81f8d0833 100644 --- a/trunk/arch/arm/mach-pxa/pxa25x.c +++ b/trunk/arch/arm/mach-pxa/pxa25x.c @@ -178,19 +178,13 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save) SAVE(GAFR1_L); SAVE(GAFR1_U); SAVE(GAFR2_L); SAVE(GAFR2_U); - SAVE(ICMR); ICMR = 0; + SAVE(ICMR); SAVE(CKEN); SAVE(PSTR); - - /* Clear GPIO transition detect bits */ - GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; } static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) { - /* ensure not to come back here if it wasn't intended */ - PSPR = 0; - /* restore registers */ RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); @@ -201,12 +195,7 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); - PSSR = PSSR_RDH | PSSR_PH; - RESTORE(CKEN); - - ICLR = 0; - ICCR = 1; RESTORE(ICMR); RESTORE(PSTR); } diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index 291d368ffd28..c6fc405a6c8e 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -992,6 +992,8 @@ config BOOT_ELF64 menu "CPU selection" +source "kernel/time/Kconfig" + choice prompt "CPU type" default CPU_R4X00 @@ -1766,8 +1768,6 @@ config NR_CPUS performance should round up your number of processors to the next power of two. -source "kernel/time/Kconfig" - # # Timer Interrupt Frequency Configuration # diff --git a/trunk/arch/mips/au1000/common/pci.c b/trunk/arch/mips/au1000/common/pci.c index ce771487567d..6fa70a36a250 100644 --- a/trunk/arch/mips/au1000/common/pci.c +++ b/trunk/arch/mips/au1000/common/pci.c @@ -1,8 +1,8 @@ /* * BRIEF MODULE DESCRIPTION - * Alchemy/AMD Au1x00 PCI support. + * Alchemy/AMD Au1x00 pci support. * - * Copyright 2001-2003, 2007 MontaVista Software Inc. + * Copyright 2001,2002,2003 MontaVista Software Inc. * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com * @@ -66,8 +66,6 @@ static unsigned long virt_io_addr; static int __init au1x_pci_setup(void) { - extern void au1x_pci_cfg_init(void); - #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); @@ -96,8 +94,6 @@ static int __init au1x_pci_setup(void) set_io_port_base(virt_io_addr); #endif - au1x_pci_cfg_init(); - register_pci_controller(&au1x_controller); return 0; } diff --git a/trunk/arch/mips/kernel/head.S b/trunk/arch/mips/kernel/head.S index 50be56c9e9ef..236768731063 100644 --- a/trunk/arch/mips/kernel/head.S +++ b/trunk/arch/mips/kernel/head.S @@ -136,8 +136,7 @@ EXPORT(_stext) * kernel load address. This is needed because this platform does * not have a ELF loader yet. */ -FEXPORT(__kernel_entry) - j kernel_entry + __INIT #endif __INIT_REFOK diff --git a/trunk/arch/mips/kernel/time.c b/trunk/arch/mips/kernel/time.c index 2995be1ab3ca..1ecfbb7eba6c 100644 --- a/trunk/arch/mips/kernel/time.c +++ b/trunk/arch/mips/kernel/time.c @@ -147,9 +147,9 @@ static __init int cpu_has_mfc0_count_bug(void) return 1; /* - * we assume newer revisions are ok + * I don't have erratas for newer R4400 so be paranoid. */ - return 0; + return 1; } return 0; diff --git a/trunk/arch/mips/pci/ops-au1000.c b/trunk/arch/mips/pci/ops-au1000.c index 1314bd58f036..6b29904acf45 100644 --- a/trunk/arch/mips/pci/ops-au1000.c +++ b/trunk/arch/mips/pci/ops-au1000.c @@ -1,8 +1,8 @@ /* * BRIEF MODULE DESCRIPTION - * Alchemy/AMD Au1x00 PCI support. + * Alchemy/AMD Au1x00 pci support. * - * Copyright 2001-2003, 2007 MontaVista Software Inc. + * Copyright 2001,2002,2003 MontaVista Software Inc. * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com * @@ -69,27 +69,10 @@ void mod_wired_entry(int entry, unsigned long entrylo0, write_c0_pagemask(old_pagemask); } -static struct vm_struct *pci_cfg_vm; +struct vm_struct *pci_cfg_vm; static int pci_cfg_wired_entry; -static unsigned long last_entryLo0, last_entryLo1; - -/* - * We can't ioremap the entire pci config space because it's too large. - * Nor can we call ioremap dynamically because some device drivers use - * the PCI config routines from within interrupt handlers and that - * becomes a problem in get_vm_area(). We use one wired TLB to handle - * all config accesses for all busses. - */ -void __init au1x_pci_cfg_init(void) -{ - /* Reserve a wired entry for PCI config accesses */ - pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP); - if (!pci_cfg_vm) - panic(KERN_ERR "PCI unable to get vm area\n"); - pci_cfg_wired_entry = read_c0_wired(); - add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K); - last_entryLo0 = last_entryLo1 = 0xffffffff; -} +static int first_cfg = 1; +unsigned long last_entryLo0, last_entryLo1; static int config_access(unsigned char access_type, struct pci_bus *bus, unsigned int dev_fn, unsigned char where, @@ -114,6 +97,27 @@ static int config_access(unsigned char access_type, struct pci_bus *bus, Au1500_PCI_STATCMD); au_sync_udelay(1); + /* + * We can't ioremap the entire pci config space because it's + * too large. Nor can we call ioremap dynamically because some + * device drivers use the pci config routines from within + * interrupt handlers and that becomes a problem in get_vm_area(). + * We use one wired tlb to handle all config accesses for all + * busses. To improve performance, if the current device + * is the same as the last device accessed, we don't touch the + * tlb. + */ + if (first_cfg) { + /* reserve a wired entry for pci config accesses */ + first_cfg = 0; + pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP); + if (!pci_cfg_vm) + panic(KERN_ERR "PCI unable to get vm area\n"); + pci_cfg_wired_entry = read_c0_wired(); + add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K); + last_entryLo0 = last_entryLo1 = 0xffffffff; + } + /* Allow board vendors to implement their own off-chip idsel. * If it doesn't succeed, may as well bail out at this point. */ @@ -140,12 +144,9 @@ static int config_access(unsigned char access_type, struct pci_bus *bus, /* page boundary */ cfg_base = cfg_base & PAGE_MASK; - /* - * To improve performance, if the current device is the same as - * the last device accessed, we don't touch the TLB. - */ entryLo0 = (6 << 26) | (cfg_base >> 6) | (2 << 3) | 7; entryLo1 = (6 << 26) | (cfg_base >> 6) | (0x1000 >> 6) | (2 << 3) | 7; + if ((entryLo0 != last_entryLo0) || (entryLo1 != last_entryLo1)) { mod_wired_entry(pci_cfg_wired_entry, entryLo0, entryLo1, (unsigned long)pci_cfg_vm->addr, PM_4K); diff --git a/trunk/arch/mips/pci/ops-mace.c b/trunk/arch/mips/pci/ops-mace.c index e95881897ec9..fe5451449304 100644 --- a/trunk/arch/mips/pci/ops-mace.c +++ b/trunk/arch/mips/pci/ops-mace.c @@ -42,10 +42,6 @@ static int mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 *val) { - u32 control = mace->pci.control; - - /* disable master aborts interrupts during config read */ - mace->pci.control = control & ~MACEPCI_CONTROL_MAR_INT; mace->pci.config_addr = mkaddr(bus, devfn, reg); switch (size) { case 1: @@ -58,9 +54,6 @@ mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, *val = mace->pci.config_data.l; break; } - /* ack possible master abort */ - mace->pci.error &= ~MACEPCI_ERROR_MASTER_ABORT; - mace->pci.control = control; DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val); diff --git a/trunk/arch/mips/pci/pci-ip32.c b/trunk/arch/mips/pci/pci-ip32.c index 532b561b4442..618ea7dbc474 100644 --- a/trunk/arch/mips/pci/pci-ip32.c +++ b/trunk/arch/mips/pci/pci-ip32.c @@ -119,7 +119,6 @@ static struct pci_controller mace_pci_controller = { .iommu = 0, .mem_offset = MACE_PCI_MEM_OFFSET, .io_offset = 0, - .io_map_base = CKSEG1ADDR(MACEPCI_LOW_IO), }; static int __init mace_init(void) @@ -136,8 +135,7 @@ static int __init mace_init(void) BUG_ON(request_irq(MACE_PCI_BRIDGE_IRQ, macepci_error, 0, "MACE PCI error", NULL)); - /* extend memory resources */ - iomem_resource.end = mace_pci_mem_resource.end; + iomem_resource = mace_pci_mem_resource; ioport_resource = mace_pci_io_resource; register_pci_controller(&mace_pci_controller); diff --git a/trunk/arch/mips/sgi-ip32/ip32-irq.c b/trunk/arch/mips/sgi-ip32/ip32-irq.c index b0ea0e43ba48..cab7cc22ab67 100644 --- a/trunk/arch/mips/sgi-ip32/ip32-irq.c +++ b/trunk/arch/mips/sgi-ip32/ip32-irq.c @@ -426,6 +426,7 @@ static void ip32_irq0(void) crime_int = crime->istat & crime_mask; irq = MACE_VID_IN1_IRQ + __ffs(crime_int); + crime_int = 1 << irq; if (crime_int & CRIME_MACEISA_INT_MASK) { unsigned long mace_int = mace->perif.ctrl.istat; diff --git a/trunk/arch/mips/sgi-ip32/ip32-platform.c b/trunk/arch/mips/sgi-ip32/ip32-platform.c index 89a71f49b692..77febd68fcd4 100644 --- a/trunk/arch/mips/sgi-ip32/ip32-platform.c +++ b/trunk/arch/mips/sgi-ip32/ip32-platform.c @@ -13,22 +13,21 @@ #include #include -#define MACEISA_SERIAL1_OFFS offsetof(struct sgi_mace, isa.serial1) -#define MACEISA_SERIAL2_OFFS offsetof(struct sgi_mace, isa.serial2) - -#define MACE_PORT(offset,_irq) \ +/* + * .iobase isn't a constant (in the sense of C) so we fill it in at runtime. + */ +#define MACE_PORT(int) \ { \ - .mapbase = MACE_BASE + offset, \ - .irq = _irq, \ + .irq = int, \ .uartclk = 1843200, \ .iotype = UPIO_MEM, \ - .flags = UPF_SKIP_TEST|UPF_IOREMAP, \ + .flags = UPF_SKIP_TEST, \ .regshift = 8, \ } static struct plat_serial8250_port uart8250_data[] = { - MACE_PORT(MACEISA_SERIAL1_OFFS, MACEISA_SERIAL1_IRQ), - MACE_PORT(MACEISA_SERIAL2_OFFS, MACEISA_SERIAL2_IRQ), + MACE_PORT(MACEISA_SERIAL1_IRQ), + MACE_PORT(MACEISA_SERIAL2_IRQ), { }, }; @@ -42,6 +41,9 @@ static struct platform_device uart8250_device = { static int __init uart8250_init(void) { + uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1; + uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2; + return platform_device_register(&uart8250_device); } diff --git a/trunk/drivers/media/video/bt8xx/bttv-driver.c b/trunk/drivers/media/video/bt8xx/bttv-driver.c index 581a3c955739..c02d92deacd2 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-driver.c +++ b/trunk/drivers/media/video/bt8xx/bttv-driver.c @@ -3063,10 +3063,11 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, struct video_mbuf *mbuf = arg; unsigned int i; + mutex_lock(&fh->cap.lock); retval = videobuf_mmap_setup(&fh->cap,gbuffers,gbufsize, V4L2_MEMORY_MMAP); if (retval < 0) - return retval; + goto fh_unlock_and_return; gbuffers = retval; memset(mbuf,0,sizeof(*mbuf)); @@ -3074,6 +3075,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, mbuf->size = gbuffers * gbufsize; for (i = 0; i < gbuffers; i++) mbuf->offsets[i] = i * gbufsize; + mutex_unlock(&fh->cap.lock); return 0; } case VIDIOCMCAPTURE: diff --git a/trunk/drivers/media/video/ivtv/ivtv-driver.c b/trunk/drivers/media/video/ivtv/ivtv-driver.c index 10d6faf8ccda..6d2dd8764f81 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-driver.c +++ b/trunk/drivers/media/video/ivtv/ivtv-driver.c @@ -1076,10 +1076,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ivtv_process_eeprom(itv); } - /* The mspx4xx chips need a longer delay for some reason */ - if (!(itv->hw_flags & IVTV_HW_MSP34XX)) - itv->i2c_algo.udelay = 5; - if (itv->std == 0) { itv->std = V4L2_STD_NTSC_M; } diff --git a/trunk/drivers/media/video/ivtv/ivtv-i2c.c b/trunk/drivers/media/video/ivtv/ivtv-i2c.c index 36e54f78aa2a..44678fe27a04 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-i2c.c +++ b/trunk/drivers/media/video/ivtv/ivtv-i2c.c @@ -541,7 +541,7 @@ static const struct i2c_algo_bit_data ivtv_i2c_algo_template = { .setscl = ivtv_setscl_old, .getsda = ivtv_getsda_old, .getscl = ivtv_getscl_old, - .udelay = 10, + .udelay = 5, .timeout = 200, }; @@ -718,6 +718,9 @@ int init_ivtv_i2c(struct ivtv *itv) sizeof(struct i2c_adapter)); memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template, sizeof(struct i2c_algo_bit_data)); + /* The mspx4xx chips need a longer delay for some reason */ + if (itv->hw_flags & IVTV_HW_MSP34XX) + itv->i2c_algo.udelay = 10; itv->i2c_algo.data = itv; itv->i2c_adap.algo_data = &itv->i2c_algo; } diff --git a/trunk/fs/binfmt_elf.c b/trunk/fs/binfmt_elf.c index f0b3171842f2..ba8de7ca260b 100644 --- a/trunk/fs/binfmt_elf.c +++ b/trunk/fs/binfmt_elf.c @@ -1384,7 +1384,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus, prstatus->pr_sigpend = p->pending.signal.sig[0]; prstatus->pr_sighold = p->blocked.sig[0]; prstatus->pr_pid = task_pid_vnr(p); - prstatus->pr_ppid = task_pid_vnr(p->real_parent); + prstatus->pr_ppid = task_pid_vnr(p->parent); prstatus->pr_pgrp = task_pgrp_vnr(p); prstatus->pr_sid = task_session_vnr(p); if (thread_group_leader(p)) { @@ -1430,7 +1430,7 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, psinfo->pr_psargs[len] = 0; psinfo->pr_pid = task_pid_vnr(p); - psinfo->pr_ppid = task_pid_vnr(p->real_parent); + psinfo->pr_ppid = task_pid_vnr(p->parent); psinfo->pr_pgrp = task_pgrp_vnr(p); psinfo->pr_sid = task_session_vnr(p); diff --git a/trunk/kernel/acct.c b/trunk/kernel/acct.c index 521dfa53cb99..cf19547cc9e4 100644 --- a/trunk/kernel/acct.c +++ b/trunk/kernel/acct.c @@ -482,7 +482,7 @@ static void do_acct_process(struct file *file) #endif #if ACCT_VERSION==3 ac.ac_pid = current->tgid; - ac.ac_ppid = current->real_parent->tgid; + ac.ac_ppid = current->parent->tgid; #endif spin_lock_irq(¤t->sighand->siglock); diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index 3fa0f9704909..62b9fb386903 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -555,7 +555,8 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec) } if (!chip->rirb.cmds) return chip->rirb.res; /* the last value */ - schedule_timeout_uninterruptible(1); + udelay(10); + cond_resched(); } while (time_after_eq(timeout, jiffies)); if (chip->msi) {