Re: [PATCH 1/4] clk: propagate parent change up one level

2014-06-18 Thread Tomasz Stanislawski
Hi Mike, Do you have any comments about this patch? The patch is needed to provide a clean fix for recently broken support for HDMI on Exynos4210 SoC in mainline. Regards, Tomasz Stanislawski On 05/01/2014 12:19 AM, Tomasz Figa wrote: > Mike, > > On 08.04.2014 17:45, Tomasz Figa wro

Re: [PATCHv2 1/3] phy: Add exynos-simple-phy driver

2014-05-07 Thread Tomasz Stanislawski
er, there was a very strong opposition from DT maintainers to adding any bit related configuration to DT. The current solution was designed to be a trade-off between being generic and being accepted :). Regards, Tomasz Stanislawski >> Cheers >> Kishon > -- To unsubscribe fr

Re: [PATCH 0/2] Add support for sii9234 chip

2014-05-05 Thread Tomasz Stanislawski
On 05/04/2014 01:17 AM, Greg KH wrote: > On Fri, Apr 11, 2014 at 01:48:28PM +0200, Tomasz Stanislawski wrote: >> Hi everyone, >> This patchset adds support for sii9234 HD Mobile Link Bridge. The chip is >> used >> to convert HDMI signal into MHL. The driver enabl

Re: [PATCHv2 1/3] phy: Add exynos-simple-phy driver

2014-04-30 Thread Tomasz Stanislawski
Hi Rahul, I will prepare we v3 version. Do you want me to add your patches for exynos5?50 to the patchset? Regards, Tomasz Stanislawski On 04/30/2014 08:37 AM, Rahul Sharma wrote: > Hi Tomasz, > > I have tested your patches for exynos5250 and 5420. Works fine. Are > you planning to

[PATCH] arm: dts: exynos4: add missing pinctrls for I2C controllers

2014-04-16 Thread Tomasz Stanislawski
This patch adds missing pinctrls for I2C controllers 2-7. Signed-off-by: Tomasz Stanislawski --- arch/arm/boot/dts/exynos4.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 0401f4d..288aa81 100644 --- a

[PATCH] arm: dts: exynos4412-trats2: rename alias for i2c_ak8975 label

2014-04-15 Thread Tomasz Stanislawski
The i2c_ak8975 controler uses label i2c8. This alias is already used for I2C controller 8 defined in file arch/arm/boot/dts/exynos4.dtsi. This patch renames a label for i2c_ak8975 to i2c9. Signed-off-by: Tomasz Stanislawski --- arch/arm/boot/dts/exynos4412-trats2.dts |2 +- 1 file changed

[PATCH 0/2] Add support for sii9234 chip

2014-04-11 Thread Tomasz Stanislawski
re welcome. Regards, Tomasz Stanislawski References: [1] https://github.com/junpei0824/SC02C-linux/tree/master-jelly-cm-aokp/drivers/media/video/mhl Tomasz Stanislawski (2): misc: add sii9234 driver arm: dts: trats2: add SiI9234 node Documentation/devicetree/bindings/sii9234.txt | 22 +

[PATCH 1/2] misc: add sii9234 driver

2014-04-11 Thread Tomasz Stanislawski
Add driver for HDMI bridge using MHL connection. Contains refactored code for MHL driver developed by: Adam Hampson Erik Gilling Shankar Bandal Dharam Kumar Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park --- Documentation/devicetree/bindings/sii9234.txt | 22 + drivers

[PATCH 2/2] arm: dts: trats2: add SiI9234 node

2014-04-11 Thread Tomasz Stanislawski
This patch adds configuration of SiI9234 bridge to Trats2 board. Signed-off-by: Tomasz Stanislawski --- arch/arm/boot/dts/exynos4412-trats2.dts | 43 +++ 1 file changed, 43 insertions(+) diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts

Re: [PATCHv2 1/3] phy: Add exynos-simple-phy driver

2014-04-09 Thread Tomasz Stanislawski
Hi Rahul, On 04/09/2014 11:12 AM, Rahul Sharma wrote: > Hi Tomasz, > > On 9 April 2014 14:07, Andrzej Hajda wrote: >> Hi Tomasz, >> >> On 04/08/2014 04:37 PM, Tomasz Stanislawski wrote: >>> Add exynos-simple-phy driver to support a single register >&

Re: [PATCHv2 2/3] drm: exynos: hdmi: use hdmiphy as PHY

2014-04-09 Thread Tomasz Stanislawski
used as far as I know. Regards, Tomasz Stanislawski On 04/09/2014 12:30 PM, Andrzej Hajda wrote: > Hi Tomasz, > > On 04/08/2014 04:37 PM, Tomasz Stanislawski wrote: >> The HDMIPHY (physical interface) is controlled by a single >> bit in a power controller's regiter. It w

[PATCHv2 3/3] s5p-tv: hdmi: use hdmiphy as PHY

2014-04-08 Thread Tomasz Stanislawski
The HDMIPHY (physical interface) is controlled by a single bit in a power controller's regiter. It was implemented as clock. It was a simple but effective hack. This patch makes S5P-HDMI driver to control HDMIPHY via PHY interface. Signed-off-by: Tomasz Stanislawski --- drivers/media/pla

[PATCHv2 0/3] phy: Add exynos-simple-phy driver

2014-04-08 Thread Tomasz Stanislawski
el.samsung-soc/28617/focus=28648 * create a dedicated power domain for hdmiphy Regards, Tomasz Stanislawski Changelog: v2: * rename to exynos-simple-phy * fix usage of devm_ioremap() * add documentation for DT bindings * add patches to client drivers v1: ini

[PATCHv2 1/3] phy: Add exynos-simple-phy driver

2014-04-08 Thread Tomasz Stanislawski
Add exynos-simple-phy driver to support a single register PHY interfaces present on Exynos4 SoC. Signed-off-by: Tomasz Stanislawski --- .../devicetree/bindings/phy/samsung-phy.txt| 24 +++ drivers/phy/Kconfig|5 + drivers/phy/Makefile

[PATCHv2 2/3] drm: exynos: hdmi: use hdmiphy as PHY

2014-04-08 Thread Tomasz Stanislawski
The HDMIPHY (physical interface) is controlled by a single bit in a power controller's regiter. It was implemented as clock. It was a simple but effective hack. This patch makes HDMI driver to control HDMIPHY via PHY interface. Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/e

[PATCH 1/4] clk: propagate parent change up one level

2014-04-04 Thread Tomasz Stanislawski
lly, this patch adds CLK_SET_PARENT_PARENT (sorry for naming) flag to inform clk-core that clk_set_parent() should be propagated. Signed-off-by: Tomasz Stanislawski --- drivers/clk/clk.c|6 ++ include/linux/clk-provider.h |1 + 2 files changed, 7 insertions(+) diff --git a/drivers/clk

[PATCH 4/4] Revert "drm/exynos: add mout_hdmi clock in hdmi driver to change parent"

2014-04-04 Thread Tomasz Stanislawski
This reverts commit 59956d35a8618235ea715280b49447bb36f2c975. Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos

[PATCH 2/4] clk: exynos4: export sclk_hdmiphy clock

2014-04-04 Thread Tomasz Stanislawski
Export sclk_hdmiphy clock to be usable from DT. Signed-off-by: Tomasz Stanislawski --- drivers/clk/samsung/clk-exynos4.c |2 +- include/dt-bindings/clock/exynos4.h |1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk

[PATCH 3/4] clk: exynos4: enable clk_set_parent() propagation for sclk_hdmi and sclk_mixer clocks

2014-04-04 Thread Tomasz Stanislawski
This patch enables clk_set_parent() propagation for clocks used by s5p-tv and exynos-drm drivers. Signed-off-by: Tomasz Stanislawski --- drivers/clk/samsung/clk-exynos4.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers

[PATCH 0/4] Update to Exynos clocks

2014-04-04 Thread Tomasz Stanislawski
s clock directly and clk_set_parent() is propagated to mout_hdmi. This new behaviour does not break DT bindings because mout_hdmi would be simply ignored. After this change the 'add mout_hdmi clock' is no longer needed. Regards, Tomasz Stanislawski Tomasz Stanislawski (4): clk: propagate pa

[PATCH] phy: Add exynos-phy driver

2013-11-27 Thread Tomasz Stanislawski
Add exynos-phy driver to support a single register PHY interfaces present on Exynos4 SoC. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park --- drivers/phy/Kconfig |5 ++ drivers/phy/Makefile |1 + drivers/phy/exynos-phy.c | 152

[PATCH] phy: Add exynos-phy driver

2013-11-27 Thread Tomasz Stanislawski
d driver that export clocks/phys/etc that are controlled by PMU unit. Regards, Tomasz Stanislawski Tomasz Stanislawski (1): phy: Add exynos-phy driver drivers/phy/Kconfig |5 ++ drivers/phy/Makefile |1 + drivers/phy/exynos-phy.c | 152 +++

[PATCH] clk: propagate parent change up one level

2013-11-20 Thread Tomasz Stanislawski
lly, this patch adds CLK_SET_PARENT_PARENT (sorry for naming) flag to inform clk-core that clk_set_parent() should be propagated. Signed-off-by: Tomasz Stanislawski --- drivers/clk/clk.c|6 ++ include/linux/clk-provider.h |1 + 2 files changed, 7 insertions(+) diff --git a/drivers/clk

Re: [RFC 04/12] phy: Add simple-phy driver

2013-10-25 Thread Tomasz Stanislawski
Hi, Please refer to the comments below. On 10/24/2013 05:52 PM, Kishon Vijay Abraham I wrote: > Hi, > > On Monday 21 October 2013 07:48 PM, Tomasz Stanislawski wrote: >> Add simple-phy driver to support a single register >> PHY interfaces present on Exynos4 SoC. > > H

[RFC 05/12] phy: use of_phy_simple_xlate for NULL xlate function

2013-10-21 Thread Tomasz Stanislawski
Use default handler of_phy_simple_xlate() when NULL is passed as argument to of_phy_provider_register(). Signed-off-by: Tomasz Stanislawski --- drivers/phy/phy-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index

[RFC 03/12] clk: exynos4: enable clk_set_parent() propagation for sclk_hdmi and sclk_mixer clocks

2013-10-21 Thread Tomasz Stanislawski
This patch enables clk_set_parent() propagation for clocks used by s5p-tv and exynos-drm drivers. Signed-off-by: Tomasz Stanislawski --- drivers/clk/samsung/clk-exynos4.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers

[RFC 08/12] drm: exynos: hdmi: simplify extracting hpd-gpio from DT

2013-10-21 Thread Tomasz Stanislawski
This patch eliminates redundant checks while retrieving HPD gpio from DT during HDMI's probe(). Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi

[RFC 07/12] drm: exynos: hdmi: use hdmiphy as PHY

2013-10-21 Thread Tomasz Stanislawski
The HDMIPHY (physical interface) is controlled by a single bit in a power controller's regiter. It was implemented as clock. It was a simple but effective hack. This patch makes HDMI driver to control HDMIPHY via PHY interface. Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/e

[RFC 06/12] Revert "drm/exynos: add mout_hdmi clock in hdmi driver to change parent"

2013-10-21 Thread Tomasz Stanislawski
This reverts commit 59956d35a8618235ea715280b49447bb36f2c975. --- drivers/gpu/drm/exynos/exynos_hdmi.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index a0e10ae..fcfa23a 100644 --

[RFC 11/12] arm: dts: exynos4: add HDMI devices

2013-10-21 Thread Tomasz Stanislawski
This patch adds DT nodes for HDMI related devices on SoCs from Exynos4 family. Signed-off-by: Tomasz Stanislawski --- arch/arm/boot/dts/exynos4.dtsi| 27 +++ arch/arm/boot/dts/exynos4210.dtsi |4 2 files changed, 31 insertions(+) diff --git a/arch/arm

[RFC 09/12] drm: exynos: add compatibles for HDMI and Mixer chips and exynos4210 SoC

2013-10-21 Thread Tomasz Stanislawski
This patch add proper compatibles for Mixer and HDMI chip available on exynos4210 SoCs. Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/exynos/exynos_hdmi.c |3 +++ drivers/gpu/drm/exynos/exynos_mixer.c |3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm

[RFC 12/12] arm: dts: universal_c210: add HDMI devices

2013-10-21 Thread Tomasz Stanislawski
This patch adds configuration of HDMI devices on Universal C210 board. Signed-off-by: Tomasz Stanislawski --- arch/arm/boot/dts/exynos4210-universal_c210.dts | 53 +++ 1 file changed, 53 insertions(+) diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch

[RFC 10/12] arm: dts: exynos4: add i2c controller for HDMIPHY

2013-10-21 Thread Tomasz Stanislawski
This patch adds DT nodes for I2C controller dedicated for HDMIPHY. Signed-off-by: Tomasz Stanislawski --- arch/arm/boot/dts/exynos4.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index caadc02..a5f6b8b

[RFC 04/12] phy: Add simple-phy driver

2013-10-21 Thread Tomasz Stanislawski
Add simple-phy driver to support a single register PHY interfaces present on Exynos4 SoC. Signed-off-by: Tomasz Stanislawski --- drivers/phy/Kconfig |5 ++ drivers/phy/Makefile |1 + drivers/phy/phy-simple.c | 128 ++ 3 files changed

[RFC 01/12] clk: propagate parent change up one level

2013-10-21 Thread Tomasz Stanislawski
lly, this patch adds CLK_SET_PARENT_PARENT (sorry for naming) flag to inform clk-core that clk_set_parent() should be propagated. Signed-off-by: Tomasz Stanislawski --- drivers/clk/clk.c|6 ++ include/linux/clk-provider.h |1 + 2 files changed, 7 insertions(+) diff --git a/drivers/clk

[RFC 02/12] clk: exynos4: export sclk_hdmiphy clock

2013-10-21 Thread Tomasz Stanislawski
Export sclk_hdmiphy clock to be usable from DT. Signed-off-by: Tomasz Stanislawski --- .../devicetree/bindings/clock/exynos4-clock.txt|1 + drivers/clk/samsung/clk-exynos4.c |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation

[RFC 00/12] Add DRM Exynos HDMI on SoCs from Exynos4 family

2013-10-21 Thread Tomasz Stanislawski
latform register. This situation is very common in Exynos SoCs. The current version supports only one phy per node. The code might be modified to support multiple phys from single simple-phy provider to avoid creation of multiple nodes in DT. All comments are welcome. Regards, Tomasz Stanislawsk

[PATCH] klist: fix a typo in klist_iter_init()

2013-10-01 Thread Tomasz Stanislawski
>From c8e5d14b1e7a010695d87b60759aeeacdf9e599a Mon Sep 17 00:00:00 2001 From: Tomasz Stanislawski Date: Tue, 1 Oct 2013 10:34:35 +0200 Subject: [PATCH] klist: fix a typo in klist_iter_init() Fix a typo in comments for klist_iter_init(). Signed-off-by: Tomasz Stanislawski --- lib/klis

Re: [PATCH v2 0/5] mm: migrate zbud pages

2013-09-27 Thread Tomasz Stanislawski
On 09/25/2013 11:57 PM, Seth Jennings wrote: > On Wed, Sep 25, 2013 at 07:09:50PM +0200, Tomasz Stanislawski wrote: >>> I just had an idea this afternoon to potentially kill both these birds with >>> one >>> stone: Replace the rbtree in zswap with an address_space

Re: [PATCH v2 0/5] mm: migrate zbud pages

2013-09-25 Thread Tomasz Stanislawski
are two swap offset pointing to the same page. There might be more if zsmalloc is used. What is worse it is possible that one swap entry could point to data that cross a page boundary. Of course, one could try to modify MM to support multiple mapping of a page in the radix tree. But I think that MM

Re: [PATCH v5 4/4] media: s5p-tv: Fix mixer driver to work with CCF

2013-09-25 Thread Tomasz Stanislawski
> didn`t support it. > Without it Common Clock Framework prints a warning. > > Signed-off-by: Mateusz Krawczuk > Signed-off-by: Kyungmin Park Acked-by: Tomasz Stanislawski > --- > drivers/media/platform/s5p-tv/mixer_drv.c | 34 > +-- >

Re: [PATCH v5 3/4] media: s5p-tv: Fix sdo driver to work with CCF

2013-09-25 Thread Tomasz Stanislawski
Rename to 'media: s5p-tv: sdo: integrate with CCF' On 09/21/2013 05:00 PM, Mateusz Krawczuk wrote: > Replace clk_enable by clock_enable_prepare and clk_disable with > clk_disable_unprepare. > Clock prepare is required by Clock Common Framework, and old clock driver > didn`t support it. > Without

Re: [PATCH v5 2/4] media: s5p-tv: Restore vpll clock rate

2013-09-25 Thread Tomasz Stanislawski
Hi, As you can see sdo, hdmi and mixer are saparate drivers that are parts of s5p-tv drivers set. Could you rename commit name to 'media: s5p-tv: sdo: Restore vpll clock rate after streamoff' On 09/21/2013 05:00 PM, Mateusz Krawczuk wrote: > Restore vpll clock rate if start stream fail or stream

Re: [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_

2013-09-24 Thread Tomasz Stanislawski
On 09/23/2013 07:44 PM, Joe Perches wrote: > On Mon, 2013-09-23 at 17:48 +0200, Bartlomiej Zolnierkiewicz wrote: >> On Monday, September 23, 2013 04:50:01 PM Tomasz Stanislawski wrote: >>> May I ask what is the rationale for this patch? >>> To reduce a few lines of code?

Re: [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_

2013-09-24 Thread Tomasz Stanislawski
Hi, On 09/23/2013 05:48 PM, Bartlomiej Zolnierkiewicz wrote: > > Hi Tomasz, > > On Monday, September 23, 2013 04:50:01 PM Tomasz Stanislawski wrote: >> Hello, >> May I ask what is the rationale for this patch? >> To reduce a few lines of code? > > This patch

Re: [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_

2013-09-23 Thread Tomasz Stanislawski
Hello, May I ask what is the rationale for this patch? To reduce a few lines of code? Or to give up possibility of changing message format in just one place? I could see migrating from mxr_* to pr_* could seen as the fix, but not this. Waiting for reply, Tomasz Stanislawski On 09/21/2013 05:00

Re: [RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-08-02 Thread Tomasz Stanislawski
On 08/02/2013 01:58 AM, Casey Schaufler wrote: > On 6/27/2013 2:11 PM, Casey Schaufler wrote: >> On 6/11/2013 5:55 AM, Tomasz Stanislawski wrote: >>> This patch adds a hash table to quicken searching of a smack label by its >>> name. >>> >>> Basic

[PATCH 0/4] Optimizations for memory handling in SMACK

2013-06-19 Thread Tomasz Stanislawski
ind this patchset useful. All comments are welcome. Regards, Tomasz Stanislawski. Changelog: v1: - post 'fix memleak in smk_write_rules_list() as a separate patch' - prepare performance measurements - remove stack allocations for a rule string, use kmalloc() [1] http://en.it-usenet.or

[PATCH 1/4] security: smack: limit a length for a rule string in the long format

2013-06-19 Thread Tomasz Stanislawski
and it is very likely to fail. Signed-off-by: Tomasz Stanislawski --- security/smack/smackfs.c |5 + 1 file changed, 5 insertions(+) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 08aebc2..5dcd520 100644 --- a/security/smack/smackfs.c +++ b/security/smack

[PATCH 3/4] security: smack: add kmem_cache for smack_rule allocations

2013-06-19 Thread Tomasz Stanislawski
-byte-long chunks according to ksize(). This reduces amount of used memory by 25%. Signed-off-by: Tomasz Stanislawski --- security/smack/smack.h |3 +++ security/smack/smack_lsm.c | 11 ++- security/smack/smackfs.c |2 +- 3 files changed, 14 insertions(+), 2 deletions

[PATCH 2/4] security: smack: avoid kmalloc() in smk_parse_long_rule()

2013-06-19 Thread Tomasz Stanislawski
smk_parse_substrings() function that parses a string into substring separated by whitespaces. The buffer for substring is preallocated. It must store substring the worst case scenario which is SMK_LOAD2LEN in case of long rule parsing. Signed-off-by: Tomasz Stanislawski --- security/smack/smackfs.c

[PATCH 4/4] security: smack: add kmem_cache for smack_master_list allocations

2013-06-19 Thread Tomasz Stanislawski
smack_master_list using 16-byte-long chunks according to ksize(). This reduces amount of used memory by 50%. Signed-off-by: Tomasz Stanislawski --- security/smack/smack.h |7 +++ security/smack/smack_lsm.c |8 security/smack/smackfs.c |8 ++-- 3 files changed, 17

[PATCH] security: smack: fix memleak in smk_write_rules_list()

2013-06-19 Thread Tomasz Stanislawski
>From 8497987bedf8821db3dce47a6205dfce2b0895c5 Mon Sep 17 00:00:00 2001 From: Tomasz Stanislawski Date: Thu, 6 Jun 2013 09:30:50 +0200 Subject: [PATCH] security: smack: fix memleak in smk_write_rules_list() The smack_parsed_rule structure is allocated. If a rule is successfully installed t

Re: [RFC 1/5] security: smack: avoid kmalloc allocations while loading a rule string

2013-06-17 Thread Tomasz Stanislawski
Hi Casey, Thank you for the review. Please refer to the comments below. On 06/15/2013 09:32 PM, Casey Schaufler wrote: > On 6/13/2013 8:29 AM, Tomasz Stanislawski wrote: >> The maximal length for a rule line for long format is introduced as >> SMK_LOAD2LEN. This allows a buffer fo

[RFC 0/5] Optimizations for memory handling in smk_write_rules_list()

2013-06-13 Thread Tomasz Stanislawski
ch for label hashing [1] is applied. I hope you find this patchset useful. Regards, Tomasz Stanislawski References: [1] http://thread.gmane.org/gmane.linux.kernel.lsm/19609 Tomasz Stanislawski (5): security: smack: avoid kmalloc allocations while loading a rule string security: smack

[RFC 2/5] security: smack: avoid kmalloc() in smk_parse_long_rule()

2013-06-13 Thread Tomasz Stanislawski
(). Signed-off-by: Tomasz Stanislawski --- security/smack/smackfs.c | 67 +++--- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 9a3cd0d..46f111e 100644 --- a/security/smack

[RFC 1/5] security: smack: avoid kmalloc allocations while loading a rule string

2013-06-13 Thread Tomasz Stanislawski
user calls write() for a very long chunk. Such an allocation often causes a lot swapper/writeback havoc and it is very likely to fails. Moreover, stack allocation is slightly faster than from kmalloc. Signed-off-by: Tomasz Stanislawski --- security/smack/smackfs.c | 15 ++- 1 file

[RFC 5/5] security: smack: add kmem_cache for smack_master_list allocations

2013-06-13 Thread Tomasz Stanislawski
smack_master_list using 16-byte-long chunks according to ksize(). This reduces amount of used memory by 50%. Signed-off-by: Tomasz Stanislawski --- security/smack/smack.h |7 +++ security/smack/smack_lsm.c |8 security/smack/smackfs.c |8 ++-- 3 files changed, 17

[RFC 3/5] security: smack: fix memleak in smk_write_rules_list()

2013-06-13 Thread Tomasz Stanislawski
: Tomasz Stanislawski --- security/smack/smackfs.c | 30 ++ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 46f111e..e8c57f3 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c

[RFC 4/5] security: smack: add kmem_cache for smack_rule allocations

2013-06-13 Thread Tomasz Stanislawski
-byte-long chunks according to ksize(). This reduces amount of used memory by 25%. Signed-off-by: Tomasz Stanislawski --- security/smack/smack.h |3 +++ security/smack/smack_lsm.c | 11 ++- security/smack/smackfs.c |2 +- 3 files changed, 14 insertions(+), 2 deletions

Re: [RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-06-12 Thread Tomasz Stanislawski
Hi Casey, Thank you for your review. Please refer to comments below. On 06/12/2013 07:11 AM, Casey Schaufler wrote: > On 6/11/2013 5:55 AM, Tomasz Stanislawski wrote: >> This patch adds a hash table to quicken searching of a smack label by its >> name. >> >> Ba

[RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-06-11 Thread Tomasz Stanislawski
- drop Dan Bernstein hash function in favor of more standard full_name_hash - adjust the number of hash slots basing on measurements Regards, Tomasz Stanislawski Tomasz Stanislawski (1): security: smack: add a hash table to quicken smk_find_entry() security/smack/smack.h|5 + secu

[RFCv2] security: smack: add a hash table to quicken smk_find_entry()

2013-06-11 Thread Tomasz Stanislawski
.693 | 0.666 | 0.653 | 0.641 | 0.633 | 0.630 | 0.627 Surprisingly, a single hlist is slightly faster than a double-linked list. The speed-up saturates near 64 slots. Therefore I chose value 128 to provide some margin if more labels were used. It looks that IO becomes a new bottleneck. Signed-off-by:

[RFC] security: smack: add hash table for smack for quick label searching

2013-04-11 Thread Tomasz Stanislawski
additional 4kiB memory for the hash table. Signed-off-by: Tomasz Stanislawski --- security/smack/smack.h|5 + security/smack/smack_access.c | 33 +++-- security/smack/smack_lsm.c| 21 +++-- 3 files changed, 51 insertions(+), 8

[RFC] security: smack: add hash table for smack for quick label searching

2013-04-11 Thread Tomasz Stanislawski
_entry overhead was reduced to mere 0.05% of CPU cycles. I hope you find the measurement and the patch useful. All comments are welcome. Regards, Tomasz Stanislawski Tomasz Stanislawski (1): security: smack: add hash table for smack for quick label searching security/smack/smack.

Re: [PATCH v2] drivers/media/platform/s5p-tv/sdo_drv.c: fix error return code

2012-09-24 Thread Tomasz Stanislawski
s > follows: (http://coccinelle.lip6.fr/) > > // > ( > if@p1 (\(ret < 0\|ret != 0\)) > { ... return ret; } > | > ret@p1 = 0 > ) > ... when != ret = e1 > when != &ret > *if(...) > { > ... when != ret = e2 > when forall > return ret;

Re: [PATCH v2 1/2] dma-buf: add reference counting for exporter module

2012-08-09 Thread Tomasz Stanislawski
Hi Greg, On 08/09/2012 04:23 PM, Greg KH wrote: > On Thu, Aug 09, 2012 at 11:36:21AM +0200, Tomasz Stanislawski wrote: >> This patch adds reference counting on a module that exported dma-buf and >> implements its operations. This prevents the module from being unloaded while >&

[PATCH v2 2/2] drm: set owner field to for all DMABUF exporters

2012-08-09 Thread Tomasz Stanislawski
This patch sets owner field in DMABUF operations for all DMABUF exporters in DRM subsystem. This prevents an exporting module from being unloaded while exported DMABUF descriptor is in use. Signed-off-by: Tomasz Stanislawski Acked-by: Sumit Semwal Acked-by: Daniel Vetter --- drivers/gpu/drm

[PATCH v2 1/2] dma-buf: add reference counting for exporter module

2012-08-09 Thread Tomasz Stanislawski
This patch adds reference counting on a module that exported dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in use. Signed-off-by: Tomasz Stanislawski Acked-by: Sumit Semwal Acked-by: Daniel Vetter CC: linux-...@vger.kernel.org

[PATCH v2 0/2] Enhance DMABUF with reference counting for exporter module

2012-08-09 Thread Tomasz Stanislawski
Hello, This patchset adds reference counting for an exporter module to DMABUF framework. Moreover, it adds setup of an owner field for exporters in DRM subsystem. v1: Original v2: - split patch into DMABUF and DRM part - allow owner to be NULL Regards, Tomasz Stanislawski Tomasz

Re: [PATCH] dma-buf: add reference counting for exporter module

2012-08-08 Thread Tomasz Stanislawski
Hi Laurent, On 08/08/2012 03:35 PM, Laurent Pinchart wrote: > Hi Tomasz, > > Thanks for the patch. > > On Wednesday 08 August 2012 12:17:41 Tomasz Stanislawski wrote: >> This patch adds reference counting on a module that exports dma-buf and >> implements its op

[PATCH] dma-buf: add reference counting for exporter module

2012-08-08 Thread Tomasz Stanislawski
This patch adds reference counting on a module that exports dma-buf and implements its operations. This prevents the module from being unloaded while DMABUF file is in use. Signed-off-by: Tomasz Stanislawski --- Documentation/dma-buf-sharing.txt |3 ++- drivers/base/dma-buf.c

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Tomasz Stanislawski
On 08/06/2012 01:58 PM, Michal Nazarewicz wrote: > > Tomasz Stanislawski writes: >> I recommend to change the semantics for unlimited number of segments >> from 'value 0' to: >> >> #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned lon

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Tomasz Stanislawski
r: int dma_buf_get_parameters(struct dma_buf *dmabuf, struct device_dma_parameters *params); This function will fill *params with lowest common DMA requirements for all devices on attachment list. Return value can be used to diagnose errors like incorrectly initialized dma_buf pointer (like