25 Jan, 2012

1 commit

  • As part of the removal of get_driver()/put_driver(), this patch
    (as1510) changes driver_find(); it now drops the reference it acquires
    before returning. The patch also adjusts all the callers of
    driver_find() to remove the now unnecessary calls to put_driver().

    In addition, the patch adds a warning to driver_find(): Callers must
    make sure the driver they are searching for does not get unloaded
    while they are using it. This has always been the case; driver_find()
    has never prevented a driver from being unregistered or unloaded.
    Hence the patch will not introduce any new bugs. The existing callers
    all seem to be okay in this respect, however I don't understand the
    video drivers well enough to be certain about them.

    Signed-off-by: Alan Stern
    CC: Dmitry Torokhov
    CC: Kyungmin Park
    CC: Andy Walls
    CC: Martin Schwidefsky
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

09 Jun, 2011

1 commit

  • Signed-off-by: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Link: http://lkml.kernel.org/r/20110601180610.054254048@duck.linux-mips.net
    Signed-off-by: Thomas Gleixner

    arch/arm/mach-footbridge/isa-timer.c | 2 +-
    arch/mips/cobalt/time.c | 2 +-
    arch/mips/jazz/irq.c | 2 +-
    arch/mips/kernel/i8253.c | 2 +-
    arch/mips/mti-malta/malta-time.c | 2 +-
    arch/mips/sgi-ip22/ip22-time.c | 2 +-
    arch/mips/sni/time.c | 2 +-
    arch/x86/kernel/apic/apic.c | 2 +-
    arch/x86/kernel/apm_32.c | 2 +-
    arch/x86/kernel/hpet.c | 2 +-
    arch/x86/kernel/i8253.c | 2 +-
    arch/x86/kernel/time.c | 2 +-
    drivers/block/hd.c | 2 +-
    drivers/clocksource/i8253.c | 2 +-
    drivers/input/gameport/gameport.c | 2 +-
    drivers/input/joystick/analog.c | 2 +-
    drivers/input/misc/pcspkr.c | 2 +-
    include/linux/i8253.h | 11 +++++++++++
    sound/drivers/pcsp/pcsp.h | 2 +-
    19 files changed, 29 insertions(+), 18 deletions(-)

    Ralf Baechle
     

24 Feb, 2011

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: serio/gameport - use 'long' system workqueue
    Input: synaptics - document 0x0c query
    Input: tegra-kbc - add function keymap

    Linus Torvalds
     
  • Commit 8ee294cd9def0004887da7f44b80563493b0a097 converted serio
    subsystem event handling from using a dedicated thread to using
    common workqueue. Unfortunately, this regressed our boot times,
    due to the fact that serio jobs take long time to execute. While
    the new concurrency managed workqueue code manages long-playing
    works just fine and schedules additional workers as needed, such
    works wreck havoc among remaining users of flush_scheduled_work().

    To solve this problem let's move serio/gameport works from system_wq
    to system_long_wq which nobody tries to flush.

    Reported-and-tested-by: Hernando Torque
    Acked-by: Tejun Heo
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

08 Jan, 2011

1 commit

  • * 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (30 commits)
    gameport: use this_cpu_read instead of lookup
    x86: udelay: Use this_cpu_read to avoid address calculation
    x86: Use this_cpu_inc_return for nmi counter
    x86: Replace uses of current_cpu_data with this_cpu ops
    x86: Use this_cpu_ops to optimize code
    vmstat: User per cpu atomics to avoid interrupt disable / enable
    irq_work: Use per cpu atomics instead of regular atomics
    cpuops: Use cmpxchg for xchg to avoid lock semantics
    x86: this_cpu_cmpxchg and this_cpu_xchg operations
    percpu: Generic this_cpu_cmpxchg() and this_cpu_xchg support
    percpu,x86: relocate this_cpu_add_return() and friends
    connector: Use this_cpu operations
    xen: Use this_cpu_inc_return
    taskstats: Use this_cpu_ops
    random: Use this_cpu_inc_return
    fs: Use this_cpu_inc_return in buffer.c
    highmem: Use this_cpu_xx_return() operations
    vmstat: Use this_cpu_inc_return for vm statistics
    x86: Support for this_cpu_add, sub, dec, inc_return
    percpu: Generic support for this_cpu_add, sub, dec, inc_return
    ...

    Fixed up conflicts: in arch/x86/kernel/{apic/nmi.c, apic/x2apic_uv_x.c, process.c}
    as per Tejun.

    Linus Torvalds
     

04 Jan, 2011

1 commit


18 Nov, 2010

1 commit

  • Instead of creating an exclusive thread to handle gameport events (which
    happen rarely), let's switch to common workqueue. With the arrival
    of concurrency-managed workqueue infrastructure we are not concerned
    that our callers or callees also using workqueue (no deadlocks anymore)
    and it should reduce total number of threads in the system.

    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

02 Mar, 2010

1 commit

  • i8253_lock needs to be a real spinlock in preempt-rt, i.e. it can
    not be converted to a sleeping lock.

    Convert it to raw_spinlock and fix up all users.

    Signed-off-by: Thomas Gleixner
    Acked-by: Ralf Baechle
    Acked-by: Dmitry Torokhov
    Acked-by: Takashi Iwai
    Cc: Jens Axboe
    LKML-Reference:

    Thomas Gleixner
     

06 Jan, 2010

3 commits


10 May, 2009

1 commit


18 Apr, 2009

1 commit


15 Apr, 2009

1 commit

  • The commit 6902c0bead4ce266226fc0c5b3828b850bdc884a that moved
    driver registration out of kgameportd thread was incomplete and
    did not add the code necessary to actually attach driver to
    already registered devices, rectify that.

    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

30 Oct, 2008

1 commit


30 Jul, 2008

1 commit


17 May, 2008

1 commit


03 Feb, 2008

1 commit


03 Jan, 2008

1 commit


20 Oct, 2007

1 commit

  • cpu_data is currently an array defined using NR_CPUS. This means that
    we overallocate since we will rarely really use maximum configured cpus.
    When NR_CPU count is raised to 4096 the size of cpu_data becomes
    3,145,728 bytes.

    These changes were adopted from the sparc64 (and ia64) code. An
    additional field was added to cpuinfo_x86 to be a non-ambiguous cpu
    index. This corresponds to the index into a cpumask_t as well as the
    per_cpu index. It's used in various places like show_cpuinfo().

    cpu_data is defined to be the boot_cpu_data structure for the NON-SMP
    case.

    Signed-off-by: Mike Travis
    Acked-by: Christoph Lameter
    Cc: Andi Kleen
    Cc: James Bottomley
    Cc: Dmitry Torokhov
    Cc: "Antonino A. Daplas"
    Cc: Mark M. Hoffman
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Mike Travis
     

19 Oct, 2007

1 commit

  • Introduce freezer-friendly wrappers around wait_event_interruptible() and
    wait_event_interruptible_timeout(), originally defined in , to
    be used in freezable kernel threads. Make some of the freezable kernel
    threads use them.

    This is necessary for the freezer to stop sending signals to kernel threads,
    which is implemented in the next patch.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

18 Jul, 2007

1 commit

  • 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
     

28 Apr, 2007

1 commit


08 Dec, 2006

2 commits


03 Nov, 2006

1 commit


12 Oct, 2006

1 commit


19 Jul, 2006

1 commit


14 Mar, 2006

1 commit


19 Feb, 2006

2 commits


14 Jan, 2006

1 commit


20 Nov, 2005

1 commit


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
     

30 Jun, 2005

1 commit


28 Jun, 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
     

22 Jun, 2005

1 commit

  • This patch implements a number of smp_processor_id() cleanup ideas that
    Arjan van de Ven and I came up with.

    The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
    spaghetti was hard to follow both on the implementational and on the
    usage side.

    Some of the complexity arose from picking wrong names, some of the
    complexity comes from the fact that not all architectures defined
    __smp_processor_id.

    In the new code, there are two externally visible symbols:

    - smp_processor_id(): debug variant.

    - raw_smp_processor_id(): nondebug variant. Replaces all existing
    uses of _smp_processor_id() and __smp_processor_id(). Defined
    by every SMP architecture in include/asm-*/smp.h.

    There is one new internal symbol, dependent on DEBUG_PREEMPT:

    - debug_smp_processor_id(): internal debug variant, mapped to
    smp_processor_id().

    Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
    lib/smp_processor_id.c file. All related comments got updated and/or
    clarified.

    I have build/boot tested the following 8 .config combinations on x86:

    {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}

    I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT. (Other
    architectures are untested, but should work just fine.)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

21 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • 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