Re: [PATCH V3 09/18] coresight: tmc: allocating memory when needed

2016-04-25 Thread Mathieu Poirier
On 25 April 2016 at 04:20, Suzuki K Poulose wrote: > On 22/04/16 18:14, Mathieu Poirier wrote: >> >> static int tmc_enable_etf_sink(struct coresight_device *csdev, u32 mode) >> { >> + bool used = false; >> + char *buf = NULL; >> unsigned long flags;

Re: [PATCH V3 09/18] coresight: tmc: allocating memory when needed

2016-04-25 Thread Mathieu Poirier
On 25 April 2016 at 04:20, Suzuki K Poulose wrote: > On 22/04/16 18:14, Mathieu Poirier wrote: >> >> static int tmc_enable_etf_sink(struct coresight_device *csdev, u32 mode) >> { >> + bool used = false; >> + char *buf = NULL; >> unsigned long flags; >> struct

Re: [PATCH V3 09/18] coresight: tmc: allocating memory when needed

2016-04-25 Thread Suzuki K Poulose
On 22/04/16 18:14, Mathieu Poirier wrote: static int tmc_enable_etf_sink(struct coresight_device *csdev, u32 mode) { + bool used = false; + char *buf = NULL; unsigned long flags; struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); +/* This

Re: [PATCH V3 09/18] coresight: tmc: allocating memory when needed

2016-04-25 Thread Suzuki K Poulose
On 22/04/16 18:14, Mathieu Poirier wrote: static int tmc_enable_etf_sink(struct coresight_device *csdev, u32 mode) { + bool used = false; + char *buf = NULL; unsigned long flags; struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); +/* This

[PATCH V3 09/18] coresight: tmc: allocating memory when needed

2016-04-22 Thread Mathieu Poirier
In it's current form the TMC probe() function allocates trace buffer memory at boot time, event if coresight isn't used. This is highly inefficient since trace buffers can occupy a lot of memory that could be used otherwised. This patch allocates trace buffers on the fly, when the coresight

[PATCH V3 09/18] coresight: tmc: allocating memory when needed

2016-04-22 Thread Mathieu Poirier
In it's current form the TMC probe() function allocates trace buffer memory at boot time, event if coresight isn't used. This is highly inefficient since trace buffers can occupy a lot of memory that could be used otherwised. This patch allocates trace buffers on the fly, when the coresight