2010-06-29 06:51:16

by FUJITA Tomonori

[permalink] [raw]
Subject: [PATCH] parisc: set ARCH_KMALLOC_MINALIGN

This is a resend:

http://marc.info/?t=127432584100006&r=1&w=2

I thought that it was merged but seems that it was lost somewhere?

=
From: FUJITA Tomonori <[email protected]>
Subject: [PATCH] parisc: set ARCH_KMALLOC_MINALIGN

Architectures that handle DMA-non-coherent memory need to set
ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe:
the buffer doesn't share a cache with the others.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: [email protected]
---
arch/parisc/include/asm/cache.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/parisc/include/asm/cache.h b/arch/parisc/include/asm/cache.h
index 45effe6..5d87f27 100644
--- a/arch/parisc/include/asm/cache.h
+++ b/arch/parisc/include/asm/cache.h
@@ -22,6 +22,8 @@
#define L1_CACHE_SHIFT 5
#endif

+#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
+
#ifndef __ASSEMBLY__

#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
--
1.6.5


2010-06-29 14:07:30

by Matt Turner

[permalink] [raw]
Subject: Re: [PATCH] parisc: set ARCH_KMALLOC_MINALIGN

On Tue, Jun 29, 2010 at 2:50 AM, FUJITA Tomonori
<[email protected]> wrote:
> This is a resend:
>
> http://marc.info/?t=127432584100006&r=1&w=2
>
> I thought that it was merged but seems that it was lost somewhere?
>
> =
> From: FUJITA Tomonori <[email protected]>
> Subject: [PATCH] parisc: set ARCH_KMALLOC_MINALIGN
>
> Architectures that handle DMA-non-coherent memory need to set
> ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe:
> the buffer doesn't share a cache with the others.
>
> Signed-off-by: FUJITA Tomonori <[email protected]>
> Cc: Kyle McMartin <[email protected]>
> Cc: Helge Deller <[email protected]>
> Cc: James E.J. Bottomley <[email protected]>
> Cc: [email protected]
> ---
> ?arch/parisc/include/asm/cache.h | ? ?2 ++
> ?1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/parisc/include/asm/cache.h b/arch/parisc/include/asm/cache.h
> index 45effe6..5d87f27 100644
> --- a/arch/parisc/include/asm/cache.h
> +++ b/arch/parisc/include/asm/cache.h
> @@ -22,6 +22,8 @@
> ?#define L1_CACHE_SHIFT 5
> ?#endif
>
> +#define ARCH_KMALLOC_MINALIGN ?L1_CACHE_BYTES
> +
> ?#ifndef __ASSEMBLY__
>
> ?#define L1_CACHE_ALIGN(x) ? ? ? (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))

Looks like you can send a patch to kill L1_CACHE_ALIGN too. :)

> --
> 1.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

2010-06-29 14:08:14

by Matt Turner

[permalink] [raw]
Subject: Re: [PATCH] parisc: set ARCH_KMALLOC_MINALIGN

On Tue, Jun 29, 2010 at 10:07 AM, Matt Turner <[email protected]> wrote:
> On Tue, Jun 29, 2010 at 2:50 AM, FUJITA Tomonori
> <[email protected]> wrote:
>> This is a resend:
>>
>> http://marc.info/?t=127432584100006&r=1&w=2
>>
>> I thought that it was merged but seems that it was lost somewhere?
>>
>> =
>> From: FUJITA Tomonori <[email protected]>
>> Subject: [PATCH] parisc: set ARCH_KMALLOC_MINALIGN
>>
>> Architectures that handle DMA-non-coherent memory need to set
>> ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe:
>> the buffer doesn't share a cache with the others.
>>
>> Signed-off-by: FUJITA Tomonori <[email protected]>
>> Cc: Kyle McMartin <[email protected]>
>> Cc: Helge Deller <[email protected]>
>> Cc: James E.J. Bottomley <[email protected]>
>> Cc: [email protected]
>> ---
>> ?arch/parisc/include/asm/cache.h | ? ?2 ++
>> ?1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/parisc/include/asm/cache.h b/arch/parisc/include/asm/cache.h
>> index 45effe6..5d87f27 100644
>> --- a/arch/parisc/include/asm/cache.h
>> +++ b/arch/parisc/include/asm/cache.h
>> @@ -22,6 +22,8 @@
>> ?#define L1_CACHE_SHIFT 5
>> ?#endif
>>
>> +#define ARCH_KMALLOC_MINALIGN ?L1_CACHE_BYTES
>> +
>> ?#ifndef __ASSEMBLY__
>>
>> ?#define L1_CACHE_ALIGN(x) ? ? ? (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
>
> Looks like you can send a patch to kill L1_CACHE_ALIGN too. :)

Doh! I see you already did.

>> --
>> 1.6.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
>> the body of a message to [email protected]
>> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>>
>