linux_dsm_epyc7002/drivers/media
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
..
cec media: cec: move cec autorepeat handling to rc-core 2017-12-14 10:35:30 -05:00
common media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
dvb-core media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
dvb-frontends media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
firewire media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
i2c media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
mmc media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
pci media: intel-ipu3: cio2: fix building with large PAGE_SIZE 2018-01-05 12:42:19 -05:00
platform media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
radio media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
rc media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
usb media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
v4l2-core media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
Kconfig media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
media-device.c media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c [media] media: Check for active and has_no_links overrun 2017-10-04 17:16:14 -03:00