1. 07 7月, 2007 10 次提交
    • L
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · dadde13a
      Linus Torvalds 提交于
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
        [MIPS] Fix scheduling latency issue on 24K, 34K and 74K cores
        [MIPS] Add macros to encode processor revisions.
        [MIPS] RM7000: Enable ICACHE_REFILLS_WORKAROUND_WAR.
        [MIPS] SMTC: Fix cut'n'paste bug in Kconfig.debug
        [MIPS] Change libgcc-style functions from lib-y to obj-y
        [MIPS] Fix timer/performance interrupt detection
        [MIPS] AP/SP: Avoid triggering the 34K E125 performance issue
        [MIPS] 64-bit TO_PHYS_MASK macro for RM9000 processors
      dadde13a
    • P
      mm: fixup /proc/vmstat output · 23c1fb52
      Peter Zijlstra 提交于
      Line up the vmstat_text with zone_stat_item
      
      enum zone_stat_item {
      	/* First 128 byte cacheline (assuming 64 bit words) */
      	NR_FREE_PAGES,
      	NR_INACTIVE,
      	NR_ACTIVE,
      
      We current have nr_active and nr_inactive reversed.
      
      [ "OK with patch, though using initializers canbe handy to prevent such
         things in future:
      
      	static const char * const vmstat_text[] = {
      		[NR_FREE_PAGES] = "nr_free_pages",
      		..."
      							 - Alexey ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      23c1fb52
    • Y
      potential compiler error, irqfunc caller sites update · 0da2f0f1
      Yoann Padioleau 提交于
      In 7d12e780 David Howells performed
      this evolution:
       "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers"
      
      He correctly updated many of the function definitions that were using this
      extra regs pointer parameter but forgot to update some caller sites of
      those functions.  The reason the modifications was not properly done on all
      drivers is that some drivers were rarely compiled because they are for
      AMIGA, or that some code sites were inside #ifdefs where the option is not
      set or inside #if 0.
      
      Here is the semantic patch that found the occurences
      and fixed the problem.
      
      @ rule1 @
      identifier fn;
      identifier irq, dev_id;
      typedef irqreturn_t;
      @@
      
      static irqreturn_t fn(int irq, void *dev_id)
      {
         ...
      }
      
      @@
      identifier rule1.fn;
      expression E1, E2, E3;
      @@
      
       fn(E1, E2
      -   ,E3
         )
      Signed-off-by: NYoann Padioleau <padator@wanadoo.fr>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0da2f0f1
    • V
      i386: es7000 build breakage fix · 071922c0
      Vivek Goyal 提交于
      o Commit 1833d6bc broke the build if
        compiled with CONFIG_ES7000=y and CONFIG_X86_GENERICARCH=n
      
      arch/i386/kernel/built-in.o(.init.text+0x4fa9): In function `acpi_parse_madt':
      : undefined reference to `acpi_madt_oem_check'
      arch/i386/kernel/built-in.o(.init.text+0x7406): In function `smp_read_mpc':
      : undefined reference to `mps_oem_check'
      arch/i386/kernel/built-in.o(.init.text+0x8990): In function
      `connect_bsp_APIC':
      : undefined reference to `enable_apic_mode'
      make: *** [.tmp_vmlinux1] Error 1
      
      o Fix the build issue. Provided the definitions of missing functions.
      
      o Don't have ES7000 machine. Only compile tested.
      
      Cc: Len Brown <lenb@kernel.org>
      Cc: Natalie Protasevich <protasnb@gmail.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      071922c0
    • B
      PNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues · 41a53114
      Bjorn Helgaas 提交于
      When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
      the device is working, but it really isn't configured correctly.  The BIOS
      *will* configure it, but only if we call _SRS after (1) reversing the order
      of the SIR and FIR I/O port regions and (2) changing the IRQ from
      active-high to active-low.
      
      This patch addresses the 2.6.22 regression:
          "no irda0 interface (2.6.21 was OK), smsc does not find chip"
      
      I tested this on a Portege 4000.  The smsc-ircc2 driver correctly detects
      the device, and "irattach irda0 -s && irdadump" shows transmitted and
      received packets.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Andrey Borzenkov <arvidjaar@mail.ru>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
      Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      41a53114
    • A
      fix logic error in ipc compat semctl() · d57d9731
      Alexander Graf 提交于
      When calling a semctl(IPC_STAT) without IPC_64 the check if the memory is
      unevaluated.  This patch fixes this.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d57d9731
    • D
      x86_64: fix headers_install · 0db19c41
      David Woodhouse 提交于
      A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of
      files all of which are using the same #ifdef guard, "__ASM_STUB_" with no
      postfix.  So the second and later asm files #included in the same C file
      (often through standard headers like ioctl.h) yields no symbols.
      
      Strangeness with the Ubuntu 'tell me if I support something that's not
      explcitly mentioned in POSIX, and I'll strip it out' shell, I believe.
      
      We don't need the 'export' but we do need a semicolon at the end of the
      FNAME line:
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NRob Landley <rob@landley.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0db19c41
    • L
      MTRR: Fix race causing set_mtrr to go into infinite loop · d25c1ba2
      Loic Prylli 提交于
      Processors synchronization in set_mtrr requires the .gate field to be set
      after .count field is properly initialized.  Without an explicit barrier,
      the compiler was reordering those memory stores.  That was sometimes
      causing a processor (in ipi_handler) to see the .gate change and decrement
      .count before the latter is set by set_mtrr() (which then hangs in a
      infinite loop with irqs disabled).
      Signed-off-by: NLoic Prylli <loic@myri.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d25c1ba2
    • J
      i386: fix regression, endless loop in ptrace singlestep over an int80 · 1e2e99f0
      Jason Wessel 提交于
      The commit 635cf99a introduced a
      regression.  Executing a ptrace single step after certain int80
      accesses will infinitely loop and never advance the PC.
      
      The TIF_SINGLESTEP check should be done on the return from the syscall
      and not before it.
      
      I loops on each single step on the pop right after the int80 which writes out
      to the console.  At that point you can issue as many single steps as you want
      and it will not advance any further.
      
      The test case is below:
      
      /* Test whether singlestep through an int80 syscall works.
       */
      #define _GNU_SOURCE
      #include <stdio.h>
      #include <unistd.h>
      #include <fcntl.h>
      #include <sys/ptrace.h>
      #include <sys/wait.h>
      #include <sys/mman.h>
      #include <asm/user.h>
      #include <string.h>
      
      static int child, status;
      static struct user_regs_struct regs;
      
      static void do_child()
      {
      	char str[80] = "child: int80 test\n";
      
      	ptrace(PTRACE_TRACEME, 0, 0, 0);
      	kill(getpid(), SIGUSR1);
      	write(fileno(stdout),str,strlen(str));
      	asm ("int $0x80" : : "a" (20)); /* getpid */
      }
      
      static void do_parent()
      {
      	unsigned long eip, expected = 0;
      again:
      	waitpid(child, &status, 0);
      	if (WIFEXITED(status) || WIFSIGNALED(status))
      		return;
      
      	if (WIFSTOPPED(status)) {
      		ptrace(PTRACE_GETREGS, child, 0, &regs);
      		eip = regs.eip;
      		if (expected)
      			fprintf(stderr, "child stop @ %08lx, expected %08lx %s\n",
      					eip, expected,
      					eip == expected ? "" : " <== ERROR");
      
      		if (*(unsigned short *)eip == 0x80cd) {
      			fprintf(stderr, "int 0x80 at %08x\n", (unsigned int)eip);
      			expected = eip + 2;
      		} else
      			expected = 0;
      
      		ptrace(PTRACE_SINGLESTEP, child, NULL, NULL);
      	}
      	goto again;
      }
      
      int main(int argc, char * const argv[])
      {
      	child = fork();
      	if (child)
      		do_parent();
      	else
      		do_child();
      	return 0;
      }
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: <stable@kernel.org>
      Cc: Chuck Ebbert <76306.1226@compuserve.com>
      Acked-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1e2e99f0
    • M
      Fix elf_core_dump() when writing arch specific notes (spu coredumps) · ef7320ed
      Michael Ellerman 提交于
      elf_core_dump() supports dumping arch specific ELF notes, via the #define
      ELF_CORE_WRITE_EXTRA_NOTES.  Currently the only user of this is the powerpc
      spu coredump code.
      
      There is a bug in the handling of foffset WRT the arch notes, which causes
      us to erroneously increment foffset by the size of the arch notes, leaving
      a block of zeroes in the file, and causing all subsequent data in the file
      to be at <supposed position> + <arch note size>.  eg:
      
        LOAD  0x050000 0x00100000 0x00000000 0x20000 0x20000 R E 0x10000
      
      Tells us we should have a chunk of data at 0x50000.  The truth is the data
      is at 0x90dbc = 0x50000 + 0x40dbc (the size of the arch notes).
      
      This bug prevents gdb from reading the core file correctly.
      
      The simplest fix is to simply remember the size of the arch notes, and add
      it to foffset after we've written the arch notes.  The only drawback is
      that if the arch code doesn't write as many bytes as it said it would, we
      end up with a broken core dump again.  For now I think that's a reasonable
      requirement.
      
      Tested on a Cell blade, gdb no longer complains about the core file being
      bogus.
      
      While I'm here I should point out that the spu coredump code does not work
      if we're dumping to a pipe - we'll have to wait for 23 to fix that.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef7320ed
  2. 06 7月, 2007 13 次提交
  3. 05 7月, 2007 3 次提交
  4. 04 7月, 2007 14 次提交