1. 23 10月, 2017 1 次提交
  2. 20 10月, 2017 1 次提交
  3. 27 6月, 2016 1 次提交
  4. 08 6月, 2016 1 次提交
  5. 06 5月, 2016 1 次提交
    • P
      modpost: fix module autoloading for OF devices with generic compatible property · acbef7b7
      Philipp Zabel 提交于
      Since the wildcard at the end of OF module aliases is gone, autoloading
      of modules that don't match a device's last (most generic) compatible
      value fails.
      
      For example the CODA960 VPU on i.MX6Q has the SoC specific compatible
      "fsl,imx6q-vpu" and the generic compatible "cnm,coda960".  Since the
      driver currently only works with knowledge about the SoC specific
      integration, it doesn't list "cnm,cod960" in the module device table.
      
      This results in the device compatible
      "of:NvpuT<NULL>Cfsl,imx6q-vpuCcnm,coda960" not matching the module alias
      "of:N*T*Cfsl,imx6q-vpu" anymore, whereas before commit 2f632369
      ("modpost: don't add a trailing wildcard for OF module aliases") it
      matched the module alias "of:N*T*Cfsl,imx6q-vpu*".
      
      This patch adds two module aliases for each compatible, one without the
      wildcard and one with "C*" appended.
      
        $ modinfo coda | grep imx6q
        alias:          of:N*T*Cfsl,imx6q-vpuC*
        alias:          of:N*T*Cfsl,imx6q-vpu
      
      Fixes: 2f632369 ("modpost: don't add a trailing wildcard for OF module aliases")
      Link: http://lkml.kernel.org/r/1462203339-15340-1-git-send-email-p.zabel@pengutronix.deSigned-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Cc: Javier Martinez Canillas <javier@osg.samsung.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: <stable@vger.kernel.org>	[4.5+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      acbef7b7
  6. 15 1月, 2016 1 次提交
  7. 15 12月, 2015 1 次提交
  8. 20 10月, 2015 1 次提交
  9. 21 9月, 2015 2 次提交
  10. 07 7月, 2015 1 次提交
    • S
      ACPI / scan: Add support for ACPI _CLS device matching · 26095a01
      Suthikulpanit, Suravee 提交于
      Device drivers typically use ACPI _HIDs/_CIDs listed in struct device_driver
      acpi_match_table to match devices. However, for generic drivers, we do not
      want to list _HID for all supported devices. Also, certain classes of devices
      do not have _CID (e.g. SATA, USB). Instead, we can leverage ACPI _CLS,
      which specifies PCI-defined class code (i.e. base-class, subclass and
      programming interface). This patch adds support for matching ACPI devices using
      the _CLS method.
      
      To support loadable module, current design uses _HID or _CID to match device's
      modalias. With the new way of matching with _CLS this would requires modification
      to the current ACPI modalias key to include _CLS. This patch appends PCI-defined
      class-code to the existing ACPI modalias as following.
      
          acpi:<HID>:<CID1>:<CID2>:..:<CIDn>:<bbsspp>:
      E.g:
          # cat /sys/devices/platform/AMDI0600:00/modalias
          acpi:AMDI0600:010601:
      
      where bb is th base-class code, ss is te sub-class code, and pp is the
      programming interface code
      
      Since there would not be _HID/_CID in the ACPI matching table of the driver,
      this patch adds a field to acpi_device_id to specify the matching _CLS.
      
          static const struct acpi_device_id ahci_acpi_match[] = {
              { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
              {},
          };
      
      In this case, the corresponded entry in modules.alias file would be:
      
          alias acpi*:010601:* ahci_platform
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      26095a01
  11. 31 5月, 2015 1 次提交
  12. 25 5月, 2015 1 次提交
  13. 14 5月, 2015 1 次提交
    • H
      usb: add bus type for USB ULPI · 289fcff4
      Heikki Krogerus 提交于
      UTMI+ Low Pin Interface (ULPI) is a commonly used PHY
      interface for USB 2.0. The ULPI specification describes a
      standard set of registers which the vendors can extend for
      their specific needs. ULPI PHYs provide often functions
      such as charger detection and ADP sensing and probing.
      
      There are two major issues that the bus type is meant to
      tackle:
      
      Firstly, ULPI registers are accessed from the controller.
      The bus provides convenient method for the controller
      drivers to share that access with the actual PHY drivers.
      
      Secondly, there are already platforms that assume ULPI PHYs
      are runtime detected, such as many Intel Baytrail based
      platforms. They do not provide any kind of hardware
      description for the ULPI PHYs like separate ACPI device
      object that could be used to enumerate a device from.
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Acked-by: NDavid Cohen <david.a.cohen@linux.intel.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      289fcff4
  14. 31 3月, 2015 1 次提交
    • J
      MIPS: Add CDMM bus support · 8286ae03
      James Hogan 提交于
      Add MIPS Common Device Memory Map (CDMM) support in the form of a bus in
      the standard Linux device model. Each device attached via CDMM is
      discoverable via an 8-bit type identifier and may contain a number of
      blocks of memory mapped registers in the CDMM region. IRQs are expected
      to be handled separately.
      
      Due to the per-cpu (per-VPE for MT cores) nature of the CDMM devices,
      all the driver callbacks take place from workqueues which are run on the
      right CPU for the device in question, so that the driver doesn't need to
      be as concerned about which CPU it is running on. Callbacks also exist
      for when CPUs are taken offline, so that any per-CPU resources used by
      the driver can be disabled so they don't get forcefully migrated. CDMM
      devices are created as children of the CPU device they are attached to.
      
      Any existing CDMM configuration by the bootloader will be inherited,
      however platforms wishing to enable CDMM should implement the weak
      mips_cdmm_phys_base() function (see asm/cdmm.h) so that the bus driver
      knows where it should put the CDMM region in the physical address space
      if the bootloader hasn't already enabled it.
      
      A mips_cdmm_early_probe() function is also provided to allow early boot
      or particularly low level code to set up the CDMM region and probe for a
      specific device type, for example early console or KGDB IO drivers for
      the EJTAG Fast Debug Channel (FDC) CDMM device.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/9599/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8286ae03
  15. 10 6月, 2014 1 次提交
  16. 13 3月, 2014 1 次提交
  17. 19 2月, 2014 2 次提交
    • A
      x86: align x86 arch with generic CPU modalias handling · 2b9c1f03
      Ard Biesheuvel 提交于
      The x86 CPU feature modalias handling existed before it was reimplemented
      generically. This patch aligns the x86 handling so that it
      (a) reuses some more code that is now generic;
      (b) uses the generic format for the modalias module metadata entry, i.e., it
          now uses 'cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:,XXXX,YYYY' instead of
          the 'x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:,XXXX,YYYY' that was
          used before.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b9c1f03
    • A
      cpu: add generic support for CPU feature based module autoloading · 67bad2fd
      Ard Biesheuvel 提交于
      This patch adds support for advertising optional CPU features over udev
      using the modalias, and for declaring compatibility with/dependency upon
      such a feature in a module.
      
      The mapping between feature numbers and actual features should be provided
      by the architecture in a file called <asm/cpufeature.h> which exports the
      following functions/macros:
      - cpu_feature(FEAT), a preprocessor macro that maps token FEAT to a
        numeric index;
      - bool cpu_have_feature(n), returning whether this CPU has support for
        feature #n;
      - MAX_CPU_FEATURES, an upper bound for 'n' in the previous function.
      
      The feature can then be enabled by setting CONFIG_GENERIC_CPU_AUTOPROBE
      for the architecture.
      
      For instance, a module that registers its module init function using
      
        module_cpu_feature_match(FEAT_X, module_init_function)
      
      will be probed automatically when the CPU's support for the 'FEAT_X'
      feature is advertised over udev, and will only allow the module to be
      loaded by hand if the 'FEAT_X' feature is supported.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67bad2fd
  18. 08 2月, 2014 1 次提交
    • J
      Modpost: fixed USB alias generation for ranges including 0x9 and 0xA · 03b56329
      Jan Moskyto Matejka 提交于
      Commit afe2dab4 ("USB: add hex/bcd detection to usb modalias generation")
      changed the routine that generates alias ranges. Before that change, only
      digits 0-9 were supported; the commit tried to fix the case when the range
      includes higher values than 0x9.
      
      Unfortunately, the commit didn't fix the case when the range includes both
      0x9 and 0xA, meaning that the final range must look like [x-9A-y] where
      x <= 0x9 and y >= 0xA -- instead the [x-9A-x] range was produced.
      
      Modprobe doesn't complain as it sees no difference between no-match and
      bad-pattern results of fnmatch().
      
      Fixing this simple bug to fix the aliases.
      Also changing the hardcoded beginning of the range to uppercase as all the
      other letters are also uppercase in the device version numbers.
      
      Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK.
      Signed-off-by: NJan Moskyto Matejka <mq@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      03b56329
  19. 04 7月, 2013 1 次提交
    • A
      rapidio: add udev notification · 3bdbb62f
      Alexandre Bounine 提交于
      Add RapidIO-specific modalias generation to enable udev notifications
      about RapidIO-specific events.
      
      The RapidIO modalias string format is shown below:
      
      "rapidio:vNNNNdNNNNavNNNNadNNNN"
      
      Where:
      v  - Device Vendor ID (16 bit),
      d  - Device ID (16 bit),
      av - Assembly Vendor ID (16 bit),
      ad - Assembly ID (16 bit),
      
      as they are reported in corresponding Capability Registers (CARs)
      of each RapidIO device.
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Cc: Stef van Os <stef.van.os@Prodrive.nl>
      Cc: Jean Delvare <jdelvare@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3bdbb62f
  20. 03 7月, 2013 1 次提交
    • D
      Fix a build warning in scripts/mod/file2alias.c · 04130cc9
      Daniel Tang 提交于
      On some systems, __used is already defined in sys/cdefs.h and causes
      a build warning:
      
      scripts/mod/file2alias.c:85:1: warning: "__used" redefined
      In file included from /usr/include/stdio.h:64,
                       from scripts/mod/modpost.h:1,
      		                  from scripts/mod/file2alias.c:13:
      				  /usr/include/sys/cdefs.h:146:1: warning: this is the location of the previous definition
      
      This adds an extra check before defining the __used macro to see if
      the macro was already defined elsewhere.
      Signed-off-by: NDaniel Tang <dt.tangr@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      04130cc9
  21. 29 3月, 2013 1 次提交
  22. 25 1月, 2013 1 次提交
  23. 07 9月, 2012 1 次提交
  24. 05 9月, 2012 1 次提交
  25. 14 6月, 2012 1 次提交
    • B
      USB: allow match on bInterfaceNumber · 81df2d59
      Bjørn Mork 提交于
      Some composite USB devices provide multiple interfaces
      with different functions, all using "vendor-specific"
      for class/subclass/protocol.  Another OS use interface
      numbers to match the driver and interface. It seems
      these devices are designed with that in mind - using
      static interface numbers for the different functions.
      
      This adds support for matching against the
      bInterfaceNumber, allowing such devices to be supported
      without having to resort to testing against interface
      number whitelists and/or blacklists in the probe.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      81df2d59
  26. 01 5月, 2012 2 次提交
  27. 19 4月, 2012 1 次提交
    • D
      Fix modpost failures in fedora 17 · e88aa7bb
      David Miller 提交于
      The symbol table on x86-64 starts to have entries that have names
      like:
      
      _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table
      
      They are of type STT_FUNCTION and this one had a length of 18.  This
      matched the device ID validation logic and it barfed because the
      length did not meet the device type's criteria.
      
      --------------------
      FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
      Fix definition of struct x86cpu_device_id in mod_devicetable.h
      --------------------
      
      These are some kind of compiler tool internal stuff being emitted and
      not something we want to inspect in modpost's device ID table
      validation code.
      
      So skip the symbol if it is not of type STT_OBJECT.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      e88aa7bb
  28. 16 4月, 2012 1 次提交
  29. 27 2月, 2012 1 次提交
  30. 14 2月, 2012 2 次提交
  31. 27 1月, 2012 1 次提交
    • A
      Add driver auto probing for x86 features v4 · 644e9cbb
      Andi Kleen 提交于
      There's a growing number of drivers that support a specific x86 feature
      or CPU.  Currently loading these drivers currently on a generic
      distribution requires various driver specific hacks and it often
      doesn't work.
      
      This patch adds auto probing for drivers based on the x86 cpuid
      information, in particular based on vendor/family/model number
      and also based on CPUID feature bits.
      
      For example a common issue is not loading the SSE 4.2 accelerated
      CRC module: this can significantly lower the performance of BTRFS
      which relies on fast CRC.
      
      Another issue is loading the right CPUFREQ driver for the current CPU.
      Currently distributions often try all all possible driver until
      one sticks, which is not really a good way to do this.
      
      It works with existing udev without any changes. The code
      exports the x86 information as a generic string in sysfs
      that can be matched by udev's pattern matching.
      
      This scheme does not support numeric ranges, so if you want to
      handle e.g. ranges of model numbers they have to be encoded
      in ASCII or simply all models or families listed. Fixing
      that would require changing udev.
      
      Another issue is that udev will happily load all drivers that match,
      there is currently no nice way to stop a specific driver from
      being loaded if it's not needed (e.g. if you don't need fast CRC)
      But there are not that many cpu specific drivers around and they're
      all not that bloated, so this isn't a particularly serious issue.
      
      Originally this patch added the modalias to the normal cpu
      sysdevs. However sysdevs don't have all the infrastructure
      needed for udev, so it couldn't really autoload drivers.
      This patch instead adds the CPU modaliases to the cpuid devices,
      which are real devices with full support for udev. This implies
      that the cpuid driver has to be loaded to use this.
      
      This patch just adds infrastructure, some driver conversions
      in followups.
      
      Thanks to Kay for helping with some sysfs magic.
      
      v2: Constifcation, some updates
      v4: (trenn@suse.de):
          - Use kzalloc instead of kmalloc to terminate modalias buffer
          - Use uppercase hex values to match correctly against hex values containing
            letters
      
      Cc: Dave Jones <davej@redhat.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Jen Axboe <axboe@kernel.dk>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      644e9cbb
  32. 21 1月, 2012 1 次提交
    • R
      Revert "ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus." · 65f2e753
      Russell King 提交于
      This reverts commit 5dd7bf59.
      
      Conflicts:
      
      	scripts/mod/file2alias.c
      
      This change is wrong on many levels.  First and foremost, it causes a
      regression.  On boot on Assabet, which this patch gives a codec id of
      'ucb1x00', it gives:
      
      	ucb1x00 ID not found: 1005
      
      0x1005 is a valid ID for the UCB1300 device.
      
      Secondly, this patch is way over the top in terms of complexity.  The
      only device which has been seen to be connected with this MCP code is
      the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same
      driver.  Adding a match table, requiring the codec string to match the
      hardware ID read out of the ID register, etc is completely over the top
      when we can just read the hardware ID register.
      65f2e753
  33. 13 1月, 2012 2 次提交
  34. 09 1月, 2012 1 次提交
  35. 22 11月, 2011 1 次提交
    • D
      ARM: amba: Auto-generate AMBA driver module aliases during modpost · 523817bd
      Dave Martin 提交于
      This patch adds the necessary support in file2alias.c to define
      suitable aliases based on the amba_id table in AMBA driver modules.
      
      This should be sufficient to allow such modules to be auto-loaded
      via udev.  The AMBA bus driver's uevent hotplug code is also
      modified to pass an approriate MODALIAS string in the event.
      
      For simplicity, the AMBA ID is treated an an opaque 32-bit numeber.
      Module alises use patterns as appropriate to describe the value-
      mask pairs described in the driver's amba_id list.
      
      The proposed alias format is (extended regex):
      
          ^amba:d(HEX){8}$
      
      Where HEX is a single upper-case HEX digit or a pattern (? or []
      expression) matching a single upper-case HEX digit, as expected by
      udev.
      
      "d" is short for "device", following existing alias naming
      conventions for other device types.  This adds some flexibility for
      unambiguously extending the alias format in the future by adding
      additional leading and trailing fields, if this turns out to be
      necessary.
      Signed-off-by: NDave Martin <dave.martin@linaro.org>
      Acked-by: NPawel Moll <pawel.moll@arm.com>
      523817bd