Re: [PATCH 1/1] aacraid: add call to flush_kernel_dcache_page for architectures that require it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-01-08 at 12:09 -0800, Salyzyn, Mark wrote:
> Some architectures require a call to flush_kernel_dcache_page for processor spoofed DMA operations.
> 
> This attached patch is against current scsi-misc-2.6.
> 
> ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments (inline gets damaged, use attachment).
> 
> Signed-off-by: Mark Salyzyn <aacraid@xxxxxxxxxxx>
> 
>  aachba.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
> --- a/drivers/scsi/aacraid/aachba.c     2008-01-08 15:01:21.503932722 -0500
> +++ b/drivers/scsi/aacraid/aachba.c     2008-01-08 15:02:35.849634368 -0500
> @@ -31,9 +31,9 @@
>  #include <linux/slab.h>
>  #include <linux/completion.h>
>  #include <linux/blkdev.h>
> -#include <linux/dma-mapping.h>
>  #include <asm/semaphore.h>
>  #include <asm/uaccess.h>
> +#include <linux/highmem.h> /* For flush_kernel_dcache_page */
> 
>  #include <scsi/scsi.h>
>  #include <scsi/scsi_cmnd.h>
> @@ -366,6 +366,9 @@
>         if (buf && transfer_len > 0)
>                 memcpy(buf + offset, data, transfer_len);
> 
> +#ifdef ARCH_HAS_FLUSH_ANON_PAGE
> +       flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg->offset));
> +#endif

This #ifdef/#endif guard is unnecessary ... flush_kernel_dcache_page()
is available on all architectures (it's a nop on most).

However, ARCH_HAS_FLUSH_ANON_PAGE is the wrong guard anyway ... that's
for the flush_anon_page() function ...

James


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux