1. 13 1月, 2012 16 次提交
    • R
      module_param: avoid bool abuse, add bint for special cases. · 69116f27
      Rusty Russell 提交于
      For historical reasons, we allow module_param(bool) to take an int (or
      an unsigned int).  That's going away.
      
      A few drivers really want an int: they set it to -1 and a parameter
      will set it to 0 or 1.  This sucks: reading them from sysfs will give
      'Y' for both -1 and 1, but if we change it to an int, then the users
      might be broken (if they did "param" instead of "param=1").
      
      Use a new 'bint' parser for them.
      
      (ntfs has a different problem: it needs an int for debug_msgs because
      it's also exposed via sysctl.)
      
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Cc: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
      Cc: Christoph Raisch <raisch@de.ibm.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
      Cc: linux390@de.ibm.com
      Cc: Anton Altaparmakov <anton@tuxera.com>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: lm-sensors@lm-sensors.org
      Cc: linux-rdma@vger.kernel.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-ntfs-dev@lists.sourceforge.net
      Cc: alsa-devel@alsa-project.org
      Acked-by: Takashi Iwai <tiwai@suse.de> (For the sound part)
      Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> (For the hwmon driver)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      69116f27
    • R
      module_param: check type correctness for module_param_array · bafeafea
      Rusty Russell 提交于
      module_param_array(), unlike its non-array cousins, didn't check the type
      of the variable.  Fixing this found two bugs.
      
      Cc: Luca Risolia <luca.risolia@studio.unibo.it>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Eric Piel <eric.piel@tremplin-utc.net>
      Cc: linux-media@vger.kernel.org
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      bafeafea
    • R
      modpost: use linker section to generate table. · e49ce141
      Rusty Russell 提交于
      This means (most) future busses need only have one hunk in their
      patch.  Also took the opportunity to check that function matches the
      type.
      
      Again, inspired by Alessandro's patch series.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Alessandro Rubini <rubini@gnudd.com>
      e49ce141
    • R
      modpost: use a table rather than a giant if/else statement. · 626596e2
      Rusty Russell 提交于
      We look for symbols of form __mod_<busname>_device_table, and for all
      but three cases we use a standard interation function (do_table) to
      walk over the contents and dump out the aliases.
      
      Alessandro Rubini did this first, I just repainted the bikeshed a bit.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Alessandro Rubini <rubini@gnudd.com>
      626596e2
    • K
      modules: sysfs - export: taint, coresize, initsize · cca3e707
      Kay Sievers 提交于
      Recent tools do not want to use /proc to retrieve module information. A few
      values are currently missing from sysfs to replace the information available
      in /proc/modules.
      
      This adds /sys/module/*/{coresize,initsize,taint} attributes.
      
      TAINT_PROPRIETARY_MODULE (P) and TAINT_OOT_MODULE (O) flags are both always
      shown now, and do no longer exclude each other, also in /proc/modules.
      
      Replace the open-coded sysfs attribute initializers with the __ATTR() macro.
      
      Add the new attributes to Documentation/ABI.
      
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      cca3e707
    • J
      kernel/params: replace DEBUGP with pr_debug · 8487bfd9
      Jim Cromie 提交于
      Use more flexible pr_debug.  This allows:
      
        echo "module params +p" > /dbg/dynamic_debug/control
      
      to turn on debug messages when needed.
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      8487bfd9
    • J
      module: replace DEBUGP with pr_debug · 5e124169
      Jim Cromie 提交于
      Use more flexible pr_debug.  This allows:
      
        echo "module module +p" > /dbg/dynamic_debug/control
      
      to turn on debug messages when needed.
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      5e124169
    • E
      module: struct module_ref should contains long fields · bd77c047
      Eric Dumazet 提交于
      module_ref contains two "unsigned int" fields.
      
      Thats now too small, since some machines can open more than 2^32 files.
      
      Check commit 518de9b3 (fs: allow for more than 2^31 files) for
      reference.
      
      We can add an aligned(2 * sizeof(unsigned long)) attribute to force
      alloc_percpu() allocating module_ref areas in single cache lines.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Tejun Heo <tj@kernel.org>
      CC: Robin Holt <holt@sgi.com>
      CC: David Miller <davem@davemloft.net>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      bd77c047
    • K
      module: Fix performance regression on modules with large symbol tables · 48fd1188
      Kevin Cernekee 提交于
      Looking at /proc/kallsyms, one starts to ponder whether all of the extra
      strtab-related complexity in module.c is worth the memory savings.
      
      Instead of making the add_kallsyms() loop even more complex, I tried the
      other route of deleting the strmap logic and naively copying each string
      into core_strtab with no consideration for consolidating duplicates.
      
      Performance on an "already exists" insmod of nvidia.ko (runs
      add_kallsyms() but does not actually initialize the module):
      
      	Original scheme: 1.230s
      	With naive copying: 0.058s
      
      Extra space used: 35k (of a 408k module).
      Signed-off-by: NKevin Cernekee <cernekee@gmail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <73defb5e4bca04a6431392cc341112b1@localhost>
      48fd1188
    • K
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 2485a4b6
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: bcm5974 - set BUTTONPAD property
        Input: serio_raw - return proper result when serio_raw_write fails
        Input: serio_raw - really signal HUP upon disconnect
        Input: serio_raw - remove stray semicolon
        Input: revert some over-zealous conversions to module_platform_driver()
      2485a4b6
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 6733e54b
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        FUSE: Notifying the kernel of deletion.
        fuse: support ioctl on directories
        fuse: Use kcalloc instead of kzalloc to allocate array
        fuse: llseek optimize SEEK_CUR and SEEK_SET
      6733e54b
    • L
      Merge tag 'to-linus' of git://github.com/rustyrussell/linux · bcf8a3df
      Linus Torvalds 提交于
      * tag 'to-linus' of git://github.com/rustyrussell/linux: (24 commits)
        lguest: Make sure interrupt is allocated ok by lguest_setup_irq
        lguest: move the lguest tool to the tools directory
        lguest: switch segment-voodoo-numbers to readable symbols
        virtio: balloon: Add freeze, restore handlers to support S4
        virtio: balloon: Move vq initialization into separate function
        virtio: net: Add freeze, restore handlers to support S4
        virtio: net: Move vq and vq buf removal into separate function
        virtio: net: Move vq initialization into separate function
        virtio: blk: Add freeze, restore handlers to support S4
        virtio: blk: Move vq initialization to separate function
        virtio: console: Disable callbacks for virtqueues at start of S4 freeze
        virtio: console: Add freeze and restore handlers to support S4
        virtio: console: Move vq and vq buf removal into separate functions
        virtio: pci: add PM notification handlers for restore, freeze, thaw, poweroff
        virtio: pci: switch to new PM API
        virtio_blk: fix config handler race
        virtio: add debugging if driver doesn't kick.
        virtio: expose added descriptors immediately.
        virtio: avoid modulus operation.
        virtio: support unlocked queue kick
        ...
      bcf8a3df
    • L
      brcmsmac: fix reading of PCI sprom contents · 61bd5e56
      Linus Torvalds 提交于
      It appears that you can only read the sprom contents with aligned 16-bit
      reads: anything else causes at least some versions of the broadcom
      chipset to abort the PCI transaction, returning 0xff.
      
      This apparently doesn't trigger very often, because most setups don't
      use an external srom chip, and the OTP sprom loading doesn't have this
      issue.  But at least the current 11" Macbook Air does trigger it, and
      wireless communications were broken as a result.
      Acked-by: NArend van Spriel <arend@broadcom.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      61bd5e56
    • A
      x86: Get rid of 'dubious one-bit signed bitfield' sprase warning · bccd1729
      Anton Vorontsov 提交于
      This very noisy sparse warning appears on almost every file in the
      kernel:
      
        CHECK   init/main.c
        arch/x86/include/asm/thread_info.h:43:55: error: dubious one-bit signed bitfield
        arch/x86/include/asm/thread_info.h:44:46: error: dubious one-bit signed bitfield
      
      This patch changes sig_on_uaccess_error and uaccess_err flags to unsigned
      type and thus fixes the warning.
      Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Acked-by: NAndy Lutomirski <luto@mit.edu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bccd1729
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · a429638c
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
        ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
        ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
        ALSA: usb-audio: add Yamaha MOX6/MOX8 support
        ALSA: virtuoso: add S/PDIF input support for all Xonars
        ALSA: ice1724 - Support for ooAoo SQ210a
        ALSA: ice1724 - Allow card info based on model only
        ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
        ALSA: hdspm - Provide unique driver id based on card serial
        ASoC: Dynamically allocate the rtd device for a non-empty release()
        ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
        ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
        ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
        ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
        ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
        ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
        ALSA: hda/cirrus - support for iMac12,2 model
        ASoC: cx20442: add bias control over a platform provided regulator
        ALSA: usb-audio - Avoid flood of frame-active debug messages
        ALSA: snd-usb-us122l: Delete calls to preempt_disable
        mfd: Put WM8994 into cache only mode when suspending
        ...
      
      Fix up trivial conflicts in:
       - arch/arm/mach-s3c64xx/mach-crag6410.c:
      	renamed speyside_wm8962 to tobermory, added littlemill right
      	next to it
       - drivers/base/regmap/{regcache.c,regmap.c}:
      	duplicate diff that had already come in with other changes in
      	the regmap tree
      a429638c
  2. 12 1月, 2012 24 次提交