linux-hardened/drivers/media/pci
Arnd Bergmann 883dd4c1b8 media: intel-ipu3: cio2: fix building with large PAGE_SIZE
The driver apparently assumes that the device uses the same page size
as the CPU, but also assumes that this is 4096 bytes. On architectures
with a larger page size like 65536 bytes, we get a warning about an
integer overflow:

drivers/media/pci/intel/ipu3/ipu3-cio2.c: In function 'cio2_fbpt_entry_init_dummy':
arch/arm64/include/asm/page-def.h:28:20: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define PAGE_SIZE  (_AC(1, UL) << PAGE_SHIFT)
                    ^
drivers/media/pci/intel/ipu3/ipu3-cio2.h:404:26: note: in expansion of macro 'PAGE_SIZE'
 #define CIO2_PAGE_SIZE   PAGE_SIZE
                          ^~~~~~~~~
drivers/media/pci/intel/ipu3/ipu3-cio2.c:172:3: note: in expansion of macro 'CIO2_PAGE_SIZE'
   CIO2_PAGE_SIZE / sizeof(u32) * CIO2_MAX_LOPS;

Obviously this won't work, but the driver is also unlikely to ever be
used on such an architecture, so the easiest workaround is to define
the CIO2_PAGE_SIZE macro to the size that the hardware actually uses.

Fixes: c2a6a07afe ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-05 12:42:19 -05:00
..
b2c2 media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
bt8xx media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
cobalt media: cobalt: do not register subdev nodes 2017-09-23 14:58:22 -04:00
cx18 media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
cx88 media: don't include drivers/media/i2c at cflags 2017-12-28 14:14:09 -05:00
cx23885 media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
cx25821 media: don't include drivers/media/i2c at cflags 2017-12-28 14:14:09 -05:00
ddbridge media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dm1105 media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dt3155 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
intel media: intel-ipu3: cio2: fix building with large PAGE_SIZE 2018-01-05 12:42:19 -05:00
ivtv media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
mantis media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
meye media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
netup_unidvb media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
ngene media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
pluto2 media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
pt1 media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
pt3 media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
saa7134 media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
saa7146 media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
saa7164 media: don't include drivers/media/i2c at cflags 2017-12-28 14:14:09 -05:00
smipcie media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
solo6x10 media: solo6x10: use ktime_get_ts64() for time sync 2017-12-08 11:21:29 -05:00
sta2x11 media: sta2x11: document missing function parameters 2017-11-30 04:18:55 -05:00
ttpci media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
tw68 media: tw68: fix kernel-doc markups 2017-11-30 04:18:56 -05:00
tw686x media updates for v4.15-rc1 2017-11-15 20:30:12 -08:00
tw5864 media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
zoran media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
Kconfig media: intel-ipu3: cio2: add new MIPI-CSI2 driver 2017-12-29 07:00:51 -05:00
Makefile media: intel-ipu3: cio2: add new MIPI-CSI2 driver 2017-12-29 07:00:51 -05:00