* [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c
@ 2009-07-20 11:51 Mark Ware
2009-07-27 22:16 ` Scott Wood
2009-07-30 4:22 ` Kumar Gala
0 siblings, 2 replies; 4+ messages in thread
From: Mark Ware @ 2009-07-20 11:51 UTC (permalink / raw)
To: Linuxppc-dev Development
This is another alloc_bootmem() -> kzalloc() change, this time to
fix the non-fatal badness caused when booting with a cpm2_uart console.
Signed-Off-By: Mark Ware <mware@elphinstone.net>
---
drivers/serial/cpm_uart/cpm_uart_cpm2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index 141c0a3..a9802e7 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -132,7 +132,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo,
unsigned int is_con)
memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
if (is_con) {
- mem_addr = alloc_bootmem(memsz);
+ mem_addr = kzalloc(memsz, GFP_NOWAIT);
dma_addr = virt_to_bus(mem_addr);
}
else
--
1.5.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c
2009-07-20 11:51 [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c Mark Ware
@ 2009-07-27 22:16 ` Scott Wood
2009-07-29 3:46 ` Mark Ware
2009-07-30 4:22 ` Kumar Gala
1 sibling, 1 reply; 4+ messages in thread
From: Scott Wood @ 2009-07-27 22:16 UTC (permalink / raw)
To: Mark Ware; +Cc: Linuxppc-dev Development
On Mon, Jul 20, 2009 at 09:51:03PM +1000, Mark Ware wrote:
> This is another alloc_bootmem() -> kzalloc() change, this time to
> fix the non-fatal badness caused when booting with a cpm2_uart console.
>
> Signed-Off-By: Mark Ware <mware@elphinstone.net>
>
> ---
> drivers/serial/cpm_uart/cpm_uart_cpm2.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
> b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
> index 141c0a3..a9802e7 100644
> --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
> +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
> @@ -132,7 +132,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo,
> unsigned int is_con)
> memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
> L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
> if (is_con) {
> - mem_addr = alloc_bootmem(memsz);
> + mem_addr = kzalloc(memsz, GFP_NOWAIT);
> dma_addr = virt_to_bus(mem_addr);
> }
Hmm, is dma_alloc_coherent() now available this early as well? If so, we
could get rid of the separate "is_con" handling altogether.
-Scott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c
2009-07-27 22:16 ` Scott Wood
@ 2009-07-29 3:46 ` Mark Ware
0 siblings, 0 replies; 4+ messages in thread
From: Mark Ware @ 2009-07-29 3:46 UTC (permalink / raw)
To: Scott Wood; +Cc: Linuxppc-dev Development
Scott Wood wrote:
> On Mon, Jul 20, 2009 at 09:51:03PM +1000, Mark Ware wrote:
>> This is another alloc_bootmem() -> kzalloc() change, this time to
>> fix the non-fatal badness caused when booting with a cpm2_uart console.
>>
>> Signed-Off-By: Mark Ware <mware@elphinstone.net>
>>
>> ---
>> drivers/serial/cpm_uart/cpm_uart_cpm2.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
>> b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
>> index 141c0a3..a9802e7 100644
>> --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
>> +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
>> @@ -132,7 +132,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo,
>> unsigned int is_con)
>> memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
>> L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
>> if (is_con) {
>> - mem_addr = alloc_bootmem(memsz);
>> + mem_addr = kzalloc(memsz, GFP_NOWAIT);
>> dma_addr = virt_to_bus(mem_addr);
>> }
>
> Hmm, is dma_alloc_coherent() now available this early as well? If so, we
> could get rid of the separate "is_con" handling altogether.
>
> -Scott
>
This was my first thought as well, but calling dma_alloc_coherent() on a console resulted in a hang on boot before any console output.
I have no actual proof, but it seems likely that it is not available at that point in the boot.
Regards,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c
2009-07-20 11:51 [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c Mark Ware
2009-07-27 22:16 ` Scott Wood
@ 2009-07-30 4:22 ` Kumar Gala
1 sibling, 0 replies; 4+ messages in thread
From: Kumar Gala @ 2009-07-30 4:22 UTC (permalink / raw)
To: Mark Ware; +Cc: Linuxppc-dev Development
On Jul 20, 2009, at 6:51 AM, Mark Ware wrote:
> This is another alloc_bootmem() -> kzalloc() change, this time to
> fix the non-fatal badness caused when booting with a cpm2_uart
> console.
>
> Signed-Off-By: Mark Ware <mware@elphinstone.net>
>
> ---
> drivers/serial/cpm_uart/cpm_uart_cpm2.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
applied to merge (had to fix up patch by hand).
- k
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-30 4:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-20 11:51 [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c Mark Ware
2009-07-27 22:16 ` Scott Wood
2009-07-29 3:46 ` Mark Ware
2009-07-30 4:22 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).