1. 01 Feb, 2018 1 commit
    • Thomas Gleixner's avatar
      genirq: Make legacy autoprobing work again · 1beaeacd
      Thomas Gleixner authored
      Meelis reported the following warning on a quad P3 HP NetServer museum piece:
      
      WARNING: CPU: 3 PID: 258 at kernel/irq/chip.c:244 __irq_startup+0x80/0x100
      EIP: __irq_startup+0x80/0x100
      irq_startup+0x7e/0x170
      probe_irq_on+0x128/0x2b0
      parport_irq_probe.constprop.18+0x8d/0x1af [parport_pc]
      parport_pc_probe_port+0xf11/0x1260 [parport_pc]
      parport_pc_init+0x78a/0xf10 [parport_pc]
      parport_parse_param.constprop.16+0xf0/0xf0 [parport_pc]
      do_one_initcall+0x45/0x1e0
      
      This is caused by the rewrite of the irq activation/startup sequence which
      missed to convert a callsite in the irq legacy auto probing code.
      
      To fix this irq_activate_and_startup() needs to gain a return value so the
      pending logic can work proper.
      
      Fixes: c942cee4
      
       ("genirq: Separate activation and startup")
      Reported-by: default avatarMeelis Roos <mroos@linux.ee>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarMeelis Roos <mroos@linux.ee>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801301935410.1797@nanos
      1beaeacd
  2. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      
      
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  3. 25 Sep, 2017 1 commit
    • Thomas Gleixner's avatar
      genirq: Separate activation and startup · c942cee4
      Thomas Gleixner authored
      
      
      Activation of an interrupt and startup are currently a combo
      functionlity. That works so far, but upcoming changes require a strict
      separation because the activation can fail in future.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarJuergen Gross <jgross@suse.com>
      Tested-by: default avatarYu Chen <yu.c.chen@intel.com>
      Acked-by: default avatarJuergen Gross <jgross@suse.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Alok Kataria <akataria@vmware.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Rui Zhang <rui.zhang@intel.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Link: https://lkml.kernel.org/r/20170913213152.754334077@linutronix.de
      c942cee4
  4. 22 Jun, 2017 1 commit
    • Thomas Gleixner's avatar
      genirq: Add force argument to irq_startup() · 4cde9c6b
      Thomas Gleixner authored
      
      
      In order to handle managed interrupts gracefully on irq_startup() so they
      won't lose their assigned affinity, it's necessary to allow startups which
      keep the interrupts in managed shutdown state, if none of the assigend CPUs
      is online. This allows drivers to request interrupts w/o the CPUs being
      online, which avoid online/offline churn in drivers.
      
      Add a force argument which can override that decision and let only
      request_irq() and enable_irq() allow the managed shutdown
      handling. enable_irq() is required, because the interrupt might be
      requested with IRQF_NOAUTOEN and enable_irq() invokes irq_startup() which
      would then wreckage the assignment again. All other callers force startup
      and potentially break the assigned affinity.
      
      No functional change as this only adds the function argument.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Link: http://lkml.kernel.org/r/20170619235447.112094565@linutronix.de
      4cde9c6b
  5. 15 Feb, 2012 1 commit
  6. 29 Mar, 2011 1 commit
  7. 19 Feb, 2011 6 commits
  8. 04 Oct, 2010 4 commits
  9. 14 Dec, 2009 1 commit
  10. 07 Jan, 2009 1 commit
    • Arjan van de Ven's avatar
      async: Asynchronous function calls to speed up kernel boot · 22a9d645
      Arjan van de Ven authored
      
      
      Right now, most of the kernel boot is strictly synchronous, such that
      various hardware delays are done sequentially.
      
      In order to make the kernel boot faster, this patch introduces
      infrastructure to allow doing some of the initialization steps
      asynchronously, which will hide significant portions of the hardware delays
      in practice.
      
      In order to not change device order and other similar observables, this
      patch does NOT do full parallel initialization.
      
      Rather, it operates more in the way an out of order CPU does; the work may
      be done out of order and asynchronous, but the observable effects
      (instruction retiring for the CPU) are still done in the original sequence.
      
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      22a9d645
  11. 26 Dec, 2008 1 commit
  12. 08 Dec, 2008 1 commit
    • Yinghai Lu's avatar
      sparse irq_desc[] array: core kernel and x86 changes · 0b8f1efa
      Yinghai Lu authored
      
      
      Impact: new feature
      
      Problem on distro kernels: irq_desc[NR_IRQS] takes megabytes of RAM with
      NR_CPUS set to large values. The goal is to be able to scale up to much
      larger NR_IRQS value without impacting the (important) common case.
      
      To solve this, we generalize irq_desc[NR_IRQS] to an (optional) array of
      irq_desc pointers.
      
      When CONFIG_SPARSE_IRQ=y is used, we use kzalloc_node to get irq_desc,
      this also makes the IRQ descriptors NUMA-local (to the site that calls
      request_irq()).
      
      This gets rid of the irq_cfg[] static array on x86 as well: irq_cfg now
      uses desc->chip_data for x86 to store irq_cfg.
      
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0b8f1efa
  13. 16 Oct, 2008 5 commits
    • Thomas Gleixner's avatar
      genirq: fix name space collision of nr_irqs in autoprobe.c · 63d659d5
      Thomas Gleixner authored
      
      
      probe_irq_off() is disfunctional as the local nr_irqs is referenced
      instead of the global one for the for_each_irq_desc() iterator.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      63d659d5
    • Thomas Gleixner's avatar
      genirq: use iterators for irq_desc loops · 10e58084
      Thomas Gleixner authored
      
      
      Use for_each_irq_desc[_reverse] for all the iteration loops.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      10e58084
    • Ingo Molnar's avatar
      irq: sparse irqs, fix IRQ auto-probe crash · 3bf52a4d
      Ingo Molnar authored
      
      
      fix:
      
      [   10.631533] calling  yenta_socket_init+0x0/0x20
      [   10.631533] Yenta: CardBus bridge found at 0000:15:00.0 [17aa:2012]
      [   10.631533] Yenta: Using INTVAL to route CSC interrupts to PCI
      [   10.631533] Yenta: Routing CardBus interrupts to PCI
      [   10.631533] Yenta TI: socket 0000:15:00.0, mfunc 0x01d01002, devctl 0x64
      [   10.731599] BUG: unable to handle kernel NULL pointer dereference at 00000040
      [   10.731838] IP: [<c0c95b5f>] _spin_lock_irq+0xf/0x20
      [   10.732221] *pde = 00000000
      [   10.732741] Oops: 0002 [#1] SMP
      [   10.733453]
      [   10.734253] Pid: 1, comm: swapper Tainted: G        W (2.6.27-rc3-tip-00173-gd7eaa4f-dirty #1)
      [   10.735188] EIP: 0060:[<c0c95b5f>] EFLAGS: 00010002 CPU: 0
      [   10.735523] EIP is at _spin_lock_irq+0xf/0x20
      [   10.735523] EAX: 00000040 EBX: 00000000 ECX: f6e04c90 EDX: 00000100
      [   10.735523] ESI: 000000df EDI: f6e04c90 EBP: f7867df0 ESP: f7867df0
      [   10.735523]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      [   10.735523] Process swapper (pid: 1, ti=f7867000 task=f7870000 task.ti=f7867000)
      [   10.735523] Stack: f7867e04 c0155fbd 00000000 00000000 f6e04c90 f7867e5c c0c6e319 c0f6a074
      [   10.735523]        f6e04c90 000017aa 00002012 c112b648 f791f240 c112b5e0 f7867e44 c010440b
      [   10.735523]        f791f240 f791f29c c112b8ec f791f240 00000000 f7867e5c c048f893 03c0b648
      [   10.735523] Call Trace:
      [   10.735523]  [<c0155fbd>] ? probe_irq_on+0x3d/0x140
      [   10.735523]  [<c0c6e319>] ? yenta_probe+0x529/0x640
      [   10.735523]  [<c010440b>] ? mcount_call+0x5/0xa
      [   10.735523]  [<c048f893>] ? pci_match_device+0xa3/0xb0
      [   10.735523]  [<c048fc1e>] ? pci_device_probe+0x5e/0x80
      [   10.735523]  [<c0515423>] ? driver_probe_device+0x83/0x180
      [   10.735523]  [<c0515594>] ? __driver_attach+0x74/0x80
      [   10.735523]  [<c0514b69>] ? bus_for_each_dev+0x49/0x70
      [   10.735523]  [<c051528e>] ? driver_attach+0x1e/0x20
      [   10.735523]  [<c0515520>] ? __driver_attach+0x0/0x80
      [   10.735523]  [<c05150d3>] ? bus_add_driver+0x1a3/0x220
      [   10.735523]  [<c048fb60>] ? pci_device_remove+0x0/0x40
      [   10.735523]  [<c05157f4>] ? driver_register+0x54/0x130
      [   10.735523]  [<c048fe2f>] ? __pci_register_driver+0x4f/0x90
      [   10.735523]  [<c11e9419>] ? yenta_socket_init+0x19/0x20
      [   10.735523]  [<c0101125>] ? do_one_initcall+0x35/0x160
      [   10.735523]  [<c11e9400>] ? yenta_socket_init+0x0/0x20
      [   10.735523]  [<c01391a6>] ? __queue_work+0x36/0x50
      [   10.735523]  [<c013922d>] ? queue_work_on+0x3d/0x50
      [   10.735523]  [<c11a2758>] ? kernel_init+0x148/0x210
      [   10.735523]  [<c11a2610>] ? kernel_init+0x0/0x210
      [   10.735523]  [<c01043f3>] ? kernel_thread_helper+0x7/0x10
      [   10.735523]  =======================
      [   10.735523] Code: 10 38 f2 74 06 f3 90 8a 10 eb f6 5d 89 c8 c3 8d b6 00 00 00 00 8d bc 27 00 00 00 00 55 89 e5 e8 a4 e8 46 ff fa ba 00 01 00 00 90 <66> 0f c1 10 38 f2 74 06 f3 90 8a 10 eb f6 5d c3 90 55 89 e5 53
      
      as auto-probing wants to iterate over existing irqs.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3bf52a4d
    • Yinghai Lu's avatar
      generic: sparse irqs: use irq_desc() together with dyn_array, instead of irq_desc[] · 08678b08
      Yinghai Lu authored
      
      
      add CONFIG_HAVE_SPARSE_IRQ to for use condensed array.
      Get rid of irq_desc[] array assumptions.
      
      Preallocate 32 irq_desc, and irq_desc() will try to get more.
      
      ( No change in functionality is expected anywhere, except the odd build
        failure where we missed a code site or where a crossing commit itroduces
        new irq_desc[] usage. )
      
      v2: according to Eric, change get_irq_desc() to irq_desc()
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      08678b08
    • Yinghai Lu's avatar
      irq: introduce nr_irqs · 85c0f909
      Yinghai Lu authored
      
      
      at this point nr_irqs is equal NR_IRQS
      
      convert a few easy users from NR_IRQS to dynamic nr_irqs.
      
      v2: according to Eric, we need to take care of arch without generic_hardirqs
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      85c0f909
  14. 29 Jun, 2006 7 commits
  15. 29 Jun, 2005 1 commit
  16. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      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!
      1da177e4