Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Documentation/reference/user/10_filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,11 @@ are two conditions where ``mmap()`` can be supported:
1. ``mmap()`` can be used to support *eXecute In Place* (XIP) on random
access media under the following very restrictive conditions:

a. The file-system supports the ``FIOC_MMAP`` ioctl command. Any file
system that maps files contiguously on the media should support
this ``ioctl`` command. By comparison, most file system scatter
files over the media in non-contiguous sectors. As of this
writing, ROMFS is the only file system that meets this
requirement.
a. Any file system that maps files contiguously on the media
should implement the mmap file operation. By comparison, most
file system scatter files over the media in non-contiguous
sectors. As of this writing, ROMFS is the only file system
that meets this requirement.

b. The underlying block driver supports the ``BIOC_XIPBASE``
``ioctl`` command that maps the underlying media to a randomly
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/src/cxd56xx/cxd56_geofence.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ static const struct file_operations g_geofencefops =
NULL, /* write */
NULL, /* seek */
cxd56_geofence_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
cxd56_geofence_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/src/cxd56xx/cxd56_gnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ static const struct file_operations g_gnssfops =
cxd56_gnss_write, /* write */
NULL, /* seek */
cxd56_gnss_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
cxd56_gnss_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/src/cxd56xx/cxd56_hostif.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ static const struct file_operations g_hif_fops =
hif_write, /* write */
hif_seek, /* seek */
hif_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
hif_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, hif_unlink /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/src/sama5/sam_tsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ static const struct file_operations g_tsdops =
NULL, /* write */
NULL, /* seek */
sam_tsd_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
sam_tsd_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions boards/arm/sam34/sam4l-xplained/src/sam_slcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ static const struct file_operations g_slcdops =
slcd_write, /* write */
NULL, /* seek */
slcd_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
slcd_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ static const struct file_operations tc_fops =
NULL, /* write */
NULL, /* seek */
tc_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
tc_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ static const struct file_operations g_slcdops =
slcd_write, /* write */
NULL, /* seek */
slcd_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
slcd_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ static const struct file_operations tc_fops =
NULL, /* write */
NULL, /* seek */
tc_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
tc_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ static const struct file_operations g_lcdops =
lcd_write, /* write */
NULL, /* seek */
lcd_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
lcd_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
4 changes: 4 additions & 0 deletions crypto/cryptodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ static const struct file_operations g_cryptofops =
cryptof_write, /* write */
NULL, /* seek */
cryptof_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
cryptof_poll /* poll */
};

Expand All @@ -136,6 +138,8 @@ static const struct file_operations g_cryptoops =
NULL, /* write */
NULL, /* seek */
cryptoioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
NULL /* poll */
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/analog/adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ static const struct file_operations g_adc_fops =
NULL, /* write */
NULL, /* seek */
adc_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
adc_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/analog/comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ static const struct file_operations comp_fops =
NULL, /* write */
NULL, /* seek */
comp_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
comp_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/bch/bchdev_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ const struct file_operations bch_fops =
bch_write, /* write */
bch_seek, /* seek */
bch_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
bch_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, bch_unlink /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/can/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ static const struct file_operations g_canops =
can_write, /* write */
NULL, /* seek */
can_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
can_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/crypto/dev_urandom.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ static const struct file_operations g_urand_fops =
devurand_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
devurand_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/i2c/i2c_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ static const struct file_operations i2cdrvr_fops =
i2cdrvr_write, /* write */
NULL, /* seek */
i2cdrvr_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
NULL /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, i2cdrvr_unlink /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/ads7843e.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ static const struct file_operations ads7843e_fops =
NULL, /* write */
NULL, /* seek */
ads7843e_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
ads7843e_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/ajoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ static const struct file_operations ajoy_fops =
NULL, /* write */
NULL, /* seek */
ajoy_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
ajoy_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/button_upper.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ static const struct file_operations btn_fops =
btn_write, /* write */
NULL, /* seek */
btn_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
btn_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/cypress_mbr3108.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ static const struct file_operations g_mbr3108_fileops =
mbr3108_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
mbr3108_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/djoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ static const struct file_operations djoy_fops =
NULL, /* write */
NULL, /* seek */
djoy_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
djoy_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/ft5x06.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ static const struct file_operations ft5x06_fops =
NULL, /* write */
NULL, /* seek */
ft5x06_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
ft5x06_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/keyboard_upper.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ static const struct file_operations g_keyboard_fops =
keyboard_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
keyboard_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/max11802.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ static const struct file_operations max11802_fops =
NULL, /* write */
NULL, /* seek */
max11802_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
max11802_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/mxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ static const struct file_operations mxt_fops =
NULL, /* write */
NULL, /* seek */
mxt_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
mxt_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/spq10kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ static const struct file_operations g_hidkbd_fops =
spq10kbd_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
spq10kbd_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/stmpe811_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ static const struct file_operations g_stmpe811fops =
NULL, /* write */
NULL, /* seek */
stmpe811_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
stmpe811_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/touchscreen_upper.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ static const struct file_operations g_touch_fops =
touch_write, /* write */
NULL, /* seek */
touch_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
touch_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/tsc2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ static const struct file_operations tsc2007_fops =
NULL, /* write */
NULL, /* seek */
tsc2007_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
tsc2007_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/lcd/ft80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ static const struct file_operations g_ft80x_fops =
ft80x_write, /* write */
NULL, /* seek */
ft80x_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
NULL /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, ft80x_unlink /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/lcd/pcf8574_lcd_backpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ static const struct file_operations g_pcf8574_lcd_fops =
pcf8574_lcd_write, /* write */
pcf8574_lcd_seek, /* seek */
pcf8574_lcd_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
pcf8574_lcd_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, pcf8574_lcd_unlink /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/lcd/tda19988.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ static const struct file_operations tda19988_fops =
tda19988_write, /* write */
tda19988_seek, /* seek */
tda19988_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
tda19988_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, tda19988_unlink /* unlink */
Expand Down
4 changes: 2 additions & 2 deletions drivers/leds/ws2812.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ static const struct file_operations g_ws2812fops =
/****************************************************************************
* #### TODO ####
*
* Consider supporting mmap by returning memory buffer using...
* file_ioctl(filep, FIOC_MMAP, (unsigned long)((uintptr_t)&addr));
* Consider supporting mmap by returning memory buffer using file_operations'
* mmap
* Code using this would be non-portable across architectures as the format
* of the buffer can be different.
*
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/dev_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ static const struct file_operations devnull_fops =
devnull_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
devnull_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/dev_zero.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ static const struct file_operations devzero_fops =
devzero_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
devzero_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/rpmsgdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ const struct file_operations g_rpmsgdev_ops =
rpmsgdev_write, /* write */
rpmsgdev_seek, /* seek */
rpmsgdev_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
rpmsgdev_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/modem/alt1250/alt1250.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ static const struct file_operations g_alt1250fops =
NULL, /* write */
NULL, /* seek */
alt1250_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
alt1250_poll, /* poll */
};
static uint8_t g_recvbuff[ALTCOM_RX_PKT_SIZE_MAX];
Expand Down
2 changes: 2 additions & 0 deletions drivers/modem/u-blox.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ static const struct file_operations ubxmdm_fops =
ubxmdm_write, /* write */
NULL, /* seek */
ubxmdm_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
ubxmdm_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/mtd/mtd_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ static const struct file_operations mtdconfig_fops =
NULL, /* write */
NULL, /* seek */
mtdconfig_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
mtdconfig_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
Expand Down
2 changes: 2 additions & 0 deletions drivers/mtd/mtd_config_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ static const struct file_operations g_mtdnvs_fops =
NULL, /* Write */
NULL, /* Seek */
mtdconfig_ioctl, /* Ioctl */
NULL, /* Truncate */
NULL, /* Mmap */
mtdconfig_poll /* Poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* Unlink */
Expand Down
Loading