From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: Aw: [PATCH v3] parisc: Change L1_CACHE_BYTES to 16 Date: Thu, 22 Oct 2015 07:35:49 -0700 Message-ID: <1445524549.2207.1.camel@HansenPartnership.com> References: <42430464-867C-4E0B-8E95-C6CDB6D8A0B2@bell.net> <32A3BF6F-B243-4AD4-9AE9-A5F9DAE0270A@bell.net> , , Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: John David Anglin , linux-parisc List To: Helge Deller Return-path: In-Reply-To: List-ID: List-Id: linux-parisc.vger.kernel.org On Thu, 2015-10-22 at 13:53 +0200, Helge Deller wrote: > > > 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 > >=20 > > This patch sadly breaks build on Linux kernel git head: > >=20 > > In file included from /home/cvs/LINUX/git-kernel/linux-2.6/net/core= /dev.c:92:0: > > /net/core/dev.c: In function =E2=80=98expand_xps_map=E2=80=99: > > /include/linux/netdevice.h:721:27: warning: overflow in implicit co= nstant 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 =E2=80=98XPS_M= IN_MAP_ALLOC=E2=80=99 > > int alloc_len =3D XPS_MIN_MAP_ALLOC; >=20 > This is one possibility to fix it: >=20 > 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) * sizeo= f(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)) But it indicates the whole kernel has the architectural assumption that L1_CACHE_BYTES >=3D 32, so I don't think we should be trying to change that. James -- To unsubscribe from this list: send the line "unsubscribe linux-parisc"= in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html