From 6150d58b2089ec4ac4c3a87c005de0a3077da6dd Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 4 Jun 2012 16:59:36 -0500 Subject: [PATCH] v3.5-rc1: usb works on the beagle, display broken Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- patch.sh | 32 +- ...nstate-usage-of-hi-speed-PLL-divider.patch | 10 +- ...-to-fifo-mode-5-for-old-musb-beagles.patch | 12 +- ...-add-buddy-param-for-expansionboard-.patch | 12 +- .../0002-Beagle-expansion-add-zippy.patch | 27 +- .../0003-Beagle-expansion-add-zippy2.patch | 10 +- .../0004-Beagle-expansion-add-trainer.patch | 6 +- ...expansion-add-CircuitCo-ulcd-Support.patch | 76 +- .../0006-Beagle-expansion-add-wifi.patch | 27 +- ...0007-Beagle-expansion-add-beaglefpga.patch | 15 +- .../expansion/0008-Enable-buddy-spidev.patch | 6 +- patches/defconfig | 208 +++-- patches/drm/0001-omap2-add-drm-device.patch | 18 +- ...age_alloc-remove-trailing-whitespace.patch | 63 -- ...introduce-isolate_migratepages_range.patch | 142 --- ...03-mm-compaction-introduce-map_pages.patch | 55 -- ...on-introduce-isolate_freepages_range.patch | 195 ----- ...paction-export-some-of-the-functions.patch | 501 ----------- ...e_alloc-introduce-alloc_contig_range.patch | 251 ------ ...lloc-change-fallbacks-array-handling.patch | 61 -- ...one-MIGRATE_CMA-migration-type-added.patch | 317 ------- ...n-MIGRATE_CMA-isolation-functions-ad.patch | 262 ------ ...-Serialize-access-to-min_free_kbytes.patch | 63 -- ...im-code-from-__alloc_pages_direct_re.patch | 83 -- ...reclaim-in-alloc_contig_range-to-sta.patch | 142 --- ...vers-add-Contiguous-Memory-Allocator.patch | 757 ---------------- ...grate-CMA-with-DMA-mapping-subsystem.patch | 154 ---- ...grate-CMA-with-DMA-mapping-subsystem.patch | 805 ------------------ ...CMA-for-2-memory-banks-for-s5p-mfc-d.patch | 90 -- ...w-APIs-to-configure-boot-address-and.patch | 109 --- .../dsp/0001-dsp-add-memblock-include.patch | 32 + ...nterface-to-control-module-functions.patch | 53 -- ...dge-use-scm-functions-to-set-boot-ad.patch | 74 -- ...eat-stop-on-shutdown-reboot-or-panic.patch | 67 -- ...definition-of-strstr-to-decompress.c.patch | 40 + ...e-cpu-checks-for-populating-errata-f.patch | 150 ---- .../panda/0002-panda-enable-bluetooth.patch | 68 -- patches/ref_omap2plus_defconfig | 138 ++- ...SS2-add-bootarg-for-selecting-svideo.patch | 16 +- ...just-dto-to-eliminate-timeout-errors.patch | 30 - version.sh | 6 +- 41 files changed, 423 insertions(+), 4760 deletions(-) delete mode 100644 patches/drm/cma/0001-mm-page_alloc-remove-trailing-whitespace.patch delete mode 100644 patches/drm/cma/0002-mm-compaction-introduce-isolate_migratepages_range.patch delete mode 100644 patches/drm/cma/0003-mm-compaction-introduce-map_pages.patch delete mode 100644 patches/drm/cma/0004-mm-compaction-introduce-isolate_freepages_range.patch delete mode 100644 patches/drm/cma/0005-mm-compaction-export-some-of-the-functions.patch delete mode 100644 patches/drm/cma/0006-mm-page_alloc-introduce-alloc_contig_range.patch delete mode 100644 patches/drm/cma/0007-mm-page_alloc-change-fallbacks-array-handling.patch delete mode 100644 patches/drm/cma/0008-mm-mmzone-MIGRATE_CMA-migration-type-added.patch delete mode 100644 patches/drm/cma/0009-mm-page_isolation-MIGRATE_CMA-isolation-functions-ad.patch delete mode 100644 patches/drm/cma/0010-mm-Serialize-access-to-min_free_kbytes.patch delete mode 100644 patches/drm/cma/0011-mm-extract-reclaim-code-from-__alloc_pages_direct_re.patch delete mode 100644 patches/drm/cma/0012-mm-trigger-page-reclaim-in-alloc_contig_range-to-sta.patch delete mode 100644 patches/drm/cma/0013-drivers-add-Contiguous-Memory-Allocator.patch delete mode 100644 patches/drm/cma/0014-X86-integrate-CMA-with-DMA-mapping-subsystem.patch delete mode 100644 patches/drm/cma/0015-ARM-integrate-CMA-with-DMA-mapping-subsystem.patch delete mode 100644 patches/drm/cma/0016-ARM-Samsung-use-CMA-for-2-memory-banks-for-s5p-mfc-d.patch delete mode 100644 patches/dsp/0001-OMAP2-control-new-APIs-to-configure-boot-address-and.patch create mode 100644 patches/dsp/0001-dsp-add-memblock-include.patch delete mode 100644 patches/dsp/0002-OMAP-dsp-interface-to-control-module-functions.patch delete mode 100644 patches/dsp/0003-staging-tidspbridge-use-scm-functions-to-set-boot-ad.patch delete mode 100644 patches/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch create mode 100644 patches/mainline-fixes/0001-arm-add-definition-of-strstr-to-decompress.c.patch delete mode 100644 patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch delete mode 100644 patches/panda/0002-panda-enable-bluetooth.patch delete mode 100644 patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch diff --git a/patch.sh b/patch.sh index 5da521490..ba9ccd997 100644 --- a/patch.sh +++ b/patch.sh @@ -45,7 +45,6 @@ sakoman () { echo "Patches from: Sakoman git tree" git am "${DIR}/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch" git am "${DIR}/patches/sakoman/0002-video-add-timings-for-hd720.patch" - git am "${DIR}/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch" } @@ -79,14 +78,12 @@ devkit8000 () { panda () { echo "Board Patches for: PandaBoard" git am "${DIR}/patches/panda/0001-panda-fix-wl12xx-regulator.patch" - git am "${DIR}/patches/panda/0002-panda-enable-bluetooth.patch" git am "${DIR}/patches/panda/0003-ti-st-st-kim-fixing-firmware-path.patch" } omap_fixes () { echo "omap cherry pick fixes" git am "${DIR}/patches/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch" - git am "${DIR}/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch" git am "${DIR}/patches/omap_fixes/0003-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch" git am "${DIR}/patches/omap_fixes/0004-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch" git am "${DIR}/patches/omap_fixes/0005-Unconditional-call-to-smp_cross_call-on-UP-crashes.patch" @@ -98,24 +95,6 @@ omap_fixes () { omapdrm () { echo "omap testing omapdrm/kms" - echo "Patches for 3.4-rc1-cma-v24" - #git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git 3.4-rc1-cma-v24 - git am "${DIR}/patches/drm/cma/0001-mm-page_alloc-remove-trailing-whitespace.patch" - git am "${DIR}/patches/drm/cma/0002-mm-compaction-introduce-isolate_migratepages_range.patch" - git am "${DIR}/patches/drm/cma/0003-mm-compaction-introduce-map_pages.patch" - git am "${DIR}/patches/drm/cma/0004-mm-compaction-introduce-isolate_freepages_range.patch" - git am "${DIR}/patches/drm/cma/0005-mm-compaction-export-some-of-the-functions.patch" - git am "${DIR}/patches/drm/cma/0006-mm-page_alloc-introduce-alloc_contig_range.patch" - git am "${DIR}/patches/drm/cma/0007-mm-page_alloc-change-fallbacks-array-handling.patch" - git am "${DIR}/patches/drm/cma/0008-mm-mmzone-MIGRATE_CMA-migration-type-added.patch" - git am "${DIR}/patches/drm/cma/0009-mm-page_isolation-MIGRATE_CMA-isolation-functions-ad.patch" - git am "${DIR}/patches/drm/cma/0010-mm-Serialize-access-to-min_free_kbytes.patch" - git am "${DIR}/patches/drm/cma/0011-mm-extract-reclaim-code-from-__alloc_pages_direct_re.patch" - git am "${DIR}/patches/drm/cma/0012-mm-trigger-page-reclaim-in-alloc_contig_range-to-sta.patch" - git am "${DIR}/patches/drm/cma/0013-drivers-add-Contiguous-Memory-Allocator.patch" - git am "${DIR}/patches/drm/cma/0014-X86-integrate-CMA-with-DMA-mapping-subsystem.patch" - git am "${DIR}/patches/drm/cma/0015-ARM-integrate-CMA-with-DMA-mapping-subsystem.patch" - #posted: 13 Mar 2012 for 3.4 git am "${DIR}/patches/drm/0001-omap2-add-drm-device.patch" @@ -127,9 +106,7 @@ omapdrm () { dsp () { echo "dsp patches" - git am "${DIR}/patches/dsp/0001-OMAP2-control-new-APIs-to-configure-boot-address-and.patch" - git am "${DIR}/patches/dsp/0002-OMAP-dsp-interface-to-control-module-functions.patch" - git am "${DIR}/patches/dsp/0003-staging-tidspbridge-use-scm-functions-to-set-boot-ad.patch" + git am "${DIR}/patches/dsp/0001-dsp-add-memblock-include.patch" } sgx_mainline () { @@ -137,8 +114,9 @@ sgx_mainline () { git am "${DIR}/patches/sgx/0001-Revert-drm-kill-drm_sman.patch" } -led () { - git am "${DIR}/patches/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch" +mainline_fixes () { + echo "mainline patches" + git am "${DIR}/patches/mainline-fixes/0001-arm-add-definition-of-strstr-to-decompress.c.patch" } distro @@ -150,7 +128,7 @@ omap_fixes omapdrm dsp sgx_mainline -led +mainline_fixes echo "patch.sh ran successful" diff --git a/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch b/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch index f79d487b5..099e63628 100644 --- a/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch +++ b/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch @@ -1,4 +1,4 @@ -From 2e9ac5ce24d1e416a885c3da20097d25a562264c Mon Sep 17 00:00:00 2001 +From 4098f5749e67ca30dfb703709c6363efa5f0ee99 Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 25 Jan 2012 15:48:36 +0100 Subject: [PATCH 1/7] beagleboard: reinstate usage of hi-speed PLL divider @@ -9,11 +9,11 @@ Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index d4d8d96..f6a5554 100644 +index 09e8972..8317197 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -306,6 +306,11 @@ static struct omap_dss_device beagle_dvi_device = { - .driver_name = "dvi", +@@ -400,6 +400,11 @@ static struct omap_dss_device beagle_dvi_device = { + .driver_name = "tfp410", .data = &dvi_panel, .phy.dpi.data_lines = 24, + .clocks = { @@ -21,9 +21,9 @@ index d4d8d96..f6a5554 100644 + .dispc_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, + }, + }, - .reset_gpio = -EINVAL, }; + static struct omap_dss_device beagle_tv_device = { -- 1.7.10 diff --git a/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch b/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch index 069540921..2bff08278 100644 --- a/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch +++ b/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch @@ -1,4 +1,4 @@ -From 41431ebd0f6e100266990a3ca3e5472d1f6d2cc4 Mon Sep 17 00:00:00 2001 +From b8e18d32d92750ba68e4f7a6ecf0b57a7d9990c8 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Sat, 8 Jan 2011 14:31:37 -0600 Subject: [PATCH 4/7] default to fifo mode 5, for old musb beagles @@ -12,13 +12,13 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c -index 66aaccf..d4bd034 100644 +index db3dff8..65fcf4c 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c -@@ -1035,7 +1035,7 @@ static void musb_shutdown(struct platform_device *pdev) - || defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE) \ - || defined(CONFIG_USB_MUSB_AM35X) \ - || defined(CONFIG_USB_MUSB_AM35X_MODULE) +@@ -1037,7 +1037,7 @@ static void musb_shutdown(struct platform_device *pdev) + || defined(CONFIG_USB_MUSB_AM35X_MODULE) \ + || defined(CONFIG_USB_MUSB_DSPS) \ + || defined(CONFIG_USB_MUSB_DSPS_MODULE) -static ushort __devinitdata fifo_mode = 4; +static ushort __devinitdata fifo_mode = 5; #elif defined(CONFIG_USB_MUSB_UX500) \ diff --git a/patches/beagle/expansion/0001-Beagle-expansion-add-buddy-param-for-expansionboard-.patch b/patches/beagle/expansion/0001-Beagle-expansion-add-buddy-param-for-expansionboard-.patch index dd063ef4d..66a6ce61f 100644 --- a/patches/beagle/expansion/0001-Beagle-expansion-add-buddy-param-for-expansionboard-.patch +++ b/patches/beagle/expansion/0001-Beagle-expansion-add-buddy-param-for-expansionboard-.patch @@ -1,7 +1,7 @@ -From f6ddac4f453d49f628ca32c34638c1b5d000e7b9 Mon Sep 17 00:00:00 2001 +From 9ce3126b0b6641c260e0ad47e896a84f0b94ab5f Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 10 Oct 2011 11:12:40 -0500 -Subject: [PATCH 1/7] Beagle: expansion: add buddy param for expansionboard +Subject: [PATCH 1/8] Beagle: expansion: add buddy param for expansionboard names Signed-off-by: Robert Nelson <robertcnelson@gmail.com> @@ -10,7 +10,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 7be8d65..ec30ef4 100644 +index 79c6909..42a6e3c 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -21,6 +21,7 @@ @@ -21,7 +21,7 @@ index 7be8d65..ec30ef4 100644 #include <linux/input.h> #include <linux/gpio_keys.h> #include <linux/opp.h> -@@ -156,6 +157,8 @@ static void __init omap3_beagle_init_rev(void) +@@ -160,6 +161,8 @@ static void __init omap3_beagle_init_rev(void) } } @@ -30,7 +30,7 @@ index 7be8d65..ec30ef4 100644 static struct mtd_partition omap3beagle_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ { -@@ -473,6 +476,15 @@ static struct omap_board_mux board_mux[] __initdata = { +@@ -451,6 +454,15 @@ static struct omap_board_mux board_mux[] __initdata = { }; #endif @@ -46,7 +46,7 @@ index 7be8d65..ec30ef4 100644 static void __init beagle_opp_init(void) { int r = 0; -@@ -556,6 +568,8 @@ static void __init omap3_beagle_init(void) +@@ -534,6 +546,8 @@ static void __init omap3_beagle_init(void) beagle_opp_init(); } diff --git a/patches/beagle/expansion/0002-Beagle-expansion-add-zippy.patch b/patches/beagle/expansion/0002-Beagle-expansion-add-zippy.patch index 6f50a20ef..b721edc75 100644 --- a/patches/beagle/expansion/0002-Beagle-expansion-add-zippy.patch +++ b/patches/beagle/expansion/0002-Beagle-expansion-add-zippy.patch @@ -1,18 +1,18 @@ -From 0c50560504454c991e0dcba7b8296a502813cb14 Mon Sep 17 00:00:00 2001 +From bf43afc0318023eba356d0cd35390a58b74c1cf5 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 22 May 2012 15:04:46 -0500 Subject: [PATCH 2/8] Beagle: expansion: add zippy Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- - arch/arm/mach-omap2/board-omap3beagle.c | 158 ++++++++++++++++++++++++++++++- - 1 file changed, 153 insertions(+), 5 deletions(-) + arch/arm/mach-omap2/board-omap3beagle.c | 161 +++++++++++++++++++++++++++++-- + 1 file changed, 155 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index ec30ef4..d780e83 100644 +index 42a6e3c..36dbd3d 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -159,6 +159,86 @@ static void __init omap3_beagle_init_rev(void) +@@ -163,6 +163,86 @@ static void __init omap3_beagle_init_rev(void) char expansionboard_name[16]; @@ -99,14 +99,14 @@ index ec30ef4..d780e83 100644 static struct mtd_partition omap3beagle_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ { -@@ -261,6 +341,23 @@ static struct omap2_hsmmc_info mmc[] = { +@@ -239,6 +319,23 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; +static struct omap2_hsmmc_info mmc_zippy[] = { + { + .mmc = 1, -+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, ++ .caps = MMC_CAP_4_BIT_DATA, + .gpio_wp = -EINVAL, + .deferred = true, + }, @@ -123,7 +123,7 @@ index ec30ef4..d780e83 100644 static struct regulator_consumer_supply beagle_vmmc1_supply[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; -@@ -276,10 +373,21 @@ static int beagle_twl_gpio_setup(struct device *dev, +@@ -254,10 +351,21 @@ static int beagle_twl_gpio_setup(struct device *dev, { int r; @@ -149,7 +149,7 @@ index ec30ef4..d780e83 100644 /* * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active -@@ -377,6 +485,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { +@@ -355,6 +463,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { }, }; @@ -162,7 +162,7 @@ index ec30ef4..d780e83 100644 static int __init omap3_beagle_i2c_init(void) { omap3_pmic_get_config(&beagle_twldata, -@@ -387,6 +501,15 @@ static int __init omap3_beagle_i2c_init(void) +@@ -365,6 +479,15 @@ static int __init omap3_beagle_i2c_init(void) beagle_twldata.vpll2->constraints.name = "VDVI"; omap3_pmic_init("twl4030", &beagle_twldata); @@ -178,7 +178,7 @@ index ec30ef4..d780e83 100644 /* Bus 3 is attached to the DVI port where devices like the pico DLP * projector don't work reliably with 400kHz */ omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); -@@ -533,9 +656,28 @@ static void __init omap3_beagle_init(void) +@@ -511,10 +634,30 @@ static void __init omap3_beagle_init(void) omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_init_rev(); @@ -196,19 +196,22 @@ index ec30ef4..d780e83 100644 + if (beagle_config.mmc1_gpio_wp != -EINVAL) omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); +- mmc[0].caps = beagle_config.mmc_caps; - omap_hsmmc_init(mmc); + + switch (expansion_config.mmc_settings) { + case 1: ++ mmc_zippy[0].caps = beagle_config.mmc_caps; + omap_hsmmc_init(mmc_zippy); + break; + default: ++ mmc[0].caps = beagle_config.mmc_caps; + omap_hsmmc_init(mmc); + } omap3_beagle_i2c_init(); -@@ -552,6 +694,12 @@ static void __init omap3_beagle_init(void) +@@ -531,6 +674,12 @@ static void __init omap3_beagle_init(void) /* REVISIT leave DVI powered down until it's needed ... */ gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD"); diff --git a/patches/beagle/expansion/0003-Beagle-expansion-add-zippy2.patch b/patches/beagle/expansion/0003-Beagle-expansion-add-zippy2.patch index 6ee4d8247..12654e5d1 100644 --- a/patches/beagle/expansion/0003-Beagle-expansion-add-zippy2.patch +++ b/patches/beagle/expansion/0003-Beagle-expansion-add-zippy2.patch @@ -1,4 +1,4 @@ -From ae936b047ac980dc7ab6286429f75a63ab8e61a0 Mon Sep 17 00:00:00 2001 +From 81284832d3fd082acfca689487114a8020e98f61 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 22 May 2012 15:09:04 -0500 Subject: [PATCH 3/8] Beagle: expansion: add zippy2 @@ -9,10 +9,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index d780e83..977c1a7 100644 +index 36dbd3d..6258243 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -239,6 +239,46 @@ static void __init omap3beagle_enc28j60_init(void) +@@ -243,6 +243,46 @@ static void __init omap3beagle_enc28j60_init(void) static inline void __init omap3beagle_enc28j60_init(void) { return; } #endif @@ -59,7 +59,7 @@ index d780e83..977c1a7 100644 static struct mtd_partition omap3beagle_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ { -@@ -656,7 +696,7 @@ static void __init omap3_beagle_init(void) +@@ -634,7 +674,7 @@ static void __init omap3_beagle_init(void) omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_init_rev(); @@ -68,7 +68,7 @@ index d780e83..977c1a7 100644 { printk(KERN_INFO "Beagle expansionboard: initializing zippy mmc\n"); platform_device_register(&omap_zippy_device); -@@ -700,6 +740,12 @@ static void __init omap3_beagle_init(void) +@@ -680,6 +720,12 @@ static void __init omap3_beagle_init(void) omap3beagle_enc28j60_init(); } diff --git a/patches/beagle/expansion/0004-Beagle-expansion-add-trainer.patch b/patches/beagle/expansion/0004-Beagle-expansion-add-trainer.patch index 3ae0aae91..30df61e4e 100644 --- a/patches/beagle/expansion/0004-Beagle-expansion-add-trainer.patch +++ b/patches/beagle/expansion/0004-Beagle-expansion-add-trainer.patch @@ -1,4 +1,4 @@ -From 127593d9801b5bdfc7845cbc186f95ba9efe3bc5 Mon Sep 17 00:00:00 2001 +From 08b81aab2d782427a8346da5e6a26f1ebaac3a3c Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 22 May 2012 15:11:30 -0500 Subject: [PATCH 4/8] Beagle: expansion: add trainer @@ -9,10 +9,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 31 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 977c1a7..67ebeff 100644 +index 6258243..7e389a2 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -746,6 +746,37 @@ static void __init omap3_beagle_init(void) +@@ -726,6 +726,37 @@ static void __init omap3_beagle_init(void) omap3beagle_ks8851_init(); } diff --git a/patches/beagle/expansion/0005-Beagle-expansion-add-CircuitCo-ulcd-Support.patch b/patches/beagle/expansion/0005-Beagle-expansion-add-CircuitCo-ulcd-Support.patch index b6ea94e92..f8a6c2de8 100644 --- a/patches/beagle/expansion/0005-Beagle-expansion-add-CircuitCo-ulcd-Support.patch +++ b/patches/beagle/expansion/0005-Beagle-expansion-add-CircuitCo-ulcd-Support.patch @@ -1,4 +1,4 @@ -From 9481de9f68f9f34e27eb0e3745d3b9d3d3fb1988 Mon Sep 17 00:00:00 2001 +From 0756ae3498755245b1cf0f0902800ddb1f1bfff0 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 22 May 2012 15:18:27 -0500 Subject: [PATCH 5/8] Beagle: expansion: add CircuitCo ulcd Support @@ -19,12 +19,12 @@ Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- - arch/arm/mach-omap2/board-omap3beagle.c | 134 ++++++++++++++++++++++ + arch/arm/mach-omap2/board-omap3beagle.c | 135 ++++++++++++++++++++++ drivers/video/omap2/displays/panel-generic-dpi.c | 25 ++++ - 2 files changed, 159 insertions(+) + 2 files changed, 160 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 67ebeff..6584eec 100644 +index 7e389a2..6f5a79c 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -43,6 +43,7 @@ @@ -32,13 +32,13 @@ index 67ebeff..6584eec 100644 #include "common.h" #include <video/omapdss.h> +#include <video/omap-panel-generic-dpi.h> - #include <video/omap-panel-dvi.h> + #include <video/omap-panel-tfp410.h> #include <plat/gpmc.h> #include <plat/nand.h> -@@ -84,11 +85,15 @@ static struct { - int usb_pwr_level; +@@ -85,12 +86,16 @@ static struct { int reset_gpio; int usr_button_gpio; + int mmc_caps; + char *lcd_driver_name; + int lcd_pwren; } beagle_config = { @@ -46,12 +46,13 @@ index 67ebeff..6584eec 100644 .usb_pwr_level = GPIOF_OUT_INIT_LOW, .reset_gpio = 129, .usr_button_gpio = 4, + .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, + .lcd_driver_name = "", -+ .lcd_pwren = 156 ++ .lcd_pwren = 156, }; static struct gpio omap3_beagle_rev_gpios[] __initdata = { -@@ -158,6 +163,7 @@ static void __init omap3_beagle_init_rev(void) +@@ -162,6 +167,7 @@ static void __init omap3_beagle_init_rev(void) } char expansionboard_name[16]; @@ -59,7 +60,7 @@ index 67ebeff..6584eec 100644 enum { EXPANSION_MMC_NONE = 0, -@@ -168,6 +174,7 @@ enum { +@@ -172,6 +178,7 @@ enum { enum { EXPANSION_I2C_NONE = 0, EXPANSION_I2C_ZIPPY, @@ -67,7 +68,7 @@ index 67ebeff..6584eec 100644 }; static struct { -@@ -348,9 +355,53 @@ static struct omap_dss_device beagle_tv_device = { +@@ -336,9 +343,53 @@ static struct omap_dss_device beagle_tv_device = { .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, }; @@ -121,19 +122,7 @@ index 67ebeff..6584eec 100644 }; static struct omap_dss_board_info beagle_dss_data = { -@@ -367,6 +418,11 @@ static void __init beagle_display_init(void) - "DVI reset"); - if (r < 0) - printk(KERN_ERR "Unable to get DVI reset GPIO\n"); -+ -+ r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW, -+ "LCD power"); -+ if (r < 0) -+ printk(KERN_ERR "Unable to get LCD power enable GPIO\n"); - } - - #include "sdram-micron-mt46h32m32lf-6.h" -@@ -531,6 +587,55 @@ static struct i2c_board_info __initdata zippy_i2c2_rtc[] = { +@@ -509,6 +560,55 @@ static struct i2c_board_info __initdata zippy_i2c2_rtc[] = { }, }; @@ -189,7 +178,7 @@ index 67ebeff..6584eec 100644 static int __init omap3_beagle_i2c_init(void) { omap3_pmic_get_config(&beagle_twldata, -@@ -543,6 +648,10 @@ static int __init omap3_beagle_i2c_init(void) +@@ -521,6 +621,10 @@ static int __init omap3_beagle_i2c_init(void) omap3_pmic_init("twl4030", &beagle_twldata); switch (expansion_config.i2c_settings) { @@ -200,7 +189,7 @@ index 67ebeff..6584eec 100644 case 1: omap_register_i2c_bus(2, 400, zippy_i2c2_rtc, ARRAY_SIZE(zippy_i2c2_rtc)); break; -@@ -648,6 +757,15 @@ static int __init expansionboard_setup(char *str) +@@ -626,6 +730,15 @@ static int __init expansionboard_setup(char *str) return 0; } @@ -216,30 +205,29 @@ index 67ebeff..6584eec 100644 static void __init beagle_opp_init(void) { int r = 0; -@@ -708,6 +826,11 @@ static void __init omap3_beagle_init(void) +@@ -686,6 +799,21 @@ static void __init omap3_beagle_init(void) omap_mux_init_gpio(OMAP3BEAGLE_GPIO_ZIPPY_MMC_CD, OMAP_PIN_INPUT); } + if (!strcmp(expansionboard2_name, "bbtoys-ulcd")) + { ++ int r; + expansion_config.i2c_settings = EXPANSION_I2C_7ULCD; ++ ++ /* TODO: set lcd_driver_name by command line or device tree */ ++ beagle_config.lcd_driver_name = "tfc_s9700rtwv35tr-01b", ++ lcd_panel.name = beagle_config.lcd_driver_name; ++ ++ r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW, "LCD power"); ++ if (r < 0) ++ printk(KERN_ERR "Unable to get LCD power enable GPIO\n"); ++ + } + if (beagle_config.mmc1_gpio_wp != -EINVAL) omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); -@@ -723,6 +846,10 @@ static void __init omap3_beagle_init(void) - - gpio_buttons[0].gpio = beagle_config.usr_button_gpio; - -+ /* TODO: set lcd_driver_name by command line or device tree */ -+ beagle_config.lcd_driver_name = "tfc_s9700rtwv35tr-01b", -+ lcd_panel.name = beagle_config.lcd_driver_name; -+ - platform_add_devices(omap3_beagle_devices, - ARRAY_SIZE(omap3_beagle_devices)); - omap_display_init(&beagle_dss_data); -@@ -777,6 +904,12 @@ static void __init omap3_beagle_init(void) +@@ -757,6 +885,12 @@ static void __init omap3_beagle_init(void) gpio_export(162, 1); } @@ -252,7 +240,7 @@ index 67ebeff..6584eec 100644 usb_musb_init(NULL); usbhs_init(&usbhs_bdata); omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, -@@ -794,6 +927,7 @@ static void __init omap3_beagle_init(void) +@@ -773,6 +907,7 @@ static void __init omap3_beagle_init(void) } early_param("buddy", expansionboard_setup); @@ -261,12 +249,12 @@ index 67ebeff..6584eec 100644 MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c -index 30fe4df..648a6e5 100644 +index e42f9dc..6948589 100644 --- a/drivers/video/omap2/displays/panel-generic-dpi.c +++ b/drivers/video/omap2/displays/panel-generic-dpi.c -@@ -386,6 +386,31 @@ static struct panel_config generic_dpi_panels[] = { - - .name = "innolux_at080tn52", +@@ -486,6 +486,31 @@ static struct panel_config generic_dpi_panels[] = { + OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC, + .name = "primeview_pd104slf", }, + + /* ThreeFiveCorp S9700RTWV35TR-01B */ diff --git a/patches/beagle/expansion/0006-Beagle-expansion-add-wifi.patch b/patches/beagle/expansion/0006-Beagle-expansion-add-wifi.patch index dc4fb8afb..1b9ab97d7 100644 --- a/patches/beagle/expansion/0006-Beagle-expansion-add-wifi.patch +++ b/patches/beagle/expansion/0006-Beagle-expansion-add-wifi.patch @@ -1,18 +1,18 @@ -From 60de897ff4ca5922e0017e0fe43741352d5d4c8a Mon Sep 17 00:00:00 2001 +From 649dd5d45dedc84e92d6452da2843483a41f2787 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 22 May 2012 15:31:43 -0500 Subject: [PATCH 6/8] Beagle: expansion: add wifi Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- - arch/arm/mach-omap2/board-omap3beagle.c | 112 +++++++++++++++++++++++++++++++ - 1 file changed, 112 insertions(+) + arch/arm/mach-omap2/board-omap3beagle.c | 113 +++++++++++++++++++++++++++++++ + 1 file changed, 113 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 6584eec..ea208d3 100644 +index 6f5a79c..02b680f 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -185,6 +185,71 @@ static struct { +@@ -189,6 +189,71 @@ static struct { .i2c_settings = EXPANSION_I2C_NONE, }; @@ -84,7 +84,7 @@ index 6584eec..ea208d3 100644 //rcn-ee: this is just a fake regulator, the zippy hardware provides 3.3/1.8 with jumper.. static struct fixed_voltage_config beagle_vzippy = { .supply_name = "vzippy", -@@ -454,6 +519,26 @@ static struct omap2_hsmmc_info mmc_zippy[] = { +@@ -427,6 +492,26 @@ static struct omap2_hsmmc_info mmc_zippy[] = { }, {} /* Terminator */ }; @@ -92,7 +92,7 @@ index 6584eec..ea208d3 100644 +static struct omap2_hsmmc_info mmcbbt[] = { + { + .mmc = 1, -+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, ++ .caps = MMC_CAP_4_BIT_DATA, + .gpio_wp = -EINVAL, + .deferred = true, + }, @@ -111,7 +111,7 @@ index 6584eec..ea208d3 100644 static struct regulator_consumer_supply beagle_vmmc1_supply[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), }; -@@ -470,6 +555,13 @@ static int beagle_twl_gpio_setup(struct device *dev, +@@ -443,6 +528,13 @@ static int beagle_twl_gpio_setup(struct device *dev, int r; switch (expansion_config.mmc_settings) { @@ -125,7 +125,7 @@ index 6584eec..ea208d3 100644 case 1: mmc_zippy[0].gpio_wp = beagle_config.mmc1_gpio_wp; /* gpio + 0 is "mmc0_cd" (input/IRQ) */ -@@ -826,6 +918,11 @@ static void __init omap3_beagle_init(void) +@@ -799,6 +891,11 @@ static void __init omap3_beagle_init(void) omap_mux_init_gpio(OMAP3BEAGLE_GPIO_ZIPPY_MMC_CD, OMAP_PIN_INPUT); } @@ -136,18 +136,19 @@ index 6584eec..ea208d3 100644 + if (!strcmp(expansionboard2_name, "bbtoys-ulcd")) { - expansion_config.i2c_settings = EXPANSION_I2C_7ULCD; -@@ -835,6 +932,9 @@ static void __init omap3_beagle_init(void) + int r; +@@ -818,6 +915,10 @@ static void __init omap3_beagle_init(void) omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); switch (expansion_config.mmc_settings) { + case 2: ++ mmcbbt[0].caps = beagle_config.mmc_caps; + omap_hsmmc_init(mmcbbt); + break; case 1: + mmc_zippy[0].caps = beagle_config.mmc_caps; omap_hsmmc_init(mmc_zippy); - break; -@@ -904,6 +1004,18 @@ static void __init omap3_beagle_init(void) +@@ -885,6 +986,18 @@ static void __init omap3_beagle_init(void) gpio_export(162, 1); } diff --git a/patches/beagle/expansion/0007-Beagle-expansion-add-beaglefpga.patch b/patches/beagle/expansion/0007-Beagle-expansion-add-beaglefpga.patch index 4fa0cacc3..8b8fe96a2 100644 --- a/patches/beagle/expansion/0007-Beagle-expansion-add-beaglefpga.patch +++ b/patches/beagle/expansion/0007-Beagle-expansion-add-beaglefpga.patch @@ -1,4 +1,4 @@ -From 806b0761ea1e3e90ce4377f4f486a49335f12568 Mon Sep 17 00:00:00 2001 +From 00a0e87c93d6f3b57f761eaa6e43830a68d0360f Mon Sep 17 00:00:00 2001 From: Bas van der Doorn <bas@doornvd.com> Date: Sat, 19 May 2012 17:09:28 +0200 Subject: [PATCH 7/8] Beagle: expansion: add beaglefpga @@ -8,11 +8,11 @@ Added SPI dev and McBSP 3 mux when FPGA is detected Signed-off-by: Bas van der Doorn <bas@doornvd.com> Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- - arch/arm/mach-omap2/board-omap3beagle.c | 73 +++++++++++++++++++++++++++++++ - 1 file changed, 73 insertions(+) + arch/arm/mach-omap2/board-omap3beagle.c | 72 +++++++++++++++++++++++++++++++ + 1 file changed, 72 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index ea208d3..8eac14c 100644 +index dbb30ab..8134dc0 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -39,6 +39,7 @@ @@ -23,13 +23,13 @@ index ea208d3..8eac14c 100644 #include <plat/board.h> #include "common.h" -@@ -901,6 +902,69 @@ static void __init beagle_opp_init(void) +@@ -874,6 +875,68 @@ static void __init beagle_opp_init(void) return; } +static void __init omap3_beagle_config_mcspi3_mux(void) +{ -+ // NOTE: Clock pins need to be in input mode ++ // NOTE: Clock pins need to be in input mode + omap_mux_init_signal("sdmmc2_clk.mcspi3_clk", OMAP_PIN_INPUT); + omap_mux_init_signal("sdmmc2_cmd.mcspi3_simo", OMAP_PIN_OUTPUT); + omap_mux_init_signal("sdmmc2_dat0.mcspi3_somi", OMAP_PIN_INPUT_PULLUP); @@ -79,7 +79,6 @@ index ea208d3..8eac14c 100644 + .chip_select = 1, + .mode = SPI_MODE_1, + }, -+ + // spi 4.0 + { + .modalias = "spidev", @@ -93,7 +92,7 @@ index ea208d3..8eac14c 100644 static void __init omap3_beagle_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); -@@ -1016,6 +1080,15 @@ static void __init omap3_beagle_init(void) +@@ -997,6 +1060,15 @@ static void __init omap3_beagle_init(void) platform_device_register(&omap_vwlan_device); } diff --git a/patches/beagle/expansion/0008-Enable-buddy-spidev.patch b/patches/beagle/expansion/0008-Enable-buddy-spidev.patch index d59176e37..ada61c48b 100644 --- a/patches/beagle/expansion/0008-Enable-buddy-spidev.patch +++ b/patches/beagle/expansion/0008-Enable-buddy-spidev.patch @@ -1,4 +1,4 @@ -From d244d624b793145da3c035c3340d62faba017940 Mon Sep 17 00:00:00 2001 +From f9a697aab1f811b5dd7c18d8e578c741c276a9f0 Mon Sep 17 00:00:00 2001 From: Russell Hay <russell.hay@gmail.com> Date: Mon, 28 May 2012 09:45:24 -0700 Subject: [PATCH 8/8] Enable buddy=spidev @@ -10,10 +10,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 8eac14c..381d2b0 100644 +index 8134dc0..ab90ab9 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -1095,6 +1095,14 @@ static void __init omap3_beagle_init(void) +@@ -1075,6 +1075,14 @@ static void __init omap3_beagle_init(void) omap3beagle_tsc2007_init(); } diff --git a/patches/defconfig b/patches/defconfig index 8dbc2fc80..8f84c0643 100644 --- a/patches/defconfig +++ b/patches/defconfig @@ -1,23 +1,16 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.4.0 Kernel Configuration +# Linux/arm 3.5.0-rc1 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_GENERIC_GPIO=y -# CONFIG_ARCH_USES_GETTIMEOFFSET is not set -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_KTIME_SCALAR=y CONFIG_HAVE_PROC_CPU=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NEED_DMA_MAP_STATE=y @@ -68,10 +61,23 @@ CONFIG_HAVE_GENERIC_HARDIRQS=y # IRQ subsystem # CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_DEBUG=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y # # RCU Subsystem @@ -79,6 +85,7 @@ CONFIG_IRQ_DOMAIN_DEBUG=y CONFIG_TREE_RCU=y # CONFIG_PREEMPT_RCU is not set CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_RCU_FAST_NO_HZ is not set # CONFIG_TREE_RCU_TRACE is not set @@ -108,7 +115,6 @@ CONFIG_BLK_CGROUP=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y -CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_SCHED_AUTOGROUP=y @@ -150,7 +156,6 @@ CONFIG_PERF_USE_VMALLOC=y # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y -CONFIG_PERF_COUNTERS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLUB_DEBUG=y @@ -167,8 +172,11 @@ CONFIG_KPROBES=y CONFIG_KRETPROBES=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y @@ -292,8 +300,6 @@ CONFIG_MMU=y # CONFIG_ARCH_IOP13XX is not set # CONFIG_ARCH_IOP32X is not set # CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_DOVE is not set # CONFIG_ARCH_KIRKWOOD is not set @@ -362,8 +368,8 @@ CONFIG_ARCH_OMAP2PLUS_TYPICAL=y CONFIG_ARCH_OMAP3=y CONFIG_ARCH_OMAP4=y CONFIG_SOC_OMAP3430=y -CONFIG_SOC_OMAPTI81XX=y -CONFIG_SOC_OMAPAM33XX=y +CONFIG_SOC_TI81XX=y +CONFIG_SOC_AM33XX=y CONFIG_OMAP_PACKAGE_CBB=y CONFIG_OMAP_PACKAGE_CUS=y CONFIG_OMAP_PACKAGE_CBP=y @@ -404,10 +410,6 @@ CONFIG_MACH_OMAP4_PANDA=y # CONFIG_OMAP3_SDRC_AC_TIMING is not set # CONFIG_OMAP4_ERRATA_I688 is not set -# -# System MMU -# - # # Processor Type # @@ -471,10 +473,6 @@ CONFIG_ARM_GIC=y # # Kernel Features # -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_HAVE_SMP=y CONFIG_SMP=y CONFIG_SMP_ON_UP=y @@ -482,6 +480,7 @@ CONFIG_ARM_CPU_TOPOLOGY=y # CONFIG_SCHED_MC is not set # CONFIG_SCHED_SMT is not set CONFIG_HAVE_ARM_SCU=y +CONFIG_ARM_ARCH_TIMER=y CONFIG_HAVE_ARM_TWD=y CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_2G is not set @@ -519,6 +518,7 @@ CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_CLEANCACHE is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_LEDS=y @@ -606,6 +606,10 @@ CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y @@ -628,6 +632,7 @@ CONFIG_PACKET=y CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set CONFIG_XFRM=y +CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set @@ -765,6 +770,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_TARGET_CT=m CONFIG_NETFILTER_XT_TARGET_DSCP=m CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m CONFIG_NETFILTER_XT_TARGET_LED=m CONFIG_NETFILTER_XT_TARGET_LOG=m @@ -912,7 +918,6 @@ CONFIG_IP_NF_ARP_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1015,13 +1020,11 @@ CONFIG_LLC2=m # CONFIG_ATALK is not set # CONFIG_X25 is not set CONFIG_LAPB=m -CONFIG_ECONET=m -CONFIG_ECONET_AUNUDP=y -CONFIG_ECONET_NATIVE=y CONFIG_WAN_ROUTER=m CONFIG_PHONET=m CONFIG_IEEE802154=m CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m CONFIG_NET_SCHED=y # @@ -1045,6 +1048,8 @@ CONFIG_NET_SCH_DRR=m # CONFIG_NET_SCH_MQPRIO is not set # CONFIG_NET_SCH_CHOKE is not set # CONFIG_NET_SCH_QFQ is not set +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m # CONFIG_NET_SCH_INGRESS is not set # CONFIG_NET_SCH_PLUG is not set @@ -1084,6 +1089,7 @@ CONFIG_NET_SCH_FIFO=y CONFIG_DCB=y CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_BLA=y # CONFIG_BATMAN_ADV_DEBUG is not set # CONFIG_OPENVSWITCH is not set CONFIG_RPS=y @@ -1091,7 +1097,6 @@ CONFIG_RFS_ACCEL=y CONFIG_XPS=y # CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y -CONFIG_HAVE_BPF_JIT=y # CONFIG_BPF_JIT is not set # @@ -1273,6 +1278,7 @@ CONFIG_CEPH_LIB=m # CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set CONFIG_NFC=m # CONFIG_NFC_NCI is not set +# CONFIG_NFC_HCI is not set # CONFIG_NFC_LLCP is not set # @@ -1280,6 +1286,7 @@ CONFIG_NFC=m # CONFIG_PN544_NFC=m CONFIG_NFC_PN533=m +CONFIG_HAVE_BPF_JIT=y # # Device Drivers @@ -1404,6 +1411,8 @@ CONFIG_MTD_DOC2000=m CONFIG_MTD_DOC2001=m CONFIG_MTD_DOC2001PLUS=m # CONFIG_MTD_DOCG3 is not set +CONFIG_BCH_CONST_M=13 +CONFIG_BCH_CONST_T=4 CONFIG_MTD_DOCPROBE=m CONFIG_MTD_DOCECC=m # CONFIG_MTD_DOCPROBE_ADVANCED is not set @@ -1417,6 +1426,9 @@ CONFIG_MTD_NAND=y # CONFIG_MTD_NAND_MUSEUM_IDS is not set # CONFIG_MTD_NAND_GPIO is not set CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_OMAP_BCH=y +# CONFIG_MTD_NAND_OMAP_BCH8 is not set +CONFIG_MTD_NAND_OMAP_BCH4=y CONFIG_MTD_NAND_IDS=y CONFIG_MTD_NAND_DISKONCHIP=m # CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set @@ -1442,7 +1454,6 @@ CONFIG_MTD_UBI=m CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_RESERVE=1 CONFIG_MTD_UBI_GLUEBI=m -# CONFIG_MTD_UBI_DEBUG is not set CONFIG_DTC=y CONFIG_OF=y @@ -1456,10 +1467,8 @@ CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_DEVICE=y -CONFIG_OF_GPIO=y CONFIG_OF_I2C=y CONFIG_OF_NET=y -CONFIG_OF_SPI=y CONFIG_OF_MDIO=y CONFIG_OF_MTD=y # CONFIG_PARPORT is not set @@ -1505,7 +1514,9 @@ CONFIG_SENSORS_BH1780=m CONFIG_HMC6352=m CONFIG_DS1682=m CONFIG_TI_DAC7512=m -CONFIG_BMP085=m +CONFIG_BMP085=y +CONFIG_BMP085_I2C=m +CONFIG_BMP085_SPI=m # CONFIG_USB_SWITCH_FSA9480 is not set # CONFIG_C2PORT is not set @@ -1656,6 +1667,7 @@ CONFIG_EQUALIZER=m CONFIG_MII=y CONFIG_IEEE802154_DRIVERS=m # CONFIG_IEEE802154_FAKEHARD is not set +# CONFIG_IEEE802154_FAKELB is not set CONFIG_IFB=m # CONFIG_NET_TEAM is not set # CONFIG_MACVLAN is not set @@ -1724,6 +1736,12 @@ CONFIG_NET_VENDOR_TI=y CONFIG_TI_DAVINCI_MDIO=y CONFIG_TI_DAVINCI_CPDMA=y CONFIG_TI_CPSW=y +CONFIG_NET_VENDOR_WIZNET=y +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5300=m +# CONFIG_WIZNET_BUS_DIRECT is not set +# CONFIG_WIZNET_BUS_INDIRECT is not set +CONFIG_WIZNET_BUS_ANY=y CONFIG_PHYLIB=y # @@ -1746,6 +1764,7 @@ CONFIG_SMSC_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set # CONFIG_MICREL_KS8995MA is not set CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m @@ -1878,18 +1897,20 @@ CONFIG_RTL8192CU=m CONFIG_RTLWIFI=m CONFIG_RTLWIFI_DEBUG=y CONFIG_RTL8192C_COMMON=m +CONFIG_WL_TI=y CONFIG_WL1251=m CONFIG_WL1251_SPI=m CONFIG_WL1251_SDIO=m -CONFIG_WL12XX_MENU=m CONFIG_WL12XX=m -CONFIG_WL12XX_SPI=m -CONFIG_WL12XX_SDIO=m +CONFIG_WLCORE=m +CONFIG_WLCORE_SPI=m +CONFIG_WLCORE_SDIO=m CONFIG_WL12XX_PLATFORM_DATA=y CONFIG_ZD1211RW=m # CONFIG_ZD1211RW_DEBUG is not set CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m +CONFIG_MWIFIEX_USB=m # # WiMAX Wireless Broadband devices @@ -1906,6 +1927,7 @@ CONFIG_INPUT=y CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_POLLDEV=m CONFIG_INPUT_SPARSEKMAP=m +CONFIG_INPUT_MATRIXKMAP=m # # Userland interfaces @@ -1933,6 +1955,7 @@ CONFIG_KEYBOARD_TCA6416=m CONFIG_KEYBOARD_TCA8418=m CONFIG_KEYBOARD_MATRIX=m CONFIG_KEYBOARD_LM8323=m +CONFIG_KEYBOARD_LM8333=m CONFIG_KEYBOARD_MAX7359=m CONFIG_KEYBOARD_MCS=m CONFIG_KEYBOARD_MPR121=m @@ -2016,6 +2039,7 @@ CONFIG_TOUCHSCREEN_ILI210X=m CONFIG_TOUCHSCREEN_GUNZE=m CONFIG_TOUCHSCREEN_ELO=m CONFIG_TOUCHSCREEN_WACOM_W8001=m +CONFIG_TOUCHSCREEN_WACOM_I2C=m CONFIG_TOUCHSCREEN_MAX11801=m CONFIG_TOUCHSCREEN_MCS5000=m CONFIG_TOUCHSCREEN_MTOUCH=m @@ -2123,6 +2147,7 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_8250_DW is not set +# CONFIG_SERIAL_8250_EM is not set # # Non-8250 serial port support @@ -2146,12 +2171,12 @@ CONFIG_SERIAL_OMAP_CONSOLE=y # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_ATMEL is not set # CONFIG_HW_RANDOM_VIRTIO is not set # CONFIG_NVRAM is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set # CONFIG_TCG_TPM is not set -# CONFIG_RAMOOPS is not set CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y @@ -2232,8 +2257,10 @@ CONFIG_SPI_SPIDEV=y # # Enable Device Drivers -> PPS to see the PTP clock options. # +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y CONFIG_DEBUG_GPIO=y CONFIG_GPIO_SYSFS=y @@ -2241,6 +2268,7 @@ CONFIG_GPIO_SYSFS=y # Memory mapped GPIO drivers: # # CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_EM is not set # # I2C GPIO expanders: @@ -2382,15 +2410,15 @@ CONFIG_SENSORS_PC87427=m CONFIG_SENSORS_PCF8591=m CONFIG_PMBUS=m CONFIG_SENSORS_PMBUS=m -# CONFIG_SENSORS_ADM1275 is not set -# CONFIG_SENSORS_LM25066 is not set -# CONFIG_SENSORS_LTC2978 is not set -# CONFIG_SENSORS_MAX16064 is not set -# CONFIG_SENSORS_MAX34440 is not set -# CONFIG_SENSORS_MAX8688 is not set -# CONFIG_SENSORS_UCD9000 is not set -# CONFIG_SENSORS_UCD9200 is not set -# CONFIG_SENSORS_ZL6100 is not set +CONFIG_SENSORS_ADM1275=m +CONFIG_SENSORS_LM25066=m +CONFIG_SENSORS_LTC2978=m +CONFIG_SENSORS_MAX16064=m +CONFIG_SENSORS_MAX34440=m +CONFIG_SENSORS_MAX8688=m +CONFIG_SENSORS_UCD9000=m +CONFIG_SENSORS_UCD9200=m +CONFIG_SENSORS_ZL6100=m CONFIG_SENSORS_SHT15=m CONFIG_SENSORS_SHT21=m CONFIG_SENSORS_SMM665=m @@ -2408,6 +2436,7 @@ CONFIG_SENSORS_ADS1015=m CONFIG_SENSORS_ADS7828=m CONFIG_SENSORS_ADS7871=m CONFIG_SENSORS_AMC6821=m +CONFIG_SENSORS_INA2XX=m CONFIG_SENSORS_THMC50=m CONFIG_SENSORS_TMP102=m CONFIG_SENSORS_TMP401=m @@ -2472,6 +2501,7 @@ CONFIG_MFD_CORE=y # CONFIG_HTC_EGPIO is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_LM3533 is not set # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set # CONFIG_TPS6507X is not set @@ -2496,6 +2526,7 @@ CONFIG_TWL6040_CORE=y # CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_I2C is not set # CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX77693 is not set # CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_MAX8997 is not set # CONFIG_MFD_MAX8998 is not set @@ -2506,7 +2537,8 @@ CONFIG_TWL6040_CORE=y # CONFIG_MFD_WM8350_I2C is not set # CONFIG_MFD_WM8994 is not set # CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_MC13XXX is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_ABX500_CORE is not set # CONFIG_EZX_PCAP is not set CONFIG_MFD_WL1273_CORE=m @@ -2514,6 +2546,7 @@ CONFIG_MFD_OMAP_USB_HOST=y # CONFIG_MFD_TPS65090 is not set # CONFIG_MFD_AAT2870_CORE is not set # CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_PALMAS is not set CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_DUMMY=y @@ -2597,7 +2630,11 @@ CONFIG_MEDIA_TUNER_MXL5007T=m CONFIG_MEDIA_TUNER_MC44S803=m CONFIG_MEDIA_TUNER_MAX2165=m CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_TUA9001=m CONFIG_VIDEO_V4L2=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_VMALLOC=m @@ -2705,6 +2742,7 @@ CONFIG_VIDEO_THS7303=m CONFIG_VIDEO_M52790=m # CONFIG_VIDEO_VIVI is not set CONFIG_V4L_USB_DRIVERS=y +CONFIG_VIDEO_AU0828=m CONFIG_USB_VIDEO_CLASS=m CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y CONFIG_USB_GSPCA=m @@ -2762,7 +2800,7 @@ CONFIG_VIDEO_HDPVR=m CONFIG_VIDEO_EM28XX=m CONFIG_VIDEO_EM28XX_ALSA=m CONFIG_VIDEO_EM28XX_DVB=m -CONFIG_VIDEO_EM28XX_RC=y +CONFIG_VIDEO_EM28XX_RC=m CONFIG_VIDEO_TLG2300=m CONFIG_VIDEO_CX231XX=m CONFIG_VIDEO_CX231XX_RC=y @@ -2772,7 +2810,6 @@ CONFIG_VIDEO_TM6000=m CONFIG_VIDEO_TM6000_ALSA=m CONFIG_VIDEO_TM6000_DVB=m CONFIG_VIDEO_USBVISION=m -CONFIG_USB_ET61X251=m CONFIG_USB_SN9C102=m CONFIG_USB_PWC=m # CONFIG_USB_PWC_DEBUG is not set @@ -2848,6 +2885,7 @@ CONFIG_DVB_USB_TECHNISAT_USB2=m CONFIG_DVB_USB_IT913X=m CONFIG_DVB_USB_MXL111SF=m CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_AF9035=m CONFIG_SMS_SIANO_MDTV=m # @@ -2958,8 +2996,11 @@ CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LG2160=m CONFIG_DVB_S5H1409=m CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m CONFIG_DVB_S5H1411=m # @@ -2992,6 +3033,7 @@ CONFIG_DVB_TDA665x=m CONFIG_DVB_IX2505V=m CONFIG_DVB_IT913X_FE=m CONFIG_DVB_M88RS2000=m +CONFIG_DVB_AF9033=m # # Tools to develop new frontends @@ -3046,6 +3088,7 @@ CONFIG_FB_UDL=m # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set CONFIG_OMAP2_DSS=y CONFIG_OMAP2_VRAM_SIZE=18 CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y @@ -3054,9 +3097,9 @@ CONFIG_OMAP2_DSS_DPI=y # CONFIG_OMAP2_DSS_RFBI is not set CONFIG_OMAP2_DSS_VENC=y CONFIG_OMAP4_DSS_HDMI=y +CONFIG_OMAP4_DSS_HDMI_AUDIO=y CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_DSI=y -CONFIG_OMAP2_DSS_FAKE_VSYNC=y CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y # CONFIG_FB_OMAP2 is not set @@ -3065,7 +3108,7 @@ CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y # OMAP2/3 Display Device Drivers # CONFIG_PANEL_GENERIC_DPI=y -CONFIG_PANEL_DVI=y +CONFIG_PANEL_TFP410=y CONFIG_PANEL_LGPHILIPS_LB035Q02=y CONFIG_PANEL_SHARP_LS037V7DW01=y CONFIG_PANEL_NEC_NL8048HL11_01B=y @@ -3166,13 +3209,14 @@ CONFIG_SND_OMAP_SOC=m CONFIG_SND_OMAP_SOC_DMIC=m CONFIG_SND_OMAP_SOC_MCBSP=m CONFIG_SND_OMAP_SOC_MCPDM=m +CONFIG_SND_OMAP_SOC_HDMI=m CONFIG_SND_OMAP_SOC_RX51=m CONFIG_SND_OMAP_SOC_OVERO=m CONFIG_SND_OMAP_SOC_OMAP3EVM=m CONFIG_SND_OMAP_SOC_AM3517EVM=m CONFIG_SND_OMAP_SOC_SDP3430=m CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m -# CONFIG_SND_OMAP_SOC_OMAP4_HDMI is not set +CONFIG_SND_OMAP_SOC_OMAP_HDMI=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=m CONFIG_SND_OMAP_SOC_ZOOM2=m @@ -3180,11 +3224,13 @@ CONFIG_SND_OMAP_SOC_IGEP0020=m CONFIG_SND_SOC_I2C_AND_SPI=m # CONFIG_SND_SOC_ALL_CODECS is not set CONFIG_SND_SOC_DMIC=m +CONFIG_SND_SOC_OMAP_HDMI_CODEC=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC3X=m CONFIG_SND_SOC_TWL4030=m CONFIG_SND_SOC_TWL6040=m CONFIG_SND_SOC_TPA6130A2=m +# CONFIG_SND_SIMPLE_CARD is not set # CONFIG_SOUND_PRIME is not set CONFIG_HID_SUPPORT=y CONFIG_HID=y @@ -3194,23 +3240,19 @@ CONFIG_HIDRAW=y # # USB Input Devices # -CONFIG_USB_HID=m +CONFIG_USB_HID=y CONFIG_HID_PID=y CONFIG_USB_HIDDEV=y -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set - # # Special HID drivers # +CONFIG_HID_GENERIC=y CONFIG_HID_A4TECH=m CONFIG_HID_ACRUX=m CONFIG_HID_ACRUX_FF=y CONFIG_HID_APPLE=m +CONFIG_HID_AUREAL=m CONFIG_HID_BELKIN=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m @@ -3267,7 +3309,6 @@ CONFIG_HID_TOPSEED=m CONFIG_HID_THRUSTMASTER=m CONFIG_THRUSTMASTER_FF=y CONFIG_HID_WACOM=m -CONFIG_HID_WACOM_POWER_SUPPLY=y CONFIG_HID_WIIMOTE=m CONFIG_HID_WIIMOTE_EXT=y CONFIG_HID_ZEROPLUS=m @@ -3286,8 +3327,6 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # # Miscellaneous USB options # -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y # CONFIG_USB_DYNAMIC_MINORS is not set CONFIG_USB_SUSPEND=y CONFIG_USB_OTG=y @@ -3314,12 +3353,14 @@ CONFIG_USB_EHCI_HCD_OMAP=y # CONFIG_USB_U132_HCD is not set # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HCD_SSB is not set CONFIG_USB_MUSB_HDRC=y # CONFIG_USB_MUSB_TUSB6010 is not set CONFIG_USB_MUSB_OMAP2PLUS=y # CONFIG_USB_MUSB_AM35X is not set CONFIG_USB_INVENTRA_DMA=y # CONFIG_MUSB_PIO_ONLY is not set +# CONFIG_USB_CHIPIDEA is not set # CONFIG_USB_RENESAS_USBHS is not set # @@ -3431,6 +3472,7 @@ CONFIG_USB_SERIAL_OPTICON=m CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m CONFIG_USB_SERIAL_ZIO=m CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m CONFIG_USB_SERIAL_DEBUG=m # @@ -3457,6 +3499,11 @@ CONFIG_USB_IOWARRIOR=m CONFIG_USB_TEST=m CONFIG_USB_ISIGHTFW=m CONFIG_USB_YUREX=m + +# +# USB Physical Layer drivers +# +CONFIG_USB_ISP1301=m CONFIG_USB_ATM=m CONFIG_USB_SPEEDTOUCH=m CONFIG_USB_CXACRU=m @@ -3468,6 +3515,10 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# # CONFIG_USB_FUSB300 is not set CONFIG_USB_OMAP=y # CONFIG_USB_R8A66597 is not set @@ -3570,6 +3621,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=m # # iptables trigger is under Netfilter config (LED target) # +# CONFIG_LEDS_TRIGGER_TRANSIENT is not set # CONFIG_ACCESSIBILITY is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y @@ -3673,9 +3725,7 @@ CONFIG_R8712U=m # CONFIG_TRANZPORT is not set # CONFIG_LINE6_USB is not set # CONFIG_USB_SERIAL_QUATECH2 is not set -# CONFIG_USB_SERIAL_QUATECH_USB2 is not set # CONFIG_VT6656 is not set -# CONFIG_IIO is not set # CONFIG_FB_SM7XX is not set CONFIG_TIDSPBRIDGE=m CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE=0x600000 @@ -3716,18 +3766,14 @@ CONFIG_ANDROID=y CONFIG_ANDROID_BINDER_IPC=y CONFIG_ASHMEM=y CONFIG_ANDROID_LOGGER=m -CONFIG_ANDROID_PERSISTENT_RAM=y -CONFIG_ANDROID_RAM_CONSOLE=y CONFIG_ANDROID_TIMED_OUTPUT=y CONFIG_ANDROID_TIMED_GPIO=m CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_ANDROID_SWITCH=m -CONFIG_ANDROID_SWITCH_GPIO=m -CONFIG_ANDROID_INTF_ALARM=y CONFIG_ANDROID_INTF_ALARM_DEV=y -CONFIG_ANDROID_ALARM_OLDDRV_COMPAT=y CONFIG_PHONE=m # CONFIG_USB_WPAN_HCD is not set +# CONFIG_IPACK_BUS is not set +# CONFIG_WIMAX_GDM72XX is not set CONFIG_CLKDEV_LOOKUP=y CONFIG_HWSPINLOCK=m @@ -3766,6 +3812,9 @@ CONFIG_DEVFREQ_GOV_USERSPACE=y # # DEVFREQ Drivers # +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set # # File systems @@ -3910,11 +3959,9 @@ CONFIG_JFFS2_CMODE_PRIORITY=y # CONFIG_JFFS2_CMODE_SIZE is not set # CONFIG_JFFS2_CMODE_FAVOURLZO is not set CONFIG_UBIFS_FS=m -CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_FS_DEBUG is not set CONFIG_LOGFS=m CONFIG_CRAMFS=m CONFIG_SQUASHFS=m @@ -3942,6 +3989,7 @@ CONFIG_SYSV_FS=m # CONFIG_UFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y +CONFIG_NFS_V2=y CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y @@ -4031,6 +4079,17 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m CONFIG_NLS_UTF8=m CONFIG_DLM=m # CONFIG_DLM_DEBUG is not set @@ -4045,6 +4104,7 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 CONFIG_MAGIC_SYSRQ=y # CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set CONFIG_UNUSED_SYMBOLS=y CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set @@ -4126,6 +4186,7 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_STACK_TRACER is not set # CONFIG_BLK_DEV_IO_TRACE is not set CONFIG_KPROBE_EVENT=y +CONFIG_PROBE_EVENTS=y # CONFIG_RING_BUFFER_BENCHMARK is not set # CONFIG_DYNAMIC_DEBUG is not set # CONFIG_DMA_API_DEBUG is not set @@ -4345,10 +4406,10 @@ CONFIG_DECOMPRESS_BZIP2=y CONFIG_DECOMPRESS_LZMA=y CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZO=y -CONFIG_REED_SOLOMON=y -CONFIG_REED_SOLOMON_ENC8=y -CONFIG_REED_SOLOMON_DEC8=y +CONFIG_REED_SOLOMON=m CONFIG_REED_SOLOMON_DEC16=y +CONFIG_BCH=y +CONFIG_BCH_CONST_PARAMS=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m @@ -4363,3 +4424,4 @@ CONFIG_NLATTR=y CONFIG_LRU_CACHE=m CONFIG_AVERAGE=y # CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/patches/drm/0001-omap2-add-drm-device.patch b/patches/drm/0001-omap2-add-drm-device.patch index 73984d458..cb2f9ffe0 100644 --- a/patches/drm/0001-omap2-add-drm-device.patch +++ b/patches/drm/0001-omap2-add-drm-device.patch @@ -1,4 +1,4 @@ -From b953d0b39bc1885b4b1477d71698cca03995bba2 Mon Sep 17 00:00:00 2001 +From e639aa46a74fa08a0d13640c227e695c91fccf0a Mon Sep 17 00:00:00 2001 From: Andy Gross <andy.gross@ti.com> Date: Tue, 13 Mar 2012 15:34:38 -0500 Subject: [PATCH 1/4] omap2+: add drm device @@ -19,12 +19,12 @@ Signed-off-by: Rob Clark <rob@ti.com> create mode 100644 arch/arm/plat-omap/include/plat/drm.h diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile -index 49f92bc..c301ab7 100644 +index fa742f3..a636cdc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile -@@ -187,6 +187,10 @@ ifneq ($(CONFIG_TIDSPBRIDGE),) - obj-y += dsp.o - endif +@@ -189,6 +189,10 @@ endif + # OMAP2420 MSDI controller integration support ("MMC") + obj-$(CONFIG_SOC_OMAP2420) += msdi.o +ifneq ($(CONFIG_DRM_OMAP),) +obj-y += drm.o @@ -123,13 +123,13 @@ index 0000000..779ae02 + +#endif diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c -index f1e46ea..20fbf2a 100644 +index 0a9b9a9..ba693a7 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c -@@ -20,10 +20,10 @@ - #include <plat/board.h> +@@ -21,10 +21,10 @@ #include <plat/vram.h> #include <plat/dsp.h> + #include <plat/dma.h> +#include <plat/drm.h> #include <plat/omap-secure.h> @@ -138,7 +138,7 @@ index f1e46ea..20fbf2a 100644 #define NO_LENGTH_CHECK 0xffffffff struct omap_board_config_kernel *omap_board_config __initdata; -@@ -64,6 +64,7 @@ const void *__init omap_get_var_config(u16 tag, size_t *len) +@@ -65,6 +65,7 @@ const void *__init omap_get_var_config(u16 tag, size_t *len) void __init omap_reserve(void) { diff --git a/patches/drm/cma/0001-mm-page_alloc-remove-trailing-whitespace.patch b/patches/drm/cma/0001-mm-page_alloc-remove-trailing-whitespace.patch deleted file mode 100644 index ff04c018e..000000000 --- a/patches/drm/cma/0001-mm-page_alloc-remove-trailing-whitespace.patch +++ /dev/null @@ -1,63 +0,0 @@ -From ff409dd80e3058c6da167def2751345f77716b59 Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Wed, 11 Jan 2012 15:16:11 +0100 -Subject: [PATCH 01/16] mm: page_alloc: remove trailing whitespace - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> ---- - mm/page_alloc.c | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index a712fb9..0922308 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -513,10 +513,10 @@ static inline int page_is_buddy(struct page *page, struct page *buddy, - * free pages of length of (1 << order) and marked with _mapcount -2. Page's - * order is recorded in page_private(page) field. - * So when we are allocating or freeing one, we can derive the state of the -- * other. That is, if we allocate a small block, and both were -- * free, the remainder of the region must be split into blocks. -+ * other. That is, if we allocate a small block, and both were -+ * free, the remainder of the region must be split into blocks. - * If a block is freed, and its buddy is also free, then this -- * triggers coalescing into a block of larger size. -+ * triggers coalescing into a block of larger size. - * - * -- wli - */ -@@ -1061,17 +1061,17 @@ retry_reserve: - return page; - } - --/* -+/* - * Obtain a specified number of elements from the buddy allocator, all under - * a single hold of the lock, for efficiency. Add them to the supplied list. - * Returns the number of new pages which were placed at *list. - */ --static int rmqueue_bulk(struct zone *zone, unsigned int order, -+static int rmqueue_bulk(struct zone *zone, unsigned int order, - unsigned long count, struct list_head *list, - int migratetype, int cold) - { - int i; -- -+ - spin_lock(&zone->lock); - for (i = 0; i < count; ++i) { - struct page *page = __rmqueue(zone, order, migratetype); -@@ -4301,7 +4301,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, - init_waitqueue_head(&pgdat->kswapd_wait); - pgdat->kswapd_max_order = 0; - pgdat_page_cgroup_init(pgdat); -- -+ - for (j = 0; j < MAX_NR_ZONES; j++) { - struct zone *zone = pgdat->node_zones + j; - unsigned long size, realsize, memmap_pages; --- -1.7.9.1 - diff --git a/patches/drm/cma/0002-mm-compaction-introduce-isolate_migratepages_range.patch b/patches/drm/cma/0002-mm-compaction-introduce-isolate_migratepages_range.patch deleted file mode 100644 index f69bb4cf0..000000000 --- a/patches/drm/cma/0002-mm-compaction-introduce-isolate_migratepages_range.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 1ddafc304f4b57aee2f75859ea62814cfe7395c6 Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Mon, 30 Jan 2012 13:16:26 +0100 -Subject: [PATCH 02/16] mm: compaction: introduce isolate_migratepages_range() - -This commit introduces isolate_migratepages_range() function which -extracts functionality from isolate_migratepages() so that it can be -used on arbitrary PFN ranges. - -isolate_migratepages() function is implemented as a simple wrapper -around isolate_migratepages_range(). - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/compaction.c | 75 +++++++++++++++++++++++++++++++++++++++--------------- - 1 files changed, 54 insertions(+), 21 deletions(-) - -diff --git a/mm/compaction.c b/mm/compaction.c -index 74a8c82..ee20fc0 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -250,31 +250,34 @@ typedef enum { - ISOLATE_SUCCESS, /* Pages isolated, migrate */ - } isolate_migrate_t; - --/* -- * Isolate all pages that can be migrated from the block pointed to by -- * the migrate scanner within compact_control. -+/** -+ * isolate_migratepages_range() - isolate all migrate-able pages in range. -+ * @zone: Zone pages are in. -+ * @cc: Compaction control structure. -+ * @low_pfn: The first PFN of the range. -+ * @end_pfn: The one-past-the-last PFN of the range. -+ * -+ * Isolate all pages that can be migrated from the range specified by -+ * [low_pfn, end_pfn). Returns zero if there is a fatal signal -+ * pending), otherwise PFN of the first page that was not scanned -+ * (which may be both less, equal to or more then end_pfn). -+ * -+ * Assumes that cc->migratepages is empty and cc->nr_migratepages is -+ * zero. -+ * -+ * Apart from cc->migratepages and cc->nr_migratetypes this function -+ * does not modify any cc's fields, in particular it does not modify -+ * (or read for that matter) cc->migrate_pfn. - */ --static isolate_migrate_t isolate_migratepages(struct zone *zone, -- struct compact_control *cc) -+static unsigned long -+isolate_migratepages_range(struct zone *zone, struct compact_control *cc, -+ unsigned long low_pfn, unsigned long end_pfn) - { -- unsigned long low_pfn, end_pfn; - unsigned long last_pageblock_nr = 0, pageblock_nr; - unsigned long nr_scanned = 0, nr_isolated = 0; - struct list_head *migratelist = &cc->migratepages; - isolate_mode_t mode = ISOLATE_ACTIVE|ISOLATE_INACTIVE; - -- /* Do not scan outside zone boundaries */ -- low_pfn = max(cc->migrate_pfn, zone->zone_start_pfn); -- -- /* Only scan within a pageblock boundary */ -- end_pfn = ALIGN(low_pfn + pageblock_nr_pages, pageblock_nr_pages); -- -- /* Do not cross the free scanner or scan within a memory hole */ -- if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) { -- cc->migrate_pfn = end_pfn; -- return ISOLATE_NONE; -- } -- - /* - * Ensure that there are not too many pages isolated from the LRU - * list by either parallel reclaimers or compaction. If there are, -@@ -283,12 +286,12 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, - while (unlikely(too_many_isolated(zone))) { - /* async migration should just abort */ - if (!cc->sync) -- return ISOLATE_ABORT; -+ return 0; - - congestion_wait(BLK_RW_ASYNC, HZ/10); - - if (fatal_signal_pending(current)) -- return ISOLATE_ABORT; -+ return 0; - } - - /* Time to isolate some pages for migration */ -@@ -396,10 +399,40 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, - acct_isolated(zone, cc); - - spin_unlock_irq(&zone->lru_lock); -- cc->migrate_pfn = low_pfn; - - trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated); - -+ return low_pfn; -+} -+ -+/* -+ * Isolate all pages that can be migrated from the block pointed to by -+ * the migrate scanner within compact_control. -+ */ -+static isolate_migrate_t isolate_migratepages(struct zone *zone, -+ struct compact_control *cc) -+{ -+ unsigned long low_pfn, end_pfn; -+ -+ /* Do not scan outside zone boundaries */ -+ low_pfn = max(cc->migrate_pfn, zone->zone_start_pfn); -+ -+ /* Only scan within a pageblock boundary */ -+ end_pfn = ALIGN(low_pfn + pageblock_nr_pages, pageblock_nr_pages); -+ -+ /* Do not cross the free scanner or scan within a memory hole */ -+ if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) { -+ cc->migrate_pfn = end_pfn; -+ return ISOLATE_NONE; -+ } -+ -+ /* Perform the isolation */ -+ low_pfn = isolate_migratepages_range(zone, cc, low_pfn, end_pfn); -+ if (!low_pfn) -+ return ISOLATE_ABORT; -+ -+ cc->migrate_pfn = low_pfn; -+ - return ISOLATE_SUCCESS; - } - --- -1.7.9.1 - diff --git a/patches/drm/cma/0003-mm-compaction-introduce-map_pages.patch b/patches/drm/cma/0003-mm-compaction-introduce-map_pages.patch deleted file mode 100644 index cc4c33e7c..000000000 --- a/patches/drm/cma/0003-mm-compaction-introduce-map_pages.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 05b74d3a3b4ba1b36d5b1f36bc8decb2079bd9c5 Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Mon, 30 Jan 2012 13:23:47 +0100 -Subject: [PATCH 03/16] mm: compaction: introduce map_pages() - -This commit creates a map_pages() function which map pages freed -using split_free_pages(). This merely moves some code from -isolate_freepages() so that it can be reused in other places. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/compaction.c | 15 +++++++++++---- - 1 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/mm/compaction.c b/mm/compaction.c -index ee20fc0..d9d7b35 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -127,6 +127,16 @@ static bool suitable_migration_target(struct page *page) - return false; - } - -+static void map_pages(struct list_head *list) -+{ -+ struct page *page; -+ -+ list_for_each_entry(page, list, lru) { -+ arch_alloc_page(page, 0); -+ kernel_map_pages(page, 1, 1); -+ } -+} -+ - /* - * Based on information in the current compact_control, find blocks - * suitable for isolating free pages from and then isolate them. -@@ -206,10 +216,7 @@ static void isolate_freepages(struct zone *zone, - } - - /* split_free_page does not map the pages */ -- list_for_each_entry(page, freelist, lru) { -- arch_alloc_page(page, 0); -- kernel_map_pages(page, 1, 1); -- } -+ map_pages(freelist); - - cc->free_pfn = high_pfn; - cc->nr_freepages = nr_freepages; --- -1.7.9.1 - diff --git a/patches/drm/cma/0004-mm-compaction-introduce-isolate_freepages_range.patch b/patches/drm/cma/0004-mm-compaction-introduce-isolate_freepages_range.patch deleted file mode 100644 index d83af7be8..000000000 --- a/patches/drm/cma/0004-mm-compaction-introduce-isolate_freepages_range.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 509c7c1553d6ff5b35f0205afdece195bbc7bbfd Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Mon, 30 Jan 2012 13:24:03 +0100 -Subject: [PATCH 04/16] mm: compaction: introduce isolate_freepages_range() - -This commit introduces isolate_freepages_range() function which -generalises isolate_freepages_block() so that it can be used on -arbitrary PFN ranges. - -isolate_freepages_block() is left with only minor changes. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/compaction.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++--------- - 1 files changed, 93 insertions(+), 18 deletions(-) - -diff --git a/mm/compaction.c b/mm/compaction.c -index d9d7b35..06b198f 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -54,24 +54,20 @@ static unsigned long release_freepages(struct list_head *freelist) - return count; - } - --/* Isolate free pages onto a private freelist. Must hold zone->lock */ --static unsigned long isolate_freepages_block(struct zone *zone, -- unsigned long blockpfn, -- struct list_head *freelist) -+/* -+ * Isolate free pages onto a private freelist. Caller must hold zone->lock. -+ * If @strict is true, will abort returning 0 on any invalid PFNs or non-free -+ * pages inside of the pageblock (even though it may still end up isolating -+ * some pages). -+ */ -+static unsigned long isolate_freepages_block(unsigned long blockpfn, -+ unsigned long end_pfn, -+ struct list_head *freelist, -+ bool strict) - { -- unsigned long zone_end_pfn, end_pfn; - int nr_scanned = 0, total_isolated = 0; - struct page *cursor; - -- /* Get the last PFN we should scan for free pages at */ -- zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages; -- end_pfn = min(blockpfn + pageblock_nr_pages, zone_end_pfn); -- -- /* Find the first usable PFN in the block to initialse page cursor */ -- for (; blockpfn < end_pfn; blockpfn++) { -- if (pfn_valid_within(blockpfn)) -- break; -- } - cursor = pfn_to_page(blockpfn); - - /* Isolate free pages. This assumes the block is valid */ -@@ -79,15 +75,23 @@ static unsigned long isolate_freepages_block(struct zone *zone, - int isolated, i; - struct page *page = cursor; - -- if (!pfn_valid_within(blockpfn)) -+ if (!pfn_valid_within(blockpfn)) { -+ if (strict) -+ return 0; - continue; -+ } - nr_scanned++; - -- if (!PageBuddy(page)) -+ if (!PageBuddy(page)) { -+ if (strict) -+ return 0; - continue; -+ } - - /* Found a free page, break it into order-0 pages */ - isolated = split_free_page(page); -+ if (!isolated && strict) -+ return 0; - total_isolated += isolated; - for (i = 0; i < isolated; i++) { - list_add(&page->lru, freelist); -@@ -105,6 +109,73 @@ static unsigned long isolate_freepages_block(struct zone *zone, - return total_isolated; - } - -+/** -+ * isolate_freepages_range() - isolate free pages. -+ * @start_pfn: The first PFN to start isolating. -+ * @end_pfn: The one-past-last PFN. -+ * -+ * Non-free pages, invalid PFNs, or zone boundaries within the -+ * [start_pfn, end_pfn) range are considered errors, cause function to -+ * undo its actions and return zero. -+ * -+ * Otherwise, function returns one-past-the-last PFN of isolated page -+ * (which may be greater then end_pfn if end fell in a middle of -+ * a free page). -+ */ -+static unsigned long -+isolate_freepages_range(unsigned long start_pfn, unsigned long end_pfn) -+{ -+ unsigned long isolated, pfn, block_end_pfn, flags; -+ struct zone *zone = NULL; -+ LIST_HEAD(freelist); -+ -+ if (pfn_valid(start_pfn)) -+ zone = page_zone(pfn_to_page(start_pfn)); -+ -+ for (pfn = start_pfn; pfn < end_pfn; pfn += isolated) { -+ if (!pfn_valid(pfn) || zone != page_zone(pfn_to_page(pfn))) -+ break; -+ -+ /* -+ * On subsequent iterations ALIGN() is actually not needed, -+ * but we keep it that we not to complicate the code. -+ */ -+ block_end_pfn = ALIGN(pfn + 1, pageblock_nr_pages); -+ block_end_pfn = min(block_end_pfn, end_pfn); -+ -+ spin_lock_irqsave(&zone->lock, flags); -+ isolated = isolate_freepages_block(pfn, block_end_pfn, -+ &freelist, true); -+ spin_unlock_irqrestore(&zone->lock, flags); -+ -+ /* -+ * In strict mode, isolate_freepages_block() returns 0 if -+ * there are any holes in the block (ie. invalid PFNs or -+ * non-free pages). -+ */ -+ if (!isolated) -+ break; -+ -+ /* -+ * If we managed to isolate pages, it is always (1 << n) * -+ * pageblock_nr_pages for some non-negative n. (Max order -+ * page may span two pageblocks). -+ */ -+ } -+ -+ /* split_free_page does not map the pages */ -+ map_pages(&freelist); -+ -+ if (pfn < end_pfn) { -+ /* Loop terminated early, cleanup. */ -+ release_freepages(&freelist); -+ return 0; -+ } -+ -+ /* We don't use freelists for anything. */ -+ return pfn; -+} -+ - /* Returns true if the page is within a block suitable for migration to */ - static bool suitable_migration_target(struct page *page) - { -@@ -145,7 +216,7 @@ static void isolate_freepages(struct zone *zone, - struct compact_control *cc) - { - struct page *page; -- unsigned long high_pfn, low_pfn, pfn; -+ unsigned long high_pfn, low_pfn, pfn, zone_end_pfn, end_pfn; - unsigned long flags; - int nr_freepages = cc->nr_freepages; - struct list_head *freelist = &cc->freepages; -@@ -165,6 +236,8 @@ static void isolate_freepages(struct zone *zone, - */ - high_pfn = min(low_pfn, pfn); - -+ zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages; -+ - /* - * Isolate free pages until enough are available to migrate the - * pages on cc->migratepages. We stop searching if the migrate -@@ -201,7 +274,9 @@ static void isolate_freepages(struct zone *zone, - isolated = 0; - spin_lock_irqsave(&zone->lock, flags); - if (suitable_migration_target(page)) { -- isolated = isolate_freepages_block(zone, pfn, freelist); -+ end_pfn = min(pfn + pageblock_nr_pages, zone_end_pfn); -+ isolated = isolate_freepages_block(pfn, end_pfn, -+ freelist, false); - nr_freepages += isolated; - } - spin_unlock_irqrestore(&zone->lock, flags); --- -1.7.9.1 - diff --git a/patches/drm/cma/0005-mm-compaction-export-some-of-the-functions.patch b/patches/drm/cma/0005-mm-compaction-export-some-of-the-functions.patch deleted file mode 100644 index 6d24b7696..000000000 --- a/patches/drm/cma/0005-mm-compaction-export-some-of-the-functions.patch +++ /dev/null @@ -1,501 +0,0 @@ -From dce943def1194b443c81c3a7d5e334db9f4f4471 Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Thu, 29 Dec 2011 13:09:50 +0100 -Subject: [PATCH 05/16] mm: compaction: export some of the functions - -This commit exports some of the functions from compaction.c file -outside of it adding their declaration into internal.h header -file so that other mm related code can use them. - -This forced compaction.c to always be compiled (as opposed to being -compiled only if CONFIG_COMPACTION is defined) but as to avoid -introducing code that user did not ask for, part of the compaction.c -is now wrapped in on #ifdef. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/Makefile | 3 +- - mm/compaction.c | 328 ++++++++++++++++++++++++++----------------------------- - mm/internal.h | 33 ++++++ - 3 files changed, 191 insertions(+), 173 deletions(-) - -diff --git a/mm/Makefile b/mm/Makefile -index 50ec00e..8aada89 100644 ---- a/mm/Makefile -+++ b/mm/Makefile -@@ -13,7 +13,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ - readahead.o swap.o truncate.o vmscan.o shmem.o \ - prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \ - page_isolation.o mm_init.o mmu_context.o percpu.o \ -- $(mmu-y) -+ compaction.o $(mmu-y) - obj-y += init-mm.o - - ifdef CONFIG_NO_BOOTMEM -@@ -32,7 +32,6 @@ obj-$(CONFIG_NUMA) += mempolicy.o - obj-$(CONFIG_SPARSEMEM) += sparse.o - obj-$(CONFIG_SPARSEMEM_VMEMMAP) += sparse-vmemmap.o - obj-$(CONFIG_SLOB) += slob.o --obj-$(CONFIG_COMPACTION) += compaction.o - obj-$(CONFIG_MMU_NOTIFIER) += mmu_notifier.o - obj-$(CONFIG_KSM) += ksm.o - obj-$(CONFIG_PAGE_POISONING) += debug-pagealloc.o -diff --git a/mm/compaction.c b/mm/compaction.c -index 06b198f..7a92e41 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -16,30 +16,11 @@ - #include <linux/sysfs.h> - #include "internal.h" - -+#if defined CONFIG_COMPACTION || defined CONFIG_CMA -+ - #define CREATE_TRACE_POINTS - #include <trace/events/compaction.h> - --/* -- * compact_control is used to track pages being migrated and the free pages -- * they are being migrated to during memory compaction. The free_pfn starts -- * at the end of a zone and migrate_pfn begins at the start. Movable pages -- * are moved to the end of a zone during a compaction run and the run -- * completes when free_pfn <= migrate_pfn -- */ --struct compact_control { -- struct list_head freepages; /* List of free pages to migrate to */ -- struct list_head migratepages; /* List of pages being migrated */ -- unsigned long nr_freepages; /* Number of isolated free pages */ -- unsigned long nr_migratepages; /* Number of pages to migrate */ -- unsigned long free_pfn; /* isolate_freepages search base */ -- unsigned long migrate_pfn; /* isolate_migratepages search base */ -- bool sync; /* Synchronous migration */ -- -- int order; /* order a direct compactor needs */ -- int migratetype; /* MOVABLE, RECLAIMABLE etc */ -- struct zone *zone; --}; -- - static unsigned long release_freepages(struct list_head *freelist) - { - struct page *page, *next; -@@ -54,6 +35,16 @@ static unsigned long release_freepages(struct list_head *freelist) - return count; - } - -+static void map_pages(struct list_head *list) -+{ -+ struct page *page; -+ -+ list_for_each_entry(page, list, lru) { -+ arch_alloc_page(page, 0); -+ kernel_map_pages(page, 1, 1); -+ } -+} -+ - /* - * Isolate free pages onto a private freelist. Caller must hold zone->lock. - * If @strict is true, will abort returning 0 on any invalid PFNs or non-free -@@ -122,7 +113,7 @@ static unsigned long isolate_freepages_block(unsigned long blockpfn, - * (which may be greater then end_pfn if end fell in a middle of - * a free page). - */ --static unsigned long -+unsigned long - isolate_freepages_range(unsigned long start_pfn, unsigned long end_pfn) - { - unsigned long isolated, pfn, block_end_pfn, flags; -@@ -176,127 +167,6 @@ isolate_freepages_range(unsigned long start_pfn, unsigned long end_pfn) - return pfn; - } - --/* Returns true if the page is within a block suitable for migration to */ --static bool suitable_migration_target(struct page *page) --{ -- -- int migratetype = get_pageblock_migratetype(page); -- -- /* Don't interfere with memory hot-remove or the min_free_kbytes blocks */ -- if (migratetype == MIGRATE_ISOLATE || migratetype == MIGRATE_RESERVE) -- return false; -- -- /* If the page is a large free page, then allow migration */ -- if (PageBuddy(page) && page_order(page) >= pageblock_order) -- return true; -- -- /* If the block is MIGRATE_MOVABLE, allow migration */ -- if (migratetype == MIGRATE_MOVABLE) -- return true; -- -- /* Otherwise skip the block */ -- return false; --} -- --static void map_pages(struct list_head *list) --{ -- struct page *page; -- -- list_for_each_entry(page, list, lru) { -- arch_alloc_page(page, 0); -- kernel_map_pages(page, 1, 1); -- } --} -- --/* -- * Based on information in the current compact_control, find blocks -- * suitable for isolating free pages from and then isolate them. -- */ --static void isolate_freepages(struct zone *zone, -- struct compact_control *cc) --{ -- struct page *page; -- unsigned long high_pfn, low_pfn, pfn, zone_end_pfn, end_pfn; -- unsigned long flags; -- int nr_freepages = cc->nr_freepages; -- struct list_head *freelist = &cc->freepages; -- -- /* -- * Initialise the free scanner. The starting point is where we last -- * scanned from (or the end of the zone if starting). The low point -- * is the end of the pageblock the migration scanner is using. -- */ -- pfn = cc->free_pfn; -- low_pfn = cc->migrate_pfn + pageblock_nr_pages; -- -- /* -- * Take care that if the migration scanner is at the end of the zone -- * that the free scanner does not accidentally move to the next zone -- * in the next isolation cycle. -- */ -- high_pfn = min(low_pfn, pfn); -- -- zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages; -- -- /* -- * Isolate free pages until enough are available to migrate the -- * pages on cc->migratepages. We stop searching if the migrate -- * and free page scanners meet or enough free pages are isolated. -- */ -- for (; pfn > low_pfn && cc->nr_migratepages > nr_freepages; -- pfn -= pageblock_nr_pages) { -- unsigned long isolated; -- -- if (!pfn_valid(pfn)) -- continue; -- -- /* -- * Check for overlapping nodes/zones. It's possible on some -- * configurations to have a setup like -- * node0 node1 node0 -- * i.e. it's possible that all pages within a zones range of -- * pages do not belong to a single zone. -- */ -- page = pfn_to_page(pfn); -- if (page_zone(page) != zone) -- continue; -- -- /* Check the block is suitable for migration */ -- if (!suitable_migration_target(page)) -- continue; -- -- /* -- * Found a block suitable for isolating free pages from. Now -- * we disabled interrupts, double check things are ok and -- * isolate the pages. This is to minimise the time IRQs -- * are disabled -- */ -- isolated = 0; -- spin_lock_irqsave(&zone->lock, flags); -- if (suitable_migration_target(page)) { -- end_pfn = min(pfn + pageblock_nr_pages, zone_end_pfn); -- isolated = isolate_freepages_block(pfn, end_pfn, -- freelist, false); -- nr_freepages += isolated; -- } -- spin_unlock_irqrestore(&zone->lock, flags); -- -- /* -- * Record the highest PFN we isolated pages from. When next -- * looking for free pages, the search will restart here as -- * page migration may have returned some pages to the allocator -- */ -- if (isolated) -- high_pfn = max(high_pfn, pfn); -- } -- -- /* split_free_page does not map the pages */ -- map_pages(freelist); -- -- cc->free_pfn = high_pfn; -- cc->nr_freepages = nr_freepages; --} -- - /* Update the number of anon and file isolated pages in the zone */ - static void acct_isolated(struct zone *zone, struct compact_control *cc) - { -@@ -325,13 +195,6 @@ static bool too_many_isolated(struct zone *zone) - return isolated > (inactive + active) / 2; - } - --/* possible outcome of isolate_migratepages */ --typedef enum { -- ISOLATE_ABORT, /* Abort compaction now */ -- ISOLATE_NONE, /* No pages isolated, continue scanning */ -- ISOLATE_SUCCESS, /* Pages isolated, migrate */ --} isolate_migrate_t; -- - /** - * isolate_migratepages_range() - isolate all migrate-able pages in range. - * @zone: Zone pages are in. -@@ -351,7 +214,7 @@ typedef enum { - * does not modify any cc's fields, in particular it does not modify - * (or read for that matter) cc->migrate_pfn. - */ --static unsigned long -+unsigned long - isolate_migratepages_range(struct zone *zone, struct compact_control *cc, - unsigned long low_pfn, unsigned long end_pfn) - { -@@ -487,35 +350,118 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, - return low_pfn; - } - -+#endif /* CONFIG_COMPACTION || CONFIG_CMA */ -+#ifdef CONFIG_COMPACTION -+ -+/* Returns true if the page is within a block suitable for migration to */ -+static bool suitable_migration_target(struct page *page) -+{ -+ -+ int migratetype = get_pageblock_migratetype(page); -+ -+ /* Don't interfere with memory hot-remove or the min_free_kbytes blocks */ -+ if (migratetype == MIGRATE_ISOLATE || migratetype == MIGRATE_RESERVE) -+ return false; -+ -+ /* If the page is a large free page, then allow migration */ -+ if (PageBuddy(page) && page_order(page) >= pageblock_order) -+ return true; -+ -+ /* If the block is MIGRATE_MOVABLE, allow migration */ -+ if (migratetype == MIGRATE_MOVABLE) -+ return true; -+ -+ /* Otherwise skip the block */ -+ return false; -+} -+ - /* -- * Isolate all pages that can be migrated from the block pointed to by -- * the migrate scanner within compact_control. -+ * Based on information in the current compact_control, find blocks -+ * suitable for isolating free pages from and then isolate them. - */ --static isolate_migrate_t isolate_migratepages(struct zone *zone, -- struct compact_control *cc) -+static void isolate_freepages(struct zone *zone, -+ struct compact_control *cc) - { -- unsigned long low_pfn, end_pfn; -+ struct page *page; -+ unsigned long high_pfn, low_pfn, pfn, zone_end_pfn, end_pfn; -+ unsigned long flags; -+ int nr_freepages = cc->nr_freepages; -+ struct list_head *freelist = &cc->freepages; - -- /* Do not scan outside zone boundaries */ -- low_pfn = max(cc->migrate_pfn, zone->zone_start_pfn); -+ /* -+ * Initialise the free scanner. The starting point is where we last -+ * scanned from (or the end of the zone if starting). The low point -+ * is the end of the pageblock the migration scanner is using. -+ */ -+ pfn = cc->free_pfn; -+ low_pfn = cc->migrate_pfn + pageblock_nr_pages; - -- /* Only scan within a pageblock boundary */ -- end_pfn = ALIGN(low_pfn + pageblock_nr_pages, pageblock_nr_pages); -+ /* -+ * Take care that if the migration scanner is at the end of the zone -+ * that the free scanner does not accidentally move to the next zone -+ * in the next isolation cycle. -+ */ -+ high_pfn = min(low_pfn, pfn); - -- /* Do not cross the free scanner or scan within a memory hole */ -- if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) { -- cc->migrate_pfn = end_pfn; -- return ISOLATE_NONE; -- } -+ zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages; - -- /* Perform the isolation */ -- low_pfn = isolate_migratepages_range(zone, cc, low_pfn, end_pfn); -- if (!low_pfn) -- return ISOLATE_ABORT; -+ /* -+ * Isolate free pages until enough are available to migrate the -+ * pages on cc->migratepages. We stop searching if the migrate -+ * and free page scanners meet or enough free pages are isolated. -+ */ -+ for (; pfn > low_pfn && cc->nr_migratepages > nr_freepages; -+ pfn -= pageblock_nr_pages) { -+ unsigned long isolated; - -- cc->migrate_pfn = low_pfn; -+ if (!pfn_valid(pfn)) -+ continue; - -- return ISOLATE_SUCCESS; -+ /* -+ * Check for overlapping nodes/zones. It's possible on some -+ * configurations to have a setup like -+ * node0 node1 node0 -+ * i.e. it's possible that all pages within a zones range of -+ * pages do not belong to a single zone. -+ */ -+ page = pfn_to_page(pfn); -+ if (page_zone(page) != zone) -+ continue; -+ -+ /* Check the block is suitable for migration */ -+ if (!suitable_migration_target(page)) -+ continue; -+ -+ /* -+ * Found a block suitable for isolating free pages from. Now -+ * we disabled interrupts, double check things are ok and -+ * isolate the pages. This is to minimise the time IRQs -+ * are disabled -+ */ -+ isolated = 0; -+ spin_lock_irqsave(&zone->lock, flags); -+ if (suitable_migration_target(page)) { -+ end_pfn = min(pfn + pageblock_nr_pages, zone_end_pfn); -+ isolated = isolate_freepages_block(pfn, end_pfn, -+ freelist, false); -+ nr_freepages += isolated; -+ } -+ spin_unlock_irqrestore(&zone->lock, flags); -+ -+ /* -+ * Record the highest PFN we isolated pages from. When next -+ * looking for free pages, the search will restart here as -+ * page migration may have returned some pages to the allocator -+ */ -+ if (isolated) -+ high_pfn = max(high_pfn, pfn); -+ } -+ -+ /* split_free_page does not map the pages */ -+ map_pages(freelist); -+ -+ cc->free_pfn = high_pfn; -+ cc->nr_freepages = nr_freepages; - } - - /* -@@ -564,6 +510,44 @@ static void update_nr_listpages(struct compact_control *cc) - cc->nr_freepages = nr_freepages; - } - -+/* possible outcome of isolate_migratepages */ -+typedef enum { -+ ISOLATE_ABORT, /* Abort compaction now */ -+ ISOLATE_NONE, /* No pages isolated, continue scanning */ -+ ISOLATE_SUCCESS, /* Pages isolated, migrate */ -+} isolate_migrate_t; -+ -+/* -+ * Isolate all pages that can be migrated from the block pointed to by -+ * the migrate scanner within compact_control. -+ */ -+static isolate_migrate_t isolate_migratepages(struct zone *zone, -+ struct compact_control *cc) -+{ -+ unsigned long low_pfn, end_pfn; -+ -+ /* Do not scan outside zone boundaries */ -+ low_pfn = max(cc->migrate_pfn, zone->zone_start_pfn); -+ -+ /* Only scan within a pageblock boundary */ -+ end_pfn = ALIGN(low_pfn + pageblock_nr_pages, pageblock_nr_pages); -+ -+ /* Do not cross the free scanner or scan within a memory hole */ -+ if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) { -+ cc->migrate_pfn = end_pfn; -+ return ISOLATE_NONE; -+ } -+ -+ /* Perform the isolation */ -+ low_pfn = isolate_migratepages_range(zone, cc, low_pfn, end_pfn); -+ if (!low_pfn) -+ return ISOLATE_ABORT; -+ -+ cc->migrate_pfn = low_pfn; -+ -+ return ISOLATE_SUCCESS; -+} -+ - static int compact_finished(struct zone *zone, - struct compact_control *cc) - { -@@ -910,3 +894,5 @@ void compaction_unregister_node(struct node *node) - return device_remove_file(&node->dev, &dev_attr_compact); - } - #endif /* CONFIG_SYSFS && CONFIG_NUMA */ -+ -+#endif /* CONFIG_COMPACTION */ -diff --git a/mm/internal.h b/mm/internal.h -index 2189af4..aee4761 100644 ---- a/mm/internal.h -+++ b/mm/internal.h -@@ -100,6 +100,39 @@ extern void prep_compound_page(struct page *page, unsigned long order); - extern bool is_free_buddy_page(struct page *page); - #endif - -+#if defined CONFIG_COMPACTION || defined CONFIG_CMA -+ -+/* -+ * in mm/compaction.c -+ */ -+/* -+ * compact_control is used to track pages being migrated and the free pages -+ * they are being migrated to during memory compaction. The free_pfn starts -+ * at the end of a zone and migrate_pfn begins at the start. Movable pages -+ * are moved to the end of a zone during a compaction run and the run -+ * completes when free_pfn <= migrate_pfn -+ */ -+struct compact_control { -+ struct list_head freepages; /* List of free pages to migrate to */ -+ struct list_head migratepages; /* List of pages being migrated */ -+ unsigned long nr_freepages; /* Number of isolated free pages */ -+ unsigned long nr_migratepages; /* Number of pages to migrate */ -+ unsigned long free_pfn; /* isolate_freepages search base */ -+ unsigned long migrate_pfn; /* isolate_migratepages search base */ -+ bool sync; /* Synchronous migration */ -+ -+ int order; /* order a direct compactor needs */ -+ int migratetype; /* MOVABLE, RECLAIMABLE etc */ -+ struct zone *zone; -+}; -+ -+unsigned long -+isolate_freepages_range(unsigned long start_pfn, unsigned long end_pfn); -+unsigned long -+isolate_migratepages_range(struct zone *zone, struct compact_control *cc, -+ unsigned long low_pfn, unsigned long end_pfn); -+ -+#endif - - /* - * function for dealing with page's order in buddy system. --- -1.7.9.1 - diff --git a/patches/drm/cma/0006-mm-page_alloc-introduce-alloc_contig_range.patch b/patches/drm/cma/0006-mm-page_alloc-introduce-alloc_contig_range.patch deleted file mode 100644 index 36eefd82b..000000000 --- a/patches/drm/cma/0006-mm-page_alloc-introduce-alloc_contig_range.patch +++ /dev/null @@ -1,251 +0,0 @@ -From edc90d8934763bce165206899908484f1b3c54a7 Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Thu, 29 Dec 2011 13:09:50 +0100 -Subject: [PATCH 06/16] mm: page_alloc: introduce alloc_contig_range() - -This commit adds the alloc_contig_range() function which tries -to allocate given range of pages. It tries to migrate all -already allocated pages that fall in the range thus freeing them. -Once all pages in the range are freed they are removed from the -buddy system thus allocated for the caller to use. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - include/linux/gfp.h | 8 ++ - mm/page_alloc.c | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 196 insertions(+), 0 deletions(-) - -diff --git a/include/linux/gfp.h b/include/linux/gfp.h -index 581e74b..052a5b6 100644 ---- a/include/linux/gfp.h -+++ b/include/linux/gfp.h -@@ -391,4 +391,12 @@ static inline bool pm_suspended_storage(void) - } - #endif /* CONFIG_PM_SLEEP */ - -+#ifdef CONFIG_CMA -+ -+/* The below functions must be run on a range from a single zone. */ -+extern int alloc_contig_range(unsigned long start, unsigned long end); -+extern void free_contig_range(unsigned long pfn, unsigned nr_pages); -+ -+#endif -+ - #endif /* __LINUX_GFP_H */ -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 0922308..2c0f68a 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -57,6 +57,7 @@ - #include <linux/ftrace_event.h> - #include <linux/memcontrol.h> - #include <linux/prefetch.h> -+#include <linux/migrate.h> - #include <linux/page-debug-flags.h> - - #include <asm/tlbflush.h> -@@ -5550,6 +5551,193 @@ out: - spin_unlock_irqrestore(&zone->lock, flags); - } - -+#ifdef CONFIG_CMA -+ -+static unsigned long pfn_max_align_down(unsigned long pfn) -+{ -+ return pfn & ~(max_t(unsigned long, MAX_ORDER_NR_PAGES, -+ pageblock_nr_pages) - 1); -+} -+ -+static unsigned long pfn_max_align_up(unsigned long pfn) -+{ -+ return ALIGN(pfn, max_t(unsigned long, MAX_ORDER_NR_PAGES, -+ pageblock_nr_pages)); -+} -+ -+static struct page * -+__alloc_contig_migrate_alloc(struct page *page, unsigned long private, -+ int **resultp) -+{ -+ return alloc_page(GFP_HIGHUSER_MOVABLE); -+} -+ -+/* [start, end) must belong to a single zone. */ -+static int __alloc_contig_migrate_range(unsigned long start, unsigned long end) -+{ -+ /* This function is based on compact_zone() from compaction.c. */ -+ -+ unsigned long pfn = start; -+ unsigned int tries = 0; -+ int ret = 0; -+ -+ struct compact_control cc = { -+ .nr_migratepages = 0, -+ .order = -1, -+ .zone = page_zone(pfn_to_page(start)), -+ .sync = true, -+ }; -+ INIT_LIST_HEAD(&cc.migratepages); -+ -+ migrate_prep_local(); -+ -+ while (pfn < end || !list_empty(&cc.migratepages)) { -+ if (fatal_signal_pending(current)) { -+ ret = -EINTR; -+ break; -+ } -+ -+ if (list_empty(&cc.migratepages)) { -+ cc.nr_migratepages = 0; -+ pfn = isolate_migratepages_range(cc.zone, &cc, -+ pfn, end); -+ if (!pfn) { -+ ret = -EINTR; -+ break; -+ } -+ tries = 0; -+ } else if (++tries == 5) { -+ ret = ret < 0 ? ret : -EBUSY; -+ break; -+ } -+ -+ ret = migrate_pages(&cc.migratepages, -+ __alloc_contig_migrate_alloc, -+ 0, false, true); -+ } -+ -+ putback_lru_pages(&cc.migratepages); -+ return ret > 0 ? 0 : ret; -+} -+ -+/** -+ * alloc_contig_range() -- tries to allocate given range of pages -+ * @start: start PFN to allocate -+ * @end: one-past-the-last PFN to allocate -+ * -+ * The PFN range does not have to be pageblock or MAX_ORDER_NR_PAGES -+ * aligned, however it's the caller's responsibility to guarantee that -+ * we are the only thread that changes migrate type of pageblocks the -+ * pages fall in. -+ * -+ * The PFN range must belong to a single zone. -+ * -+ * Returns zero on success or negative error code. On success all -+ * pages which PFN is in [start, end) are allocated for the caller and -+ * need to be freed with free_contig_range(). -+ */ -+int alloc_contig_range(unsigned long start, unsigned long end) -+{ -+ struct zone *zone = page_zone(pfn_to_page(start)); -+ unsigned long outer_start, outer_end; -+ int ret = 0, order; -+ -+ /* -+ * What we do here is we mark all pageblocks in range as -+ * MIGRATE_ISOLATE. Because pageblock and max order pages may -+ * have different sizes, and due to the way page allocator -+ * work, we align the range to biggest of the two pages so -+ * that page allocator won't try to merge buddies from -+ * different pageblocks and change MIGRATE_ISOLATE to some -+ * other migration type. -+ * -+ * Once the pageblocks are marked as MIGRATE_ISOLATE, we -+ * migrate the pages from an unaligned range (ie. pages that -+ * we are interested in). This will put all the pages in -+ * range back to page allocator as MIGRATE_ISOLATE. -+ * -+ * When this is done, we take the pages in range from page -+ * allocator removing them from the buddy system. This way -+ * page allocator will never consider using them. -+ * -+ * This lets us mark the pageblocks back as -+ * MIGRATE_CMA/MIGRATE_MOVABLE so that free pages in the -+ * aligned range but not in the unaligned, original range are -+ * put back to page allocator so that buddy can use them. -+ */ -+ -+ ret = start_isolate_page_range(pfn_max_align_down(start), -+ pfn_max_align_up(end)); -+ if (ret) -+ goto done; -+ -+ ret = __alloc_contig_migrate_range(start, end); -+ if (ret) -+ goto done; -+ -+ /* -+ * Pages from [start, end) are within a MAX_ORDER_NR_PAGES -+ * aligned blocks that are marked as MIGRATE_ISOLATE. What's -+ * more, all pages in [start, end) are free in page allocator. -+ * What we are going to do is to allocate all pages from -+ * [start, end) (that is remove them from page allocator). -+ * -+ * The only problem is that pages at the beginning and at the -+ * end of interesting range may be not aligned with pages that -+ * page allocator holds, ie. they can be part of higher order -+ * pages. Because of this, we reserve the bigger range and -+ * once this is done free the pages we are not interested in. -+ * -+ * We don't have to hold zone->lock here because the pages are -+ * isolated thus they won't get removed from buddy. -+ */ -+ -+ lru_add_drain_all(); -+ drain_all_pages(); -+ -+ order = 0; -+ outer_start = start; -+ while (!PageBuddy(pfn_to_page(outer_start))) { -+ if (++order >= MAX_ORDER) { -+ ret = -EBUSY; -+ goto done; -+ } -+ outer_start &= ~0UL << order; -+ } -+ -+ /* Make sure the range is really isolated. */ -+ if (test_pages_isolated(outer_start, end)) { -+ pr_warn("alloc_contig_range test_pages_isolated(%lx, %lx) failed\n", -+ outer_start, end); -+ ret = -EBUSY; -+ goto done; -+ } -+ -+ outer_end = isolate_freepages_range(outer_start, end); -+ if (!outer_end) { -+ ret = -EBUSY; -+ goto done; -+ } -+ -+ /* Free head and tail (if any) */ -+ if (start != outer_start) -+ free_contig_range(outer_start, start - outer_start); -+ if (end != outer_end) -+ free_contig_range(end, outer_end - end); -+ -+done: -+ undo_isolate_page_range(pfn_max_align_down(start), -+ pfn_max_align_up(end)); -+ return ret; -+} -+ -+void free_contig_range(unsigned long pfn, unsigned nr_pages) -+{ -+ for (; nr_pages--; ++pfn) -+ __free_page(pfn_to_page(pfn)); -+} -+#endif -+ - #ifdef CONFIG_MEMORY_HOTREMOVE - /* - * All pages in the range must be isolated before calling this. --- -1.7.9.1 - diff --git a/patches/drm/cma/0007-mm-page_alloc-change-fallbacks-array-handling.patch b/patches/drm/cma/0007-mm-page_alloc-change-fallbacks-array-handling.patch deleted file mode 100644 index af7595dd4..000000000 --- a/patches/drm/cma/0007-mm-page_alloc-change-fallbacks-array-handling.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 29a36a0b44b8729bc79caf30f72e57a56ecc442e Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Wed, 11 Jan 2012 15:31:33 +0100 -Subject: [PATCH 07/16] mm: page_alloc: change fallbacks array handling - -This commit adds a row for MIGRATE_ISOLATE type to the fallbacks array -which was missing from it. It also, changes the array traversal logic -a little making MIGRATE_RESERVE an end marker. The letter change, -removes the implicit MIGRATE_UNMOVABLE from the end of each row which -was read by __rmqueue_fallback() function. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/page_alloc.c | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 2c0f68a..8e8cd7e 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -875,11 +875,12 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order, - * This array describes the order lists are fallen back to when - * the free lists for the desirable migrate type are depleted - */ --static int fallbacks[MIGRATE_TYPES][MIGRATE_TYPES-1] = { -+static int fallbacks[MIGRATE_TYPES][3] = { - [MIGRATE_UNMOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, - [MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, - [MIGRATE_MOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_RESERVE }, -- [MIGRATE_RESERVE] = { MIGRATE_RESERVE, MIGRATE_RESERVE, MIGRATE_RESERVE }, /* Never used */ -+ [MIGRATE_RESERVE] = { MIGRATE_RESERVE }, /* Never used */ -+ [MIGRATE_ISOLATE] = { MIGRATE_RESERVE }, /* Never used */ - }; - - /* -@@ -974,12 +975,12 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) - /* Find the largest possible block of pages in the other list */ - for (current_order = MAX_ORDER-1; current_order >= order; - --current_order) { -- for (i = 0; i < MIGRATE_TYPES - 1; i++) { -+ for (i = 0;; i++) { - migratetype = fallbacks[start_migratetype][i]; - - /* MIGRATE_RESERVE handled later if necessary */ - if (migratetype == MIGRATE_RESERVE) -- continue; -+ break; - - area = &(zone->free_area[current_order]); - if (list_empty(&area->free_list[migratetype])) --- -1.7.9.1 - diff --git a/patches/drm/cma/0008-mm-mmzone-MIGRATE_CMA-migration-type-added.patch b/patches/drm/cma/0008-mm-mmzone-MIGRATE_CMA-migration-type-added.patch deleted file mode 100644 index 2d67a5705..000000000 --- a/patches/drm/cma/0008-mm-mmzone-MIGRATE_CMA-migration-type-added.patch +++ /dev/null @@ -1,317 +0,0 @@ -From f72ef8f770a9974c6e62031910e4ef3aacbb737a Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Thu, 29 Dec 2011 13:09:50 +0100 -Subject: [PATCH 08/16] mm: mmzone: MIGRATE_CMA migration type added - -The MIGRATE_CMA migration type has two main characteristics: -(i) only movable pages can be allocated from MIGRATE_CMA -pageblocks and (ii) page allocator will never change migration -type of MIGRATE_CMA pageblocks. - -This guarantees (to some degree) that page in a MIGRATE_CMA page -block can always be migrated somewhere else (unless there's no -memory left in the system). - -It is designed to be used for allocating big chunks (eg. 10MiB) -of physically contiguous memory. Once driver requests -contiguous memory, pages from MIGRATE_CMA pageblocks may be -migrated away to create a contiguous block. - -To minimise number of migrations, MIGRATE_CMA migration type -is the last type tried when page allocator falls back to other -migration types when requested. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - include/linux/gfp.h | 3 ++ - include/linux/mmzone.h | 38 +++++++++++++++++++---- - mm/Kconfig | 2 +- - mm/compaction.c | 11 +++++-- - mm/page_alloc.c | 76 +++++++++++++++++++++++++++++++++++++---------- - mm/vmstat.c | 3 ++ - 6 files changed, 106 insertions(+), 27 deletions(-) - -diff --git a/include/linux/gfp.h b/include/linux/gfp.h -index 052a5b6..78d32a7 100644 ---- a/include/linux/gfp.h -+++ b/include/linux/gfp.h -@@ -397,6 +397,9 @@ static inline bool pm_suspended_storage(void) - extern int alloc_contig_range(unsigned long start, unsigned long end); - extern void free_contig_range(unsigned long pfn, unsigned nr_pages); - -+/* CMA stuff */ -+extern void init_cma_reserved_pageblock(struct page *page); -+ - #endif - - #endif /* __LINUX_GFP_H */ -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index dff7115..8c1335f 100644 ---- a/include/linux/mmzone.h -+++ b/include/linux/mmzone.h -@@ -35,13 +35,37 @@ - */ - #define PAGE_ALLOC_COSTLY_ORDER 3 - --#define MIGRATE_UNMOVABLE 0 --#define MIGRATE_RECLAIMABLE 1 --#define MIGRATE_MOVABLE 2 --#define MIGRATE_PCPTYPES 3 /* the number of types on the pcp lists */ --#define MIGRATE_RESERVE 3 --#define MIGRATE_ISOLATE 4 /* can't allocate from here */ --#define MIGRATE_TYPES 5 -+enum { -+ MIGRATE_UNMOVABLE, -+ MIGRATE_RECLAIMABLE, -+ MIGRATE_MOVABLE, -+ MIGRATE_PCPTYPES, /* the number of types on the pcp lists */ -+ MIGRATE_RESERVE = MIGRATE_PCPTYPES, -+#ifdef CONFIG_CMA -+ /* -+ * MIGRATE_CMA migration type is designed to mimic the way -+ * ZONE_MOVABLE works. Only movable pages can be allocated -+ * from MIGRATE_CMA pageblocks and page allocator never -+ * implicitly change migration type of MIGRATE_CMA pageblock. -+ * -+ * The way to use it is to change migratetype of a range of -+ * pageblocks to MIGRATE_CMA which can be done by -+ * __free_pageblock_cma() function. What is important though -+ * is that a range of pageblocks must be aligned to -+ * MAX_ORDER_NR_PAGES should biggest page be bigger then -+ * a single pageblock. -+ */ -+ MIGRATE_CMA, -+#endif -+ MIGRATE_ISOLATE, /* can't allocate from here */ -+ MIGRATE_TYPES -+}; -+ -+#ifdef CONFIG_CMA -+# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA) -+#else -+# define is_migrate_cma(migratetype) false -+#endif - - #define for_each_migratetype_order(order, type) \ - for (order = 0; order < MAX_ORDER; order++) \ -diff --git a/mm/Kconfig b/mm/Kconfig -index e338407..3922002 100644 ---- a/mm/Kconfig -+++ b/mm/Kconfig -@@ -198,7 +198,7 @@ config COMPACTION - config MIGRATION - bool "Page migration" - def_bool y -- depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION -+ depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA - help - Allows the migration of the physical location of pages of processes - while the virtual addresses are not changed. This is useful in -diff --git a/mm/compaction.c b/mm/compaction.c -index 7a92e41..da7d35e 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -45,6 +45,11 @@ static void map_pages(struct list_head *list) - } - } - -+static inline bool migrate_async_suitable(int migratetype) -+{ -+ return is_migrate_cma(migratetype) || migratetype == MIGRATE_MOVABLE; -+} -+ - /* - * Isolate free pages onto a private freelist. Caller must hold zone->lock. - * If @strict is true, will abort returning 0 on any invalid PFNs or non-free -@@ -299,7 +304,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, - */ - pageblock_nr = low_pfn >> pageblock_order; - if (!cc->sync && last_pageblock_nr != pageblock_nr && -- get_pageblock_migratetype(page) != MIGRATE_MOVABLE) { -+ !migrate_async_suitable(get_pageblock_migratetype(page))) { - low_pfn += pageblock_nr_pages; - low_pfn = ALIGN(low_pfn, pageblock_nr_pages) - 1; - last_pageblock_nr = pageblock_nr; -@@ -367,8 +372,8 @@ static bool suitable_migration_target(struct page *page) - if (PageBuddy(page) && page_order(page) >= pageblock_order) - return true; - -- /* If the block is MIGRATE_MOVABLE, allow migration */ -- if (migratetype == MIGRATE_MOVABLE) -+ /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */ -+ if (migrate_async_suitable(migratetype)) - return true; - - /* Otherwise skip the block */ -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 8e8cd7e..26d8b9f 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -750,6 +750,24 @@ void __meminit __free_pages_bootmem(struct page *page, unsigned int order) - __free_pages(page, order); - } - -+#ifdef CONFIG_CMA -+/* Free whole pageblock and set it's migration type to MIGRATE_CMA. */ -+void __init init_cma_reserved_pageblock(struct page *page) -+{ -+ unsigned i = pageblock_nr_pages; -+ struct page *p = page; -+ -+ do { -+ __ClearPageReserved(p); -+ set_page_count(p, 0); -+ } while (++p, --i); -+ -+ set_page_refcounted(page); -+ set_pageblock_migratetype(page, MIGRATE_CMA); -+ __free_pages(page, pageblock_order); -+ totalram_pages += pageblock_nr_pages; -+} -+#endif - - /* - * The order of subdivision here is critical for the IO subsystem. -@@ -875,10 +893,15 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order, - * This array describes the order lists are fallen back to when - * the free lists for the desirable migrate type are depleted - */ --static int fallbacks[MIGRATE_TYPES][3] = { -- [MIGRATE_UNMOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, -- [MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, -- [MIGRATE_MOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_RESERVE }, -+static int fallbacks[MIGRATE_TYPES][4] = { -+ [MIGRATE_UNMOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, -+ [MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, -+#ifdef CONFIG_CMA -+ [MIGRATE_MOVABLE] = { MIGRATE_CMA, MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_RESERVE }, -+ [MIGRATE_CMA] = { MIGRATE_RESERVE }, /* Never used */ -+#else -+ [MIGRATE_MOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_RESERVE }, -+#endif - [MIGRATE_RESERVE] = { MIGRATE_RESERVE }, /* Never used */ - [MIGRATE_ISOLATE] = { MIGRATE_RESERVE }, /* Never used */ - }; -@@ -995,11 +1018,18 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) - * pages to the preferred allocation list. If falling - * back for a reclaimable kernel allocation, be more - * aggressive about taking ownership of free pages -+ * -+ * On the other hand, never change migration -+ * type of MIGRATE_CMA pageblocks nor move CMA -+ * pages on different free lists. We don't -+ * want unmovable pages to be allocated from -+ * MIGRATE_CMA areas. - */ -- if (unlikely(current_order >= (pageblock_order >> 1)) || -- start_migratetype == MIGRATE_RECLAIMABLE || -- page_group_by_mobility_disabled) { -- unsigned long pages; -+ if (!is_migrate_cma(migratetype) && -+ (unlikely(current_order >= pageblock_order / 2) || -+ start_migratetype == MIGRATE_RECLAIMABLE || -+ page_group_by_mobility_disabled)) { -+ int pages; - pages = move_freepages_block(zone, page, - start_migratetype); - -@@ -1017,11 +1047,14 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) - rmv_page_order(page); - - /* Take ownership for orders >= pageblock_order */ -- if (current_order >= pageblock_order) -+ if (current_order >= pageblock_order && -+ !is_migrate_cma(migratetype)) - change_pageblock_range(page, current_order, - start_migratetype); - -- expand(zone, page, order, current_order, area, migratetype); -+ expand(zone, page, order, current_order, area, -+ is_migrate_cma(migratetype) -+ ? migratetype : start_migratetype); - - trace_mm_page_alloc_extfrag(page, order, current_order, - start_migratetype, migratetype); -@@ -1072,7 +1105,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, - unsigned long count, struct list_head *list, - int migratetype, int cold) - { -- int i; -+ int mt = migratetype, i; - - spin_lock(&zone->lock); - for (i = 0; i < count; ++i) { -@@ -1093,7 +1126,12 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, - list_add(&page->lru, list); - else - list_add_tail(&page->lru, list); -- set_page_private(page, migratetype); -+ if (IS_ENABLED(CONFIG_CMA)) { -+ mt = get_pageblock_migratetype(page); -+ if (!is_migrate_cma(mt) && mt != MIGRATE_ISOLATE) -+ mt = migratetype; -+ } -+ set_page_private(page, mt); - list = &page->lru; - } - __mod_zone_page_state(zone, NR_FREE_PAGES, -(i << order)); -@@ -1373,8 +1411,12 @@ int split_free_page(struct page *page) - - if (order >= pageblock_order - 1) { - struct page *endpage = page + (1 << order) - 1; -- for (; page < endpage; page += pageblock_nr_pages) -- set_pageblock_migratetype(page, MIGRATE_MOVABLE); -+ for (; page < endpage; page += pageblock_nr_pages) { -+ int mt = get_pageblock_migratetype(page); -+ if (mt != MIGRATE_ISOLATE && !is_migrate_cma(mt)) -+ set_pageblock_migratetype(page, -+ MIGRATE_MOVABLE); -+ } - } - - return 1 << order; -@@ -5414,14 +5456,16 @@ static int - __count_immobile_pages(struct zone *zone, struct page *page, int count) - { - unsigned long pfn, iter, found; -+ int mt; -+ - /* - * For avoiding noise data, lru_add_drain_all() should be called - * If ZONE_MOVABLE, the zone never contains immobile pages - */ - if (zone_idx(zone) == ZONE_MOVABLE) - return true; -- -- if (get_pageblock_migratetype(page) == MIGRATE_MOVABLE) -+ mt = get_pageblock_migratetype(page); -+ if (mt == MIGRATE_MOVABLE || is_migrate_cma(mt)) - return true; - - pfn = page_to_pfn(page); -diff --git a/mm/vmstat.c b/mm/vmstat.c -index f600557..c47ac13 100644 ---- a/mm/vmstat.c -+++ b/mm/vmstat.c -@@ -613,6 +613,9 @@ static char * const migratetype_names[MIGRATE_TYPES] = { - "Reclaimable", - "Movable", - "Reserve", -+#ifdef CONFIG_CMA -+ "CMA", -+#endif - "Isolate", - }; - --- -1.7.9.1 - diff --git a/patches/drm/cma/0009-mm-page_isolation-MIGRATE_CMA-isolation-functions-ad.patch b/patches/drm/cma/0009-mm-page_isolation-MIGRATE_CMA-isolation-functions-ad.patch deleted file mode 100644 index d7b8807fd..000000000 --- a/patches/drm/cma/0009-mm-page_isolation-MIGRATE_CMA-isolation-functions-ad.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 3a0f64ebe21dd7e82b1d13fe626b05ec807d3ca9 Mon Sep 17 00:00:00 2001 -From: Michal Nazarewicz <mina86@mina86.com> -Date: Tue, 3 Apr 2012 15:06:15 +0200 -Subject: [PATCH 09/16] mm: page_isolation: MIGRATE_CMA isolation functions - added - -This commit changes various functions that change pages and -pageblocks migrate type between MIGRATE_ISOLATE and -MIGRATE_MOVABLE in such a way as to allow to work with -MIGRATE_CMA migrate type. - -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - include/linux/gfp.h | 3 ++- - include/linux/page-isolation.h | 18 +++++++++--------- - mm/memory-failure.c | 2 +- - mm/memory_hotplug.c | 6 +++--- - mm/page_alloc.c | 17 +++++++++++------ - mm/page_isolation.c | 15 ++++++++------- - 6 files changed, 34 insertions(+), 27 deletions(-) - -diff --git a/include/linux/gfp.h b/include/linux/gfp.h -index 78d32a7..1e49be4 100644 ---- a/include/linux/gfp.h -+++ b/include/linux/gfp.h -@@ -394,7 +394,8 @@ static inline bool pm_suspended_storage(void) - #ifdef CONFIG_CMA - - /* The below functions must be run on a range from a single zone. */ --extern int alloc_contig_range(unsigned long start, unsigned long end); -+extern int alloc_contig_range(unsigned long start, unsigned long end, -+ unsigned migratetype); - extern void free_contig_range(unsigned long pfn, unsigned nr_pages); - - /* CMA stuff */ -diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h -index 051c1b1..3bdcab3 100644 ---- a/include/linux/page-isolation.h -+++ b/include/linux/page-isolation.h -@@ -3,7 +3,7 @@ - - /* - * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. -- * If specified range includes migrate types other than MOVABLE, -+ * If specified range includes migrate types other than MOVABLE or CMA, - * this will fail with -EBUSY. - * - * For isolating all pages in the range finally, the caller have to -@@ -11,27 +11,27 @@ - * test it. - */ - extern int --start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn); -+start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, -+ unsigned migratetype); - - /* - * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE. - * target range is [start_pfn, end_pfn) - */ - extern int --undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn); -+undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, -+ unsigned migratetype); - - /* -- * test all pages in [start_pfn, end_pfn)are isolated or not. -+ * Test all pages in [start_pfn, end_pfn) are isolated or not. - */ --extern int --test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn); -+int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn); - - /* -- * Internal funcs.Changes pageblock's migrate type. -- * Please use make_pagetype_isolated()/make_pagetype_movable(). -+ * Internal functions. Changes pageblock's migrate type. - */ - extern int set_migratetype_isolate(struct page *page); --extern void unset_migratetype_isolate(struct page *page); -+extern void unset_migratetype_isolate(struct page *page, unsigned migratetype); - - - #endif -diff --git a/mm/memory-failure.c b/mm/memory-failure.c -index 97cc273..c99ad4e 100644 ---- a/mm/memory-failure.c -+++ b/mm/memory-failure.c -@@ -1404,7 +1404,7 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags) - /* Not a free page */ - ret = 1; - } -- unset_migratetype_isolate(p); -+ unset_migratetype_isolate(p, MIGRATE_MOVABLE); - unlock_memory_hotplug(); - return ret; - } -diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c -index 6629faf..fc898cb 100644 ---- a/mm/memory_hotplug.c -+++ b/mm/memory_hotplug.c -@@ -891,7 +891,7 @@ static int __ref offline_pages(unsigned long start_pfn, - nr_pages = end_pfn - start_pfn; - - /* set above range as isolated */ -- ret = start_isolate_page_range(start_pfn, end_pfn); -+ ret = start_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); - if (ret) - goto out; - -@@ -956,7 +956,7 @@ repeat: - We cannot do rollback at this point. */ - offline_isolated_pages(start_pfn, end_pfn); - /* reset pagetype flags and makes migrate type to be MOVABLE */ -- undo_isolate_page_range(start_pfn, end_pfn); -+ undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); - /* removal success */ - zone->present_pages -= offlined_pages; - zone->zone_pgdat->node_present_pages -= offlined_pages; -@@ -981,7 +981,7 @@ failed_removal: - start_pfn, end_pfn); - memory_notify(MEM_CANCEL_OFFLINE, &arg); - /* pushback to free area */ -- undo_isolate_page_range(start_pfn, end_pfn); -+ undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); - - out: - unlock_memory_hotplug(); -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 26d8b9f..216e575 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -5582,7 +5582,7 @@ out: - return ret; - } - --void unset_migratetype_isolate(struct page *page) -+void unset_migratetype_isolate(struct page *page, unsigned migratetype) - { - struct zone *zone; - unsigned long flags; -@@ -5590,8 +5590,8 @@ void unset_migratetype_isolate(struct page *page) - spin_lock_irqsave(&zone->lock, flags); - if (get_pageblock_migratetype(page) != MIGRATE_ISOLATE) - goto out; -- set_pageblock_migratetype(page, MIGRATE_MOVABLE); -- move_freepages_block(zone, page, MIGRATE_MOVABLE); -+ set_pageblock_migratetype(page, migratetype); -+ move_freepages_block(zone, page, migratetype); - out: - spin_unlock_irqrestore(&zone->lock, flags); - } -@@ -5669,6 +5669,10 @@ static int __alloc_contig_migrate_range(unsigned long start, unsigned long end) - * alloc_contig_range() -- tries to allocate given range of pages - * @start: start PFN to allocate - * @end: one-past-the-last PFN to allocate -+ * @migratetype: migratetype of the underlaying pageblocks (either -+ * #MIGRATE_MOVABLE or #MIGRATE_CMA). All pageblocks -+ * in range must have the same migratetype and it must -+ * be either of the two. - * - * The PFN range does not have to be pageblock or MAX_ORDER_NR_PAGES - * aligned, however it's the caller's responsibility to guarantee that -@@ -5681,7 +5685,8 @@ static int __alloc_contig_migrate_range(unsigned long start, unsigned long end) - * pages which PFN is in [start, end) are allocated for the caller and - * need to be freed with free_contig_range(). - */ --int alloc_contig_range(unsigned long start, unsigned long end) -+int alloc_contig_range(unsigned long start, unsigned long end, -+ unsigned migratetype) - { - struct zone *zone = page_zone(pfn_to_page(start)); - unsigned long outer_start, outer_end; -@@ -5712,7 +5717,7 @@ int alloc_contig_range(unsigned long start, unsigned long end) - */ - - ret = start_isolate_page_range(pfn_max_align_down(start), -- pfn_max_align_up(end)); -+ pfn_max_align_up(end), migratetype); - if (ret) - goto done; - -@@ -5772,7 +5777,7 @@ int alloc_contig_range(unsigned long start, unsigned long end) - - done: - undo_isolate_page_range(pfn_max_align_down(start), -- pfn_max_align_up(end)); -+ pfn_max_align_up(end), migratetype); - return ret; - } - -diff --git a/mm/page_isolation.c b/mm/page_isolation.c -index 4ae42bb..c9f0477 100644 ---- a/mm/page_isolation.c -+++ b/mm/page_isolation.c -@@ -24,6 +24,7 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages) - * to be MIGRATE_ISOLATE. - * @start_pfn: The lower PFN of the range to be isolated. - * @end_pfn: The upper PFN of the range to be isolated. -+ * @migratetype: migrate type to set in error recovery. - * - * Making page-allocation-type to be MIGRATE_ISOLATE means free pages in - * the range will never be allocated. Any free pages and pages freed in the -@@ -32,8 +33,8 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages) - * start_pfn/end_pfn must be aligned to pageblock_order. - * Returns 0 on success and -EBUSY if any part of range cannot be isolated. - */ --int --start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn) -+int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, -+ unsigned migratetype) - { - unsigned long pfn; - unsigned long undo_pfn; -@@ -56,7 +57,7 @@ undo: - for (pfn = start_pfn; - pfn < undo_pfn; - pfn += pageblock_nr_pages) -- unset_migratetype_isolate(pfn_to_page(pfn)); -+ unset_migratetype_isolate(pfn_to_page(pfn), migratetype); - - return -EBUSY; - } -@@ -64,8 +65,8 @@ undo: - /* - * Make isolated pages available again. - */ --int --undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn) -+int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, -+ unsigned migratetype) - { - unsigned long pfn; - struct page *page; -@@ -77,7 +78,7 @@ undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn) - page = __first_valid_page(pfn, pageblock_nr_pages); - if (!page || get_pageblock_migratetype(page) != MIGRATE_ISOLATE) - continue; -- unset_migratetype_isolate(page); -+ unset_migratetype_isolate(page, migratetype); - } - return 0; - } -@@ -86,7 +87,7 @@ undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn) - * all pages in [start_pfn...end_pfn) must be in the same zone. - * zone->lock must be held before call this. - * -- * Returns 1 if all pages in the range is isolated. -+ * Returns 1 if all pages in the range are isolated. - */ - static int - __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn) --- -1.7.9.1 - diff --git a/patches/drm/cma/0010-mm-Serialize-access-to-min_free_kbytes.patch b/patches/drm/cma/0010-mm-Serialize-access-to-min_free_kbytes.patch deleted file mode 100644 index b58542148..000000000 --- a/patches/drm/cma/0010-mm-Serialize-access-to-min_free_kbytes.patch +++ /dev/null @@ -1,63 +0,0 @@ -From dbf266cfafa61250ac58ed08d9ec059da58d47dc Mon Sep 17 00:00:00 2001 -From: Mel Gorman <mgorman@suse.de> -Date: Mon, 25 Apr 2011 21:36:42 +0000 -Subject: [PATCH 10/16] mm: Serialize access to min_free_kbytes - -There is a race between the min_free_kbytes sysctl, memory hotplug -and transparent hugepage support enablement. Memory hotplug uses a -zonelists_mutex to avoid a race when building zonelists. Reuse it to -serialise watermark updates. - -[a.p.zijlstra@chello.nl: Older patch fixed the race with spinlock] -Signed-off-by: Mel Gorman <mgorman@suse.de> -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/page_alloc.c | 23 +++++++++++++++-------- - 1 files changed, 15 insertions(+), 8 deletions(-) - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 216e575..8b19caa 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -5020,14 +5020,7 @@ static void setup_per_zone_lowmem_reserve(void) - calculate_totalreserve_pages(); - } - --/** -- * setup_per_zone_wmarks - called when min_free_kbytes changes -- * or when memory is hot-{added|removed} -- * -- * Ensures that the watermark[min,low,high] values for each zone are set -- * correctly with respect to min_free_kbytes. -- */ --void setup_per_zone_wmarks(void) -+static void __setup_per_zone_wmarks(void) - { - unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10); - unsigned long lowmem_pages = 0; -@@ -5082,6 +5075,20 @@ void setup_per_zone_wmarks(void) - calculate_totalreserve_pages(); - } - -+/** -+ * setup_per_zone_wmarks - called when min_free_kbytes changes -+ * or when memory is hot-{added|removed} -+ * -+ * Ensures that the watermark[min,low,high] values for each zone are set -+ * correctly with respect to min_free_kbytes. -+ */ -+void setup_per_zone_wmarks(void) -+{ -+ mutex_lock(&zonelists_mutex); -+ __setup_per_zone_wmarks(); -+ mutex_unlock(&zonelists_mutex); -+} -+ - /* - * The inactive anon list should be small enough that the VM never has to - * do too much work, but large enough that each inactive page has a chance --- -1.7.9.1 - diff --git a/patches/drm/cma/0011-mm-extract-reclaim-code-from-__alloc_pages_direct_re.patch b/patches/drm/cma/0011-mm-extract-reclaim-code-from-__alloc_pages_direct_re.patch deleted file mode 100644 index 51911b4eb..000000000 --- a/patches/drm/cma/0011-mm-extract-reclaim-code-from-__alloc_pages_direct_re.patch +++ /dev/null @@ -1,83 +0,0 @@ -From e51fed47406b2e224288ed55a06d5f13d54b71c5 Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski <m.szyprowski@samsung.com> -Date: Wed, 25 Jan 2012 12:09:52 +0100 -Subject: [PATCH 11/16] mm: extract reclaim code from - __alloc_pages_direct_reclaim() - -This patch extracts common reclaim code from __alloc_pages_direct_reclaim() -function to separate function: __perform_reclaim() which can be later used -by alloc_contig_range(). - -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -Cc: Michal Nazarewicz <mina86@mina86.com> -Acked-by: Mel Gorman <mel@csn.ul.ie> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - mm/page_alloc.c | 30 +++++++++++++++++++++--------- - 1 files changed, 21 insertions(+), 9 deletions(-) - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 8b19caa..5a90ada 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -2130,16 +2130,13 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, - } - #endif /* CONFIG_COMPACTION */ - --/* The really slow allocator path where we enter direct reclaim */ --static inline struct page * --__alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order, -- struct zonelist *zonelist, enum zone_type high_zoneidx, -- nodemask_t *nodemask, int alloc_flags, struct zone *preferred_zone, -- int migratetype, unsigned long *did_some_progress) -+/* Perform direct synchronous page reclaim */ -+static int -+__perform_reclaim(gfp_t gfp_mask, unsigned int order, struct zonelist *zonelist, -+ nodemask_t *nodemask) - { -- struct page *page = NULL; - struct reclaim_state reclaim_state; -- bool drained = false; -+ int progress; - - cond_resched(); - -@@ -2150,7 +2147,7 @@ __alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order, - reclaim_state.reclaimed_slab = 0; - current->reclaim_state = &reclaim_state; - -- *did_some_progress = try_to_free_pages(zonelist, order, gfp_mask, nodemask); -+ progress = try_to_free_pages(zonelist, order, gfp_mask, nodemask); - - current->reclaim_state = NULL; - lockdep_clear_current_reclaim_state(); -@@ -2158,6 +2155,21 @@ __alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order, - - cond_resched(); - -+ return progress; -+} -+ -+/* The really slow allocator path where we enter direct reclaim */ -+static inline struct page * -+__alloc_pages_direct_reclaim(gfp_t gfp_mask, unsigned int order, -+ struct zonelist *zonelist, enum zone_type high_zoneidx, -+ nodemask_t *nodemask, int alloc_flags, struct zone *preferred_zone, -+ int migratetype, unsigned long *did_some_progress) -+{ -+ struct page *page = NULL; -+ bool drained = false; -+ -+ *did_some_progress = __perform_reclaim(gfp_mask, order, zonelist, -+ nodemask); - if (unlikely(!(*did_some_progress))) - return NULL; - --- -1.7.9.1 - diff --git a/patches/drm/cma/0012-mm-trigger-page-reclaim-in-alloc_contig_range-to-sta.patch b/patches/drm/cma/0012-mm-trigger-page-reclaim-in-alloc_contig_range-to-sta.patch deleted file mode 100644 index cf01ea7cf..000000000 --- a/patches/drm/cma/0012-mm-trigger-page-reclaim-in-alloc_contig_range-to-sta.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 1dc94295f00daa82c2ee20b32f08f74b84dbcc5b Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski <m.szyprowski@samsung.com> -Date: Wed, 25 Jan 2012 12:49:24 +0100 -Subject: [PATCH 12/16] mm: trigger page reclaim in alloc_contig_range() to - stabilise watermarks - -alloc_contig_range() performs memory allocation so it also should keep -track on keeping the correct level of memory watermarks. This commit adds -a call to *_slowpath style reclaim to grab enough pages to make sure that -the final collection of contiguous pages from freelists will not starve -the system. - -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -CC: Michal Nazarewicz <mina86@mina86.com> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - include/linux/mmzone.h | 9 +++++++ - mm/page_alloc.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 69 insertions(+), 0 deletions(-) - -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 8c1335f..26f2040 100644 ---- a/include/linux/mmzone.h -+++ b/include/linux/mmzone.h -@@ -63,8 +63,10 @@ enum { - - #ifdef CONFIG_CMA - # define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA) -+# define cma_wmark_pages(zone) zone->min_cma_pages - #else - # define is_migrate_cma(migratetype) false -+# define cma_wmark_pages(zone) 0 - #endif - - #define for_each_migratetype_order(order, type) \ -@@ -371,6 +373,13 @@ struct zone { - /* see spanned/present_pages for more description */ - seqlock_t span_seqlock; - #endif -+#ifdef CONFIG_CMA -+ /* -+ * CMA needs to increase watermark levels during the allocation -+ * process to make sure that the system is not starved. -+ */ -+ unsigned long min_cma_pages; -+#endif - struct free_area free_area[MAX_ORDER]; - - #ifndef CONFIG_SPARSEMEM -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 5a90ada..0e1c6f5 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -5079,6 +5079,11 @@ static void __setup_per_zone_wmarks(void) - - zone->watermark[WMARK_LOW] = min_wmark_pages(zone) + (tmp >> 2); - zone->watermark[WMARK_HIGH] = min_wmark_pages(zone) + (tmp >> 1); -+ -+ zone->watermark[WMARK_MIN] += cma_wmark_pages(zone); -+ zone->watermark[WMARK_LOW] += cma_wmark_pages(zone); -+ zone->watermark[WMARK_HIGH] += cma_wmark_pages(zone); -+ - setup_zone_migrate_reserve(zone); - spin_unlock_irqrestore(&zone->lock, flags); - } -@@ -5684,6 +5689,54 @@ static int __alloc_contig_migrate_range(unsigned long start, unsigned long end) - return ret > 0 ? 0 : ret; - } - -+/* -+ * Update zone's cma pages counter used for watermark level calculation. -+ */ -+static inline void __update_cma_watermarks(struct zone *zone, int count) -+{ -+ unsigned long flags; -+ spin_lock_irqsave(&zone->lock, flags); -+ zone->min_cma_pages += count; -+ spin_unlock_irqrestore(&zone->lock, flags); -+ setup_per_zone_wmarks(); -+} -+ -+/* -+ * Trigger memory pressure bump to reclaim some pages in order to be able to -+ * allocate 'count' pages in single page units. Does similar work as -+ *__alloc_pages_slowpath() function. -+ */ -+static int __reclaim_pages(struct zone *zone, gfp_t gfp_mask, int count) -+{ -+ enum zone_type high_zoneidx = gfp_zone(gfp_mask); -+ struct zonelist *zonelist = node_zonelist(0, gfp_mask); -+ int did_some_progress = 0; -+ int order = 1; -+ -+ /* -+ * Increase level of watermarks to force kswapd do his job -+ * to stabilise at new watermark level. -+ */ -+ __update_cma_watermarks(zone, count); -+ -+ /* Obey watermarks as if the page was being allocated */ -+ while (!zone_watermark_ok(zone, 0, low_wmark_pages(zone), 0, 0)) { -+ wake_all_kswapd(order, zonelist, high_zoneidx, zone_idx(zone)); -+ -+ did_some_progress = __perform_reclaim(gfp_mask, order, zonelist, -+ NULL); -+ if (!did_some_progress) { -+ /* Exhausted what can be done so it's blamo time */ -+ out_of_memory(zonelist, gfp_mask, order, NULL, false); -+ } -+ } -+ -+ /* Restore original watermark levels. */ -+ __update_cma_watermarks(zone, -count); -+ -+ return count; -+} -+ - /** - * alloc_contig_range() -- tries to allocate given range of pages - * @start: start PFN to allocate -@@ -5782,6 +5835,13 @@ int alloc_contig_range(unsigned long start, unsigned long end, - goto done; - } - -+ /* -+ * Reclaim enough pages to make sure that contiguous allocation -+ * will not starve the system. -+ */ -+ __reclaim_pages(zone, GFP_HIGHUSER_MOVABLE, end-start); -+ -+ /* Grab isolated pages from freelists. */ - outer_end = isolate_freepages_range(outer_start, end); - if (!outer_end) { - ret = -EBUSY; --- -1.7.9.1 - diff --git a/patches/drm/cma/0013-drivers-add-Contiguous-Memory-Allocator.patch b/patches/drm/cma/0013-drivers-add-Contiguous-Memory-Allocator.patch deleted file mode 100644 index 2f3f653e2..000000000 --- a/patches/drm/cma/0013-drivers-add-Contiguous-Memory-Allocator.patch +++ /dev/null @@ -1,757 +0,0 @@ -From 2701abca7058476370f89b6ab686eda6f145f20f Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski <m.szyprowski@samsung.com> -Date: Thu, 29 Dec 2011 13:09:51 +0100 -Subject: [PATCH 13/16] drivers: add Contiguous Memory Allocator - -The Contiguous Memory Allocator is a set of helper functions for DMA -mapping framework that improves allocations of contiguous memory chunks. - -CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type -and gives back to the system. Kernel is allowed to allocate only movable -pages within CMA's managed memory so that it can be used for example for -page cache when DMA mapping do not use it. On -dma_alloc_from_contiguous() request such pages are migrated out of CMA -area to free required contiguous block and fulfill the request. This -allows to allocate large contiguous chunks of memory at any time -assuming that there is enough free memory available in the system. - -This code is heavily based on earlier works by Michal Nazarewicz. - -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -Signed-off-by: Michal Nazarewicz <mina86@mina86.com> -Acked-by: Arnd Bergmann <arnd@arndb.de> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - Documentation/kernel-parameters.txt | 5 + - arch/Kconfig | 3 + - drivers/base/Kconfig | 89 ++++++++ - drivers/base/Makefile | 1 + - drivers/base/dma-contiguous.c | 401 ++++++++++++++++++++++++++++++++++ - include/asm-generic/dma-contiguous.h | 28 +++ - include/linux/device.h | 4 + - include/linux/dma-contiguous.h | 110 +++++++++ - 8 files changed, 641 insertions(+), 0 deletions(-) - create mode 100644 drivers/base/dma-contiguous.c - create mode 100644 include/asm-generic/dma-contiguous.h - create mode 100644 include/linux/dma-contiguous.h - -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index c1601e5..669e8bb 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -508,6 +508,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. - Also note the kernel might malfunction if you disable - some critical bits. - -+ cma=nn[MG] [ARM,KNL] -+ Sets the size of kernel global memory area for contiguous -+ memory allocations. For more information, see -+ include/linux/dma-contiguous.h -+ - cmo_free_hint= [PPC] Format: { yes | no } - Specify whether pages are marked as being inactive - when they are freed. This is used in CMO environments -diff --git a/arch/Kconfig b/arch/Kconfig -index 684eb5a..0a3ffe4 100644 ---- a/arch/Kconfig -+++ b/arch/Kconfig -@@ -142,6 +142,9 @@ config HAVE_ARCH_TRACEHOOK - config HAVE_DMA_ATTRS - bool - -+config HAVE_DMA_CONTIGUOUS -+ bool -+ - config USE_GENERIC_SMP_HELPERS - bool - -diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig -index 9aa618a..9b21469 100644 ---- a/drivers/base/Kconfig -+++ b/drivers/base/Kconfig -@@ -192,4 +192,93 @@ config DMA_SHARED_BUFFER - APIs extension; the file's descriptor can then be passed on to other - driver. - -+config CMA -+ bool "Contiguous Memory Allocator (EXPERIMENTAL)" -+ depends on HAVE_DMA_CONTIGUOUS && HAVE_MEMBLOCK && EXPERIMENTAL -+ select MIGRATION -+ help -+ This enables the Contiguous Memory Allocator which allows drivers -+ to allocate big physically-contiguous blocks of memory for use with -+ hardware components that do not support I/O map nor scatter-gather. -+ -+ For more information see <include/linux/dma-contiguous.h>. -+ If unsure, say "n". -+ -+if CMA -+ -+config CMA_DEBUG -+ bool "CMA debug messages (DEVELOPMENT)" -+ depends on DEBUG_KERNEL -+ help -+ Turns on debug messages in CMA. This produces KERN_DEBUG -+ messages for every CMA call as well as various messages while -+ processing calls such as dma_alloc_from_contiguous(). -+ This option does not affect warning and error messages. -+ -+comment "Default contiguous memory area size:" -+ -+config CMA_SIZE_MBYTES -+ int "Size in Mega Bytes" -+ depends on !CMA_SIZE_SEL_PERCENTAGE -+ default 16 -+ help -+ Defines the size (in MiB) of the default memory area for Contiguous -+ Memory Allocator. -+ -+config CMA_SIZE_PERCENTAGE -+ int "Percentage of total memory" -+ depends on !CMA_SIZE_SEL_MBYTES -+ default 10 -+ help -+ Defines the size of the default memory area for Contiguous Memory -+ Allocator as a percentage of the total memory in the system. -+ -+choice -+ prompt "Selected region size" -+ default CMA_SIZE_SEL_ABSOLUTE -+ -+config CMA_SIZE_SEL_MBYTES -+ bool "Use mega bytes value only" -+ -+config CMA_SIZE_SEL_PERCENTAGE -+ bool "Use percentage value only" -+ -+config CMA_SIZE_SEL_MIN -+ bool "Use lower value (minimum)" -+ -+config CMA_SIZE_SEL_MAX -+ bool "Use higher value (maximum)" -+ -+endchoice -+ -+config CMA_ALIGNMENT -+ int "Maximum PAGE_SIZE order of alignment for contiguous buffers" -+ range 4 9 -+ default 8 -+ help -+ DMA mapping framework by default aligns all buffers to the smallest -+ PAGE_SIZE order which is greater than or equal to the requested buffer -+ size. This works well for buffers up to a few hundreds kilobytes, but -+ for larger buffers it just a memory waste. With this parameter you can -+ specify the maximum PAGE_SIZE order for contiguous buffers. Larger -+ buffers will be aligned only to this specified order. The order is -+ expressed as a power of two multiplied by the PAGE_SIZE. -+ -+ For example, if your system defaults to 4KiB pages, the order value -+ of 8 means that the buffers will be aligned up to 1MiB only. -+ -+ If unsure, leave the default value "8". -+ -+config CMA_AREAS -+ int "Maximum count of the CMA device-private areas" -+ default 7 -+ help -+ CMA allows to create CMA areas for particular devices. This parameter -+ sets the maximum number of such device private CMA areas in the -+ system. -+ -+ If unsure, leave the default value "7". -+ -+endif -+ - endmenu -diff --git a/drivers/base/Makefile b/drivers/base/Makefile -index b6d1b9c..5aa2d70 100644 ---- a/drivers/base/Makefile -+++ b/drivers/base/Makefile -@@ -6,6 +6,7 @@ obj-y := core.o bus.o dd.o syscore.o \ - attribute_container.o transport_class.o \ - topology.o - obj-$(CONFIG_DEVTMPFS) += devtmpfs.o -+obj-$(CONFIG_CMA) += dma-contiguous.o - obj-y += power/ - obj-$(CONFIG_HAS_DMA) += dma-mapping.o - obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o -diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c -new file mode 100644 -index 0000000..78efb03 ---- /dev/null -+++ b/drivers/base/dma-contiguous.c -@@ -0,0 +1,401 @@ -+/* -+ * Contiguous Memory Allocator for DMA mapping framework -+ * Copyright (c) 2010-2011 by Samsung Electronics. -+ * Written by: -+ * Marek Szyprowski <m.szyprowski@samsung.com> -+ * Michal Nazarewicz <mina86@mina86.com> -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License or (at your optional) any later version of the license. -+ */ -+ -+#define pr_fmt(fmt) "cma: " fmt -+ -+#ifdef CONFIG_CMA_DEBUG -+#ifndef DEBUG -+# define DEBUG -+#endif -+#endif -+ -+#include <asm/page.h> -+#include <asm/dma-contiguous.h> -+ -+#include <linux/memblock.h> -+#include <linux/err.h> -+#include <linux/mm.h> -+#include <linux/mutex.h> -+#include <linux/page-isolation.h> -+#include <linux/slab.h> -+#include <linux/swap.h> -+#include <linux/mm_types.h> -+#include <linux/dma-contiguous.h> -+ -+#ifndef SZ_1M -+#define SZ_1M (1 << 20) -+#endif -+ -+struct cma { -+ unsigned long base_pfn; -+ unsigned long count; -+ unsigned long *bitmap; -+}; -+ -+struct cma *dma_contiguous_default_area; -+ -+#ifdef CONFIG_CMA_SIZE_MBYTES -+#define CMA_SIZE_MBYTES CONFIG_CMA_SIZE_MBYTES -+#else -+#define CMA_SIZE_MBYTES 0 -+#endif -+ -+/* -+ * Default global CMA area size can be defined in kernel's .config. -+ * This is usefull mainly for distro maintainers to create a kernel -+ * that works correctly for most supported systems. -+ * The size can be set in bytes or as a percentage of the total memory -+ * in the system. -+ * -+ * Users, who want to set the size of global CMA area for their system -+ * should use cma= kernel parameter. -+ */ -+static const unsigned long size_bytes = CMA_SIZE_MBYTES * SZ_1M; -+static long size_cmdline = -1; -+ -+static int __init early_cma(char *p) -+{ -+ pr_debug("%s(%s)\n", __func__, p); -+ size_cmdline = memparse(p, &p); -+ return 0; -+} -+early_param("cma", early_cma); -+ -+#ifdef CONFIG_CMA_SIZE_PERCENTAGE -+ -+static unsigned long __init __maybe_unused cma_early_percent_memory(void) -+{ -+ struct memblock_region *reg; -+ unsigned long total_pages = 0; -+ -+ /* -+ * We cannot use memblock_phys_mem_size() here, because -+ * memblock_analyze() has not been called yet. -+ */ -+ for_each_memblock(memory, reg) -+ total_pages += memblock_region_memory_end_pfn(reg) - -+ memblock_region_memory_base_pfn(reg); -+ -+ return (total_pages * CONFIG_CMA_SIZE_PERCENTAGE / 100) << PAGE_SHIFT; -+} -+ -+#else -+ -+static inline __maybe_unused unsigned long cma_early_percent_memory(void) -+{ -+ return 0; -+} -+ -+#endif -+ -+/** -+ * dma_contiguous_reserve() - reserve area for contiguous memory handling -+ * @limit: End address of the reserved memory (optional, 0 for any). -+ * -+ * This function reserves memory from early allocator. It should be -+ * called by arch specific code once the early allocator (memblock or bootmem) -+ * has been activated and all other subsystems have already allocated/reserved -+ * memory. -+ */ -+void __init dma_contiguous_reserve(phys_addr_t limit) -+{ -+ unsigned long selected_size = 0; -+ -+ pr_debug("%s(limit %08lx)\n", __func__, (unsigned long)limit); -+ -+ if (size_cmdline != -1) { -+ selected_size = size_cmdline; -+ } else { -+#ifdef CONFIG_CMA_SIZE_SEL_MBYTES -+ selected_size = size_bytes; -+#elif defined(CONFIG_CMA_SIZE_SEL_PERCENTAGE) -+ selected_size = cma_early_percent_memory(); -+#elif defined(CONFIG_CMA_SIZE_SEL_MIN) -+ selected_size = min(size_bytes, cma_early_percent_memory()); -+#elif defined(CONFIG_CMA_SIZE_SEL_MAX) -+ selected_size = max(size_bytes, cma_early_percent_memory()); -+#endif -+ } -+ -+ if (selected_size) { -+ pr_debug("%s: reserving %ld MiB for global area\n", __func__, -+ selected_size / SZ_1M); -+ -+ dma_declare_contiguous(NULL, selected_size, 0, limit); -+ } -+}; -+ -+static DEFINE_MUTEX(cma_mutex); -+ -+static __init int cma_activate_area(unsigned long base_pfn, unsigned long count) -+{ -+ unsigned long pfn = base_pfn; -+ unsigned i = count >> pageblock_order; -+ struct zone *zone; -+ -+ WARN_ON_ONCE(!pfn_valid(pfn)); -+ zone = page_zone(pfn_to_page(pfn)); -+ -+ do { -+ unsigned j; -+ base_pfn = pfn; -+ for (j = pageblock_nr_pages; j; --j, pfn++) { -+ WARN_ON_ONCE(!pfn_valid(pfn)); -+ if (page_zone(pfn_to_page(pfn)) != zone) -+ return -EINVAL; -+ } -+ init_cma_reserved_pageblock(pfn_to_page(base_pfn)); -+ } while (--i); -+ return 0; -+} -+ -+static __init struct cma *cma_create_area(unsigned long base_pfn, -+ unsigned long count) -+{ -+ int bitmap_size = BITS_TO_LONGS(count) * sizeof(long); -+ struct cma *cma; -+ int ret = -ENOMEM; -+ -+ pr_debug("%s(base %08lx, count %lx)\n", __func__, base_pfn, count); -+ -+ cma = kmalloc(sizeof *cma, GFP_KERNEL); -+ if (!cma) -+ return ERR_PTR(-ENOMEM); -+ -+ cma->base_pfn = base_pfn; -+ cma->count = count; -+ cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); -+ -+ if (!cma->bitmap) -+ goto no_mem; -+ -+ ret = cma_activate_area(base_pfn, count); -+ if (ret) -+ goto error; -+ -+ pr_debug("%s: returned %p\n", __func__, (void *)cma); -+ return cma; -+ -+error: -+ kfree(cma->bitmap); -+no_mem: -+ kfree(cma); -+ return ERR_PTR(ret); -+} -+ -+static struct cma_reserved { -+ phys_addr_t start; -+ unsigned long size; -+ struct device *dev; -+} cma_reserved[MAX_CMA_AREAS] __initdata; -+static unsigned cma_reserved_count __initdata; -+ -+static int __init cma_init_reserved_areas(void) -+{ -+ struct cma_reserved *r = cma_reserved; -+ unsigned i = cma_reserved_count; -+ -+ pr_debug("%s()\n", __func__); -+ -+ for (; i; --i, ++r) { -+ struct cma *cma; -+ cma = cma_create_area(PFN_DOWN(r->start), -+ r->size >> PAGE_SHIFT); -+ if (!IS_ERR(cma)) -+ dev_set_cma_area(r->dev, cma); -+ } -+ return 0; -+} -+core_initcall(cma_init_reserved_areas); -+ -+/** -+ * dma_declare_contiguous() - reserve area for contiguous memory handling -+ * for particular device -+ * @dev: Pointer to device structure. -+ * @size: Size of the reserved memory. -+ * @base: Start address of the reserved memory (optional, 0 for any). -+ * @limit: End address of the reserved memory (optional, 0 for any). -+ * -+ * This function reserves memory for specified device. It should be -+ * called by board specific code when early allocator (memblock or bootmem) -+ * is still activate. -+ */ -+int __init dma_declare_contiguous(struct device *dev, unsigned long size, -+ phys_addr_t base, phys_addr_t limit) -+{ -+ struct cma_reserved *r = &cma_reserved[cma_reserved_count]; -+ unsigned long alignment; -+ -+ pr_debug("%s(size %lx, base %08lx, limit %08lx)\n", __func__, -+ (unsigned long)size, (unsigned long)base, -+ (unsigned long)limit); -+ -+ /* Sanity checks */ -+ if (cma_reserved_count == ARRAY_SIZE(cma_reserved)) { -+ pr_err("Not enough slots for CMA reserved regions!\n"); -+ return -ENOSPC; -+ } -+ -+ if (!size) -+ return -EINVAL; -+ -+ /* Sanitise input arguments */ -+ alignment = PAGE_SIZE << max(MAX_ORDER, pageblock_order); -+ base = ALIGN(base, alignment); -+ size = ALIGN(size, alignment); -+ limit &= ~(alignment - 1); -+ -+ /* Reserve memory */ -+ if (base) { -+ if (memblock_is_region_reserved(base, size) || -+ memblock_reserve(base, size) < 0) { -+ base = -EBUSY; -+ goto err; -+ } -+ } else { -+ /* -+ * Use __memblock_alloc_base() since -+ * memblock_alloc_base() panic()s. -+ */ -+ phys_addr_t addr = __memblock_alloc_base(size, alignment, limit); -+ if (!addr) { -+ base = -ENOMEM; -+ goto err; -+ } else if (addr + size > ~(unsigned long)0) { -+ memblock_free(addr, size); -+ base = -EINVAL; -+ goto err; -+ } else { -+ base = addr; -+ } -+ } -+ -+ /* -+ * Each reserved area must be initialised later, when more kernel -+ * subsystems (like slab allocator) are available. -+ */ -+ r->start = base; -+ r->size = size; -+ r->dev = dev; -+ cma_reserved_count++; -+ pr_info("CMA: reserved %ld MiB at %08lx\n", size / SZ_1M, -+ (unsigned long)base); -+ -+ /* Architecture specific contiguous memory fixup. */ -+ dma_contiguous_early_fixup(base, size); -+ return 0; -+err: -+ pr_err("CMA: failed to reserve %ld MiB\n", size / SZ_1M); -+ return base; -+} -+ -+/** -+ * dma_alloc_from_contiguous() - allocate pages from contiguous area -+ * @dev: Pointer to device for which the allocation is performed. -+ * @count: Requested number of pages. -+ * @align: Requested alignment of pages (in PAGE_SIZE order). -+ * -+ * This function allocates memory buffer for specified device. It uses -+ * device specific contiguous memory area if available or the default -+ * global one. Requires architecture specific get_dev_cma_area() helper -+ * function. -+ */ -+struct page *dma_alloc_from_contiguous(struct device *dev, int count, -+ unsigned int align) -+{ -+ unsigned long mask, pfn, pageno, start = 0; -+ struct cma *cma = dev_get_cma_area(dev); -+ int ret; -+ -+ if (!cma || !cma->count) -+ return NULL; -+ -+ if (align > CONFIG_CMA_ALIGNMENT) -+ align = CONFIG_CMA_ALIGNMENT; -+ -+ pr_debug("%s(cma %p, count %d, align %d)\n", __func__, (void *)cma, -+ count, align); -+ -+ if (!count) -+ return NULL; -+ -+ mask = (1 << align) - 1; -+ -+ mutex_lock(&cma_mutex); -+ -+ for (;;) { -+ pageno = bitmap_find_next_zero_area(cma->bitmap, cma->count, -+ start, count, mask); -+ if (pageno >= cma->count) { -+ ret = -ENOMEM; -+ goto error; -+ } -+ -+ pfn = cma->base_pfn + pageno; -+ ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA); -+ if (ret == 0) { -+ bitmap_set(cma->bitmap, pageno, count); -+ break; -+ } else if (ret != -EBUSY) { -+ goto error; -+ } -+ pr_debug("%s(): memory range at %p is busy, retrying\n", -+ __func__, pfn_to_page(pfn)); -+ /* try again with a bit different memory target */ -+ start = pageno + mask + 1; -+ } -+ -+ mutex_unlock(&cma_mutex); -+ -+ pr_debug("%s(): returned %p\n", __func__, pfn_to_page(pfn)); -+ return pfn_to_page(pfn); -+error: -+ mutex_unlock(&cma_mutex); -+ return NULL; -+} -+ -+/** -+ * dma_release_from_contiguous() - release allocated pages -+ * @dev: Pointer to device for which the pages were allocated. -+ * @pages: Allocated pages. -+ * @count: Number of allocated pages. -+ * -+ * This function releases memory allocated by dma_alloc_from_contiguous(). -+ * It returns false when provided pages do not belong to contiguous area and -+ * true otherwise. -+ */ -+bool dma_release_from_contiguous(struct device *dev, struct page *pages, -+ int count) -+{ -+ struct cma *cma = dev_get_cma_area(dev); -+ unsigned long pfn; -+ -+ if (!cma || !pages) -+ return false; -+ -+ pr_debug("%s(page %p)\n", __func__, (void *)pages); -+ -+ pfn = page_to_pfn(pages); -+ -+ if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count) -+ return false; -+ -+ VM_BUG_ON(pfn + count > cma->base_pfn + cma->count); -+ -+ mutex_lock(&cma_mutex); -+ bitmap_clear(cma->bitmap, pfn - cma->base_pfn, count); -+ free_contig_range(pfn, count); -+ mutex_unlock(&cma_mutex); -+ -+ return true; -+} -diff --git a/include/asm-generic/dma-contiguous.h b/include/asm-generic/dma-contiguous.h -new file mode 100644 -index 0000000..c544356 ---- /dev/null -+++ b/include/asm-generic/dma-contiguous.h -@@ -0,0 +1,28 @@ -+#ifndef ASM_DMA_CONTIGUOUS_H -+#define ASM_DMA_CONTIGUOUS_H -+ -+#ifdef __KERNEL__ -+#ifdef CONFIG_CMA -+ -+#include <linux/device.h> -+#include <linux/dma-contiguous.h> -+ -+static inline struct cma *dev_get_cma_area(struct device *dev) -+{ -+ if (dev && dev->cma_area) -+ return dev->cma_area; -+ return dma_contiguous_default_area; -+} -+ -+static inline void dev_set_cma_area(struct device *dev, struct cma *cma) -+{ -+ if (dev) -+ dev->cma_area = cma; -+ if (!dev || !dma_contiguous_default_area) -+ dma_contiguous_default_area = cma; -+} -+ -+#endif -+#endif -+ -+#endif -diff --git a/include/linux/device.h b/include/linux/device.h -index 5ad17cc..e339929 100644 ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -661,6 +661,10 @@ struct device { - - struct dma_coherent_mem *dma_mem; /* internal for coherent mem - override */ -+#ifdef CONFIG_CMA -+ struct cma *cma_area; /* contiguous memory area for dma -+ allocations */ -+#endif - /* arch specific additions */ - struct dev_archdata archdata; - -diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h -new file mode 100644 -index 0000000..2f303e4 ---- /dev/null -+++ b/include/linux/dma-contiguous.h -@@ -0,0 +1,110 @@ -+#ifndef __LINUX_CMA_H -+#define __LINUX_CMA_H -+ -+/* -+ * Contiguous Memory Allocator for DMA mapping framework -+ * Copyright (c) 2010-2011 by Samsung Electronics. -+ * Written by: -+ * Marek Szyprowski <m.szyprowski@samsung.com> -+ * Michal Nazarewicz <mina86@mina86.com> -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License or (at your optional) any later version of the license. -+ */ -+ -+/* -+ * Contiguous Memory Allocator -+ * -+ * The Contiguous Memory Allocator (CMA) makes it possible to -+ * allocate big contiguous chunks of memory after the system has -+ * booted. -+ * -+ * Why is it needed? -+ * -+ * Various devices on embedded systems have no scatter-getter and/or -+ * IO map support and require contiguous blocks of memory to -+ * operate. They include devices such as cameras, hardware video -+ * coders, etc. -+ * -+ * Such devices often require big memory buffers (a full HD frame -+ * is, for instance, more then 2 mega pixels large, i.e. more than 6 -+ * MB of memory), which makes mechanisms such as kmalloc() or -+ * alloc_page() ineffective. -+ * -+ * At the same time, a solution where a big memory region is -+ * reserved for a device is suboptimal since often more memory is -+ * reserved then strictly required and, moreover, the memory is -+ * inaccessible to page system even if device drivers don't use it. -+ * -+ * CMA tries to solve this issue by operating on memory regions -+ * where only movable pages can be allocated from. This way, kernel -+ * can use the memory for pagecache and when device driver requests -+ * it, allocated pages can be migrated. -+ * -+ * Driver usage -+ * -+ * CMA should not be used by the device drivers directly. It is -+ * only a helper framework for dma-mapping subsystem. -+ * -+ * For more information, see kernel-docs in drivers/base/dma-contiguous.c -+ */ -+ -+#ifdef __KERNEL__ -+ -+struct cma; -+struct page; -+struct device; -+ -+#ifdef CONFIG_CMA -+ -+/* -+ * There is always at least global CMA area and a few optional device -+ * private areas configured in kernel .config. -+ */ -+#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) -+ -+extern struct cma *dma_contiguous_default_area; -+ -+void dma_contiguous_reserve(phys_addr_t addr_limit); -+int dma_declare_contiguous(struct device *dev, unsigned long size, -+ phys_addr_t base, phys_addr_t limit); -+ -+struct page *dma_alloc_from_contiguous(struct device *dev, int count, -+ unsigned int order); -+bool dma_release_from_contiguous(struct device *dev, struct page *pages, -+ int count); -+ -+#else -+ -+#define MAX_CMA_AREAS (0) -+ -+static inline void dma_contiguous_reserve(phys_addr_t limit) { } -+ -+static inline -+int dma_declare_contiguous(struct device *dev, unsigned long size, -+ phys_addr_t base, phys_addr_t limit) -+{ -+ return -ENOSYS; -+} -+ -+static inline -+struct page *dma_alloc_from_contiguous(struct device *dev, int count, -+ unsigned int order) -+{ -+ return NULL; -+} -+ -+static inline -+bool dma_release_from_contiguous(struct device *dev, struct page *pages, -+ int count) -+{ -+ return false; -+} -+ -+#endif -+ -+#endif -+ -+#endif --- -1.7.9.1 - diff --git a/patches/drm/cma/0014-X86-integrate-CMA-with-DMA-mapping-subsystem.patch b/patches/drm/cma/0014-X86-integrate-CMA-with-DMA-mapping-subsystem.patch deleted file mode 100644 index 70a3a88c8..000000000 --- a/patches/drm/cma/0014-X86-integrate-CMA-with-DMA-mapping-subsystem.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 15d98032e644e6754a19d4f01cd291b568ad8f56 Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski <m.szyprowski@samsung.com> -Date: Thu, 29 Dec 2011 13:09:51 +0100 -Subject: [PATCH 14/16] X86: integrate CMA with DMA-mapping subsystem - -This patch adds support for CMA to dma-mapping subsystem for x86 -architecture that uses common pci-dma/pci-nommu implementation. This -allows to test CMA on KVM/QEMU and a lot of common x86 boxes. - -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -CC: Michal Nazarewicz <mina86@mina86.com> -Acked-by: Arnd Bergmann <arnd@arndb.de> ---- - arch/x86/Kconfig | 1 + - arch/x86/include/asm/dma-contiguous.h | 13 +++++++++++++ - arch/x86/include/asm/dma-mapping.h | 4 ++++ - arch/x86/kernel/pci-dma.c | 18 ++++++++++++++++-- - arch/x86/kernel/pci-nommu.c | 2 +- - arch/x86/kernel/setup.c | 2 ++ - 6 files changed, 37 insertions(+), 3 deletions(-) - create mode 100644 arch/x86/include/asm/dma-contiguous.h - -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 1d14cc6..bc1cfa8 100644 ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -31,6 +31,7 @@ config X86 - select ARCH_WANT_OPTIONAL_GPIOLIB - select ARCH_WANT_FRAME_POINTERS - select HAVE_DMA_ATTRS -+ select HAVE_DMA_CONTIGUOUS if !SWIOTLB - select HAVE_KRETPROBES - select HAVE_OPTPROBES - select HAVE_FTRACE_MCOUNT_RECORD -diff --git a/arch/x86/include/asm/dma-contiguous.h b/arch/x86/include/asm/dma-contiguous.h -new file mode 100644 -index 0000000..c092416 ---- /dev/null -+++ b/arch/x86/include/asm/dma-contiguous.h -@@ -0,0 +1,13 @@ -+#ifndef ASMX86_DMA_CONTIGUOUS_H -+#define ASMX86_DMA_CONTIGUOUS_H -+ -+#ifdef __KERNEL__ -+ -+#include <linux/types.h> -+#include <asm-generic/dma-contiguous.h> -+ -+static inline void -+dma_contiguous_early_fixup(phys_addr_t base, unsigned long size) { } -+ -+#endif -+#endif -diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h -index 4b4331d..8ca32d4 100644 ---- a/arch/x86/include/asm/dma-mapping.h -+++ b/arch/x86/include/asm/dma-mapping.h -@@ -13,6 +13,7 @@ - #include <asm/io.h> - #include <asm/swiotlb.h> - #include <asm-generic/dma-coherent.h> -+#include <linux/dma-contiguous.h> - - #ifdef CONFIG_ISA - # define ISA_DMA_BIT_MASK DMA_BIT_MASK(24) -@@ -62,6 +63,9 @@ extern void *dma_generic_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_addr, gfp_t flag, - struct dma_attrs *attrs); - -+extern void dma_generic_free_coherent(struct device *dev, size_t size, -+ void *vaddr, dma_addr_t dma_addr); -+ - static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) - { - if (!dev->dma_mask) -diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c -index 3003250..2b28bcd 100644 ---- a/arch/x86/kernel/pci-dma.c -+++ b/arch/x86/kernel/pci-dma.c -@@ -100,14 +100,18 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, - struct dma_attrs *attrs) - { - unsigned long dma_mask; -- struct page *page; -+ struct page *page = NULL; -+ unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; - dma_addr_t addr; - - dma_mask = dma_alloc_coherent_mask(dev, flag); - - flag |= __GFP_ZERO; - again: -- page = alloc_pages_node(dev_to_node(dev), flag, get_order(size)); -+ if (!(flag & GFP_ATOMIC)) -+ page = dma_alloc_from_contiguous(dev, count, get_order(size)); -+ if (!page) -+ page = alloc_pages_node(dev_to_node(dev), flag, get_order(size)); - if (!page) - return NULL; - -@@ -127,6 +131,16 @@ again: - return page_address(page); - } - -+void dma_generic_free_coherent(struct device *dev, size_t size, void *vaddr, -+ dma_addr_t dma_addr) -+{ -+ unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; -+ struct page *page = virt_to_page(vaddr); -+ -+ if (!dma_release_from_contiguous(dev, page, count)) -+ free_pages((unsigned long)vaddr, get_order(size)); -+} -+ - /* - * See <Documentation/x86/x86_64/boot-options.txt> for the iommu kernel - * parameter documentation. -diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c -index f960506..8ed60f1 100644 ---- a/arch/x86/kernel/pci-nommu.c -+++ b/arch/x86/kernel/pci-nommu.c -@@ -97,7 +97,7 @@ static void nommu_sync_sg_for_device(struct device *dev, - - struct dma_map_ops nommu_dma_ops = { - .alloc = dma_generic_alloc_coherent, -- .free = nommu_free_coherent, -+ .free = dma_generic_free_coherent, - .map_sg = nommu_map_sg, - .map_page = nommu_map_page, - .sync_single_for_device = nommu_sync_single_for_device, -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 1a29015..d6c956e 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -50,6 +50,7 @@ - #include <asm/pci-direct.h> - #include <linux/init_ohci1394_dma.h> - #include <linux/kvm_para.h> -+#include <linux/dma-contiguous.h> - - #include <linux/errno.h> - #include <linux/kernel.h> -@@ -934,6 +935,7 @@ void __init setup_arch(char **cmdline_p) - } - #endif - memblock.current_limit = get_max_mapped(); -+ dma_contiguous_reserve(0); - - /* - * NOTE: On x86-32, only from this point on, fixmaps are ready for use. --- -1.7.9.1 - diff --git a/patches/drm/cma/0015-ARM-integrate-CMA-with-DMA-mapping-subsystem.patch b/patches/drm/cma/0015-ARM-integrate-CMA-with-DMA-mapping-subsystem.patch deleted file mode 100644 index 390e5ec90..000000000 --- a/patches/drm/cma/0015-ARM-integrate-CMA-with-DMA-mapping-subsystem.patch +++ /dev/null @@ -1,805 +0,0 @@ -From 3a296b98c5db9d0f36b6cb989db100c258d138c1 Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski <m.szyprowski@samsung.com> -Date: Thu, 29 Dec 2011 13:09:51 +0100 -Subject: [PATCH 15/16] ARM: integrate CMA with DMA-mapping subsystem - -This patch adds support for CMA to dma-mapping subsystem for ARM -architecture. By default a global CMA area is used, but specific devices -are allowed to have their private memory areas if required (they can be -created with dma_declare_contiguous() function during board -initialisation). - -Contiguous memory areas reserved for DMA are remapped with 2-level page -tables on boot. Once a buffer is requested, a low memory kernel mapping -is updated to to match requested memory access type. - -GFP_ATOMIC allocations are performed from special pool which is created -early during boot. This way remapping page attributes is not needed on -allocation time. - -CMA has been enabled unconditionally for ARMv6+ systems. - -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -CC: Michal Nazarewicz <mina86@mina86.com> -Acked-by: Arnd Bergmann <arnd@arndb.de> -Tested-by: Rob Clark <rob.clark@linaro.org> -Tested-by: Ohad Ben-Cohen <ohad@wizery.com> -Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> -Tested-by: Robert Nelson <robertcnelson@gmail.com> -Tested-by: Barry Song <Baohua.Song@csr.com> ---- - Documentation/kernel-parameters.txt | 4 + - arch/arm/Kconfig | 2 + - arch/arm/include/asm/dma-contiguous.h | 15 ++ - arch/arm/include/asm/mach/map.h | 1 + - arch/arm/kernel/setup.c | 9 +- - arch/arm/mm/dma-mapping.c | 370 +++++++++++++++++++++++++++------ - arch/arm/mm/init.c | 23 ++- - arch/arm/mm/mm.h | 3 + - arch/arm/mm/mmu.c | 31 ++- - 9 files changed, 370 insertions(+), 88 deletions(-) - create mode 100644 arch/arm/include/asm/dma-contiguous.h - -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index 669e8bb..41996c6 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -520,6 +520,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. - a hypervisor. - Default: yes - -+ coherent_pool=nn[KMG] [ARM,KNL] -+ Sets the size of memory pool for coherent, atomic dma -+ allocations if Contiguous Memory Allocator (CMA) is used. -+ - code_bytes [X86] How many bytes of object code to print - in an oops report. - Range: 0 - 8192 -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 9318084..07e041a 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -4,6 +4,8 @@ config ARM - select HAVE_AOUT - select HAVE_DMA_API_DEBUG - select HAVE_IDE if PCI || ISA || PCMCIA -+ select HAVE_DMA_CONTIGUOUS if (CPU_V6 || CPU_V6K || CPU_V7) -+ select CMA if (CPU_V6 || CPU_V6K || CPU_V7) - select HAVE_MEMBLOCK - select RTC_LIB - select SYS_SUPPORTS_APM_EMULATION -diff --git a/arch/arm/include/asm/dma-contiguous.h b/arch/arm/include/asm/dma-contiguous.h -new file mode 100644 -index 0000000..3ed37b4 ---- /dev/null -+++ b/arch/arm/include/asm/dma-contiguous.h -@@ -0,0 +1,15 @@ -+#ifndef ASMARM_DMA_CONTIGUOUS_H -+#define ASMARM_DMA_CONTIGUOUS_H -+ -+#ifdef __KERNEL__ -+#ifdef CONFIG_CMA -+ -+#include <linux/types.h> -+#include <asm-generic/dma-contiguous.h> -+ -+void dma_contiguous_early_fixup(phys_addr_t base, unsigned long size); -+ -+#endif -+#endif -+ -+#endif -diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h -index b36f365..a6efcdd 100644 ---- a/arch/arm/include/asm/mach/map.h -+++ b/arch/arm/include/asm/mach/map.h -@@ -30,6 +30,7 @@ struct map_desc { - #define MT_MEMORY_DTCM 12 - #define MT_MEMORY_ITCM 13 - #define MT_MEMORY_SO 14 -+#define MT_MEMORY_DMA_READY 15 - - #ifdef CONFIG_MMU - extern void iotable_init(struct map_desc *, int); -diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index b914113..6dc2458 100644 ---- a/arch/arm/kernel/setup.c -+++ b/arch/arm/kernel/setup.c -@@ -81,6 +81,7 @@ __setup("fpe=", fpe_setup); - extern void paging_init(struct machine_desc *desc); - extern void sanity_check_meminfo(void); - extern void reboot_setup(char *str); -+extern void setup_dma_zone(struct machine_desc *desc); - - unsigned int processor_id; - EXPORT_SYMBOL(processor_id); -@@ -925,12 +926,8 @@ void __init setup_arch(char **cmdline_p) - machine_desc = mdesc; - machine_name = mdesc->name; - --#ifdef CONFIG_ZONE_DMA -- if (mdesc->dma_zone_size) { -- extern unsigned long arm_dma_zone_size; -- arm_dma_zone_size = mdesc->dma_zone_size; -- } --#endif -+ setup_dma_zone(mdesc); -+ - if (mdesc->restart_mode) - reboot_setup(&mdesc->restart_mode); - -diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c -index db23ae4..302f5bf 100644 ---- a/arch/arm/mm/dma-mapping.c -+++ b/arch/arm/mm/dma-mapping.c -@@ -17,7 +17,9 @@ - #include <linux/init.h> - #include <linux/device.h> - #include <linux/dma-mapping.h> -+#include <linux/dma-contiguous.h> - #include <linux/highmem.h> -+#include <linux/memblock.h> - #include <linux/slab.h> - - #include <asm/memory.h> -@@ -26,6 +28,9 @@ - #include <asm/tlbflush.h> - #include <asm/sizes.h> - #include <asm/mach/arch.h> -+#include <asm/mach/map.h> -+#include <asm/system_info.h> -+#include <asm/dma-contiguous.h> - - #include "mm.h" - -@@ -56,6 +61,19 @@ static u64 get_coherent_dma_mask(struct device *dev) - return mask; - } - -+static void __dma_clear_buffer(struct page *page, size_t size) -+{ -+ void *ptr; -+ /* -+ * Ensure that the allocated pages are zeroed, and that any data -+ * lurking in the kernel direct-mapped region is invalidated. -+ */ -+ ptr = page_address(page); -+ memset(ptr, 0, size); -+ dmac_flush_range(ptr, ptr + size); -+ outer_flush_range(__pa(ptr), __pa(ptr) + size); -+} -+ - /* - * Allocate a DMA buffer for 'dev' of size 'size' using the - * specified gfp mask. Note that 'size' must be page aligned. -@@ -64,23 +82,6 @@ static struct page *__dma_alloc_buffer(struct device *dev, size_t size, gfp_t gf - { - unsigned long order = get_order(size); - struct page *page, *p, *e; -- void *ptr; -- u64 mask = get_coherent_dma_mask(dev); -- --#ifdef CONFIG_DMA_API_DEBUG -- u64 limit = (mask + 1) & ~mask; -- if (limit && size >= limit) { -- dev_warn(dev, "coherent allocation too big (requested %#x mask %#llx)\n", -- size, mask); -- return NULL; -- } --#endif -- -- if (!mask) -- return NULL; -- -- if (mask < 0xffffffffULL) -- gfp |= GFP_DMA; - - page = alloc_pages(gfp, order); - if (!page) -@@ -93,14 +94,7 @@ static struct page *__dma_alloc_buffer(struct device *dev, size_t size, gfp_t gf - for (p = page + (size >> PAGE_SHIFT), e = page + (1 << order); p < e; p++) - __free_page(p); - -- /* -- * Ensure that the allocated pages are zeroed, and that any data -- * lurking in the kernel direct-mapped region is invalidated. -- */ -- ptr = page_address(page); -- memset(ptr, 0, size); -- dmac_flush_range(ptr, ptr + size); -- outer_flush_range(__pa(ptr), __pa(ptr) + size); -+ __dma_clear_buffer(page, size); - - return page; - } -@@ -170,6 +164,9 @@ static int __init consistent_init(void) - unsigned long base = consistent_base; - unsigned long num_ptes = (CONSISTENT_END - base) >> PMD_SHIFT; - -+ if (cpu_architecture() >= CPU_ARCH_ARMv6) -+ return 0; -+ - consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL); - if (!consistent_pte) { - pr_err("%s: no memory\n", __func__); -@@ -210,9 +207,101 @@ static int __init consistent_init(void) - - return ret; - } -- - core_initcall(consistent_init); - -+static void *__alloc_from_contiguous(struct device *dev, size_t size, -+ pgprot_t prot, struct page **ret_page); -+ -+static struct arm_vmregion_head coherent_head = { -+ .vm_lock = __SPIN_LOCK_UNLOCKED(&coherent_head.vm_lock), -+ .vm_list = LIST_HEAD_INIT(coherent_head.vm_list), -+}; -+ -+size_t coherent_pool_size = DEFAULT_CONSISTENT_DMA_SIZE / 8; -+ -+static int __init early_coherent_pool(char *p) -+{ -+ coherent_pool_size = memparse(p, &p); -+ return 0; -+} -+early_param("coherent_pool", early_coherent_pool); -+ -+/* -+ * Initialise the coherent pool for atomic allocations. -+ */ -+static int __init coherent_init(void) -+{ -+ pgprot_t prot = pgprot_dmacoherent(pgprot_kernel); -+ size_t size = coherent_pool_size; -+ struct page *page; -+ void *ptr; -+ -+ if (cpu_architecture() < CPU_ARCH_ARMv6) -+ return 0; -+ -+ ptr = __alloc_from_contiguous(NULL, size, prot, &page); -+ if (ptr) { -+ coherent_head.vm_start = (unsigned long) ptr; -+ coherent_head.vm_end = (unsigned long) ptr + size; -+ printk(KERN_INFO "DMA: preallocated %u KiB pool for atomic coherent allocations\n", -+ (unsigned)size / 1024); -+ return 0; -+ } -+ printk(KERN_ERR "DMA: failed to allocate %u KiB pool for atomic coherent allocation\n", -+ (unsigned)size / 1024); -+ return -ENOMEM; -+} -+/* -+ * CMA is activated by core_initcall, so we must be called after it. -+ */ -+postcore_initcall(coherent_init); -+ -+struct dma_contig_early_reserve { -+ phys_addr_t base; -+ unsigned long size; -+}; -+ -+static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata; -+ -+static int dma_mmu_remap_num __initdata; -+ -+void __init dma_contiguous_early_fixup(phys_addr_t base, unsigned long size) -+{ -+ dma_mmu_remap[dma_mmu_remap_num].base = base; -+ dma_mmu_remap[dma_mmu_remap_num].size = size; -+ dma_mmu_remap_num++; -+} -+ -+void __init dma_contiguous_remap(void) -+{ -+ int i; -+ for (i = 0; i < dma_mmu_remap_num; i++) { -+ phys_addr_t start = dma_mmu_remap[i].base; -+ phys_addr_t end = start + dma_mmu_remap[i].size; -+ struct map_desc map; -+ unsigned long addr; -+ -+ if (end > arm_lowmem_limit) -+ end = arm_lowmem_limit; -+ if (start >= end) -+ return; -+ -+ map.pfn = __phys_to_pfn(start); -+ map.virtual = __phys_to_virt(start); -+ map.length = end - start; -+ map.type = MT_MEMORY_DMA_READY; -+ -+ /* -+ * Clear previous low-memory mapping -+ */ -+ for (addr = __phys_to_virt(start); addr < __phys_to_virt(end); -+ addr += PGDIR_SIZE) -+ pmd_clear(pmd_off_k(addr)); -+ -+ iotable_init(&map, 1); -+ } -+} -+ - static void * - __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot, - const void *caller) -@@ -319,20 +408,173 @@ static void __dma_free_remap(void *cpu_addr, size_t size) - arm_vmregion_free(&consistent_head, c); - } - -+static int __dma_update_pte(pte_t *pte, pgtable_t token, unsigned long addr, -+ void *data) -+{ -+ struct page *page = virt_to_page(addr); -+ pgprot_t prot = *(pgprot_t *)data; -+ -+ set_pte_ext(pte, mk_pte(page, prot), 0); -+ return 0; -+} -+ -+static void __dma_remap(struct page *page, size_t size, pgprot_t prot) -+{ -+ unsigned long start = (unsigned long) page_address(page); -+ unsigned end = start + size; -+ -+ apply_to_page_range(&init_mm, start, size, __dma_update_pte, &prot); -+ dsb(); -+ flush_tlb_kernel_range(start, end); -+} -+ -+static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, -+ pgprot_t prot, struct page **ret_page, -+ const void *caller) -+{ -+ struct page *page; -+ void *ptr; -+ page = __dma_alloc_buffer(dev, size, gfp); -+ if (!page) -+ return NULL; -+ -+ ptr = __dma_alloc_remap(page, size, gfp, prot, caller); -+ if (!ptr) { -+ __dma_free_buffer(page, size); -+ return NULL; -+ } -+ -+ *ret_page = page; -+ return ptr; -+} -+ -+static void *__alloc_from_pool(struct device *dev, size_t size, -+ struct page **ret_page, const void *caller) -+{ -+ struct arm_vmregion *c; -+ size_t align; -+ -+ if (!coherent_head.vm_start) { -+ printk(KERN_ERR "%s: coherent pool not initialised!\n", -+ __func__); -+ dump_stack(); -+ return NULL; -+ } -+ -+ /* -+ * Align the region allocation - allocations from pool are rather -+ * small, so align them to their order in pages, minimum is a page -+ * size. This helps reduce fragmentation of the DMA space. -+ */ -+ align = PAGE_SIZE << get_order(size); -+ c = arm_vmregion_alloc(&coherent_head, align, size, 0, caller); -+ if (c) { -+ void *ptr = (void *)c->vm_start; -+ struct page *page = virt_to_page(ptr); -+ *ret_page = page; -+ return ptr; -+ } -+ return NULL; -+} -+ -+static int __free_from_pool(void *cpu_addr, size_t size) -+{ -+ unsigned long start = (unsigned long)cpu_addr; -+ unsigned long end = start + size; -+ struct arm_vmregion *c; -+ -+ if (start < coherent_head.vm_start || end > coherent_head.vm_end) -+ return 0; -+ -+ c = arm_vmregion_find_remove(&coherent_head, (unsigned long)start); -+ -+ if ((c->vm_end - c->vm_start) != size) { -+ printk(KERN_ERR "%s: freeing wrong coherent size (%ld != %d)\n", -+ __func__, c->vm_end - c->vm_start, size); -+ dump_stack(); -+ size = c->vm_end - c->vm_start; -+ } -+ -+ arm_vmregion_free(&coherent_head, c); -+ return 1; -+} -+ -+static void *__alloc_from_contiguous(struct device *dev, size_t size, -+ pgprot_t prot, struct page **ret_page) -+{ -+ unsigned long order = get_order(size); -+ size_t count = size >> PAGE_SHIFT; -+ struct page *page; -+ -+ page = dma_alloc_from_contiguous(dev, count, order); -+ if (!page) -+ return NULL; -+ -+ __dma_clear_buffer(page, size); -+ __dma_remap(page, size, prot); -+ -+ *ret_page = page; -+ return page_address(page); -+} -+ -+static void __free_from_contiguous(struct device *dev, struct page *page, -+ size_t size) -+{ -+ __dma_remap(page, size, pgprot_kernel); -+ dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT); -+} -+ -+#define nommu() 0 -+ - #else /* !CONFIG_MMU */ - --#define __dma_alloc_remap(page, size, gfp, prot, c) page_address(page) --#define __dma_free_remap(addr, size) do { } while (0) -+#define nommu() 1 -+ -+#define __alloc_remap_buffer(dev, size, gfp, prot, ret, c) NULL -+#define __alloc_from_pool(dev, size, ret_page, c) NULL -+#define __alloc_from_contiguous(dev, size, prot, ret) NULL -+#define __free_from_pool(cpu_addr, size) 0 -+#define __free_from_contiguous(dev, page, size) do { } while (0) -+#define __dma_free_remap(cpu_addr, size) do { } while (0) - - #endif /* CONFIG_MMU */ - --static void * --__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, -- pgprot_t prot, const void *caller) -+static void *__alloc_simple_buffer(struct device *dev, size_t size, gfp_t gfp, -+ struct page **ret_page) - { - struct page *page; -+ page = __dma_alloc_buffer(dev, size, gfp); -+ if (!page) -+ return NULL; -+ -+ *ret_page = page; -+ return page_address(page); -+} -+ -+ -+ -+static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, -+ gfp_t gfp, pgprot_t prot, const void *caller) -+{ -+ u64 mask = get_coherent_dma_mask(dev); -+ struct page *page; - void *addr; - -+#ifdef CONFIG_DMA_API_DEBUG -+ u64 limit = (mask + 1) & ~mask; -+ if (limit && size >= limit) { -+ dev_warn(dev, "coherent allocation too big (requested %#x mask %#llx)\n", -+ size, mask); -+ return NULL; -+ } -+#endif -+ -+ if (!mask) -+ return NULL; -+ -+ if (mask < 0xffffffffULL) -+ gfp |= GFP_DMA; -+ - /* - * Following is a work-around (a.k.a. hack) to prevent pages - * with __GFP_COMP being passed to split_page() which cannot -@@ -345,19 +587,17 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, - *handle = ~0; - size = PAGE_ALIGN(size); - -- page = __dma_alloc_buffer(dev, size, gfp); -- if (!page) -- return NULL; -- -- if (!arch_is_coherent()) -- addr = __dma_alloc_remap(page, size, gfp, prot, caller); -+ if (arch_is_coherent() || nommu()) -+ addr = __alloc_simple_buffer(dev, size, gfp, &page); -+ else if (cpu_architecture() < CPU_ARCH_ARMv6) -+ addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller); -+ else if (gfp & GFP_ATOMIC) -+ addr = __alloc_from_pool(dev, size, &page, caller); - else -- addr = page_address(page); -+ addr = __alloc_from_contiguous(dev, size, prot, &page); - - if (addr) - *handle = pfn_to_dma(dev, page_to_pfn(page)); -- else -- __dma_free_buffer(page, size); - - return addr; - } -@@ -366,8 +606,8 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, - * Allocate DMA-coherent memory space and return both the kernel remapped - * virtual and bus address for that space. - */ --void * --dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) -+void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, -+ gfp_t gfp) - { - void *memory; - -@@ -398,25 +638,11 @@ static int dma_mmap(struct device *dev, struct vm_area_struct *vma, - { - int ret = -ENXIO; - #ifdef CONFIG_MMU -- unsigned long user_size, kern_size; -- struct arm_vmregion *c; -- -- user_size = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; -- -- c = arm_vmregion_find(&consistent_head, (unsigned long)cpu_addr); -- if (c) { -- unsigned long off = vma->vm_pgoff; -- -- kern_size = (c->vm_end - c->vm_start) >> PAGE_SHIFT; -- -- if (off < kern_size && -- user_size <= (kern_size - off)) { -- ret = remap_pfn_range(vma, vma->vm_start, -- page_to_pfn(c->vm_pages) + off, -- user_size << PAGE_SHIFT, -- vma->vm_page_prot); -- } -- } -+ unsigned long pfn = dma_to_pfn(dev, dma_addr); -+ ret = remap_pfn_range(vma, vma->vm_start, -+ pfn + vma->vm_pgoff, -+ vma->vm_end - vma->vm_start, -+ vma->vm_page_prot); - #endif /* CONFIG_MMU */ - - return ret; -@@ -438,23 +664,33 @@ int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma, - } - EXPORT_SYMBOL(dma_mmap_writecombine); - -+ - /* -- * free a page as defined by the above mapping. -- * Must not be called with IRQs disabled. -+ * Free a buffer as defined by the above mapping. - */ - void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle) - { -- WARN_ON(irqs_disabled()); -+ struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); - - if (dma_release_from_coherent(dev, get_order(size), cpu_addr)) - return; - - size = PAGE_ALIGN(size); - -- if (!arch_is_coherent()) -+ if (arch_is_coherent() || nommu()) { -+ __dma_free_buffer(page, size); -+ } else if (cpu_architecture() < CPU_ARCH_ARMv6) { - __dma_free_remap(cpu_addr, size); -- -- __dma_free_buffer(pfn_to_page(dma_to_pfn(dev, handle)), size); -+ __dma_free_buffer(page, size); -+ } else { -+ if (__free_from_pool(cpu_addr, size)) -+ return; -+ /* -+ * Non-atomic allocations cannot be freed with IRQs disabled -+ */ -+ WARN_ON(irqs_disabled()); -+ __free_from_contiguous(dev, page, size); -+ } - } - EXPORT_SYMBOL(dma_free_coherent); - -diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c -index 595079f..6e9fde6 100644 ---- a/arch/arm/mm/init.c -+++ b/arch/arm/mm/init.c -@@ -20,6 +20,7 @@ - #include <linux/highmem.h> - #include <linux/gfp.h> - #include <linux/memblock.h> -+#include <linux/dma-contiguous.h> - - #include <asm/mach-types.h> - #include <asm/memblock.h> -@@ -226,6 +227,17 @@ static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole, - } - #endif - -+void __init setup_dma_zone(struct machine_desc *mdesc) -+{ -+#ifdef CONFIG_ZONE_DMA -+ if (mdesc->dma_zone_size) { -+ arm_dma_zone_size = mdesc->dma_zone_size; -+ arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1; -+ } else -+ arm_dma_limit = 0xffffffff; -+#endif -+} -+ - static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, - unsigned long max_high) - { -@@ -273,12 +285,9 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, - * Adjust the sizes according to any special requirements for - * this machine type. - */ -- if (arm_dma_zone_size) { -+ if (arm_dma_zone_size) - arm_adjust_dma_zone(zone_size, zhole_size, - arm_dma_zone_size >> PAGE_SHIFT); -- arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1; -- } else -- arm_dma_limit = 0xffffffff; - #endif - - free_area_init_node(0, zone_size, min, zhole_size); -@@ -364,6 +373,12 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) - if (mdesc->reserve) - mdesc->reserve(); - -+ /* -+ * reserve memory for DMA contigouos allocations, -+ * must come from DMA area inside low memory -+ */ -+ dma_contiguous_reserve(min(arm_dma_limit, arm_lowmem_limit)); -+ - arm_memblock_steal_permitted = false; - memblock_allow_resize(); - memblock_dump_all(); -diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h -index 27f4a61..93dc0c1 100644 ---- a/arch/arm/mm/mm.h -+++ b/arch/arm/mm/mm.h -@@ -67,5 +67,8 @@ extern u32 arm_dma_limit; - #define arm_dma_limit ((u32)~0) - #endif - -+extern phys_addr_t arm_lowmem_limit; -+ - void __init bootmem_init(void); - void arm_mm_memblock_reserve(void); -+void dma_contiguous_remap(void); -diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c -index b86f893..4c1c6f2 100644 ---- a/arch/arm/mm/mmu.c -+++ b/arch/arm/mm/mmu.c -@@ -288,6 +288,11 @@ static struct mem_type mem_types[] = { - PMD_SECT_UNCACHED | PMD_SECT_XN, - .domain = DOMAIN_KERNEL, - }, -+ [MT_MEMORY_DMA_READY] = { -+ .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, -+ .prot_l1 = PMD_TYPE_TABLE, -+ .domain = DOMAIN_KERNEL, -+ }, - }; - - const struct mem_type *get_mem_type(unsigned int type) -@@ -429,6 +434,7 @@ static void __init build_mem_type_table(void) - if (arch_is_coherent() && cpu_is_xsc3()) { - mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; - mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED; -+ mem_types[MT_MEMORY_DMA_READY].prot_pte |= L_PTE_SHARED; - mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; - mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED; - } -@@ -460,6 +466,7 @@ static void __init build_mem_type_table(void) - mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED; - mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; - mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED; -+ mem_types[MT_MEMORY_DMA_READY].prot_pte |= L_PTE_SHARED; - mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; - mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED; - } -@@ -511,6 +518,7 @@ static void __init build_mem_type_table(void) - mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask; - mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd; - mem_types[MT_MEMORY].prot_pte |= kern_pgprot; -+ mem_types[MT_MEMORY_DMA_READY].prot_pte |= kern_pgprot; - mem_types[MT_MEMORY_NONCACHED].prot_sect |= ecc_mask; - mem_types[MT_ROM].prot_sect |= cp->pmd; - -@@ -595,7 +603,7 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr, - * L1 entries, whereas PGDs refer to a group of L1 entries making - * up one logical pointer to an L2 table. - */ -- if (((addr | end | phys) & ~SECTION_MASK) == 0) { -+ if (type->prot_sect && ((addr | end | phys) & ~SECTION_MASK) == 0) { - pmd_t *p = pmd; - - #ifndef CONFIG_ARM_LPAE -@@ -813,7 +821,7 @@ static int __init early_vmalloc(char *arg) - } - early_param("vmalloc", early_vmalloc); - --static phys_addr_t lowmem_limit __initdata = 0; -+phys_addr_t arm_lowmem_limit __initdata = 0; - - void __init sanity_check_meminfo(void) - { -@@ -896,8 +904,8 @@ void __init sanity_check_meminfo(void) - bank->size = newsize; - } - #endif -- if (!bank->highmem && bank->start + bank->size > lowmem_limit) -- lowmem_limit = bank->start + bank->size; -+ if (!bank->highmem && bank->start + bank->size > arm_lowmem_limit) -+ arm_lowmem_limit = bank->start + bank->size; - - j++; - } -@@ -922,8 +930,8 @@ void __init sanity_check_meminfo(void) - } - #endif - meminfo.nr_banks = j; -- high_memory = __va(lowmem_limit - 1) + 1; -- memblock_set_current_limit(lowmem_limit); -+ high_memory = __va(arm_lowmem_limit - 1) + 1; -+ memblock_set_current_limit(arm_lowmem_limit); - } - - static inline void prepare_page_table(void) -@@ -948,8 +956,8 @@ static inline void prepare_page_table(void) - * Find the end of the first block of lowmem. - */ - end = memblock.memory.regions[0].base + memblock.memory.regions[0].size; -- if (end >= lowmem_limit) -- end = lowmem_limit; -+ if (end >= arm_lowmem_limit) -+ end = arm_lowmem_limit; - - /* - * Clear out all the kernel space mappings, except for the first -@@ -1092,8 +1100,8 @@ static void __init map_lowmem(void) - phys_addr_t end = start + reg->size; - struct map_desc map; - -- if (end > lowmem_limit) -- end = lowmem_limit; -+ if (end > arm_lowmem_limit) -+ end = arm_lowmem_limit; - if (start >= end) - break; - -@@ -1114,11 +1122,12 @@ void __init paging_init(struct machine_desc *mdesc) - { - void *zero_page; - -- memblock_set_current_limit(lowmem_limit); -+ memblock_set_current_limit(arm_lowmem_limit); - - build_mem_type_table(); - prepare_page_table(); - map_lowmem(); -+ dma_contiguous_remap(); - devicemaps_init(mdesc); - kmap_init(); - --- -1.7.9.1 - diff --git a/patches/drm/cma/0016-ARM-Samsung-use-CMA-for-2-memory-banks-for-s5p-mfc-d.patch b/patches/drm/cma/0016-ARM-Samsung-use-CMA-for-2-memory-banks-for-s5p-mfc-d.patch deleted file mode 100644 index c59c4104c..000000000 --- a/patches/drm/cma/0016-ARM-Samsung-use-CMA-for-2-memory-banks-for-s5p-mfc-d.patch +++ /dev/null @@ -1,90 +0,0 @@ -From f8ff4f99cfa4f67e09a3c948e007e82a0c21434a Mon Sep 17 00:00:00 2001 -From: Marek Szyprowski <m.szyprowski@samsung.com> -Date: Thu, 29 Dec 2011 13:09:51 +0100 -Subject: [PATCH 16/16] ARM: Samsung: use CMA for 2 memory banks for s5p-mfc - device - -Replace custom memory bank initialization using memblock_reserve and -dma_declare_coherent with a single call to CMA's dma_declare_contiguous. - -Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> -Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -Acked-by: Arnd Bergmann <arnd@arndb.de> ---- - arch/arm/plat-s5p/dev-mfc.c | 51 ++++++------------------------------------- - 1 files changed, 7 insertions(+), 44 deletions(-) - -diff --git a/arch/arm/plat-s5p/dev-mfc.c b/arch/arm/plat-s5p/dev-mfc.c -index a30d36b..fcb8400 100644 ---- a/arch/arm/plat-s5p/dev-mfc.c -+++ b/arch/arm/plat-s5p/dev-mfc.c -@@ -14,6 +14,7 @@ - #include <linux/interrupt.h> - #include <linux/platform_device.h> - #include <linux/dma-mapping.h> -+#include <linux/dma-contiguous.h> - #include <linux/memblock.h> - #include <linux/ioport.h> - -@@ -22,52 +23,14 @@ - #include <plat/irqs.h> - #include <plat/mfc.h> - --struct s5p_mfc_reserved_mem { -- phys_addr_t base; -- unsigned long size; -- struct device *dev; --}; -- --static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; -- - void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, - phys_addr_t lbase, unsigned int lsize) - { -- int i; -- -- s5p_mfc_mem[0].dev = &s5p_device_mfc_r.dev; -- s5p_mfc_mem[0].base = rbase; -- s5p_mfc_mem[0].size = rsize; -- -- s5p_mfc_mem[1].dev = &s5p_device_mfc_l.dev; -- s5p_mfc_mem[1].base = lbase; -- s5p_mfc_mem[1].size = lsize; -- -- for (i = 0; i < ARRAY_SIZE(s5p_mfc_mem); i++) { -- struct s5p_mfc_reserved_mem *area = &s5p_mfc_mem[i]; -- if (memblock_remove(area->base, area->size)) { -- printk(KERN_ERR "Failed to reserve memory for MFC device (%ld bytes at 0x%08lx)\n", -- area->size, (unsigned long) area->base); -- area->base = 0; -- } -- } --} -- --static int __init s5p_mfc_memory_init(void) --{ -- int i; -- -- for (i = 0; i < ARRAY_SIZE(s5p_mfc_mem); i++) { -- struct s5p_mfc_reserved_mem *area = &s5p_mfc_mem[i]; -- if (!area->base) -- continue; -+ if (dma_declare_contiguous(&s5p_device_mfc_r.dev, rsize, rbase, 0)) -+ printk(KERN_ERR "Failed to reserve memory for MFC device (%u bytes at 0x%08lx)\n", -+ rsize, (unsigned long) rbase); - -- if (dma_declare_coherent_memory(area->dev, area->base, -- area->base, area->size, -- DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) -- printk(KERN_ERR "Failed to declare coherent memory for MFC device (%ld bytes at 0x%08lx)\n", -- area->size, (unsigned long) area->base); -- } -- return 0; -+ if (dma_declare_contiguous(&s5p_device_mfc_l.dev, lsize, lbase, 0)) -+ printk(KERN_ERR "Failed to reserve memory for MFC device (%u bytes at 0x%08lx)\n", -+ rsize, (unsigned long) rbase); - } --device_initcall(s5p_mfc_memory_init); --- -1.7.9.1 - diff --git a/patches/dsp/0001-OMAP2-control-new-APIs-to-configure-boot-address-and.patch b/patches/dsp/0001-OMAP2-control-new-APIs-to-configure-boot-address-and.patch deleted file mode 100644 index 2cdd3ef62..000000000 --- a/patches/dsp/0001-OMAP2-control-new-APIs-to-configure-boot-address-and.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 0e454a35094e16ddbf66c45bba5b3198deab3f07 Mon Sep 17 00:00:00 2001 -From: Omar Ramirez Luna <omar.luna@linaro.org> -Date: Wed, 2 May 2012 21:11:51 -0500 -Subject: [PATCH 1/3] OMAP2+: control: new APIs to configure boot address and - mode - -SCM contains boot addr and boot mode registers to control -other processors on different OMAP versions. It controls the -boot address and mode for DSP based subsystems like: IVA 2.1 -(OMAP2430), IVA 2.2 (OMAP3) and DSP (OMAP4). - -If contained within SCM registers, when a processor is -booting it uses BOOTADDR to start running the code at that -location. BOOTMOD register specifies a different set of -modes for the processor to execute when booting (from direct, -idle, self-loop, user and default). - -Since there was no offset associated with OMAP4, this patch -defines it. - -Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org> ---- - arch/arm/mach-omap2/control.c | 43 ++++++++++++++++++++ - arch/arm/mach-omap2/control.h | 2 + - .../include/mach/ctrl_module_core_44xx.h | 1 + - 3 files changed, 46 insertions(+) - -diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c -index 08e674b..3223b81 100644 ---- a/arch/arm/mach-omap2/control.c -+++ b/arch/arm/mach-omap2/control.c -@@ -241,6 +241,49 @@ void omap3_ctrl_write_boot_mode(u8 bootmode) - - #endif - -+/** -+ * omap_ctrl_write_dsp_boot_addr - set boot address for a remote processor -+ * @bootaddr: physical address of the boot loader -+ * -+ * Set boot address for the boot loader of a supported processor -+ * when a power ON sequence occurs. -+ */ -+void omap_ctrl_write_dsp_boot_addr(u32 bootaddr) -+{ -+ u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR : -+ cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR : -+ cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR : -+ 0; -+ -+ if (!offset) { -+ pr_err("%s: unsupported omap type\n", __func__); -+ return; -+ } -+ -+ omap_ctrl_writel(bootaddr, offset); -+} -+ -+/** -+ * omap_ctrl_write_dsp_boot_mode - set boot mode for a remote processor -+ * @bootmode: 8-bit value to pass to some boot code -+ * -+ * Sets boot mode for the boot loader of a supported processor -+ * when a power ON sequence occurs. -+ */ -+void omap_ctrl_write_dsp_boot_mode(u8 bootmode) -+{ -+ u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTMOD : -+ cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTMOD : -+ 0; -+ -+ if (!offset) { -+ pr_err("%s: unsupported omap type\n", __func__); -+ return; -+ } -+ -+ omap_ctrl_writel(bootmode, offset); -+} -+ - #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) - /* - * Clears the scratchpad contents in case of cold boot- -diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h -index a406fd0..fcc98f8 100644 ---- a/arch/arm/mach-omap2/control.h -+++ b/arch/arm/mach-omap2/control.h -@@ -397,6 +397,8 @@ extern u32 omap3_arm_context[128]; - extern void omap3_control_save_context(void); - extern void omap3_control_restore_context(void); - extern void omap3_ctrl_write_boot_mode(u8 bootmode); -+extern void omap_ctrl_write_dsp_boot_addr(u32 bootaddr); -+extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode); - extern void omap3630_ctrl_disable_rta(void); - extern int omap3_ctrl_save_padconf(void); - #else -diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h -index 2f7ac70..0197082 100644 ---- a/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h -+++ b/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h -@@ -42,6 +42,7 @@ - #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_DPLL_1 0x0268 - #define OMAP4_CTRL_MODULE_CORE_STATUS 0x02c4 - #define OMAP4_CTRL_MODULE_CORE_DEV_CONF 0x0300 -+#define OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR 0x0304 - #define OMAP4_CTRL_MODULE_CORE_LDOVBB_IVA_VOLTAGE_CTRL 0x0314 - #define OMAP4_CTRL_MODULE_CORE_LDOVBB_MPU_VOLTAGE_CTRL 0x0318 - #define OMAP4_CTRL_MODULE_CORE_LDOSRAM_IVA_VOLTAGE_CTRL 0x0320 --- -1.7.10 - diff --git a/patches/dsp/0001-dsp-add-memblock-include.patch b/patches/dsp/0001-dsp-add-memblock-include.patch new file mode 100644 index 000000000..b4428adfe --- /dev/null +++ b/patches/dsp/0001-dsp-add-memblock-include.patch @@ -0,0 +1,32 @@ +From 397e2beae70726ea1092cfd5236f6b21f9f909f2 Mon Sep 17 00:00:00 2001 +From: Robert Nelson <robertcnelson@gmail.com> +Date: Mon, 4 Jun 2012 11:45:43 -0500 +Subject: [PATCH] dsp: add memblock include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +arch/arm/mach-omap2/dsp.c: In function ‘omap_dsp_reserve_sdram_memblock’: +arch/arm/mach-omap2/dsp.c:58:2: error: implicit declaration of function ‘arm_memblock_steal’ [-Werror=implicit-function-declaration] + +Signed-off-by: Robert Nelson <robertcnelson@gmail.com> +--- + arch/arm/mach-omap2/dsp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c +index 845309f..a9b0eaa 100644 +--- a/arch/arm/mach-omap2/dsp.c ++++ b/arch/arm/mach-omap2/dsp.c +@@ -26,6 +26,8 @@ + #include <plat/omap-pm.h> + #endif + ++#include <asm/memblock.h> ++ + #include <plat/dsp.h> + + static struct platform_device *omap_dsp_pdev; +-- +1.7.10 + diff --git a/patches/dsp/0002-OMAP-dsp-interface-to-control-module-functions.patch b/patches/dsp/0002-OMAP-dsp-interface-to-control-module-functions.patch deleted file mode 100644 index 9d3c8ebe0..000000000 --- a/patches/dsp/0002-OMAP-dsp-interface-to-control-module-functions.patch +++ /dev/null @@ -1,53 +0,0 @@ -From ec8c0a4ae5fc2783dd30e31f587200f4471b4f25 Mon Sep 17 00:00:00 2001 -From: Omar Ramirez Luna <omar.luna@linaro.org> -Date: Wed, 2 May 2012 21:11:52 -0500 -Subject: [PATCH 2/3] OMAP: dsp: interface to control module functions - -Provide an interface for a driver to call SCM functions to -set a boot address and boot mode. - -Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org> ---- - arch/arm/mach-omap2/dsp.c | 4 ++++ - arch/arm/plat-omap/include/plat/dsp.h | 3 +++ - 2 files changed, 7 insertions(+) - -diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c -index 74f18f2..6d37d3c 100644 ---- a/arch/arm/mach-omap2/dsp.c -+++ b/arch/arm/mach-omap2/dsp.c -@@ -20,6 +20,7 @@ - - #include <linux/module.h> - #include <linux/platform_device.h> -+#include "control.h" - #include "cm2xxx_3xxx.h" - #include "prm2xxx_3xxx.h" - #ifdef CONFIG_BRIDGE_DVFS -@@ -45,6 +46,9 @@ static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { - .dsp_cm_read = omap2_cm_read_mod_reg, - .dsp_cm_write = omap2_cm_write_mod_reg, - .dsp_cm_rmw_bits = omap2_cm_rmw_mod_reg_bits, -+ -+ .set_bootaddr = omap_ctrl_write_dsp_boot_addr, -+ .set_bootmode = omap_ctrl_write_dsp_boot_mode, - }; - - static int __init omap_dsp_init(void) -diff --git a/arch/arm/plat-omap/include/plat/dsp.h b/arch/arm/plat-omap/include/plat/dsp.h -index 9c604b3..5927709 100644 ---- a/arch/arm/plat-omap/include/plat/dsp.h -+++ b/arch/arm/plat-omap/include/plat/dsp.h -@@ -18,6 +18,9 @@ struct omap_dsp_platform_data { - u32 (*dsp_cm_read)(s16 , u16); - u32 (*dsp_cm_rmw_bits)(u32, u32, s16, s16); - -+ void (*set_bootaddr)(u32); -+ void (*set_bootmode)(u8); -+ - phys_addr_t phys_mempool_base; - phys_addr_t phys_mempool_size; - }; --- -1.7.10 - diff --git a/patches/dsp/0003-staging-tidspbridge-use-scm-functions-to-set-boot-ad.patch b/patches/dsp/0003-staging-tidspbridge-use-scm-functions-to-set-boot-ad.patch deleted file mode 100644 index db2fa29fa..000000000 --- a/patches/dsp/0003-staging-tidspbridge-use-scm-functions-to-set-boot-ad.patch +++ /dev/null @@ -1,74 +0,0 @@ -From d6ce9d0faee7ea7b49dcbdd2e5965d59311d0671 Mon Sep 17 00:00:00 2001 -From: Omar Ramirez Luna <omar.luna@linaro.org> -Date: Wed, 2 May 2012 21:11:53 -0500 -Subject: [PATCH 3/3] staging: tidspbridge: use scm functions to set boot - address and mode - -Instead of ioremapping SCM registers, use the correspondent layer -to write into them. - -This allows us to get rid of a layer violation, since the registers -are no longer touched by driver code. - -Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org> ---- - drivers/staging/tidspbridge/core/tiomap3430.c | 32 ++++++------------------- - 1 file changed, 7 insertions(+), 25 deletions(-) - -diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c -index 9cf29fc..40b35ca 100644 ---- a/drivers/staging/tidspbridge/core/tiomap3430.c -+++ b/drivers/staging/tidspbridge/core/tiomap3430.c -@@ -70,14 +70,9 @@ - #define PAGES_II_LVL_TABLE 512 - #define PHYS_TO_PAGE(phys) pfn_to_page((phys) >> PAGE_SHIFT) - --/* -- * This is a totally ugly layer violation, but needed until -- * omap_ctrl_set_dsp_boot*() are provided. -- */ --#define OMAP3_IVA2_BOOTMOD_IDLE 1 --#define OMAP2_CONTROL_GENERAL 0x270 --#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) --#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) -+/* IVA Boot modes */ -+#define DIRECT 0 -+#define IDLE 1 - - /* Forward Declarations: */ - static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt); -@@ -414,27 +409,14 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, - - /* Assert RST1 i.e only the RST only for DSP megacell */ - if (!status) { -- /* -- * XXX: ioremapping MUST be removed once ctrl -- * function is made available. -- */ -- void __iomem *ctrl = ioremap(OMAP343X_CTRL_BASE, SZ_4K); -- if (!ctrl) -- return -ENOMEM; -- - (*pdata->dsp_prm_rmw_bits)(OMAP3430_RST1_IVA2_MASK, - OMAP3430_RST1_IVA2_MASK, OMAP3430_IVA2_MOD, - OMAP2_RM_RSTCTRL); -- /* Mask address with 1K for compatibility */ -- __raw_writel(dsp_addr & OMAP3_IVA2_BOOTADDR_MASK, -- ctrl + OMAP343X_CONTROL_IVA2_BOOTADDR); -- /* -- * Set bootmode to self loop if dsp_debug flag is true -- */ -- __raw_writel((dsp_debug) ? OMAP3_IVA2_BOOTMOD_IDLE : 0, -- ctrl + OMAP343X_CONTROL_IVA2_BOOTMOD); - -- iounmap(ctrl); -+ /* Mask address with 1K for compatibility */ -+ pdata->set_bootaddr(dsp_addr & -+ OMAP3_IVA2_BOOTADDR_MASK); -+ pdata->set_bootmode(dsp_debug ? IDLE : DIRECT); - } - } - if (!status) { --- -1.7.10 - diff --git a/patches/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch b/patches/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch deleted file mode 100644 index a3289766d..000000000 --- a/patches/led/0001-leds-heartbeat-stop-on-shutdown-reboot-or-panic.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 4c774f5924e69daa3322164f908df95662847856 Mon Sep 17 00:00:00 2001 -From: Alexander Holler <hol...@ahsoftware.de> -Date: Wed, 25 Apr 2012 00:50:03 +0200 -Subject: [PATCH] leds: heartbeat: stop on shutdown, reboot or panic - -A halted kernel should not show a heartbeat. - -Signed-off-by: Alexander Holler <hol...@ahsoftware.de> -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> ---- - drivers/leds/ledtrig-heartbeat.c | 27 ++++++++++++++++++++++++++- - 1 file changed, 26 insertions(+), 1 deletion(-) - -diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c -index 759c0bb..31c234c 100644 ---- a/drivers/leds/ledtrig-heartbeat.c -+++ b/drivers/leds/ledtrig-heartbeat.c -@@ -18,6 +18,7 @@ - #include <linux/timer.h> - #include <linux/sched.h> - #include <linux/leds.h> -+#include <linux/reboot.h> - #include "leds.h" - - struct heartbeat_trig_data { -@@ -101,13 +102,37 @@ static struct led_trigger heartbeat_led_trigger = { - .deactivate = heartbeat_trig_deactivate, - }; - -+static int heartbeat_reboot_notifier(struct notifier_block *nb, -+ unsigned long code, void *unused) -+{ -+ led_trigger_unregister(&heartbeat_led_trigger); -+ return NOTIFY_DONE; -+} -+ -+static struct notifier_block heartbeat_reboot_nb = { -+ .notifier_call = heartbeat_reboot_notifier, -+}; -+ -+static struct notifier_block heartbeat_panic_nb = { -+ .notifier_call = heartbeat_reboot_notifier, -+}; -+ - static int __init heartbeat_trig_init(void) - { -- return led_trigger_register(&heartbeat_led_trigger); -+ int rc = led_trigger_register(&heartbeat_led_trigger); -+ if (!rc) { -+ atomic_notifier_chain_register(&panic_notifier_list, -+ &heartbeat_panic_nb); -+ register_reboot_notifier(&heartbeat_reboot_nb); -+ } -+ return rc; - } - - static void __exit heartbeat_trig_exit(void) - { -+ unregister_reboot_notifier(&heartbeat_reboot_nb); -+ atomic_notifier_chain_unregister(&panic_notifier_list, -+ &heartbeat_panic_nb); - led_trigger_unregister(&heartbeat_led_trigger); - } - --- -1.7.10 - diff --git a/patches/mainline-fixes/0001-arm-add-definition-of-strstr-to-decompress.c.patch b/patches/mainline-fixes/0001-arm-add-definition-of-strstr-to-decompress.c.patch new file mode 100644 index 000000000..68398fc9e --- /dev/null +++ b/patches/mainline-fixes/0001-arm-add-definition-of-strstr-to-decompress.c.patch @@ -0,0 +1,40 @@ +From 55f4a3b9794564f4b3e3999f2b850f08e78baa2d Mon Sep 17 00:00:00 2001 +From: Shawn Landden <shawnlandden@gmail.com> +Date: Wed, 30 May 2012 13:45:08 -0700 +Subject: [PATCH] arm: add definition of strstr() to decompress.c +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +include/linux/dynamic_debug.h uses strstr from <linux/string.h> +and is included via <linux/kernel.h> from lib/xz/xz_private.h +when CONFIG_KERNEL_XZ=y. + +However arch/arm/boot/compressed/decompress.c defines _LINUX_STRING_H +preventing the load of <linux/string.h> resulting in: + +include/linux/dynamic_debug.h:111:2: error: implicit declaration of function ‘strstr’ + +Define strstr in arch/arm/boot/compressed/decompress.c, providing the needed +subset of <linux/string.h>. + +Signed-off-by: Shawn Landden <shawnlandden@gmail.com> +--- + arch/arm/boot/compressed/decompress.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c +index f41b38c..cdc3cd4 100644 +--- a/arch/arm/boot/compressed/decompress.c ++++ b/arch/arm/boot/compressed/decompress.c +@@ -47,6 +47,7 @@ extern void error(char *); + #ifdef CONFIG_KERNEL_XZ + #define memmove memmove + #define memcpy memcpy ++extern char * strstr(const char *, const char *); + #include "../../../../lib/decompress_unxz.c" + #endif + +-- +1.7.10 + diff --git a/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch b/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch deleted file mode 100644 index 7d61439c9..000000000 --- a/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 665ba7490ad4d62f7c747599cff2dd0a915d4c3c Mon Sep 17 00:00:00 2001 -From: "Govindraj.R" <govindraj.raja@ti.com> -Date: Wed, 21 Mar 2012 15:54:59 +0530 -Subject: [PATCH 2/5] OMAP2+: UART: Remove cpu checks for populating errata - flags - -Currently the errata is populated based on cpu checks this can -be removed and replaced with module version check of uart ip block. -MVR reg is provided within the uart reg map use the same -to populate the errata and thus now errata population and handling -can be managed within the driver itself. - -Cc: Paul Walmsley <paul@pwsan.com> -Cc: Kevin Hilman <khilman@ti.com> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Govindraj.R <govindraj.raja@ti.com> ---- - arch/arm/mach-omap2/serial.c | 8 ---- - arch/arm/plat-omap/include/plat/omap-serial.h | 1 - - drivers/tty/serial/omap-serial.c | 62 ++++++++++++++++++++++++- - 3 files changed, 61 insertions(+), 10 deletions(-) - -diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c -index 619f864..d99df9c 100644 ---- a/arch/arm/mach-omap2/serial.c -+++ b/arch/arm/mach-omap2/serial.c -@@ -245,14 +245,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, - omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate; - omap_up.autosuspend_timeout = info->autosuspend_timeout; - -- /* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */ -- if (!cpu_is_omap2420() && !cpu_is_ti816x()) -- omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS; -- -- /* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */ -- if (cpu_is_omap34xx() || cpu_is_omap3630()) -- omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE; -- - pdata = &omap_up; - pdata_size = sizeof(struct omap_uart_port_info); - -diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h -index 9ff4444..1a52725 100644 ---- a/arch/arm/plat-omap/include/plat/omap-serial.h -+++ b/arch/arm/plat-omap/include/plat/omap-serial.h -@@ -65,7 +65,6 @@ struct omap_uart_port_info { - bool dma_enabled; /* To specify DMA Mode */ - unsigned int uartclk; /* UART clock rate */ - upf_t flags; /* UPF_* flags */ -- u32 errata; - unsigned int dma_rx_buf_size; - unsigned int dma_rx_timeout; - unsigned int autosuspend_timeout; -diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c -index d00b38e..3d02d93 100644 ---- a/drivers/tty/serial/omap-serial.c -+++ b/drivers/tty/serial/omap-serial.c -@@ -44,6 +44,13 @@ - #include <plat/dmtimer.h> - #include <plat/omap-serial.h> - -+#define UART_BUILD_REVISION(x, y) (((x) << 8) | (y)) -+ -+#define OMAP_UART_REV_42 0x0402 -+#define OMAP_UART_REV_46 0x0406 -+#define OMAP_UART_REV_52 0x0502 -+#define OMAP_UART_REV_63 0x0603 -+ - #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/ - - /* SCR register bitmasks */ -@@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data) - return; - } - -+static void omap_serial_fill_features_erratas(struct uart_omap_port *up) -+{ -+ u32 mvr, scheme; -+ u16 revision, major, minor; -+ -+ mvr = serial_in(up, UART_OMAP_MVER); -+ -+ /* Check revision register scheme */ -+ scheme = mvr & (0x03 << 30); -+ scheme >>= 30; -+ -+ switch (scheme) { -+ case 0: /* Legacy Scheme: OMAP2/3 */ -+ /* MINOR_REV[0:4], MAJOR_REV[4:7] */ -+ major = (mvr & 0xf0) >> 4; -+ minor = (mvr & 0x0f); -+ break; -+ case 1: -+ /* New Scheme: OMAP4+ */ -+ /* MINOR_REV[0:5], MAJOR_REV[8:10] */ -+ major = (mvr & 0x7 << 8) >> 8; -+ minor = (mvr & 0x3f); -+ break; -+ default: -+ dev_warn(&up->pdev->dev, -+ "Unknown %s revision, defaulting to highest\n", -+ up->name); -+ /* highest possible revision */ -+ major = 0xff; -+ minor = 0xff; -+ } -+ -+ /* normalize revision for the driver */ -+ revision = UART_BUILD_REVISION(major, minor); -+ -+ switch (revision) { -+ case OMAP_UART_REV_46: -+ up->errata |= (UART_ERRATA_i202_MDR1_ACCESS | -+ UART_ERRATA_i291_DMA_FORCEIDLE); -+ break; -+ case OMAP_UART_REV_52: -+ up->errata |= (UART_ERRATA_i202_MDR1_ACCESS | -+ UART_ERRATA_i291_DMA_FORCEIDLE); -+ break; -+ case OMAP_UART_REV_63: -+ up->errata |= UART_ERRATA_i202_MDR1_ACCESS; -+ break; -+ default: -+ break; -+ } -+} -+ - static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) - { - struct omap_uart_port_info *omap_up_info; -@@ -1439,7 +1498,6 @@ static int serial_omap_probe(struct platform_device *pdev) - "%d\n", DEFAULT_CLK_SPEED); - } - up->uart_dma.uart_base = mem->start; -- up->errata = omap_up_info->errata; - - if (omap_up_info->dma_enabled) { - up->uart_dma.uart_dma_tx = dma_tx->start; -@@ -1469,6 +1527,8 @@ static int serial_omap_probe(struct platform_device *pdev) - pm_runtime_enable(&pdev->dev); - pm_runtime_get_sync(&pdev->dev); - -+ omap_serial_fill_features_erratas(up); -+ - ui[up->port.line] = up; - serial_omap_add_console_port(up); - --- -1.7.10 - diff --git a/patches/panda/0002-panda-enable-bluetooth.patch b/patches/panda/0002-panda-enable-bluetooth.patch deleted file mode 100644 index 588aaa9f6..000000000 --- a/patches/panda/0002-panda-enable-bluetooth.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f8be41ffee54bdbd62bd6bcfe910dec45f5836cb Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Fri, 16 Mar 2012 10:23:09 -0500 -Subject: [PATCH 2/3] panda enable bluetooth - -The PandaBoard features a Texas Instruments WiLink7 Bluetooth -chip, supported by the "btwilink" driver. The "uim" deamon -requires sysfs entries that are filled in using this platform data. - -Signed-off-by: Mircea Gherzan <mgherzan@gmail.com> -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- - include/linux/ti_wilink_st.h | 2 ++ - 2 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c -index 1b782ba..2532366 100644 ---- a/arch/arm/mach-omap2/board-omap4panda.c -+++ b/arch/arm/mach-omap2/board-omap4panda.c -@@ -28,6 +28,7 @@ - #include <linux/mfd/twl6040.h> - #include <linux/regulator/machine.h> - #include <linux/regulator/fixed.h> -+#include <linux/ti_wilink_st.h> - #include <linux/wl12xx.h> - #include <linux/platform_data/omap-abe-twl6040.h> - -@@ -58,12 +59,21 @@ - #define HDMI_GPIO_HPD 63 /* Hotplug detect */ - - /* wl127x BT, FM, GPS connectivity chip */ --static int wl1271_gpios[] = {46, -1, -1}; -+static struct ti_st_plat_data wilink_platform_data = { -+ .nshutdown_gpio = 46, -+ .dev_name = "/dev/ttyO1", -+ .flow_cntrl = 1, -+ .baud_rate = 3000000, -+ .chip_enable = NULL, -+ .suspend = NULL, -+ .resume = NULL, -+}; -+ - static struct platform_device wl1271_device = { - .name = "kim", - .id = -1, - .dev = { -- .platform_data = &wl1271_gpios, -+ .platform_data = &wilink_platform_data, - }, - }; - -diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h -index 2ef4385..3ca0269 100644 ---- a/include/linux/ti_wilink_st.h -+++ b/include/linux/ti_wilink_st.h -@@ -25,6 +25,8 @@ - #ifndef TI_WILINK_ST_H - #define TI_WILINK_ST_H - -+#include <linux/skbuff.h> -+ - /** - * enum proto-type - The protocol on WiLink chips which share a - * common physical interface like UART. --- -1.7.10 - diff --git a/patches/ref_omap2plus_defconfig b/patches/ref_omap2plus_defconfig index d79b48ae4..304a21b2c 100644 --- a/patches/ref_omap2plus_defconfig +++ b/patches/ref_omap2plus_defconfig @@ -1,23 +1,16 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.4.0 Kernel Configuration +# Linux/arm 3.5.0-rc1 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_GENERIC_GPIO=y -# CONFIG_ARCH_USES_GETTIMEOFFSET is not set -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_KTIME_SCALAR=y CONFIG_HAVE_PROC_CPU=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NEED_DMA_MAP_STATE=y @@ -61,10 +54,23 @@ CONFIG_HAVE_GENERIC_HARDIRQS=y # IRQ subsystem # CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y # CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y # # RCU Subsystem @@ -72,6 +78,7 @@ CONFIG_IRQ_DOMAIN=y CONFIG_TREE_RCU=y # CONFIG_PREEMPT_RCU is not set CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_RCU_FAST_NO_HZ is not set # CONFIG_TREE_RCU_TRACE is not set @@ -119,7 +126,6 @@ CONFIG_PERF_USE_VMALLOC=y # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y -# CONFIG_PERF_COUNTERS is not set # CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_COMPAT_BRK=y @@ -135,8 +141,11 @@ CONFIG_KPROBES=y CONFIG_KRETPROBES=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y @@ -252,8 +261,6 @@ CONFIG_MMU=y # CONFIG_ARCH_IOP13XX is not set # CONFIG_ARCH_IOP32X is not set # CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_DOVE is not set # CONFIG_ARCH_KIRKWOOD is not set @@ -327,8 +334,8 @@ CONFIG_ARCH_OMAP4=y CONFIG_SOC_OMAP2420=y CONFIG_SOC_OMAP2430=y CONFIG_SOC_OMAP3430=y -CONFIG_SOC_OMAPTI81XX=y -CONFIG_SOC_OMAPAM33XX=y +CONFIG_SOC_TI81XX=y +CONFIG_SOC_AM33XX=y CONFIG_OMAP_PACKAGE_ZAF=y CONFIG_OMAP_PACKAGE_ZAC=y CONFIG_OMAP_PACKAGE_CBB=y @@ -379,10 +386,6 @@ CONFIG_MACH_OMAP4_PANDA=y # CONFIG_OMAP3_SDRC_AC_TIMING is not set # CONFIG_OMAP4_ERRATA_I688 is not set -# -# System MMU -# - # # Processor Type # @@ -451,10 +454,6 @@ CONFIG_ARM_GIC=y # # Kernel Features # -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_HAVE_SMP=y CONFIG_SMP=y CONFIG_SMP_ON_UP=y @@ -462,6 +461,7 @@ CONFIG_ARM_CPU_TOPOLOGY=y # CONFIG_SCHED_MC is not set # CONFIG_SCHED_SMT is not set CONFIG_HAVE_ARM_SCU=y +# CONFIG_ARM_ARCH_TIMER is not set CONFIG_HAVE_ARM_TWD=y CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_2G is not set @@ -481,7 +481,8 @@ CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set CONFIG_HAVE_ARCH_PFN_VALID=y -# CONFIG_HIGHMEM is not set +CONFIG_HIGHMEM=y +# CONFIG_HIGHPTE is not set CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y @@ -493,9 +494,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=999999 CONFIG_MIGRATION=y # CONFIG_PHYS_ADDR_T_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_CLEANCACHE is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_LEDS=y @@ -563,6 +566,8 @@ CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y +# CONFIG_PM_AUTOSLEEP is not set +# CONFIG_PM_WAKELOCKS is not set CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y @@ -585,6 +590,7 @@ CONFIG_PACKET=y CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set CONFIG_XFRM=y +CONFIG_XFRM_ALGO=y CONFIG_XFRM_USER=y # CONFIG_XFRM_SUB_POLICY is not set CONFIG_XFRM_MIGRATE=y @@ -659,7 +665,6 @@ CONFIG_NETFILTER_ADVANCED=y # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_PHONET is not set # CONFIG_IEEE802154 is not set @@ -672,7 +677,6 @@ CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y CONFIG_BQL=y -CONFIG_HAVE_BPF_JIT=y # CONFIG_BPF_JIT is not set # @@ -739,6 +743,7 @@ CONFIG_MAC80211_RC_DEFAULT="pid" # CONFIG_CAIF is not set # CONFIG_CEPH_LIB is not set # CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y # # Device Drivers @@ -782,7 +787,7 @@ CONFIG_MTD=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set -# CONFIG_MTD_OF_PARTS is not set +CONFIG_MTD_OF_PARTS=y # CONFIG_MTD_AR7_PARTS is not set # @@ -860,6 +865,7 @@ CONFIG_MTD_NAND=y # CONFIG_MTD_NAND_MUSEUM_IDS is not set # CONFIG_MTD_NAND_GPIO is not set CONFIG_MTD_NAND_OMAP2=y +# CONFIG_MTD_NAND_OMAP_BCH is not set CONFIG_MTD_NAND_IDS=y # CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_DOCG4 is not set @@ -882,7 +888,6 @@ CONFIG_MTD_UBI=y CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_RESERVE=1 # CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_MTD_UBI_DEBUG is not set CONFIG_DTC=y CONFIG_OF=y @@ -896,10 +901,8 @@ CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_DEVICE=y -CONFIG_OF_GPIO=y CONFIG_OF_I2C=y CONFIG_OF_NET=y -CONFIG_OF_SPI=y CONFIG_OF_MDIO=y CONFIG_OF_MTD=y # CONFIG_PARPORT is not set @@ -938,7 +941,8 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 # CONFIG_HMC6352 is not set # CONFIG_DS1682 is not set # CONFIG_TI_DAC7512 is not set -# CONFIG_BMP085 is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_BMP085_SPI is not set # CONFIG_USB_SWITCH_FSA9480 is not set # CONFIG_C2PORT is not set @@ -1068,6 +1072,9 @@ CONFIG_NET_VENDOR_TI=y # CONFIG_TI_DAVINCI_MDIO is not set # CONFIG_TI_DAVINCI_CPDMA is not set # CONFIG_TI_CPSW is not set +CONFIG_NET_VENDOR_WIZNET=y +# CONFIG_WIZNET_W5100 is not set +# CONFIG_WIZNET_W5300 is not set CONFIG_PHYLIB=y # @@ -1090,6 +1097,7 @@ CONFIG_SMSC_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set # CONFIG_MICREL_KS8995MA is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set @@ -1108,7 +1116,7 @@ CONFIG_USB_NET_CDCETHER=y CONFIG_USB_NET_CDC_NCM=y # CONFIG_USB_NET_DM9601 is not set # CONFIG_USB_NET_SMSC75XX is not set -# CONFIG_USB_NET_SMSC95XX is not set +CONFIG_USB_NET_SMSC95XX=y # CONFIG_USB_NET_GL620A is not set CONFIG_USB_NET_NET1080=y # CONFIG_USB_NET_PLUSB is not set @@ -1151,8 +1159,7 @@ CONFIG_LIBERTAS_DEBUG=y # CONFIG_P54_COMMON is not set # CONFIG_RT2X00 is not set # CONFIG_RTL8192CU is not set -# CONFIG_WL1251 is not set -# CONFIG_WL12XX_MENU is not set +# CONFIG_WL_TI is not set # CONFIG_ZD1211RW is not set # CONFIG_MWIFIEX is not set @@ -1169,6 +1176,7 @@ CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_POLLDEV is not set # CONFIG_INPUT_SPARSEKMAP is not set +CONFIG_INPUT_MATRIXKMAP=y # # Userland interfaces @@ -1195,6 +1203,7 @@ CONFIG_KEYBOARD_GPIO=y # CONFIG_KEYBOARD_TCA6416 is not set # CONFIG_KEYBOARD_TCA8418 is not set # CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8333 is not set # CONFIG_KEYBOARD_MAX7359 is not set # CONFIG_KEYBOARD_MCS is not set # CONFIG_KEYBOARD_MPR121 is not set @@ -1243,6 +1252,7 @@ CONFIG_TOUCHSCREEN_ADS7846=y # CONFIG_TOUCHSCREEN_GUNZE is not set # CONFIG_TOUCHSCREEN_ELO is not set # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_WACOM_I2C is not set # CONFIG_TOUCHSCREEN_MAX11801 is not set # CONFIG_TOUCHSCREEN_MCS5000 is not set # CONFIG_TOUCHSCREEN_MTOUCH is not set @@ -1323,6 +1333,7 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_8250_DW is not set +# CONFIG_SERIAL_8250_EM is not set # # Non-8250 serial port support @@ -1344,11 +1355,11 @@ CONFIG_SERIAL_OMAP_CONSOLE=y # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_ATMEL is not set CONFIG_HW_RANDOM_OMAP=y # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set # CONFIG_TCG_TPM is not set -# CONFIG_RAMOOPS is not set CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y @@ -1426,8 +1437,10 @@ CONFIG_SPI_OMAP24XX=y # # Enable Device Drivers -> PPS to see the PTP clock options. # +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y CONFIG_DEBUG_GPIO=y CONFIG_GPIO_SYSFS=y @@ -1435,6 +1448,7 @@ CONFIG_GPIO_SYSFS=y # Memory mapped GPIO drivers: # # CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_EM is not set # # I2C GPIO expanders: @@ -1591,6 +1605,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_ADS7828 is not set # CONFIG_SENSORS_ADS7871 is not set # CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA2XX is not set # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP102 is not set # CONFIG_SENSORS_TMP401 is not set @@ -1647,6 +1662,7 @@ CONFIG_MFD_CORE=y # CONFIG_HTC_EGPIO is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_LM3533 is not set # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set # CONFIG_TPS6507X is not set @@ -1672,6 +1688,7 @@ CONFIG_MFD_TWL4030_AUDIO=y # CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_I2C is not set # CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX77693 is not set # CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_MAX8997 is not set # CONFIG_MFD_MAX8998 is not set @@ -1682,13 +1699,16 @@ CONFIG_MFD_TWL4030_AUDIO=y # CONFIG_MFD_WM8350_I2C is not set # CONFIG_MFD_WM8994 is not set # CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_MC13XXX is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_ABX500_CORE is not set # CONFIG_EZX_PCAP is not set # CONFIG_MFD_WL1273_CORE is not set +CONFIG_MFD_OMAP_USB_HOST=y # CONFIG_MFD_TPS65090 is not set # CONFIG_MFD_AAT2870_CORE is not set # CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_PALMAS is not set CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set # CONFIG_REGULATOR_DUMMY is not set @@ -1748,6 +1768,7 @@ CONFIG_FB_TILEBLITTING=y # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set CONFIG_OMAP2_VRAM=y CONFIG_OMAP2_VRFB=y CONFIG_OMAP2_DSS=m @@ -1760,7 +1781,6 @@ CONFIG_OMAP2_DSS_VENC=y CONFIG_OMAP4_DSS_HDMI=y CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_DSI=y -# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y CONFIG_FB_OMAP2=m @@ -1771,7 +1791,7 @@ CONFIG_FB_OMAP2_NUM_FBS=3 # OMAP2/3 Display Device Drivers # CONFIG_PANEL_GENERIC_DPI=m -# CONFIG_PANEL_DVI is not set +# CONFIG_PANEL_TFP410 is not set # CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set CONFIG_PANEL_SHARP_LS037V7DW01=m CONFIG_PANEL_NEC_NL8048HL11_01B=m @@ -1871,7 +1891,7 @@ CONFIG_SND_OMAP_SOC_MCBSP=m # CONFIG_SND_OMAP_SOC_OMAP3EVM is not set # CONFIG_SND_OMAP_SOC_AM3517EVM is not set # CONFIG_SND_OMAP_SOC_SDP3430 is not set -# CONFIG_SND_OMAP_SOC_OMAP4_HDMI is not set +# CONFIG_SND_OMAP_SOC_OMAP_HDMI is not set CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m # CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE is not set # CONFIG_SND_OMAP_SOC_ZOOM2 is not set @@ -1879,6 +1899,7 @@ CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m CONFIG_SND_SOC_I2C_AND_SPI=m # CONFIG_SND_SOC_ALL_CODECS is not set CONFIG_SND_SOC_TWL4030=m +# CONFIG_SND_SIMPLE_CARD is not set # CONFIG_SOUND_PRIME is not set CONFIG_HID_SUPPORT=y CONFIG_HID=y @@ -1895,9 +1916,11 @@ CONFIG_USB_HID=y # # Special HID drivers # +CONFIG_HID_GENERIC=y # CONFIG_HID_A4TECH is not set # CONFIG_HID_ACRUX is not set # CONFIG_HID_APPLE is not set +# CONFIG_HID_AUREAL is not set # CONFIG_HID_BELKIN is not set # CONFIG_HID_CHERRY is not set # CONFIG_HID_CHICONY is not set @@ -1951,8 +1974,6 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # # Miscellaneous USB options # -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y # CONFIG_USB_DYNAMIC_MINORS is not set CONFIG_USB_SUSPEND=y # CONFIG_USB_OTG is not set @@ -1966,15 +1987,20 @@ CONFIG_USB_MON=y # USB Host Controller Drivers # # CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_EHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_OMAP=y # CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_ISP1760_HCD is not set # CONFIG_USB_ISP1362_HCD is not set # CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_EHCI_HCD_PLATFORM is not set # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set # CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_CHIPIDEA is not set # CONFIG_USB_RENESAS_USBHS is not set # @@ -2037,18 +2063,28 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_IDMOUSE is not set # CONFIG_USB_FTDI_ELAN is not set # CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TRANCEVIBRATOR is not set # CONFIG_USB_IOWARRIOR is not set CONFIG_USB_TEST=y # CONFIG_USB_ISIGHTFW is not set # CONFIG_USB_YUREX is not set + +# +# USB Physical Layer drivers +# +# CONFIG_USB_ISP1301 is not set CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG=y CONFIG_USB_GADGET_DEBUG_FILES=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# # CONFIG_USB_FUSB300 is not set # CONFIG_USB_OMAP is not set # CONFIG_USB_R8A66597 is not set @@ -2104,7 +2140,6 @@ CONFIG_SDIO_UART=y # CONFIG_MMC_SDHCI_PXAV2 is not set CONFIG_MMC_OMAP=y CONFIG_MMC_OMAP_HS=y -# CONFIG_MMC_SPI is not set # CONFIG_MMC_DW is not set # CONFIG_MMC_VUB300 is not set # CONFIG_MMC_USHC is not set @@ -2217,6 +2252,9 @@ CONFIG_IOMMU_SUPPORT=y # # CONFIG_VIRT_DRIVERS is not set # CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set # # File systems @@ -2313,11 +2351,9 @@ CONFIG_JFFS2_CMODE_PRIORITY=y # CONFIG_JFFS2_CMODE_SIZE is not set # CONFIG_JFFS2_CMODE_FAVOURLZO is not set CONFIG_UBIFS_FS=y -# CONFIG_UBIFS_FS_XATTR is not set # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_FS_DEBUG is not set # CONFIG_LOGFS is not set CONFIG_CRAMFS=y # CONFIG_SQUASHFS is not set @@ -2333,6 +2369,7 @@ CONFIG_CRAMFS=y # CONFIG_UFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y +CONFIG_NFS_V2=y CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y @@ -2392,6 +2429,17 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_UTF8 is not set # @@ -2404,6 +2452,7 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 CONFIG_MAGIC_SYSRQ=y # CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set @@ -2436,6 +2485,7 @@ CONFIG_TRACE_IRQFLAGS=y CONFIG_STACKTRACE=y # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_INFO_REDUCED is not set @@ -2485,6 +2535,7 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_STACK_TRACER is not set # CONFIG_BLK_DEV_IO_TRACE is not set CONFIG_KPROBE_EVENT=y +CONFIG_PROBE_EVENTS=y # CONFIG_RING_BUFFER_BENCHMARK is not set # CONFIG_DYNAMIC_DEBUG is not set # CONFIG_DMA_API_DEBUG is not set @@ -2658,3 +2709,4 @@ CONFIG_NLATTR=y CONFIG_GENERIC_ATOMIC64=y CONFIG_AVERAGE=y # CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch b/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch index 64539e310..a62015d93 100644 --- a/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch +++ b/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch @@ -1,4 +1,4 @@ -From 6cf2b8e06173c45cf65a43081718994f4202c9dc Mon Sep 17 00:00:00 2001 +From b7e8c602e2f4dc86cddef3b544a0620723f23a31 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Tue, 19 Jan 2010 21:19:15 -0800 Subject: [PATCH 1/3] OMAP: DSS2: add bootarg for selecting svideo @@ -13,7 +13,7 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c -index 9c3daf7..75dd2dc 100644 +index 2b89739..aaf2d81 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -87,6 +87,11 @@ @@ -28,9 +28,9 @@ index 9c3daf7..75dd2dc 100644 struct venc_config { u32 f_control; u32 vidout_ctrl; -@@ -490,6 +495,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev) - { - dssdev->panel.timings = omap_dss_pal_timings; +@@ -454,6 +459,23 @@ static int venc_power_on(struct omap_dss_device *dssdev) + if (r) + goto err; + /* Allow the TV output to be overriden */ + if (tv_connection) { @@ -50,13 +50,13 @@ index 9c3daf7..75dd2dc 100644 + } + return 0; - } + err: diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c -index b00db40..bce8a4f 100644 +index 3450ea0..fc1c837 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c -@@ -2000,7 +2000,15 @@ static int omapfb_mode_to_timings(const char *mode_str, +@@ -2001,7 +2001,15 @@ static int omapfb_mode_to_timings(const char *mode_str, int r; #ifdef CONFIG_OMAP2_DSS_VENC diff --git a/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch b/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch deleted file mode 100644 index 88ae834d8..000000000 --- a/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c6cb0de46a8ae91273fcd18397bd08d20f44f97c Mon Sep 17 00:00:00 2001 -From: Steve Sakoman <steve@sakoman.com> -Date: Wed, 12 Jan 2011 05:54:55 -0800 -Subject: [PATCH 3/3] omap: mmc: Adjust dto to eliminate timeout errors - -A number of SD card types were experiencing timeout errors. This -could also lead to data corruption in some cases. - -This fix proposed by Sukumar Ghoral of TI. - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - drivers/mmc/host/omap_hsmmc.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index 56d4499..819488f 100644 ---- a/drivers/mmc/host/omap_hsmmc.c -+++ b/drivers/mmc/host/omap_hsmmc.c -@@ -1376,6 +1376,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host, - cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd); - timeout = timeout_ns / cycle_ns; - timeout += timeout_clks; -+ timeout *= 2; - if (timeout) { - while ((timeout & 0x80000000) == 0) { - dto += 1; --- -1.7.10 - diff --git a/version.sh b/version.sh index c7cf5e23e..edd15a6ea 100644 --- a/version.sh +++ b/version.sh @@ -8,10 +8,10 @@ KERNEL_REL=3.4 #STABLE_PATCH=1 #for x.x-rcX -#RC_KERNEL=3.4 -#RC_PATCH=-rc7 +RC_KERNEL=3.5 +RC_PATCH=-rc1 -ABI=4 +ABI=0 BUILD=d${ABI} -- GitLab