Re: [RFT/PATCH] Input: bfin_rotary - introduce open and close methods
Hi Sonic, On Fri, Feb 06, 2015 at 05:37:29PM +0800, Sonic Zhang wrote: > Hi Dmitry, > > After apply your patch manually to my blackfin kernel tree, I got > kernel panic when probe the rotary. Hmm, I found one potential issue that might cause panic, but it was preexisting Anyway, I uploaded all bfin_rotary patches on top of 3.19 into bfin_rotary branch of my tree on kernel.org, can you please grab them from there and try again? Thanks! > > NULL pointer access > Kernel OOPS in progress > Deferred Exception context > CURRENT PROCESS: > COMM=swapper PID=1 CPU=0 > invalid mm > return address: [0x00167648]; contents of: > 0x00167620: f000 b068 0a08 1807 3038 3007 e801 > 0x00167630: 05b3 0010 3044 6001 e3fc da5a b0a8 0c80 > 0x00167640: 191b 6802 6000 [e511] 0075 ac4a 9710 > 0x00167650: ac4a 6c22 9710 a3a2 a0a9 0c02 18ec cc00 > > CPU: 0 PID: 1 Comm: swapper Not tainted > 3.17.0-ADI-2014R1-pre-00455-ga5d060e-dirty #5 > task: 04025a20 ti: 04026000 task.ti: 04026000 > Compiled for cpu family 0x27fe (Rev 0), but running on:0x (Rev 0) > ADSP-BF609-0.0 500(MHz CCLK) 125(MHz SCLK) (mpu off) > Linux version 3.17.0-ADI-2014R1-pre-00455-ga5d060e-dirty (sonic@nine) > (gcc version 4.3.5 (ADI-mast5 > > SEQUENCER STATUS: Not tainted > SEQSTAT: 0027 IPEND: 8008 IMASK: SYSCFG: 2806 > EXCAUSE : 0x27 > physical IVG3 asserted : <0xffa00744> { _trap + 0x0 } > physical IVG15 asserted : <0xffa00d68> { _evt_system_call + 0x0 } > logical irq 6 mapped : <0xffa003bc> { _bfin_coretmr_interrupt + 0x0 } > logical irq 7 mapped : <0x8858> { _bfin_fault_routine + 0x0 } > logical irq 11 mapped : <0x7754> { _l2_ecc_err + 0x0 } > logical irq 13 mapped : <0x8858> { _bfin_fault_routine + 0x0 } > logical irq 39 mapped : <0x0016a350> { _bfin_twi_interrupt_entry + 0x0 } > logical irq 40 mapped : <0x0016a350> { _bfin_twi_interrupt_entry + 0x0 } > logical irq 62 mapped : <0x00132438> { _adi_spi_tx_dma_isr + 0x0 } > logical irq 63 mapped : <0x00132784> { _adi_spi_rx_dma_isr + 0x0 } > logical irq 64 mapped : <0x0013282c> { _spi_irq_err + 0x0 } > logical irq 65 mapped : <0x00132438> { _adi_spi_tx_dma_isr + 0x0 } > logical irq 66 mapped : <0x00132784> { _adi_spi_rx_dma_isr + 0x0 } > logical irq 67 mapped : <0x0013282c> { _spi_irq_err + 0x0 } > RETE: <0x> /* Maybe null pointer? */ > RETN: <0x04027cf4> /* kernel dynamic memory (maybe user-space) */ > RETX: <0x0480> /* Maybe fixed code section */ > RETS: <0x0016763c> { _bfin_rotary_probe + 0x54 } > PC : <0x00167648> { _bfin_rotary_probe + 0x60 } > DCPLB_FAULT_ADDR: <0x01d4> /* Maybe null pointer? */ > ICPLB_FAULT_ADDR: <0x00167648> { _bfin_rotary_probe + 0x60 } > PROCESSOR STATE: > R0 : R1 : R2 : 0400R3 : 0001 > R4 : 0030c310R5 : 002d6680R6 : 002e7bd8R7 : > P0 : 0002P1 : 002e86acP2 : P3 : 002e8690 > P4 : 002e7bccP5 : 0409930cFP : 04027d10SP : 04027c18 > LB0: ffa015b8LT0: ffa015b8LC0: > LB1: 00094072LT1: 00094062LC1: > B0 : 001fL0 : M0 : 0402a400I0 : 04027c44 > B1 : 000eL1 : M1 : 002fa814I1 : 0407846c > B2 : 0020L2 : M2 : I2 : 04028ac8 > B3 : 0022aa6cL3 : M3 : I3 : 001a > A0.w: A0.x: A1.w: A1.x: > USP : ASTAT: 02003004 > > Hardware Trace: >0 Target : <0x3fe8> { _trap_c + 0x0 } > Source : <0xffa006d8> { _exception_to_level5 + 0xa0 } JUMP.L >1 Target : <0xffa00638> { _exception_to_level5 + 0x0 } > Source : <0xffa004f2> { _bfin_return_from_exception + 0x6 } RTX >2 Target : <0xffa004ec> { _bfin_return_from_exception + 0x0 } > Source : <0xffa00590> { _ex_trap_c + 0x70 } JUMP.S >3 Target : <0xffa00520> { _ex_trap_c + 0x0 } > Source : <0xffa0076e> { _trap + 0x2a } JUMP (P4) >4 Target : <0xffa00744> { _trap + 0x0 } > FAULT : <0x00167648> { _bfin_rotary_probe + 0x60 } P1 = [P2 + -0x54] > Source : <0x00167646> { _bfin_rotary_probe + 0x5e } 0x6000 >5 Target : <0x0016763c> { _bfin_rotary_probe + 0x54 } > Source : <0x00102b50> { _platform_get_irq + 0x64 } RTS >6 Target : <0x00102b44> { _platform_get_irq + 0x58 } > Source : <0x00102b2c> { _platform_get_irq + 0x40 } IF CC JUMP pcrel >7 Target : <0x00102b0a> { _platform_get_irq + 0x1e } > Source : <0x00102b28> { _platform_get_irq + 0x3c } IF !CC JUMP pcrel (BP) >8 Target : <0x00102b14> { _platform_get_irq + 0x28 } > Source : <0x00102b08> { _platform_get_irq + 0x1c } JUMP.S >9 Target : <0x00102aec> { _platform_get_irq + 0x0 } > Source : <0x00167638> { _bfin_rotary_probe + 0x50 } JUMP.L > 10 Target : <0x00167634> { _bfin_rotary_probe + 0x4c } > Source : <0x00167626> { _bfin_rotary_probe + 0x3e } IF CC JUMP
Re: [RFC][PATCH v3] procfs: Always expose /proc//map_files/ and make it readable
On Wed, Feb 11, 2015 at 06:29:10PM -0800, Calvin Owens wrote: > Currently, /proc//map_files/ is restricted to CAP_SYS_ADMIN, and is > only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is > useful for enumerating the files mapped into a process when the more > verbose information in /proc//maps is not needed. It also allows > access to file descriptors for files that have been deleted and closed > but are still mmapped into a process, which can be very useful for > introspection and debugging. ... > > +/* > + * Enforce stronger PTRACE_MODE_ATTACH permissions on the symlinks under > + * /proc//map_files, since these links may refer to deleted or O_TMPFILE > + * files that users might assume are inaccessible regardless of their > + * ownership/permissions. > + */ > +static void *proc_map_files_follow_link(struct dentry *dentry, struct > nameidata *nd) > +{ > + struct inode *inode = dentry->d_inode; > + struct task_struct *task; > + int allowed = 0; > + > + task = get_proc_task(inode); > + if (task) { > + allowed = ptrace_may_access(task, PTRACE_MODE_ATTACH); > + put_task_struct(task); > + } else return ERR_PTR(-ESRCH); Other than that, looks good to me, thanks! Rewieved-by: Cyrill Gorcunov -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Input: sun4i-ts: add thermal driver dependency
On Fri, Jan 30, 2015 at 2:51 AM, Dmitry Torokhov wrote: > On Thu, Jan 29, 2015 at 08:50:18AM +0100, Hans de Goede wrote: >> Hi, >> >> On 28-01-15 16:17, Arnd Bergmann wrote: >> >The sun4i-ts driver has had a dependency on the thermal code >> >since it was first merged, >> >> The "since it was first merged bit" is not true, this is caused >> by recent changes by ChenYu. >> >> Other then that no objections from me against the proposed fix. >> >> Regards, >> >> Hans >> >> >> but this is not currently enforced >> >in Kconfig, so in some randconfig builds we get >> > >> >drivers/built-in.o: In function `sun4i_ts_remove': >> >:(.text+0x2376f4): undefined reference to >> >`thermal_zone_of_sensor_unregister' >> >drivers/built-in.o: In function `sun4i_ts_probe': >> >:(.text+0x237a94): undefined reference to `thermal_zone_of_sensor_register' >> >:(.text+0x237c00): undefined reference to >> >`thermal_zone_of_sensor_unregister' >> > >> >We need the dependency on THERMAL in order to ensure that this >> >driver becomes a loadable module if the thermal support itself >> >is modular, while the dependency on THERMAL_OF is a runtime dependency >> >and the driver will still build but not work if it is missing. >> > >> >Signed-off-by: Arnd Bergmann >> >Fixes: 6decea7c5438e2 ("Input: add driver for Allwinner sunxi SoC's rtp >> >controller") >> > >> >diff --git a/drivers/input/touchscreen/Kconfig >> >b/drivers/input/touchscreen/Kconfig >> >index 58917525126e..e2447f0063b7 100644 >> >--- a/drivers/input/touchscreen/Kconfig >> >+++ b/drivers/input/touchscreen/Kconfig >> >@@ -943,6 +943,8 @@ config TOUCHSCREEN_SUN4I >> > tristate "Allwinner sun4i resistive touchscreen controller support" >> > depends on ARCH_SUNXI || COMPILE_TEST >> > depends on HWMON >> >+depends on THERMAL >> >+depends on THERMAL_OF || COMPILE_TEST > > THERMAL_OF does have proper stubs and I do not see why we need to force > having TERMAL even if we don't do compile test. Should the dependency be: > > depends on !THERMAL_OF || TERMAL ^^^ typo Yes this solves the problem. ChenYu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 4/4] phy: add phy-hi6220-usb
Add usb phy controller for hi6220 platform Signed-off-by: Zhangfei Gao --- drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-hi6220-usb.c | 306 +++ 3 files changed, 316 insertions(+) create mode 100644 drivers/phy/phy-hi6220-usb.c diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index ccad880..40a1ef1 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -162,6 +162,15 @@ config PHY_HIX5HD2_SATA help Support for SATA PHY on Hisilicon hix5hd2 Soc. +config PHY_HI6220_USB + tristate "hi6220 USB PHY support" + select USB_PHY + select MFD_SYSCON + help + Enable this to support the HISILICON HI6220 USB PHY. + + To compile this driver as a module, choose M here. + config PHY_SUN4I_USB tristate "Allwinner sunxi SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile index aa74f96..ec43c2d 100644 --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile @@ -19,6 +19,7 @@ obj-$(CONFIG_TI_PIPE3)+= phy-ti-pipe3.o obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o obj-$(CONFIG_PHY_EXYNOS5250_SATA) += phy-exynos5250-sata.o obj-$(CONFIG_PHY_HIX5HD2_SATA) += phy-hix5hd2-sata.o +obj-$(CONFIG_PHY_HI6220_USB) += phy-hi6220-usb.o obj-$(CONFIG_PHY_SUN4I_USB)+= phy-sun4i-usb.o obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-exynos-usb2.o phy-exynos-usb2-y += phy-samsung-usb2.o diff --git a/drivers/phy/phy-hi6220-usb.c b/drivers/phy/phy-hi6220-usb.c new file mode 100644 index 000..0d9f5ac --- /dev/null +++ b/drivers/phy/phy-hi6220-usb.c @@ -0,0 +1,306 @@ +/* + * Copyright (c) 2015 Linaro Ltd. + * Copyright (c) 2015 Hisilicon Limited. + * + * 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 option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define SC_PERIPH_CTRL40x00c + +#define CTRL4_PICO_SIDDQ BIT(6) +#define CTRL4_PICO_OGDISABLE BIT(8) +#define CTRL4_PICO_VBUSVLDEXT BIT(10) +#define CTRL4_PICO_VBUSVLDEXTSEL BIT(11) +#define CTRL4_OTG_PHY_SEL BIT(21) + +#define SC_PERIPH_CTRL50x010 + +#define CTRL5_USBOTG_RES_SEL BIT(3) +#define CTRL5_PICOPHY_ACAENB BIT(4) +#define CTRL5_PICOPHY_BC_MODE BIT(5) +#define CTRL5_PICOPHY_CHRGSEL BIT(6) +#define CTRL5_PICOPHY_VDATSRCEND BIT(7) +#define CTRL5_PICOPHY_VDATDETENB BIT(8) +#define CTRL5_PICOPHY_DCDENB BIT(9) +#define CTRL5_PICOPHY_IDDIGBIT(10) + +#define SC_PERIPH_CTRL80x018 +#define SC_PERIPH_RSTEN0 0x300 +#define SC_PERIPH_RSTDIS0 0x304 + +#define RST0_USBOTG_BUSBIT(4) +#define RST0_POR_PICOPHY BIT(5) +#define RST0_USBOTGBIT(6) +#define RST0_USBOTG_32KBIT(7) + +#define EYE_PATTERN_PARA 0x7053348c + +struct hi6220_priv { + struct usb_phy phy; + struct delayed_work work; + struct regmap *reg; + struct clk *clk; + struct regulator *vcc; + struct device *dev; + int gpio_vbus; + int gpio_id; + enum usb_otg_state state; +}; + +static void hi6220_start_peripheral(struct hi6220_priv *priv, bool on) +{ + struct usb_otg *otg = priv->phy.otg; + + if (!otg->gadget) + return; + + if (on) + usb_gadget_connect(otg->gadget); + else + usb_gadget_disconnect(otg->gadget); +} + +static void hi6220_detect_work(struct work_struct *work) +{ + struct hi6220_priv *priv = + container_of(work, struct hi6220_priv, work.work); + int gpio_id, gpio_vbus; + enum usb_otg_state state; + + if (!gpio_is_valid(priv->gpio_id) || !gpio_is_valid(priv->gpio_vbus)) + return; + + gpio_id = gpio_get_value_cansleep(priv->gpio_id); + gpio_vbus = gpio_get_value_cansleep(priv->gpio_vbus); + + if (gpio_vbus == 0) { + if (gpio_id == 1) + state = OTG_STATE_B_PERIPHERAL; + else + state = OTG_STATE_A_HOST; + } else { + state = OTG_STATE_A_HOST; + } + + if (priv->state != state) { + hi6220_start_peripheral(priv, state == OTG_STATE_B_PERIPHERAL); + priv->state = state; + } +} + +static irqreturn_t hiusb_gpio_intr(int irq, void *data) +{ + struct hi6220_priv *priv = (struct hi6220_priv *)data; + + /* add debounce time *
[PATCH v4 3/4] usb: dwc2: platform: add hi6220 support
Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..f7c67db 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -50,6 +50,35 @@ static const char dwc2_driver_name[] = "dwc2"; +static const struct dwc2_core_params params_hi6220 = { + .otg_cap= 2,/* No HNP/SRP capable */ + .otg_ver= 0,/* 1.3 */ + .dma_enable = 1, + .dma_desc_enable= 0, + .speed = 0,/* High Speed */ + .enable_dynamic_fifo= 1, + .en_multiple_tx_fifo= 1, + .host_rx_fifo_size = 512, + .host_nperio_tx_fifo_size = 512, + .host_perio_tx_fifo_size= 512, + .max_transfer_size = 65535, + .max_packet_count = 511, + .host_channels = 16, + .phy_type = 1,/* UTMI */ + .phy_utmi_width = 8, + .phy_ulpi_ddr = 0,/* Single */ + .phy_ulpi_ext_vbus = 0, + .i2c_enable = 0, + .ulpi_fs_ls = 0, + .host_support_fs_ls_low_power = 0, + .host_ls_low_power_phy_clk = 0,/* 48 MHz */ + .ts_dline = 0, + .reload_ctl = 0, + .ahbcfg = GAHBCFG_HBSTLEN_INCR16 << + GAHBCFG_HBSTLEN_SHIFT, + .uframe_sched = 0, +}; + static const struct dwc2_core_params params_bcm2835 = { .otg_cap= 0,/* HNP/SRP capable */ .otg_ver= 0,/* 1.3 */ @@ -129,6 +158,7 @@ static int dwc2_driver_remove(struct platform_device *dev) static const struct of_device_id dwc2_of_match_table[] = { { .compatible = "brcm,bcm2835-usb", .data = ¶ms_bcm2835 }, + { .compatible = "hisilicon,hi6220-usb", .data = ¶ms_hi6220 }, { .compatible = "rockchip,rk3066-usb", .data = ¶ms_rk3066 }, { .compatible = "snps,dwc2", .data = NULL }, { .compatible = "samsung,s3c6400-hsotg", .data = NULL}, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Input: sun4i-ts: add thermal driver dependency
Hi, On Thu, Feb 12, 2015 at 3:01 PM, Hans de Goede wrote: > Hi, > > > On 11-02-15 19:24, Dmitry Torokhov wrote: >> >> On Thu, Jan 29, 2015 at 10:51:51AM -0800, Dmitry Torokhov wrote: >>> >>> On Thu, Jan 29, 2015 at 08:50:18AM +0100, Hans de Goede wrote: Hi, On 28-01-15 16:17, Arnd Bergmann wrote: > > The sun4i-ts driver has had a dependency on the thermal code > since it was first merged, The "since it was first merged bit" is not true, this is caused by recent changes by ChenYu. Other then that no objections from me against the proposed fix. Regards, Hans but this is not currently enforced > > in Kconfig, so in some randconfig builds we get > > drivers/built-in.o: In function `sun4i_ts_remove': > :(.text+0x2376f4): undefined reference to > `thermal_zone_of_sensor_unregister' > drivers/built-in.o: In function `sun4i_ts_probe': > :(.text+0x237a94): undefined reference to > `thermal_zone_of_sensor_register' > :(.text+0x237c00): undefined reference to > `thermal_zone_of_sensor_unregister' > > We need the dependency on THERMAL in order to ensure that this > driver becomes a loadable module if the thermal support itself > is modular, while the dependency on THERMAL_OF is a runtime dependency > and the driver will still build but not work if it is missing. > > Signed-off-by: Arnd Bergmann > Fixes: 6decea7c5438e2 ("Input: add driver for Allwinner sunxi SoC's rtp > controller") > > diff --git a/drivers/input/touchscreen/Kconfig > b/drivers/input/touchscreen/Kconfig > index 58917525126e..e2447f0063b7 100644 > --- a/drivers/input/touchscreen/Kconfig > +++ b/drivers/input/touchscreen/Kconfig > @@ -943,6 +943,8 @@ config TOUCHSCREEN_SUN4I > tristate "Allwinner sun4i resistive touchscreen controller > support" > depends on ARCH_SUNXI || COMPILE_TEST > depends on HWMON > + depends on THERMAL > + depends on THERMAL_OF || COMPILE_TEST >>> >>> >>> THERMAL_OF does have proper stubs and I do not see why we need to force >>> having TERMAL even if we don't do compile test. Should the dependency be: >>> >>> depends on !THERMAL_OF || TERMAL >> >> >> *ping* > > > ChenYu, since your patch causes this problem I'm assuming that you will come > up with a fix, is that correct ? Wasn't aware everyone was waiting on me. Patch coming right up. ChenYu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 1/4] Documentation: dt-bindings: add dt binding info for hi6220 dwc2
Add necessary dwc2 binding documentation for Hisilicon soc: hi6220 Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index fd132cb..2213682 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -4,6 +4,7 @@ Platform DesignWare HS OTG USB 2.0 controller Required properties: - compatible : One of: - brcm,bcm2835-usb: The DWC2 USB controller instance in the BCM2835 SoC. + - hisilicon,hi6220-usb: The DWC2 USB controller instance in the hi6220 SoC. - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc; - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc; - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 0/4] add usb support for hi6220
v4: Move drivers/usb/phy/phy-hi6220-usb.c to drivers/phy/phy-hi6220-usb.c, required by Balbi. Modify dt bindings per comments from Mark and Sergei v3: fix typo and add -EPROBE_DEFER of regulator, pointed by Peter v2: address comments from Sergei and Peter add hi6220_phy_setup(false) code v1: hi6220 usb controller is inherited from dwc2 add phy accordingly support otg gadget/host Zhangfei Gao (4): Documentation: dt-bindings: add dt binding info for hi6220 dwc2 Documentation: dt-bindings: add dt binding info for hi6220 usb: dwc2: platform: add hi6220 support phy: add phy-hi6220-usb Documentation/devicetree/bindings/usb/dwc2.txt | 1 + .../devicetree/bindings/usb/hi6220-usb.txt | 49 drivers/phy/Kconfig| 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-hi6220-usb.c | 306 + drivers/usb/dwc2/platform.c| 30 ++ 6 files changed, 396 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt create mode 100644 drivers/phy/phy-hi6220-usb.c -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 2/4] Documentation: dt-bindings: add dt binding info for hi6220
Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/usb/hi6220-usb.txt | 49 ++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hi6220-usb.txt diff --git a/Documentation/devicetree/bindings/usb/hi6220-usb.txt b/Documentation/devicetree/bindings/usb/hi6220-usb.txt new file mode 100644 index 000..b3a7b5a --- /dev/null +++ b/Documentation/devicetree/bindings/usb/hi6220-usb.txt @@ -0,0 +1,49 @@ +Hisilicon hi6220 SoC USB controller +- + +usb controller is inherited from dwc2, refer dwc2.txt +- + +Required properties: +- compatible: "hisilicon,hi6220-usb" +Refer to dwc2.txt for dwc2 usb properties + + +PHY: +- + +Required properties: +- compatible: "hisilicon,hi6220-usb-phy" +- vcc-supply: phandle to the regulator that provides power to the PHY. +- clocks: phandle and clock specifier of the PHY clock. +- hisilicon,peripheral-syscon: phandle of syscon used to control peripheral. +- hisilicon,vbus-gpios: gpio of detecting vbus. +- hisilicon,id-gpios: gpio of detecting id. + +Example: + + sys_ctrl: syscon@f703 { + compatible = "hisilicon,sysctrl", "syscon"; + reg = <0x0 0xf703 0x0 0x1000>; + }; + + usb_phy: usb-phy { + compatible = "hisilicon,hi6220-usb-phy"; + vcc-supply = <&fixed_5v_hub>; + hisilicon,vbus-gpios = <&gpio2 6 0>; + hisilicon,id-gpios = <&gpio2 5 0>; + hisilicon,peripheral-syscon = <&sys_ctrl>; + clocks = <&clock_sys HI6220_USBOTG_HCLK>; + }; + + usb: usb@f72c { + compatible = "hisilicon,hi6220-usb"; + reg = <0x0 0xf72c 0x0 0x4>; + phys = <&usb_phy>; + dr_mode = "otg"; + g-use-dma; + g-rx-fifo-size = <512>; + g-np-tx-fifo-size = <128>; + g-tx-fifo-size = <128>; + interrupts = <0 77 0x4>; + }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 05/16] mm/vmstat: watch out zone range overlap
In the following patches, new zone, ZONE_CMA, will be introduced and it would be overlapped with other zones. Currently, many places iterating pfn range doesn't consider possibility of zone overlap and this would cause a problem such as printing wrong statistics information. To prevent this situation, this patch add some code to consider zone overlapping before adding ZONE_CMA. pagetypeinfo_showblockcount_print() prints zone's statistics so should consider zone overlap. Signed-off-by: Joonsoo Kim --- mm/vmstat.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/vmstat.c b/mm/vmstat.c index 1b12d39..7a4ac8e 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -984,6 +984,8 @@ static void pagetypeinfo_showblockcount_print(struct seq_file *m, continue; page = pfn_to_page(pfn); + if (page_zone(page) != zone) + continue; /* Watch for unexpected holes punched in the memmap */ if (!memmap_valid_within(pfn, page, zone)) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 06/16] mm/page_alloc: watch out zone range overlap
In the following patches, new zone, ZONE_CMA, will be introduced and it would be overlapped with other zones. Currently, many places iterating pfn range doesn't consider possibility of zone overlap and this would cause a problem such as printing wrong statistics information. To prevent this situation, this patch add some code to consider zone overlapping before adding ZONE_CMA. setup_zone_migrate_reserve() reserve some pages for specific zone so should consider zone overlap. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c784035..1c45934b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4040,8 +4040,8 @@ static void setup_zone_migrate_reserve(struct zone *zone) continue; page = pfn_to_page(pfn); - /* Watch out for overlapping nodes */ - if (page_to_nid(page) != zone_to_nid(zone)) + /* Watch out for overlapping zones */ + if (page_zone(page) != zone) continue; block_migratetype = get_pageblock_migratetype(page); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 00/16] Introduce ZONE_CMA
Hello, This series try to solve problems of current CMA implementation. CMA is introduced to provide physically contiguous pages at runtime without exclusive reserved memory area. But, current implementation works like as previous reserved memory approach, because freepages on CMA region are used only if there is no movable freepage. In other words, freepages on CMA region are only used as fallback. In that situation where freepages on CMA region are used as fallback, kswapd would be woken up easily since there is no unmovable and reclaimable freepage, too. If kswapd starts to reclaim memory, fallback allocation to MIGRATE_CMA doesn't occur any more since movable freepages are already refilled by kswapd and then most of freepage on CMA are left to be in free. This situation looks like exclusive reserved memory case. In my experiment, I found that if system memory has 1024 MB memory and 512 MB is reserved for CMA, kswapd is mostly woken up when roughly 512 MB free memory is left. Detailed reason is that for keeping enough free memory for unmovable and reclaimable allocation, kswapd uses below equation when calculating free memory and it easily go under the watermark. Free memory for unmovable and reclaimable = Free total - Free CMA pages This is derivated from the property of CMA freepage that CMA freepage can't be used for unmovable and reclaimable allocation. Anyway, in this case, kswapd are woken up when (FreeTotal - FreeCMA) is lower than low watermark and tries to make free memory until (FreeTotal - FreeCMA) is higher than high watermark. That results in that FreeTotal is moving around 512MB boundary consistently. It then means that we can't utilize full memory capacity. To fix this problem, I submitted some patches [1] about 10 months ago, but, found some more problems to be fixed before solving this problem. It requires many hooks in allocator hotpath so some developers doesn't like it. Instead, some of them suggest different approach [2] to fix all the problems related to CMA, that is, introducing a new zone to deal with free CMA pages. I agree that it is the best way to go so implement here. Although properties of ZONE_MOVABLE and ZONE_CMA is similar, I decide to add a new zone rather than piggyback on ZONE_MOVABLE since they have some differences. First, reserved CMA pages should not be offlined. If freepage for CMA is managed by ZONE_MOVABLE, we need to keep MIGRATE_CMA migratetype and insert many hooks on memory hotplug code to distiguish hotpluggable memory and reserved memory for CMA in the same zone. It would make memory hotplug code which is already complicated more complicated. Second, cma_alloc() can be called more frequently than memory hotplug operation and possibly we need to control allocation rate of ZONE_CMA to optimize latency in the future. In this case, separate zone approach is easy to modify. Third, I'd like to see statistics for CMA, separately. Sometimes, we need to debug why cma_alloc() is failed and separate statistics would be more helpful in this situtaion. Anyway, this patchset solves three problems in CMA all at once. 1) Utilization problem As mentioned above, we can't utilize full memory capacity due to the limitation of CMA freepage and fallback policy. This patchset implements a new zone for CMA and uses it for GFP_HIGHUSER_MOVABLE request. This typed allocation is used for page cache and anonymous pages which occupies most of memory usage in normal case so we can utilize full memory capacity. Below is the experiment result about this problem. 8 CPUs, 1024 MB, VIRTUAL MACHINE make -j16 CMA reserve:0 MB512 MB Elapsed-time: 92.4186.5 pswpin: 82 18647 pswpout:160 69839 CMA reserve:0 MB512 MB Elapsed-time: 93.193.4 pswpin: 84 46 pswpout:183 92 FYI, there is another attempt [3] trying to solve this problem in lkml. And, as far as I know, Qualcomm also has out-of-tree solution for this problem. 2) Reclaim problem Currently, there is no logic to distinguish CMA pages in reclaim path. If reclaim is initiated for unmovable and reclaimable allocation, reclaiming CMA pages doesn't help to satisfy the request and reclaiming CMA page is just waste. By managing CMA pages in the new zone, we can skip to reclaim ZONE_CMA completely if it is unnecessary. 3) Incorrect watermark check problem Currently, although we have statistics for number of freepage per order in the zone, there is no statistics for number of CMA freepage per order. This causes incorrect freepage calculation on high order allocation request. For unmovable and reclaimable allocation request, we can't use CMA freepage so we should subtract it's number on freepage calculation. But, because we don't have such value per order, we will do incorrect calculation. Currently, we did some trick and watermark
[RFC 07/16] mm/page_isolation: watch out zone range overlap
In the following patches, new zone, ZONE_CMA, will be introduced and it would be overlapped with other zones. Currently, many places iterating pfn range doesn't consider possibility of zone overlap and this would cause a problem such as printing wrong statistics information. To prevent this situation, this patch add some code to consider zone overlapping before adding ZONE_CMA. pfn range argument provieded to test_pages_isolated() should be in a single zone. If not, zone lock doesn't work to protect free state of buddy freepage. Signed-off-by: Joonsoo Kim --- mm/page_isolation.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index c8778f7..883e78d 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -210,8 +210,8 @@ int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, * Returns 1 if all pages in the range are isolated. */ static int -__test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, - bool skip_hwpoisoned_pages) +__test_page_isolated_in_pageblock(struct zone *zone, unsigned long pfn, + unsigned long end_pfn, bool skip_hwpoisoned_pages) { struct page *page; @@ -221,6 +221,9 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, continue; } page = pfn_to_page(pfn); + if (page_zone(page) != zone) + break; + if (PageBuddy(page)) { /* * If race between isolatation and allocation happens, @@ -281,7 +284,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, /* Check all pages are free or marked as ISOLATED */ zone = page_zone(page); spin_lock_irqsave(&zone->lock, flags); - ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn, + ret = __test_page_isolated_in_pageblock(zone, start_pfn, end_pfn, skip_hwpoisoned_pages); spin_unlock_irqrestore(&zone->lock, flags); return ret ? 0 : -EBUSY; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 01/16] mm/page_alloc: correct highmem memory statistics
ZONE_MOVABLE could be treated as highmem so we need to consider it for accurate statistics. And, in following patches, ZONE_CMA will be introduced and it can be treated as highmem, too. So, instead of manually adding stat of ZONE_MOVABLE, looping all zones and check whether the zone is highmem or not and add stat of the zone which can be treated as highmem. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 616a2c9..c784035 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3105,6 +3105,8 @@ void si_meminfo_node(struct sysinfo *val, int nid) { int zone_type; /* needs to be signed */ unsigned long managed_pages = 0; + unsigned long managed_highpages = 0; + unsigned long free_highpages = 0; pg_data_t *pgdat = NODE_DATA(nid); for (zone_type = 0; zone_type < MAX_NR_ZONES; zone_type++) @@ -3113,12 +3115,19 @@ void si_meminfo_node(struct sysinfo *val, int nid) val->sharedram = node_page_state(nid, NR_SHMEM); val->freeram = node_page_state(nid, NR_FREE_PAGES); #ifdef CONFIG_HIGHMEM - val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].managed_pages; - val->freehigh = zone_page_state(&pgdat->node_zones[ZONE_HIGHMEM], - NR_FREE_PAGES); + for (zone_type = 0; zone_type < MAX_NR_ZONES; zone_type++) { + struct zone *zone = &pgdat->node_zones[zone_type]; + + if (is_highmem(zone)) { + managed_highpages += zone->managed_pages; + free_highpages += zone_page_state(zone, NR_FREE_PAGES); + } + } + val->totalhigh = managed_highpages; + val->freehigh = free_highpages; #else - val->totalhigh = 0; - val->freehigh = 0; + val->totalhigh = managed_highpages; + val->freehigh = free_highpages; #endif val->mem_unit = PAGE_SIZE; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 09/16] mm/cma: introduce cma_total_pages() for future use
In the following patches, total reserved page count is needed to initialize ZONE_CMA. This is the preparation step for that. Signed-off-by: Joonsoo Kim --- include/linux/cma.h |9 + mm/cma.c| 17 + 2 files changed, 26 insertions(+) diff --git a/include/linux/cma.h b/include/linux/cma.h index a93438b..aeaea90 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h @@ -15,6 +15,9 @@ struct cma; +#ifdef CONFIG_CMA +extern unsigned long cma_total_pages(unsigned long node_start_pfn, + unsigned long node_end_pfn); extern phys_addr_t cma_get_base(struct cma *cma); extern unsigned long cma_get_size(struct cma *cma); @@ -27,4 +30,10 @@ extern int cma_init_reserved_mem(phys_addr_t base, struct cma **res_cma); extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); extern bool cma_release(struct cma *cma, struct page *pages, int count); + +#else +static inline unsigned long cma_total_pages(unsigned long node_start_pfn, + unsigned long node_end_pfn) { return 0; } + +#endif /* CONFIG_CMA */ #endif diff --git a/mm/cma.c b/mm/cma.c index c35ceef..f817b91 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -40,6 +40,23 @@ struct cma cma_areas[MAX_CMA_AREAS]; unsigned cma_area_count; static DEFINE_MUTEX(cma_mutex); +unsigned long cma_total_pages(unsigned long node_start_pfn, + unsigned long node_end_pfn) +{ + int i; + unsigned long total_pages = 0; + + for (i = 0; i < cma_area_count; i++) { + struct cma *cma = &cma_areas[i]; + + if (node_start_pfn <= cma->base_pfn && + cma->base_pfn < node_end_pfn) + total_pages += cma->count; + } + + return total_pages; +} + phys_addr_t cma_get_base(struct cma *cma) { return PFN_PHYS(cma->base_pfn); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 13/16] mm/cma: populate ZONE_CMA and use this zone when GFP_HIGHUSERMOVABLE
Until now, reserved pages for CMA are managed altogether with normal page in the same zone. This approach has numorous problems and fixing them isn't easy. To fix this situation, ZONE_CMA is introduced in previous patch, but, not yet populated. This patch implement population of ZONE_CMA by stealing reserved pages from normal zones. This stealing break one uncertain assumption on zone, that is, zone isn't overlapped. In the early of this series, some check is inserted to every zone's span iterator to handle zone overlap so there would be no problem with this assumption break. To utilize this zone, user should use GFP_HIGHUSERMOVABLE, because these pages are only applicable for movable type and ZONE_CMA could contain highmem. Implementation itself is very easy to understand. Do steal when cma area is initialized and recalculate values for per zone data structure. Signed-off-by: Joonsoo Kim --- include/linux/gfp.h | 10 -- include/linux/mm.h |1 + mm/cma.c| 23 --- mm/page_alloc.c | 42 +++--- 4 files changed, 64 insertions(+), 12 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 619eb20..d125440 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -186,6 +186,12 @@ static inline int gfpflags_to_migratetype(const gfp_t gfp_flags) #define OPT_ZONE_DMA32 ZONE_NORMAL #endif +#ifdef CONFIG_CMA +#define OPT_ZONE_CMA ZONE_CMA +#else +#define OPT_ZONE_CMA ZONE_MOVABLE +#endif + /* * GFP_ZONE_TABLE is a word size bitstring that is used for looking up the * zone to use given the lowest 4 bits of gfp_t. Entries are ZONE_SHIFT long @@ -226,7 +232,7 @@ static inline int gfpflags_to_migratetype(const gfp_t gfp_flags) | ((u64)OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \ | ((u64)ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \ | ((u64)OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \ - | ((u64)ZONE_MOVABLE << (___GFP_MOVABLE|___GFP_HIGHMEM) * ZONES_SHIFT)\ + | ((u64)OPT_ZONE_CMA << (___GFP_MOVABLE|___GFP_HIGHMEM) * ZONES_SHIFT)\ | ((u64)OPT_ZONE_DMA32 << (___GFP_MOVABLE|___GFP_DMA32) * ZONES_SHIFT)\ ) @@ -412,7 +418,7 @@ 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); +extern void init_cma_reserved_pageblock(unsigned long pfn); #endif diff --git a/include/linux/mm.h b/include/linux/mm.h index b464611..2d76446 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1731,6 +1731,7 @@ extern __printf(3, 4) void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); extern void setup_per_cpu_pageset(void); +extern void recalc_per_cpu_pageset(void); extern void zone_pcp_update(struct zone *zone); extern void zone_pcp_reset(struct zone *zone); diff --git a/mm/cma.c b/mm/cma.c index f817b91..267fa14 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -97,7 +97,7 @@ static int __init cma_activate_area(struct cma *cma) int bitmap_size = BITS_TO_LONGS(cma_bitmap_maxno(cma)) * sizeof(long); unsigned long base_pfn = cma->base_pfn, pfn = base_pfn; unsigned i = cma->count >> pageblock_order; - struct zone *zone; + int nid; cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); @@ -105,7 +105,7 @@ static int __init cma_activate_area(struct cma *cma) return -ENOMEM; WARN_ON_ONCE(!pfn_valid(pfn)); - zone = page_zone(pfn_to_page(pfn)); + nid = page_to_nid(pfn_to_page(pfn)); do { unsigned j; @@ -115,16 +115,25 @@ static int __init cma_activate_area(struct cma *cma) WARN_ON_ONCE(!pfn_valid(pfn)); /* * alloc_contig_range requires the pfn range -* specified to be in the same zone. Make this -* simple by forcing the entire CMA resv range -* to be in the same zone. +* specified to be in the same zone. We will +* achieve this goal by stealing pages from +* oridinary zone to ZONE_CMA. But, we need +* to make sure that entire CMA resv range to +* be in the same node. Otherwise, they could +* be on ZONE_CMA of different node. */ - if (page_zone(pfn_to_page(pfn)) != zone) + if (page_to_nid(pfn_to_page(pfn)) != nid) goto err; } - init_cma_reserved_pageblock(pfn_to_page(base_pfn)); + init_cma_reserved_pageblock(base_pfn); } while (--i); + /* +* ZONE_CMA steals some managed pages fr
[RFC 10/16] mm/highmem: remove is_highmem_idx()
We can use is_highmem() on every callsites of is_highmem_idx() so is_highmem_idx() isn't really needed. And, if we introduce a new zone for CMA, we need to modify it to adapt for new zone, so it's inconvenient. Therefore, this patch remove it before introducing a new zone. Signed-off-by: Joonsoo Kim --- include/linux/mmzone.h | 18 -- lib/show_mem.c |2 +- mm/page_alloc.c|6 +++--- mm/vmscan.c|2 +- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index ffe66e3..90237f2 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -854,16 +854,6 @@ static inline int zone_movable_is_highmem(void) #endif } -static inline int is_highmem_idx(enum zone_type idx) -{ -#ifdef CONFIG_HIGHMEM - return (idx == ZONE_HIGHMEM || - (idx == ZONE_MOVABLE && zone_movable_is_highmem())); -#else - return 0; -#endif -} - /** * is_highmem - helper function to quickly check if a struct zone is a * highmem zone or not. This is an attempt to keep references @@ -873,10 +863,10 @@ static inline int is_highmem_idx(enum zone_type idx) static inline int is_highmem(struct zone *zone) { #ifdef CONFIG_HIGHMEM - int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones; - return zone_off == ZONE_HIGHMEM * sizeof(*zone) || - (zone_off == ZONE_MOVABLE * sizeof(*zone) && - zone_movable_is_highmem()); + int idx = zone_idx(zone); + + return (idx == ZONE_HIGHMEM || + (idx == ZONE_MOVABLE && zone_movable_is_highmem())); #else return 0; #endif diff --git a/lib/show_mem.c b/lib/show_mem.c index 5e25627..f336c5b1 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -30,7 +30,7 @@ void show_mem(unsigned int filter) total += zone->present_pages; reserved += zone->present_pages - zone->managed_pages; - if (is_highmem_idx(zoneid)) + if (is_highmem(zone)) highmem += zone->present_pages; } pgdat_resize_unlock(pgdat, &flags); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7733663..416e036 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4151,7 +4151,7 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, INIT_LIST_HEAD(&page->lru); #ifdef WANT_PAGE_VIRTUAL /* The shift won't overflow because ZONE_NORMAL is below 4G. */ - if (!is_highmem_idx(zone)) + if (!is_highmem(z)) set_page_address(page, __va(pfn << PAGE_SHIFT)); #endif } @@ -4881,7 +4881,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, zone_names[0], dma_reserve); } - if (!is_highmem_idx(j)) + if (!is_highmem(zone)) nr_kernel_pages += freesize; /* Charge for highmem memmap if there are enough kernel pages */ else if (nr_kernel_pages > memmap_pages * 2) @@ -4895,7 +4895,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, * when the bootmem allocator frees pages into the buddy system. * And all highmem pages will be managed by the buddy system. */ - zone->managed_pages = is_highmem_idx(j) ? realsize : freesize; + zone->managed_pages = is_highmem(zone) ? realsize : freesize; #ifdef CONFIG_NUMA zone->node = nid; zone->min_unmapped_pages = (freesize*sysctl_min_unmapped_ratio) diff --git a/mm/vmscan.c b/mm/vmscan.c index dcb4707..30c34dc 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3074,7 +3074,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order, * has a highmem zone, force kswapd to reclaim from * it to relieve lowmem pressure. */ - if (buffer_heads_over_limit && is_highmem_idx(i)) { + if (buffer_heads_over_limit && is_highmem(zone)) { end_zone = i; break; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 14/16] mm/cma: print stealed page count
Reserved pages for CMA could be on different zone. To figure out memory map correctly, per zone number of stealed pages for CMA would be needed. Signed-off-by: Joonsoo Kim --- mm/cma.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/mm/cma.c b/mm/cma.c index 267fa14..b165c1a 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -40,6 +40,8 @@ struct cma cma_areas[MAX_CMA_AREAS]; unsigned cma_area_count; static DEFINE_MUTEX(cma_mutex); +static unsigned long __initdata stealed_pages[MAX_NUMNODES][MAX_NR_ZONES]; + unsigned long cma_total_pages(unsigned long node_start_pfn, unsigned long node_end_pfn) { @@ -98,6 +100,7 @@ static int __init cma_activate_area(struct cma *cma) unsigned long base_pfn = cma->base_pfn, pfn = base_pfn; unsigned i = cma->count >> pageblock_order; int nid; + int zone_index; cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); @@ -125,6 +128,8 @@ static int __init cma_activate_area(struct cma *cma) if (page_to_nid(pfn_to_page(pfn)) != nid) goto err; } + zone_index = zone_idx(page_zone(pfn_to_page(base_pfn))); + stealed_pages[nid][zone_index] += pageblock_nr_pages; init_cma_reserved_pageblock(base_pfn); } while (--i); @@ -145,7 +150,9 @@ err: static int __init cma_init_reserved_areas(void) { - int i; + int i, j; + pg_data_t *pgdat; + struct zone *zone; for (i = 0; i < cma_area_count; i++) { int ret = cma_activate_area(&cma_areas[i]); @@ -154,6 +161,25 @@ static int __init cma_init_reserved_areas(void) return ret; } + for (i = 0; i < MAX_NUMNODES; i++) { + for (j = 0; j < MAX_NR_ZONES; j++) { + if (stealed_pages[i][j]) + goto print; + } + continue; + +print: + pgdat = NODE_DATA(i); + for (j = 0; j < MAX_NR_ZONES; j++) { + if (!stealed_pages[i][j]) + continue; + + zone = pgdat->node_zones + j; + pr_info("Steal %lu pages from %s\n", + stealed_pages[i][j], zone->name); + } + } + return 0; } core_initcall(cma_init_reserved_areas); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 11/16] mm/page_alloc: clean-up free_area_init_core()
Some of initialization step can be done without any further information. If ZONE_CMA is introduced, it should be handled specially in free_area_init_core() since it has not enough zone information. But, some of data structure for ZONE_CMA should be initialized in this function so this patch moves up these steps for preparation of ZONE_CMA. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 416e036..6030525f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4845,11 +4845,19 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, init_waitqueue_head(&pgdat->kswapd_wait); init_waitqueue_head(&pgdat->pfmemalloc_wait); pgdat_page_cgroup_init(pgdat); + set_pageblock_order(); for (j = 0; j < MAX_NR_ZONES; j++) { struct zone *zone = pgdat->node_zones + j; unsigned long size, realsize, freesize, memmap_pages; + zone->name = zone_names[j]; + spin_lock_init(&zone->lock); + spin_lock_init(&zone->lru_lock); + zone_seqlock_init(zone); + zone->zone_pgdat = pgdat; + lruvec_init(&zone->lruvec); + size = zone_spanned_pages_in_node(nid, j, node_start_pfn, node_end_pfn, zones_size); realsize = freesize = size - zone_absent_pages_in_node(nid, j, @@ -4902,21 +4910,14 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, / 100; zone->min_slab_pages = (freesize * sysctl_min_slab_ratio) / 100; #endif - zone->name = zone_names[j]; - spin_lock_init(&zone->lock); - spin_lock_init(&zone->lru_lock); - zone_seqlock_init(zone); - zone->zone_pgdat = pgdat; zone_pcp_init(zone); /* For bootup, initialized properly in watermark setup */ mod_zone_page_state(zone, NR_ALLOC_BATCH, zone->managed_pages); - lruvec_init(&zone->lruvec); if (!size) continue; - set_pageblock_order(); setup_usemap(pgdat, zone, zone_start_pfn, size); ret = init_currently_empty_zone(zone, zone_start_pfn, size, MEMMAP_EARLY); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 16/16] mm/cma: remove MIGRATE_CMA
Now, reserved pages for CMA are only on ZONE_CMA so we don't need to use MIGRATE_CMA to distiguish CMA freepages and handle it differently. So, this patch removes MIGRATE_CMA and also remove all related code. Signed-off-by: Joonsoo Kim --- include/linux/gfp.h|3 +- include/linux/mmzone.h | 23 -- include/linux/vmstat.h |8 - mm/cma.c |2 +- mm/compaction.c|2 +- mm/hugetlb.c |2 +- mm/page_alloc.c| 79 ++-- mm/page_isolation.c|5 ++- mm/vmstat.c|4 --- 9 files changed, 28 insertions(+), 100 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index d125440..1a6a5e2 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -413,8 +413,7 @@ 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, - unsigned migratetype); +extern int alloc_contig_range(unsigned long start, unsigned long end); extern void free_contig_range(unsigned long pfn, unsigned nr_pages); /* CMA stuff */ diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 991e20e..738b7f8 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -41,34 +41,12 @@ enum { 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 #ifdef CONFIG_MEMORY_ISOLATION MIGRATE_ISOLATE,/* can't allocate from here */ #endif 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++) \ for (type = 0; type < MIGRATE_TYPES; type++) @@ -156,7 +134,6 @@ enum zone_stat_item { WORKINGSET_ACTIVATE, WORKINGSET_NODERECLAIM, NR_ANON_TRANSPARENT_HUGEPAGES, - NR_FREE_CMA_PAGES, NR_VM_ZONE_STAT_ITEMS }; /* diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 676488a..681f8ae 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -271,14 +271,6 @@ static inline void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset) { } #endif /* CONFIG_SMP */ -static inline void __mod_zone_freepage_state(struct zone *zone, int nr_pages, -int migratetype) -{ - __mod_zone_page_state(zone, NR_FREE_PAGES, nr_pages); - if (is_migrate_cma(migratetype)) - __mod_zone_page_state(zone, NR_FREE_CMA_PAGES, nr_pages); -} - extern const char * const vmstat_text[]; #endif /* _LINUX_VMSTAT_H */ diff --git a/mm/cma.c b/mm/cma.c index b165c1a..46d3e79 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -405,7 +405,7 @@ struct page *cma_alloc(struct cma *cma, int count, unsigned int align) pfn = cma->base_pfn + (bitmap_no << cma->order_per_bit); mutex_lock(&cma_mutex); - ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA); + ret = alloc_contig_range(pfn, pfn + count); mutex_unlock(&cma_mutex); if (ret == 0) { page = pfn_to_page(pfn); diff --git a/mm/compaction.c b/mm/compaction.c index b79134e..1b9f18e 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -64,7 +64,7 @@ static void map_pages(struct list_head *list) static inline bool migrate_async_suitable(int migratetype) { - return is_migrate_cma(migratetype) || migratetype == MIGRATE_MOVABLE; + return migratetype == MIGRATE_MOVABLE; } /* diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 9fd7227..2ba5802 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -706,7 +706,7 @@ static int __alloc_gigantic_page(unsigned long start_pfn, unsigned long nr_pages) { unsigned long end_pfn = start_pfn + nr_pages; - return alloc_contig_range(start_pfn, end_pfn, MIGRATE_MOVABLE); + return alloc_contig_range(start_
[RFC 08/16] power: watch out zone range overlap
In the following patches, new zone, ZONE_CMA, will be introduced and it would be overlapped with other zones. Currently, many places iterating pfn range doesn't consider possibility of zone overlap and this would cause a problem such as printing wrong statistics information. To prevent this situation, this patch add some code to consider zone overlapping before adding ZONE_CMA. mark_free_pages() check and mark free status of page on the zone. Since we iterate pfn to unmark free bit and we iterate buddy list directly to mark free bit, if we don't check page's zone and mark it as non-free, following buddy checker missed the page which is not on this zone and we can get false free status. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1c45934b..7733663 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1365,6 +1365,9 @@ void mark_free_pages(struct zone *zone) if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); + if (page_zone(page) != zone) + continue; + if (!swsusp_page_is_forbidden(page)) swsusp_unset_page_free(page); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 02/16] mm/writeback: correct dirty page calculation for highmem
ZONE_MOVABLE could be treated as highmem so we need to consider it for accurate calculation of dirty pages. And, in following patches, ZONE_CMA will be introduced and it can be treated as highmem, too. So, instead of manually adding stat of ZONE_MOVABLE, looping all zones and check whether the zone is highmem or not and add stat of the zone which can be treated as highmem. Signed-off-by: Joonsoo Kim --- mm/page-writeback.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 19ceae8..942f6b3 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -198,11 +198,15 @@ static unsigned long highmem_dirtyable_memory(unsigned long total) #ifdef CONFIG_HIGHMEM int node; unsigned long x = 0; + int i; for_each_node_state(node, N_HIGH_MEMORY) { - struct zone *z = &NODE_DATA(node)->node_zones[ZONE_HIGHMEM]; + for (i = 0; i < MAX_NR_ZONES; i++) { + struct zone *z = &NODE_DATA(node)->node_zones[i]; - x += zone_dirtyable_memory(z); + if (is_highmem(z)) + x += zone_dirtyable_memory(z); + } } /* * Unreclaimable memory (kernel memory or anonymous memory -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 15/16] mm/cma: remove ALLOC_CMA
Now, reserved pages for CMA are on ZONE_CMA and it only serves for MIGRATE_MOVABLE. Therefore, we don't need to consider ALLOC_CMA at all. Signed-off-by: Joonsoo Kim --- mm/compaction.c |4 mm/internal.h |3 +-- mm/page_alloc.c | 16 ++-- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index f9792ba..b79134e 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1312,10 +1312,6 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist, if (!order || !may_enter_fs || !may_perform_io) return COMPACT_SKIPPED; -#ifdef CONFIG_CMA - if (gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) - alloc_flags |= ALLOC_CMA; -#endif /* Compact each zone in the list */ for_each_zone_zonelist_nodemask(zone, z, zonelist, high_zoneidx, nodemask) { diff --git a/mm/internal.h b/mm/internal.h index a4f90ba..9968dff 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -407,7 +407,6 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone, #define ALLOC_HARDER 0x10 /* try to alloc harder */ #define ALLOC_HIGH 0x20 /* __GFP_HIGH set */ #define ALLOC_CPUSET 0x40 /* check for correct cpuset */ -#define ALLOC_CMA 0x80 /* allow allocations from CMA areas */ -#define ALLOC_FAIR 0x100 /* fair zone allocation */ +#define ALLOC_FAIR 0x80 /* fair zone allocation */ #endif /* __MM_INTERNAL_H */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f2844f0..551cc5b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1737,20 +1737,14 @@ static bool __zone_watermark_ok(struct zone *z, unsigned int order, /* free_pages my go negative - that's OK */ long min = mark; int o; - long free_cma = 0; free_pages -= (1 << order) - 1; if (alloc_flags & ALLOC_HIGH) min -= min / 2; if (alloc_flags & ALLOC_HARDER) min -= min / 4; -#ifdef CONFIG_CMA - /* If allocation can't use CMA areas don't use free CMA pages */ - if (!(alloc_flags & ALLOC_CMA)) - free_cma = zone_page_state(z, NR_FREE_CMA_PAGES); -#endif - if (free_pages - free_cma <= min + z->lowmem_reserve[classzone_idx]) + if (free_pages <= min + z->lowmem_reserve[classzone_idx]) return false; for (o = 0; o < order; o++) { /* At the next order, this order's pages become unavailable */ @@ -2550,10 +2544,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask) unlikely(test_thread_flag(TIF_MEMDIE alloc_flags |= ALLOC_NO_WATERMARKS; } -#ifdef CONFIG_CMA - if (gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) - alloc_flags |= ALLOC_CMA; -#endif + return alloc_flags; } @@ -2837,9 +2828,6 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, if (unlikely(!zonelist->_zonerefs->zone)) return NULL; - if (IS_ENABLED(CONFIG_CMA) && migratetype == MIGRATE_MOVABLE) - alloc_flags |= ALLOC_CMA; - retry_cpuset: cpuset_mems_cookie = read_mems_allowed_begin(); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 04/16] mm/vmstat: make node_page_state() handles all zones by itself
node_page_state() manually add statistics per each zone and return total value for all zones. Whenever we add a new zone, we need to consider this function and it's really troublesome. Make it handles all zones by itself. Signed-off-by: Joonsoo Kim --- include/linux/vmstat.h | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 82e7db7..676488a 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -170,19 +170,13 @@ static inline unsigned long node_page_state(int node, enum zone_stat_item item) { struct zone *zones = NODE_DATA(node)->node_zones; + int i; + unsigned long count = 0; - return -#ifdef CONFIG_ZONE_DMA - zone_page_state(&zones[ZONE_DMA], item) + -#endif -#ifdef CONFIG_ZONE_DMA32 - zone_page_state(&zones[ZONE_DMA32], item) + -#endif -#ifdef CONFIG_HIGHMEM - zone_page_state(&zones[ZONE_HIGHMEM], item) + -#endif - zone_page_state(&zones[ZONE_NORMAL], item) + - zone_page_state(&zones[ZONE_MOVABLE], item); + for (i = 0; i < MAX_NR_ZONES; i++) + count += zone_page_state(zones + i, item); + + return count; } extern void zone_statistics(struct zone *, struct zone *, gfp_t gfp); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 03/16] mm/highmem: make nr_free_highpages() handles all highmem zones by itself
nr_free_highpages() manually add statistics per each highmem zone and return total value for them. Whenever we add a new highmem zone, we need to consider this function and it's really troublesome. Make it handles all highmem zones by itself. Signed-off-by: Joonsoo Kim --- mm/highmem.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mm/highmem.c b/mm/highmem.c index 123bcd3..50b4ca6 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -112,16 +112,12 @@ EXPORT_PER_CPU_SYMBOL(__kmap_atomic_idx); unsigned int nr_free_highpages (void) { - pg_data_t *pgdat; + struct zone *zone; unsigned int pages = 0; - for_each_online_pgdat(pgdat) { - pages += zone_page_state(&pgdat->node_zones[ZONE_HIGHMEM], - NR_FREE_PAGES); - if (zone_movable_is_highmem()) - pages += zone_page_state( - &pgdat->node_zones[ZONE_MOVABLE], - NR_FREE_PAGES); + for_each_populated_zone(zone) { + if (is_highmem(zone)) + pages += zone_page_state(zone, NR_FREE_PAGES); } return pages; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[RFC 12/16] mm/cma: introduce new zone, ZONE_CMA
Currently, reserved pages for CMA are managed together with normal pages. To distinguish them, we used migratetype, MIGRATE_CMA, and do special handlings for this migratetype. But, it turns out that there are too many problems with this approach and to fix all of them needs many more hooks to page allocation and reclaim path so some developers express their discomfort and problems on CMA aren't fixed for a long time. To terminate this situation and fix CMA problems, this patch implements ZONE_CMA. Reserved pages for CMA will be managed in this new zone. This approach will remove all exisiting hooks for MIGRATE_CMA and many problems such as watermark check and reserved page utilization are resolved itself. This patch only add basic infrastructure of ZONE_CMA. In the following patch, ZONE_CMA is actually populated and used. Signed-off-by: Joonsoo Kim --- arch/x86/include/asm/sparsemem.h |2 +- arch/x86/mm/highmem_32.c |3 +++ include/linux/gfp.h | 20 -- include/linux/mempolicy.h |2 +- include/linux/mmzone.h| 33 +++-- include/linux/page-flags-layout.h |2 ++ include/linux/vm_event_item.h |8 +++- kernel/power/snapshot.c | 15 ++ mm/memory_hotplug.c |3 +++ mm/mempolicy.c|3 ++- mm/page_alloc.c | 41 + mm/vmstat.c | 10 - 12 files changed, 119 insertions(+), 23 deletions(-) diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparsemem.h index 4517d6b..ac169a8 100644 --- a/arch/x86/include/asm/sparsemem.h +++ b/arch/x86/include/asm/sparsemem.h @@ -25,7 +25,7 @@ # define MAX_PHYSMEM_BITS 32 # endif #else /* CONFIG_X86_32 */ -# define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ +# define SECTION_SIZE_BITS 28 # define MAX_PHYSADDR_BITS 44 # define MAX_PHYSMEM_BITS 46 #endif diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index 4500142..182e2b6 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c @@ -133,6 +133,9 @@ void __init set_highmem_pages_init(void) if (!is_highmem(zone)) continue; + if (is_zone_cma(zone)) + continue; + zone_start_pfn = zone->zone_start_pfn; zone_end_pfn = zone_start_pfn + zone->spanned_pages; diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 41b30fd..619eb20 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -219,19 +219,15 @@ static inline int gfpflags_to_migratetype(const gfp_t gfp_flags) * ZONES_SHIFT must be <= 2 on 32 bit platforms. */ -#if 16 * ZONES_SHIFT > BITS_PER_LONG -#error ZONES_SHIFT too large to create GFP_ZONE_TABLE integer -#endif - #define GFP_ZONE_TABLE ( \ - (ZONE_NORMAL << 0 * ZONES_SHIFT) \ - | (OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \ - | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \ - | (OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \ - | (ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \ - | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \ - | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * ZONES_SHIFT) \ - | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * ZONES_SHIFT) \ + ((u64)ZONE_NORMAL << 0 * ZONES_SHIFT) \ + | ((u64)OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \ + | ((u64)OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \ + | ((u64)OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \ + | ((u64)ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \ + | ((u64)OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \ + | ((u64)ZONE_MOVABLE << (___GFP_MOVABLE|___GFP_HIGHMEM) * ZONES_SHIFT)\ + | ((u64)OPT_ZONE_DMA32 << (___GFP_MOVABLE|___GFP_DMA32) * ZONES_SHIFT)\ ) /* diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 3d385c8..ed01227 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -157,7 +157,7 @@ extern enum zone_type policy_zone; static inline void check_highest_zone(enum zone_type k) { - if (k > policy_zone && k != ZONE_MOVABLE) + if (k > policy_zone && k != ZONE_MOVABLE && !is_zone_cma_idx(k)) policy_zone = k; } diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 90237f2..991e20e 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -319,6 +319,9 @@ enum zone_type { ZONE_HIGHMEM, #endif ZONE_MOVABLE, +#ifdef CONFIG_CMA + ZONE_CMA, +#endif __MAX_NR_ZONES }; @@ -854
Re: [PATCH v3] dma: imx-sdma: switch to dynamic context mode after script loaded
On Thu, Jan 22, 2015 at 03:23:40PM +0800, Robin Gong wrote: > Below comments got from Page4724 of Reference Manual of i.mx6q: > http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf > > --"Static context mode should be used for the first channel called > after reset to ensure that the all context RAM for that channel is > initialized during the context SAVE phase when the channel is > done or yields. Subsequent calls to the same channel or > different channels may use any of the dynamic context modes. > This will ensure that all context locations for the bootload > channel are initialized, and prevent undefined values in context > RAM from being loaded during the context restore if the > channel is re-started later" > > Unfortunately, the rule was broken by > commit(5b28aa319bba96987316425a1131813d87cbab35) > .This patch just take them back. Applied, thanks Pls ensure you use the right subsystem name -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] INPUT/HID: add touch support for SiS touch driver
Hi, Dmitry > -Original Message- > From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com] > Sent: Thursday, February 12, 2015 3:04 PM > To: 曾婷葳 (tammy_tseng) > Cc: Oliver Neukum; lkml; linux-in...@vger.kernel.org; > tammy0...@gmail.com > Subject: Re: [PATCH 2/2] INPUT/HID: add touch support for SiS touch > driver > > Hi Tammy, > > On Thu, Feb 12, 2015 at 02:07:26PM +0800, 曾婷葳 (tammy_tseng) wrote: > > Hi, > > > > > > > > I've checked the coding style and modified the i2c and hid touch > > driver for sis > touch controller. > > > > Please help review them. > > > > Thanks a lot. > > This was sent as HTML so mailing lists dropped it. > > Thanks. > > -- > Dmitry Sorry. Re-send the code diff again. Here is the hid touch driver for sis touch controller. Thanks. Tammy - linux-3.18.5/drivers/hid/Kconfig | 14 ++ linux-3.18.5/drivers/hid/hid-ids.h | 1 + linux-3.18.5/drivers/hid/hid-multitouch.c| 16 ++ linux-3.18.5/drivers/hid/hid-sis_ctrl.c | 360 +++ linux-3.18.5/drivers/hid/usbhid/hid-quirks.c | 1 + 5 files changed, 392 insertions(+) - diff --git a/linux-3.18.5/drivers/hid/Kconfig b/linux-3.18.5/drivers/hid/Kconfig index f42df4d..2235cfe 100644 --- a/linux-3.18.5/drivers/hid/Kconfig +++ b/linux-3.18.5/drivers/hid/Kconfig @@ -496,6 +496,20 @@ config HID_MULTITOUCH To compile this driver as a module, choose M here: the module will be called hid-multitouch. +config HID_SIS_CTRL + bool "SiS Touch Device Controller" + depends on HID_MULTITOUCH + ---help--- + Support for SiS Touch devices update FW. + +config DEBUG_HID_SIS_UPDATE_FW + bool "SiS Touch device debug message(update firmware)" + depends on HID_SIS_CTRL + default n + ---help--- +Say Y here if you want to enable debug message(update firmware) for SiS Touch + devices. Must enable config HID_SIS_UPDATE_FW first. + config HID_NTRIG tristate "N-Trig touch screen" depends on USB_HID diff --git a/linux-3.18.5/drivers/hid/hid-ids.h b/linux-3.18.5/drivers/hid/hid-ids.h index 0e28190..b9ca441 100644 --- a/linux-3.18.5/drivers/hid/hid-ids.h +++ b/linux-3.18.5/drivers/hid/hid-ids.h @@ -809,6 +809,7 @@ #define USB_VENDOR_ID_SIS_TOUCH0x0457 #define USB_DEVICE_ID_SIS9200_TOUCH 0x9200 #define USB_DEVICE_ID_SIS817_TOUCH0x0817 +#define USB_DEVICE_ID_SISF817_TOUCH 0xF817 #define USB_DEVICE_ID_SIS_TS 0x1013 #define USB_DEVICE_ID_SIS1030_TOUCH 0x1030 diff --git a/linux-3.18.5/drivers/hid/hid-multitouch.c b/linux-3.18.5/drivers/hid/hid-multitouch.c index 51e25b9..11d67bc 100644 --- a/linux-3.18.5/drivers/hid/hid-multitouch.c +++ b/linux-3.18.5/drivers/hid/hid-multitouch.c @@ -54,6 +54,10 @@ MODULE_LICENSE("GPL"); #include "hid-ids.h" +#ifdef CONFIG_HID_SIS_CTRL +#include "hid-sis_ctrl.c" +#endif + /* quirks to control the device */ #define MT_QUIRK_NOT_SEEN_MEANS_UP (1 << 0) #define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1) @@ -951,6 +955,14 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) } } +#ifdef CONFIG_HID_SIS_CTRL + if (hdev->vendor == USB_VENDOR_ID_SIS_TOUCH) { + ret = sis_setup_chardev(hdev); + if (ret) + dev_err(&hdev->dev, "sis_setup_chardev fail\n"); + } +#endif + /* This allows the driver to correctly support devices * that emit events over several HID messages. */ @@ -1043,6 +1055,10 @@ static void mt_remove(struct hid_device *hdev) { sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group); hid_hw_stop(hdev); +#ifdef CONFIG_HID_SIS_CTRL + if (hdev->vendor == USB_VENDOR_ID_SIS_TOUCH) + sis_deinit_chardev(); +#endif } /* diff --git a/linux-3.18.5/drivers/hid/hid-sis_ctrl.c b/linux-3.18.5/drivers/hid/hid-sis_ctrl.c new file mode 100644 index 000..3a7b3df --- /dev/null +++ b/linux-3.18.5/drivers/hid/hid-sis_ctrl.c @@ -0,0 +1,360 @@ +/* + * Character device driver for SIS multitouch panels control + * + * Copyright (c) 2009 SIS, Ltd. + * + */ + +/* + * 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 +option) + * any later version. + */ + +#include +#include +#include +#include "usbhid/usbhid.h" +#include + +/*update FW*/ +#include +#include +/*#include */ /*copy_from_user() & copy_to_user()*/ +#include + +#include "hid-ids.h" + +#define SIS817_DEVICE_NAME "sis_aegis_hid_touch_device" +#define SISF817_DEVICE_NAME "sis_aegis_hid_bridge_touch_device" + +#define CTRL 0 +#define ENDP_01 1 +#define ENDP_02 2 +#define DIR_IN 0x1 + +#define SIS_ERR_ALLOCATE_KERNEL_MEM-12 /* Allocate memory fail */ +#define SIS_ERR_COPY_FROM_USER -14 /* Copy data from user fail */ +#define SIS_ERR_COPY_FROM_KERNEL
Re: [PATCH 2/2] INPUT/HID: add touch support for SiS touch driver
Hi, Dmitry > -Original Message- > From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com] > Sent: Thursday, February 12, 2015 3:04 PM > To: 曾婷葳 (tammy_tseng) > Cc: Oliver Neukum; lkml; linux-in...@vger.kernel.org; tammy0...@gmail.com > Subject: Re: [PATCH 2/2] INPUT/HID: add touch support for SiS touch > driver > > Hi Tammy, > > On Thu, Feb 12, 2015 at 02:07:26PM +0800, 曾婷葳 (tammy_tseng) wrote: > > Hi, > > > > > > > > I've checked the coding style and modified the i2c and hid touch driver for > > sis > touch controller. > > > > Please help review them. > > > > Thanks a lot. > > This was sent as HTML so mailing lists dropped it. > > Thanks. > > -- > Dmitry Sorry. Re-send the code diff again. Here is the hid touch driver for sis touch controller. Thanks. Tammy - linux-3.18.5/drivers/hid/Kconfig | 14 ++ linux-3.18.5/drivers/hid/hid-ids.h | 1 + linux-3.18.5/drivers/hid/hid-multitouch.c| 16 ++ linux-3.18.5/drivers/hid/hid-sis_ctrl.c | 360 +++ linux-3.18.5/drivers/hid/usbhid/hid-quirks.c | 1 + 5 files changed, 392 insertions(+) - diff --git a/linux-3.18.5/drivers/hid/Kconfig b/linux-3.18.5/drivers/hid/Kconfig index f42df4d..2235cfe 100644 --- a/linux-3.18.5/drivers/hid/Kconfig +++ b/linux-3.18.5/drivers/hid/Kconfig @@ -496,6 +496,20 @@ config HID_MULTITOUCH To compile this driver as a module, choose M here: the module will be called hid-multitouch. +config HID_SIS_CTRL + bool "SiS Touch Device Controller" + depends on HID_MULTITOUCH + ---help--- + Support for SiS Touch devices update FW. + +config DEBUG_HID_SIS_UPDATE_FW + bool "SiS Touch device debug message(update firmware)" + depends on HID_SIS_CTRL + default n + ---help--- +Say Y here if you want to enable debug message(update firmware) for SiS Touch + devices. Must enable config HID_SIS_UPDATE_FW first. + config HID_NTRIG tristate "N-Trig touch screen" depends on USB_HID diff --git a/linux-3.18.5/drivers/hid/hid-ids.h b/linux-3.18.5/drivers/hid/hid-ids.h index 0e28190..b9ca441 100644 --- a/linux-3.18.5/drivers/hid/hid-ids.h +++ b/linux-3.18.5/drivers/hid/hid-ids.h @@ -809,6 +809,7 @@ #define USB_VENDOR_ID_SIS_TOUCH0x0457 #define USB_DEVICE_ID_SIS9200_TOUCH 0x9200 #define USB_DEVICE_ID_SIS817_TOUCH0x0817 +#define USB_DEVICE_ID_SISF817_TOUCH 0xF817 #define USB_DEVICE_ID_SIS_TS 0x1013 #define USB_DEVICE_ID_SIS1030_TOUCH 0x1030 diff --git a/linux-3.18.5/drivers/hid/hid-multitouch.c b/linux-3.18.5/drivers/hid/hid-multitouch.c index 51e25b9..11d67bc 100644 --- a/linux-3.18.5/drivers/hid/hid-multitouch.c +++ b/linux-3.18.5/drivers/hid/hid-multitouch.c @@ -54,6 +54,10 @@ MODULE_LICENSE("GPL"); #include "hid-ids.h" +#ifdef CONFIG_HID_SIS_CTRL +#include "hid-sis_ctrl.c" +#endif + /* quirks to control the device */ #define MT_QUIRK_NOT_SEEN_MEANS_UP (1 << 0) #define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1) @@ -951,6 +955,14 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) } } +#ifdef CONFIG_HID_SIS_CTRL + if (hdev->vendor == USB_VENDOR_ID_SIS_TOUCH) { + ret = sis_setup_chardev(hdev); + if (ret) + dev_err(&hdev->dev, "sis_setup_chardev fail\n"); + } +#endif + /* This allows the driver to correctly support devices * that emit events over several HID messages. */ @@ -1043,6 +1055,10 @@ static void mt_remove(struct hid_device *hdev) { sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group); hid_hw_stop(hdev); +#ifdef CONFIG_HID_SIS_CTRL + if (hdev->vendor == USB_VENDOR_ID_SIS_TOUCH) + sis_deinit_chardev(); +#endif } /* diff --git a/linux-3.18.5/drivers/hid/hid-sis_ctrl.c b/linux-3.18.5/drivers/hid/hid-sis_ctrl.c new file mode 100644 index 000..3a7b3df --- /dev/null +++ b/linux-3.18.5/drivers/hid/hid-sis_ctrl.c @@ -0,0 +1,360 @@ +/* + * Character device driver for SIS multitouch panels control + * + * Copyright (c) 2009 SIS, Ltd. + * + */ + +/* + * 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 option) + * any later version. + */ + +#include +#include +#include +#include "usbhid/usbhid.h" +#include + +/*update FW*/ +#include +#include +/*#include */ /*copy_from_user() & copy_to_user()*/ +#include + +#include "hid-ids.h" + +#define SIS817_DEVICE_NAME "sis_aegis_hid_touch_device" +#define SISF817_DEVICE_NAME "sis_aegis_hid_bridge_touch_device" + +#define CTRL 0 +#define ENDP_01 1 +#define ENDP_02 2 +#define DIR_IN 0x1 + +#define SIS_ERR_ALLOCATE_KERNEL_MEM-12 /* Allocate memory fail */ +#define SIS_ERR_COPY_FROM_USER -14 /* Copy data from user fail */ +#define SIS_ERR_COPY_FROM_KERNEL -19 /*
Re: General protection fault in iscsi_rx_thread_pre_handler
Hi Gavin, On Tue, 2015-02-03 at 08:28 +0800, Gavin Guo wrote: > Hi Nicholas, > > On Sun, Feb 1, 2015 at 11:47 AM, Gavin Guo wrote: > > Hi Nicholas, > > > > On Sat, Jan 31, 2015 at 6:53 AM, Nicholas A. Bellinger > > wrote: > >> On Fri, 2015-01-23 at 09:30 +0800, Gavin Guo wrote: > >>> Hi Nicholas, > >>> > >>> On Fri, Jan 23, 2015 at 1:35 AM, Nicholas A. Bellinger > >>> wrote: > >>> > On Thu, 2015-01-22 at 23:56 +0800, Gavin Guo wrote: > >>> >> Hi Nicolas, > >>> >> > >>> >> On Thu, Jan 22, 2015 at 5:50 PM, Nicholas A. Bellinger > >>> >> > At the time, a different set of iser-target related changes ended up > >>> >> > avoiding this issue on his particular setup, so we thought it was > >>> >> > likely > >>> >> > a race triggered by login failures specific to iser-target code. > >>> >> > > >>> >> > There was a untested patch (included inline below) to drop the legacy > >>> >> > active_ts_list usage all-together, but IIRC he was not able to > >>> >> > reproduce > >>> >> > further so the patch didn't get picked up for mainline. > >>> >> > > >>> >> > If your able to reliability reproduce, please try with the following > >>> >> > patch and let us know your progress. > >>> >> > >>> >> Thanks for your time reading the mail. I'll let you know the result. > >>> > > >>> > Just curious, are you able to reliability reproduce this bug in a VM..? > >>> > >>> Thanks for your caring, the machine is on the customer side, I've > >>> asked and now waiting for their response. > >> > >> Hi Gavin, > >> > >> Just curious if there has been any update on this yet..? > >> > >> --nab > >> > > > > Really thanks for your attention. I'm also currently waiting for the > > customer's reply and will send the email again to ask for the result. > > However, I think the symptom may be hard to replicate that's why the > > customer didn't reply me for a long time. Thanks for your time again. > > > > Thanks, > > Gavin > > Sorry for making you wait so long. I just got the response from the > customer, they said the general protection fault happened just 2 times > in the past and cannot be reliably reproduced. And I am now waiting > for the verification test. > Just a heads up that I'm planning to include this patch in the v3.20-rc1 PULL request. Please let me know if you have any objections. Thank you, --nab -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 1/3] mm/cma: change fallback behaviour for CMA freepage
Freepage with MIGRATE_CMA can be used only for MIGRATE_MOVABLE and they should not be expanded to other migratetype buddy list to protect them from unmovable/reclaimable allocation. Implementing these requirements in __rmqueue_fallback(), that is, finding largest possible block of freepage has bad effect that high order freepage with MIGRATE_CMA are broken continually although there are suitable order CMA freepage. Reason is that they are not be expanded to other migratetype buddy list and next __rmqueue_fallback() invocation try to finds another largest block of freepage and break it again. So, MIGRATE_CMA fallback should be handled separately. This patch introduces __rmqueue_cma_fallback(), that just wrapper of __rmqueue_smallest() and call it before __rmqueue_fallback() if migratetype == MIGRATE_MOVABLE. This results in unintended behaviour change that MIGRATE_CMA freepage is always used first rather than other migratetype as movable allocation's fallback. But, as already mentioned above, MIGRATE_CMA can be used only for MIGRATE_MOVABLE, so it is better to use MIGRATE_CMA freepage first as much as possible. Otherwise, we needlessly take up precious freepages with other migratetype and increase chance of fragmentation. Acked-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8d52ab1..e64b260 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1029,11 +1029,9 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order, static int fallbacks[MIGRATE_TYPES][4] = { [MIGRATE_UNMOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, [MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE, MIGRATE_MOVABLE, MIGRATE_RESERVE }, + [MIGRATE_MOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, 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 */ #ifdef CONFIG_MEMORY_ISOLATION @@ -1041,6 +1039,17 @@ static int fallbacks[MIGRATE_TYPES][4] = { #endif }; +#ifdef CONFIG_CMA +static struct page *__rmqueue_cma_fallback(struct zone *zone, + unsigned int order) +{ + return __rmqueue_smallest(zone, order, MIGRATE_CMA); +} +#else +static inline struct page *__rmqueue_cma_fallback(struct zone *zone, + unsigned int order) { return NULL; } +#endif + /* * Move the free pages in a range to the free lists of the requested type. * Note that start_page and end_pages are not aligned on a pageblock @@ -1192,19 +1201,8 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype) struct page, lru); area->nr_free--; - if (!is_migrate_cma(migratetype)) { - try_to_steal_freepages(zone, page, - start_migratetype, - migratetype); - } else { - /* -* When borrowing from MIGRATE_CMA, we need to -* release the excess buddy pages to CMA -* itself, and we do not try to steal extra -* free pages. -*/ - buddy_type = migratetype; - } + try_to_steal_freepages(zone, page, start_migratetype, + migratetype); /* Remove the page from the freelists */ list_del(&page->lru); @@ -1246,7 +1244,11 @@ retry_reserve: page = __rmqueue_smallest(zone, order, migratetype); if (unlikely(!page) && migratetype != MIGRATE_RESERVE) { - page = __rmqueue_fallback(zone, order, migratetype); + if (migratetype == MIGRATE_MOVABLE) + page = __rmqueue_cma_fallback(zone, order); + + if (!page) + page = __rmqueue_fallback(zone, order, migratetype); /* * Use MIGRATE_RESERVE rather than fail an allocation. goto -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux
[PATCH v4 3/3] mm/compaction: enhance compaction finish condition
Compaction has anti fragmentation algorithm. It is that freepage should be more than pageblock order to finish the compaction if we don't find any freepage in requested migratetype buddy list. This is for mitigating fragmentation, but, there is a lack of migratetype consideration and it is too excessive compared to page allocator's anti fragmentation algorithm. Not considering migratetype would cause premature finish of compaction. For example, if allocation request is for unmovable migratetype, freepage with CMA migratetype doesn't help that allocation and compaction should not be stopped. But, current logic regards this situation as compaction is no longer needed, so finish the compaction. Secondly, condition is too excessive compared to page allocator's logic. We can steal freepage from other migratetype and change pageblock migratetype on more relaxed conditions in page allocator. This is designed to prevent fragmentation and we can use it here. Imposing hard constraint only to the compaction doesn't help much in this case since page allocator would cause fragmentation again. To solve these problems, this patch borrows anti fragmentation logic from page allocator. It will reduce premature compaction finish in some cases and reduce excessive compaction work. stress-highalloc test in mmtests with non movable order 7 allocation shows considerable increase of compaction success rate. Compaction success rate (Compaction success * 100 / Compaction stalls, %) 31.82 : 42.20 I tested it on non-reboot 5 runs stress-highalloc benchmark and found that there is no more degradation on allocation success rate than before. That roughly means that this patch doesn't result in more fragmentations. Vlastimil suggests additional idea that we only test for fallbacks when migration scanner has scanned a whole pageblock. It looked good for fragmentation because chance of stealing increase due to making more free pages in certain pageblock. So, I tested it, but, it results in decreased compaction success rate, roughly 38.00. I guess the reason that if system is low memory condition, watermark check could be failed due to not enough order 0 free page and so, sometimes, we can't reach a fallback check although migrate_pfn is aligned to pageblock_nr_pages. I can insert code to cope with this situation but it makes code more complicated so I don't include his idea at this patch. Signed-off-by: Joonsoo Kim --- mm/compaction.c | 14 -- mm/internal.h |2 ++ mm/page_alloc.c | 19 ++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 782772d..d40c426 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1170,13 +1170,23 @@ static int __compact_finished(struct zone *zone, struct compact_control *cc, /* Direct compactor: Is a suitable page free? */ for (order = cc->order; order < MAX_ORDER; order++) { struct free_area *area = &zone->free_area[order]; + bool can_steal; /* Job done if page is free of the right migratetype */ if (!list_empty(&area->free_list[migratetype])) return COMPACT_PARTIAL; - /* Job done if allocation would set block type */ - if (order >= pageblock_order && area->nr_free) + /* MIGRATE_MOVABLE can fallback on MIGRATE_CMA */ + if (migratetype == MIGRATE_MOVABLE && + !list_empty(&area->free_list[MIGRATE_CMA])) + return COMPACT_PARTIAL; + + /* +* Job done if allocation would steal freepages from +* other migratetype buddy lists. +*/ + if (find_suitable_fallback(area, order, migratetype, + true, &can_steal) != -1) return COMPACT_PARTIAL; } diff --git a/mm/internal.h b/mm/internal.h index c4d6c9b..9640650 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -200,6 +200,8 @@ isolate_freepages_range(struct compact_control *cc, unsigned long isolate_migratepages_range(struct compact_control *cc, unsigned long low_pfn, unsigned long end_pfn); +int find_suitable_fallback(struct free_area *area, unsigned int order, + int migratetype, bool only_stealable, bool *can_steal); #endif diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 64a4974..95654f9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1191,9 +1191,14 @@ static void steal_suitable_fallback(struct zone *zone, struct page *page, set_pageblock_migratetype(page, start_type); } -/* Check whether there is a suitable fallback freepage with requested order. */ -static int find_suitable_fallback(struct free_area *area, unsigned int order, - int migratetype, bool *can_steal) +/* + * Check whether there is
[PATCH v4 2/3] mm/page_alloc: factor out fallback freepage checking
This is preparation step to use page allocator's anti fragmentation logic in compaction. This patch just separates fallback freepage checking part from fallback freepage management part. Therefore, there is no functional change. Signed-off-by: Joonsoo Kim --- mm/page_alloc.c | 143 +++ 1 file changed, 91 insertions(+), 52 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e64b260..64a4974 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1142,14 +1142,40 @@ static void change_pageblock_range(struct page *pageblock_page, * as fragmentation caused by those allocations polluting movable pageblocks * is worse than movable allocations stealing from unmovable and reclaimable * pageblocks. - * - * If we claim more than half of the pageblock, change pageblock's migratetype - * as well. */ -static void try_to_steal_freepages(struct zone *zone, struct page *page, - int start_type, int fallback_type) +static bool can_steal_fallback(unsigned int order, int start_mt) +{ + /* +* Leaving this order check is intended, although there is +* relaxed order check in next check. The reason is that +* we can actually steal whole pageblock if this condition met, +* but, below check doesn't guarantee it and that is just heuristic +* so could be changed anytime. +*/ + if (order >= pageblock_order) + return true; + + if (order >= pageblock_order / 2 || + start_mt == MIGRATE_RECLAIMABLE || + start_mt == MIGRATE_UNMOVABLE || + page_group_by_mobility_disabled) + return true; + + return false; +} + +/* + * This function implements actual steal behaviour. If order is large enough, + * we can steal whole pageblock. If not, we first move freepages in this + * pageblock and check whether half of pages are moved or not. If half of + * pages are moved, we can change migratetype of pageblock and permanently + * use it's pages as requested migratetype in the future. + */ +static void steal_suitable_fallback(struct zone *zone, struct page *page, + int start_type) { int current_order = page_order(page); + int pages; /* Take ownership for orders >= pageblock_order */ if (current_order >= pageblock_order) { @@ -1157,19 +1183,40 @@ static void try_to_steal_freepages(struct zone *zone, struct page *page, return; } - if (current_order >= pageblock_order / 2 || - start_type == MIGRATE_RECLAIMABLE || - start_type == MIGRATE_UNMOVABLE || - page_group_by_mobility_disabled) { - int pages; + pages = move_freepages_block(zone, page, start_type); + + /* Claim the whole block if over half of it is free */ + if (pages >= (1 << (pageblock_order-1)) || + page_group_by_mobility_disabled) + set_pageblock_migratetype(page, start_type); +} + +/* Check whether there is a suitable fallback freepage with requested order. */ +static int find_suitable_fallback(struct free_area *area, unsigned int order, + int migratetype, bool *can_steal) +{ + int i; + int fallback_mt; + + if (area->nr_free == 0) + return -1; + + *can_steal = false; + for (i = 0;; i++) { + fallback_mt = fallbacks[migratetype][i]; + if (fallback_mt == MIGRATE_RESERVE) + break; + + if (list_empty(&area->free_list[fallback_mt])) + continue; - pages = move_freepages_block(zone, page, start_type); + if (can_steal_fallback(order, migratetype)) + *can_steal = true; - /* Claim the whole block if over half of it is free */ - if (pages >= (1 << (pageblock_order-1)) || - page_group_by_mobility_disabled) - set_pageblock_migratetype(page, start_type); + return fallback_mt; } + + return -1; } /* Remove an element from the buddy allocator from the fallback list */ @@ -1179,53 +1226,45 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype) struct free_area *area; unsigned int current_order; struct page *page; + int fallback_mt; + bool can_steal; /* Find the largest possible block of pages in the other list */ for (current_order = MAX_ORDER-1; current_order >= order && current_order <= MAX_ORDER-1; --current_order) { - int i; - for (i = 0;; i++) { - int migratetype = fallbacks[start_migratetype][i]; - int b
semantics of KSTK_ESP and friends
Hi, Is KSTK_ESP supposed to return the kernel mode SP of a sleeping task or is it supposed to provide the user mode SP at the time of last kernel entry ? The 2 non arch users of the API expect the user mode SP semantics: * vm_is_stack_for_task() - to annotate /proc//maps stack vma - which is shere Alexey noted this. * do_task_stat() ARC port uses these for unwinding the task of a sleeping task (hence kernel mode SP semantics). metag (from the looks of it) also seem to provide kernel mode value, while most others seem to provide the user mode variant. I can fix ARC to work with expectation of generic code, but wanted to understand anyways. Thx, -Vineet -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] INPUT/HID: add touch support for SiS touch driver
Hi Tammy, On Thu, Feb 12, 2015 at 02:07:26PM +0800, 曾婷葳 (tammy_tseng) wrote: > Hi, > > > > I've checked the coding style and modified the i2c and hid touch driver for > sis touch controller. > > Please help review them. > > Thanks a lot. This was sent as HTML so mailing lists dropped it. Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] INPUT/HID: add touch support for SiS touch driver
Hi Tammy, On Thu, Feb 12, 2015 at 02:07:21PM +0800, 曾婷葳 (tammy_tseng) wrote: > Hi, > > I've checked the coding style and modified the i2c and hid touch driver for > sis touch controller. > Please help review them. > Thanks a lot. This was again sent in base64, with DOS file endings... > > Tammy > - > Here is the sis i2c driver in input: > > linux-3.18.5/drivers/input/touchscreen/Kconfig |7 + > linux-3.18.5/drivers/input/touchscreen/Makefile |1 + > linux-3.18.5/drivers/input/touchscreen/sis_i2c.c | 1032 > ++ > linux-3.18.5/drivers/input/touchscreen/sis_i2c.h | 173 > 4 files changed, 1213 insertions(+) > > > - > diff --git a/linux-3.18.5/drivers/input/touchscreen/Kconfig > b/linux-3.18.5/drivers/input/touchscreen/Kconfig > index e1d8003..5093ccc 100644 > --- a/linux-3.18.5/drivers/input/touchscreen/Kconfig > +++ b/linux-3.18.5/drivers/input/touchscreen/Kconfig > @@ -962,4 +962,11 @@ config TOUCHSCREEN_ZFORCE > To compile this driver as a module, choose M here: the > module will be called zforce_ts. > > +config TOUCHSCREEN_SIS_I2C > + tristate "SiS 9200 family I2C touchscreen driver" > + depends on I2C > + default n No need to say "default n". > + help > + This enables support for SiS 9200 family over I2C based touchscreens. Please add To compile this driver as a module... as all the rest of input dirvers. > + > endif > diff --git a/linux-3.18.5/drivers/input/touchscreen/Makefile > b/linux-3.18.5/drivers/input/touchscreen/Makefile > index 090e61c..25cfd9f 100644 > --- a/linux-3.18.5/drivers/input/touchscreen/Makefile > +++ b/linux-3.18.5/drivers/input/touchscreen/Makefile > @@ -79,3 +79,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE) += > zylonite-wm97xx.o > obj-$(CONFIG_TOUCHSCREEN_W90X900)+= w90p910_ts.o > obj-$(CONFIG_TOUCHSCREEN_TPS6507X) += tps6507x-ts.o > obj-$(CONFIG_TOUCHSCREEN_ZFORCE) += zforce_ts.o > +obj-$(CONFIG_TOUCHSCREEN_SIS_I2C) += sis_i2c.o > diff --git a/linux-3.18.5/drivers/input/touchscreen/sis_i2c.c > b/linux-3.18.5/drivers/input/touchscreen/sis_i2c.c > new file mode 100644 > index 000..260a7b6 > --- /dev/null > +++ b/linux-3.18.5/drivers/input/touchscreen/sis_i2c.c > @@ -0,0 +1,1032 @@ > +/* drivers/input/touchscreen/sis_i2c.c > + * - I2C Touch panel driver for SiS 9200 family > + * > + * Copyright (C) 2011 SiS, Inc. Not 2015? > + * > + * This software is licensed under the terms of the GNU General Public > + * License version 2, as published by the Free Software Foundation, and > + * may be copied, distributed, and modified under those terms. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + */ > + > +#include > +#include > +#ifdef CONFIG_HAS_EARLYSUSPEND > +#include > +#endif There is no CONFIG_HAS_EARLYSUSPEND in mainline, please drop. > +#include > +#include > +#include > +#include > +#include > +#include > +#include "sis_i2c.h" > +#include > +#include > +#include > +#include > +#include > +#include > + > +#ifdef _STD_RW_IO > +#include > +#include > +#include > +#define DEVICE_NAME "sis_aegis_touch_device" > +static const int sis_char_devs_count = 1;/* device count */ > +static int sis_char_major; > +static struct cdev sis_char_cdev; > +static struct class *sis_char_class; This all should go away, we do not need custom char device for a touchscreen. > +#endif > + > +/* Addresses to scan */ > +static const unsigned short normal_i2c[] = { SIS_SLAVE_ADDR, I2C_CLIENT_END > }; > +static struct workqueue_struct *sis_wq; I see you are trying to support polling mode... Please don't, it is not useful for production code. Also please switch to using threaded irq instead of having hard irq + work queue - it is really hard to manage it in race-free way. > +struct sis_ts_data *ts_bak; > +struct sisTP_driver_data *TPInfo; Global? Why? > +static void sis_tpinfo_clear(struct sisTP_driver_data *TPInfo, int max); > + > +#ifdef CONFIG_HAS_EARLYSUSPEND > +static void sis_ts_early_suspend(struct early_suspend *h); > +static void sis_ts_late_resume(struct early_suspend *h); Nope, don't have it. > +#endif > + > +#ifdef _CHECK_CRC > +static const unsigned short crc16tab[256] = { > + 0x, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, > + 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, Isn't this CRC ITU-T V.41? We already have it in kernel. > + 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, > + 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, > + 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, > + 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, > + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x6
Re: [PATCH] Input: sun4i-ts: add thermal driver dependency
Hi, On 11-02-15 19:24, Dmitry Torokhov wrote: On Thu, Jan 29, 2015 at 10:51:51AM -0800, Dmitry Torokhov wrote: On Thu, Jan 29, 2015 at 08:50:18AM +0100, Hans de Goede wrote: Hi, On 28-01-15 16:17, Arnd Bergmann wrote: The sun4i-ts driver has had a dependency on the thermal code since it was first merged, The "since it was first merged bit" is not true, this is caused by recent changes by ChenYu. Other then that no objections from me against the proposed fix. Regards, Hans but this is not currently enforced in Kconfig, so in some randconfig builds we get drivers/built-in.o: In function `sun4i_ts_remove': :(.text+0x2376f4): undefined reference to `thermal_zone_of_sensor_unregister' drivers/built-in.o: In function `sun4i_ts_probe': :(.text+0x237a94): undefined reference to `thermal_zone_of_sensor_register' :(.text+0x237c00): undefined reference to `thermal_zone_of_sensor_unregister' We need the dependency on THERMAL in order to ensure that this driver becomes a loadable module if the thermal support itself is modular, while the dependency on THERMAL_OF is a runtime dependency and the driver will still build but not work if it is missing. Signed-off-by: Arnd Bergmann Fixes: 6decea7c5438e2 ("Input: add driver for Allwinner sunxi SoC's rtp controller") diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 58917525126e..e2447f0063b7 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -943,6 +943,8 @@ config TOUCHSCREEN_SUN4I tristate "Allwinner sun4i resistive touchscreen controller support" depends on ARCH_SUNXI || COMPILE_TEST depends on HWMON + depends on THERMAL + depends on THERMAL_OF || COMPILE_TEST THERMAL_OF does have proper stubs and I do not see why we need to force having TERMAL even if we don't do compile test. Should the dependency be: depends on !THERMAL_OF || TERMAL *ping* ChenYu, since your patch causes this problem I'm assuming that you will come up with a fix, is that correct ? Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v3] pinctrl: exynos: Add support for Exynos5433
Hi Linus, We're looking forward to merging it on the v3.20. Could you pick this patch up before merge-window is closed? Best Regards, Chanho Park > -Original Message- > From: linux-arm-kernel [mailto:linux-arm-kernel- > boun...@lists.infradead.org] On Behalf Of Chanwoo Choi > Sent: Thursday, February 12, 2015 3:18 PM > To: Linus Walleij > Cc: linux-samsung-soc; Tomasz Figa; linux-kernel@vger.kernel.org; Inki > Dae; Kukjin Kim; Thomas Abraham; Chanho Park; linux-arm- > ker...@lists.infradead.org > Subject: Re: [PATCH v3] pinctrl: exynos: Add support for Exynos5433 > > Hi Linus, > > On 02/08/2015 11:59 PM, Tomasz Figa wrote: > > Hi, > > > > 2015-01-29 18:48 GMT+09:00 Linus Walleij : > >> On Wed, Jan 21, 2015 at 7:43 AM, Chanwoo Choi > wrote: > >> > >>> This patch adds driver data for Exynos5433 SoC. Exynos5433 includes > 228 multi- > >>> functional input/output port pins and 135 memory port pins. There > are 41 general > >>> port groups and 2 memory port groups. > >>> > >>> Cc: Tomasz Figa > >>> Cc: Thomas Abraham > >>> Cc: Linus Walleij > >>> Signed-off-by: Chanwoo Choi > >>> Acked-by: Inki Dae > >>> --- > >>> Changes from v2: > >>> - Rebase it on v3.19-rc5 > >> > >> Waiting for Tomasz to review this. > > > > Thanks Linus. Looks good to me. > > > > Acked-by: Tomasz Figa > > Could you please pick this patch? > > Best Regards, > Chanwoo Choi > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 6/8] arm64: dts: exynos: Add RTC and ADC dt node for Exynos5433 SoC
This patch adds RTC (Real Time Clock) dt node for Exynos5433 SoC and adds ADC dt node for Exynos5433 SoC. The c1b501564c98a94b4(iio: adc: exynos_adc: Add support for exynos7) commit supports the ADC for Exynos7. Exynos5433's ADC IP is the same with Exynos7's ADC IP. Exynos5433 has a little different from ADCv2 on ADC_CON2 register. Exynos5433 don't contain OSEL/ESEL /HIGHF of ADC_CON2. Cc: Kukjin Kim Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 0168786..8e9ca8d 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -852,6 +852,24 @@ clocks = <&xxti>; }; + rtc: rtc@1059 { + compatible = "samsung,exynos3250-rtc"; + reg = <0x1059 0x100>; + interrupts = <0 385 0>, <0 386 0>; + status = "disabled"; + }; + + adc: adc@14d1 { + compatible = "samsung,exynos7-adc"; + reg = <0x14d1 0x100>; + interrupts = <0 438 0>; + clock-names = "adc"; + clocks = <&cmu_peric CLK_PCLK_ADCIF>; + #io-channel-cells = <1>; + io-channel-ranges; + status = "disabled"; + }; + timer { compatible = "arm,armv8-timer"; interrupts = <1 13 0xff04>, -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 5/8] arm64: dts: exynos: Add PMU dt node for Exynos5433
This patch adds PMU (Power Management Unit) dt node for Exynos5433 SoC and set the source clock for CLKOUT register as xxti . Cc: Kukjin Kim Signed-off-by: Chanwoo Choi [ideal.song: Add the setting of CLKOUT register] Signed-off-by: Inha Song Acked-by: Inki Dae --- Documentation/devicetree/bindings/arm/samsung/pmu.txt | 1 + arch/arm64/boot/dts/exynos/exynos5433.dtsi| 8 2 files changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt index 67b2113..a87fc43 100644 --- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt +++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt @@ -10,6 +10,7 @@ Properties: - "samsung,exynos5260-pmu" - for Exynos5260 SoC. - "samsung,exynos5410-pmu" - for Exynos5410 SoC, - "samsung,exynos5420-pmu" - for Exynos5420 SoC. + - "samsung,exynos5433-pmu" - for Exynos5433 SoC. - "samsung,exynos7-pmu" - for Exynos7 SoC. second value must be always "syscon". diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 5477630..0168786 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -844,6 +844,14 @@ status = "disabled"; }; + pmu_system_controller: system-controller@105c { + compatible = "samsung,exynos5433-pmu", "syscon"; + reg = <0x105c 0x5008>; + #clock-cells = <1>; + clock-names = "clkout16"; + clocks = <&xxti>; + }; + timer { compatible = "arm,armv8-timer"; interrupts = <1 13 0xff04>, -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: imx_v6_v7_defconfig needs lzop
Hi Geert, On Thu, 5 Feb 2015 12:12:17 +0100 Geert Uytterhoeven wrote: > > On Thu, Feb 5, 2015 at 11:59 AM, Uwe Kleine-König > wrote: > > On Wed, Feb 04, 2015 at 03:41:45PM +0100, Geert Uytterhoeven wrote: > >> On Wed, Feb 4, 2015 at 3:32 PM, Fabio Estevam wrote: > >> > On Wed, Feb 4, 2015 at 12:21 PM, Geert Uytterhoeven > >> > wrote: > >> >> http://kisskb.ellerman.id.au/kisskb/buildresult/12358024/ > >> >> > >> >> /bin/sh: 1: lzop: not found > >> >> cat: write error: Broken pipe > >> >> make[3]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1 > >> > > >> > Isn't this error happening due to the lack of 'lzop' package installed > >> > on the host machine? > >> > >> Indeed. > > I guess you don't want to ask for help or report a build breakage, but > > question if it's sensible to let a defconfig depend on a host tool that > > isn't commonly installed, right? > > Right. > > The maintainers of the host machines were in the To-header, in the hope they > would install the missing tool. We have now done that. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpoQi7ml4hbs.pgp Description: OpenPGP digital signature
[PATCH v3 1/8] arm64: exynos5433: Enable ARMv8 based Exynos5433 (SoC) support
This patch adds the necessary Kconfig entries to enable support for the ARMv8 based Exynos5433 SoC. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/Kconfig | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 15e8e74..4fc08d1 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -153,6 +153,19 @@ config ARCH_EXYNOS help This enables support for Samsung Exynos SoC family +config ARCH_EXYNOS5433 + bool "ARMv8 based Samsung Exynos5433" + select ARCH_EXYNOS + select ARM_AMBA + select ARM_GIC + select COMMON_CLK_SAMSUNG + select HAVE_S3C_RTC if RTC_CLASS + select PINCTRL + select PINCTRL_EXYNOS + + help + This enables support for Samsung Exynos5433 SoC family + config ARCH_EXYNOS7 bool "ARMv8 based Samsung Exynos7" select ARCH_EXYNOS -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 3/8] arm64: dts: exynos: Add MSHC dt node for Exynos5433
From: Jaehoon Chung This patch adds MSHC (Mobile Storage Host Controller) dt node for Exynos5433 SoC. MSHC is an interface between the system the SD/MMC card. Cc: Kukjin Kim Cc: Mark Rutland Cc: Marc Zyngier Cc: Arnd Bergmann Cc: Olof Johansson Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Jaehoon Chung Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 42 ++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 2cc1375..a151584 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -52,6 +52,9 @@ i2c9 = &hsi2c_9; i2c10 = &hsi2c_10; i2c11 = &hsi2c_11; + mshc0 = &mshc_0; + mshc1 = &mshc_1; + mshc2 = &mshc_2; }; cpus { @@ -683,6 +686,45 @@ status = "disabled"; }; + mshc_0: mshc@1554 { + compatible = "samsung,exynos7-dw-mshc-smu"; + interrupts = <0 225 0>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1554 0x2000>; + clocks = <&cmu_fsys CLK_ACLK_MMC0>, +<&cmu_fsys CLK_SCLK_MMC0>; + clock-names = "biu", "ciu"; + fifo-depth = <0x40>; + status = "disabled"; + }; + + mshc_1: mshc@1555 { + compatible = "samsung,exynos7-dw-mshc-smu"; + interrupts = <0 226 0>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1555 0x2000>; + clocks = <&cmu_fsys CLK_ACLK_MMC1>, +<&cmu_fsys CLK_SCLK_MMC1>; + clock-names = "biu", "ciu"; + fifo-depth = <0x40>; + status = "disabled"; + }; + + mshc_2: mshc@1556 { + compatible = "samsung,exynos7-dw-mshc-smu"; + interrupts = <0 227 0>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1556 0x2000>; + clocks = <&cmu_fsys CLK_ACLK_MMC2>, +<&cmu_fsys CLK_SCLK_MMC2>; + clock-names = "biu", "ciu"; + fifo-depth = <0x40>; + status = "disabled"; + }; + timer { compatible = "arm,armv8-timer"; interrupts = <1 13 0xff04>, -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 8/8] arm64: dts: exynos: Add I2S dt node for Exynos5433 SoC
From: Inha Song This patch adds I2S device tree node for Exynos5433 SoC. In Exynos5433 SoC, I2S0 is used for audio interface. Cc: Kukjin Kim Signed-off-by: Inha Song Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 7bf4dcf..807ad8e 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -511,6 +511,23 @@ status = "disabled"; }; + i2s0: i2s0@1144 { + compatible = "samsung,exynos7-i2s"; + reg = <0x1144 0x100>; + dmas = <&adma 0 &adma 2>; + dma-names = "tx", "rx"; + interrupts = <0 70 0>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_aud CLK_PCLK_AUD_I2S>, +<&cmu_aud CLK_SCLK_AUD_I2S>, +<&cmu_aud CLK_SCLK_I2S_BCLK>; + clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; + pinctrl-names = "default"; + pinctrl-0 = <&i2s0_bus>; + status = "disabled"; + }; + pinctrl_alive: pinctrl@1058 { compatible = "samsung,exynos5433-pinctrl"; reg = <0x1058 0x1000>; -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 0/8] arm64: Add the support for new Exynos5433 SoC
This patchset adds new 64-bit Exynos5433 Samsung SoC which contains quad Cortex-A57 and quad Cortex-A53. It is desigend with the 20nm low power process. This patchset is based on linux-samsung.git (branch: for-next). Depends on: - Exynos5433 clock controller patch-set[1][2] was merged by Sylwester Nawrocki, (http://git.linuxtv.org/cgit.cgi/snawrocki/samsung.git/, branch:for-v3.20/clk/next) - Exynos5433 UART patch[4] was merged by GregKH. [1] [PATCH v5 00/13] clk: samsung: Add the support for exynos5433 clocks - https://lkml.org/lkml/2015/2/2/368 [2] [PATCH v3 0/9] clk: samsung: Add clocks for remaining domains of Exynos5433 - https://lkml.org/lkml/2015/2/2/784 [3] [PATCHv2] pinctrl: exynos: Add support for Exynos543 - https://lkml.org/lkml/2014/12/2/207 [4] serial: samsung: Add the support for Exynos5433 SoC - http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=31ec77aca72ee5920ed3ec3d047734dc0bc43342 Changelog: Changes from v2: (https://lkml.org/lkml/2014/12/2/134) - Exynos5444 DTS modification : Fix the range of GICC memory map (0x1000 -> 0x2000) : Fix address space of 'range' property under 'soc' node : Add ADMA / I2S dt node for sound playback/capture - Select ARM_AMBA/ARM_GIC/HAVE_S3C_RTC for Exynos5433 in arch/arm64/Kconfig - Send separate patch-set for Exynos5433 clock controller[1][2] and pinctrl[3] Changes from v1: (https://lkml.org/lkml/2014/11/27/92) - Merge two patches (patch2, patch3) to solve incomplete description - Exynos5433 Clock driver : Fix wrong register and code clean by using space instead of tab : Add CLK_IGNORE_UNUSED flag to pclk_sysreg_* clock for accessing system control register : Remove duplicate definition on the patch for CMU_BUS{0|1|2} domain - Exynos5433 SoC DTS : Remove un-supported properties of arch_timer : Remove 'clock-frequency' property from 'cpus' dt node : Fix interrupt type from edge rising triggering to level high triggering because Cortex-A53/A57 use level triggering. : Fix defult address-size/size-celss from 1 to 2 because Exynos5433 is 64-bit SoC : Modify 'fin_pll' dt node to remove un-needed and ugly code : Move 'chipid' dt node under 'soc' : Use lowercase on all case in exynos5433.dtsi : Add PSCI dt node for secondary cpu boot : Add 'samsung,exynos5433' compatible to MCT dt node - Divide pinctrl patch from this patchset - Add new following patches: : clocksource: exynos_mct: Add the support for Exynos 64bit SoC : arm64: Enable Exynos5433 SoC in the defconfig Chanwoo Choi (5): arm64: exynos5433: Enable ARMv8 based Exynos5433 (SoC) support arm64: dts: exynos: Add dts files for 64-bit Exynos5433 SoC arm64: dts: exynos: Add SPI/PDMA dt node for Exynos5433 arm64: dts: exynos: Add PMU dt node for Exynos5433 arm64: dts: exynos: Add RTC and ADC dt node for Exynos5433 SoC Inha Song (2): arm64: dts: exynos: Add ADMA dt node for Exynos5433 SoC arm64: dts: exynos: Add I2S dt node for Exynos5433 SoC Jaehoon Chung (1): arm64: dts: exynos: Add MSHC dt node for Exynos5433 .../devicetree/bindings/arm/samsung/pmu.txt| 1 + arch/arm64/Kconfig | 13 + arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 698 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 911 + 4 files changed, 1623 insertions(+) create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi create mode 100644 arch/arm64/boot/dts/exynos/exynos5433.dtsi -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 7/8] arm64: dts: exynos: Add ADMA dt node for Exynos5433 SoC
From: Inha Song This patch adds ADMA (Advanced DMA) device tree node for Exynos5433 SoC. In Exynos5433 SoC, ADMA is used for I2S audio interface. Cc: Kukjin Kim Signed-off-by: Inha Song Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 8e9ca8d..7bf4dcf 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -462,6 +462,17 @@ #dma-channels = <8>; #dma-requests = <32>; }; + + adma: adma@1142 { + compatible = "arm,pl330", "arm,primecell"; + reg = <0x1142 0x1000>; + interrupts = <0 73 0>; + clocks = <&cmu_aud CLK_ACLK_DMAC>; + clock-names = "apb_pclk"; + #dma-cells = <1>; + #dma-channels = <8>; + #dma-requests = <32>; + }; }; serial_0: serial@14c1 { -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v3 4/8] arm64: dts: exynos: Add SPI/PDMA dt node for Exynos5433
This patch adds SPI (Serial Peripheral Interface) dt node for Exynos5433 SoC. SPI transfers serial data by using various peripherals. SPI includes 8-bit/16-bit/32-bit shift registers to transmit and receive data. PDMA is used for SPI communication. Cc: Kukjin Kim Cc: Mark Rutland Cc: Marc Zyngier Cc: Arnd Bergmann Cc: Olof Johansson Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 119 + 1 file changed, 119 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index a151584..5477630 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -55,6 +55,11 @@ mshc0 = &mshc_0; mshc1 = &mshc_1; mshc2 = &mshc_2; + spi0 = &spi_0; + spi1 = &spi_1; + spi2 = &spi_2; + spi3 = &spi_3; + spi4 = &spi_4; }; cpus { @@ -430,6 +435,35 @@ interrupts = <1 9 0xf04>; }; + amba { + compatible = "arm,amba-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + pdma0: pdma@1561 { + compatible = "arm,pl330", "arm,primecell"; + reg = <0x1561 0x1000>; + interrupts = <0 228 0>; + clocks = <&cmu_fsys CLK_PDMA0>; + clock-names = "apb_pclk"; + #dma-cells = <1>; + #dma-channels = <8>; + #dma-requests = <32>; + }; + + pdma1: pdma@1560 { + compatible = "arm,pl330", "arm,primecell"; + reg = <0x1560 0x1000>; + interrupts = <0 246 0>; + clocks = <&cmu_fsys CLK_PDMA1>; + clock-names = "apb_pclk"; + #dma-cells = <1>; + #dma-channels = <8>; + #dma-requests = <32>; + }; + }; + serial_0: serial@14c1 { compatible = "samsung,exynos5433-uart"; reg = <0x14c1 0x100>; @@ -530,6 +564,91 @@ interrupts = <0 442 0>; }; + spi_0: spi@14d2 { + compatible = "samsung,exynos7-spi"; + reg = <0x14d2 0x100>; + interrupts = <0 432 0>; + dmas = <&pdma0 9>, <&pdma0 8>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_peric CLK_PCLK_SPI0>, +<&cmu_top CLK_SCLK_SPI0_PERIC>; + clock-names = "spi", "spi_busclk0"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_bus>; + status = "disabled"; + }; + + spi_1: spi@14d3 { + compatible = "samsung,exynos7-spi"; + reg = <0x14d3 0x100>; + interrupts = <0 433 0>; + dmas = <&pdma0 11>, <&pdma0 10>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_peric CLK_PCLK_SPI1>, +<&cmu_top CLK_SCLK_SPI1_PERIC>; + clock-names = "spi", "spi_busclk0"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_bus>; + status = "disabled"; + }; + + spi_2: spi@14d4 { + compatible = "samsung,exynos7-spi"; + reg = <0x14d4 0x100>; + interrupts = <0 434 0>; + dmas = <&pdma0 13>, <&pdma0 12>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_peric CLK_PCLK_SPI2>, +<&cmu_top CLK_SCLK_SPI2_PERIC>; + clock-names = "spi", "spi_busclk0"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; +
[PATCH v3 2/8] arm64: dts: exynos: Add dts files for 64-bit Exynos5433 SoC
This patch adds new Exynos5433 dtsi to support 64-bit Exynos5433 SoC based on Octal core CPUs (quad Cortex-A57 and quad Cortex-A53). And Exynos5433 supports PSCI (Power State Coordination Interface) v0.1. This patch includes following dt node to support Exynos5433 SoC: 1. Octa core for big.LITTLE architecture - Cortex-A53 LITTLE Quad-core - Cortex-A57 big Quad-core - Support PSCI v0.1 2. clock controller node: - CMU_TOP : clocks for IMEM/FSYS/G3D/GSCL/HEVC/MSCL/G2D/MFC/PERIC/PERIS - CMU_CPIF : clocks for LLI (Low Latency Interface) - CMU_MIF : clocks for DRAM Memory Controller - CMU_PERIC : clocks for UART/I2C/SPI/I2S/PCM/SPDIF/PWM/SLIMBUS - CMU_PERIS : clocks for PMU/TMU/MCT/WDT/RTC/SECKEY/TZPC - CMU_FSYS : clocks for USB/UFS/SDMMC/TSI/PDMA - CMU_G2D : clocks for G2D/MDMA - CMU_DISP : clocks for DECON/HDMI/DSIM/MIXER - CMU_AUD : clocks for Cortex-A5/BUS/AUDIO - CMU_BUS{0|1|2} : clocks for global data buses and global peripheral buses - CMU_G3D : clocks for 3D Graphics Engine - CMU_GSCL : clocks for GSCALER - CMU_APOLLO: clocks for Cortex-A53 Quad-core processor. - CMU_ATLAS : clocks for Cortex-A57 Quad-core processor, CoreSight and L2 cache controller. - CMU_MSCL : clocks for M2M (Memory to Memory) scaler and JPEG IPs. - CMU_MFC : clocks for MFC (Multi-Format Codec) IP. - CMU_HEVC : clocks for HEVC(High Efficiency Video Codec) decoder IP. - CMU_ISP : clocks for FIMC-ISP/DRC/SCLC/DIS/3DNR IPs. - CMU_CAM0 : clocks for MIPI_CSIS{0|1}/FIMC_LITE_{A|B|D}/FIMC_3AA{0|1} IPs. - CMU_CAM1 : clocks for COrtex-A5/MIPI_CSIS2/FIMC_LITE_C/FIMC-FD IPs. 3. pinctrl node for GPIO: - alive/aud/cpif/ese/finger/fsys/imem/nfc/peric/touch pad 4. HS (High-Speed) I2C device 5. Serial device 6. ARCH timer (arm,armv8-timer) 7. Interrupt controller (arm,gic-400) Cc: Kukjin Kim Cc: Mark Rutland Cc: Marc Zyngier Cc: Arnd Bergmann Cc: Olof Johansson Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Chanwoo Choi Acked-by: Inki Dae --- arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 698 + arch/arm64/boot/dts/exynos/exynos5433.dtsi | 696 2 files changed, 1394 insertions(+) create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi create mode 100644 arch/arm64/boot/dts/exynos/exynos5433.dtsi diff --git a/arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi new file mode 100644 index 000..81fe925 --- /dev/null +++ b/arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi @@ -0,0 +1,698 @@ +/* + * Samsung's Exynos5433 SoC pin-mux and pin-config device tree source + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Samsung's Exynos5433 SoC pin-mux and pin-config options are listed as device + * tree nodes are listed in this file. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +&pinctrl_alive { + gpa0: gpa0 { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + interrupt-parent = <&gic>; + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, +<0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>; + #interrupt-cells = <2>; + }; + + gpa1: gpa1 { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + interrupt-parent = <&gic>; + interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>, +<0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>; + #interrupt-cells = <2>; + }; + + gpa2: gpa2 { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpa3: gpa3 { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +}; + +&pinctrl_aud { + gpz0: gpz0 { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpz1: gpz1 { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; + + i2s0_bus: i2s0-bus { + samsung,pins = "gpz0-0", "gpz0-1", "gpz0-2", "gpz0-3", + "gpz0-4", "gpz0-5", "gpz0-6"; + samsung,pin-function = <2>; + samsung,pin-pud = <1>; + samsung,pin-drv = <0>; + }; + + pcm0_bus: pcm0-bus { + samsung,pins = "gpz1-0", "gpz1-1", "gpz1-2", "gpz1-3"; + samsung,pin-function = <3>; +
[GIT PULL] AVR32 update for 3.20
Hello Linus, please pull git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32.git for-linus to receive the following AVR32 update for 3.20 Hans-Christian Egtvedt (2): avr32: wire up missing syscalls avr32: update all default configurations Alexandre Belloni (1): avr32: remove fake at91 cpu identification arch/avr32/configs/atngw100_defconfig | 30 -- arch/avr32/configs/atngw100_evklcd100_defconfig | 30 -- arch/avr32/configs/atngw100_evklcd101_defconfig | 30 -- arch/avr32/configs/atngw100_mrmt_defconfig | 23 --- arch/avr32/configs/atngw100mkii_defconfig | 30 -- arch/avr32/configs/atngw100mkii_evklcd100_defconfig | 30 -- arch/avr32/configs/atngw100mkii_evklcd101_defconfig | 30 -- arch/avr32/configs/atstk1002_defconfig | 30 +++--- arch/avr32/configs/atstk1003_defconfig | 26 +++--- arch/avr32/configs/atstk1004_defconfig | 27 +++ arch/avr32/configs/atstk1006_defconfig | 30 +++--- arch/avr32/configs/favr-32_defconfig| 26 ++ arch/avr32/configs/hammerhead_defconfig | 22 -- arch/avr32/configs/merisc_defconfig | 23 +++ arch/avr32/configs/mimc200_defconfig| 18 -- arch/avr32/include/asm/unistd.h | 2 +- arch/avr32/include/uapi/asm/unistd.h| 41 + arch/avr32/kernel/syscall-stubs.S | 36 arch/avr32/kernel/syscall_table.S | 37 + arch/avr32/mach-at32ap/include/mach/cpu.h | 26 +- 20 files changed, 209 insertions(+), 338 deletions(-) -- Best regards, Hans-Christian Egtvedt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Investment Opportunity (Shares, Bond & Assets)
I bring you an investment opportunity to partner with us in this 2015 lucrative investment trading platform. Reply for more info; Dr. Tony O'Reilly investmenttrad...@bellair.net -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/3] memory_hotplug: hyperv: fix deadlock between memory adding and onlining
On Wed, 11 Feb 2015, David Rientjes wrote: > > If newly added memory is brought online with e.g. udev rule: > > SUBSYSTEM=="memory", ACTION=="add", ATTR{state}="online" > > the following deadlock is observed (and easily reproducable): > > > > First participant, worker thread doing add_memory(): > > > > [ 724.948846] kworker/0:1 D 88000412f9c8 1324827 2 > > 0x > > [ 724.973543] Workqueue: events hot_add_req [hv_balloon] > > [ 724.991736] 88000412f9c8 88003fa1dc30 > > 000151c0 > > [ 725.019725] 0246 88000412ffd8 000151c0 > > 88003a77a4e0 > > [ 725.046486] 88003fa1dc30 0001032a6000 88003a7ca838 > > 88003a7ca898 > > [ 725.072969] Call Trace: > > [ 725.082690] [] schedule_preempt_disabled+0x29/0x70 > > [ 725.103799] [] mutex_lock_nested+0x14b/0x470 > > [ 725.122367] [] ? device_attach+0x23/0xb0 > > [ 725.140992] [] device_attach+0x23/0xb0 > > [ 725.159131] [] bus_probe_device+0xb0/0xe0 > > [ 725.177055] [] device_add+0x443/0x650 > > [ 725.195558] [] device_register+0x1e/0x30 > > [ 725.213133] [] init_memory_block+0xd0/0xf0 > > [ 725.231533] [] register_new_memory+0xb1/0xd0 > > [ 725.250769] [] __add_pages+0x13f/0x250 > > [ 725.269642] [] ? arch_add_memory+0x70/0xf0 > > [ 725.288764] [] arch_add_memory+0x70/0xf0 > > [ 725.306117] [] add_memory+0xef/0x1f0 > > [ 725.322466] [] hot_add_req+0x33f/0xf90 [hv_balloon] > > [ 725.342777] [] process_one_work+0x1df/0x4e0 > > [ 725.361459] [] ? process_one_work+0x16d/0x4e0 > > [ 725.380390] [] worker_thread+0x11b/0x450 > > [ 725.397684] [] ? process_one_work+0x4e0/0x4e0 > > [ 725.416533] [] kthread+0xf3/0x110 > > [ 725.433372] [] ? kthread_create_on_node+0x240/0x240 > > [ 725.453749] [] ret_from_fork+0x7c/0xb0 > > [ 725.470994] [] ? kthread_create_on_node+0x240/0x240 > > [ 725.491469] 6 locks held by kworker/0:1/27: > > [ 725.505037] #0: ("events"){..}, at: [] > > process_one_work+0x16d/0x4e0 > > [ 725.533370] #1: ((&dm_device.ha_wrk.wrk)){..}, at: > > [] process_one_work+0x16d/0x4e0 > > [ 725.565580] #2: (mem_hotplug.lock){..}, at: [] > > mem_hotplug_begin+0x5/0x80 > > [ 725.594369] #3: (mem_hotplug.lock#2){..}, at: [] > > mem_hotplug_begin+0x4f/0x80 > > [ 725.628554] #4: (mem_sysfs_mutex){..}, at: [] > > register_new_memory+0x33/0xd0 > > [ 725.658519] #5: (&dev->mutex){..}, at: [] > > device_attach+0x23/0xb0 > > > > Second participant, udev: > > > > [ 725.750889] systemd-udevd D 88003b94fc68 14016 888530 > > 0x0004 > > [ 725.773767] 88003b94fc68 8800034949c0 > > 000151c0 > > [ 725.798332] 8210d980 88003b94ffd8 000151c0 > > 880037a69270 > > [ 725.822841] 8800034949c0 00010001 8800034949c0 > > 81ff2b48 > > [ 725.849184] Call Trace: > > [ 725.858987] [] schedule_preempt_disabled+0x29/0x70 > > [ 725.879231] [] mutex_lock_nested+0x14b/0x470 > > [ 725.897860] [] ? mem_hotplug_begin+0x4f/0x80 > > [ 725.916698] [] mem_hotplug_begin+0x4f/0x80 > > [ 725.935064] [] ? mem_hotplug_begin+0x5/0x80 > > [ 725.953464] [] online_pages+0x3b/0x520 > > [ 725.971542] [] ? device_online+0x23/0xa0 > > [ 725.989207] [] memory_subsys_online+0x64/0xc0 > > [ 726.008513] [] device_online+0x6d/0xa0 > > [ 726.025579] [] store_mem_state+0x5b/0xe0 > > [ 726.043400] [] dev_attr_store+0x18/0x30 > > [ 726.060506] [] sysfs_kf_write+0x48/0x60 > > [ 726.077940] [] kernfs_fop_write+0x13b/0x1a0 > > [ 726.099416] [] vfs_write+0xb7/0x1f0 > > [ 726.115748] [] SyS_write+0x58/0xd0 > > [ 726.131933] [] system_call_fastpath+0x12/0x17 > > [ 726.150691] 7 locks held by systemd-udevd/888: > > [ 726.165044] #0: (sb_writers#3){..}, at: [] > > vfs_write+0x1b3/0x1f0 > > [ 726.192422] #1: (&of->mutex){..}, at: [] > > kernfs_fop_write+0x66/0x1a0 > > [ 726.220289] #2: (s_active#60){..}, at: [] > > kernfs_fop_write+0x6e/0x1a0 > > [ 726.249382] #3: (device_hotplug_lock){..}, at: > > [] lock_device_hotplug_sysfs+0x15/0x50 > > [ 726.281901] #4: (&dev->mutex){..}, at: [] > > device_online+0x23/0xa0 > > [ 726.308619] #5: (mem_hotplug.lock){..}, at: [] > > mem_hotplug_begin+0x5/0x80 > > [ 726.337994] #6: (mem_hotplug.lock#2){..}, at: [] > > mem_hotplug_begin+0x4f/0x80 > > > > In short: onlining grabs device lock and then tries to do > > mem_hotplug_begin() > > while add_memory() is between mem_hotplug_begin() and mem_hotplug_done() > > and it > > tries grabbing device lock. > > > > To my understanding ACPI memory hotplug doesn't have the same issue as > > device_hotplug_lock is being grabbed when the ACPI device is added. > > > > Solve the issue by grabbing device_hotplug_lock before doing add_memory(). > > If > > we do that, lock_device_hotplug_sysfs() will cause syscall retry which will > > eventually succeed. To support the
Re: Re: [perf/core PATCH v2 3/4] perf buildid-cache: Add new buildid cache if update target is not cached
(2015/02/11 23:57), Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 11, 2015 at 11:49:28AM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Tue, Feb 10, 2015 at 06:18:56PM +0900, Masami Hiramatsu escreveu: >>> Add new buildid cache if the update target file is not cached. >>> This can happen when an old binary is replaced by new one >>> after caching the old one. In this case, user sees his operation >>> just failed. But it does not look straight, since user just >>> pass the binary "path", not "build-id". >>> >>> >>> # ./perf buildid-cache --add ./perf >>> (update ./perf to new binary) >>> # ./perf buildid-cache --update ./perf >>> ./perf wasn't in the cache >> >> Humm, without re-reading the original motivation for the '--update' >> operation I would think it was about finding all build-ids in the cache >> that are for a binary with that path, remove them and insert this new >> one, no? >> >> Checking... > > commit eeb49845425375481f14c0e5721f88242642e88e > Author: Namhyung Kim > Date: Thu Feb 7 18:02:11 2013 +0900 > > perf buildid-cache: Add --update option > > When adding vmlinux file to build-id cache, it'd be fail since kallsyms > dso with a same build-id was already added by perf record. > > So one needs to remove the kallsyms first to add vmlinux into the cache. > Add --update option for doing it at once. > > -- > > So this was really a 'remove the file that is pointed by this build-id' and > replace with this new file, i.e. there is both a vmlinux _and_ a kallsyms file > for the same build-id. When wanting to use one or the other and existing a > link in the cache, one uses this --update thing. > > That is ok for cases where there are multiple symtabs in the cache for a given > build-id, but as you mention above, it is confusing for updating by > _pathname_. > > What a 'update' by pathname would mean? I guess it would be to remove 'old', > i.e. 'not up-to-date' stuff, i.e. older build-ids that that pathname had in > the > past, and leave just this new stuff. > > The way you did it make '--update path' be equivalent to '--add path'. Right, if there is no same buildid cache, it does that. Actually, this is a kind of middle point solution. As far as I can see, buildid-cache is (currently) used for annotating the old, or remote perf.data. In that case, we may have several different versions of buildid-cache(binaries) for one pathname. If --update destructively updates all caches related to given pathname, it also means to loose annotatability(?) on old or remote perf.data. I think that may not the user wants. So, if user really wants to clean up their cache, he/she can use --purge (--remove-all). And I think it would be better that --update just adds given current binary to cache if there is no cache. Thank you, > > - Arnaldo > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Research Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH net-next v2 0/3] Adjust the settings about USB_RX_EARLY_AGG
v2: For patch #1, replace u32 ocp_data; ocp_data = tp->coalesce / 8; with u32 ocp_data = tp->coalesce / 8; And replace struct net_device *dev = tp->netdev; u32 ocp_data; ocp_data = (agg_buf_sz - dev->mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4; with u32 mtu = tp->netdev->mtu; u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4; Use *switch* statement to replace the checking of *if*. v1: The USB_RX_EARLY_AGG contains timeout and size. Separate them, and they could be set independently. Then, the ethtool could be used to change the timeout according to situation of the platform. Hayes Wang (3): r8152: separate USB_RX_EARLY_AGG r8152: change rx early size when the mtu is changed r8152: support setting rx coalesce drivers/net/usb/r8152.c | 128 ++-- 1 file changed, 101 insertions(+), 27 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH net-next v2 2/3] r8152: change rx early size when the mtu is changed
The rx early size is calculated with the mtu, so it has to be re-calculated when the mtu is changed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b2e6566..46b99c6 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3722,6 +3722,7 @@ out: static int rtl8152_change_mtu(struct net_device *dev, int new_mtu) { struct r8152 *tp = netdev_priv(dev); + int ret; switch (tp->version) { case RTL_VER_01: @@ -3734,9 +3735,22 @@ static int rtl8152_change_mtu(struct net_device *dev, int new_mtu) if (new_mtu < 68 || new_mtu > RTL8153_MAX_MTU) return -EINVAL; + ret = usb_autopm_get_interface(tp->intf); + if (ret < 0) + return ret; + + mutex_lock(&tp->control); + dev->mtu = new_mtu; - return 0; + if (netif_running(dev) && netif_carrier_ok(dev)) + r8153_set_rx_early_size(tp); + + mutex_unlock(&tp->control); + + usb_autopm_put_interface(tp->intf); + + return ret; } static const struct net_device_ops rtl8152_netdev_ops = { -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH net-next v2 3/3] r8152: support setting rx coalesce
Support setting the rx coalesce. Then someone could change the rx agg timeout value through ethtool. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 57 + 1 file changed, 57 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 46b99c6..1f8921b 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3658,6 +3658,61 @@ out: return ret; } +static int rtl8152_get_coalesce(struct net_device *netdev, + struct ethtool_coalesce *coalesce) +{ + struct r8152 *tp = netdev_priv(netdev); + + switch (tp->version) { + case RTL_VER_01: + case RTL_VER_02: + return -EOPNOTSUPP; + default: + break; + } + + coalesce->rx_coalesce_usecs = tp->coalesce; + + return 0; +} + +static int rtl8152_set_coalesce(struct net_device *netdev, + struct ethtool_coalesce *coalesce) +{ + struct r8152 *tp = netdev_priv(netdev); + int ret; + + switch (tp->version) { + case RTL_VER_01: + case RTL_VER_02: + return -EOPNOTSUPP; + default: + break; + } + + if (coalesce->rx_coalesce_usecs > COALESCE_SLOW) + return -EINVAL; + + ret = usb_autopm_get_interface(tp->intf); + if (ret < 0) + return ret; + + mutex_lock(&tp->control); + + if (tp->coalesce != coalesce->rx_coalesce_usecs) { + tp->coalesce = coalesce->rx_coalesce_usecs; + + if (netif_running(tp->netdev) && netif_carrier_ok(netdev)) + r8153_set_rx_early_timeout(tp); + } + + mutex_unlock(&tp->control); + + usb_autopm_put_interface(tp->intf); + + return ret; +} + static struct ethtool_ops ops = { .get_drvinfo = rtl8152_get_drvinfo, .get_settings = rtl8152_get_settings, @@ -3671,6 +3726,8 @@ static struct ethtool_ops ops = { .get_strings = rtl8152_get_strings, .get_sset_count = rtl8152_get_sset_count, .get_ethtool_stats = rtl8152_get_ethtool_stats, + .get_coalesce = rtl8152_get_coalesce, + .set_coalesce = rtl8152_set_coalesce, .get_eee = rtl_ethtool_get_eee, .set_eee = rtl_ethtool_set_eee, }; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH net-next v2 1/3] r8152: separate USB_RX_EARLY_AGG
Separate USB_RX_EARLY_AGG into USB_RX_EARLY_TIMEOUT and USB_RX_EARLY_SIZE. Replace r8153_set_rx_agg() with r8153_set_rx_early_timeout() and r8153_set_rx_early_size(). Set the default timeout value according to the USB speed. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 58 +++-- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 5980ac6..b2e6566 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -97,7 +97,8 @@ #define USB_TX_AGG 0xd40a #define USB_RX_BUF_TH 0xd40c #define USB_USB_TIMER 0xd428 -#define USB_RX_EARLY_AGG 0xd42c +#define USB_RX_EARLY_TIMEOUT 0xd42c +#define USB_RX_EARLY_SIZE 0xd42e #define USB_PM_CTRL_STATUS 0xd432 #define USB_TX_DMA 0xd434 #define USB_TOLERANCE 0xd490 @@ -325,10 +326,10 @@ /* USB_MISC_0 */ #define PCUT_STATUS0x0001 -/* USB_RX_EARLY_AGG */ -#define EARLY_AGG_SUPPER 0x0e832981 -#define EARLY_AGG_HIGH 0x0e837a12 -#define EARLY_AGG_SLOW 0x0e83 +/* USB_RX_EARLY_TIMEOUT */ +#define COALESCE_SUPER 85000U +#define COALESCE_HIGH 25U +#define COALESCE_SLOW 524280U /* USB_WDT11_CTRL */ #define TIMER11_EN 0x0001 @@ -578,6 +579,7 @@ struct r8152 { u32 saved_wolopts; u32 msg_enable; u32 tx_qlen; + u32 coalesce; u16 ocp_base; u8 *intr_buff; u8 version; @@ -2114,28 +2116,19 @@ static int rtl8152_enable(struct r8152 *tp) return rtl_enable(tp); } -static void r8153_set_rx_agg(struct r8152 *tp) +static void r8153_set_rx_early_timeout(struct r8152 *tp) { - u8 speed; + u32 ocp_data = tp->coalesce / 8; - speed = rtl8152_get_speed(tp); - if (speed & _1000bps) { - if (tp->udev->speed == USB_SPEED_SUPER) { - ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_BUF_TH, - RX_THR_SUPPER); - ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_EARLY_AGG, - EARLY_AGG_SUPPER); - } else { - ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_BUF_TH, - RX_THR_HIGH); - ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_EARLY_AGG, - EARLY_AGG_HIGH); - } - } else { - ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_BUF_TH, RX_THR_SLOW); - ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_EARLY_AGG, - EARLY_AGG_SLOW); - } + ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_TIMEOUT, ocp_data); +} + +static void r8153_set_rx_early_size(struct r8152 *tp) +{ + u32 mtu = tp->netdev->mtu; + u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4; + + ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data); } static int rtl8153_enable(struct r8152 *tp) @@ -2145,7 +2138,8 @@ static int rtl8153_enable(struct r8152 *tp) set_tx_qlen(tp); rtl_set_eee_plus(tp); - r8153_set_rx_agg(tp); + r8153_set_rx_early_timeout(tp); + r8153_set_rx_early_size(tp); return rtl_enable(tp); } @@ -3911,6 +3905,18 @@ static int rtl8152_probe(struct usb_interface *intf, tp->mii.reg_num_mask = 0x1f; tp->mii.phy_id = R8152_PHY_ID; + switch (udev->speed) { + case USB_SPEED_SUPER: + tp->coalesce = COALESCE_SUPER; + break; + case USB_SPEED_HIGH: + tp->coalesce = COALESCE_HIGH; + break; + default: + tp->coalesce = COALESCE_SLOW; + break; + } + intf->needs_remote_wakeup = 1; tp->rtl_ops.init(tp); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RESEND] dmaengine: qcom_bam_dma: Fix error path in probe function
Calls tasklet_kill() in error path of the probe function were missing. Add the same in error path. Signed-off-by: Pramod Gurav --- Resending it with linux-arm-msm in cc. drivers/dma/qcom_bam_dma.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c index 3122a99..a1ff4a6 100644 --- a/drivers/dma/qcom_bam_dma.c +++ b/drivers/dma/qcom_bam_dma.c @@ -1115,7 +1115,7 @@ static int bam_dma_probe(struct platform_device *pdev) if (!bdev->channels) { ret = -ENOMEM; - goto err_disable_clk; + goto err_tasklet_kill; } /* allocate and initialize channels */ @@ -1127,7 +1127,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = devm_request_irq(bdev->dev, bdev->irq, bam_dma_irq, IRQF_TRIGGER_HIGH, "bam_dma", bdev); if (ret) - goto err_disable_clk; + goto err_bam_channel_exit; /* set max dma segment size */ bdev->common.dev = bdev->dev; @@ -1135,7 +1135,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = dma_set_max_seg_size(bdev->common.dev, BAM_MAX_DATA_SIZE); if (ret) { dev_err(bdev->dev, "cannot set maximum segment size\n"); - goto err_disable_clk; + goto err_bam_channel_exit; } platform_set_drvdata(pdev, bdev); @@ -1156,7 +1156,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = dma_async_device_register(&bdev->common); if (ret) { dev_err(bdev->dev, "failed to register dma async device\n"); - goto err_disable_clk; + goto err_bam_channel_exit; } ret = of_dma_controller_register(pdev->dev.of_node, bam_dma_xlate, @@ -1168,8 +1168,14 @@ static int bam_dma_probe(struct platform_device *pdev) err_unregister_dma: dma_async_device_unregister(&bdev->common); +err_bam_channel_exit: + for (i = 0; i < bdev->num_channels; i++) + tasklet_kill(&bdev->channels[i].vc.task); +err_tasklet_kill: + tasklet_kill(&bdev->task); err_disable_clk: clk_disable_unprepare(bdev->bamclk); + return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v4 02/11] ARM: tegra: Move out nyan-generic parts out from the nyan-big DT
On 02/11/2015 06:26 PM, Andrew Bresticker wrote: > Hi Tomeu, > > On Wed, Feb 11, 2015 at 7:06 AM, Tomeu Vizoso > wrote: >> In preparation for adding the DT for the nyan-blaze board. >> >> Signed-off-by: Tomeu Vizoso > > Maybe it's worth pulling the common pinmux bits into nyan.dtsi as well? I decided to have them in the leaf DTSs so the whole output from tegra-pinmux-scripts can be stuck in there without any extra processing. I think this way we can be more certain that the pinmux in the kernel isn't diverging from what it should be. > Otherwise, > Acked-by: Andrew Bresticker Thanks, Tomeu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3] pinctrl: exynos: Add support for Exynos5433
Hi Linus, On 02/08/2015 11:59 PM, Tomasz Figa wrote: > Hi, > > 2015-01-29 18:48 GMT+09:00 Linus Walleij : >> On Wed, Jan 21, 2015 at 7:43 AM, Chanwoo Choi wrote: >> >>> This patch adds driver data for Exynos5433 SoC. Exynos5433 includes 228 >>> multi- >>> functional input/output port pins and 135 memory port pins. There are 41 >>> general >>> port groups and 2 memory port groups. >>> >>> Cc: Tomasz Figa >>> Cc: Thomas Abraham >>> Cc: Linus Walleij >>> Signed-off-by: Chanwoo Choi >>> Acked-by: Inki Dae >>> --- >>> Changes from v2: >>> - Rebase it on v3.19-rc5 >> >> Waiting for Tomasz to review this. > > Thanks Linus. Looks good to me. > > Acked-by: Tomasz Figa Could you please pick this patch? Best Regards, Chanwoo Choi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RESEND] dmaengine: qcom_bam_dma: Fix error path in probe function
Calls tasklet_kill() in error path of the probe function were missing. Add the same in error path. Signed-off-by: Pramod Gurav --- Resending it with linux-arm-msm in cc. drivers/dma/qcom_bam_dma.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c index 3122a99..a1ff4a6 100644 --- a/drivers/dma/qcom_bam_dma.c +++ b/drivers/dma/qcom_bam_dma.c @@ -1115,7 +1115,7 @@ static int bam_dma_probe(struct platform_device *pdev) if (!bdev->channels) { ret = -ENOMEM; - goto err_disable_clk; + goto err_tasklet_kill; } /* allocate and initialize channels */ @@ -1127,7 +1127,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = devm_request_irq(bdev->dev, bdev->irq, bam_dma_irq, IRQF_TRIGGER_HIGH, "bam_dma", bdev); if (ret) - goto err_disable_clk; + goto err_bam_channel_exit; /* set max dma segment size */ bdev->common.dev = bdev->dev; @@ -1135,7 +1135,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = dma_set_max_seg_size(bdev->common.dev, BAM_MAX_DATA_SIZE); if (ret) { dev_err(bdev->dev, "cannot set maximum segment size\n"); - goto err_disable_clk; + goto err_bam_channel_exit; } platform_set_drvdata(pdev, bdev); @@ -1156,7 +1156,7 @@ static int bam_dma_probe(struct platform_device *pdev) ret = dma_async_device_register(&bdev->common); if (ret) { dev_err(bdev->dev, "failed to register dma async device\n"); - goto err_disable_clk; + goto err_bam_channel_exit; } ret = of_dma_controller_register(pdev->dev.of_node, bam_dma_xlate, @@ -1168,8 +1168,14 @@ static int bam_dma_probe(struct platform_device *pdev) err_unregister_dma: dma_async_device_unregister(&bdev->common); +err_bam_channel_exit: + for (i = 0; i < bdev->num_channels; i++) + tasklet_kill(&bdev->channels[i].vc.task); +err_tasklet_kill: + tasklet_kill(&bdev->task); err_disable_clk: clk_disable_unprepare(bdev->bamclk); + return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 11/20] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver
This patch adds Synopsys DesignWare MIPI DSI host controller driver support. Currently, the driver supports the burst with sync pulses mode only. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository and adapt to bridge API change as the dw-hdmi driver did. * To address Philipp's comment, add a new required clock pclk and clean up clock-names. * Add driver copyright for 2015. v7->v8: * Fix the driver's Kconfig so that we may pass the allmodconfig for ARM. v6->v7: * None. v5->v6: * Make the checkpatch.pl script be happier. v4->v5: * Remove 'dsi->panel = NULL;' in dw_mipi_dsi_host_detach() to address Andrzej Hajda's comment. v3->v4: * Move the relevant dt-bindings to a separate patch to address Stefan Wahren's comment. v2->v3: * Newly introduced in v3 to address Andy Yan's comment. This is based on the i.MX MIPI DSI driver in v2. To make the Synopsys DesignWare MIPI DSI host controller driver less platform-dependant, this patch places it at the drm/bridge directory as a DRM bridge driver. drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile |1 + drivers/gpu/drm/bridge/dw_mipi_dsi.c | 1006 ++ include/drm/bridge/dw_mipi_dsi.h | 27 + 4 files changed, 1044 insertions(+) create mode 100644 drivers/gpu/drm/bridge/dw_mipi_dsi.c create mode 100644 include/drm/bridge/dw_mipi_dsi.h diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index f38bbcd..de151f2 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -3,6 +3,16 @@ config DRM_DW_HDMI depends on DRM select DRM_KMS_HELPER +config DRM_DW_MIPI_DSI + tristate "Synopsys DesignWare MIPI DSI host controller bridge" + depends on DRM + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL + help + Choose this if you want to use the Synopsys DesignWare MIPI DSI host + controller bridge. + config DRM_PTN3460 tristate "PTN3460 DP/LVDS bridge" depends on DRM diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index d8a8cfd..5f8e9b3 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -2,3 +2,4 @@ ccflags-y := -Iinclude/drm obj-$(CONFIG_DRM_PTN3460) += ptn3460.o obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.o +obj-$(CONFIG_DRM_DW_MIPI_DSI) += dw_mipi_dsi.o diff --git a/drivers/gpu/drm/bridge/dw_mipi_dsi.c b/drivers/gpu/drm/bridge/dw_mipi_dsi.c new file mode 100644 index 000..0ff241e --- /dev/null +++ b/drivers/gpu/drm/bridge/dw_mipi_dsi.c @@ -0,0 +1,1006 @@ +/* + * Synopsys DesignWare(DW) MIPI DSI Host Controller + * + * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. + * + * 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 option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DSI_VERSION0x00 + +#define DSI_PWR_UP 0x04 +#define RESET 0 +#define POWERUPBIT(0) + +#define DSI_CLKMGR_CFG 0x08 +#define TO_CLK_DIVIDSION(div) (((div) & 0xff) << 8) +#define TX_ESC_CLK_DIVIDSION(div) (((div) & 0xff) << 0) + +#define DSI_DPI_CFG0x0c +#define EN18_LOOSELY BIT(10) +#define COLORM_ACTIVE_LOW BIT(9) +#define SHUTD_ACTIVE_LOW BIT(8) +#define HSYNC_ACTIVE_LOW BIT(7) +#define VSYNC_ACTIVE_LOW BIT(6) +#define DATAEN_ACTIVE_LOW BIT(5) +#define DPI_COLOR_CODING_16BIT_1 (0x0 << 2) +#define DPI_COLOR_CODING_16BIT_2 (0x1 << 2) +#define DPI_COLOR_CODING_16BIT_3 (0x2 << 2) +#define DPI_COLOR_CODING_18BIT_1 (0x3 << 2) +#define DPI_COLOR_CODING_18BIT_2 (0x4 << 2) +#define DPI_COLOR_CODING_24BIT (0x5 << 2) +#define DPI_VID(vid) (((vid) & 0x3) << 0) + +#define DSI_DBI_CFG0x10 +#define DSI_DBIS_CMDSIZE 0x14 + +#define DSI_PCKHDL_CFG 0x18 +#define GEN_VID_RX(vid)(((vid) & 0x3) << 5) +#define EN_CRC_RX BIT(4) +#define EN_ECC_RX BIT(3) +#define EN_BTA BIT(2) +#define EN_EOTN_RX BIT(1) +#define EN_EOTP_TX BIT(0) + +#define DSI_VID_MODE_CFG 0x1c +#
[PATCH RFC v9 07/20] ARM: imx6q: clk: Add support for mipi_ipg clock as a shared clock gate
The CG8 field of the CCM CCGR3 register is the 'mipi_core_cfg' gate clock, according to the i.MX6q/sdl reference manuals. This clock is actually the gate for several clocks, including the ipg clock's output. The MIPI DSI host controller embedded in the i.MX6q/sdl SoCs takes the ipg clock as the pclk - the APB clock signal . In order to gate/ungate the ipg clock, this patch adds a new shared clock gate named as "mipi_ipg". Signed-off-by: Liu Ying --- v8->v9: * Newly introduced in v9. arch/arm/mach-imx/clk-imx6q.c | 1 + include/dt-bindings/clock/imx6qdl-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index cbdbe2a..909828d 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -419,6 +419,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[IMX6QDL_CLK_IPU2_DI1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2_shared("hsi_tx", "hsi_tx_podf", base + 0x74, 16, &share_count_mipi_core_cfg); clk[IMX6QDL_CLK_MIPI_CORE_CFG] = imx_clk_gate2_shared("mipi_core_cfg", "video_27m", base + 0x74, 16, &share_count_mipi_core_cfg); + clk[IMX6QDL_CLK_MIPI_IPG] = imx_clk_gate2_shared("mipi_ipg", "ipg", base + 0x74, 16, &share_count_mipi_core_cfg); if (cpu_is_imx6dl()) /* * The multiplexer and divider of the imx6q clock gpu2d get diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index dbc828c..8780868 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h @@ -250,6 +250,7 @@ #define IMX6QDL_CLK_GPT_3M 237 #define IMX6QDL_CLK_VIDEO_27M 238 #define IMX6QDL_CLK_MIPI_CORE_CFG 239 -#define IMX6QDL_CLK_END240 +#define IMX6QDL_CLK_MIPI_IPG 240 +#define IMX6QDL_CLK_END241 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 17/20] ARM: dts: imx6qdl-sabresd: Add support for TRULY TFT480800-16-E MIPI DSI panel
The TRULY TFT480800-16-E panel is driven by the Himax HX8369A driver IC. The driver IC supports several display/control interface modes, including the MIPI DSI video mode and command mode. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * Replace the bs[3:0]-gpios properties with the bs-gpios property. This addresses Andrzej Hajda's comment. v3->v4: * None. v2->v3: * None. v1->v2: * To address Thierry Reding's comments, remove several unnecessary properties as they can be implied by the compatible string. * Fix the compatible string. * Remove the display-timings node from the panel node as it can be implied by the compatible string as well. * Remove the status property as it is unneeded. arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index f1cd214..9ff4ba5 100644 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi @@ -480,6 +480,13 @@ MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059 >; }; + + pinctrl_mipi_panel: mipipanelgrp { + fsl,pins = < + MX6QDL_PAD_NANDF_CS0__GPIO6_IO11 0x1b0b0 + MX6QDL_PAD_NANDF_CS1__GPIO6_IO14 0x1b0b0 + >; + }; }; gpio_leds { @@ -516,6 +523,19 @@ }; }; +&mipi_dsi { + status = "okay"; + + panel { + compatible = "truly,tft480800-16-e-dsi"; + reg = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mipi_panel>; + reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; + bs-gpios = <0>, <0>, <&gpio6 14 GPIO_ACTIVE_HIGH>, <0>; + }; +}; + &pcie { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pcie>; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 15/20] drm: panel: Add support for Himax HX8369A MIPI DSI panel
This patch adds support for Himax HX8369A MIPI DSI panel. Reviewed-by: Andrzej Hajda Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * Add driver copyright for 2015. v7->v8: * Remove several unnecessary headers included in the driver. v6->v7: * Address Andrzej Hajda's following comments. * Simplify the return logic in hx8369a_dcs_write(). * Replace the macro hx8369a_dsi_init_helper() with a function array to improve the code quality. * Handle error cases during getting gpios in probe(). * Add 'Reviewed-by: Andrzej Hajda '. v5->v6: * Make the checkpatch.pl script be happier. * Do not set the dsi channel number to be zero in probe(), because the MIPI DSI bus driver would set it. v4->v5: * Address Andrzej Hajda's comments. * Get the bs-gpios property instead of the bs[3:0]-gpios properties. * Implement error propagation for panel register configurations. * Other minor changes to improve the code quality. v3->v4: * Move the relevant dt-bindings to a separate patch to address Stefan Wahren's comment. v2->v3: * Sort the included header files alphabetically. v1->v2: * Address almost all comments from Thierry Reding. * Remove several DT properties as they can be implied by the compatible string. * Add the HIMAX/himax prefixes to the driver's Kconfig name and driver name. * Move the driver's Makefile entry place to sort the entries alphabetically. * Reuse several standard DCS functions instead of inventing wheels. * Move the panel resetting and power logics to the driver probe/remove stages. This may simplify panel prepare/unprepare hooks. The power consumption should not change a lot at DPMS since the panel enters sleep mode at that time. * Add the module author. * Other minor changes, such as coding style issues. drivers/gpu/drm/panel/Kconfig | 5 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-himax-hx8369a.c | 610 3 files changed, 616 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-himax-hx8369a.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d845837..cd6fbb7 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -17,6 +17,11 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_HIMAX_HX8369A + tristate "Himax HX8369A panel" + depends on OF + select DRM_MIPI_DSI + config DRM_PANEL_LD9040 tristate "LD9040 RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 4b2a043..d5dbe06 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_HIMAX_HX8369A) += panel-himax-hx8369a.o obj-$(CONFIG_DRM_PANEL_LD9040) += panel-ld9040.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o diff --git a/drivers/gpu/drm/panel/panel-himax-hx8369a.c b/drivers/gpu/drm/panel/panel-himax-hx8369a.c new file mode 100644 index 000..649e395 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-himax-hx8369a.c @@ -0,0 +1,610 @@ +/* + * Himax HX8369A panel driver. + * + * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This driver is based on Samsung s6e8aa0 panel driver. + */ + +#include +#include +#include + +#include +#include +#include + +#define WRDISBV0x51 +#define WRCTRLD0x53 +#define WRCABC 0x55 +#define SETPOWER 0xb1 +#define SETDISP0xb2 +#define SETCYC 0xb4 +#define SETVCOM0xb6 +#define SETEXTC0xb9 +#define SETMIPI0xba +#define SETPANEL 0xcc +#define SETGIP 0xd5 +#define SETGAMMA 0xe0 + +#define HX8369A_MIN_BRIGHTNESS 0x00 +#define HX8369A_MAX_BRIGHTNESS 0xff + +enum hx8369a_mpu_interface { + HX8369A_DBI_TYPE_A_8BIT, + HX8369A_DBI_TYPE_A_9BIT, + HX8369A_DBI_TYPE_A_16BIT, + HX8369A_DBI_TYPE_A_18BIT, + HX8369A_DBI_TYPE_B_8BIT, + HX8369A_DBI_TYPE_B_9BIT, + HX8369A_DBI_TYPE_B_16BIT, + HX8369A_DBI_TYPE_B_18BIT, + HX8369A_DSI_CMD_MODE, + HX8369A_DBI_TYPE_B_24BIT, + HX8369A_DSI_VIDEO_MODE, + HX8369A_MDDI, + HX8369A_DPI_DBI_TYPE_C_OPT1, + HX8369A_DPI_DBI_TYPE_C_OPT2, + HX8369A_DPI_DBI_TYPE_C_OPT3 +}; + +enum hx8369a_resolution { + HX8369A_RES_480_864, + HX8369A_RES_480_854, + HX8369A_RES_480_800, + HX8369A_RES_480_640, + HX8369A_RES_36
Re: [perf/core PATCH v2 4/4] perf buildid-cache: Add --remove-all FILE to remove all caches of FILE
(2015/02/12 0:00), Arnaldo Carvalho de Melo wrote: > Em Tue, Feb 10, 2015 at 06:18:58PM +0900, Masami Hiramatsu escreveu: >> Add --remove-all FILE to remove all caches of FILE. > > I like --purge better, shorter form, like in 'man fpurge' Thanks for good suggestion :) I'll update this. Thank you, > > - Arnaldo > >> Since the current --remove FILE removes a cache which has >> same build-id of given FILE. Since the command takes a >> FILE path, it can confuse user who tries to remove cache >> about FILE path. >> >> - >> # ./perf buildid-cache -v --add ./perf >> Adding 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok >> # (update the ./perf binary) >> # ./perf buildid-cache -v --remove ./perf >> Removing 305bbd1be68f66eca7e2d78db294653031edfa79 ./perf: FAIL >> ./perf wasn't in the cache >> - >> Actually, the --remove's FAIL is not shown, it just silently fails. >> >> So, this patch adds --remove-all FILE action for such usecase. >> perf buildid-cache --remove-all FILE removes all caches which >> has same FILE path. >> In other words, it removes all caches including old binaries. >> >> - >> # ./perf buildid-cache -v --add ./perf >> Adding 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok >> # (update the ./perf binary) >> # ./perf buildid-cache -v --remove-all ./perf >> Removing 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok >> - >> >> Signed-off-by: Masami Hiramatsu >> --- >> tools/perf/Documentation/perf-buildid-cache.txt |6 +- >> tools/perf/builtin-buildid-cache.c | 44 >> tools/perf/util/build-id.c | 83 >> +++ >> tools/perf/util/build-id.h |1 >> 4 files changed, 117 insertions(+), 17 deletions(-) >> >> diff --git a/tools/perf/Documentation/perf-buildid-cache.txt >> b/tools/perf/Documentation/perf-buildid-cache.txt >> index 6575dce..01f295e 100644 >> --- a/tools/perf/Documentation/perf-buildid-cache.txt >> +++ b/tools/perf/Documentation/perf-buildid-cache.txt >> @@ -36,7 +36,11 @@ OPTIONS >> actually made. >> -r:: >> --remove=:: >> -Remove specified file from the cache. >> +Remove a cached binary which has same build-id of specified file >> +from the cache. >> +-R:: >> +--remove-all=:: >> +Remove all cached binary which has specified path from the cache. >> -M:: >> --missing=:: >> List missing build ids in the cache for the specified file. >> diff --git a/tools/perf/builtin-buildid-cache.c >> b/tools/perf/builtin-buildid-cache.c >> index e7568f5..3a76d51 100644 >> --- a/tools/perf/builtin-buildid-cache.c >> +++ b/tools/perf/builtin-buildid-cache.c >> @@ -223,6 +223,29 @@ static int build_id_cache__remove_file(const char >> *filename) >> return err; >> } >> >> +static int build_id_cache__remove_path(const char *pathname) >> +{ >> +struct strlist *list; >> +struct str_node *pos; >> +int err; >> + >> +list = build_id_cache__list_build_ids(pathname); >> +if (!list) >> +return 0; >> + >> +strlist__for_each(pos, list) { >> +err = build_id_cache__remove_s(pos->s); >> +if (verbose) >> +pr_info("Removing %s %s: %s\n", pos->s, pathname, >> +err ? "FAIL" : "Ok"); >> +if (err) >> +break; >> +} >> +strlist__delete(list); >> + >> +return err; >> +} >> + >> static bool dso__missing_buildid_cache(struct dso *dso, int parm >> __maybe_unused) >> { >> char filename[PATH_MAX]; >> @@ -285,6 +308,7 @@ int cmd_buildid_cache(int argc, const char **argv, >> bool force = false; >> char const *add_name_list_str = NULL, >> *remove_name_list_str = NULL, >> + *remove_all_name_list_str = NULL, >> *missing_filename = NULL, >> *update_name_list_str = NULL, >> *kcore_filename = NULL; >> @@ -302,6 +326,8 @@ int cmd_buildid_cache(int argc, const char **argv, >> "file", "kcore file to add"), >> OPT_STRING('r', "remove", &remove_name_list_str, "file list", >> "file(s) to remove"), >> +OPT_STRING('R', "remove-all", &remove_all_name_list_str, "path list", >> +"path(s) to remove (remove old caches too)"), >> OPT_STRING('M', "missing", &missing_filename, "file", >> "to find missing build ids in the cache"), >> OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), >> @@ -368,6 +394,24 @@ int cmd_buildid_cache(int argc, const char **argv, >> } >> } >> >> +if (remove_all_name_list_str) { >> +list = strlist__new(true, remove_all_name_list_str); >> +if (list) { >> +strlist__for_each(pos, list) >> +if (build_id_cache__remove_path(pos->s)) { >> +if (errno == ENOENT)
[PATCH RFC v9 14/20] Documentation: dt-bindings: Add bindings for Himax HX8369A DRM panel driver
This patch adds device tree bindings for Himax HX8369A DRM panel driver. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * Merge the bs[3:0]-gpios properties into one property - bs-gpios. This addresses Andrzej Hajda's comment. v3->v4: * Newly introduced in v4. This is separated from the relevant driver patch in v3 to address Stefan Wahren's comment. .../devicetree/bindings/panel/himax,hx8369a.txt| 39 ++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/himax,hx8369a.txt diff --git a/Documentation/devicetree/bindings/panel/himax,hx8369a.txt b/Documentation/devicetree/bindings/panel/himax,hx8369a.txt new file mode 100644 index 000..3a44b70 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/himax,hx8369a.txt @@ -0,0 +1,39 @@ +Himax HX8369A WVGA 16.7M color TFT single chip driver with internal GRAM + +Himax HX8369A is a WVGA resolution driving controller. +It is designed to provide a single chip solution that combines a source +driver and power supply circuits to drive a TFT dot matrix LCD with +480RGBx864 dots at the maximum. + +The HX8369A supports several interface modes, including MPU MIPI DBI Type +A/B mode, MIPI DPI/DBI Type C mode, MIPI DSI video mode, MIPI DSI command +mode and MDDI mode. The interface mode is selected by the external hardware +pins BS[3:0]. + +Currently, only the MIPI DSI video mode is supported. + +Required properties: + - compatible: should be a panel's compatible string + - reg: the virtual channel number of a DSI peripheral, as described in [1] + - reset-gpios: a GPIO spec for the reset pin, as described in [2] + +Optional properties: + - vdd1-supply: I/O and interface power supply + - vdd2-supply: analog power supply + - vdd3-supply: logic power supply + - dsi-vcc-supply: DSI and MDDI power supply + - vpp-supply: OTP programming voltage + - bs-gpios: a GPIO spec for the pins BS[3:0], as described in [2] + +[1] Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt +[2] Documentation/devicetree/bindings/gpio/gpio.txt + +Example: + panel { + compatible = "truly,tft480800-16-e-dsi"; + reg = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mipi_panel>; + reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; + bs-gpios = <0>, <0>, <&gpio6 14 GPIO_ACTIVE_HIGH>, <0>; + }; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 02/20] ARM: imx6q: Add GPR3 MIPI muxing control register field shift bits definition
This patch adds a macro to define the GPR3 MIPI muxing control register field shift bits. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * None. include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index c877cad..d16f4c8 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h @@ -207,6 +207,7 @@ #define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU1_DI1 (0x1 << 6) #define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU2_DI0 (0x2 << 6) #define IMX6Q_GPR3_LVDS0_MUX_CTL_IPU2_DI1 (0x3 << 6) +#define IMX6Q_GPR3_MIPI_MUX_CTL_SHIFT 4 #define IMX6Q_GPR3_MIPI_MUX_CTL_MASK (0x3 << 4) #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI0 (0x0 << 4) #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 13/20] drm: imx: Support Synopsys DesignWare MIPI DSI host controller
This patch adds support for Synopsys DesignWare MIPI DSI host controller which is embedded in the i.MX6q/sdl SoCs. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * Add driver copyright for 2015. v7->v8: * None. v6->v7: * None. v5->v6: * Make the checkpatch.pl script be happier. v4->v5: * None. v3->v4: * Move the relevant dt-bindings to a separate patch to address Stefan Wahren's comment. v2->v3: * To address Andy Yan's comments, move the common Synopsys DesignWare MIPI DSI host controller logic into it's drm/bridge driver and leave the i.MX specific logic only. v1->v2: * Address almost all comments from Thierry Reding and Russell. * Update the DT documentation to remove the display-timings node in the panel node. * Update the DT documentation to state that the nodes which represent the possible DRM CRTCs the controller may connect with should be placed in the node "ports". * Remove the flag 'enabled' from the struct imx_mipi_dsi. * Move the format_to_bpp() function in v1 to the common DRM MIPI DSI driver. * Improve the way we wait for check status for DPHY and command packet transfer. * Improve the DPMS support for the encoder. * Split the functions of ->host_attach() and ->mode_valid() clearly as suggested by Thierry Reding. * Improve the logics in imx_mipi_dsi_dcs_long_write(). * Enable/disable the pllref_clk and pllref_gate_clk at the component binding/unbinding stages to help remove the flag 'enabled'. * Update the module license to be "GPL". * Other minor changes, such as coding style issues and macro naming issues. drivers/gpu/drm/imx/Kconfig | 7 ++ drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/dw_mipi_dsi-imx.c | 230 ++ 3 files changed, 238 insertions(+) create mode 100644 drivers/gpu/drm/imx/dw_mipi_dsi-imx.c diff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig index 33cdddf..7faeb49 100644 --- a/drivers/gpu/drm/imx/Kconfig +++ b/drivers/gpu/drm/imx/Kconfig @@ -53,3 +53,10 @@ config DRM_IMX_HDMI depends on DRM_IMX help Choose this if you want to use HDMI on i.MX6. + +config DRM_IMX_MIPI_DSI + tristate "Freescale i.MX DRM MIPI DSI" + select DRM_DW_MIPI_DSI + depends on DRM_IMX + help + Choose this if you want to use MIPI DSI on i.MX6. diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile index f3ecd89..93919b4 100644 --- a/drivers/gpu/drm/imx/Makefile +++ b/drivers/gpu/drm/imx/Makefile @@ -10,3 +10,4 @@ obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o obj-$(CONFIG_DRM_IMX_IPUV3)+= imx-ipuv3-crtc.o obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o +obj-$(CONFIG_DRM_IMX_MIPI_DSI) += dw_mipi_dsi-imx.o diff --git a/drivers/gpu/drm/imx/dw_mipi_dsi-imx.c b/drivers/gpu/drm/imx/dw_mipi_dsi-imx.c new file mode 100644 index 000..5e6f62d --- /dev/null +++ b/drivers/gpu/drm/imx/dw_mipi_dsi-imx.c @@ -0,0 +1,230 @@ +/* + * i.MX drm driver - MIPI DSI Host Controller + * + * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. + * + * 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 option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "imx-drm.h" + +#define DRIVER_NAME"imx-mipi-dsi" + +struct imx_mipi_dsi { + struct drm_encoder encoder; + struct device *dev; + struct regmap *regmap; +}; + +static inline struct imx_mipi_dsi *enc_to_dsi(struct drm_encoder *enc) +{ + return container_of(enc, struct imx_mipi_dsi, encoder); +} + +static void imx_mipi_dsi_set_ipu_di_mux(struct imx_mipi_dsi *dsi, int ipu_di) +{ + regmap_update_bits(dsi->regmap, IOMUXC_GPR3, + IMX6Q_GPR3_MIPI_MUX_CTL_MASK, + ipu_di << IMX6Q_GPR3_MIPI_MUX_CTL_SHIFT); +} + +static struct drm_encoder_funcs imx_mipi_dsi_encoder_funcs = { + .destroy = imx_drm_encoder_destroy, +}; + +static bool imx_mipi_dsi_encoder_mode_fixup(struct drm_encoder *encoder, + const struct drm_display_mode *mode, + struct drm_display_mode *adjusted_mode) +{ + return true; +} + +static void imx_mipi_dsi_encoder_prepare(struct drm_encoder *encoder) +{ + u32 encoder_pix_fmt, interface_pix_fmt; + + encoder_pix_fmt = dw_mipi_dsi_get_encoder_pixel_format(en
[PATCH RFC v9 03/20] ARM: imx6q: clk: Add the video_27m clock
This patch supports the video_27m clock which is a fixed factor clock of the pll3_pfd1_540m clock. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * None. arch/arm/mach-imx/clk-imx6q.c | 1 + include/dt-bindings/clock/imx6qdl-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 2daef61..2b7beb8 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -246,6 +246,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[IMX6QDL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); clk[IMX6QDL_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2); clk[IMX6QDL_CLK_GPT_3M]= imx_clk_fixed_factor("gpt_3m","osc", 1, 8); + clk[IMX6QDL_CLK_VIDEO_27M] = imx_clk_fixed_factor("video_27m", "pll3_pfd1_540m", 1, 20); if (cpu_is_imx6dl()) { clk[IMX6QDL_CLK_GPU2D_AXI] = imx_clk_fixed_factor("gpu2d_axi", "mmdc_ch0_axi_podf", 1, 1); clk[IMX6QDL_CLK_GPU3D_AXI] = imx_clk_fixed_factor("gpu3d_axi", "mmdc_ch0_axi_podf", 1, 1); diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index b690cdb..25625bf 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h @@ -248,6 +248,7 @@ #define IMX6QDL_PLL6_BYPASS235 #define IMX6QDL_PLL7_BYPASS236 #define IMX6QDL_CLK_GPT_3M 237 -#define IMX6QDL_CLK_END238 +#define IMX6QDL_CLK_VIDEO_27M 238 +#define IMX6QDL_CLK_END239 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 00/20] Add support for i.MX MIPI DSI DRM driver
Hi, This version mainly addresses the comments from Philipp Zabel on v8. The comments include a. A common compatible string "snps,dw-mipi-dsi" should be appended to all SoCs' MIPI DSI device tree documentations and nodes. b. Clean up the common clocks needed by the Synopsys DesignWare MIPI DSI host controller. This version also drops two documentation patches in v8 for adding Himax and Truly vendor prefixes since Rob Herring has taken them. The i.MX MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM bridge driver and a i.MX MIPI DSI specific DRM driver. Currently, the MIPI DSI drivers only support the burst with sync pulse mode. This series also includes a DRM panel driver for the Truly TFT480800-16-E panel which is driven by the Himax HX8369A driver IC. The driver IC data sheet could be found at [1]. As mentioned by the data sheet, the driver IC supports several interface modes. Currently, the DRM panel driver only supports the MIPI DSI video mode. New interface modes could be added later(perhaps, just like the way the DRM simple panel driver supports both MIPI DSI interface panels and simple(parallel) interface panels). The MIPI DSI feature is tested on i.MX6Q SabreSD board and i.MX6DL SabreSD board. The MIPI DSI display could be enabled directly on i.MX6Q SabreSD board after applying this series, because the 26.4MHz pixel clock the panel requires could be derived from the IPU HSP clock(264MHz) with an integer divider. On i.MX6DL SabreSD board, we need to manually disable the LVDS and HDMI displays in the device tree blob, since the i.MX6DL IPU HSP clock is 198MHz at present, which makes the pixel clock share the PLL5 video clock source with the LVDS and HDMI, thus, the panel cannot get the pixel clock rate it wants. Patch 01/20 is needed to get a precise pixel clock rate(26.4MHz) from the PLL5 video clock. If we don't have this patch, the pixel clock rate is about 20MHz, which causes a horitonal shift on the display image. This series can be applied on the imx-drm/next branch of Philipp Zabel's open git repository. [1] http://www.allshore.com/pdf/Himax_HX8369-A.pdf Liu Ying (20): clk: divider: Correct parent clk round rate if no bestdiv is normally found ARM: imx6q: Add GPR3 MIPI muxing control register field shift bits definition ARM: imx6q: clk: Add the video_27m clock ARM: imx6q: clk: Change hdmi_isfr clock's parent to be video_27m clock ARM: imx6q: clk: Change hsi_tx clock to be a shared clock gate ARM: imx6q: clk: Add support for mipi_core_cfg clock as a shared clock gate ARM: imx6q: clk: Add support for mipi_ipg clock as a shared clock gate ARM: dts: imx6qdl: Move existing MIPI DSI ports into a new 'ports' node drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format Documentation: dt-bindings: Add bindings for Synopsys DW MIPI DSI DRM bridge driver drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver Documentation: dt-bindings: Add bindings for i.MX specific Synopsys DW MIPI DSI driver drm: imx: Support Synopsys DesignWare MIPI DSI host controller Documentation: dt-bindings: Add bindings for Himax HX8369A DRM panel driver drm: panel: Add support for Himax HX8369A MIPI DSI panel ARM: dtsi: imx6qdl: Add support for MIPI DSI host controller ARM: dts: imx6qdl-sabresd: Add support for TRULY TFT480800-16-E MIPI DSI panel ARM: imx_v6_v7_defconfig: Cleanup for imx drm being moved out of staging ARM: imx_v6_v7_defconfig: Add support for MIPI DSI host controller ARM: imx_v6_v7_defconfig: Add support for Himax HX8369A panel .../devicetree/bindings/drm/bridge/dw_mipi_dsi.txt | 76 ++ .../devicetree/bindings/drm/imx/mipi_dsi.txt | 81 ++ .../devicetree/bindings/panel/himax,hx8369a.txt| 39 + arch/arm/boot/dts/imx6q.dtsi | 20 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 20 + arch/arm/boot/dts/imx6qdl.dtsi | 30 +- arch/arm/configs/imx_v6_v7_defconfig | 23 +- arch/arm/mach-imx/clk-imx6q.c |8 +- drivers/clk/clk-divider.c |3 +- drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile|1 + drivers/gpu/drm/bridge/dw_mipi_dsi.c | 1006 drivers/gpu/drm/imx/Kconfig|7 + drivers/gpu/drm/imx/Makefile |1 + drivers/gpu/drm/imx/dw_mipi_dsi-imx.c | 230 + drivers/gpu/drm/panel/Kconfig |5 + drivers/gpu/drm/panel/Makefile |1 + drivers/gpu/drm/panel/panel-himax-hx8369a.c| 610 include/drm/bridge/dw_mipi_dsi.h | 27 + include/drm/drm_mipi_dsi.h | 14 + include/dt-bindings/clock/i
Re: [BUG in v3.18 ?] Seems to be triggered from cgroup code
On 2015/2/6 7:54, santosh shilimkar wrote: > Hi Tejun and all, > > We observed a BUG (stack is end of the email) while trying do some > ceph testing. I looked at pidlist_free(), pidlist_array_load() for > any potential leak but those functions looked fine to me. > The BUG is not 100% reproducible either so though of reporting > to the list to get some more pointers. > By saying not 100% reproducible, do you mean it's reproducible but not very easy to trigger? I have to clue how this can happen...This reminds me another bug report which also happend in pidlist code and it's not reproducible. https://lkml.org/lkml/2014/9/16/710 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 1/2] INPUT/HID: add touch support for SiS touch driver
Hi, I've checked the coding style and modified the i2c and hid touch driver for sis touch controller. Please help review them. Thanks a lot. Tammy - Here is the sis i2c driver in input: linux-3.18.5/drivers/input/touchscreen/Kconfig |7 + linux-3.18.5/drivers/input/touchscreen/Makefile |1 + linux-3.18.5/drivers/input/touchscreen/sis_i2c.c | 1032 ++ linux-3.18.5/drivers/input/touchscreen/sis_i2c.h | 173 4 files changed, 1213 insertions(+) - diff --git a/linux-3.18.5/drivers/input/touchscreen/Kconfig b/linux-3.18.5/drivers/input/touchscreen/Kconfig index e1d8003..5093ccc 100644 --- a/linux-3.18.5/drivers/input/touchscreen/Kconfig +++ b/linux-3.18.5/drivers/input/touchscreen/Kconfig @@ -962,4 +962,11 @@ config TOUCHSCREEN_ZFORCE To compile this driver as a module, choose M here: the module will be called zforce_ts. +config TOUCHSCREEN_SIS_I2C + tristate "SiS 9200 family I2C touchscreen driver" + depends on I2C + default n + help + This enables support for SiS 9200 family over I2C based touchscreens. + endif diff --git a/linux-3.18.5/drivers/input/touchscreen/Makefile b/linux-3.18.5/drivers/input/touchscreen/Makefile index 090e61c..25cfd9f 100644 --- a/linux-3.18.5/drivers/input/touchscreen/Makefile +++ b/linux-3.18.5/drivers/input/touchscreen/Makefile @@ -79,3 +79,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE) += zylonite-wm97xx.o obj-$(CONFIG_TOUCHSCREEN_W90X900) += w90p910_ts.o obj-$(CONFIG_TOUCHSCREEN_TPS6507X) += tps6507x-ts.o obj-$(CONFIG_TOUCHSCREEN_ZFORCE) += zforce_ts.o +obj-$(CONFIG_TOUCHSCREEN_SIS_I2C) += sis_i2c.o diff --git a/linux-3.18.5/drivers/input/touchscreen/sis_i2c.c b/linux-3.18.5/drivers/input/touchscreen/sis_i2c.c new file mode 100644 index 000..260a7b6 --- /dev/null +++ b/linux-3.18.5/drivers/input/touchscreen/sis_i2c.c @@ -0,0 +1,1032 @@ +/* drivers/input/touchscreen/sis_i2c.c + * - I2C Touch panel driver for SiS 9200 family + * + * Copyright (C) 2011 SiS, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#ifdef CONFIG_HAS_EARLYSUSPEND +#include +#endif +#include +#include +#include +#include +#include +#include +#include "sis_i2c.h" +#include +#include +#include +#include +#include +#include + +#ifdef _STD_RW_IO +#include +#include +#include +#define DEVICE_NAME "sis_aegis_touch_device" +static const int sis_char_devs_count = 1;/* device count */ +static int sis_char_major; +static struct cdev sis_char_cdev; +static struct class *sis_char_class; +#endif + +/* Addresses to scan */ +static const unsigned short normal_i2c[] = { SIS_SLAVE_ADDR, I2C_CLIENT_END }; +static struct workqueue_struct *sis_wq; +struct sis_ts_data *ts_bak; +struct sisTP_driver_data *TPInfo; +static void sis_tpinfo_clear(struct sisTP_driver_data *TPInfo, int max); + +#ifdef CONFIG_HAS_EARLYSUSPEND +static void sis_ts_early_suspend(struct early_suspend *h); +static void sis_ts_late_resume(struct early_suspend *h); +#endif + +#ifdef _CHECK_CRC +static const unsigned short crc16tab[256] = { + 0x, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, + 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, + 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, + 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, + 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, + 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, + 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, + 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, + 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, + 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, + 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, + 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, + 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, + 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, + 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, +
linux-next: Tree for Feb 12
Hi all, Please do not add any material destined for v3.21 to your linux-next included trees until after v3.20-rc1 has been released. Changes since 20150211: The net-next tree gained a conflict against Linus' tree. The akpm-current tree gained a conflict against the modules tree. Non-merge commits (relative to Linus' tree): 4912 4799 files changed, 206475 insertions(+), 107119 deletions(-) I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig for x86_64 and a multi_v7_defconfig for arm. After the final fixups (if any), it is also built with powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and allyesconfig (this fails its final link) and i386, sparc, sparc64 and arm defconfig. Below is a summary of the state of the merge. I am currently merging 206 trees (counting Linus' and 30 trees of patches pending for Linus' tree). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwells...@canb.auug.org.au $ git checkout master $ git reset --hard stable Merging origin/master (73b4f63aebd6 Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6) Merging fixes/master (b94d525e58dc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging kbuild-current/rc-fixes (a16c5f99a28c kbuild: Fix removal of the debian/ directory) Merging arc-current/for-curr (2ce7598c9a45 Linux 3.17-rc4) Merging arm-current/fixes (8e6480667246 ARM: 8299/1: mm: ensure local active ASID is marked as allocated on rollover) Merging m68k-current/for-linus (4436820a98cd m68k/defconfig: Enable Ethernet bridging) Merging metag-fixes/fixes (ffe6902b66aa asm-generic: remove _STK_LIM_MAX) Merging mips-fixes/mips-fixes (1795cd9b3a91 Linux 3.16-rc5) Merging powerpc-merge/merge (31345e1a071e powerpc/pci: Remove unused force_32bit_msi quirk) Merging powerpc-merge-mpe/fixes (c59c961ca511 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux) Merging sparc/master (66d0f7ec9f10 sparc32: destroy_context() and switch_mm() needs to disable interrupts.) Merging net/master (73b4f63aebd6 Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6) Merging ipsec/master (044a832a7779 xfrm: Fix local error reporting crash with interfamily tunnels) Merging sound-current/for-linus (d2255c016365 Merge tag 'asoc-fix-ac97-v3.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus) Merging pci-current/for-linus (06cf35f903aa PCI: Handle read-only BARs on AMD CS553x devices) Merging wireless-drivers/master (aeb2d2a4c0ae rtlwifi: Remove logging statement that is no longer needed) Merging driver-core.current/driver-core-linus (26bc420b59a3 Linux 3.19-rc6) Merging tty.current/tty-linus (ec6f34e5b552 Linux 3.19-rc5) Merging usb.current/usb-linus (e36f014edff7 Linux 3.19-rc7) Merging usb-gadget-fixes/fixes (0df8fc37f6e4 usb: phy: never defer probe in non-OF case) Merging usb-serial-fixes/usb-linus (a6f0331236fa USB: cp210x: add ID for RUGGEDCOM USB Serial Console) Merging staging.current/staging-linus (e36f014edff7 Linux 3.19-rc7) Merging char-misc.current/char-misc-linus (e36f014edff7 Linux 3.19-rc7) Merging input-current/for-linus (4ba24fef3eb3 Merge branch 'next' into for-linus) Merging crypto-current/master (3e14dcf7cb80 crypto: add missing crypto module aliases) Merging ide/master (f96fe225677b Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging devicetree-current/devicetree/merge (6b1271de3723 of/unittest: Overlays with sub-devices tests) Merging rr-fixes/fixes (dc4515ea26d6 scsi: always increment reference count) Merging vfio-fixes/for-linus (7c2e211f3c95 vfio-pci: Fix the check on pci device type in vfio_pci_probe()) Merging kselftest-fixes/fixes (f5db310d77ef selftests/vm: fix link error for transhuge-stress test) Merging drm-intel-fixes/for-linux-next-fixes (bfa76d495765 Linux 3.19) Merging asm
RE: [PATCH net-next 1/3] r8152: separate USB_RX_EARLY_AGG
Sergei Shtylyov; net...@vger.kernel.org [...] > > > + ocp_data = tp->coalesce / 8; > > > > Why not do it in the initializer? > > This is for patch #3. The patch #3 would use this function. > The unit of the relative setting from the ethtool is 1 us. > However, the unit for the hw is 8 us. Therefore, I save the > value with the unit of 1 us, and transfer it to the unit of > the hw when setting. I think I misunderstand what you mean. I think you mean I have to combine u32 ocp_data; ocp_data = tp->coalesce / 8; into u32 ocp_data = tp->coalesce / 8; I would correct it. > > > + ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_TIMEOUT, ocp_data); > > > +} > > > + > > > +static void r8153_set_rx_early_size(struct r8152 *tp) > > > +{ > > > + struct net_device *dev = tp->netdev; > > > > Not sure you actually need this variable. > > If I replace dev->mtu with tp->netdev->mtu, the line would > more than 80 characters. This is used to avoid it. Should > I remove it? > > > > + u32 ocp_data; > > > + > > > + ocp_data = (agg_buf_sz - dev->mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4; > > > > Why not in initializer? > > This is for patch #2. The patch #2 would use this function. > It has to be re-calculated when the mtu is changed, or the > function is called when the linking status changes to ON. I think you mean I have to combine u32 ocp_data; ocp_data = (agg_buf_sz - dev->mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4; into u32 ocp_data = (agg_buf_sz - dev->mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 4; I would correct it. > > > + ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data); > > > } > > [...] > > > @@ -3911,6 +3907,13 @@ static int rtl8152_probe(struct > > usb_interface *intf, > > > tp->mii.reg_num_mask = 0x1f; > > > tp->mii.phy_id = R8152_PHY_ID; > > > > > > + if (udev->speed == USB_SPEED_SUPER) > > > + tp->coalesce = COALESCE_SUPER; > > > + else if (udev->speed == USB_SPEED_HIGH) > > > + tp->coalesce = COALESCE_HIGH; > > > + else > > > + tp->coalesce = COALESCE_SLOW; > > > > This is asking to be a *switch* statement. > > Excuse me. I don't understand what you mean. > The usb speed is determined when the device is plugged on > the usb host controller or usb hub. The usb speed wouldn't > chage unless you unplug the device and plug it to another > port with different usb speed. Therefore, I provide different > default values for different usb speed. I think you mean switch (udev->speed) { case USB_SPEED_SUPER: ... I would correct it. Best Regards, Hayes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
toshiba_acpi: Cleanup comments and file header
After Azael's various fixes and cleanups to toshiba_acpi.c, I've made some final cleanups to comment formatting and the file header. Azael, any objections? -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found
If no best divider is normally found, we will try to use the maximum divider. We should not set the parent clock rate to be 1Hz by force for being rounded. Instead, we should take the maximum divider as a base and calculate a correct parent clock rate for being rounded. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * None. drivers/clk/clk-divider.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index c0a842b..f641d4b 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -311,7 +311,8 @@ static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate, if (!bestdiv) { bestdiv = _get_maxdiv(divider); - *best_parent_rate = __clk_round_rate(__clk_get_parent(hw->clk), 1); + *best_parent_rate = __clk_round_rate(__clk_get_parent(hw->clk), + MULT_ROUND_UP(rate, bestdiv)); } return bestdiv; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 08/20] ARM: dts: imx6qdl: Move existing MIPI DSI ports into a new 'ports' node
The MIPI DSI node contains some ports which represent possible DRM CRTCs it can connect with. Each port has a 'reg' property embedded. This property will be wrongly interpretted by the MIPI DSI bus driver, because the driver will take each subnode which contains a 'reg' property as a DSI peripheral device. This patch moves the existing MIPI DSI ports into a new 'ports' node so that the MIPI DSI bus driver may distinguish its DSI peripheral device(s) from the existing ports. Acked-by: Philipp Zabel Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * Add Philipp's Ack. v1->v2: * Newly added, as suggested by Thierry Reding. arch/arm/boot/dts/imx6q.dtsi | 20 +++- arch/arm/boot/dts/imx6qdl.dtsi | 23 ++- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 85f72e6..e152e6e 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -292,19 +292,21 @@ }; &mipi_dsi { - port@2 { - reg = <2>; + ports { + port@2 { + reg = <2>; - mipi_mux_2: endpoint { - remote-endpoint = <&ipu2_di0_mipi>; + mipi_mux_2: endpoint { + remote-endpoint = <&ipu2_di0_mipi>; + }; }; - }; - port@3 { - reg = <3>; + port@3 { + reg = <3>; - mipi_mux_3: endpoint { - remote-endpoint = <&ipu2_di1_mipi>; + mipi_mux_3: endpoint { + remote-endpoint = <&ipu2_di1_mipi>; + }; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 2109d07..55aced8 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -1023,19 +1023,24 @@ reg = <0x021e 0x4000>; status = "disabled"; - port@0 { - reg = <0>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; - mipi_mux_0: endpoint { - remote-endpoint = <&ipu1_di0_mipi>; + mipi_mux_0: endpoint { + remote-endpoint = <&ipu1_di0_mipi>; + }; }; - }; - port@1 { - reg = <1>; + port@1 { + reg = <1>; - mipi_mux_1: endpoint { - remote-endpoint = <&ipu1_di1_mipi>; + mipi_mux_1: endpoint { + remote-endpoint = <&ipu1_di1_mipi>; + }; }; }; }; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 19/20] ARM: imx_v6_v7_defconfig: Add support for MIPI DSI host controller
This patch adds support for MIPI DSI host controller. The new imx_v6_v7_defconfig is generated in this way: * make ARCH=arm imx_v6_v7_defconfig * make ARCH=arm menuconfig and manually choose to build in the MIPI DSI host controller driver * make ARCH=arm savedefconfig * cp defconfig arch/arm/configs/imx_v6_v7_defconfig Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * None. arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index ec4b255..9e650e8f 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -203,6 +203,7 @@ CONFIG_DRM_IMX_PARALLEL_DISPLAY=y CONFIG_DRM_IMX_TVE=y CONFIG_DRM_IMX_LDB=y CONFIG_DRM_IMX_HDMI=y +CONFIG_DRM_IMX_MIPI_DSI=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_L4F00242T03=y CONFIG_LCD_PLATFORM=y -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format
Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * Address the over 80 characters in one line warning reported by the checkpatch.pl script. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * Thierry Reding suggested that the mipi_dsi_pixel_format_to_bpp() function could be placed at the common DRM MIPI DSI driver. This patch is newly added. include/drm/drm_mipi_dsi.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index f1d8d0d..3662021 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -163,6 +163,20 @@ static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev) return container_of(dev, struct mipi_dsi_device, dev); } +static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt) +{ + switch (fmt) { + case MIPI_DSI_FMT_RGB888: + case MIPI_DSI_FMT_RGB666: + return 24; + case MIPI_DSI_FMT_RGB666_PACKED: + return 18; + case MIPI_DSI_FMT_RGB565: + return 16; + } + return -EINVAL; +} + struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); int mipi_dsi_attach(struct mipi_dsi_device *dsi); int mipi_dsi_detach(struct mipi_dsi_device *dsi); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 12/20] Documentation: dt-bindings: Add bindings for i.MX specific Synopsys DW MIPI DSI driver
This patch adds device tree bindings for i.MX specific Synopsys DW MIPI DSI driver. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * To address Philipp's comment, mention that a common compatible string "snps,dw-mipi-dsi" should be appended. * To address Philipp's comment, add a new required clock pclk and clean up clock-names. v7->v8: * None. v6->v7: * None. v5->v6: * Add the #address-cells and #size-cells properties in the example 'ports' node. * Remove the useless pllref_gate clock from the required clocks, clock-names property. v4->v5: * None. v3->v4: * Newly introduced in v4. This is separated from the relevant driver patch in v3 to address Stefan Wahren's comment. .../devicetree/bindings/drm/imx/mipi_dsi.txt | 81 ++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt diff --git a/Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt b/Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt new file mode 100644 index 000..4bd8451 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt @@ -0,0 +1,81 @@ +i.MX specific Device-Tree bindings for Synopsys DesignWare MIPI DSI host controller + +MIPI DSI host controller + + +The MIPI DSI host controller is a Synopsys DesignWare IP. +The common device tree documentation for this controller can be found +at [1]. + +Required properties: + - #address-cells: Should be <1>. + - #size-cells: Should be <0>. + - compatible: The first compatible string should be "fsl,imx6q-mipi-dsi" + for i.MX6q/sdl SoCs. And, a common compatible string "snps,dw-mipi-dsi" + should be appended. + - reg: Physical base address of the controller and length of memory + mapped region. + - interrupts: The controller's interrupt number to the CPU(s). + - gpr: Should be <&gpr>. + The phandle points to the iomuxc-gpr region containing the + multiplexer control register for the controller. + - clocks, clock-names: Phandles to the controller's pll reference + clock(ref), configuration clock(cfg) and APB clock(pclk), as described + in [2] and [3]. + +Required sub-nodes: + - ports: This node may contain up to four port nodes with endpoint + definitions as defined in [4], corresponding to the four inputs to + the controller multiplexer. + - A node to represent a DSI peripheral as described in [5]. + +[1] Documentation/devicetree/bindings/drm/bridge/dw_mipi_dsi.txt. +[2] Documentation/devicetree/bindings/clock/clock-bindings.txt +[3] Documentation/devicetree/bindings/clock/imx6q-clock.txt +[4] Documentation/devicetree/bindings/media/video-interfaces.txt +[5] Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt + +example: + gpr: iomuxc-gpr@020e { + /* ... */ + }; + + mipi_dsi: mipi@021e { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx6q-mipi-dsi", "snps,dw-mipi-dsi"; + reg = <0x021e 0x4000>; + interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; + gpr = <&gpr>; + clocks = <&clks IMX6QDL_CLK_MIPI_CORE_CFG>, +<&clks IMX6QDL_CLK_MIPI_CORE_CFG>, +<&clks IMX6QDL_CLK_MIPI_IPG>; + clock-names = "ref", "cfg", "pclk"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_mux_0: endpoint { + remote-endpoint = <&ipu1_di0_mipi>; + }; + }; + + port@1 { + reg = <1>; + + mipi_mux_1: endpoint { + remote-endpoint = <&ipu1_di1_mipi>; + }; + }; + }; + + panel { + compatible = "truly,tft480800-16-e-dsi"; + reg = <0>; + /* ... */ + }; + }; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 06/20] ARM: imx6q: clk: Add support for mipi_core_cfg clock as a shared clock gate
The CG8 field of the CCM CCGR3 register is named as 'mipi_core_cfg' clock, according to the i.MX6q/sdl reference manuals. This clock is actually the gate for several clocks, including the hsi_tx_sel clock's output and the video_27m clock's output. The MIPI DSI host controller embedded in the i.MX6q/sdl SoCs uses the video_27m clock to generate PLL reference clock and MIPI core configuration clock. In order to gate/ungate the two MIPI DSI host controller relevant clocks, this patch adds the mipi_core_cfg clock as a shared clock gate. Suggested-by: Philipp Zabel Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * Add two spaces in the clock driver to eliminate two errors reported by the checkpatch.pl script. v4->v5: * None. v3->v4: * None. v2->v3: * Newly introduced in v3. arch/arm/mach-imx/clk-imx6q.c | 1 + include/dt-bindings/clock/imx6qdl-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 049e922..cbdbe2a 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -418,6 +418,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[IMX6QDL_CLK_LDB_DI1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); clk[IMX6QDL_CLK_IPU2_DI1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2_shared("hsi_tx", "hsi_tx_podf", base + 0x74, 16, &share_count_mipi_core_cfg); + clk[IMX6QDL_CLK_MIPI_CORE_CFG] = imx_clk_gate2_shared("mipi_core_cfg", "video_27m", base + 0x74, 16, &share_count_mipi_core_cfg); if (cpu_is_imx6dl()) /* * The multiplexer and divider of the imx6q clock gpu2d get diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index 25625bf..dbc828c 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h @@ -249,6 +249,7 @@ #define IMX6QDL_PLL7_BYPASS236 #define IMX6QDL_CLK_GPT_3M 237 #define IMX6QDL_CLK_VIDEO_27M 238 -#define IMX6QDL_CLK_END239 +#define IMX6QDL_CLK_MIPI_CORE_CFG 239 +#define IMX6QDL_CLK_END240 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 05/20] ARM: imx6q: clk: Change hsi_tx clock to be a shared clock gate
The CG8 field of the CCM CCGR3 register is named as 'mipi_core_cfg' clock, according to the i.MX6q/sdl reference manuals. This clock is actually the gate for several clocks, including the hsi_tx_sel clock's output and the video_27m clock's output. So, this patch changes the hsi_tx clock to be a shared clock gate. Suggested-by: Philipp Zabel Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * Newly introduced in v3. arch/arm/mach-imx/clk-imx6q.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 0dbc79a..049e922 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -119,6 +119,7 @@ static unsigned int share_count_asrc; static unsigned int share_count_ssi1; static unsigned int share_count_ssi2; static unsigned int share_count_ssi3; +static unsigned int share_count_mipi_core_cfg; static void __init imx6q_clocks_init(struct device_node *ccm_node) { @@ -416,7 +417,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[IMX6QDL_CLK_LDB_DI0] = imx_clk_gate2("ldb_di0", "ldb_di0_podf", base + 0x74, 12); clk[IMX6QDL_CLK_LDB_DI1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); clk[IMX6QDL_CLK_IPU2_DI1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); - clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); + clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2_shared("hsi_tx", "hsi_tx_podf", base + 0x74, 16, &share_count_mipi_core_cfg); if (cpu_is_imx6dl()) /* * The multiplexer and divider of the imx6q clock gpu2d get -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 10/20] Documentation: dt-bindings: Add bindings for Synopsys DW MIPI DSI DRM bridge driver
This patch adds device tree bindings for Synopsys DesignWare MIPI DSI host controller DRM bridge driver. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * To address Philipp's comment, mention that a common compatible string "snps,dw-mipi-dsi" should be appended for all SoCs. * To address Philipp's comment, add a new required clock pclk and clean up clock-names. v7->v8: * None. v6->v7: * None. v5->v6: * Add the #address-cells and #size-cells properties in the example 'ports' node. * Remove the useless input-port properties from the example port@0 and port@1 nodes. v4->v5: * None. v3->v4: * Newly introduced in v4. This is separated from the relevant driver patch in v3 to address Stefan Wahren's comment. .../devicetree/bindings/drm/bridge/dw_mipi_dsi.txt | 76 ++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/bridge/dw_mipi_dsi.txt diff --git a/Documentation/devicetree/bindings/drm/bridge/dw_mipi_dsi.txt b/Documentation/devicetree/bindings/drm/bridge/dw_mipi_dsi.txt new file mode 100644 index 000..bb87466 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/bridge/dw_mipi_dsi.txt @@ -0,0 +1,76 @@ +Device-Tree bindings for Synopsys DesignWare MIPI DSI host controller + +The controller is a digital core that implements all protocol functions +defined in the MIPI DSI specification, providing an interface between +the system and the MIPI DPHY, and allowing communication with a MIPI DSI +compliant display. + +Required properties: + - #address-cells: Should be <1>. + - #size-cells: Should be <0>. + - compatible: The first compatible string should be "fsl,imx6q-mipi-dsi" + for i.MX6q/sdl SoCs. For other SoCs, please refer to their specific + device tree binding documentations. A common compatible string + "snps,dw-mipi-dsi" should be appended for all SoCs. + - reg: Represent the physical address range of the controller. + - interrupts: Represent the controller's interrupt to the CPU(s). + - clocks, clock-names: Phandles to the controller's pll reference + clock(ref), configuration clock(cfg) and APB clock(pclk), as + described in [1]. + +For more required properties, please refer to relevant device tree binding +documentations which describe the controller embedded in specific SoCs. + +Required sub-nodes: + - A node to represent a DSI peripheral as described in [2]. + +For more required sub-nodes, please refer to relevant device tree binding +documentations which describe the controller embedded in specific SoCs. + +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt +[2] Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt + +example: + gpr: iomuxc-gpr@020e { + /* ... */ + }; + + mipi_dsi: mipi@021e { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx6q-mipi-dsi", "snps,dw-mipi-dsi"; + reg = <0x021e 0x4000>; + interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; + gpr = <&gpr>; + clocks = <&clks IMX6QDL_CLK_MIPI_CORE_CFG>, +<&clks IMX6QDL_CLK_MIPI_CORE_CFG>, +<&clks IMX6QDL_CLK_MIPI_IPG>; + clock-names = "ref", "cfg", "pclk"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_mux_0: endpoint { + remote-endpoint = <&ipu1_di0_mipi>; + }; + }; + + port@1 { + reg = <1>; + + mipi_mux_1: endpoint { + remote-endpoint = <&ipu1_di1_mipi>; + }; + }; + }; + + panel { + compatible = "truly,tft480800-16-e-dsi"; + reg = <0>; + /* ... */ + }; + }; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 20/20] ARM: imx_v6_v7_defconfig: Add support for Himax HX8369A panel
This patch adds support for Himax HX8369A panel. The new imx_v6_v7_defconfig is generated in this way: * make ARCH=arm imx_v6_v7_defconfig * make ARCH=arm menuconfig and manually choose to build in the Himax HX8369A panel driver * make ARCH=arm savedefconfig * cp defconfig arch/arm/configs/imx_v6_v7_defconfig Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * Add the HIMAX prefix in the Kconfig name. arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 9e650e8f..52d70a1 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -197,6 +197,7 @@ CONFIG_SOC_CAMERA_OV2640=y CONFIG_IMX_IPUV3_CORE=y CONFIG_DRM=y CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_HIMAX_HX8369A=y CONFIG_DRM_IMX=y CONFIG_DRM_IMX_FB_HELPER=y CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 18/20] ARM: imx_v6_v7_defconfig: Cleanup for imx drm being moved out of staging
The new imx_v6_v7_defconfig is generated in this way: * make ARCH=arm imx_v6_v7_defconfig * make ARCH=arm savedefconfig * cp defconfig arch/arm/configs/imx_v6_v7_defconfig Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository, so the patch content is different from v8. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * None. arch/arm/configs/imx_v6_v7_defconfig | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 7c2075a..ec4b255 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -54,7 +54,6 @@ CONFIG_ARM_IMX6Q_CPUFREQ=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_BINFMT_MISC=m -CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_TEST_SUSPEND=y CONFIG_NET=y @@ -163,13 +162,13 @@ CONFIG_SPI_IMX=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_MC9S08DZ60=y CONFIG_GPIO_STMPE=y +CONFIG_POWER_SUPPLY=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_IMX=y CONFIG_SENSORS_GPIO_FAN=y CONFIG_THERMAL=y CONFIG_CPU_THERMAL=y CONFIG_IMX_THERMAL=y -CONFIG_POWER_SUPPLY=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_IMX=y CONFIG_WATCHDOG=y CONFIG_IMX2_WDT=y CONFIG_MFD_DA9052_I2C=y @@ -198,7 +197,12 @@ CONFIG_SOC_CAMERA_OV2640=y CONFIG_IMX_IPUV3_CORE=y CONFIG_DRM=y CONFIG_DRM_PANEL_SIMPLE=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_FB_HELPER=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_LDB=y +CONFIG_DRM_IMX_HDMI=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_L4F00242T03=y CONFIG_LCD_PLATFORM=y @@ -257,13 +261,6 @@ CONFIG_IMX_SDMA=y CONFIG_MXS_DMA=y CONFIG_FSL_EDMA=y CONFIG_STAGING=y -CONFIG_DRM_IMX=y -CONFIG_DRM_IMX_FB_HELPER=y -CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -CONFIG_DRM_IMX_TVE=y -CONFIG_DRM_IMX_LDB=y -CONFIG_DRM_IMX_IPUV3=y -CONFIG_DRM_IMX_HDMI=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_PWM=y CONFIG_PWM_IMX=y -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 16/20] ARM: dtsi: imx6qdl: Add support for MIPI DSI host controller
This patch adds support for MIPI DSI host controller. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * To address Philipp's comment, mention that a common compatible string "snps,dw-mipi-dsi" should be appended. * To address Philipp's comment, add a new required clock pclk and clean up clock-names. v7->v8: * None. v6->v7: * None. v5->v6: * None. v3->v4: * None. v2->v3: * As suggested by Phillip Zabel, change the clocks and the clock-names properties to use the pllref and core_cfg clocks only. v1->v2: * None. arch/arm/boot/dts/imx6qdl.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 55aced8..0a4d7f7 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -1020,7 +1020,14 @@ mipi_dsi: mipi@021e { #address-cells = <1>; #size-cells = <0>; + compatible = "fsl,imx6q-mipi-dsi", "snps,dw-mipi-dsi"; reg = <0x021e 0x4000>; + interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; + gpr = <&gpr>; + clocks = <&clks IMX6QDL_CLK_MIPI_CORE_CFG>, +<&clks IMX6QDL_CLK_MIPI_CORE_CFG>, +<&clks IMX6QDL_CLK_MIPI_IPG>; + clock-names = "ref", "cfg", "pclk"; status = "disabled"; ports { -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] toshiba_acpi: Cleanup GPL header
Remove the Free Software Foundation street address paragraph and reference COPYING. Remove an empty TODO block. Signed-off-by: Darren Hart --- drivers/platform/x86/toshiba_acpi.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 07be889..dbcb7a8 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -1,7 +1,6 @@ /* * toshiba_acpi.c - Toshiba Laptop ACPI Extras * - * * Copyright (C) 2002-2004 John Belmonte * Copyright (C) 2008 Philip Langdale * Copyright (C) 2010 Pierre Ducroquet @@ -17,10 +16,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * The full GNU General Public License is included in this distribution in + * the file called "COPYING". * * The devolpment page for this driver is located at * http://memebeam.org/toys/ToshibaAcpiDriver. @@ -30,10 +27,6 @@ * engineering the Windows drivers * Yasushi Nagato - changes for linux kernel 2.4 -> 2.5 * Rob Miller - TV out and hotkeys help - * - * - * TODO - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC v9 04/20] ARM: imx6q: clk: Change hdmi_isfr clock's parent to be video_27m clock
According to the table 33-1 in the i.MX6Q reference manual, the hdmi_isfr clock's parent should be the video_27m clock. The i.MX6DL reference manual has the same statement. This patch changes the hdmi_isfr clock's parent from the pll3_pfd1_540m clock to the video_27m clock. Suggested-by: Philipp Zabel Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * Newly introduced in v3. arch/arm/mach-imx/clk-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 2b7beb8..0dbc79a 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -401,7 +401,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24); clk[IMX6QDL_CLK_GPU3D_CORE] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26); clk[IMX6QDL_CLK_HDMI_IAHB]= imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0); - clk[IMX6QDL_CLK_HDMI_ISFR]= imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m",base + 0x70, 4); + clk[IMX6QDL_CLK_HDMI_ISFR]= imx_clk_gate2("hdmi_isfr", "video_27m", base + 0x70, 4); clk[IMX6QDL_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_per", base + 0x70, 6); clk[IMX6QDL_CLK_I2C2] = imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8); clk[IMX6QDL_CLK_I2C3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] toshiba_acpi: Cleanup comment blocks and capitalization
Ensure multiline comments start with /* and */ each on its own line. Capitalize the first word of comments. Signed-off-by: Darren Hart --- drivers/platform/x86/toshiba_acpi.c | 75 +++-- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 1cfc443..07be889 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -71,7 +71,8 @@ MODULE_LICENSE("GPL"); /* Toshiba ACPI method paths */ #define METHOD_VIDEO_OUT "\\_SB_.VALX.DSSX" -/* The Toshiba configuration interface is composed of the HCI and the SCI, +/* + * The Toshiba configuration interface is composed of the HCI and the SCI, * which are defined as follows: * * HCI is Toshiba's "Hardware Control Interface" which is supposed to @@ -286,7 +287,8 @@ static const struct key_entry toshiba_acpi_alt_keymap[] = { { KE_END, 0 }, }; -/* utility +/* + * Utility */ static inline void _set_bit(u32 *word, u32 mask, int value) @@ -294,7 +296,8 @@ static inline void _set_bit(u32 *word, u32 mask, int value) *word = (*word & ~mask) | (mask * value); } -/* acpi interface wrappers +/* + * ACPI interface wrappers */ static int write_acpi_int(const char *methodName, int val) @@ -305,7 +308,8 @@ static int write_acpi_int(const char *methodName, int val) return (status == AE_OK) ? 0 : -EIO; } -/* Perform a raw configuration call. Here we don't care about input or output +/* + * Perform a raw configuration call. Here we don't care about input or output * buffer format. */ static acpi_status tci_raw(struct toshiba_acpi_dev *dev, @@ -339,7 +343,8 @@ static acpi_status tci_raw(struct toshiba_acpi_dev *dev, return status; } -/* common hci tasks (get or set one or two value) +/* + * Common hci tasks (get or set one or two value) * * In addition to the ACPI status, the HCI system returns a result which * may be useful (such as "not supported"). @@ -393,7 +398,8 @@ static u32 hci_read2(struct toshiba_acpi_dev *dev, return out[0]; } -/* common sci tasks +/* + * Common sci tasks */ static int sci_open(struct toshiba_acpi_dev *dev) @@ -414,7 +420,8 @@ static int sci_open(struct toshiba_acpi_dev *dev) pr_info("Toshiba SCI already opened\n"); return 1; } else if (out[0] == TOS_NOT_SUPPORTED) { - /* Some BIOSes do not have the SCI open/close functions + /* +* Some BIOSes do not have the SCI open/close functions * implemented and return 0x8000 (Not Supported), failing to * register some supported features. * @@ -567,10 +574,11 @@ static int toshiba_kbd_illum_available(struct toshiba_acpi_dev *dev) return 0; } - /* Check for keyboard backlight timeout max value, + /* +* Check for keyboard backlight timeout max value, * previous kbd backlight implementation set this to * 0x3c0003, and now the new implementation set this -* to 0x3c001a, use this to distinguish between them +* to 0x3c001a, use this to distinguish between them. */ if (out[3] == SCI_KBD_TIME_MAX) dev->kbd_type = 2; @@ -714,7 +722,8 @@ static int toshiba_eco_mode_available(struct toshiba_acpi_dev *dev) } else if (out[0] == TOS_NOT_INSTALLED) { pr_info("ECO led not installed"); } else if (out[0] == TOS_INPUT_DATA_ERROR) { - /* If we receive 0x8300 (Input Data Error), it means that the + /* +* If we receive 0x8300 (Input Data Error), it means that the * LED device is present, but that we just screwed the input * parameters. * @@ -776,7 +785,8 @@ static int toshiba_accelerometer_supported(struct toshiba_acpi_dev *dev) u32 out[TCI_WORDS]; acpi_status status; - /* Check if the accelerometer call exists, + /* +* Check if the accelerometer call exists, * this call also serves as initialization */ status = tci_raw(dev, in, out); @@ -1433,9 +1443,9 @@ static ssize_t video_proc_write(struct file *file, const char __user *buf, buffer = cmd; - /* scan expression. Multiple expressions may be delimited with ; -* -* NOTE: to keep scanning simple, invalid fields are ignored + /* +* Scan expression. Multiple expressions may be delimited with ; +* NOTE: To keep scanning simple, invalid fields are ignored. */ while (remain) { if (sscanf(buffer, " lcd_out : %i", &value) == 1) @@ -1444,7 +1454,7 @@ static ssize_t video_proc_write(struct file *file, const char __user *buf, crt_out = value & 1; else if (sscanf(buffer, " tv_out : %i",
[Patch v4 1/2] dt/bindings: qcom_adm: Fix channel specifiers
This patch removes the crci information from the dma channel property. At least one client device requires using more than one CRCI value for a channel. This does not match the current binding and the crci information needs to be removed. Instead, the client device will provide this information via other means. Signed-off-by: Andy Gross --- Documentation/devicetree/bindings/dma/qcom_adm.txt | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/qcom_adm.txt b/Documentation/devicetree/bindings/dma/qcom_adm.txt index 9bcab91..38d45f8 100644 --- a/Documentation/devicetree/bindings/dma/qcom_adm.txt +++ b/Documentation/devicetree/bindings/dma/qcom_adm.txt @@ -4,8 +4,7 @@ Required properties: - compatible: must contain "qcom,adm" for IPQ/APQ8064 and MSM8960 - reg: Address range for DMA registers - interrupts: Should contain one interrupt shared by all channels -- #dma-cells: must be <2>. First cell denotes the channel number. Second cell - denotes CRCI (client rate control interface) flow control assignment. +- #dma-cells: must be <1>. First cell denotes the channel number. - clocks: Should contain the core clock and interface clock. - clock-names: Must contain "core" for the core clock and "iface" for the interface clock. @@ -22,7 +21,7 @@ Example: compatible = "qcom,adm"; reg = <0x1830 0x10>; interrupts = <0 170 0>; - #dma-cells = <2>; + #dma-cells = <1>; clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>; clock-names = "core", "iface"; @@ -35,15 +34,12 @@ Example: qcom,ee = <0>; }; -DMA clients must use the format descripted in the dma.txt file, using a three +DMA clients must use the format descripted in the dma.txt file, using a two cell specifier for each channel. -Each dmas request consists of 3 cells: +Each dmas request consists of two cells: 1. phandle pointing to the DMA controller 2. channel number - 3. CRCI assignment, if applicable. If no CRCI flow control is required, use 0. -The CRCI is used for flow control. It identifies the peripheral device that -is the source/destination for the transferred data. Example: @@ -56,7 +52,7 @@ Example: cs-gpios = <&qcom_pinmux 20 0>; - dmas = <&adm_dma 6 9>, - <&adm_dma 5 10>; + dmas = <&adm_dma 6>, + <&adm_dma 5>; dma-names = "rx", "tx"; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[Patch v4 2/2] dmaengine: Add ADM driver
Add the DMA engine driver for the QCOM Application Data Mover (ADM) DMA controller found in the MSM8x60 and IPQ/APQ8064 platforms. The ADM supports both memory to memory transactions and memory to/from peripheral device transactions. The controller also provides flow control capabilities for transactions to/from peripheral devices. The initial release of this driver supports slave transfers to/from peripherals and also incorporates CRCI (client rate control interface) flow control. Signed-off-by: Andy Gross --- drivers/dma/Kconfig| 10 + drivers/dma/Makefile |1 + drivers/dma/qcom_adm.c | 901 3 files changed, 912 insertions(+) create mode 100644 drivers/dma/qcom_adm.c diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index f2b2c4e..69bc15e 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -464,4 +464,14 @@ config QCOM_BAM_DMA Enable support for the QCOM BAM DMA controller. This controller provides DMA capabilities for a variety of on-chip devices. +config QCOM_ADM + tristate "Qualcomm ADM support" + depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM) + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + ---help--- + Enable support for the Qualcomm ADM DMA controller. This controller + provides DMA capabilities for both general purpose and on-chip + peripheral devices. + endif diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index 2022b54..3b7ead6 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -50,3 +50,4 @@ obj-y += xilinx/ obj-$(CONFIG_INTEL_MIC_X100_DMA) += mic_x100_dma.o obj-$(CONFIG_NBPFAXI_DMA) += nbpfaxi.o obj-$(CONFIG_DMA_SUN6I) += sun6i-dma.o +obj-$(CONFIG_QCOM_ADM) += qcom_adm.o diff --git a/drivers/dma/qcom_adm.c b/drivers/dma/qcom_adm.c new file mode 100644 index 000..baea945 --- /dev/null +++ b/drivers/dma/qcom_adm.c @@ -0,0 +1,901 @@ +/* + * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dmaengine.h" +#include "virt-dma.h" + +/* ADM registers - calculated from channel number and security domain */ +#define HI_CH_CMD_PTR(chan, ee)(4*chan + 0x20800*ee) +#define HI_CH_RSLT(chan, ee) (0x40 + 4*chan + 0x20800*ee) +#define HI_CH_FLUSH_STATE0(chan, ee) (0x80 + 4*chan + 0x20800*ee) +#define HI_CH_FLUSH_STATE1(chan, ee) (0xc0 + 4*chan + 0x20800*ee) +#define HI_CH_FLUSH_STATE2(chan, ee) (0x100 + 4*chan + 0x20800*ee) +#define HI_CH_FLUSH_STATE3(chan, ee) (0x140 + 4*chan + 0x20800*ee) +#define HI_CH_FLUSH_STATE4(chan, ee) (0x180 + 4*chan + 0x20800*ee) +#define HI_CH_FLUSH_STATE5(chan, ee) (0x1c0 + 4*chan + 0x20800*ee) +#define HI_CH_STATUS_SD(chan, ee) (0x200 + 4*chan + 0x20800*ee) +#define HI_CH_CONF(chan) (0x240 + 4*chan) +#define HI_CH_RSLT_CONF(chan, ee) (0x300 + 4*chan + 0x20800*ee) +#define HI_SEC_DOMAIN_IRQ_STATUS(ee) (0x380 + 0x20800*ee) +#define HI_CI_CONF(ci) (0x390 + 4*ci) +#define HI_CRCI_CONF0 0x3d0 +#define HI_CRCI_CONF1 0x3d4 +#define HI_GP_CTL 0x3d8 +#define HI_CRCI_CTL(crci, ee) (0x400 + 0x4*crci + 0x20800*ee) + +/* channel status */ +#define CH_STATUS_VALIDBIT(1) + +/* channel result */ +#define CH_RSLT_VALID BIT(31) +#define CH_RSLT_ERRBIT(3) +#define CH_RSLT_FLUSH BIT(2) +#define CH_RSLT_TPDBIT(1) + +/* channel conf */ +#define CH_CONF_MPU_DISABLEBIT(11) +#define CH_CONF_PERM_MPU_CONF BIT(9) +#define CH_CONF_FLUSH_RSLT_EN BIT(8) +#define CH_CONF_FORCE_RSLT_EN BIT(7) +#define CH_CONF_IRQ_EN BIT(6) + +/* channel result conf */ +#define CH_RSLT_CONF_FLUSH_EN BIT(1) +#define CH_RSLT_CONF_IRQ_ENBIT(0) + +/* CRCI CTL */ +#define CRCI_CTL_MUX_SEL BIT(18) +#define CRCI_CTL_RST BIT(17) + +/* CI configuration */ +#define CI_RANGE_END(x)(x << 24) +#define CI_RANGE_START(x) (x << 16) +#define CI_BURST_4_WORDS 0x4 +#define CI_BURST_8_WORDS 0x8 + +/* GP CTL */ +#define GP_CTL_LP_EN BIT(12) +#define GP_CTL_LP_CNT(x) (x << 8) + +/* Command pointer list entry */ +#define CPLE_LPBIT(31) +#define CPLE_CMD_PTR_LIST BIT(29) + +/* Command list entry */ +#def
[Patch v4 0/2] Add Qualcomm ADM dmaengine driver
This patch set introduces the dmaengine driver for the Qualcomm Application Data Mover (ADM) DMA controller present on MSM8x60, APQ8064, and IPQ8064 devices. The initial version of this driver will only support slave DMA operations between system memory and peripherals. Flow control via the CRCI (client rate control interface) is supported and can be configured via device tree configuration. Flow control usage is required for some peripheral devices. Changes from v3: - Remove .owner field Changes from v2: - Removed extraneous achan variable from xlate function - Reworked crci check in slave_sg function - Added mux field to async_desc structure. - Reworked dma start function to use crci and mux values directly from structure. - Added disable of clocks in probe error paths. - Changed to use #define for fixed number of channels. Changes since v1: - Fixed various review comments - Fixed some descriptor programming issues. - Added single descriptors to support sub burst length transactions. Selection of single or box descriptors depends on the sg length and burst size. - Removed use of crci in the dmas property. CRCI is now designated via the slave_config structure and will be stored in slave_id. Andy Gross (2): dt/bindings: qcom_adm: Fix channel specifiers dmaengine: Add ADM driver Documentation/devicetree/bindings/dma/qcom_adm.txt | 16 +- drivers/dma/Kconfig| 10 + drivers/dma/Makefile |1 + drivers/dma/qcom_adm.c | 901 4 files changed, 918 insertions(+), 10 deletions(-) create mode 100644 drivers/dma/qcom_adm.c -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] usb: dwc3: dwc3-omap: Fix disable IRQ
In the wrapper the IRQ disable should be done by writing 1's to the IRQ*_CLR register. Existing code is broken because it instead writes zeros to IRQ*_SET register. Fix this by adding functions dwc3_omap_write_irqmisc_clr() and dwc3_omap_write_irq0_clr() which do the right thing. Signed-off-by: George Cherian --- drivers/usb/dwc3/dwc3-omap.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 172d64e..52e0c4e 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -205,6 +205,18 @@ static void dwc3_omap_write_irq0_set(struct dwc3_omap *omap, u32 value) omap->irq0_offset, value); } +static void dwc3_omap_write_irqmisc_clr(struct dwc3_omap *omap, u32 value) +{ + dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_MISC + + omap->irqmisc_offset, value); +} + +static void dwc3_omap_write_irq0_clr(struct dwc3_omap *omap, u32 value) +{ + dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_0 - + omap->irq0_offset, value); +} + static void dwc3_omap_set_mailbox(struct dwc3_omap *omap, enum omap_dwc3_vbus_id_status status) { @@ -345,9 +357,23 @@ static void dwc3_omap_enable_irqs(struct dwc3_omap *omap) static void dwc3_omap_disable_irqs(struct dwc3_omap *omap) { + u32 reg; + /* disable all IRQs */ - dwc3_omap_write_irqmisc_set(omap, 0x00); - dwc3_omap_write_irq0_set(omap, 0x00); + reg = USBOTGSS_IRQO_COREIRQ_ST; + dwc3_omap_write_irq0_clr(omap, reg); + + reg = (USBOTGSS_IRQMISC_OEVT | + USBOTGSS_IRQMISC_DRVVBUS_RISE | + USBOTGSS_IRQMISC_CHRGVBUS_RISE | + USBOTGSS_IRQMISC_DISCHRGVBUS_RISE | + USBOTGSS_IRQMISC_IDPULLUP_RISE | + USBOTGSS_IRQMISC_DRVVBUS_FALL | + USBOTGSS_IRQMISC_CHRGVBUS_FALL | + USBOTGSS_IRQMISC_DISCHRGVBUS_FALL | + USBOTGSS_IRQMISC_IDPULLUP_FALL); + + dwc3_omap_write_irqmisc_clr(omap, reg); } static u64 dwc3_omap_dma_mask = DMA_BIT_MASK(32); -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/5] Documentation/ABI: Add file describing the sysfs entries for toshiba_acpi
On Tue, Feb 10, 2015 at 11:43:57PM -0700, Azael Avalos wrote: > This patch adds a new file describing the sysfs entries for the > toshiba_acpi driver. > +linux-api list I've queued this for 3.20 through platform-drivers-x86. Any objections? > Signed-off-by: Azael Avalos > --- > .../ABI/testing/sysfs-driver-toshiba_acpi | 114 > + > 1 file changed, 114 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-driver-toshiba_acpi > > diff --git a/Documentation/ABI/testing/sysfs-driver-toshiba_acpi > b/Documentation/ABI/testing/sysfs-driver-toshiba_acpi > new file mode 100644 > index 000..ca9c71a > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-driver-toshiba_acpi > @@ -0,0 +1,114 @@ > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_backlight_mode > +Date:June 8, 2014 > +KernelVersion: 3.15 > +Contact: Azael Avalos > +Description: This file controls the keyboard backlight operation mode, valid > + values are: > + * 0x1 -> FN-Z > + * 0x2 -> AUTO (also called TIMER) > + * 0x8 -> ON > + * 0x10 -> OFF > + Note that the kernel 3.16 onwards this file accepts all listed > + parameters, kernel 3.15 only accepts the first two (FN-Z and > + AUTO). > +Users: KToshiba > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_backlight_timeout > +Date:June 8, 2014 > +KernelVersion: 3.15 > +Contact: Azael Avalos > +Description: This file controls the timeout of the keyboard backlight > + whenever the operation mode is set to AUTO (or TIMER), > + valid values range from 0-60. > + Note that the kernel 3.15 only had support for the first > + keyboard type, the kernel 3.16 added support for the second > + type and the range accepted for type 2 is 1-60. > + See the entry named "kbd_type" > +Users: KToshiba > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/position > +Date:June 8, 2014 > +KernelVersion: 3.15 > +Contact: Azael Avalos > +Description: This file shows the absolute position of the built-in > + accelereometer. > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/touchpad > +Date:June 8, 2014 > +KernelVersion: 3.15 > +Contact: Azael Avalos > +Description: This files controls the status of the touchpad and pointing > + stick (if available), valid values are: > + * 0 -> OFF > + * 1 -> ON > +Users: KToshiba > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/available_kbd_modes > +Date:August 3, 2014 > +KernelVersion: 3.16 > +Contact: Azael Avalos > +Description: This file shows the supported keyboard backlight modes > + the system supports, which can be: > + * 0x1 -> FN-Z > + * 0x2 -> AUTO (also called TIMER) > + * 0x8 -> ON > + * 0x10 -> OFF > + Note that not all keyboard types support the listed modes. > + See the entry named "available_kbd_modes" > +Users: KToshiba > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_type > +Date:August 3, 2014 > +KernelVersion: 3.16 > +Contact: Azael Avalos > +Description: This file shows the current keyboard backlight type, > + which can be: > + * 1 -> Type 1, supporting modes FN-Z and AUTO > + * 2 -> Type 2, supporting modes TIMER, ON and OFF > +Users: KToshiba > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/version > +Date:February, 2015 > +KernelVersion: 3.20 > +Contact: Azael Avalos > +Description: This file shows the current version of the driver > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/fan > +Date:February, 2015 > +KernelVersion: 3.20 > +Contact: Azael Avalos > +Description: This file controls the state of the internal fan, valid > + values are: > + * 0 -> OFF > + * 1 -> ON > + > +What: > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_function_keys > +Date:February, 2015 > +KernelVersion: 3.20 > +Contact: Azael Avalos > +Description: This file controls the Special Functions (hotkeys) operation > + mode, valid values are: > + * 0 -> N
Re: [PATCH 2/5] Documentation/ABI: Add file describing the sysfs entries for toshiba_acpi
Hi Darren, 2015-02-11 22:38 GMT-07:00 Darren Hart : > On Tue, Feb 10, 2015 at 11:43:57PM -0700, Azael Avalos wrote: >> This patch adds a new file describing the sysfs entries for the >> toshiba_acpi driver. >> > > +linux-api list Just CC me, because I'm not subscribed to that list, in case something needs to be changed. > > I've queued this for 3.20 through platform-drivers-x86. Any objections? Not at all, and given that this patch is managed on another list, let's see if there are any problems with this file. Cheers Azael > > >> Signed-off-by: Azael Avalos >> --- >> .../ABI/testing/sysfs-driver-toshiba_acpi | 114 >> + >> 1 file changed, 114 insertions(+) >> create mode 100644 Documentation/ABI/testing/sysfs-driver-toshiba_acpi >> >> diff --git a/Documentation/ABI/testing/sysfs-driver-toshiba_acpi >> b/Documentation/ABI/testing/sysfs-driver-toshiba_acpi >> new file mode 100644 >> index 000..ca9c71a >> --- /dev/null >> +++ b/Documentation/ABI/testing/sysfs-driver-toshiba_acpi >> @@ -0,0 +1,114 @@ >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_backlight_mode >> +Date:June 8, 2014 >> +KernelVersion: 3.15 >> +Contact: Azael Avalos >> +Description: This file controls the keyboard backlight operation mode, valid >> + values are: >> + * 0x1 -> FN-Z >> + * 0x2 -> AUTO (also called TIMER) >> + * 0x8 -> ON >> + * 0x10 -> OFF >> + Note that the kernel 3.16 onwards this file accepts all listed >> + parameters, kernel 3.15 only accepts the first two (FN-Z and >> + AUTO). >> +Users: KToshiba >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_backlight_timeout >> +Date:June 8, 2014 >> +KernelVersion: 3.15 >> +Contact: Azael Avalos >> +Description: This file controls the timeout of the keyboard backlight >> + whenever the operation mode is set to AUTO (or TIMER), >> + valid values range from 0-60. >> + Note that the kernel 3.15 only had support for the first >> + keyboard type, the kernel 3.16 added support for the second >> + type and the range accepted for type 2 is 1-60. >> + See the entry named "kbd_type" >> +Users: KToshiba >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/position >> +Date:June 8, 2014 >> +KernelVersion: 3.15 >> +Contact: Azael Avalos >> +Description: This file shows the absolute position of the built-in >> + accelereometer. >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/touchpad >> +Date:June 8, 2014 >> +KernelVersion: 3.15 >> +Contact: Azael Avalos >> +Description: This files controls the status of the touchpad and pointing >> + stick (if available), valid values are: >> + * 0 -> OFF >> + * 1 -> ON >> +Users: KToshiba >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/available_kbd_modes >> +Date:August 3, 2014 >> +KernelVersion: 3.16 >> +Contact: Azael Avalos >> +Description: This file shows the supported keyboard backlight modes >> + the system supports, which can be: >> + * 0x1 -> FN-Z >> + * 0x2 -> AUTO (also called TIMER) >> + * 0x8 -> ON >> + * 0x10 -> OFF >> + Note that not all keyboard types support the listed modes. >> + See the entry named "available_kbd_modes" >> +Users: KToshiba >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/kbd_type >> +Date:August 3, 2014 >> +KernelVersion: 3.16 >> +Contact: Azael Avalos >> +Description: This file shows the current keyboard backlight type, >> + which can be: >> + * 1 -> Type 1, supporting modes FN-Z and AUTO >> + * 2 -> Type 2, supporting modes TIMER, ON and OFF >> +Users: KToshiba >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/version >> +Date:February, 2015 >> +KernelVersion: 3.20 >> +Contact: Azael Avalos >> +Description: This file shows the current version of the driver >> + >> +What: >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/fan >> +Date:February, 2015 >> +KernelVersion: 3.20 >> +Contact: Azael Avalos >> +Description: This file controls the state of the internal fan, valid >> + values are: >> + * 0 ->
Re: [PATCH 0/5] toshiba_acpi: Clean file plus some function renames
On Tue, Feb 10, 2015 at 11:43:55PM -0700, Azael Avalos wrote: > These patches are simply "cleaning" the file, making it more readable > and in the process, make it comply according to coding style. > > --->8--- > Darren, > > I'm sending these patches now and let you decide if you want them for > 3.20 as the merge window is still open or queue them up for 3.21 :-) Queued, thanks. -- Darren Hart Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support
This manpage patch relates to the addition of PERF_SAMPLE_REGS_INTR support added in the following commit: perf_sample_regs_intr; Linux 3.19 commit 60e2364e60e86e81bc6377f49779779e6120977f Author: Stephane Eranian perf: Add ability to sample machine state on interrupt Reviewed-by: Jiri Olsa Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: cebbert.l...@gmail.com Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: linux-...@vger.kernel.org Link: http://lkml.kernel.org/r/1411559322-16548-2-git-send-email-eran...@google.com Signed-off-by: Ingo Molnar >From what I can tell the primary difference between PERF_SAMPLE_REGS_INTR and the existing PERF_SAMPLE_REGS_USER is that the new support will return kernel register values (I assume that's not some sort of info leak?). In theory also when precise_ip is set high enough you should get the PEBS register state rather than the PMU interrupt register state, but I was unable to construct a test case on a Haswell system where I got different values with precise_ip=0, precise_ip=2, or by using PERF_SAMPLE_REGS_USER instead. Am I missing something about how to use this new interface? Signed-off-by: Vince Weaver diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index 39c8d8c..ca03928 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -256,7 +256,7 @@ struct perf_event_attr { __u32 sample_stack_user;/* size of stack to dump on samples */ __u32 __reserved_2; /* Align to u64 */ - +__u64 sample_regs_intr; /* regs to dump on samples */ }; .fi .in @@ -350,6 +350,11 @@ and .I sample_stack_user in Linux 3.7. .\" commit 1659d129ed014b715b0b2120e6fd929bdd33ed03 +.B PERF_ATTR_SIZE_VER4 +is 104 corresponding to the addition of +.I sample_regs_intr +in Linux 3.19. +.\" commit 60e2364e60e86e81bc6377f49779779e6120977f .TP .I "config" This specifies which event you want, in conjunction with @@ -752,6 +757,23 @@ event must be measured or no values will be recorded. Also note that some perf_event measurements, such as sampled cycle counting, may cause extraneous aborts (by causing an interrupt during a transaction). +.TP +.BR PERF_SAMPLE_REGS_INTR " (since Linux 3.19)" +.\" commit 60e2364e60e86e81bc6377f49779779e6120977f +Records a subset of the current CPU register state +as specified by +.IR sample_regs_intr . +Unlike +.B PERF_SAMPLE_REGS_USER +the register values will return kernel register +state if the overflow happened while kernel +code is running. +If the CPU supports hardware sampling of +register state (as does PEBS on x86) and +.I precise_ip +is set higher than zero then the register +values returned are those captured by +hardware. .RE .TP .IR "read_format" @@ -1855,6 +1877,9 @@ struct { u64 weight; /* if PERF_SAMPLE_WEIGHT */ u64 data_src; /* if PERF_SAMPLE_DATA_SRC */ u64 transaction;/* if PERF_SAMPLE_TRANSACTION */ +u64 abi;/* if PERF_SAMPLE_REGS_INTR */ +u64 regs[weight(mask)]; + /* if PERF_SAMPLE_REGS_INTR */ }; .fi .RS 4 @@ -2242,6 +2267,27 @@ the high 32 bits of the field by shifting right by .B PERF_TXN_ABORT_SHIFT and masking with .BR PERF_TXN_ABORT_MASK . +.TP +.IR abi ", " regs[weight(mask)] +If +.B PERF_SAMPLE_REGS_INTR +is enabled, then the user CPU registers are recorded. + +The +.I abi +field is one of +.BR PERF_SAMPLE_REGS_ABI_NONE ", " PERF_SAMPLE_REGS_ABI_32 " or " +.BR PERF_SAMPLE_REGS_ABI_64 . + +The +.I regs +field is an array of the CPU registers that were specified by +the +.I sample_regs_intr +attr field. +The number of values is the number of bits set in the +.I sample_regs_intr +bit mask. .RE .TP .B PERF_RECORD_MMAP2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH][v3.2 stable tree] dcache: Balance rcu_read_lock in have_submounts()
On Wed, 11 Feb 2015 03:15:37 + Ben Hutchings wrote: > I've reviewed locking contexts in all three functions that I changed > when backporting "deal with deadlock in d_walk()". It's actually worse > than you say: > > - We don't hold this_parent->d_lock at the 'positive' label in > have_submounts(), but it is unlocked after 'rename_retry'. > - There is an rcu_read_unlock() after the 'out' label in > select_parent(), but it's not held at the 'goto out'. > > Does the following patch work for you? I booted the original 3.2 kernel 3 times and it succeeded once, and crashed the other two. I applied this patch and booted it 5 times, and it succeeded every time. I removed the patch, and it crashed on the very next boot. Thus, I'd say it seems to have fixed the issue for me. Tested-by: Steven Rostedt -- Steve > > Ben. > > --- a/fs/dcache.c > +++ b/fs/dcache.c > @@ -1035,7 +1035,7 @@ ascend: > return 0; /* No mount points found in tree */ > positive: > if (!locked && read_seqretry(&rename_lock, seq)) > - goto rename_retry; > + goto rename_retry_unlocked; > if (locked) > write_sequnlock(&rename_lock); > return 1; > @@ -1045,6 +1045,7 @@ rename_retry: > rcu_read_unlock(); > if (locked) > goto again; > +rename_retry_unlocked: > locked = 1; > write_seqlock(&rename_lock); > goto again; > @@ -1109,6 +1110,7 @@ resume: >*/ > if (found && need_resched()) { > spin_unlock(&dentry->d_lock); > + rcu_read_lock(); > goto out; > } > > --- END --- > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/3] Silence "OPAL called with invalid token" errors
If OPAL firmware is called with an invalid token, that is, one that the current running firmware does not support, it dumps an error into its log. For three calls we were making in Linux, we were not adequately checking that the current firmware supported them, so could get this warning spuriously. Stewart Smith (3): powerpc/powernv: only register log if OPAL supports doing so powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it arch/powerpc/platforms/powernv/opal-dump.c |3 ++- arch/powerpc/platforms/powernv/opal-elog.c |3 ++- arch/powerpc/platforms/powernv/opal.c |6 +- 3 files changed, 9 insertions(+), 3 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/3] powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it
Otherwise firmware complains: "OPAL: Called with bad token 74 !" as not all OPAL systems have the ability to resend error logs. Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-elog.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c index 518fe95..38ce757 100644 --- a/arch/powerpc/platforms/powernv/opal-elog.c +++ b/arch/powerpc/platforms/powernv/opal-elog.c @@ -313,7 +313,8 @@ int __init opal_elog_init(void) } /* We are now ready to pull error logs from opal. */ - opal_resend_pending_logs(); + if (opal_check_token(OPAL_ELOG_RESEND)) + opal_resend_pending_logs(); return 0; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/