linux/drivers
Linus Walleij c3dccb74be mmc: core: Delete bounce buffer Kconfig option
This option is activated by all multiplatform configs and what
not so we almost always have it turned on, and the memory it
saves is negligible, even more so moving forward. The actual
bounce buffer only gets allocated only when used, the only
thing the ifdefs are saving is a little bit of code.

It is highly improper to have this as a Kconfig option that
get turned on by Kconfig, make this a pure runtime-thing and
let the host decide whether we use bounce buffers. We add a
new property "disable_bounce" to the host struct.

Notice that mmc_queue_calc_bouncesz() already disables the
bounce buffers if host->max_segs != 1, so any arch that has a
maximum number of segments higher than 1 will have bounce
buffers disabled.

The option CONFIG_MMC_BLOCK_BOUNCE is default y so the
majority of platforms in the kernel already have it on, and
it then gets turned off at runtime since most of these have
a host->max_segs > 1. The few exceptions that have
host->max_segs == 1 and still turn off the bounce buffering
are those that disable it in their defconfig.

Those are the following:

arch/arm/configs/colibri_pxa300_defconfig
arch/arm/configs/zeus_defconfig
- Uses MMC_PXA, drivers/mmc/host/pxamci.c
- Sets host->max_segs = NR_SG, which is 1
- This needs its bounce buffer deactivated so we set
  host->disable_bounce to true in the host driver

arch/arm/configs/davinci_all_defconfig
- Uses MMC_DAVINCI, drivers/mmc/host/davinci_mmc.c
- This driver sets host->max_segs to MAX_NR_SG, which is 16
- That means this driver anyways disabled bounce buffers
- No special action needed for this platform

arch/arm/configs/lpc32xx_defconfig
arch/arm/configs/nhk8815_defconfig
arch/arm/configs/u300_defconfig
- Uses MMC_ARMMMCI, drivers/mmc/host/mmci.[c|h]
- This driver by default sets host->max_segs to NR_SG,
  which is 128, unless a DMA engine is used, and in that case
  the number of segments are also > 1
- That means this driver already disables bounce buffers
- No special action needed for these platforms

arch/arm/configs/sama5_defconfig
- Uses MMC_SDHCI, MMC_SDHCI_PLTFM, MMC_SDHCI_OF_AT91, MMC_ATMELMCI
- Uses drivers/mmc/host/sdhci.c
- Normally sets host->max_segs to SDHCI_MAX_SEGS which is 128 and
  thus disables bounce buffers
- Sets host->max_segs to 1 if SDHCI_USE_SDMA is set
- SDHCI_USE_SDMA is only set by SDHCI on PCI adapers
- That means that for this platform bounce buffers are already
  disabled at runtime
- No special action needed for this platform

arch/blackfin/configs/CM-BF533_defconfig
arch/blackfin/configs/CM-BF537E_defconfig
- Uses MMC_SPI (a simple MMC card connected on SPI pins)
- Uses drivers/mmc/host/mmc_spi.c
- Sets host->max_segs to MMC_SPI_BLOCKSATONCE which is 128
- That means this platform already disables bounce buffers at
  runtime
- No special action needed for these platforms

arch/mips/configs/cavium_octeon_defconfig
- Uses MMC_CAVIUM_OCTEON, drivers/mmc/host/cavium.c
- Sets host->max_segs to 16 or 1
- Setting host->disable_bounce to be sure for the 1 case

arch/mips/configs/qi_lb60_defconfig
- Uses MMC_JZ4740, drivers/mmc/host/jz4740_mmc.c
- This sets host->max_segs to 128 so bounce buffers are
  already runtime disabled
- No action needed for this platform

It would be interesting to come up with a list of the platforms
that actually end up using bounce buffers. I have not been
able to infer such a list, but it occurs when
host->max_segs == 1 and the bounce buffering is not explicitly
disabled.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-06-20 10:30:17 +02:00
..
accessibility
acpi Merge branch 'acpica-fixes' 2017-06-15 01:52:32 +02:00
amba
android
ata libata: fix error checking in in ata_parse_force_one() 2017-05-31 14:26:26 -04:00
atm
auxdisplay
base Merge branches 'intel_pstate' and 'pm-sleep' 2017-06-09 01:25:16 +02:00
bcma
block Fix loop device flush before configure v3 2017-06-08 08:04:18 -06:00
bluetooth Bluetooth: hci_ldisc: Add protocol check to hci_uart_tx_wakeup() 2017-04-30 12:22:14 +02:00
bus
cdrom scsi: introduce a result field in struct scsi_request 2017-04-20 12:16:10 -06:00
char Improve performance by using a lockless update mechanism suggested by 2017-06-11 12:02:01 -07:00
clk Sort of on the quieter side this time, which is probably due more 2017-05-10 13:38:18 -07:00
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-12 10:43:25 -07:00
connector
cpufreq Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-devfreq' 2017-06-15 01:51:33 +02:00
cpuidle Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-devfreq' 2017-06-15 01:51:33 +02:00
crypto virtio: fixes, cleanups, performance 2017-05-10 11:33:08 -07:00
dax device-dax: fix 'dax' device filesystem inode destruction crash 2017-06-09 08:50:49 -07:00
dca
devfreq PM / devfreq: exynos-ppmu: Staticize event list 2017-06-12 10:12:07 +09:00
dio
dma dmaengine: pl330: fix warning in pl330_remove 2017-06-02 11:49:44 +05:30
dma-buf dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro 2017-04-20 13:47:46 +05:30
edac EDAC, amd64: Fix reporting of Chip Select sizes on Fam17h 2017-05-03 16:27:36 +02:00
eisa
extcon
firewire
firmware Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2017-06-16 17:13:06 +09:00
fmc
fpga fpga fr br: update supported version numbers 2017-04-26 11:38:56 +02:00
fsi
gpio gpio: mvebu: fix gpio bank registration when pwm is used 2017-06-09 09:38:27 +02:00
gpu Merge tag 'drm-intel-fixes-2017-06-15' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes 2017-06-16 10:01:52 +10:00
hid HID: let generic driver yield control iff specific driver has been enabled 2017-06-13 16:52:50 +02:00
hsi hsi: Fix build regression due to netdev destructor fix. 2017-06-08 10:16:05 -04:00
hv char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
hwmon hwmon: (aspeed-pwm-tacho) make fan/pwm names start with index 1 2017-06-03 03:55:43 -07:00
hwspinlock
hwtracing drivers/hwtracing/intel_th/msu.c: use set_memory.h header 2017-05-08 17:15:14 -07:00
i2c i2c: ismt: fix wrong device address when unmap the data buffer 2017-06-15 16:07:03 +02:00
ide ide: don't call memcpy with the same source and destination 2017-05-08 17:36:39 -04:00
idle x86/intel_idle: add Gemini Lake support 2017-05-01 23:17:37 +02:00
iio iio: buffer-dmaengine: Add missing header buffer_impl.h 2017-06-13 20:56:05 +01:00
infiniband Fixes #2 for 4.12-rc 2017-06-16 17:38:23 +09:00
input Input: synaptics-rmi4 - register F03 port as pass-through serio 2017-06-09 09:57:19 -07:00
iommu iommu/of: Ignore all errors except EPROBE_DEFER 2017-05-30 11:31:32 +02:00
ipack
irqchip Xtensa fixes for v4.12-rc6 2017-06-13 15:09:10 +09:00
isdn mISDN: Fix a sleep-in-atomic bug 2017-06-01 14:49:47 -04:00
leds LED fixes for 4.12-rc6 2017-06-18 08:51:35 +09:00
lguest
lightnvm lightnvm: fix bad back free on error path 2017-05-04 07:53:04 -06:00
macintosh DeviceTree for 4.12: 2017-05-05 19:33:07 -07:00
mailbox mailbox: handle empty message in tx_tick 2017-04-27 16:20:04 +05:30
mcb
md md: initialise ->writes_pending in personality modules. 2017-06-05 16:04:35 -07:00
media media fixes for v4.12-rc6 2017-06-15 17:37:40 +09:00
memory Merge tag 'at91-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes 2017-06-01 17:07:31 -07:00
memstick
message scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() 2017-04-24 18:21:17 -04:00
mfd mfd: axp20x: Support AXP803 variant 2017-04-27 11:54:49 +01:00
misc Char/Misc driver fixes for 4.12-rc5 2017-06-11 11:29:15 -07:00
mmc mmc: core: Delete bounce buffer Kconfig option 2017-06-20 10:30:17 +02:00
mtd mtd: nand: make nand_ooblayout_lp_hamming_ops static 2017-05-22 09:42:29 +02:00
net i40e: Fix a sleep-in-atomic bug 2017-06-14 23:45:22 -04:00
nfc nfc: fix get_unaligned_...() misuses 2017-04-17 00:42:22 +02:00
ntb
nubus nubus: Clean up whitespace 2017-04-20 09:54:24 +02:00
nvdimm Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2017-05-12 15:43:10 -07:00
nvme nvme: relax APST default max latency to 100ms 2017-06-07 11:08:55 +02:00
nvmem ARM: SoC driver updates 2017-05-09 10:01:15 -07:00
of iommu/of: Ignore all errors except EPROBE_DEFER 2017-05-30 11:31:32 +02:00
oprofile
parisc
parport Annotate hardware config module parameters in drivers/parport/ 2017-04-20 12:02:32 +01:00
pci PCI: endpoint: Select CRC32 to fix test build error 2017-06-12 15:46:13 -05:00
pcmcia Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
perf drivers/perf: arm_pmu_acpi: avoid perf IRQ init when guest PMU is off 2017-05-30 12:40:03 +01:00
phy phy: qualcomm: phy-qcom-qmp: fix application of sizeof to pointer 2017-06-01 15:03:41 +05:30
pinctrl pinctrl: sunxi: Fix SPDIF function name for A83T 2017-05-23 11:31:27 +02:00
platform platform-drivers-x86 for v4.12-2 2017-06-16 17:30:44 +09:00
pnp
power power supply and reset changes for the v4.12 series (part 2) 2017-05-12 12:02:21 -07:00
powercap PowerCap: Fix an error code in powercap_register_zone() 2017-05-14 13:30:05 +02:00
pps
ps3
ptp Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 16:15:18 -07:00
pwm Merge branch 'for-4.12/drivers' into for-next 2017-04-13 17:41:50 +02:00
rapidio char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
ras
regulator Merge remote-tracking branch 'regulator/topic/vctrl' into regulator-next 2017-04-30 22:17:44 +09:00
remoteproc virtio: fixes, cleanups, performance 2017-05-10 11:33:08 -07:00
reset reset: hi6220: Set module license so that it can be loaded 2017-05-24 10:53:41 +02:00
rpmsg virtio: fixes, cleanups, performance 2017-05-10 11:33:08 -07:00
rtc Merge branches 'pm-sleep' and 'powercap' 2017-05-22 20:32:05 +02:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 18:09:47 +09:00
sbus
scsi SCSI fixes on 20170610 2017-06-11 11:21:08 -07:00
sfi
sh
sn
soc ARM: SoC fixes (and a cross-arch dt-include fix) 2017-05-19 13:36:56 -07:00
spi Merge remote-tracking branches 'spi/topic/ti-qspi' and 'spi/topic/xlp' into spi-next 2017-04-26 15:58:22 +01:00
spmi
ssb
staging Staging/IIO fixes for 4.12-rc6 2017-06-18 08:36:30 +09:00
target iscsi-target: Always wait for kthread_should_stop() before kthread exit 2017-05-31 15:12:57 -07:00
tc
tee Linux 4.12-rc1 2017-05-18 23:54:47 -07:00
thermal thermal: broadcom: ns-thermal: default on iProc SoCs 2017-05-23 20:09:34 -07:00
thunderbolt
tty Revert "tty: fix port buffer locking" 2017-06-04 10:23:25 +02:00
uio uio: fix incorrect memory leak cleanup 2017-05-16 23:06:41 +02:00
usb USB fixes for 4.12-rc6 2017-06-18 08:39:54 +09:00
uwb uwb: fix device quirk on big-endian hosts 2017-05-17 11:27:41 +02:00
vfio powerpc updates for 4.12 part 1. 2017-05-05 11:36:44 -07:00
vhost mm: support __GFP_REPEAT in kvmalloc_node for >32kB 2017-05-08 17:15:12 -07:00
video video: fbdev: udlfb: drop log level for blanking 2017-06-14 12:40:36 +02:00
virt drivers/virt/fsl_hypervisor.c: use get_user_pages_unlocked() 2017-05-08 17:15:10 -07:00
virtio virtio_balloon: disable VIOMMU support 2017-06-18 23:13:35 +03:00
vlynq
vme
w1
watchdog watchdog: bcm281xx: Fix use of uninitialized spinlock. 2017-05-19 10:42:25 +02:00
xen xen: fix for 4.12 rc5 2017-06-09 09:59:51 -07:00
zorro
Kconfig
Makefile Merge branch 'tee/initial-merge' into fixes 2017-05-10 21:03:31 +02:00