15 Oct, 2010

1 commit

  • All file_operations should get a .llseek operation so we can make
    nonseekable_open the default for future file operations without a
    .llseek pointer.

    The three cases that we can automatically detect are no_llseek, seq_lseek
    and default_llseek. For cases where we can we can automatically prove that
    the file offset is always ignored, we use noop_llseek, which maintains
    the current behavior of not returning an error from a seek.

    New drivers should normally not use noop_llseek but instead use no_llseek
    and call nonseekable_open at open time. Existing drivers can be converted
    to do the same when the maintainer knows for certain that no user code
    relies on calling seek on the device file.

    The generated code is often incorrectly indented and right now contains
    comments that clarify for each added line why a specific variant was
    chosen. In the version that gets submitted upstream, the comments will
    be gone and I will manually fix the indentation, because there does not
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

11 Aug, 2010

2 commits

  • When we setup up the VMA flags for the mmap flag and we end up using the
    fallback mmap functionality we set the vma->vm_flags |= VM_IO. However we
    neglect to propagate the flag to the vma->vm_page_prot.

    This bug was found when Linux kernel was running under Xen. In that
    scenario, any page that has VM_IO flag to it, means that it MUST be a
    MMIO/VRAM backend memory , _not_ System RAM. That is what the fbmem.c
    does: sets VM_IO, ioremaps the region - everything is peachy.

    Well, not exactly. The vm_page_prot does not get the relevant PTE flags
    set (_PAGE_IOMAP) which under Xen is a death-kneel to pages that are
    referencing real physical devices but don't have that flag set.

    This patch fixes this.

    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Daniel De Graaf
    Tested-by: Eamon Walsh
    Cc: Florian Tobias Schandinat
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel De Graaf
     
  • Replaced !strlen(str) check with !str[0]. Removed the variable which was
    used solely to store strlen result.

    Signed-off-by: Denys Vlasenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denys Vlasenko
     

22 May, 2010

1 commit

  • Fix printk formats:

    drivers/video/fbmem.c: In function 'fb_do_apertures_overlap':
    drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
    drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
    drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
    drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

18 May, 2010

3 commits

  • let vga16fb claim 0xA0000+0x10000 region as its aperture;
    drm drivers don't use it, so we have to detect it and kick
    vga16fb manually - but only if drm is driving the primary card

    Signed-off-by: Marcin Slusarz
    Cc: James Simmons
    Cc: Dave Airlie
    Cc: Ben Skeggs
    Signed-off-by: Dave Airlie

    Marcin Slusarz
     
  • Currently vesafb/efifb/... is kicked when hardware driver is registering
    framebuffer. To do it hardware must be fully functional, so there's a short
    window between start of initialisation and framebuffer registration when
    two drivers touch the hardware. Unfortunately sometimes it breaks nouveau
    initialisation.

    Fix it by kicking firmware driver(s) before we start touching the hardware.

    Reported-by: Didier Spaier
    Tested-by: Didier Spaier
    Signed-off-by: Marcin Slusarz
    Cc: Ben Skeggs
    Cc: Peter Jones
    Cc: Andrew Morton
    Signed-off-by: Dave Airlie

    Marcin Slusarz
     
  • It removes a hack from nouveau code which had to detect which
    region to pass to kick vesafb/efifb.

    Signed-off-by: Marcin Slusarz
    Cc: Eric Anholt
    Cc: Ben Skeggs
    Cc: Thomas Hellstrom
    Cc: Dave Airlie
    Cc: Peter Jones
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Dave Airlie

    Marcin Slusarz
     

25 Feb, 2010

1 commit


30 Sep, 2009

1 commit

  • * 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (25 commits)
    drm/radeon/kms: Convert R520 to new init path and associated cleanup
    drm/radeon/kms: Convert RV515 to new init path and associated cleanup
    drm: fix radeon DRM warnings when !CONFIG_DEBUG_FS
    drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQ
    drm/r600: fix memory leak introduced with 64k malloc avoidance fix.
    drm/kms: make fb helper work for all drivers.
    drm/radeon/r600: fix offset handling in CS parser
    drm/radeon/kms/r600: fix forcing pci mode on agp cards
    drm/radeon/kms: fix for the extra pages copying.
    drm/radeon/kms/r600: add support for vline relocs
    drm/radeon/kms: fix some bugs in vline reloc
    drm/radeon/kms/r600: clamp vram to aperture size
    drm/kms: protect against fb helper not being created.
    drm/r600: get values from the passed in IB not the copy.
    drm: create gitignore file for radeon
    drm/radeon/kms: remove unneeded master create/destroy functions.
    drm/kms: start adding command line interface using fb.
    fb: change rules for global rules match.
    drm/radeon/kms: don't require up to 64k allocations. (v2)
    drm/radeon/kms: enable dac load detection by default.
    ...

    Trivial conflicts in drivers/gpu/drm/radeon/radeon_asic.h due to adding
    '->vga_set_state' function pointers.

    Linus Torvalds
     

25 Sep, 2009

1 commit


23 Sep, 2009

2 commits

  • At the moment about half of the framebuffer drivers can return an error
    code in fb_set_par. Until now it would be silently ignored by fbmem.c
    and fbcon.c. This patch fixes fbmem.c to return the error code and
    restore var on error.

    But it is not clear in which video mode the device is when fb_set_par
    fails. It would be good and reasonable if it were in the old state but
    there is no guarantee that this is true for all existing drivers.
    Additionally print a message if a failing fb_set_par is detected in
    fbmem.c or fbcon.c.

    Although most errors should be caught by the previous fb_check_var some
    errors can't as they are dynamic (memory allocations, ...) and can only be
    detected while performing the operations which is forbidden in
    fb_check_var.

    This patch shouldn't have a negative impact on normal operation as all
    drivers return 0 on success. The impact in case of error depends heavily
    on the driver and caller but it's expected to be better than before.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Fix the range check for panning. The current code fails to detect some
    invalid values (very high ones that can occur if an app tries to move
    further up/left than 0,0) as the check uses the unknown values for
    calculation so that an overflow can occur.

    To fix this it is sufficient to move the calculation to the right side to
    use only trusted values.

    Kai Jiang detected this problem and proposed an initial patch.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Kai Jiang
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     

13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

09 Jul, 2009

1 commit


07 Jul, 2009

1 commit

  • This way they'll be properly initialized early enough for users that may
    touch them before the framebuffer has been registered.

    Drivers that allocate their fb_info structure some other way (like
    matrocfb's broken static allocation) need to be fixed up appropriately.

    Signed-off-by: Paul Mundt
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

01 Jul, 2009

1 commit

  • Add a mutex to avoid a circular locking problem between the mm layer
    semaphore and fbdev ioctl mutex through the fb_mmap() call.

    Also, add mutex to all places where smem_start and smem_len fields change
    so the mutex inside the fb_mmap() is actually used. Changing of these
    fields before calling the framebuffer_register() are not mutexed.

    This is 2.6.31 material. It removes one lockdep (fb_mmap() and
    register_framebuffer()) but there is still another one (fb_release() and
    register_framebuffer()). It also cleans up handling of the smem_start and
    smem_len fields used by mutexed section of the fb_mmap().

    Signed-off-by: Krzysztof Helt
    Cc: Peter Zijlstra
    Cc: "Rafael J. Wysocki"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     

17 Jun, 2009

1 commit

  • With KMS we have ran into an issue where we really want the KMS fb driver
    to be the one running the console, so panics etc can be shown by switching
    out of X etc.

    However with vesafb/efifb built-in, we end up with those on fb0 and the
    KMS fb driver on fb1, driving the same piece of hw, so this adds an fb
    info flag to denote a firmware fbdev, and adds a new aperture base/size
    range which can be compared when the hw drivers are installed to see if
    there is a conflict with a firmware driver, and if there is the firmware
    driver is unregistered and the hw driver takes over.

    It uses new aperture_base/size members instead of comparing on the fix
    smem_start/length, as smem_start/length might for example only cover the
    first 1MB of the PCI aperture, and we could allocate the kms fb from 8MB
    into the aperture, thus they would never overlap.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Dave Airlie
    Acked-by: Peter Jones
    Cc: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Airlie
     

14 Apr, 2009

1 commit

  • fb_notifier_call_chain() is called with info->lock held, i.e. in
    do_fb_ioctl() => FBIOPUT_VSCREENINFO => fb_set_var() and the some
    notifier callbacks, like fbcon_event_notify(), try to re-acquire
    info->lock again.

    Remove the lock/unlock_fb_info() in all the framebuffer notifier
    callbacks' and be sure to always call fb_notifier_call_chain() with
    info->lock held.

    Reported-by: Pavel Roskin
    Reported-by: Eric Miao
    Signed-off-by: Andrea Righi
    Cc: Stefan Richter
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     

01 Apr, 2009

2 commits

  • Before:

    text data bss dec hex filename
    3648 2910 32 6590 19be drivers/video/backlight/backlight.o
    3226 2812 32 6070 17b6 drivers/video/backlight/lcd.o
    30990 16688 8480 56158 db5e drivers/video/console/fbcon.o
    15488 8400 24 23912 5d68 drivers/video/fbmem.o

    After:

    text data bss dec hex filename
    3537 2870 32 6439 1927 drivers/video/backlight/backlight.o
    3131 2772 32 5935 172f drivers/video/backlight/lcd.o
    30876 16648 8480 56004 dac4 drivers/video/console/fbcon.o
    15506 8400 24 23930 5d7a drivers/video/fbmem.o

    Cc: Andrea Righi
    Cc: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Fix a circular locking dependency in the frame buffer console driver
    pushing down the mutex fb_info->lock.

    Circular locking dependecies occur calling the blocking
    fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks can
    try to acquire mm->mmap_sem, while fb_mmap() acquires the locks in the
    reverse order mm->mmap_sem => fb_info->lock.

    Tested-by: Andrey Borzenkov
    Signed-off-by: Andrea Righi
    Cc: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     

06 Feb, 2009

1 commit

  • Avoid calling copy_from/to_user() with fb_info->lock mutex held in fbmem
    ioctl().

    fb_mmap() is called under mm->mmap_sem (A) held, that also acquires
    fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does
    copy_from/to_user() that might acquire mm->mmap_sem (A), causing a
    deadlock.

    NOTE: it doesn't push down the fb_info->lock in each own driver's
    fb_ioctl(), so there are still potential deadlocks elsewhere.

    Signed-off-by: Andrea Righi
    Cc: Dave Jones
    Cc: "Rafael J. Wysocki"
    Cc: Johannes Weiner
    Cc: Krzysztof Helt
    Cc: Harvey Harrison
    Cc: Stefan Richter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     

07 Jan, 2009

1 commit

  • The code to draw penguin logos always uses some properties of the main logo.
    This is incorrect if additional logos (CONFIG_FB_LOGO_EXTRA=y) have different
    types than the main logo, which causes corrupted logo images.

    http://bugzilla.kernel.org/show_bug.cgi?id=12181

    Hence skip additional logos that are not compatible with the main logo.

    Technically, it's possible to draw multiple logos of different types on
    truecolor displays, but this would complicate the (already quite
    complicated) logo drawing code even more.

    This patch fixes a problem with Debian's linux-image-2.6.26-1-powerpc64
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508173

    Signed-off-by: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

20 Nov, 2008

1 commit

  • When booting in a direct color mode, the penguin has dirty feet, i.e.,
    some pixels have the wrong color. This is caused by
    fb_set_logo_directpalette() which does not initialize the last 32 palette
    entries.

    Signed-off-by: Clemens Ladisch
    Acked-by: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     

07 Nov, 2008

1 commit

  • commit 3e680aae4e53ab54cdbb0c29257dae0cbb158e1c ("fb: convert
    lock/unlock_kernel() into local fb mutex") introduced several deadlocks
    in the fb_compat_ioctl() path, as mutex_lock() doesn't allow recursion,
    unlike lock_kernel(). This broke frame buffer applications on 64-bit
    systems with a 32-bit userland.

    commit 120a37470c2831fea49fdebaceb5a7039f700ce6 ("framebuffer compat_ioctl
    deadlock") fixed one of the deadlocks.

    This patch fixes the remaining deadlocks:
    - Revert commit 120a37470c2831fea49fdebaceb5a7039f700ce6,
    - Extract the core logic of fb_ioctl() into a new function do_fb_ioctl(),
    - Change all callsites of fb_ioctl() where info->lock is already held to
    call do_fb_ioctl() instead,
    - Add sparse annotations to all routines that take info->lock.

    Signed-off-by: Geert Uytterhoeven
    Cc: Mikulas Patocka
    Cc: Krzysztof Helt
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

31 Oct, 2008

1 commit

  • Fix deadlock in fb_compat_ioctl. fb_compat_ioctl acquires a mutex and
    calls fb_ioctl that tries to acquire that mutex too. A regression added
    during BKL removal.

    Signed-off-by: Mikulas Patocka
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     

20 Oct, 2008

2 commits

  • Change lock_kernel()/unlock_kernel() to local fb mutex. Each frame buffer
    instance has its own mutex.

    The one line try_to_load() function is unrolled to request_module() in two
    places for readability.

    [righi.andrea@gmail.com: fb: fix NULL pointer BUG dereference in fb_open()]
    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrea Righi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Framebuffer is heavily BKL dependant at the moment so just wrap the ioctl
    handler in the driver as we push down.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Alan Cox
    Cc: Krzysztof Helt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

17 Oct, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits)
    UIO: Fix mapping of logical and virtual memory
    UIO: add automata sercos3 pci card support
    UIO: Change driver name of uio_pdrv
    UIO: Add alignment warnings for uio-mem
    Driver core: add bus_sort_breadthfirst() function
    NET: convert the phy_device file to use bus_find_device_by_name
    kobject: Cleanup kobject_rename and !CONFIG_SYSFS
    kobject: Fix kobject_rename and !CONFIG_SYSFS
    sysfs: Make dir and name args to sysfs_notify() const
    platform: add new device registration helper
    sysfs: use ilookup5() instead of ilookup5_nowait()
    PNP: create device attributes via default device attributes
    Driver core: make bus_find_device_by_name() more robust
    usb: turn dev_warn+WARN_ON combos into dev_WARN
    debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
    debug: Introduce a dev_WARN() function
    sysfs: fix deadlock
    device model: Do a quickcheck for driver binding before doing an expensive check
    Driver core: Fix cleanup in device_create_vargs().
    Driver core: Clarify device cleanup.
    ...

    Linus Torvalds
     
  • Now that device_create() has been audited, rename things back to the
    original call to be sane.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

16 Oct, 2008

1 commit

  • Straight forward conversions to CONFIG_MODULE; many drivers
    include conditionally and then don't have any
    other conditional code so remove it from those.

    Signed-off-by: Johannes Berg
    Cc: video4linux-list@redhat.com
    Cc: David Woodhouse
    Cc: linux-ppp@vger.kernel.org
    Cc: dm-devel@redhat.com
    Signed-off-by: Rusty Russell

    Johannes Berg
     

24 Sep, 2008

1 commit


21 Aug, 2008

1 commit

  • Fixes kernel BUG at lib/radix-tree.c:473.

    Previously the handler was incidentally provided by tmpfs but this was
    removed with:

    commit 14fcc23fdc78e9d32372553ccf21758a9bd56fa1
    Author: Hugh Dickins
    Date: Mon Jul 28 15:46:19 2008 -0700

    tmpfs: fix kernel BUG in shmem_delete_inode

    relying on this behaviour was incorrect in any case and the BUG also
    appeared when the device node was on an ext3 filesystem.

    v2: override a_ops at open() time rather than mmap() time to minimise
    races per AKPM's concerns.

    Signed-off-by: Ian Campbell
    Cc: Jaya Kumar
    Cc: Nick Piggin
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Jeremy Fitzhardinge
    Cc: Kel Modderman
    Cc: Markus Armbruster
    Cc: Krzysztof Helt
    Cc: [14fcc23fd is in 2.6.25.14 and 2.6.26.1]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Campbell
     

27 Jul, 2008

1 commit


25 Jul, 2008

2 commits

  • Currently, linux/major.h defines a GRAPHDEV_MAJOR (29) that nobody uses,
    and linux/fb.h defines the real FB_MAJOR (also 29), that only fbmem.c
    needs. Drop GRAPHDEV_MAJOR from major.h, move FB_MAJOR definition from
    fb.h to major.h, and fix fbmem.c to use major.h's definition.

    Signed-off-by: Philippe De Muyter
    Cc: Krzysztof Helt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philippe De Muyter
     
  • The xoffset, yoffset and yres members of fb_var_screeninfo are __u32.
    Make them unsigned in the code as well.

    Signed-off-by: Ville Syrjala
    Cc: "Antonino A. Daplas"
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ville Syrjala
     

22 Jul, 2008

1 commit


21 Jun, 2008

1 commit


28 Apr, 2008

3 commits

  • Note: looks like accesses to "registered_fb" are done without any exclusion
    so there're none in new proc code, too. This should be fixed in separate
    patch.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Alexey Dobriyan
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Fix limit check in FBIOPUT_CON2FBMAP ioctl.

    Signed-off-by: Peter Samuelson
    Cc: Geert Uytterhoeven
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Samuelson
     
  • Add support for the framebuffers with non-native endianness. This is done via
    FBINFO_FOREIGN_ENDIAN flag that will be used by the drivers. Depending on the
    host endianness this flag will be overwritten by FBINFO_BE_MATH internal flag,
    or cleared.

    Tested to work on MPC8360E-RDK (BE) + Fujitsu MINT framebuffer (LE).

    Signed-off-by: Anton Vorontsov
    Cc: "Antonino A. Daplas"
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc:
    Cc: Clemens Koller
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov