* [PATCH 1/6] ARM/dma: pl08x: pass reasonable memcpy settings
From: Arnd Bergmann @ 2017-04-19 19:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419135801.GH29219@localhost>
On Wed, Apr 19, 2017 at 3:58 PM, Olof Johansson <olof@lixom.net> wrote:
> On Sat, Apr 08, 2017 at 02:04:52PM +0200, Linus Walleij wrote:
>> We cannot use bits from configuration registers as API between
>> platforms and driver like this, abstract it out to two enums
>> and mimic the stuff passed as device tree data.
>>
>> This is done to make it possible for the driver to generate the
>> ccfg word on-the-fly so we can support more PL08x derivatives.
>>
>> Cc: arm at kernel.org
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> ARM SoC folks: I'd like your ACK on this eventually, it needs to
>> go through the DMA engine tree with the patches following this one.
>
> Acked-by: Olof Johansson <olof@lixom.net>
Very nice cleanup!
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply
* [PATCH V2] clk: hi6220: Add the hi655x's pmic clock
From: Daniel Lezcano @ 2017-04-19 19:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419160005.GS7065@codeaurora.org>
On Wed, Apr 19, 2017 at 09:00:05AM -0700, Stephen Boyd wrote:
> On 04/16, Daniel Lezcano wrote:
> > On Wed, Apr 12, 2017 at 08:02:45AM -0700, Stephen Boyd wrote:
> > > On 04/08, Daniel Lezcano wrote:
[ ... ]
> > > > + ret = clk_hw_register_clkdev(&hi655x_clk->clk_hw, clk_name, NULL);
> > >
> > > Missed this last time. Do you use this clkdev lookup? The name is
> > > usually supposed to be based on what the device is expecting,
> > > instead of clk_name, and we would want some device name for the
> > > third argument here.
> >
> > I'm not sure to get your comment. Are you saying the clk_name should be the
> > third argument?
> >
> >
>
> Sorry, no. I meant that con_id is typically something like "core"
> or "ahb" or something like that, and dev_id is something like
> "a456002.pmic_device" or whatever dev_name(pmic_dev) would return for
> the consuming device. That way when we call clk_get(dev, "core")
> it will find the lookup with "core" and "a456002.pmic_device" to
> match up the clk lookup.
>
> If anything, the clk_name should just go into the con_id for now,
> and then it will need to be a globally unique identifier for the
> clk. But that is going against how clkdev is supposed to be used.
> Hence the question if you even need to use it. If not, just don't
> add it. I can fix up v3 of this patch to put clk_name back at
> con_id if you like. No need to resend.
Ok, I'm not very used with the CCF, so perhaps clk_name is not needed at all. I
gave a try with the following combination:
- con_id = NULL, dev_id = clk_name
- con_id = clk_name, dev_id = NULL
- con_id = NULL, dev_id = NULL
All worked.
And finally I removed the clk_hw_register_clkdev() call and it worked also.
So I'm not sure about this function.
Any idea ?
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply
* [GIT PULL] ARM: SOC PM domain for 4.12
From: Arnd Bergmann @ 2017-04-19 19:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1491500546-6873-1-git-send-email-ssantosh@kernel.org>
On Thu, Apr 6, 2017 at 7:42 PM, Santosh Shilimkar <ssantosh@kernel.org> wrote:
> Hi Arnd, Olof,
>
> As inidcated on the list, because of various dependencies, am senidng
> Dave Gerlach's full patchset in single pull request.
>
> The following changes since commit 4495c08e84729385774601b5146d51d9e5849f81:
>
> Linux 4.11-rc2 (2017-03-12 14:47:08 -0700)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/arm-soc-pmdomain
>
> for you to fetch changes up to ae3874cc931b760c08bd6617a45fec1ba97d87f8:
>
> ARM: keystone: Drop PM domain support for k2g (2017-04-04 08:59:28 -0700)
>
> ----------------------------------------------------------------
> ARM SOC PM domain support for 4.12
>
> Dave Gerlach (5):
> PM / Domains: Add generic data pointer to genpd data struct
> PM / Domains: Do not check if simple providers have phandle cells
> dt-bindings: Add TI SCI PM Domains
> soc: ti: Add ti_sci_pm_domains driver
> ARM: keystone: Drop PM domain support for k2g
I went through the list of arm at kernel.org emails that had not seen a reply after
Olof's pull marathon today. I did not get a reply for this one, but I
see that Olof
has merged it into next/drivers.
Since I was looking at it, I also took a closer look at the contents of the
patch series. The driver itself looks fine, but for the record, I'm not that
happy about seeing a header file duplicating the information from the
data sheet: We only use dt-binding headers to establish an interface between
the driver and the sources when there is well-defined fixed way to enumerate
resources, but in this case there clearly is...
Arnd
^ permalink raw reply
* [v4.9-rt PATCH] ARM: mm: remove tasklist locking from update_sections_early()
From: Grygorii Strashko @ 2017-04-19 19:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAGXu5j+=6iEK2-cEih6wvPabautwvMgsAFBw=31r8CttW-5uLA@mail.gmail.com>
On 04/18/2017 07:15 PM, Kees Cook wrote:
> On Tue, Apr 18, 2017 at 1:48 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
>> The below backtrace can be observed on -rt kernel with CONFIG_DEBUG_RODATA
>> option enabled:
>>
>> BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993
>> in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0
>> 1 lock held by migration/0/14:
>> #0: (tasklist_lock){+.+...}, at: [<c01183e8>] update_sections_early+0x24/0xdc
>> irq event stamp: 38
>> hardirqs last enabled at (37): [<c08f6f7c>] _raw_spin_unlock_irq+0x24/0x68
>> hardirqs last disabled at (38): [<c01fdfe8>] multi_cpu_stop+0xd8/0x138
>> softirqs last enabled at (0): [<c01303ec>] copy_process.part.5+0x238/0x1b64
>> softirqs last disabled at (0): [< (null)>] (null)
>> Preemption disabled at: [<c01fe244>] cpu_stopper_thread+0x80/0x10c
>> CPU: 0 PID: 14 Comm: migration/0 Not tainted 4.9.21-rt16-02220-g49e319c #15
>> Hardware name: Generic DRA74X (Flattened Device Tree)
>> [<c0112014>] (unwind_backtrace) from [<c010d370>] (show_stack+0x10/0x14)
>> [<c010d370>] (show_stack) from [<c049beb8>] (dump_stack+0xa8/0xd4)
>> [<c049beb8>] (dump_stack) from [<c01631a0>] (___might_sleep+0x1bc/0x2ac)
>> [<c01631a0>] (___might_sleep) from [<c08f7244>] (__rt_spin_lock+0x1c/0x30)
>> [<c08f7244>] (__rt_spin_lock) from [<c08f77a4>] (rt_read_lock+0x54/0x68)
>> [<c08f77a4>] (rt_read_lock) from [<c01183e8>] (update_sections_early+0x24/0xdc)
>> [<c01183e8>] (update_sections_early) from [<c01184b0>] (__fix_kernmem_perms+0x10/0x1c)
>> [<c01184b0>] (__fix_kernmem_perms) from [<c01fe010>] (multi_cpu_stop+0x100/0x138)
>> [<c01fe010>] (multi_cpu_stop) from [<c01fe24c>] (cpu_stopper_thread+0x88/0x10c)
>> [<c01fe24c>] (cpu_stopper_thread) from [<c015edc4>] (smpboot_thread_fn+0x174/0x31c)
>> [<c015edc4>] (smpboot_thread_fn) from [<c015a988>] (kthread+0xf0/0x108)
>> [<c015a988>] (kthread) from [<c0108818>] (ret_from_fork+0x14/0x3c)
>> Freeing unused kernel memory: 1024K (c0d00000 - c0e00000)
>>
>> The stop_machine() is called with cpus = NULL from fix_kernmem_perms() and
>> mark_rodata_ro() which means only one CPU will execute
>> update_sections_early() while all other CPUs will spin and wait. Hence,
>> it's safe to remove tasklist locking from update_sections_early(). As part of
>> this change also mark functions which are local to this module as static
>> to simplify code analize in the future.
>
> Hm, yes, good point. It's only every called while other CPUs are stopped.
>
>>
>> Cc: Kees Cook <keescook@chromium.org>
>> Cc: Laura Abbott <labbott@redhat.com>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>> ---
>> arch/arm/mm/init.c | 8 +++-----
>> 1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
>> index 370581a..a77953a 100644
>> --- a/arch/arm/mm/init.c
>> +++ b/arch/arm/mm/init.c
/**
* update_sections_early intended to be called only through stop_machine
* framework and be executed by only one CPU while all other CPUs will spin and
* wait, so no locking is required in this function.
*/
>> @@ -693,30 +693,28 @@ static void update_sections_early(struct section_perm perms[], int n)
>
> Maybe this should be renamed update_sections_stopped()? Or at least
> comments added to help see why it's safe.
would it be ok if I add above comment before update_sections_early?
Also I can rename it to update_sections_stopped() if you want - not sure about the name.
>
>> {
>> struct task_struct *t, *s;
>>
>> - read_lock(&tasklist_lock);
>> for_each_process(t) {
>> if (t->flags & PF_KTHREAD)
>> continue;
>> for_each_thread(t, s)
>> set_section_perms(perms, n, true, s->mm);
>> }
>> - read_unlock(&tasklist_lock);
>> set_section_perms(perms, n, true, current->active_mm);
>> set_section_perms(perms, n, true, &init_mm);
>> }
>>
>> -int __fix_kernmem_perms(void *unused)
>> +static int __fix_kernmem_perms(void *unused)
>> {
>> update_sections_early(nx_perms, ARRAY_SIZE(nx_perms));
>> return 0;
>> }
>>
>> -void fix_kernmem_perms(void)
>> +static void fix_kernmem_perms(void)
>> {
>> stop_machine(__fix_kernmem_perms, NULL, NULL);
>> }
>>
>> -int __mark_rodata_ro(void *unused)
>> +static int __mark_rodata_ro(void *unused)
>> {
>> update_sections_early(ro_perms, ARRAY_SIZE(ro_perms));
>> return 0;
>
> Yeah, the static marks are all correct, thanks for fixing these!
>
> -Kees
>
--
regards,
-grygorii
^ permalink raw reply
* [v4.9-rt PATCH] ARM: mm: remove tasklist locking from update_sections_early()
From: Kees Cook @ 2017-04-19 20:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <05456050-7dc2-d58e-5250-bbb369d5d927@ti.com>
On Wed, Apr 19, 2017 at 12:58 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
>
>
> On 04/18/2017 07:15 PM, Kees Cook wrote:
>> On Tue, Apr 18, 2017 at 1:48 PM, Grygorii Strashko
>> <grygorii.strashko@ti.com> wrote:
>>> The below backtrace can be observed on -rt kernel with CONFIG_DEBUG_RODATA
>>> option enabled:
>>>
>>> BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993
>>> in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0
>>> 1 lock held by migration/0/14:
>>> #0: (tasklist_lock){+.+...}, at: [<c01183e8>] update_sections_early+0x24/0xdc
>>> irq event stamp: 38
>>> hardirqs last enabled at (37): [<c08f6f7c>] _raw_spin_unlock_irq+0x24/0x68
>>> hardirqs last disabled at (38): [<c01fdfe8>] multi_cpu_stop+0xd8/0x138
>>> softirqs last enabled at (0): [<c01303ec>] copy_process.part.5+0x238/0x1b64
>>> softirqs last disabled at (0): [< (null)>] (null)
>>> Preemption disabled at: [<c01fe244>] cpu_stopper_thread+0x80/0x10c
>>> CPU: 0 PID: 14 Comm: migration/0 Not tainted 4.9.21-rt16-02220-g49e319c #15
>>> Hardware name: Generic DRA74X (Flattened Device Tree)
>>> [<c0112014>] (unwind_backtrace) from [<c010d370>] (show_stack+0x10/0x14)
>>> [<c010d370>] (show_stack) from [<c049beb8>] (dump_stack+0xa8/0xd4)
>>> [<c049beb8>] (dump_stack) from [<c01631a0>] (___might_sleep+0x1bc/0x2ac)
>>> [<c01631a0>] (___might_sleep) from [<c08f7244>] (__rt_spin_lock+0x1c/0x30)
>>> [<c08f7244>] (__rt_spin_lock) from [<c08f77a4>] (rt_read_lock+0x54/0x68)
>>> [<c08f77a4>] (rt_read_lock) from [<c01183e8>] (update_sections_early+0x24/0xdc)
>>> [<c01183e8>] (update_sections_early) from [<c01184b0>] (__fix_kernmem_perms+0x10/0x1c)
>>> [<c01184b0>] (__fix_kernmem_perms) from [<c01fe010>] (multi_cpu_stop+0x100/0x138)
>>> [<c01fe010>] (multi_cpu_stop) from [<c01fe24c>] (cpu_stopper_thread+0x88/0x10c)
>>> [<c01fe24c>] (cpu_stopper_thread) from [<c015edc4>] (smpboot_thread_fn+0x174/0x31c)
>>> [<c015edc4>] (smpboot_thread_fn) from [<c015a988>] (kthread+0xf0/0x108)
>>> [<c015a988>] (kthread) from [<c0108818>] (ret_from_fork+0x14/0x3c)
>>> Freeing unused kernel memory: 1024K (c0d00000 - c0e00000)
>>>
>>> The stop_machine() is called with cpus = NULL from fix_kernmem_perms() and
>>> mark_rodata_ro() which means only one CPU will execute
>>> update_sections_early() while all other CPUs will spin and wait. Hence,
>>> it's safe to remove tasklist locking from update_sections_early(). As part of
>>> this change also mark functions which are local to this module as static
>>> to simplify code analize in the future.
>>
>> Hm, yes, good point. It's only every called while other CPUs are stopped.
>>
>>>
>>> Cc: Kees Cook <keescook@chromium.org>
>>> Cc: Laura Abbott <labbott@redhat.com>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>> ---
>>> arch/arm/mm/init.c | 8 +++-----
>>> 1 file changed, 3 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
>>> index 370581a..a77953a 100644
>>> --- a/arch/arm/mm/init.c
>>> +++ b/arch/arm/mm/init.c
>
> /**
> * update_sections_early intended to be called only through stop_machine
> * framework and be executed by only one CPU while all other CPUs will spin and
> * wait, so no locking is required in this function.
> */
>>> @@ -693,30 +693,28 @@ static void update_sections_early(struct section_perm perms[], int n)
>>
>> Maybe this should be renamed update_sections_stopped()? Or at least
>> comments added to help see why it's safe.
>
> would it be ok if I add above comment before update_sections_early?
A comment is fine. It'll just help people looking at this in the future. :)
Thanks!
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply
* [PATCH v3] mtd: physmap_of: really fix the physmap add-ons
From: Brian Norris @ 2017-04-19 20:07 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170331100451.069a76ab@bbrezillon>
On Fri, Mar 31, 2017 at 10:04:51AM +0200, Boris Brezillon wrote:
> On Thu, 30 Mar 2017 17:36:39 +0200
> Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > The current way of building the of_physmap add-ons result in just
> > the add-on being in the object code, and not the actual core
> > implementation and regress the Gemini and Versatile.
> >
> > Bake the physmap_of.o object by baking physmap_of_core.o and
> > adding the Versatile and/or Gemini add-ons to the final object.
> > Rename the source file physmap_of_core.c to get the desired
> > build components.
> >
> > Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Fixes: 4f04f68e1598 ("mtd: physmap_of: fixup gemini/versatile dependencies")
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Applied
^ permalink raw reply
* [v4.9-rt PATCH v2] ARM: mm: remove tasklist locking from update_sections_early()
From: Grygorii Strashko @ 2017-04-19 20:10 UTC (permalink / raw)
To: linux-arm-kernel
The below backtrace can be observed on -rt kernel with CONFIG_DEBUG_RODATA
option enabled:
BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993
in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0
1 lock held by migration/0/14:
#0: (tasklist_lock){+.+...}, at: [<c01183e8>] update_sections_early+0x24/0xdc
irq event stamp: 38
hardirqs last enabled at (37): [<c08f6f7c>] _raw_spin_unlock_irq+0x24/0x68
hardirqs last disabled at (38): [<c01fdfe8>] multi_cpu_stop+0xd8/0x138
softirqs last enabled at (0): [<c01303ec>] copy_process.part.5+0x238/0x1b64
softirqs last disabled at (0): [< (null)>] (null)
Preemption disabled at: [<c01fe244>] cpu_stopper_thread+0x80/0x10c
CPU: 0 PID: 14 Comm: migration/0 Not tainted 4.9.21-rt16-02220-g49e319c #15
Hardware name: Generic DRA74X (Flattened Device Tree)
[<c0112014>] (unwind_backtrace) from [<c010d370>] (show_stack+0x10/0x14)
[<c010d370>] (show_stack) from [<c049beb8>] (dump_stack+0xa8/0xd4)
[<c049beb8>] (dump_stack) from [<c01631a0>] (___might_sleep+0x1bc/0x2ac)
[<c01631a0>] (___might_sleep) from [<c08f7244>] (__rt_spin_lock+0x1c/0x30)
[<c08f7244>] (__rt_spin_lock) from [<c08f77a4>] (rt_read_lock+0x54/0x68)
[<c08f77a4>] (rt_read_lock) from [<c01183e8>] (update_sections_early+0x24/0xdc)
[<c01183e8>] (update_sections_early) from [<c01184b0>] (__fix_kernmem_perms+0x10/0x1c)
[<c01184b0>] (__fix_kernmem_perms) from [<c01fe010>] (multi_cpu_stop+0x100/0x138)
[<c01fe010>] (multi_cpu_stop) from [<c01fe24c>] (cpu_stopper_thread+0x88/0x10c)
[<c01fe24c>] (cpu_stopper_thread) from [<c015edc4>] (smpboot_thread_fn+0x174/0x31c)
[<c015edc4>] (smpboot_thread_fn) from [<c015a988>] (kthread+0xf0/0x108)
[<c015a988>] (kthread) from [<c0108818>] (ret_from_fork+0x14/0x3c)
Freeing unused kernel memory: 1024K (c0d00000 - c0e00000)
The stop_machine() is called with cpus = NULL from fix_kernmem_perms() and
mark_rodata_ro() which means only one CPU will execute
update_sections_early() while all other CPUs will spin and wait. Hence,
it's safe to remove tasklist locking from update_sections_early(). As part
of this change also mark functions which are local to this module as
static.
Cc: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@redhat.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
As I've checked it also can be applied to LKML as is.
Changes in v2:
- added comment to update_sections_early()
v1: https://patchwork.kernel.org/patch/9686289/
arch/arm/mm/init.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 370581a..838f6b35 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -689,34 +689,37 @@ void set_section_perms(struct section_perm *perms, int n, bool set,
}
+/**
+ * update_sections_early intended to be called only through stop_machine
+ * framework and executed by only one CPU while all other CPUs will spin and
+ * wait, so no locking is required in this function.
+ */
static void update_sections_early(struct section_perm perms[], int n)
{
struct task_struct *t, *s;
- read_lock(&tasklist_lock);
for_each_process(t) {
if (t->flags & PF_KTHREAD)
continue;
for_each_thread(t, s)
set_section_perms(perms, n, true, s->mm);
}
- read_unlock(&tasklist_lock);
set_section_perms(perms, n, true, current->active_mm);
set_section_perms(perms, n, true, &init_mm);
}
-int __fix_kernmem_perms(void *unused)
+static int __fix_kernmem_perms(void *unused)
{
update_sections_early(nx_perms, ARRAY_SIZE(nx_perms));
return 0;
}
-void fix_kernmem_perms(void)
+static void fix_kernmem_perms(void)
{
stop_machine(__fix_kernmem_perms, NULL, NULL);
}
-int __mark_rodata_ro(void *unused)
+static int __mark_rodata_ro(void *unused)
{
update_sections_early(ro_perms, ARRAY_SIZE(ro_perms));
return 0;
--
2.10.1
^ permalink raw reply related
* [PATCH] soc: brcmstb: enable drivers for ARM64 also
From: Markus Mayer @ 2017-04-19 20:18 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Mayer <mmayer@broadcom.com>
We enable the BRCMSTB SoC drivers not only for ARM, but also ARM64.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
drivers/soc/bcm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index a39b0d5..b3834b9 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -11,7 +11,7 @@ config RASPBERRYPI_POWER
config SOC_BRCMSTB
bool "Broadcom STB SoC drivers"
- depends on ARM
+ depends on ARM || ARM64
select SOC_BUS
help
Enables drivers for the Broadcom Set-Top Box (STB) series of chips.
--
2.7.4
^ permalink raw reply related
* [PATCH 1/3] ARM: dts: imx6qdl-nitrogen6_max: fix rv4162 compatible
From: Alexandre Belloni @ 2017-04-19 20:22 UTC (permalink / raw)
To: linux-arm-kernel
The rv4162 vendor is microcrystal, not ST.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
index bad3c9f9eeac..b63134e3b51a 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
@@ -408,7 +408,7 @@
};
rtc: rtc at 68 {
- compatible = "st,rv4162";
+ compatible = "microcrystal,rv4162";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rv4162>;
reg = <0x68>;
--
2.11.0
^ permalink raw reply related
* [PATCH 2/3] ARM: dts: imx6qdl-nitrogen6_som2: fix rv4162 compatible
From: Alexandre Belloni @ 2017-04-19 20:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419202204.7689-1-alexandre.belloni@free-electrons.com>
The rv4162 vendor is microcrystal, not ST.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
index 559da17297ef..aeaa5a6e4fcf 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
@@ -326,7 +326,7 @@
};
rtc at 68 {
- compatible = "st,rv4162";
+ compatible = "microcrystal,rv4162";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rv4162>;
reg = <0x68>;
--
2.11.0
^ permalink raw reply related
* [PATCH 3/3] ARM: dts: imx7d-nitrogen7: fix rv4162 compatible
From: Alexandre Belloni @ 2017-04-19 20:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419202204.7689-1-alexandre.belloni@free-electrons.com>
The rv4162 compatbile string is missing the vendor part, add it.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/imx7d-nitrogen7.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx7d-nitrogen7.dts b/arch/arm/boot/dts/imx7d-nitrogen7.dts
index 5d98e2b5d54b..a44f992051ac 100644
--- a/arch/arm/boot/dts/imx7d-nitrogen7.dts
+++ b/arch/arm/boot/dts/imx7d-nitrogen7.dts
@@ -279,7 +279,7 @@
status = "okay";
rtc at 68 {
- compatible = "rv4162";
+ compatible = "microcrystal,rv4162";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2_rv4162>;
reg = <0x68>;
--
2.11.0
^ permalink raw reply related
* usb: dwc2: NMI watchdog: BUG: soft lockup - CPU#0 stuck for 146s
From: Stefan Wahren @ 2017-04-19 20:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAD=FV=VHkJFrsJDmMytbUw=WjKQaGZ-8Ewfy5bPCA82AWS4O2Q@mail.gmail.com>
Hi,
> Doug Anderson <dianders@chromium.org> hat am 18. April 2017 um 22:41 geschrieben:
>
>
> It's hard to know for sure that all of this time is really in
> urb_enqueue(). Possible we could have task switched out and been
> blocked elsewhere. Using ftrace to get more fine-grained timings
> would be useful. ktime_get(), ktime_sub(), and ktime_to_us() are your
> friends here if you want to use trace_printk.
i'm a newbie to ftrace, so i hope this would be helpful.
# connect PL2303 to the onboard hub
# echo 0 > options/sleep-time
# echo 0 > function_profile_enabled
# echo 1 > function_profile_enabled
# ./usb_test
# Waiting for at least 20 seconds and then disconnect PL2303
# echo 0 > function_profile_enabled
# cat trace_stat/function0
Function Hit Time Avg s^2
-------- --- ---- --- ---
bcm2835_handle_irq 361347 219567633 us 607.636 us 1485199 us
__handle_domain_irq 1082482 212639551 us 196.437 us 3642030 us
generic_handle_irq 1082482 100592051 us 92.927 us 50511334 us
irq_exit 1082482 98197771 us 90.715 us 29649040 us
handle_level_irq 1082482 95812379 us 88.511 us 51910093 us
do_sys_open 1806 87612983 us 48512.17 us 2198507 us
SyS_open 1601 87372331 us 54573.59 us 1898996 us
do_filp_open 1862 87368058 us 46921.62 us 1634982 us
path_openat 1862 87314553 us 46892.88 us 3357817 us
__do_softirq 3035 86266050 us 28423.73 us 6449768 us
vfs_open 1515 85877012 us 56684.49 us 101673.5 us
do_dentry_open 1515 85861429 us 56674.21 us 812420.7 us
usb_submit_urb 136 85760172 us 630589.5 us 59532024 us
usb_hcd_submit_urb 134 85756518 us 639974.0 us 726298102 us
_dwc2_hcd_urb_enqueue 134 85738333 us 639838.3 us 874104371 us
chrdev_open 87 85716519 us 985247.3 us 1951112835 us
tty_open 3 85714494 us 28571498 us 3743206849 us
tty_port_open 3 85712603 us 28570867 us 1968003468 us
serial_open 1 85712472 us 85712472 us 0.000 us
serial_port_activate 1 85709890 us 85709890 us 0.000 us
pl2303_open 1 85709875 us 85709875 us 0.000 us
usb_serial_generic_open 1 85701170 us 85701170 us 0.000 us
usb_serial_generic_submit_read 1 85701166 us 85701166 us 0.000 us
usb_serial_generic_submit_read 2 85701160 us 42850580 us 2252410463 us
handle_irq_event 1082482 80686112 us 74.538 us 36417905 us
handle_irq_event_percpu 1082482 78398378 us 72.424 us 34060119 us
__handle_irq_event_percpu 1082482 68466046 us 63.249 us 53609076 us
usb_hcd_irq 1078945 59761116 us 55.388 us 25139388 us
_dwc2_hcd_irq 1078945 57481606 us 53.275 us 30847036 us
dwc2_handle_hcd_intr 1078945 55380910 us 51.328 us 35986237 us
do_idle 394 43577379 us 110602.4 us 84278209 us
dwc2_hc_n_intr 651065 42408491 us 65.137 us 7281229 us
default_idle_call 229969 38021287 us 165.332 us 11386904 us
arch_cpu_idle 229969 37379305 us 162.540 us 2168909 us
dwc2_halt_channel 650811 34208348 us 52.562 us 7792012 us
dwc2_release_channel 651065 33042638 us 50.751 us 8112754 us
dwc2_hc_nak_intr 334689 18892951 us 56.449 us 1823592 us
dwc2_hc_ack_intr 315986 18323433 us 57.988 us 151346.6 us
dwc2_hcd_select_transactions 1730010 11694955 us 6.760 us 1188442 us
dwc2_hcd_queue_transactions 651065 10931854 us 16.790 us 952074.2 us
dwc2_assign_and_init_hc 651065 9540885 us 14.654 us 258067.1 us
dwc2_queue_transaction 651065 9192559 us 14.119 us 736431.6 us
tick_nohz_irq_exit 325055 9052192 us 27.848 us 916293.3 us
__tick_nohz_idle_enter.constpr 324760 8463861 us 26.061 us 2410440 us
dwc2_hc_start_transfer 651065 7687376 us 11.807 us 625773.3 us
irq_enter 1082482 6627959 us 6.122 us 11528932 us
arm_heavy_mb 10903913 6603586 us 0.605 us 60562924 us
unmask_irq 1082482 4763699 us 4.400 us 1032638 us
tick_irq_enter 326467 4377088 us 13.407 us 4606805 us
dwc2_handle_common_intr 1078945 3799392 us 3.521 us 1131504 us
add_interrupt_randomness 1082482 3542044 us 3.272 us 30545511 us
get_next_armctrl_hwirq 1443829 3276974 us 2.269 us 2116848 us
tick_nohz_restart 70325 3250462 us 46.220 us 35710.73 us
dwc2_hc_cleanup 651065 3079003 us 4.729 us 81202.50 us
dwc2_hcd_qh_deactivate 651065 3039940 us 4.669 us 90928.10 us
ledtrig_cpu 459938 2450327 us 5.327 us 1466705 us
arch_cpu_idle_exit 229969 2443315 us 10.624 us 8606787 us
do_page_fault 5509 2304998 us 418.405 us 17961439 us
ktime_get 795998 2121741 us 2.665 us 166119.5 us
get_next_timer_interrupt 324760 1998999 us 6.155 us 32201.63 us
handle_mm_fault 5537 1945500 us 351.363 us 8324917 us
dwc2_is_controller_alive 2157890 1473590 us 0.682 us 291399.4 us
hrtimer_cancel 70450 1394330 us 19.791 us 36980.28 us
arch_cpu_idle_enter 229969 1350759 us 5.873 us 10789.94 us
hrtimer_try_to_cancel 71029 1266967 us 17.837 us 30260.75 us
filemap_map_pages 1632 1263006 us 773.900 us 207846.4 us
tick_program_event 141799 1260485 us 8.889 us 9343.194 us
hrtimer_start_range_ns 97555 1253698 us 12.851 us 43166.94 us
irq_to_desc 1082482 1146955 us 1.059 us 546937.6 us
link_path_walk 3486 1134351 us 325.401 us 484443.0 us
__remove_hrtimer 99205 999724.0 us 10.077 us 201933.9 us
clockevents_program_event 141799 985346.0 us 6.948 us 7114.725 us
note_interrupt 1082482 899494.0 us 0.830 us 705141.6 us
update_ts_time_stats.constprop 324760 862996.0 us 2.657 us 21813.81 us
alloc_set_pte 20011 805880.0 us 40.271 us 1086748 us
SyS_read 1940 805061.0 us 414.979 us 164198.7 us
_local_bh_enable 326467 777908.0 us 2.382 us 37202.43 us
vfs_read 2080 761487.0 us 366.099 us 22944777 us
dwc2_hcd_get_frame_number 1097673 721108.0 us 0.656 us 525348.1 us
do_munmap 1194 717161.0 us 600.637 us 65635.31 us
schedule 3297 700578.0 us 212.489 us 28594.59 us
__vfs_read 2080 694376.0 us 333.834 us 21955675 us
walk_component 9912 683211.0 us 68.927 us 349771.7 us
irq_find_mapping 1082482 673162.0 us 0.621 us 900861.5 us
__next_timer_interrupt 324929 667175.0 us 2.053 us 4576.720 us
armctrl_translate_shortcut 1079274 662875.0 us 0.614 us 164464.8 us
filename_lookup 1316 646059.0 us 490.926 us 148884.8 us
mmput 259 644417.0 us 2488.096 us 33155247 us
armctrl_unmask_irq 1082482 639692.0 us 0.590 us 891074.7 us
armctrl_mask_irq 1082482 636505.0 us 0.588 us 888583.1 us
exit_mmap 45 634389.0 us 14097.53 us 24105769 us
irq_state_set_masked 1082482 622182.0 us 0.574 us 894212.6 us
user_path_at_empty 1156 620229.0 us 536.530 us 166865.3 us
SyS_munmap 895 600613.0 us 671.075 us 75763.68 us
vm_mmap_pgoff 1437 598955.0 us 416.809 us 55882.41 us
read_current_timer 1082666 598757.0 us 0.553 us 86817.59 us
irq_may_run 1082482 598471.0 us 0.552 us 898308.6 us
vm_munmap 937 595309.0 us 635.335 us 70914.31 us
path_lookupat 1316 592448.0 us 450.188 us 147624.4 us
SyS_mmap_pgoff 1325 588992.0 us 444.522 us 62142.49 us
irq_state_clr_masked 1082482 582077.0 us 0.537 us 893572.4 us
idle_cpu 1082482 580428.0 us 0.536 us 905609.5 us
do_execve 28 573864.0 us 20495.14 us 98356111 us
do_execveat_common 28 573576.0 us 20484.85 us 98471441 us
dwc2_hc_set_even_odd_frame 651065 570127.0 us 0.875 us 543701.5 us
ledtrig_cpu.part.0 229969 549060.0 us 2.387 us 9142.920 us
do_mmap 1437 548817.0 us 381.918 us 54270.64 us
do_work_pending 2211 525805.0 us 237.813 us 234836.0 us
led_trigger_event 460228 501093.0 us 1.088 us 4759241 us
search_binary_handler 28 501026.0 us 17893.78 us 93445723 us
clocksource_mmio_readl_up 807791 500765.0 us 0.619 us 91050.42 us
load_elf_binary 28 500359.0 us 17869.96 us 93309220 us
process_one_work 558 496994.0 us 890.670 us 7196614 us
tick_do_update_jiffies64 324826 496168.0 us 1.527 us 3422867 us
hrtimer_forward 72095 490887.0 us 6.808 us 4548.034 us
unmap_vmas 1239 490538.0 us 395.914 us 2723415 us
finish_task_switch 3926 479983.0 us 122.257 us 25336.71 us
unmap_single_vma 3403 474812.0 us 139.527 us 959184.6 us
__sync_icache_dcache 27231 468069.0 us 17.188 us 364740.1 us
SyS_execve 16 462210.0 us 28888.12 us 4450186 us
unmap_region 1194 460297.0 us 385.508 us 44372.58 us
unmap_page_range 3403 455941.0 us 133.982 us 956896.1 us
bcm2835_time_interrupt 3208 455584.0 us 142.014 us 56012.72 us
mmap_region 1437 449599.0 us 312.873 us 55175.49 us
hrtimer_interrupt 3208 443908.0 us 138.375 us 55446.73 us
dwc2_hcd_qh_add 632341 436511.0 us 0.690 us 58787.66 us
lookup_fast 11601 436227.0 us 37.602 us 570183.6 us
inode_permission 14699 426528.0 us 29.017 us 404007.8 us
SyS_access 561 412200.0 us 734.759 us 146663.8 us
dwc2_hcd_qh_unlink 632344 410157.0 us 0.648 us 87505.07 us
seq_read 669 408885.0 us 611.188 us 226703.8 us
SyS_faccessat 564 406969.0 us 721.576 us 141955.4 us
dwc2_check_qtd_still_ok 651065 392283.0 us 0.602 us 59460.80 us
SyS_getdents64 392 379673.0 us 968.553 us 13678636 us
SyS_write 404 378782.0 us 937.579 us 254399.0 us
iterate_dir 393 367777.0 us 935.819 us 13659529 us
vfs_write 404 358326.0 us 886.945 us 240956.8 us
__hrtimer_run_queues.constprop 3227 357720.0 us 110.852 us 47783.12 us
task_work_run 1460 350902.0 us 240.343 us 71379.18 us
_cond_resched 109971 344855.0 us 3.135 us 2245087 us
__vfs_write 404 333260.0 us 824.900 us 230347.3 us
____fput 1680 326232.0 us 194.185 us 40913.99 us
__inode_permission 14699 324102.0 us 22.049 us 328791.7 us
__fput 1680 316285.0 us 188.264 us 40874.09 us
flush_old_exec 28 313336.0 us 11190.57 us 96843591 us
tick_sched_timer 1964 312793.0 us 159.263 us 2002.533 us
do_wp_page 1758 300693.0 us 171.042 us 17667.03 us
_do_fork 29 281388.0 us 9703.034 us 54207832 us
copy_process.part.4 29 273985.0 us 9447.758 us 53888393 us
SyS_clone 17 267170.0 us 15715.88 us 2444683 us
free_pgtables 1239 265593.0 us 214.360 us 500428.0 us
dput 15879 265579.0 us 16.725 us 269685.7 us
SyS_openat 205 258191.0 us 1259.468 us 209643.6 us
pfn_valid 18146 257726.0 us 14.202 us 121416.6 us
update_wall_time 5957 250787.0 us 42.099 us 619.230 us
mmc_blk_issue_rq 63 246608.0 us 3914.412 us 8858815 us
mmc_blk_issue_rw_rq 63 241626.0 us 3835.333 us 8884205 us
vfs_statx 441 232198.0 us 526.526 us 150124.0 us
SyS_sendmsg 316 226698.0 us 717.398 us 164208.5 us
mmc_start_request 145 225615.0 us 1555.965 us 5542154 us
__sys_sendmsg 316 223856.0 us 708.405 us 164907.1 us
wp_page_copy 1061 222841.0 us 210.029 us 13010.76 us
__generic_file_write_iter 206 219092.0 us 1063.553 us 242948.7 us
terminate_walk 3225 217649.0 us 67.488 us 47336.14 us
ext4_file_write_iter 170 216280.0 us 1272.235 us 127738.3 us
__mmc_start_request 145 214090.0 us 1476.482 us 5509235 us
___sys_sendmsg 316 212732.0 us 673.202 us 161410.8 us
kmem_cache_alloc 17570 210590.0 us 11.985 us 120917.2 us
mmc_start_areq 63 210528.0 us 3341.714 us 9610382 us
sdhci_request 145 209828.0 us 1447.089 us 5547701 us
sock_sendmsg 353 208523.0 us 590.716 us 147666.9 us
__split_vma 981 206458.0 us 210.456 us 13253.43 us
credit_entropy_bits 16914 205434.0 us 12.145 us 208.830 us
hrtimer_get_next_event 324760 199659.0 us 0.614 us 17454.58 us
path_put 6090 196782.0 us 32.312 us 54264.43 us
SyS_mprotect 427 193190.0 us 452.435 us 42168.10 us
SyS_stat64 370 181587.0 us 490.775 us 119707.4 us
nr_iowait_cpu 324760 176767.0 us 0.544 us 17782.33 us
__vma_adjust 1452 174253.0 us 120.008 us 5746.323 us
tick_sched_handle 1964 174004.0 us 88.596 us 419.232 us
sdhci_irq 211 173984.0 us 824.568 us 4212897 us
touch_softlockup_watchdog_sche 323207 173767.0 us 0.537 us 108651.0 us
kernfs_iop_permission 5012 173442.0 us 34.605 us 21830.09 us
__local_bh_enable 329502 172898.0 us 0.524 us 9002.660 us
proc_single_show 233 170938.0 us 733.639 us 235941.1 us
mprotect_fixup 455 163622.0 us 359.608 us 43581.82 us
SyS_recvmsg 515 163337.0 us 317.159 us 23749.85 us
update_process_times 1964 161227.0 us 82.091 us 436.558 us
usb_control_msg 131 160306.0 us 1223.709 us 63779.20 us
__sys_recvmsg 515 159685.0 us 310.067 us 23888.88 us
check_carrier 29 159209.0 us 5489.965 us 157176.1 us
__dentry_kill 1306 159044.0 us 121.779 us 13522.69 us
smsc95xx_mdio_read 29 156605.0 us 5400.172 us 147578.2 us
__smsc95xx_mdio_read 29 156128.0 us 5383.724 us 153872.9 us
ext4_readdir 60 152036.0 us 2533.933 us 67111799 us
run_ksoftirqd 844 151846.0 us 179.912 us 74010.42 us
usb_start_wait_urb 131 151181.0 us 1154.053 us 59721.86 us
find_vma 8806 149418.0 us 16.967 us 419885.5 us
__alloc_pages_nodemask 4365 143647.0 us 32.908 us 22236.43 us
___sys_recvmsg 515 143567.0 us 278.770 us 23183.05 us
memblock_is_map_memory 18146 142969.0 us 7.878 us 62191.29 us
timekeeping_max_deferment 252165 141177.0 us 0.559 us 3782.924 us
unlink_anon_vmas 3403 137080.0 us 40.282 us 17090.37 us
__vma_link_rb 3403 136104.0 us 39.995 us 12357.79 us
rcu_process_callbacks 1050 135701.0 us 129.239 us 66292.86 us
SyS_close 1977 135041.0 us 68.306 us 4406.697 us
pick_next_task_fair 3996 133622.0 us 33.438 us 1391.499 us
proc_readfd 50 133185.0 us 2663.700 us 18788258 us
proc_readfd_common 50 132911.0 us 2658.220 us 18769391 us
generic_perform_write 206 132888.0 us 645.087 us 134152.0 us
__mix_pool_bytes 16914 128343.0 us 7.587 us 303.814 us
run_timer_softirq 1960 127980.0 us 65.295 us 13337.43 us
timekeeping_update 5956 127128.0 us 21.344 us 147.035 us
try_to_wake_up 2348 125639.0 us 53.508 us 5318.431 us
ktime_add_safe 241886 125624.0 us 0.519 us 6352.310 us
__rcu_process_callbacks 2100 125522.0 us 59.772 us 1422883 us
__wake_up 19318 121496.0 us 6.289 us 54037.07 us
tick_nohz_idle_enter 394 119544.0 us 303.411 us 24204.73 us
proc_fill_cache 402 119333.0 us 296.848 us 32614.19 us
unix_dgram_sendmsg 144 119088.0 us 827.000 us 197140.4 us
enqueue_hrtimer 99205 118756.0 us 1.197 us 1634.105 us
call_usermodehelper_exec_async 12 117852.0 us 9821.000 us 319067.4 us
mutex_lock 14089 117414.0 us 8.333 us 245056.5 us
sock_recvmsg 548 116787.0 us 213.114 us 20249.99 us
__smsc95xx_read_reg 87 116418.0 us 1338.137 us 39000.81 us
usbnet_read_cmd 87 115523.0 us 1327.850 us 37075.87 us
SyS_epoll_wait 336 114271.0 us 340.092 us 47629.77 us
__close_fd 1977 113569.0 us 57.445 us 3969.846 us
split_vma 501 112236.0 us 224.023 us 20703.73 us
vma_link 1248 111097.0 us 89.020 us 5058.706 us
__usbnet_read_cmd 87 111024.0 us 1276.137 us 34288.14 us
schedule_hrtimeout_range 390 107480.0 us 275.589 us 10798.57 us
dentry_unlink_inode 733 107440.0 us 146.575 us 8915.389 us
unix_find_other 172 106799.0 us 620.924 us 79499.41 us
iput 757 106445.0 us 140.614 us 8828.710 us
ext4_htree_fill_tree 36 106438.0 us 2956.611 us 10423331 us
kernfs_fop_read 198 105215.0 us 531.388 us 48887.87 us
htree_dirblock_to_tree 36 104352.0 us 2898.666 us 10008360 us
schedule_hrtimeout_range_clock 390 103931.0 us 266.489 us 10595.17 us
SyS_connect 99 102476.0 us 1035.111 us 160650.8 us
__mark_inode_dirty 641 102069.0 us 159.234 us 35047.69 us
expire_timers 700 100145.0 us 143.064 us 8519.548 us
do_wait 42 99498.00 us 2369.000 us 11701021 us
lookup_slow 413 99137.00 us 240.041 us 40034.02 us
release_task 29 98995.00 us 3413.620 us 12343735 us
SyS_fstat64 1168 98993.00 us 84.754 us 5326.254 us
wait_consider_task 444 98839.00 us 222.610 us 1532328 us
kmem_cache_free 17783 98715.00 us 5.551 us 72804.30 us
...
^ permalink raw reply
* [PATCH] soc: bcm: brcmstb: Correctly match 7435 SoC
From: Gregory Fong @ 2017-04-19 20:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419170136.4979-1-f.fainelli@gmail.com>
On Wed, Apr 19, 2017 at 10:01 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Remove the duplicate brcm,bcm7425-sun-top-ctrl compatible string and
> replace it with brcm,bcm7435-sun-top-ctrl which was intentend.
s/intentend/intended/
>
> Fixes: bd0faf08dc7f ("soc: bcm: brcmstb: Match additional compatible strings")
> Reported-by: Andreas Oberritter <obi@saftware.de>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
^ permalink raw reply
* [GIT PULL] Qualcomm Device Tree Changes for v4.12
From: Andy Gross @ 2017-04-19 20:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419134239.GU29219@localhost>
On Wed, Apr 19, 2017 at 06:42:39AM -0700, Olof Johansson wrote:
> On Thu, Apr 06, 2017 at 09:48:50PM -0500, Andy Gross wrote:
> > The following changes since commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:
> >
> > Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)
> >
> > are available in the git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git tags/qcom-dts-for-4.12
> >
> > for you to fetch changes up to 21677ecca20151e61c3290ef37c5cd7afec60a5a:
> >
> > Revert "ARM: dts: qcom: msm8974: Add USB gadget nodes" (2017-04-06 18:48:53 -0500)
> >
> > ----------------------------------------------------------------
> > Qualcomm Device Tree Changes for v4.12
> >
> > * Add Coresight components for MSM8974
> > * Fixup MSM8974 ADSP XO clk and add RPMCC node
> > * Fix typo in APQ8060
> > * Add SDCs on MSM8660
> > * Revert MSM8974 USB gadget change due to issues
>
> Merged, thanks. Should the USB gadget revert have been a fix for 4.11 instead?
I vacillated on that. It broke one person using gadget for console, so I suppose it
should be considered a fix for 4.11.
Regards,
Andy
^ permalink raw reply
* [PATCH] ARM: dts: am335x-phycore-som: fix rv4162 compatible
From: Alexandre Belloni @ 2017-04-19 20:30 UTC (permalink / raw)
To: linux-arm-kernel
The rv4162 compatbile string is missing the vendor part, add it.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/am335x-phycore-som.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 14533ff6d0ad..428a25e952b0 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -138,7 +138,7 @@
};
i2c_rtc: rtc at 68 {
- compatible = "rv4162";
+ compatible = "microcrystal,rv4162";
reg = <0x68>;
status = "disabled";
};
--
2.11.0
^ permalink raw reply related
* [PATCH V15 01/11] acpi: apei: read ack upon ghes record consumption
From: Baicar, Tyler @ 2017-04-19 20:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170419183112.x7tmjzpoq7ds64s2@pd.tnic>
On 4/19/2017 12:31 PM, Borislav Petkov wrote:
> On Tue, Apr 18, 2017 at 05:05:13PM -0600, Tyler Baicar wrote:
>> A RAS (Reliability, Availability, Serviceability) controller
>> may be a separate processor running in parallel with OS
>> execution, and may generate error records for consumption by
>> the OS. If the RAS controller produces multiple error records,
>> then they may be overwritten before the OS has consumed them.
>>
>> The Generic Hardware Error Source (GHES) v2 structure
>> introduces the capability for the OS to acknowledge the
>> consumption of the error record generated by the RAS
>> controller. A RAS controller supporting GHESv2 shall wait for
>> the acknowledgment before writing a new error record, thus
>> eliminating the race condition.
>>
>> Add support for parsing of GHESv2 sub-tables as well.
>>
>> Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org>
>> CC: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
>> Reviewed-by: James Morse <james.morse@arm.com>
>> ---
>> drivers/acpi/apei/ghes.c | 55 +++++++++++++++++++++++++++++++++++++++++++++---
>> drivers/acpi/apei/hest.c | 7 ++++--
>> include/acpi/ghes.h | 5 ++++-
>> 3 files changed, 61 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
>> index 79b3c9c..6d87ab7 100644
>> --- a/drivers/acpi/apei/ghes.c
>> +++ b/drivers/acpi/apei/ghes.c
>> @@ -46,6 +46,7 @@
>> #include <linux/nmi.h>
>> #include <linux/sched/clock.h>
>>
>> +#include <acpi/actbl1.h>
>> #include <acpi/ghes.h>
>> #include <acpi/apei.h>
>> #include <asm/tlbflush.h>
>> @@ -80,6 +81,10 @@
>> ((struct acpi_hest_generic_status *) \
>> ((struct ghes_estatus_node *)(estatus_node) + 1))
>>
>> +#define IS_HEST_TYPE_GENERIC_V2(ghes) \
>> + ((struct acpi_hest_header *)ghes->generic)->type == \
> This is a nasty hack: casting the ghes->generic pointer to a pointer of its
> first member which is a acpi_hest_header.
>
> Why isn't this a nice inline function with proper dereferencing:
>
> static inline bool is_hest_type_generic_v2(struct ghes *ghes)
> {
> return ghes->generic->header.type == ACPI_HEST_TYPE_GENERIC_ERROR_V2;
> }
>
> ?
I'll change it to this.
> Also, please integrate scripts/checkpatch.pl in your patch creation
> workflow. Some of the warnings/errors *actually* make sense.
>
>> /*
>> * This driver isn't really modular, however for the time being,
>> * continuing to use module_param is the easiest way to remain
>> @@ -240,6 +245,17 @@ static int ghes_estatus_pool_expand(unsigned long len)
>> return 0;
>> }
>>
>> +static int map_gen_v2(struct ghes *ghes)
>> +{
>> + return apei_map_generic_address(&ghes->generic_v2->read_ack_register);
>> +}
>> +
>> +static void unmap_gen_v2(struct ghes *ghes)
>> +{
>> + apei_unmap_generic_address(&ghes->generic_v2->read_ack_register);
>> + return;
>> +}
> Like this one, for example:
>
> WARNING: void function return statements are not generally useful
> #89: FILE: drivers/acpi/apei/ghes.c:257:
> + return;
> +}
Will remove the return.
>
>> +
>> static struct ghes *ghes_new(struct acpi_hest_generic *generic)
>> {
>> struct ghes *ghes;
>> @@ -249,10 +265,17 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
>> ghes = kzalloc(sizeof(*ghes), GFP_KERNEL);
>> if (!ghes)
>> return ERR_PTR(-ENOMEM);
>> +
>> ghes->generic = generic;
>> + if (IS_HEST_TYPE_GENERIC_V2(ghes)) {
>> + rc = map_gen_v2(ghes);
>> + if (rc)
>> + goto err_free;
>> + }
>> +
>> rc = apei_map_generic_address(&generic->error_status_address);
>> if (rc)
>> - goto err_free;
>> + goto err_unmap_read_ack_addr;
>> error_block_length = generic->error_block_length;
>> if (error_block_length > GHES_ESTATUS_MAX_SIZE) {
>> pr_warning(FW_WARN GHES_PFX
>> @@ -264,13 +287,16 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
>> ghes->estatus = kmalloc(error_block_length, GFP_KERNEL);
>> if (!ghes->estatus) {
>> rc = -ENOMEM;
>> - goto err_unmap;
>> + goto err_unmap_status_addr;
>> }
>>
>> return ghes;
>>
>> -err_unmap:
>> +err_unmap_status_addr:
>> apei_unmap_generic_address(&generic->error_status_address);
>> +err_unmap_read_ack_addr:
>> + if (IS_HEST_TYPE_GENERIC_V2(ghes))
>> + unmap_gen_v2(ghes);
>> err_free:
>> kfree(ghes);
>> return ERR_PTR(rc);
>> @@ -280,6 +306,8 @@ static void ghes_fini(struct ghes *ghes)
>> {
>> kfree(ghes->estatus);
>> apei_unmap_generic_address(&ghes->generic->error_status_address);
>> + if (IS_HEST_TYPE_GENERIC_V2(ghes))
>> + unmap_gen_v2(ghes);
>> }
>>
>> static inline int ghes_severity(int severity)
>> @@ -649,6 +677,21 @@ static void ghes_estatus_cache_add(
>> rcu_read_unlock();
>> }
>>
>> +static int ghes_ack_error(struct acpi_hest_generic_v2 *generic_v2)
> If you name this function parameter to something shorter, say gv2, for
> example...
Will do.
>
>> +{
>> + int rc;
>> + u64 val = 0;
>> +
>> + rc = apei_read(&val, &generic_v2->read_ack_register);
>> + if (rc)
>> + return rc;
>> +
>> + val &= generic_v2->read_ack_preserve << generic_v2->read_ack_register.bit_offset;
>> + val |= generic_v2->read_ack_write << generic_v2->read_ack_register.bit_offset;
> ... you can align those two nicely while remaining within the 80 cols width:
>
> val &= gv2->read_ack_preserve << gv2->read_ack_register.bit_offset;
> val |= gv2->read_ack_write << gv2->read_ack_register.bit_offset;
>
> and make them readable at a quick glance.
Will do.
>> +
>> + return apei_write(val, &generic_v2->read_ack_register);
>> +}
>> +
>> static int ghes_proc(struct ghes *ghes)
>> {
>> int rc;
>> @@ -661,6 +704,12 @@ static int ghes_proc(struct ghes *ghes)
>> ghes_estatus_cache_add(ghes->generic, ghes->estatus);
>> }
>> ghes_do_proc(ghes, ghes->estatus);
> This needs a comment why v2 needs to ACK the error. The commit message
> is not necessarily something we'll find quickly in the future.
Will do.
Thanks,
Tyler
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply
* [PATCH V15 01/11] acpi: apei: read ack upon ghes record consumption
From: Borislav Petkov @ 2017-04-19 20:41 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <d6111739-69ff-bac7-8000-9af937d0a7bb@codeaurora.org>
On Wed, Apr 19, 2017 at 02:31:13PM -0600, Baicar, Tyler wrote:
> Will do.
You don't necessarily have to reply with "will do" if you agree with the
review.
Also, please wait until I've gone through the whole pile before sending
it again.
Thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply
* [PATCH v3 3/4] bluetooth: hci_uart: add LL protocol serdev driver support
From: Rob Herring @ 2017-04-19 20:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAHCN7xLNcD1rmifEOyPhG2rpB_C81hsyzV9W2q6kCQkKa69sZg@mail.gmail.com>
On Mon, Apr 17, 2017 at 3:11 PM, Adam Ford <aford173@gmail.com> wrote:
> On Thu, Apr 13, 2017 at 10:03 AM, Rob Herring <robh@kernel.org> wrote:
>> Turns out that the LL protocol and the TI-ST are the same thing AFAICT.
>> The TI-ST adds firmware loading, GPIO control, and shared access for
>> NFC, FM radio, etc. For now, we're only implementing what is needed for
>> BT. This mirrors other drivers like BCM and Intel, but uses the new
>> serdev bus.
>>
>> The firmware loading is greatly simplified by using existing
>> infrastructure to send commands. It may be a bit slower than the
>> original code using synchronous functions, but the real bottleneck is
>> likely doing firmware load at 115.2kbps.
>
> I am using pdata-quirks to drive my wl1283 Bluetooth on a DM3730. I
> have the Bluetooth set to 3000000 baud in pdata quirks. Looking at
> the binding, I don't see an option to set the baudrate. Is there (or
> will there) be a way to set the baud rate of the Bluetooth?
If you read hci_ti_probe, you will see it is already there. The
default is 3Mbps and the DT can override that with "max-speed". The
intent is that 3Mbps is the max the device can do and max-speed is
only for board or host limitations. Though I just checked the
datasheet on the 1835 and it can go up to 4364kbps. No datasheets for
wl1283, so I have no idea what the max is.
>> +static int hci_ti_probe(struct serdev_device *serdev)
>> +{
>> + struct hci_uart *hu;
>> + struct ll_device *lldev;
>> + u32 max_speed = 3000000;
[...]
>> + of_property_read_u32(serdev->dev.of_node, "max-speed", &max_speed);
>> + hci_uart_set_speeds(hu, 115200, max_speed);
^ permalink raw reply
* [PATCH v2 00/11] soc/fsl/qbman: Enable QBMan on ARM Platforms
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
This patch series enables DPAA1 QBMan devices for ARM and
ARM64 architectures. This allows the LS1043A and LS1046A to use
QBMan functionality.
Changes since v1:
Reworked private memory allocations to use shared-dma-pool on ARM platforms
Claudiu Manoil (2):
soc/fsl/qbman: Drop L1_CACHE_BYTES compile time check
soc/fsl/qbman: Add missing headers on ARM
Madalin Bucur (4):
soc/fsl/qbman: Drop set/clear_bits usage
soc/fsl/qbman: add QMAN_REV32
soc/fsl/qbman: different register offsets on ARM
fsl/soc/qbman: Enable FSL_LAYERSCAPE config on ARM
Roy Pledge (4):
soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations
soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocations
dt-bindings: soc/fsl: Update reserved memory binding for QBMan
soc/fsl/qbman: Rework ioremap() calls for ARM/PPC
Valentin Rothberg (1):
soc/fsl/qbman: Fix ARM32 typo
Documentation/devicetree/bindings/soc/fsl/bman.txt | 11 +-
Documentation/devicetree/bindings/soc/fsl/qman.txt | 18 +--
drivers/soc/fsl/qbman/Kconfig | 2 +-
drivers/soc/fsl/qbman/bman.c | 24 +++-
drivers/soc/fsl/qbman/bman_ccsr.c | 35 +++++-
drivers/soc/fsl/qbman/bman_portal.c | 16 ++-
drivers/soc/fsl/qbman/bman_priv.h | 3 +
drivers/soc/fsl/qbman/dpaa_sys.h | 8 +-
drivers/soc/fsl/qbman/qman.c | 46 ++++++-
drivers/soc/fsl/qbman/qman_ccsr.c | 138 ++++++++++++++++-----
drivers/soc/fsl/qbman/qman_portal.c | 16 ++-
drivers/soc/fsl/qbman/qman_priv.h | 5 +-
drivers/soc/fsl/qbman/qman_test.h | 2 -
13 files changed, 259 insertions(+), 65 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH v2 01/11] soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com>
Use the shared-memory-pool mechanism for free buffer proxy record
area allocation.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/bman_ccsr.c | 35 ++++++++++++++++++++++++++++++++++-
drivers/soc/fsl/qbman/bman_priv.h | 3 +++
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/qbman/bman_ccsr.c b/drivers/soc/fsl/qbman/bman_ccsr.c
index a8e8389..4d2392d 100644
--- a/drivers/soc/fsl/qbman/bman_ccsr.c
+++ b/drivers/soc/fsl/qbman/bman_ccsr.c
@@ -170,10 +170,11 @@ static int fsl_bman_probe(struct platform_device *pdev)
{
int ret, err_irq;
struct device *dev = &pdev->dev;
- struct device_node *node = dev->of_node;
+ struct device_node *mem_node, *node = dev->of_node;
struct resource *res;
u16 id, bm_pool_cnt;
u8 major, minor;
+ u64 size;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -201,6 +202,38 @@ static int fsl_bman_probe(struct platform_device *pdev)
return -ENODEV;
}
+ /*
+ * If FBPR memory wasn't defined using the qbman compatiable string
+ * try using the of_reserved_mem_device method
+ */
+ if (!fbpr_a) {
+ ret = of_reserved_mem_device_init(dev);
+ if (ret) {
+ dev_err(dev, "of_reserved_mem_device_init() failed 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ mem_node = of_parse_phandle(dev->of_node, "memory-region", 0);
+ if (mem_node) {
+ ret = of_property_read_u64(mem_node, "size", &size);
+ if (ret) {
+ dev_err(dev, "FBPR: of_address_to_resource fails 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ fbpr_sz = size;
+ } else {
+ dev_err(dev, "No memory-region found for FBPR\n");
+ return -ENODEV;
+ }
+ if (!dma_zalloc_coherent(dev, fbpr_sz, &fbpr_a, 0)) {
+ dev_err(dev, "Alloc FBPR memory failed\n");
+ return -ENODEV;
+ }
+ }
+
+ dev_info(dev, "Allocated FBPR 0x%llx 0x%zx\n", fbpr_a, fbpr_sz);
+
bm_set_memory(fbpr_a, fbpr_sz);
err_irq = platform_get_irq(pdev, 0);
diff --git a/drivers/soc/fsl/qbman/bman_priv.h b/drivers/soc/fsl/qbman/bman_priv.h
index f6896a2..765a4bf 100644
--- a/drivers/soc/fsl/qbman/bman_priv.h
+++ b/drivers/soc/fsl/qbman/bman_priv.h
@@ -33,6 +33,9 @@
#include "dpaa_sys.h"
#include <soc/fsl/bman.h>
+#include <linux/dma-contiguous.h>
+#include <linux/of_address.h>
+#include <linux/dma-mapping.h>
/* Portal processing (interrupt) sources */
#define BM_PIRQ_RCRI 0x00000002 /* RCR Ring (below threshold) */
--
2.7.4
^ permalink raw reply related
* [PATCH v2 02/11] soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocations
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com>
Use the shared-memory-pool mechanism for frame queue descriptor and
packed frame descriptor record area allocations.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/qman_ccsr.c | 136 +++++++++++++++++++++++++++++---------
drivers/soc/fsl/qbman/qman_priv.h | 4 +-
drivers/soc/fsl/qbman/qman_test.h | 2 -
3 files changed, 107 insertions(+), 35 deletions(-)
diff --git a/drivers/soc/fsl/qbman/qman_ccsr.c b/drivers/soc/fsl/qbman/qman_ccsr.c
index 90bc40c..39ad7c4 100644
--- a/drivers/soc/fsl/qbman/qman_ccsr.c
+++ b/drivers/soc/fsl/qbman/qman_ccsr.c
@@ -401,21 +401,42 @@ static int qm_init_pfdr(struct device *dev, u32 pfdr_start, u32 num)
}
/*
- * Ideally we would use the DMA API to turn rmem->base into a DMA address
- * (especially if iommu translations ever get involved). Unfortunately, the
- * DMA API currently does not allow mapping anything that is not backed with
- * a struct page.
+ * QMan needs two global memory areas initialized at boot time:
+ * 1) FQD: Frame Queue Descriptors used to manage frame queues
+ * 2) PFDR: Packed Frame Queue Descriptor Records used to store frames
+ * Both areas are reserved using the device tree reserved memory framework
+ * and the addresses and sizes are initialized when the QMan device is probed
*/
static dma_addr_t fqd_a, pfdr_a;
static size_t fqd_sz, pfdr_sz;
+#ifdef CONFIG_PPC
+/*
+ * Support for PPC Device Tree backward compatibility when compatiable
+ * string is set to fsl-qman-fqd and fsl-qman-pfdr
+ */
+static int zero_priv_mem(phys_addr_t addr, size_t sz)
+{
+ /* map as cacheable, non-guarded */
+ void __iomem *tmpp = ioremap_prot(addr, sz, 0);
+
+ if (!tmpp)
+ return -ENOMEM;
+
+ memset_io(tmpp, 0, sz);
+ flush_dcache_range((unsigned long)tmpp,
+ (unsigned long)tmpp + sz);
+ iounmap(tmpp);
+
+ return 0;
+}
+
static int qman_fqd(struct reserved_mem *rmem)
{
fqd_a = rmem->base;
fqd_sz = rmem->size;
WARN_ON(!(fqd_a && fqd_sz));
-
return 0;
}
RESERVEDMEM_OF_DECLARE(qman_fqd, "fsl,qman-fqd", qman_fqd);
@@ -431,32 +452,13 @@ static int qman_pfdr(struct reserved_mem *rmem)
}
RESERVEDMEM_OF_DECLARE(qman_pfdr, "fsl,qman-pfdr", qman_pfdr);
+#endif
+
static unsigned int qm_get_fqid_maxcnt(void)
{
return fqd_sz / 64;
}
-/*
- * Flush this memory range from data cache so that QMAN originated
- * transactions for this memory region could be marked non-coherent.
- */
-static int zero_priv_mem(struct device *dev, struct device_node *node,
- phys_addr_t addr, size_t sz)
-{
- /* map as cacheable, non-guarded */
- void __iomem *tmpp = ioremap_prot(addr, sz, 0);
-
- if (!tmpp)
- return -ENOMEM;
-
- memset_io(tmpp, 0, sz);
- flush_dcache_range((unsigned long)tmpp,
- (unsigned long)tmpp + sz);
- iounmap(tmpp);
-
- return 0;
-}
-
static void log_edata_bits(struct device *dev, u32 bit_count)
{
u32 i, j, mask = 0xffffffff;
@@ -687,11 +689,12 @@ static int qman_resource_init(struct device *dev)
static int fsl_qman_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *node = dev->of_node;
+ struct device_node *mem_node, *node = dev->of_node;
struct resource *res;
int ret, err_irq;
u16 id;
u8 major, minor;
+ u64 size;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -727,10 +730,81 @@ static int fsl_qman_probe(struct platform_device *pdev)
qm_channel_caam = QMAN_CHANNEL_CAAM_REV3;
}
- ret = zero_priv_mem(dev, node, fqd_a, fqd_sz);
- WARN_ON(ret);
- if (ret)
- return -ENODEV;
+ if (fqd_a) {
+#ifdef CONFIG_PPC
+ /*
+ * For PPC backward DT compatibility
+ * FQD memory MUST be zero'd by software
+ */
+ zero_priv_mem(fqd_a, fqd_sz);
+#endif
+ } else {
+ /*
+ * Order of memory regions is assumed as FQD followed by PFDR
+ * in order to ensure allocations from the correct regions the
+ * driver initializes then allocates each piece in order
+ */
+ ret = of_reserved_mem_device_init_by_idx(dev, dev->of_node, 0);
+ if (ret) {
+ dev_err(dev, "of_reserved_mem_device_init_by_idx(0) failed 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ mem_node = of_parse_phandle(dev->of_node, "memory-region", 0);
+ if (mem_node) {
+ ret = of_property_read_u64(mem_node, "size", &size);
+ if (ret) {
+ dev_err(dev, "FQD: of_address_to_resource fails 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ fqd_sz = size;
+ } else {
+ dev_err(dev, "No memory-region found for FQD\n");
+ return -ENODEV;
+ }
+ if (!dma_zalloc_coherent(dev, fqd_sz, &fqd_a, 0)) {
+ dev_err(dev, "Alloc FQD memory failed\n");
+ return -ENODEV;
+ }
+
+ /*
+ * Disassociate the FQD reseverd memory area from the device
+ * because a device can only have one DMA memory area. This
+ * should be fine since the memory is allocated and initialized
+ * and only ever accessed by the QMan device from now on
+ */
+ of_reserved_mem_device_release(dev);
+ }
+ dev_info(dev, "Allocated FQD 0x%llx 0x%zx\n", fqd_a, fqd_sz);
+
+ if (!pfdr_a) {
+ /* Setup PFDR memory */
+ ret = of_reserved_mem_device_init_by_idx(dev, dev->of_node, 1);
+ if (ret) {
+ dev_err(dev, "of_reserved_mem_device_init(1) failed 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ mem_node = of_parse_phandle(dev->of_node, "memory-region", 1);
+ if (mem_node) {
+ ret = of_property_read_u64(mem_node, "size", &size);
+ if (ret) {
+ dev_err(dev, "PFDR: of_address_to_resource fails 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ pfdr_sz = size;
+ } else {
+ dev_err(dev, "No memory-region found for PFDR\n");
+ return -ENODEV;
+ }
+ if (!dma_zalloc_coherent(dev, pfdr_sz, &pfdr_a, 0)) {
+ dev_err(dev, "Alloc PFDR Failed size 0x%zx\n", pfdr_sz);
+ return -ENODEV;
+ }
+ }
+ dev_info(dev, "Allocated PFDR 0x%llx 0x%zx\n", pfdr_a, pfdr_sz);
ret = qman_init_ccsr(dev);
if (ret) {
diff --git a/drivers/soc/fsl/qbman/qman_priv.h b/drivers/soc/fsl/qbman/qman_priv.h
index 22725bd..1e998ea5 100644
--- a/drivers/soc/fsl/qbman/qman_priv.h
+++ b/drivers/soc/fsl/qbman/qman_priv.h
@@ -28,12 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
#include "dpaa_sys.h"
#include <soc/fsl/qman.h>
#include <linux/iommu.h>
+#include <linux/dma-contiguous.h>
+#include <linux/of_address.h>
#if defined(CONFIG_FSL_PAMU)
#include <asm/fsl_pamu_stash.h>
diff --git a/drivers/soc/fsl/qbman/qman_test.h b/drivers/soc/fsl/qbman/qman_test.h
index d5f8cb2..41bdbc48 100644
--- a/drivers/soc/fsl/qbman/qman_test.h
+++ b/drivers/soc/fsl/qbman/qman_test.h
@@ -30,7 +30,5 @@
#include "qman_priv.h"
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
int qman_test_stash(void);
int qman_test_api(void);
--
2.7.4
^ permalink raw reply related
* [PATCH v2 03/11] dt-bindings: soc/fsl: Update reserved memory binding for QBMan
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com>
Updates the QMan and BMan device tree bindings for reserved memory
nodes. This makes the reserved memory allocation compatiable with
the shared-dma-pool usage.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
Documentation/devicetree/bindings/soc/fsl/bman.txt | 11 ++++++-----
Documentation/devicetree/bindings/soc/fsl/qman.txt | 18 +++++++++++-------
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/fsl/bman.txt b/Documentation/devicetree/bindings/soc/fsl/bman.txt
index 47ac834..3cd1e2c 100644
--- a/Documentation/devicetree/bindings/soc/fsl/bman.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/bman.txt
@@ -65,8 +65,8 @@ to the respective BMan instance
BMan Private Memory Node
BMan requires a contiguous range of physical memory used for the backing store
-for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as a
-node under the /reserved-memory node
+for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as
+a node under the /reserved-memory node.
The BMan FBPR memory node must be named "bman-fbpr"
@@ -75,7 +75,8 @@ PROPERTIES
- compatible
Usage: required
Value type: <stringlist>
- Definition: Must inclide "fsl,bman-fbpr"
+ Definition: PPC platforms: Must include "fsl,bman-fbpr"
+ ARM platforms: Must include "shared-dma-pool"
The following constraints are relevant to the FBPR private memory:
- The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to
@@ -100,10 +101,10 @@ The example below shows a BMan FBPR dynamic allocation memory node
ranges;
bman_fbpr: bman-fbpr {
- compatible = "fsl,bman-fbpr";
- alloc-ranges = <0 0 0x10 0>;
+ compatible = "shared-mem-pool";
size = <0 0x1000000>;
alignment = <0 0x1000000>;
+ no-map;
};
};
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman.txt b/Documentation/devicetree/bindings/soc/fsl/qman.txt
index 556ebb8..8cd20c0 100644
--- a/Documentation/devicetree/bindings/soc/fsl/qman.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/qman.txt
@@ -74,7 +74,9 @@ QMan Private Memory Nodes
QMan requires two contiguous range of physical memory used for the backing store
for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR).
-This memory is reserved/allocated as a nodes under the /reserved-memory node
+This memory is reserved/allocated as a node under the /reserved-memory node.
+
+For additional details about reserved memory regions see reserved-memory.txt
The QMan FQD memory node must be named "qman-fqd"
@@ -83,7 +85,8 @@ PROPERTIES
- compatible
Usage: required
Value type: <stringlist>
- Definition: Must inclide "fsl,qman-fqd"
+ Definition: PPC platforms: Must include "fsl,qman-fqd"
+ ARM platforms: Must include "shared-dma-pool"
The QMan PFDR memory node must be named "qman-pfdr"
@@ -92,7 +95,8 @@ PROPERTIES
- compatible
Usage: required
Value type: <stringlist>
- Definition: Must inclide "fsl,qman-pfdr"
+ Definition: PPC platforms: Must include "fsl,qman-pfdr"
+ ARM platforms: Must include "shared-dma-pool"
The following constraints are relevant to the FQD and PFDR private memory:
- The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to
@@ -117,16 +121,16 @@ The example below shows a QMan FQD and a PFDR dynamic allocation memory nodes
ranges;
qman_fqd: qman-fqd {
- compatible = "fsl,qman-fqd";
- alloc-ranges = <0 0 0x10 0>;
+ compatible = "shared-dma-pool";
size = <0 0x400000>;
alignment = <0 0x400000>;
+ no-map;
};
qman_pfdr: qman-pfdr {
- compatible = "fsl,qman-pfdr";
- alloc-ranges = <0 0 0x10 0>;
+ compatible = "shared-dma-pool";
size = <0 0x2000000>;
alignment = <0 0x2000000>;
+ no-map;
};
};
--
2.7.4
^ permalink raw reply related
* [PATCH v2 04/11] soc/fsl/qbman: Drop set/clear_bits usage
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com>
From: Madalin Bucur <madalin.bucur@nxp.com>
Replace PPC specific set/clear_bits API with standard
bit twiddling so driver is portalable outside PPC.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/bman.c | 2 +-
drivers/soc/fsl/qbman/qman.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c
index a3d6d7c..3acded1 100644
--- a/drivers/soc/fsl/qbman/bman.c
+++ b/drivers/soc/fsl/qbman/bman.c
@@ -607,7 +607,7 @@ int bman_p_irqsource_add(struct bman_portal *p, u32 bits)
unsigned long irqflags;
local_irq_save(irqflags);
- set_bits(bits & BM_PIRQ_VISIBLE, &p->irq_sources);
+ p->irq_sources |= bits & BM_PIRQ_VISIBLE;
bm_out(&p->p, BM_REG_IER, p->irq_sources);
local_irq_restore(irqflags);
return 0;
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 3d891db..3f60289 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -909,12 +909,12 @@ static inline int qm_mc_result_timeout(struct qm_portal *portal,
static inline void fq_set(struct qman_fq *fq, u32 mask)
{
- set_bits(mask, &fq->flags);
+ fq->flags |= mask;
}
static inline void fq_clear(struct qman_fq *fq, u32 mask)
{
- clear_bits(mask, &fq->flags);
+ fq->flags &= ~mask;
}
static inline int fq_isset(struct qman_fq *fq, u32 mask)
@@ -1561,7 +1561,7 @@ void qman_p_irqsource_add(struct qman_portal *p, u32 bits)
unsigned long irqflags;
local_irq_save(irqflags);
- set_bits(bits & QM_PIRQ_VISIBLE, &p->irq_sources);
+ p->irq_sources |= bits & QM_PIRQ_VISIBLE;
qm_out(&p->p, QM_REG_IER, p->irq_sources);
local_irq_restore(irqflags);
}
@@ -1584,7 +1584,7 @@ void qman_p_irqsource_remove(struct qman_portal *p, u32 bits)
*/
local_irq_save(irqflags);
bits &= QM_PIRQ_VISIBLE;
- clear_bits(bits, &p->irq_sources);
+ p->irq_sources &= ~bits;
qm_out(&p->p, QM_REG_IER, p->irq_sources);
ier = qm_in(&p->p, QM_REG_IER);
/*
--
2.7.4
^ permalink raw reply related
* [PATCH v2 05/11] soc/fsl/qbman: Drop L1_CACHE_BYTES compile time check
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com>
From: Claudiu Manoil <claudiu.manoil@nxp.com>
Not relevant and arch dependent. Overkill for PPC.
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/dpaa_sys.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/soc/fsl/qbman/dpaa_sys.h b/drivers/soc/fsl/qbman/dpaa_sys.h
index 2ce394a..f85c319 100644
--- a/drivers/soc/fsl/qbman/dpaa_sys.h
+++ b/drivers/soc/fsl/qbman/dpaa_sys.h
@@ -49,10 +49,6 @@
#define DPAA_PORTAL_CE 0
#define DPAA_PORTAL_CI 1
-#if (L1_CACHE_BYTES != 32) && (L1_CACHE_BYTES != 64)
-#error "Unsupported Cacheline Size"
-#endif
-
static inline void dpaa_flush(void *p)
{
#ifdef CONFIG_PPC
--
2.7.4
^ permalink raw reply related
* [PATCH v2 06/11] soc/fsl/qbman: Fix ARM32 typo
From: Roy Pledge @ 2017-04-19 20:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com>
From: Valentin Rothberg <valentinrothberg@gmail.com>
The Kconfig symbol for 32bit ARM is 'ARM', not 'ARM32'.
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/dpaa_sys.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/qbman/dpaa_sys.h b/drivers/soc/fsl/qbman/dpaa_sys.h
index f85c319..81a9a5e 100644
--- a/drivers/soc/fsl/qbman/dpaa_sys.h
+++ b/drivers/soc/fsl/qbman/dpaa_sys.h
@@ -53,7 +53,7 @@ static inline void dpaa_flush(void *p)
{
#ifdef CONFIG_PPC
flush_dcache_range((unsigned long)p, (unsigned long)p+64);
-#elif defined(CONFIG_ARM32)
+#elif defined(CONFIG_ARM)
__cpuc_flush_dcache_area(p, 64);
#elif defined(CONFIG_ARM64)
__flush_dcache_area(p, 64);
--
2.7.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox