Skip to contentSkip to conversation

ARM: davinci: Changed pr_warning() to pr_warn()

PATCH Superseded Sergei Shtylyov 5 participants 7 messages Oct 26, 2012 – Nov 7, 2012 2 messages not in the archive

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#1 lore raw

PATCH v2 1/6 ARM: davinci: Changed pr_warning() to pr_warn()

In reply to a message not in the archive

Hello.

It's not a good idea to send multiple patches with the same subject.
Actually, in this case it's worth merging all 4 patches into one.

Quoted 9 lines · Robert Tivy

Also, while modifying those pr_warning() calls I changed hardcoded function names to use '"%s:", __func__' instead

---
Clean up files that will be otherwise modified in subsequent patch.

Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92) of Linus' mainline kernel at git.kernel.org.

    3.5 is too old. Why not to 3.6 or even 3.7-rc2?
Quoted 4 lines
arch/arm/mach-davinci/board-da850-evm.c +0 -0
index 0149fb4..bbb3c73 100644

[...]

Quoted 7 lines
arch/arm/mach-davinci/board-da850-evm.c +1 -2
@@ -1046,21 +1046,19 @@ static int __init da850_evm_config_emac(void)
 	}
 
 	if (ret)
-		pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
-				ret);
+		pr_warn("%s: cpgmac/rmii mux setup failed: %d\n",

arch/arm/mach-davinci/board-da850-evm.c static int __init da850_evm_config_emac(void) · line 1057

Quoted 10 lines
arch/arm/mach-davinci/board-da850-evm.c +2 -2
+			__func__, ret);
 
 	/* configure the CFGCHIP3 register for RMII or MII */
 	__raw_writel(val, cfg_chip3_base);
 
 	ret = davinci_cfg_reg(DA850_GPIO2_6);
 	if (ret)
-		pr_warning("da850_evm_init:GPIO(2,6) mux setup "
-							"failed\n");
+		pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);

Worth inserting space after colon here.

WBR, Sergei

#2 lore raw

PATCH v2 1/6 ARM: davinci: Changed pr_warning() to pr_warn()

Thanks for your comments, Sergei. Please see below...

Quoted 9 lines

-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov at mvista.com]
Sent: Friday, October 26, 2012 2:46 AM
To: Tivy, Robert
Cc: davinci-linux-open-source at linux.davincidsp.com; linux-arm- kernel at lists.infradead.org; Ring, Chris; Grosen, Mark; Nori, Sekhar
Subject: Re: [PATCH v2 1/6] ARM: davinci: Changed pr_warning() to pr_warn()

Quoted 5 lines

Hello.

It's not a good idea to send multiple patches with the same
subject.
Actually, in this case it's worth merging all 4 patches into one.

My first patch submission had them all as one patch, but Sekhar asked that they be split into 4 separate patches to make the merge easier.

I can make each one have a different subject, though.

Quoted 10 lines · Robert Tivy
Quoted 7 lines

Also, while modifying those pr_warning() calls I changed hardcoded function names to use '"%s:", __func__' instead

---
Clean up files that will be otherwise modified in subsequent patch.

Quoted 5 lines
Quoted 1 line

Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92)

of

Quoted 1 line

Linus' mainline kernel at git.kernel.org.

    3.5 is too old. Why not to 3.6 or even 3.7-rc2?

I will attempt to recreate this patch series on 3.7-rc2, although I will need to change it to use the newer "rproc" APIs and data structures.

Quoted 20 lines

arch/arm/mach-

Quoted 2 lines
arch/arm/mach- renamed from arch/arm/mach-davinci/board-da850-evm.c +0 -0

davinci/board-da850-evm.c

Quoted 3 lines

index 0149fb4..bbb3c73 100644

arch/arm/mach-davinci/board-da850-evm.c +0 -0

[...]

arch/arm/mach-davinci/board-da850-evm.c static int __init da850_evm_config_emac(void) · line 1049

Quoted 5 lines
arch/arm/mach-davinci/board-da850-evm.c +0 -1
@@ -1046,21 +1046,19 @@ static int __init da850_evm_config_emac(void)
 	}
 
 	if (ret)
-		pr_warning("da850_evm_init: cpgmac/rmii mux setup failed:

%d\n",

Quoted 7 lines
arch/arm/mach-davinci/board-da850-evm.c +2 -1
-				ret);
+		pr_warn("%s: cpgmac/rmii mux setup failed: %d\n",
+			__func__, ret);
 
 	/* configure the CFGCHIP3 register for RMII or MII */
 	__raw_writel(val, cfg_chip3_base);
 
Quoted 7 lines

arch/arm/mach-davinci/board-da850-evm.c static int __init da850_evm_config_emac(void) · line 1057

Quoted 5 lines
arch/arm/mach-davinci/board-da850-evm.c +1 -2
 	ret = davinci_cfg_reg(DA850_GPIO2_6);
 	if (ret)
-		pr_warning("da850_evm_init:GPIO(2,6) mux setup "
-							"failed\n");
+		pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);

Worth inserting space after colon here.

Will do.

Quoted 2 lines

WBR, Sergei

Thanks & Regards,

- Rob

#3 lore raw

PATCH v2 1/6 ARM: davinci: Changed pr_warning() to pr_warn()

Quoted 13 lines · Robert

Thanks for your comments, Sergei. Please see below...

Quoted 11 lines

-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov at mvista.com]
Sent: Friday, October 26, 2012 2:46 AM
To: Tivy, Robert
Cc: davinci-linux-open-source at linux.davincidsp.com; linux-arm- kernel at lists.infradead.org; Ring, Chris; Grosen, Mark; Nori, Sekhar
Subject: Re: [PATCH v2 1/6] ARM: davinci: Changed pr_warning() to pr_warn()

Hello.

Quoted 7 lines
Quoted 3 lines

It's not a good idea to send multiple patches with the same
subject.
Actually, in this case it's worth merging all 4 patches into one.

My first patch submission had them all as one patch, but Sekhar asked that they be split into 4 separate patches to make the merge easier.

I can make each one have a different subject, though.

Yes, it was I who asked for the patch to be separated out. My main motivation was to keep board and soc file changes from mixing together. The subject line for each patch should be different though.

Quoted 11 lines
Quoted 11 lines · Robert Tivy
Quoted 7 lines

Also, while modifying those pr_warning() calls I changed hardcoded function names to use '"%s:", __func__' instead

---
Clean up files that will be otherwise modified in subsequent patch.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Applies to v3.5 tag (commit 28a33cbc24e4256c143dce96c7d93bf423229f92)

of

Quoted 1 line

Linus' mainline kernel at git.kernel.org.

    3.5 is too old. Why not to 3.6 or even 3.7-rc2?

I will attempt to recreate this patch series on 3.7-rc2, although I will need to change it to use the newer "rproc" APIs and data structures.

All the more reason to rebase to v3.7-rc2!

Thanks,
Sekhar

#5 lore raw

PATCH v2 5/6 ARM: davinci: remoteproc board support for OMAP-L138 DSP

In reply to a message not in the archive

Hi Rob,

Quoted 13 lines · Robert Tivy

[...]

(quoted diff) +8 -0
@@ -660,6 +667,99 @@ int __init da850_register_mmcsd1(struct davinci_mmc_config *config)
 }
 #endif
 
+static struct platform_device *da8xx_dsp;
+
+#ifdef CONFIG_CMA
+
+/*
+ * The following address range was chosen because the XDC Platform for
+ * OMAP-L138 DSP has this range as its default code/data placement.
+ */

Review int __init da850_register_mmcsd1(struct davinci_mmc_config *config)

Quoted 10 lines
(quoted diff) +9 -0
+#define DA8XX_RPROC_CMA_BASE  (0xc3000000)
[...]
+/*
+ * The following address range was chosen because the XDC Platform for
+ * OMAP-L138 DSP has this range as its default code/data placement.
+ *
+ * System integrators must ensure that Linux does not own this range.
+ */
+#define DA_CONTIG_BASE (0xc3000000)
+#define DA_CONTIG_SIZE (0x02000000)

I am concerned with the rigidity of the memory hole as its definition is currently proposed.

As you noted DA_CONTIG_BASE and DA_CONTIG_SIZE must describe a range that is not used by Linux. Ideally this hole would not be in the middle of the usuable memory but instead at the top. For L138 boards with larger DDR packages this would mean carrying a patch to this file.

I think the same also applies to DA8XX_RPROC_CMA_BASE but I have no hands-on experience yet with CMA.

Is there any other means by which the hole's location and size can be specified which does not require patching this file? I imagine KConfig would work, but is this an acceptable use of KConfig?

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

#6 lore raw

PATCH v2 5/6 ARM: davinci: remoteproc board support for OMAP-L138 DSP

Hi Robert,

Quoted 18 lines · Ben Gardiner

Hi Rob,

Quoted 15 lines · Robert Tivy

[...]

(quoted diff) +9 -0
@@ -660,6 +667,99 @@ int __init da850_register_mmcsd1(struct davinci_mmc_config *config)
 }
 #endif
 
+static struct platform_device *da8xx_dsp;
+
+#ifdef CONFIG_CMA
+
+/*
+ * The following address range was chosen because the XDC Platform for
+ * OMAP-L138 DSP has this range as its default code/data placement.
+ */
+#define DA8XX_RPROC_CMA_BASE  (0xc3000000)
[...]
Quoted 9 lines

Review

Quoted 8 lines
(quoted diff) +8 -0
+/*
+ * The following address range was chosen because the XDC Platform for
+ * OMAP-L138 DSP has this range as its default code/data placement.
+ *
+ * System integrators must ensure that Linux does not own this range.
+ */
+#define DA_CONTIG_BASE (0xc3000000)
+#define DA_CONTIG_SIZE (0x02000000)

Is there a specific requirement for the dsp dev to have the buffers from this '0xc3000000' address range only ? If yes then dma_declare_contiguous() is must to ensure contiguous memory so the above macros cant be avoided. If there isn?t a requirement of a specific region for dsp device you can use a global CMA instead, so as to ensure you have contiguous memory.

Regards,
--Prabhakar Lad

Quoted 26 lines

I am concerned with the rigidity of the memory hole as its definition is currently proposed.

As you noted DA_CONTIG_BASE and DA_CONTIG_SIZE must describe a range that is not used by Linux. Ideally this hole would not be in the middle of the usuable memory but instead at the top. For L138 boards with larger DDR packages this would mean carrying a patch to this file.

I think the same also applies to DA8XX_RPROC_CMA_BASE but I have no hands-on experience yet with CMA.

Is there any other means by which the hole's location and size can be specified which does not require patching this file? I imagine KConfig would work, but is this an acceptable use of KConfig?

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source at linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

#7 lore raw

PATCH v2 5/6 ARM: davinci: remoteproc board support for OMAP-L138 DSP

Hi Prabhakar,

Thanks for your consideration, please see my response below...

Quoted 44 lines

-----Original Message-----
From: Prabhakar Lad [mailto:prabhakar.csengg at gmail.com]
Sent: Monday, November 05, 2012 9:02 PM
To: Tivy, Robert; Ben Gardiner
Cc: davinci-linux-open-source at linux.davincidsp.com; linux-arm- kernel at lists.infradead.org; Marek Szyprowski
Subject: Re: [PATCH v2 5/6] ARM: davinci: remoteproc board support for OMAP-L138 DSP

Hi Robert,

Quoted 5 lines · Ben Gardiner

Hi Rob,

Review int __init da850_register_mmcsd1(struct

Quoted 2 lines · Robert Tivy

[...]

(quoted diff) +0 -0
@@ -660,6 +667,99 @@ int __init da850_register_mmcsd1(struct

davinci_mmc_config *config)

Quoted 9 lines

Review int __init da850_register_mmcsd1(struct · line 675

Quoted 9 lines
(quoted diff) +6 -0
 }
 #endif
 
+static struct platform_device *da8xx_dsp;
+
+#ifdef CONFIG_CMA
+
+/*
+ * The following address range was chosen because the XDC Platform

for

Quoted 6 lines

Review int __init da850_register_mmcsd1(struct

Quoted 6 lines
(quoted diff) +5 -0
+ * OMAP-L138 DSP has this range as its default code/data placement.
+ */
+#define DA8XX_RPROC_CMA_BASE  (0xc3000000)
[...]
+/*
+ * The following address range was chosen because the XDC Platform

for

Quoted 3 lines
Quoted 3 lines

+ * OMAP-L138 DSP has this range as its default code/data placement.
+ *
+ * System integrators must ensure that Linux does not own this

range.

Quoted 4 lines

Review

Quoted 3 lines

+ */

(quoted diff) +2 -0
+#define DA_CONTIG_BASE (0xc3000000)
+#define DA_CONTIG_SIZE (0x02000000)
Quoted 9 lines

Is there a specific requirement for the dsp dev to have the buffers from
this '0xc3000000' address range only ? If yes then dma_declare_contiguous()
is must to ensure contiguous memory so the above macros cant be avoided.
If there isn't a requirement of a specific region for dsp device you can use a
global CMA instead, so as to ensure you have contiguous memory.

The requirement is that the contiguous buffer matches the address range to which the DSP image was linked, including uninitialized sections that don't actually get loaded.

I was thinking of making those #defines into Kconfig variables, so that kernel sources don't need to be touched by the end customer. Another alternative is to make them be kernel command line variables, which would prevent the need to even rebuild the kernel. What are your thoughts regarding those alternatives?

The above address range was decided upon because it matches the RTSC platform's defined area for OMAP-L138 [1] (although, the customer can end up redefining that range). One of the reasons that range was chosen for the RTSC platform is that it exists on boards with smaller DDR sizes. In other words, for a board with 256MB of DDR, if a range at the top of the DDR address space was chosen then that DSP image wouldn't work with a board with only 128MB.

Regards,

- Rob

[1] http://rtsc.eclipse.org/cdoc-tip/index.html#ti/platforms/evmOMAPL138/Platform.html#per-instance_config_parameters, however, we extended the range an additional 16MB beyond the RTSC platform's range.

Quoted 32 lines

Regards,
--Prabhakar Lad

Quoted 9 lines

I am concerned with the rigidity of the memory hole as its definition is currently proposed.

As you noted DA_CONTIG_BASE and DA_CONTIG_SIZE must describe a range that is not used by Linux. Ideally this hole would not be in the middle of the usuable memory but instead at the top. For L138 boards with larger DDR packages this would mean carrying a patch to this file.

Quoted 5 lines

I think the same also applies to DA8XX_RPROC_CMA_BASE but I have no hands-on experience yet with CMA.

Is there any other means by which the hole's location and size can be specified which does not require patching this file? I imagine

KConfig

Quoted 5 lines

would work, but is this an acceptable use of KConfig?

Best Regards,
Ben Gardiner

Quoted 7 lines

---
Nanometrics Inc.
http://www.nanometrics.ca
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source at linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-

source

#8 lore raw

PATCH v2 5/6 ARM: davinci: remoteproc board support for OMAP-L138 DSP

Hi Robert,

Quoted 58 lines · Robert

Hi Prabhakar,

Thanks for your consideration, please see my response below...

Quoted 44 lines

-----Original Message-----
From: Prabhakar Lad [mailto:prabhakar.csengg at gmail.com]
Sent: Monday, November 05, 2012 9:02 PM
To: Tivy, Robert; Ben Gardiner
Cc: davinci-linux-open-source at linux.davincidsp.com; linux-arm- kernel at lists.infradead.org; Marek Szyprowski
Subject: Re: [PATCH v2 5/6] ARM: davinci: remoteproc board support for OMAP-L138 DSP

Hi Robert,

Quoted 5 lines · Ben Gardiner

Hi Rob,

Review int __init da850_register_mmcsd1(struct

Quoted 2 lines · Robert Tivy

[...]

(quoted diff) +0 -0
@@ -660,6 +667,99 @@ int __init da850_register_mmcsd1(struct

davinci_mmc_config *config)

Quoted 9 lines

Review int __init da850_register_mmcsd1(struct · line 675

Quoted 9 lines
(quoted diff) +6 -0
 }
 #endif
 
+static struct platform_device *da8xx_dsp;
+
+#ifdef CONFIG_CMA
+
+/*
+ * The following address range was chosen because the XDC Platform

for

Quoted 6 lines

Review int __init da850_register_mmcsd1(struct

Quoted 6 lines
(quoted diff) +5 -0
+ * OMAP-L138 DSP has this range as its default code/data placement.
+ */
+#define DA8XX_RPROC_CMA_BASE  (0xc3000000)
[...]
+/*
+ * The following address range was chosen because the XDC Platform

for

Quoted 3 lines
Quoted 3 lines

+ * OMAP-L138 DSP has this range as its default code/data placement.
+ *
+ * System integrators must ensure that Linux does not own this

range.

Quoted 4 lines

Review

Quoted 3 lines

+ */

(quoted diff) +2 -0
+#define DA_CONTIG_BASE (0xc3000000)
+#define DA_CONTIG_SIZE (0x02000000)
Quoted 9 lines

Is there a specific requirement for the dsp dev to have the buffers from
this '0xc3000000' address range only ? If yes then dma_declare_contiguous()
is must to ensure contiguous memory so the above macros cant be avoided.
If there isn't a requirement of a specific region for dsp device you can use a
global CMA instead, so as to ensure you have contiguous memory.

Quoted 3 lines

The requirement is that the contiguous buffer matches the address range to which the DSP image was linked, including uninitialized sections that don't actually get loaded.

I was thinking of making those #defines into Kconfig variables, so that kernel sources don't need to be touched by the end customer. Another alternative is to make them be kernel command line variables, which would prevent the need to even rebuild the kernel. What are your thoughts regarding those alternatives?

In either cases you still need a value which defaults, if the range was not specified in command line or Kconfig value wasn?t set. In this case you still need a macro with default value.

I would prefer passing the range as part of command line as it would avoid rebuilding.

Regards,
--Prabhakar Lad

Quoted 41 lines

The above address range was decided upon because it matches the RTSC platform's defined area for OMAP-L138 [1] (although, the customer can end up redefining that range). One of the reasons that range was chosen for the RTSC platform is that it exists on boards with smaller DDR sizes. In other words, for a board with 256MB of DDR, if a range at the top of the DDR address space was chosen then that DSP image wouldn't work with a board with only 128MB.

Regards,

- Rob

[1] http://rtsc.eclipse.org/cdoc-tip/index.html#ti/platforms/evmOMAPL138/Platform.html#per-instance_config_parameters, however, we extended the range an additional 16MB beyond the RTSC platform's range.

Quoted 32 lines

Regards,
--Prabhakar Lad

Quoted 9 lines

I am concerned with the rigidity of the memory hole as its definition is currently proposed.

As you noted DA_CONTIG_BASE and DA_CONTIG_SIZE must describe a range that is not used by Linux. Ideally this hole would not be in the middle of the usuable memory but instead at the top. For L138 boards with larger DDR packages this would mean carrying a patch to this file.

Quoted 5 lines

I think the same also applies to DA8XX_RPROC_CMA_BASE but I have no hands-on experience yet with CMA.

Is there any other means by which the hole's location and size can be specified which does not require patching this file? I imagine

KConfig

Quoted 5 lines

would work, but is this an acceptable use of KConfig?

Best Regards,
Ben Gardiner

Quoted 7 lines

---
Nanometrics Inc.
http://www.nanometrics.ca
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source at linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-

source