04 Dec, 2008

8 commits

  • Modify gen_init_cpio so that lines that specify files can contain
    what looks like a shell variable that's expanded during processing.

    For example:

    file /sbin/kinit ${RFS_BASE}/usr/src/klibc/kinit/kinit 0755 0 0

    given RFS_BASE is "/some/directory" in the environment

    would be expanded to

    file /sbin/kinit /some/directory/usr/src/klibc/kinit/kinit 0755 0 0

    If several environment variables appear in a line, they are all expanded
    with processing happening from left to right.
    Undefined variables expand to a null string.
    Syntax errors stop processing, letting the existing error handling
    show the user offending line.

    This patch helps embedded folks who frequently create several
    RFS directories and then switch between them as they're tuning
    an initramfs.

    Signed-off-by: gene.sally@timesys.com
    Signed-off-by: Sam Ravnborg

    Sally, Gene
     
  • unbashify-extract-ikconfig.patch

    scripts/extract-ikconfig contains a lot of gratuituous bashisms,
    which make it fail if /bin/sh isn't bash. This patch replaces them
    with regular Bourne shell constructs.

    Signed-off-by: Werner Almesberger
    Acked-by: Randy Dunlap # as file author
    Signed-off-by: Sam Ravnborg

    Werner Almesberger
     
  • With this fix a "make -s" is now really silent

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Convert a few echos in the build system to new $(kecho) so we get correct
    output according to build verbosity.

    Signed-off-by: Mike Frysinger
    [sam: added kecho in a few more places for O=... builds]
    Signed-off-by: Sam Ravnborg

    Mike Frysinger
     
  • There is a bunch of places in the build system where we do 'echo' to show
    some nice status lines. This means we still get output when running in
    silent mode. So declare a new KECHO variable that only does 'echo' when we
    are in a suitable verbose build mode.

    Signed-off-by: Mike Frysinger
    [sam: added Documentation]
    Signed-off-by: Sam Ravnborg

    Mike Frysinger
     
  • The mkcompile_h script does `echo` regardless of silent mode the make is
    running at, so have it respect $quiet from kbuild and only echo when not in
    silent mode.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Sam Ravnborg

    Mike Frysinger
     
  • kbuild failed to expand include flags in KBUILD_CPPFLAGS
    resulting in code like this in arch Makefiles:

    ifeq ($(KBUILD_SRC),)
    KBUILD_CPPFLAGS += -Iinclude/foo
    else
    KBUILD_CPPFLAGS += -I$(srctree)/include/foo
    endif

    Move use of LINUXINCLUDE into Makefile.lib to allow
    us to expand -I directives of KBUILD_CPPFLAGS so
    we can avoid the above code.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • When adding extra -I options with O=... we could
    end up in a situation where there were no parameters to -I.
    So we had a commandline that looked like this:

    ... -I -Wall ...

    This had the undesired side effect that gcc assumed "-Wall"
    was a path to look for include files so this options was
    effectively ignored.

    This happens only when we build the generated module.mod.c files
    as part of the final modules builds and is as such harmless
    with current kbuild.
    This bug was exposed when we rearranged the options to gcc.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

03 Dec, 2008

23 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    [WATCHDOG] hpwdt: Fix kdump when using hpwdt
    [WATCHDOG] hpwdt: set the mapped BIOS address space as executable
    [WATCHDOG] iTCO_wdt: add PCI ID's for ICH9 & ICH10 chipsets
    [WATCHDOG] iTCO_wdt : correct status clearing
    [WATCHDOG] iTCO_wdt : problem with rebooting on new ICH9 based motherboards
    [WATCHDOG] fix mtx1_wdt compilation failure

    Linus Torvalds
     
  • * 'linux-next' of git://git.infradead.org/ubifs-2.6:
    UBIFS: pre-allocate bulk-read buffer
    UBIFS: do not allocate too much
    UBIFS: do not print scary memory allocation warnings
    UBIFS: allow for gaps when dirtying the LPT
    UBIFS: fix compilation warnings
    MAINTAINERS: change UBI/UBIFS git tree URLs
    UBIFS: endian handling fixes and annotations
    UBIFS: remove printk

    Linus Torvalds
     
  • * 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
    KVM: MMU: avoid creation of unreachable pages in the shadow
    KVM: ppc: stop leaking host memory on VM exit
    KVM: MMU: fix sync of ptes addressed at owner pagetable
    KVM: ia64: Fix: Use correct calling convention for PAL_VPS_RESUME_HANDLER
    KVM: ia64: Fix incorrect kbuild CFLAGS override
    KVM: VMX: Fix interrupt loss during race with NMI
    KVM: s390: Fix problem state handling in guest sigp handler

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix offset calculation in compute_size()
    rtc: rtc-starfire fixes

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
    MAINTAINERS: add netdev to ATM
    ATM: horizon, fix hrz_probe fail path
    pppol2tp: Add missing sock_put() in pppol2tp_release()
    net: Fix soft lockups/OOM issues w/ unix garbage collector
    macvlan: don't broadcast PAUSE frames to macvlan devices
    Phonet: fix oops in phonet_address_del() on non-Phonet device
    netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock
    sungem: Fix PCS_MIICTRL register write in gem_init_phy().
    net: make skb_truesize_bug() call WARN()
    net: hp-plus uses eip_poll
    net/wireless/reg.c: fix bad WARN_ON in if statement
    ath5k: disable beacon filter when station is not associated
    ath5k: fix Security issue in DebugFS part of ath5k
    ath9k: correct expected max RX buffer size
    ath9k: Fix SW-IOMMU bounce buffer starvation
    mac80211 : Fix setting ad-hoc mode and non-ibss channel
    iwlagn: fix DMA sync
    phylib: Add Vitesse VSC8221 SGMII PHY
    rose: zero length frame filtering in af_rose.c
    bridge: netfilter: fix update_pmtu crash with GRE
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Update defconfigs for 2.6.28-rc7
    macfb: Do not overflow fb_fix_screeninfo.id

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
    alim15x3: fix sparse warning
    ide: remove dead code from drive_is_ready()
    ide: fix build for DEBUG_PM
    ide: respect current DMA setting during resume
    ide: add SAMSUNG SP0822N with firmware WA100-10 to ivb_list[]
    amd74xx: workaround unreliable AltStatus register for nVidia controllers
    ide: fix the ide_release_lock imbalance

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] stex: switch to block timeout
    [SCSI] make scsi_eh_try_stu use block timeout
    [SCSI] megaraid_sas: switch to block timeout
    [SCSI] ibmvscsi: switch to block timeout
    [SCSI] aacraid: switch to block timeout
    [SCSI] zfcp: prevent double decrement on host_busy while being busy
    [SCSI] zfcp: fix deadlock between wq triggered port scan and ERP
    [SCSI] zfcp: eliminate race between validation and locking
    [SCSI] zfcp: verify for correct rport state before scanning for SCSI devs
    [SCSI] zfcp: returning an ERR_PTR where a NULL value is expected
    [SCSI] zfcp: Fix opening of wka ports
    [SCSI] zfcp: fix remote port status check
    [SCSI] fc_transport: fix old bug on bitflag definitions
    [SCSI] Fix hang in starved list processing

    Linus Torvalds
     
  • This fixes the MN10300 kernel module linking to match the toolchain. RELA
    relocs don't use the value at the location being relocated. This has been
    working because the tools always leave the value at the target location
    cleared.

    Signed-off-by: Mark Salter
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Mark Salter
     
  • If xpc.ko and gru.ko are both statically linked into the kernel, then
    xpc_init() can get called before gru_init() and make a call to one of the
    gru's exported functions before the gru has initialized itself. The end
    result is a NULL dereference.

    Signed-off-by: Dean Nelson
    Signed-off-by: Linus Torvalds

    Dean Nelson
     
  • In the CONFIG_SMP case the irq_choose_cpu() code was returning back
    a logical cpu id not the physical id. We were writing that directly
    into the HW register.

    We need to be calling get_hard_smp_processor_id() so irq_choose_cpu()
    always returns a physical cpu id.

    Signed-off-by: Kumar Gala
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • Count the insertion of new pages in the statistics used to drive the
    pageout scanning code. This should help the kernel quickly evict
    streaming file IO.

    We count on the fact that new file pages start on the inactive file LRU
    and new anonymous pages start on the active anon list. This means
    streaming file IO will increment the recent scanned file statistic, while
    leaving the recent rotated file statistic alone, driving pageout scanning
    to the file LRUs.

    Pageout activity does its own list manipulation.

    Signed-off-by: Rik van Riel
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Tested-by: Gene Heskett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rik van Riel
     
  • Devices which share the same queue, like floppies and mtd devices, get
    registered multiple times in the bdi interface, but bdi accounts only the
    last registered device of the devices sharing one queue.

    On remove, all earlier registered devices leak, stay around in sysfs, and
    cause "duplicate filename" errors if the devices are re-created.

    This prevents the creation of multiple bdi interfaces per queue, and the
    bdi device will carry the dev_t name of the block device which is the
    first one registered, of the pool of devices using the same queue.

    [akpm@linux-foundation.org: add a WARN_ON so we know which drivers are misbehaving]
    Tested-by: Peter Korsgaard
    Acked-by: Peter Zijlstra
    Signed-off-by: Kay Sievers
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     
  • The previous patch from Alan Cox ("nfsd: fix vm overcommit crash",
    commit 731572d39fcd3498702eda4600db4c43d51e0b26) fixed the problem where
    knfsd crashes on exported shmemfs objects and strict overcommit is set.

    But the patch forgot supporting the case when CONFIG_SECURITY is
    disabled.

    This patch copies a part of his fix which is mainly for detecting a bug
    earlier.

    Acked-by: James Morris
    Signed-off-by: Alan Cox
    Signed-off-by: Junjiro R. Okajima
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junjiro R. Okajima
     
  • Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     
  • Fix this sparse warning:

    drivers/ide/alim15x3.c:594:2: warning: returning void-valued expression

    Signed-off-by: Hannes Eder
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Hannes Eder
     
  • We guarantee 400ns delay at the time of issuing the command.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Also while at it:

    * Drop unused arguments from ide_complete_power_step().

    * Move DEBUG_PM printk() from ide_end_drive_cmd() to
    ide_complete_power_step().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Respect current DMA setting during resume, otherwise PIO timings
    may get destroyed if host uses shared PIO/MWDMA timings.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Should fix kernel.org bug #10225:
    http://bugzilla.kernel.org/show_bug.cgi?id=10225

    Reported-by: Matthias B.
    Cc: Alan Cox
    Acked-by: Sergei Shtyltov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • It seems that on some nVidia controllers using AltStatus register
    can be unreliable so default to Status register if the PCI device
    is in Compatibility Mode. In order to achieve this:

    * Add ide_pci_is_in_compatibility_mode() inline helper to .

    * Add IDE_HFLAG_BROKEN_ALTSTATUS host flag and set it in amd74xx host
    driver for nVidia controllers in Compatibility Mode.

    * Teach actual_try_to_identify() and drive_is_ready() about the new flag.

    This fixes the regression caused by removal of CONFIG_IDEPCI_SHARE_IRQ
    config option in 2.6.25 and using AltStatus register unconditionally when
    available (kernel.org bugs #11659 and #10216).

    [ Moreover for CONFIG_IDEPCI_SHARE_IRQ=y (which is what most people
    and distributions use) it never worked correctly. ]

    Thanks to Remy LABENE and Lars Winterfeld for help with debugging the problem.

    More info at:
    http://bugzilla.kernel.org/show_bug.cgi?id=11659
    http://bugzilla.kernel.org/show_bug.cgi?id=10216

    Reported-by: Remy LABENE
    Tested-by: Remy LABENE
    Tested-by: Lars Winterfeld
    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • ide_release_lock() spits out lots of:

    ide_release_lock: bug

    warnings on Atari Falcon.

    Fix the ide_release_lock imbalance.

    Signed-off-by: Michael Schmitz
    Cc: Geert Uytterhoeven
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Michael Schmitz
     
  • Don't overflow the 16-character fb_fix_screeninfo id string (fixes some
    console erasing and blanking artifacts). Have the ID default to "Unknown"
    on machines with no built-in video and no nubus devices. Check for
    fb_alloc_cmap failure.

    Signed-off-by: Finn Thain
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     

02 Dec, 2008

9 commits

  • Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (25 commits)
    em28xx: remove backward compat macro added on a previous fix
    V4L/DVB (9748): em28xx: fix compile warning
    V4L/DVB (9743): em28xx: fix oops audio
    V4L/DVB (9742): em28xx-alsa: implement another locking schema
    V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick
    V4L/DVB (9691): gspca: Move the video device to a separate area.
    V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put.
    V4L/DVB (9689): gspca: Memory leak when disconnect while streaming.
    V4L/DVB (9668): em28xx: fix a race condition with hald
    V4L/DVB (9664): af9015: don't reconnect device in USB-bus
    V4L/DVB (9647): em28xx: void having two concurrent control URB's
    V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb
    V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails
    V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20
    V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian
    V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner
    V4L/DVB (9632): make em28xx aux audio input work
    V4L/DVB (9631): Make s2api work for ATSC support
    V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom
    V4L/DVB (9608): Fix section mismatch warning for dm1105 during make
    ...

    Linus Torvalds
     
  • drivers/gpu/drm/i915/i915_irq.c: In function 'i915_disable_pipestat':
    drivers/gpu/drm/i915/i915_irq.c:101: warning: control may reach end of non-void function 'i915_pipestat' being inlined

    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Fix module removal bugs of i82875p_edac. Also i82975x_edac code seems to
    have the same module removal bugs as in i82875p_edac.

    The problems were:

    1. In module removal i82875p_remove_one() is never called.

    Variable i82875p_registered is newer changed from 1, which
    guarantees i82875p_remove_one() is not called (and even if it were
    called, it would be called in wrong order).

    As a result, the edac_mc workque is not stopped and keeps probing.
    If kernel debugging options are not enabled, user may not notice
    anything going wrong.

    if debugging options are enabled and I do "rmmod i82875p_edac", I
    get:

    edac debug: edac_pci_workq_function() checking
    BUG: unable to handle kernel paging request at f882d16f
    ...
    call trace:
    [] ? edac_mc_workq_function+0x55/0x7e [edac_core]
    [] ? run_workqueue+0xd7/0x1a5
    [] ? run_workqueue+0x92/0x1a5
    [] ? edac_mc_workq_function+0x0/0x7e [edac_core]
    [] ? worker_thread+0xb7/0xc3
    [] ? autoremove_wake_function+0x0/0x33
    [] ? worker_thread+0x0/0xc3
    [] ? kthread+0x3b/0x61
    [] ? kthread+0x0/0x61
    [] ? kernel_thread_helper+0x7/0x10

    Fix for this is to get rid of needles variable i82875p_registered
    altogether and run i82875p_remove_one() *before*
    pci_unregister_driver().

    2. edac_mc_del_mc() uses mci after freeing mci

    edac_mc_del_mc() calls calls edac_remove_sysfs_mci_device(). The
    kobject refcount of mci drops to 0 and mci is freed. After this
    mci is accessed via debug print and i82875p_remove_one() still
    uses mci->pvt and tries to free mci again with edac_mc_free().

    The fix for this is add kobject_get(&mci->edac_mci_kobj) after
    edac_mc_alloc(). Then the mci is still available after returning
    from edac_mc_del_mc() with refcount 1, and mci->pvt is still
    available. When i82875p_remove_one() finally calls edac_mc_free(),
    this will cause kobject_put() and mci is released properly.

    Signed-off-by: Jarkko Lavinen
    Cc: Doug Thompson
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarkko Lavinen
     
  • When I do "modprobe i82875p_edac" on my Asus P4C800 MB on kernels 2.6.26
    or later, the module load fails due to BAR 0 collision. On 2.6.25 the
    module loads just fine.

    The overflow device on the MB seems to be hidden and its resources are not
    allocated at normal PCI bus init. Log shows the missing resource problem:

    EDAC DEBUG: i82875p_probe1()
    PCI: 0000:00:06.0 reg 10 32bit mmio: [fecf0000, fecf0fff]
    pci 0000:00:06.0: device not available because of BAR 0
    [0xfecf0000-0xfecf0fff] collisions
    EDAC i82875p: i82875p_setup_overfl_dev(): Failed to enable overflow
    device

    The patch below fixes this by calling pci_bus_assign_resources() after
    the overflow device is revealed and added to the bus. With this patch
    I am again able to load and use the module.

    Signed-off-by: Jarkko Lavinen
    Cc: Doug Thompson
    Cc: Jesse Barnes
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarkko Lavinen
     
  • The commit aef7db4bd5a3b6068dfa05919a3d685199eed116 fixed the problem with
    recursive locking in fb blanking code if blank is caused by user setting
    the /sys/class/graphics/fb*/blank. However this broke the fbcon timeout
    blanking.

    If you use a driver that defines ->fb_blank operation and at the same time
    that driver relies on other driver (e.g. backlight or lcd class) to blank
    the screen, when the fbcon times out and tries to blank the fb, it will
    call only fb driver blanker and won't notify the other driver. Thus FB
    output is disabled, but the screen isn't blanked.

    Restore fbcon blanking and at the same time apply the proper fix for the
    above problem: if fbcon_blank is called with FBINFO_FLAG_USEREVENT, we are
    already called through notification from fb_blank, thus we don't have to
    blank the fb again.

    Signed-off-by: Dmitry Baryshkov
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Baryshkov
     
  • kernel-doc handles macros now (it has for quite some time), so change the
    ntfs_debug() macro's kernel-doc to be just before the macro instead of
    before a phony function prototype.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Randy Dunlap
    Cc: Anton Altaparmakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • The method for listing varargs in kernel-doc notation is:
    * @...: these arguments are printed by the @fmt argument

    but scripts/kernel-doc is confused: it always lists varargs as:
    ... variable arguments
    and ignores the @...: line's description, but then prints that
    line after the list of function parameters as though it's
    not part of the function parameters.

    This patch makes kernel-doc print the supplied @... description if it is
    present; otherwise a boilerplate "variable arguments" is printed.

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

    Randy Dunlap
     
  • 2nd part of the fixes needed for
    http://bugzilla.kernel.org/show_bug.cgi?id=11796.

    When the idr tree is either grown or shrunk, then the update to the number
    of layers and the top pointer were not atomic. This race caused crashes.

    The attached patch fixes that by replicating the layers counter in each
    layer, thus idr_find doesn't need idp->layers anymore.

    Signed-off-by: Manfred Spraul
    Cc: Clement Calmels
    Cc: Nadia Derbey
    Cc: Pierre Peiffer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Manfred Spraul