1. 16 1月, 2018 1 次提交
    • E
      maint: Fix macros with broken 'do/while(0); ' usage · 2562755e
      Eric Blake 提交于
      The point of writing a macro embedded in a 'do { ... } while (0)'
      loop (particularly if the macro has multiple statements or would
      otherwise end with an 'if' statement) is so that the macro can be
      used as a drop-in statement with the caller supplying the
      trailing ';'.  Although our coding style frowns on brace-less 'if':
        if (cond)
          statement;
        else
          something else;
      that is the classic case where failure to use do/while(0) wrapping
      would cause the 'else' to pair with any embedded 'if' in the macro
      rather than the intended outer 'if'.  But conversely, if the macro
      includes an embedded ';', then the same brace-less coding style
      would now have two statements, making the 'else' a syntax error
      rather than pairing with the outer 'if'.  Thus, even though our
      coding style with required braces is not impacted, ending a macro
      with ';' makes our code harder to port to projects that use
      brace-less styles.
      
      The change should have no semantic impact.  I was not able to
      fully compile-test all of the changes (as some of them are
      examples of the ugly bit-rotting debug print statements that are
      completely elided by default, and I didn't want to recompile
      with the necessary -D witnesses - cleaning those up is left as a
      bite-sized task for another day); I did, however, audit that for
      all files touched, all callers of the changed macros DID supply
      a trailing ';' at the callsite, and did not appear to be used
      as part of a brace-less conditional.
      
      Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 \\\\
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20171201232433.25193-7-eblake@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2562755e
  2. 27 9月, 2017 4 次提交
  3. 18 7月, 2016 6 次提交
  4. 07 6月, 2016 1 次提交
  5. 19 5月, 2016 1 次提交
  6. 28 2月, 2016 1 次提交
  7. 30 1月, 2016 1 次提交
  8. 29 1月, 2016 1 次提交
    • P
      ppc: Clean up includes · 0d75590d
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-6-git-send-email-peter.maydell@linaro.org
      0d75590d
  9. 30 11月, 2015 1 次提交
  10. 21 9月, 2015 1 次提交
  11. 16 6月, 2014 1 次提交
    • A
      macio ide: Do remainder access asynchronously · 3e300fa6
      Alexander Graf 提交于
      The macio IDE controller has some pretty nasty magic in its implementation to
      allow for unaligned sector accesses. We used to handle these accesses
      synchronously inside the IO callback handler.
      
      However, the block infrastructure changed below our feet and now it's impossible
      to call a synchronous block read/write from the aio callback handler of a
      previous block access.
      
      Work around that limitation by making the unaligned handling bits also go
      through our asynchronous handler.
      
      This fixes booting Mac OS X for me.
      Reported-by: NJohn Arbuckle <programmingkidx@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3e300fa6
  12. 14 5月, 2014 1 次提交
  13. 12 7月, 2013 8 次提交
  14. 04 7月, 2013 1 次提交
  15. 19 4月, 2013 1 次提交
  16. 09 4月, 2013 2 次提交
  17. 09 3月, 2013 1 次提交
    • A
      PPC: xnu kernel expects FLUSH to be cleared on STOP · 987422bc
      Amadeusz Sławiński 提交于
      otherwise it gets stuck in a loop
      so clear it when unsetting run when flush is set
      
      void
      IODBDMAStop( volatile IODBDMAChannelRegisters *registers)
      {
      
      	IOSetDBDMAChannelControl( registers,
      	IOClearDBDMAChannelControlBits( kdbdmaRun )
      		| IOSetDBDMAChannelControlBits(  kdbdmaFlush ));
      
      DBDMA: writel 0x0000000000000b00 <= 0xa0002000
      DBDMA: channel 0x16 reg 0x0
      DBDMA:     status 0x00002000
      
      	while( IOGetDBDMAChannelStatus( registers) & (
      			kdbdmaActive | kdbdmaFlush))
      		eieio();
      
      DBDMA: readl 0x0000000000000b04 => 0x00002000
      DBDMA: channel 0x16 reg 0x1
      DBDMA: readl 0x0000000000000b04 => 0x00002000
      DBDMA: channel 0x16 reg 0x1
      DBDMA: readl 0x0000000000000b04 => 0x00002000
      DBDMA: channel 0x16 reg 0x1
      DBDMA: readl 0x0000000000000b04 => 0x00002000
      DBDMA: channel 0x16 reg 0x1
      it continues to get printed
      
      }
      Signed-off-by: NAmadeusz Sławiński <amade@asmblr.net>
      [agraf: replace tabs with spaces]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      987422bc
  18. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  19. 19 12月, 2012 2 次提交
  20. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  21. 22 10月, 2011 1 次提交
  22. 21 8月, 2011 1 次提交
  23. 08 8月, 2011 1 次提交