07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

03 Nov, 2011

1 commit

  • When using multiple masters, w1_int.c would use the .init_name from w1.c
    for all entities, which will fail when creating a corresponding sysfs
    entry. This patch uses the unique name previously generated.

    WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x48/0x64()
    sysfs: cannot create duplicate filename '/devices/w1 bus master'
    Modules linked in:
    Call trace:
    [] warn_slowpath_common+0x34/0x44
    [] warn_slowpath_fmt+0x14/0x18
    [] sysfs_add_one+0x48/0x64
    [] create_dir+0x40/0x68
    [] sysfs_create_dir+0x66/0x78
    [] kobject_add_internal+0x6e/0x104
    [] kobject_add_varg+0x20/0x2c
    [] kobject_add+0x30/0x3c
    [] device_add+0x6a/0x378
    [] device_initialize+0x12/0x48
    [] device_register+0xc/0x10
    [] w1_add_master_device+0x162/0x274
    [] w1_gpio_probe+0x66/0xb4
    [] kernel_init+0x0/0xe8
    [] platform_drv_probe+0xc/0xe
    [] kernel_init+0x0/0xe8
    [] driver_probe_device+0x6c/0xdc
    [] __driver_attach+0x34/0x48
    [] bus_for_each_dev+0x2c/0x48
    [] __driver_attach+0x0/0x48
    [] driver_attach+0x10/0x14
    [] bus_add_driver+0x6a/0x18c
    [] driver_register+0x60/0xb8
    [] __initcall_w1_therm_init6+0x0/0x4
    [] w1_gpio_init+0x0/0x14
    [] kernel_init+0x0/0xe8
    [] platform_driver_register+0x30/0x38
    [] __initcall_w1_therm_init6+0x0/0x4
    [] w1_gpio_init+0x0/0x14
    [] kernel_init+0x0/0xe8
    [] platform_driver_probe+0xe/0x3c
    [] w1_gpio_init+0xc/0x14
    [] __initcall_w1_therm_init6+0x0/0x4
    [] w1_gpio_init+0x0/0x14
    [] do_one_initcall+0x34/0x130
    [] kernel_init+0x66/0xe8
    [] __initcall_w1_therm_init6+0x0/0x4
    [] do_exit+0x0/0x3a6
    [] kernel_init+0x0/0xe8
    [] do_exit+0x0/0x3a6

    ---[ end trace 5a9233884fead918 ]---
    kobject_add_internal failed for w1 bus master with -EEXIST, don't try to register things with the same name in the same directory.

    Signed-off-by: Florian Faber
    Cc: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Faber
     

01 Nov, 2011

2 commits


26 Aug, 2011

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

07 Jan, 2009

1 commit


17 Oct, 2008

6 commits

  • Follow the example of other devices (like the joystick device). Pick the
    first available id for each detected device. Currently for USB devices,
    suspending and resuming would cause the number to increment.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Added a new module parameter search_count which allows overriding the
    default search count. -1 continual, 0 disabled, N that many times.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Add a strong pullup option to the w1 system. This supplies extra power
    for parasite powered devices. There is a w1_master_pullup sysfs entry and
    enable_pullup module parameter to enable or disable the strong pullup.

    The one wire bus requires at a minimum one wire and ground. The common
    wire is used for sending and receiving data as well as supplying power to
    devices that are parasite powered of which temperature sensors can be one
    example. The bus must be idle and left high while a temperature
    conversion is in progress, in addition the normal pullup resister on
    larger networks or even higher temperatures might not supply enough power.
    The pullup resister can't provide too much pullup current, because
    devices need to pull the bus down to write a value. This enables the
    strong pullup for supported hardware, which can supply more current when
    requested. Unsupported hardware will just delay with the bus high.

    The hardware USB 2490 one wire bus master has a bit on some commands which
    will enable the strong pullup as soon as the command finishes executing.
    To use strong pullup, call the new w1_next_pullup function to register the
    duration. The next write command will call set_pullup before sending the
    data, and reset the duration to zero once it returns.

    Switched from simple_strtol to strict_strtol.

    Signed-off-by: David Fries
    Cc: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • The w1_process thread's sleeping and termination has been modified.
    msleep_interruptible was replaced by schedule_timeout and schedule to
    allow for kthread_stop and wake_up_process to interrupt the sleep and the
    unbounded sleeping when a bus search is disabled. The W1_MASTER_NEED_EXIT
    and flags variable were removed as they were redundant with
    kthread_should_stop and kthread_stop. If w1_process is sleeping,
    requesting a search will immediately wake it up rather than waiting for
    the end of msleep_interruptible previously.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • Move the creation of the w1_process thread to after the device has been
    initialized. This way w1_process doesn't have to check to see if it has
    been initialized and the bus search can proceed without sleeping. That
    also eliminates two checks in the w1_process loop. The sleep now happens
    at the end of the loop not the beginning.

    Also added a comment for why the atomic_set was 2.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     
  • w1_control_thread was removed which would wake up every second and process
    newly registered family codes and complete some final cleanup for a
    removed master. Those routines were moved to the threads that were
    previously requesting those operations. A new function
    w1_reconnect_slaves takes care of reconnecting existing slave devices when
    a new family code is registered or removed. The removal case was missing
    and would cause a deadlock waiting for the family code reference count to
    decrease, which will now happen. A problem with registering a family code
    was fixed. A slave device would be unattached if it wasn't yet claimed,
    then attached at the end of the list, two unclaimed slaves would cause an
    infinite loop.

    The struct w1_bus_master.search now takes a pointer to the struct
    w1_master device to avoid searching for it, which would have caused a
    lock ordering deadlock with the removal of w1_control_thread.

    Signed-off-by: David Fries
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Fries
     

23 Aug, 2007

1 commit


20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

09 May, 2007

1 commit


23 Jun, 2006

4 commits

  • This patch contains the following possible cleanups:
    - the following file did't #include the header with the prototypes for
    it's global functions:
    - w1_int.c
    - #if 0 the following unused global function:
    - w1_family.c: w1_family_get()
    - make the following needlessly global functions static:
    - w1_family.c: __w1_family_put()
    - w1_io.c: w1_delay()
    - w1_io.c: w1_touch_bit()
    - w1_io.c: w1_read_8()
    - remove the following unused EXPORT_SYMBOL's:
    - w1_family.c: w1_family_put
    - w1_family.c: w1_family_registered

    Signed-off-by: Adrian Bunk
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • Nice cleanup spotted by Adrian Bunk, which was lost due to moving to the
    completely new functionality.

    Shame-shame-shame on me.

    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • Use mutexes instead of semaphores.
    Patch tested on x86_64 and i386 with test bus master driver.

    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • There are three types of messages between w1 core and userspace:
    1. Events. They are generated each time new master or slave device found
    either due to automatic or requested search.
    2. Userspace commands. Includes read/write and search/alarm search comamnds.
    3. Replies to userspace commands.

    From: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     

24 Mar, 2006

3 commits

  • This patch removes old-style kernel thread initialization
    and changes w1 to use kthread api.
    It is based on Christoph Hellwig work.

    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • The w1 netlink socket is created by a hardware specific driver calling
    w1_add_master_device, so there is no point in including a module alias
    for netlink autoloading in the core.

    Signed-off-by: Patrick McHardy
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Patrick McHardy
     
  • This patch contains the following cleanups:
    - make needlessly global code static
    - declarations for global code belong into header files
    - w1.c: #if 0 the unused struct w1_slave_device

    Signed-off-by: Adrian Bunk
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     

09 Sep, 2005

3 commits


30 Aug, 2005

3 commits


25 Jul, 2005

1 commit


22 Jun, 2005

4 commits

  • I've created reconnect feature - if on start there are no registered families
    all new devices will have defailt family, later when driver for appropriate
    family is loaded, slaves, which were faound earlier, will still have defult
    family instead of right one. Reconnect feature will force control thread to run
    through all master devices and all slaves found and search for slaves with
    default family id and try to reconnect them.

    It does not store newly registered family and does not check only those slaves
    which have reg_num.family the same as being registered one - all slaves with
    default family are reconnected.

    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • …ble periodic searches.

    Adds a sysfs entry (w1_master_search) that allows you to disable/enable
    periodic searches.

    Signed-off-by: Ben Gardner <bgardner@wabtec.com>
    Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    Evgeniy Polyakov
     
  • Cleans up usage of touch_bit/w1_read_bit/w1_write_bit.

    Signed-off-by: Ben Gardner
    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     
  • - white space changes.
    - list_for_each_entry/list_for_each_entry_safe and reverse changes.
    - small coding style changes.
    - removed redundant NULL checks.
    - use attribute group and macros instead of direct device attributes.
    Patch is havily based on work from Adrian Bunk and Dmitry Torokhov,
    thanks guys.

    Signed-off-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Evgeniy Polyakov
     

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