Aw: [PATCH v3] parisc: Change L1_CACHE_BYTES to 16

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

 



> > Betreff: [PATCH v3] parisc: Change L1_CACHE_BYTES to 16
> > The latest version changes L1_CACHE_BYTES to 16 bytes and doesn't adjust SMP_CACHE_BYTES as
> > per James suggestion
> 
> This patch sadly breaks build on Linux kernel git head:
> 
> In file included from /home/cvs/LINUX/git-kernel/linux-2.6/net/core/dev.c:92:0:
> /net/core/dev.c: In function ‘expand_xps_map’:
> /include/linux/netdevice.h:721:27: warning: overflow in implicit constant conversion [-Woverflow]
>  #define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES - sizeof(struct xps_map)) \
> /net/core/dev.c:1972:18: note: in expansion of macro ‘XPS_MIN_MAP_ALLOC’
>   int alloc_len = XPS_MIN_MAP_ALLOC;

This is one possibility to fix it:

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2d15e38..21cf683 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -718,7 +718,7 @@ struct xps_map {
        u16 queues[0];
 };
 #define XPS_MAP_SIZE(_num) (sizeof(struct xps_map) + ((_num) * sizeof(u16)))
-#define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES - sizeof(struct xps_map))   \
+#define XPS_MIN_MAP_ALLOC ( (L1_CACHE_BYTES > sizeof(struct xps_map) ? L1_CACHE_BYTES : 2 * L1_CACHE_BYTES) - sizeof(struct xps_map)   \
     / sizeof(u16))
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux