1. 16 1月, 2018 1 次提交
    • F
      m68k/mac: Fix race conditions in OSS interrupt dispatch · 317b749e
      Finn Thain 提交于
      The interrupt dispatch algorithm used in the OSS driver seems to be
      subject to race conditions: an IRQ flag could be lost if asserted between
      the MOV instructions from and to the interrupt flag register. But testing
      shows that the write to the flag register has no effect, so rewrite the
      algorithm without the theoretical race condition.
      
      There is a second theoretical race condition here. When oss_irq() is
      called with say, IPL == 2 it will invoke the SCSI interrupt handler.
      The SCSI IRQ is then cleared by the mac_scsi driver. If SCSI and NuBus
      IRQs are now asserted together, oss_irq() will be invoked with IPL == 3
      and the mac_scsi interrupt handler can be re-entered. This re-entrance
      issue is not limited to SCSI and could affect NuBus and ADB drivers too.
      Fix it by splitting up oss_irq() into separate handlers for each IPL.
      
      No-one seems to know how OSS irq flags can be cleared, if at all, so add
      a comment to this effect (actually reinstate one I previously removed).
      Testing showed that a slot IRQ with no handler can remain asserted (in
      this case a Radius video card) without causing problems for other IRQs.
      Tested-by: NStan Johnson <userm57@yahoo.com>
      Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      317b749e
  2. 10 11月, 2017 2 次提交
    • F
      m68k/mac: Disentangle VIA/RBV and NuBus initialization · 8ee90c5c
      Finn Thain 提交于
      The Nubus subsystem should not be concerned with differences between VIA,
      RBV and OSS platforms. It should be portable across Macs and PowerMacs.
      This goal has implications for the initialization code relating to bus
      locking and slot interrupts.
      
      During Nubus initialization, bus transactions are "unlocked": on VIA2 and
      RBV machines, via_nubus_init() sets a bit in the via2[gBufB] register to
      allow bus-mastering Nubus cards to arbitrate for the bus. This happens
      upon subsys_initcall(nubus_init). But because nubus_init() has no effect
      on card state, this sequence is arbitrary.
      
      Moreover, when Penguin is used to boot Linux, the bus is already unlocked
      when Linux starts. On OSS machines there's no attempt to unlock Nubus
      transactions at all. (Maybe there's no benefit on that platform or maybe
      no-one knows how.)
      
      All of this demonstrates that there's no benefit in locking out
      bus-mastering cards, as yet. (If the need arises, we could lock the bus
      for the duration of a timing-critical operation.) NetBSD unlocks the
      Nubus early (at VIA initialization) and we can do the same.
      
      via_nubus_init() is also responsible for some VIA interrupt setup that
      should happen earlier than subsys_initcall(nubus_init). And actually, the
      Nubus subsystem need not be involved with slot interrupts: SLOT2IRQ
      works fine because Nubus slot IRQs are geographically assigned
      (regardless of platform).
      
      For certain platforms with PDS slots, some Nubus IRQs may be platform
      IRQs and this is not something that the NuBus subsystem should worry
      about. So let's invoke via_nubus_init() earlier and make the platform
      responsible for bus unlocking and interrupt setup instead of the NuBus
      subsystem.
      Tested-by: NStan Johnson <userm57@yahoo.com>
      Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      8ee90c5c
    • F
      m68k/mac: Disentangle VIA and OSS initialization · 7a0bb442
      Finn Thain 提交于
      macintosh_config->via_type is meaningless on Mac IIfx (i.e. the only
      model with OSS chip), so skip the via_type switch statement.
      
      Call oss_init() before via_init() because it is more important and
      because that is the right place to initialize the oss_present flag.
      
      On this model, bringing forward oss_init() and delaying via_init()
      is no problem because those functions are independent.
      
      The only requirement here is that oss_register_interrupts() happens
      after via_init(). That is, mac_init_IRQ() happens after config_mac().
      Tested-by: NStan Johnson <userm57@yahoo.com>
      Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      7a0bb442
  3. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      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: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  4. 09 2月, 2017 1 次提交
  5. 16 9月, 2015 1 次提交
    • T
      genirq: Remove irq argument from irq flow handlers · bd0b9ac4
      Thomas Gleixner 提交于
      Most interrupt flow handlers do not use the irq argument. Those few
      which use it can retrieve the irq number from the irq descriptor.
      
      Remove the argument.
      
      Search and replace was done with coccinelle and some extra helper
      scripts around it. Thanks to Julia for her help!
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      bd0b9ac4
  6. 01 8月, 2015 1 次提交
    • T
      m68k/irq: Prepare irq handlers for irq argument removal · 625b86ad
      Thomas Gleixner 提交于
      The irq argument of most interrupt flow handlers is unused or merily
      used instead of a local variable. The handlers which need the irq
      argument can retrieve the irq number from the irq descriptor.
      
      Search and update was done with coccinelle and the invaluable help of
      Julia Lawall.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-m68k@lists.linux-m68k.org
      625b86ad
  7. 30 3月, 2015 1 次提交
  8. 26 11月, 2013 1 次提交
  9. 11 12月, 2011 4 次提交
  10. 09 11月, 2011 5 次提交
  11. 28 2月, 2010 1 次提交
  12. 13 1月, 2009 1 次提交
  13. 29 12月, 2008 1 次提交
  14. 21 7月, 2008 1 次提交
    • A
      m68k/mac/: possible cleanups · 8dfbdf4a
      Adrian Bunk 提交于
      This patch contains the following possible cleanups:
      - make the following needlessly global code (always) static:
        - baboon.c: struct baboon
        - baboon.c: baboon_irq()
        - config.c: mac_orig_videoaddr
        - config.c: mac_identify()
        - config.c: mac_report_hardware()
        - config.c: mac_debug_console_write()
        - config.c: mac_sccb_console_write()
        - config.c: mac_scca_console_write()
        - config.c: mac_init_scc_port()
        - oss.c: oss_irq()
        - oss.c: oss_nubus_irq()
        - psc.c: psc_debug_dump()
        - psc.c: psc_dma_die_die_die()
        - via.c: rbv_clear
      - remove the unused bootparse.c
      - #if 0 the following unused functions:
        - config.c: mac_debugging_short()
        - config.c: mac_debugging_long()
      - remove the following unused code:
        - config.c: mac_bisize
        - config.c: mac_env
        - config.c: mac_SCC_init_done
        - config.c: mac_SCC_reset_done
        - config.c: mac_init_scca_port()
        - config.c: mac_init_sccb_port()
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8dfbdf4a
  15. 28 4月, 2008 1 次提交
  16. 20 10月, 2007 1 次提交
  17. 05 5月, 2007 3 次提交
  18. 08 10月, 2006 1 次提交
    • A
      [PATCH] m68k pt_regs fixes · 2850bc27
      Al Viro 提交于
      m68k_handle_int() split in two functions: __m68k_handle_int() takes
      pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
      *.
      
      Places where we used to call m68k_handle_int() recursively with the same
      pt_regs have simply lost the second argument, the rest is switched to
      __m68k_handle_int().
      
      The rest of patch is just dropping pt_regs * where needed.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2850bc27
  19. 26 6月, 2006 1 次提交
  20. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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