07 Feb, 2008

32 commits

  • This patch contains the following possible cleanups:
    - make the following needlessly global code static:
    - drivers/acpi/bay.c:dev_attr_eject
    - drivers/acpi/bay.c:dev_attr_present
    - drivers/acpi/dock.c:dev_attr_docked
    - drivers/acpi/dock.c:dev_attr_flags
    - drivers/acpi/dock.c:dev_attr_uid
    - drivers/acpi/dock.c:dev_attr_undock
    - drivers/acpi/pci_bind.c:acpi_pci_unbind()
    - drivers/acpi/pci_link.c:acpi_link_lock
    - drivers/acpi/sbs.c:acpi_sbs_callback()
    - drivers/acpi/sbshc.c:acpi_smbus_transaction()
    - drivers/acpi/sleep/main.c:acpi_sleep_prepare()
    - #if 0 the following unused global functions:
    - drivers/acpi/numa.c:acpi_unmap_pxm_to_node()
    - remove the following unused EXPORT_SYMBOL's:
    - acpi_register_gsi
    - acpi_unregister_gsi
    - acpi_strict
    - acpi_bus_receive_event
    - register_acpi_bus_type
    - unregister_acpi_bus_type
    - acpi_os_printf
    - acpi_os_sleep
    - acpi_os_stall
    - acpi_os_read_pci_configuration
    - acpi_os_create_semaphore
    - acpi_os_delete_semaphore
    - acpi_os_wait_semaphore
    - acpi_os_signal_semaphore
    - acpi_os_signal
    - acpi_pci_irq_enable
    - acpi_get_pxm

    Signed-off-by: Adrian Bunk
    Acked-by: Alexey Starikovskiy
    Signed-off-by: Len Brown

    Adrian Bunk
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
    x86: fix deadlock, make pgd_lock irq-safe
    virtio: fix trivial build bug
    x86: fix mttr trimming
    x86: delay CPA self-test and repeat it
    x86: fix 64-bit sections
    generic: add __FINITDATA
    x86: remove suprious ifdefs from pageattr.c
    x86: mark the .rodata section also NX
    x86: fix iret exception recovery on 64-bit
    cpuidle: dubious one-bit signed bitfield in cpuidle.h
    x86: fix sparse warnings in powernow-k8.c
    x86: fix sparse error in traps_32.c
    x86: trivial sparse/checkpatch in quirks.c
    x86 ptrace: disallow null cs/ss
    MAINTAINERS: RDC R-321x SoC maintainer
    brk randomization: introduce CONFIG_COMPAT_BRK
    brk: check the lower bound properly
    x86: remove X2 workaround
    x86: make spurious fault handler aware of large mappings
    x86: make traps on entry code be debuggable in user space, 64-bit

    Linus Torvalds
     
  • lockdep just caught this one:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.24 #38
    ---------------------------------
    inconsistent {in-softirq-W} -> {softirq-on-W} usage.
    swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
    (pgd_lock){-+..}, at: [] mm_init+0x1da/0x250
    {in-softirq-W} state was registered at:
    [] 0xffffffffffffffff
    irq event stamp: 394559
    hardirqs last enabled at (394559): [] get_page_from_freelist+0x30a/0x4c0
    hardirqs last disabled at (394558): [] get_page_from_freelist+0x125/0x4c0
    softirqs last enabled at (393952): [] __do_softirq+0xce/0xe0
    softirqs last disabled at (393945): [] call_softirq+0x1c/0x30

    other info that might help us debug this:
    no locks held by swapper/1.

    stack backtrace:
    Pid: 1, comm: swapper Not tainted 2.6.24 #38

    Call Trace:
    [] print_usage_bug+0x18b/0x190
    [] mark_lock+0x53d/0x560
    [] __lock_acquire+0x3ca/0xed0
    [] lock_acquire+0xa8/0xe0
    [] ? mm_init+0x1da/0x250
    [] _spin_lock+0x30/0x70
    [] mm_init+0x1da/0x250
    [] mm_alloc+0x39/0x50
    [] bprm_mm_init+0x2a/0x1a0
    [] do_execve+0x7b/0x220
    [] sys_execve+0x46/0x70
    [] kernel_execve+0x64/0xd0
    [] ? _stext+0x1e/0x20
    [] init_post+0x9a/0xf0
    [] ? trace_hardirqs_on_thunk+0x35/0x3a
    [] ? trace_hardirqs_on+0xba/0xd0
    [] ? child_rip+0xa/0x12
    [] ? restore_args+0x0/0x44
    [] ? child_rip+0x0/0x12

    turns out that pgd_lock has been used on 64-bit x86 in an irq-unsafe
    way for almost two years, since commit 8c914cb704a11460e.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • Pavel Emelyanov reported that his networking card did not work
    and bisected it down to:

    "
    The commit

    093af8d7f0ba3c6be1485973508584ef081e9f93
    x86_32: trim memory by updating e820

    broke my e1000 card: on loading driver says that

    e1000: probe of 0000:04:03.0 failed with error -5

    and the interface doesn't appear.
    "

    on a 32-bit kernel, base will overflow when try to do PAGE_SHIFT,
    and highest_addr will always less 4G.

    So use pfn instead of address to avoid the overflow when more than
    4g RAM is installed on a 32-bit kernel.

    Many thanks to Pavel Emelyanov for reporting and testing it.

    Bisected-by: Pavel Emelyanov
    Signed-off-by: Yinghai Lu
    Tested-by: Pavel Emelyanov
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     
  • delay the CPA self-test so that any impact (corruption) of
    user-space pagetables can be triggered. Repeat the test
    every 30 seconds.

    this would have prevented the bug fixed by 8cb2a7c1e95e472b5,
    at its source.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • fix 64-bit section warnings.

    Signed-off-by: Ingo Molnar

    Sam Ravnborg
     
  • The .rodata section really should just be read only; the config option
    is there to make breaking up the 2Mb page an option (so people whos machines
    give more performance for the 2Mb case can opt to do so).
    But when the page gets split anyway, this is no longer an issue, so
    clean up the code and remove the ifdefs

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • The .rodata section shouldn't just be read-only,
    but also non-executable. This is free since we've broken
    up the 2MB page already anyway.

    also update test_nx to check for this.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • This change broke recovery of exceptions in iret:

    commit 72fe4858544292ad64600765cb78bc02298c6b1c
    Author: Glauber de Oliveira Costa

    x86: replace privileged instructions with paravirt macros

    The ENTRY(native_iret) macro adds alignment padding before the iretq
    instruction, so "iret_label" no longer points exactly at the instruction.
    It was sloppy to leave the old "iret_label" label behind when replacing
    its nearby use. Removing it would have revealed the other use of the
    label later in the file, and upon noticing that use, anyone exercising
    the minimum of attention to detail expected of anyone touching this
    subtle code would realize it needed to change as well.

    Signed-off-by: Roland McGrath
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:7: warning: symbol 'hi' shadows an earlier one
    arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:6: originally declared here
    arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:15: warning: symbol 'lo' shadows an earlier one
    arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:14: originally declared here

    Signed-off-by: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • This was being used to ensure the proper alignment of the FXSAVE/FXRSTOR data.
    This would create a sparse error in the _correct_ cases, hiding further
    warnings. Use BUILD_BUG_ON instead.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • arch/x86/kernel/quirks.c:384:3: warning: returning void-valued expression
    arch/x86/kernel/quirks.c:387:3: warning: returning void-valued expression
    arch/x86/kernel/quirks.c:390:3: warning: returning void-valued expression
    arch/x86/kernel/quirks.c:393:3: warning: returning void-valued expression

    Signed-off-by: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • In my revamp of the x86 ptrace code for setting register values,
    I accidentally omitted a check that was there in the old code.
    Allowing %cs to be 0 causes a bad crash in recovery from iret failure.
    This patch fixes that regression against 2.6.24, and adds a comment
    that should help prevent this subtlety from being overlooked again.

    Signed-off-by: Roland McGrath
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • With the spurious handler fix, the X2 does not lock up anymore.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • In very rare cases, on certain CPUs, we could end up in the spurious
    fault handler and ignore a large pud/pmd mapping. The resulting pte
    pointer points into the mapped physical space and dereferencing it
    will fault recursively.

    Make the code aware of large mappings and do the permission check
    on the pmd/pud entry, when a large pud/pmd mapping is detected.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Unify the x86-64 behavior for 32-bit processes that set
    bogus %cs/%ss values (the only ones that can fault in iret)
    match what the native i386 behavior is. (do not kill the task
    via do_exit but generate a SIGSEGV signal)

    [ tglx@linutronix.de: build fix ]

    Signed-off-by: Roland McGrath
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    ata_piix.c:piix_init_one() must be __devinit
    sata_via.c: Remove missleading comment.
    libata-core: unblacklist HITACHI drives
    sata_nv: fix ATAPI issues with memory over 4GB (v7)
    ata: drivers/ata/sata_mv.c needs dmapool.h
    libata: kill now unused n_iter and fix sata_fsl
    ahci: fix CAP.NP and PI handling
    sata_mv: Support SoC controllers
    Rename: linux/pata_platform.h to linux/ata_platform.h

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Temporarily remove IOMMU merging code.
    [SPARC64]: Update defconfig.
    [SPARC]: Add new timerfd syscall entries.

    Linus Torvalds
     
  • On the sam9 EK boards, the LCD backlight is hooked up to a PWM output from
    the LCD controller. It's controlled by "contrast" registers though.

    This patch lets boards declare that they have that kind of backlight
    control. The driver can then export this control, letting screenblank and
    other operations actually take effect ... reducing the typically
    substantial power drain from the backlight.

    Note that it's not fully cooked
    - doesn't force backlight off during system suspend
    - the "power" and "blank" events may not be done right
    This should be easily added in the future.

    [nicolas.ferre@atmel.com: remove unneeded inline and rename functions]
    Signed-off-by: David Brownell
    Signed-off-by: Nicolas Ferre
    Cc: Andrew Victor
    Cc: Russell King
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • That patch adds the RTC emulation of the HPET timer to the new RTC_DRV_CMOS.
    The old drivers/char/rtc.ko driver had that functionality and it's important
    on new systems.

    [akpm@linux-foundation.org: unbreak alpha build]
    Signed-off-by: Bernhard Walle
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: john stultz
    Cc: Robert Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle
     
  • Fix the following section mismatch with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x399a6): Section mismatch: reference to .init.text.5:idle_regs (between 'fork_idle' and 'get_task_mm')

    Signed-off-by: Adrian Bunk
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • calibrate_delay() must be __cpuinit, not __{dev,}init.

    I've verified that this is correct for all users.

    While doing the latter, I also did the following cleanups:
    - remove pointless additional prototypes in C files
    - ensure all users #include

    This fixes the following section mismatches with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
    WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

    Signed-off-by: Adrian Bunk
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "David S. Miller"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Christian Zankel
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • NR_OPEN (historically set to 1024*1024) actually forbids processes to open
    more than 1024*1024 handles.

    Unfortunatly some production servers hit the not so 'ridiculously high
    value' of 1024*1024 file descriptors per process.

    Changing NR_OPEN is not considered safe because of vmalloc space potential
    exhaust.

    This patch introduces a new sysctl (/proc/sys/fs/nr_open) wich defaults to
    1024*1024, so that admins can decide to change this limit if their workload
    needs it.

    [akpm@linux-foundation.org: export it for sparc64]
    Signed-off-by: Eric Dumazet
    Cc: Alan Cox
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: "David S. Miller"
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Remove config variable DEBUG_RWLOCK, since it is not used.

    Signed-off-by: Jiri Olsa
    Acked-by: Grant Grundler
    Acked-by: Kyle McMartin
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Olsa
     
  • - All implementations can be __devinit

    - The function prototypes were in asm/timex.h but they all must be the same,
    so create a single declaration in linux/timex.h.

    - uninline the sparc64 version to match the other architectures

    - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.

    [ezk@cs.sunysb.edu: fix build]
    Cc: "David S. Miller"
    Cc: Haavard Skinnemoen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch contains the scheduled removal of OSS drivers whose config
    options have been removed in 2.6.23.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Add a proper prototype for show_interrupts() in include/linux/interrupt.h

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • After the APUS removal, some code can be removed.

    Signed-off-by: Adrian Bunk
    Acked-by: Geert Uytterhoeven
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Karsten Keil
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • When passing a zero address to kallsyms_lookup(), the kernel thought it was
    a valid kernel address, even if it is not. This is because is_ksym_addr()
    called is_kernel_extratext() and checked against labels that don't exist on
    many archs (which default as zero). Since PPC was the only kernel which
    defines _extra_text, (in 2005), and no longer needs it, this patch removes
    _extra_text support.

    For some history (provided by Jon):
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robin Getz
    Cc: David Woodhouse
    Cc: Jon Loeliger
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Getz
     
  • Mostly in and around irq handlers.

    Signed-off-by: Jeff Garzik
    Cc: Russell King
    Cc: "Luck Tony"
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Acked-by: Dmitry Torokhov
    Cc: Karsten Keil
    Acked-by: "John W. Linville"
    Cc: James Bottomley
    Cc: David Brownell
    Cc: "Antonino A. Daplas"
    Acked-by: Josh Boyer
    Acked-by: Holger Schurig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     
  • Nothing should ever include this file.

    Signed-off-by: Ralf Baechle
    Acked-by: "Mike Frysinger"
    Acked-by: "Bryan Wu"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • This moves the ability to scale cputime into generic code. This allows us
    to fix the issue in kernel/timer.c (noticed by Balbir) where we could only
    add an unscaled value to the scaled utime/stime.

    This adds a cputime_to_scaled function. As before, the POWERPC version
    does the scaling based on the last SPURR/PURR ratio calculated. The
    generic and s390 (only other arch to implement asm/cputime.h) versions are
    both NOPs.

    Also moves the SPURR and PURR snapshots closer.

    Signed-off-by: Michael Neuling
    Cc: Jay Lan
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Neuling
     

06 Feb, 2008

8 commits