1. 30 4月, 2007 5 次提交
    • A
      ieee1394: sbp2: include fixes · f84c922b
      Andrew Morton 提交于
      drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout':
      drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
      drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once
      drivers/ieee1394/sbp2.c:399: error: for each function it appears in.)
      drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending'
      drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout'
      drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg':
      drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address'
      drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast
      drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write':
      drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
      
      Possibly due to changes in -mm, but this file should explicitly include the
      headers for the stuff it uses.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
      f84c922b
    • S
      ieee1394: sbp2: move some memory allocations into non-atomic context · 3d269cb5
      Stefan Richter 提交于
      When the command ORB pool is created, the ORB list won't be accessed
      concurrently.  Therefore we don't have to take the spinlock there.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      3d269cb5
    • S
      ieee1394: sbp2: optimize DMA direction of s/g tables · 2446a79f
      Stefan Richter 提交于
      Unlike the name suggests, "cmd->scatter_gather_element" holds only the
      s/g table, not the actual s/g elements.  Since the table is only read
      but never written by the device, DMA_BIDIRECTIONAL can be replaced by
      DMA_TO_DEVICE which may be cheaper on some architectures.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      2446a79f
    • S
      ieee1394: sbp2: enforce 32bit DMA mapping · 0555659d
      Stefan Richter 提交于
      In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
      ORBs, and response buffers have to reside within the first 4 GB of the
      FireWire controller's physical address space.  Set the correct mask for
      DMA mappings.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      0555659d
    • S
      ieee1394: sbp2: remove unnecessary alignments of struct members · f412bf44
      Stefan Richter 提交于
      The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of
      sbp2.h::sbp2_command_info do not have to be aligned themselves --- only
      the memory which they point to has to be.
      
      The member "struct sbp2_command_orb command_orb" has to be aligned on
      4 bytes boundary which is guaranteed because it contains u32 members.
      
      The member "struct sbp2_unrestricted_page_table scatter_gather_element",
      i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary
      according to the SBP-2 spec.  This is not a requirement for FireWire
      controllers but could be expected by SBP-2 targets.
      
      I see no need to align the members command_orb and
      scatter_gather_element on CPU cacheline boundaries.  It could have
      performance benefits, but on the other hand sbp2 has a somewhat wasteful
      allocation scheme which should be optimized first before further tweaks
      like cacheline alignments.  (E.g. don't always allocate SG_ALL s/g table
      elements.)
      
      Note, before as well as after the patch, the code relies on the
      assumption that memory alignment in the virtual address space is
      preserved in the physical address space after DMA mapping.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      f412bf44
  2. 28 4月, 2007 35 次提交