10 Oct, 2007

1 commit

  • Three main sets of changes:

    1) dmi_get_system_info() return value should have been marked const,
    since callers should not be changing that data.

    2) const-ify DMI internals, since DMI firmware tables should,
    whenever possible, be marked const to ensure we never ever write to
    that data area.

    3) const-ify DMI API, to enable marking tables const where possible
    in low-level drivers.

    And if we're really lucky, this might enable some additional
    optimizations on the part of the compiler.

    The bulk of the changes are #2 and #3, which are interrelated. #1 could
    have been a separate patch, but it was so small compared to the others,
    it was easier to roll it into this changeset.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

24 Aug, 2007

2 commits

  • We don't support building any part of PNP as a module (*drivers* can be
    modules, of course, but the PNP infrastructure itself can not). Since
    MODULE will never be defined, remove the ifdefs and dead code.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Adam Belay
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • More manual fixups after Lindent. No functional change.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Adam Belay
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

27 Jul, 2007

2 commits

  • These are manual fixups after running Lindent. No functional change.

    Signed-off-by: Bjorn Helgaas
    Cc: Len Brown
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Run Lindent on all PNP source files.

    Produced by:

    $ quilt new pnp-lindent
    $ find drivers/pnp -name \*.[ch] | xargs quilt add
    $ quilt add include/linux/{pnp.h,pnpbios.h}
    $ scripts/Lindent drivers/pnp/*.c drivers/pnp/*/*.c include/linux/pnp*.h
    $ quilt refresh --sort

    Signed-off-by: Bjorn Helgaas
    Cc: Len Brown
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

18 Jul, 2007

2 commits

  • Rather than using a tri-state integer for the wait flag in
    call_usermodehelper_exec, define a proper enum, and use that. I've
    preserved the integer values so that any callers I've missed should
    still work OK.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: James Bottomley
    Cc: Randy Dunlap
    Cc: Christoph Hellwig
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Johannes Berg
    Cc: Ralf Baechle
    Cc: Bjorn Helgaas
    Cc: Joel Becker
    Cc: Tony Luck
    Cc: Kay Sievers
    Cc: Srivatsa Vaddagiri
    Cc: Oleg Nesterov
    Cc: David Howells

    Jeremy Fitzhardinge
     
  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

17 Jul, 2007

1 commit

  • Use menuconfigs instead of menus, so the whole menu can be disabled at once
    instead of going through all options.

    Signed-off-by: Jan Engelhardt
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt
     

09 May, 2007

2 commits

  • This series converts i386 and x86_64 legacy serial ports to be platform
    devices and prevents probing for them if we have PNP.

    This prevents double discovery, where a device was found both by the legacy
    probe and by 8250_pnp.

    This also prevents the serial driver from claiming IRDA devices (unless they
    have a UART PNP ID). The serial legacy probe sometimes assumed the wrong IRQ,
    so the user had to use "setserial" to fix it.

    Removing the need for setserial to make IRDA devices work seems good, but it
    does break some things. In particular, you may need to keep setserial from
    poking legacy UART stuff back in by doing something like "dpkg-reconfigure
    setserial" with the "kernel" option. Otherwise, the setserial-discovered
    "UART" will claim resources and prevent the IRDA driver from loading.

    This patch:

    If we can discover devices using PNP, we can skip some legacy probes. This
    flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and
    should tell us about builtin devices.

    Signed-off-by: Bjorn Helgaas
    Cc: Keith Owens
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Matthieu CASTET
    Cc: Jean Tourrilhes
    Cc: Matthew Garrett
    Cc: Ville Syrjala
    Cc: Russell King
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • This patches modifies the pnpbios kernel thread to start with ktrhead_run
    not kernel_thread and deamonize. Doing this makes the code a little
    simpler and easier to maintain.

    Signed-off-by: Eric W. Biederman
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

12 Feb, 2007

1 commit


14 Dec, 2006

2 commits

  • Run this:

    #!/bin/sh
    for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
    echo "De-casting $f..."
    perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
    done

    And then go through and reinstate those cases where code is casting pointers
    to non-pointers.

    And then drop a few hunks which conflicted with outstanding work.

    Cc: Russell King , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
    equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
    ordering of the first two arguments are fixed.

    Signed-off-by: Robert P. J. Day
    Cc: Jeff Garzik
    Cc: Alan Cox
    Cc: Dominik Brodowski
    Cc: Adam Belay
    Cc: James Bottomley
    Cc: Greg KH
    Cc: Mark Fasheh
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Dec, 2006

2 commits

  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits)
    [PATCH] x86-64: Export smp_call_function_single
    [PATCH] i386: Clean up smp_tune_scheduling()
    [PATCH] unwinder: move .eh_frame to RODATA
    [PATCH] unwinder: fully support linker generated .eh_frame_hdr section
    [PATCH] x86-64: don't use set_irq_regs()
    [PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
    [PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
    [PATCH] i386: replace kmalloc+memset with kzalloc
    [PATCH] x86-64: remove remaining pc98 code
    [PATCH] x86-64: remove unused variable
    [PATCH] x86-64: Fix constraints in atomic_add_return()
    [PATCH] x86-64: fix asm constraints in i386 atomic_add_return
    [PATCH] x86-64: Correct documentation for bzImage protocol v2.05
    [PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
    [PATCH] x86-64: Fix numaq build error
    [PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
    [PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
    [PATCH] x86-64: Clarify error message in GART code
    [PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
    [PATCH] x86-64: Remove unwind stack pointer alignment forcing again
    ...

    Fixed conflict in include/linux/uaccess.h manually

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Move process freezing functions from include/linux/sched.h to freezer.h, so
    that modifications to the freezer or the kernel configuration don't require
    recompiling just about everything.

    [akpm@osdl.org: fix ueagle driver]
    Signed-off-by: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     

07 Dec, 2006

1 commit

  • Two legacy power management modes are much easier to just explicitly disable
    when running in paravirtualized mode - neither APM nor PnP is still relevant.
    The status of ACPI is still debatable, and noacpi is still a common enough
    boot parameter that it is not necessary to explicitly disable ACPI.

    Signed-off-by: Zachary Amsden
    Signed-off-by: Chris Wright
    Signed-off-by: Andi Kleen
    Cc: Rusty Russell
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton

    Rusty Russell
     

01 Oct, 2006

1 commit

  • ppc can boot one single binary on prep, chrp and pmac boards. ppc64 can
    boot one single binary on pseries and G5 boards. pmac has no legacy io,
    probing for PC style legacy hardware (or accessing the legacy io area
    regulary) may lead to a hard crash:

    * add check for parport_pc, exit on pmac. 32bit chrp has no
    ->check_legacy_ioport, the probe is always called. 64bit chrp has
    check_legacy_ioport, check for a "parallel" node

    * add check for isapnp, only PReP boards may have real ISA slots. 32bit
    PReP will have no ->check_legacy_ioport, the probe is always called.

    * update code in i8042_platform_init. Run ->check_legacy_ioport first,
    always call request_region. No functional change. Remove whitespace
    before i8042_reset init.

    Signed-off-by: Olaf Hering
    Acked-by: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Adam Belay
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     

01 Aug, 2006

1 commit

  • swsusp is unable to suspend my machine (DTK FortisPro TOP-5A notebook) with
    kernel 2.6.17.5 because it's unable to suspend PNP device 00:16 (mouse).

    The problem is in PNP BIOS. pnp_bus_suspend() calls pnp_stop_dev() for the
    device if the device can be disabled according to pnp_can_disable(). The
    problem is that pnpbios_disable_resources() returns -EPERM if the device is
    not dynamic (!pnpbios_is_dynamic()) but insert_device() happily sets
    PNP_DISABLE capability/flag even if the device is not dynamic. So we try
    to disable non-dynamic devices which will fail. This patch prevents
    insert_device() from setting PNP_DISABLE if the device is not dynamic and
    fixes suspend on my system.

    Signed-off-by: Ondrej Zary
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ondrej Zary
     

01 Jul, 2006

1 commit


23 Mar, 2006

1 commit


07 Jan, 2006

4 commits

  • PnP BIOS data, code, and 32-bit entry segments all have fixed limits as well;
    set them in the GDT rather than adding more code. It would be nice to add
    these fixups to the boot GDT rather than setting the GDT for each CPU; perhaps
    I can wiggle this in later, but getting it in before the subsys init looks
    tricky.

    Also, make some progress on deprecating the ugly Q_SET_SEL macros.

    Signed-off-by: Zachary Amsden
    Cc: "Seth, Rohit"
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • The one remaining caller of set_limit, the PnP BIOS code, calls into the PnP
    BIOS, passing kernel parameters in and out. These parameteres may be passed
    from arbitrary kernel virtual memory, so they deserve strict protection to
    stop a bad BIOS from smashing beyond the object size.

    Unfortunately, the use of set_limit was badly botching this by setting the
    limit in terms of pages, when it really should have byte granularity.

    When doing this, I discovered my BIOS had the buggy code during the "get
    system device node" call:

    mov ax, es:[bx]

    Which is harmless, but has a trivial workaround.

    Signed-off-by: Zachary Amsden
    Cc: "Seth, Rohit"
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • Move PnP BIOS segment definitions into segment.h; the segments are reserved
    here, so they might as well be defined here as well.

    Note I didn't do this for APM BIOS, as Macintosh and other systems use those
    values to emulate APM in some scary way I don't want to understand.

    Signed-off-by: Zachary Amsden
    Acked-by: "Seth, Rohit"
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • Make GDT page aligned and page padded to support running inside of a
    hypervisor. This prevents false sharing of the GDT page with other hot
    data, which is not allowed in Xen, and causes performance problems in
    VMware.

    Rather than go back to the old method of statically allocating the GDT
    (which wastes unneded space for non-present CPUs), the GDT for APs is
    allocated dynamically.

    Signed-off-by: Zachary Amsden
    Cc: "Seth, Rohit"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     

05 Jan, 2006

1 commit

  • These days we use udev to manage all kernel events. /proc/sys/kernel/hotplug
    will usually be disabled by an init-script. pnpnbios is not integrated with
    the driver core and should stay away from the now disabled /sbin/hotplug.

    Set the helper to /sbin/phpbios, even when there is probably no current
    user of this faciliy. If it's needed, it should definitely get proper driver
    core integration instead of forking binaries from the kernel.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

31 Oct, 2005

1 commit

  • I recently picked up my older work to remove unnecessary #includes of
    sched.h, starting from a patch by Dave Jones to not include sched.h
    from module.h. This reduces the number of indirect includes of sched.h
    by ~300. Another ~400 pointless direct includes can be removed after
    this disentangling (patch to follow later).
    However, quite a few indirect includes need to be fixed up for this.

    In order to feed the patches through -mm with as little disturbance as
    possible, I've split out the fixes I accumulated up to now (complete for
    i386 and x86_64, more archs to follow later) and post them before the real
    patch. This way this large part of the patch is kept simple with only
    adding #includes, and all hunks are independent of each other. So if any
    hunk rejects or gets in the way of other patches, just drop it. My scripts
    will pick it up again in the next round.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

08 Sep, 2005

1 commit

  • ISAPNP, PNPBIOS, and PNPACPI all had their own kmalloc wrappers that
    reimplemented kcalloc(). Remove the wrappers and just use kcalloc()
    directly.

    Note that this also removes the PNPBIOS error message when the kmalloc
    fails.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

28 Jul, 2005

1 commit


13 Jul, 2005

1 commit


12 Jul, 2005

1 commit


26 Jun, 2005

1 commit

  • 1. Establish a simple API for process freezing defined in linux/include/sched.h:

    frozen(process) Check for frozen process
    freezing(process) Check if a process is being frozen
    freeze(process) Tell a process to freeze (go to refrigerator)
    thaw_process(process) Restart process
    frozen_process(process) Process is frozen now

    2. Remove all references to PF_FREEZE and PF_FROZEN from all
    kernel sources except sched.h

    3. Fix numerous locations where try_to_freeze is manually done by a driver

    4. Remove the argument that is no longer necessary from two function calls.

    5. Some whitespace cleanup

    6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
    cleared before setting PF_FROZEN, recalc_sigpending does not check
    PF_FROZEN).

    This patch does not address the problem of freeze_processes() violating the rule
    that a task may only modify its own flags by setting PF_FREEZE. This is not clean
    in an SMP environment. freeze(process) is therefore not SMP safe!

    Signed-off-by: Christoph Lameter
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

01 May, 2005

1 commit


17 Apr, 2005

2 commits

  • one of the last buildcheck errors on i386, thanks Randy again for double
    checking.

    Fix pnpbios section references:
    make dmi_system_id pnpbios_dmi_table __initdata

    Error: ./drivers/pnp/pnpbios/core.o .data refers to 00000100 R_386_32
    .init.text
    Error: ./drivers/pnp/pnpbios/core.o .data refers to 0000012c R_386_32
    .init.text

    Signed-off-by: maximilian attems
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    maximilian attems
     
  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds