* [PATCH 2/5] OpenRISC: Use generic bitops.h
2012-03-02 0:55 [PATCH 1/5] OpenRISC: Select GENERIC_ATOMIC64 Richard Weinberger
@ 2012-03-02 0:55 ` Richard Weinberger
2012-03-02 6:50 ` Jonas Bonn
2012-03-02 0:55 ` [PATCH 3/5] OpenRISC: Export memory_start and memory_end Richard Weinberger
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Richard Weinberger @ 2012-03-02 0:55 UTC (permalink / raw)
To: jonas; +Cc: linux, linux-kernel, Richard Weinberger
There is no need to reinvent the wheel.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/openrisc/include/asm/Kbuild | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index 11162e6..a283165 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -4,6 +4,7 @@ header-y += spr_defs.h
generic-y += atomic.h
generic-y += auxvec.h
+generic-y += bitops.h
generic-y += bitsperlong.h
generic-y += bug.h
generic-y += bugs.h
--
1.7.7.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 2/5] OpenRISC: Use generic bitops.h
2012-03-02 0:55 ` [PATCH 2/5] OpenRISC: Use generic bitops.h Richard Weinberger
@ 2012-03-02 6:50 ` Jonas Bonn
2012-03-02 8:47 ` Richard Weinberger
0 siblings, 1 reply; 11+ messages in thread
From: Jonas Bonn @ 2012-03-02 6:50 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
On Fri, 2012-03-02 at 01:55 +0100, Richard Weinberger wrote:
> There is no need to reinvent the wheel.
NAK... we have optimized versions for some of these operations so the
generic header isn't right for us.
Have a look at arch/openrisc/asm/include/bitops.h to see which functions
we override with accelerated versions.
/Jonas
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> arch/openrisc/include/asm/Kbuild | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
> index 11162e6..a283165 100644
> --- a/arch/openrisc/include/asm/Kbuild
> +++ b/arch/openrisc/include/asm/Kbuild
> @@ -4,6 +4,7 @@ header-y += spr_defs.h
>
> generic-y += atomic.h
> generic-y += auxvec.h
> +generic-y += bitops.h
> generic-y += bitsperlong.h
> generic-y += bug.h
> generic-y += bugs.h
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/5] OpenRISC: Use generic bitops.h
2012-03-02 6:50 ` Jonas Bonn
@ 2012-03-02 8:47 ` Richard Weinberger
0 siblings, 0 replies; 11+ messages in thread
From: Richard Weinberger @ 2012-03-02 8:47 UTC (permalink / raw)
To: Jonas Bonn; +Cc: linux, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
Am 02.03.2012 07:50, schrieb Jonas Bonn:
> On Fri, 2012-03-02 at 01:55 +0100, Richard Weinberger wrote:
>> There is no need to reinvent the wheel.
>
> NAK... we have optimized versions for some of these operations so the
> generic header isn't right for us.
Sorry, I missed that.
> Have a look at arch/openrisc/asm/include/bitops.h to see which functions
> we override with accelerated versions.
Okay, but some operations are missing in your bitopts.h.
Like test_bit_le() or find_next_zero_bit_le().
#include <asm-generic/bitops/le.h>
Should to the job...
Thanks,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/5] OpenRISC: Export memory_start and memory_end
2012-03-02 0:55 [PATCH 1/5] OpenRISC: Select GENERIC_ATOMIC64 Richard Weinberger
2012-03-02 0:55 ` [PATCH 2/5] OpenRISC: Use generic bitops.h Richard Weinberger
@ 2012-03-02 0:55 ` Richard Weinberger
2012-03-02 6:51 ` Jonas Bonn
2012-03-02 0:55 ` [PATCH 4/5] OpenRISC: Include export.h Richard Weinberger
2012-03-02 0:55 ` [PATCH 5/5] OpenRISC: Export dump_stack() Richard Weinberger
3 siblings, 1 reply; 11+ messages in thread
From: Richard Weinberger @ 2012-03-02 0:55 UTC (permalink / raw)
To: jonas; +Cc: linux, linux-kernel, Richard Weinberger
At least virt_addr_valid() makes use of memory_end.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/openrisc/include/asm/page.h | 4 ++--
arch/openrisc/kernel/setup.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/openrisc/include/asm/page.h b/arch/openrisc/include/asm/page.h
index b041b34..4dfe477 100644
--- a/arch/openrisc/include/asm/page.h
+++ b/arch/openrisc/include/asm/page.h
@@ -71,8 +71,8 @@ typedef struct page *pgtable_t;
#define __pgd(x) ((pgd_t) { (x) })
#define __pgprot(x) ((pgprot_t) { (x) })
-extern unsigned long memory_start;
-extern unsigned long memory_end;
+extern phys_addr_t memory_start;
+extern phys_addr_t memory_end;
#endif /* !__ASSEMBLY__ */
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
index bf5eba2..c993c92 100644
--- a/arch/openrisc/kernel/setup.c
+++ b/arch/openrisc/kernel/setup.c
@@ -52,6 +52,7 @@
#include "vmlinux.h"
char __initdata cmd_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
+phys_addr_t memory_start, memory_end;
static unsigned long __init setup_memory(void)
{
@@ -59,7 +60,6 @@ static unsigned long __init setup_memory(void)
unsigned long ram_start_pfn;
unsigned long free_ram_start_pfn;
unsigned long ram_end_pfn;
- phys_addr_t memory_start, memory_end;
struct memblock_region *region;
memory_end = memory_start = 0;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 3/5] OpenRISC: Export memory_start and memory_end
2012-03-02 0:55 ` [PATCH 3/5] OpenRISC: Export memory_start and memory_end Richard Weinberger
@ 2012-03-02 6:51 ` Jonas Bonn
2012-03-02 8:48 ` Richard Weinberger
0 siblings, 1 reply; 11+ messages in thread
From: Jonas Bonn @ 2012-03-02 6:51 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
On Fri, 2012-03-02 at 01:55 +0100, Richard Weinberger wrote:
> At least virt_addr_valid() makes use of memory_end.
virt_addr_valid looks broken... it shouldn't be comparing a virtual
address against memory_end which is phys_addr_t.
/Jonas
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> arch/openrisc/include/asm/page.h | 4 ++--
> arch/openrisc/kernel/setup.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/openrisc/include/asm/page.h b/arch/openrisc/include/asm/page.h
> index b041b34..4dfe477 100644
> --- a/arch/openrisc/include/asm/page.h
> +++ b/arch/openrisc/include/asm/page.h
> @@ -71,8 +71,8 @@ typedef struct page *pgtable_t;
> #define __pgd(x) ((pgd_t) { (x) })
> #define __pgprot(x) ((pgprot_t) { (x) })
>
> -extern unsigned long memory_start;
> -extern unsigned long memory_end;
> +extern phys_addr_t memory_start;
> +extern phys_addr_t memory_end;
>
> #endif /* !__ASSEMBLY__ */
>
> diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
> index bf5eba2..c993c92 100644
> --- a/arch/openrisc/kernel/setup.c
> +++ b/arch/openrisc/kernel/setup.c
> @@ -52,6 +52,7 @@
> #include "vmlinux.h"
>
> char __initdata cmd_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
> +phys_addr_t memory_start, memory_end;
>
> static unsigned long __init setup_memory(void)
> {
> @@ -59,7 +60,6 @@ static unsigned long __init setup_memory(void)
> unsigned long ram_start_pfn;
> unsigned long free_ram_start_pfn;
> unsigned long ram_end_pfn;
> - phys_addr_t memory_start, memory_end;
> struct memblock_region *region;
>
> memory_end = memory_start = 0;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/5] OpenRISC: Include export.h
2012-03-02 0:55 [PATCH 1/5] OpenRISC: Select GENERIC_ATOMIC64 Richard Weinberger
2012-03-02 0:55 ` [PATCH 2/5] OpenRISC: Use generic bitops.h Richard Weinberger
2012-03-02 0:55 ` [PATCH 3/5] OpenRISC: Export memory_start and memory_end Richard Weinberger
@ 2012-03-02 0:55 ` Richard Weinberger
2012-03-02 0:55 ` [PATCH 5/5] OpenRISC: Export dump_stack() Richard Weinberger
3 siblings, 0 replies; 11+ messages in thread
From: Richard Weinberger @ 2012-03-02 0:55 UTC (permalink / raw)
To: jonas; +Cc: linux, linux-kernel, Richard Weinberger
EXPORT_SYMBOL* needs export.h.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/openrisc/kernel/init_task.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/openrisc/kernel/init_task.c b/arch/openrisc/kernel/init_task.c
index 45744a38..70381d4 100644
--- a/arch/openrisc/kernel/init_task.c
+++ b/arch/openrisc/kernel/init_task.c
@@ -15,6 +15,7 @@
* 2 of the License, or (at your option) any later version.
*/
+#include <linux/export.h>
#include <linux/init_task.h>
#include <linux/mqueue.h>
--
1.7.7.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] OpenRISC: Export dump_stack()
2012-03-02 0:55 [PATCH 1/5] OpenRISC: Select GENERIC_ATOMIC64 Richard Weinberger
` (2 preceding siblings ...)
2012-03-02 0:55 ` [PATCH 4/5] OpenRISC: Include export.h Richard Weinberger
@ 2012-03-02 0:55 ` Richard Weinberger
2012-03-02 7:12 ` Jonas Bonn
3 siblings, 1 reply; 11+ messages in thread
From: Richard Weinberger @ 2012-03-02 0:55 UTC (permalink / raw)
To: jonas; +Cc: linux, linux-kernel, Richard Weinberger
dump_stack() is used by modules and needs to be exported.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/openrisc/kernel/traps.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index a4ec44a..ab68ffc 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -115,6 +115,7 @@ void dump_stack(void)
show_stack(current, &stack);
}
+EXPORT_SYMBOL(dump_stack);
void show_registers(struct pt_regs *regs)
{
--
1.7.7.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 5/5] OpenRISC: Export dump_stack()
2012-03-02 0:55 ` [PATCH 5/5] OpenRISC: Export dump_stack() Richard Weinberger
@ 2012-03-02 7:12 ` Jonas Bonn
0 siblings, 0 replies; 11+ messages in thread
From: Jonas Bonn @ 2012-03-02 7:12 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 786 bytes --]
Thanks. Patches 1 and 5 from your series applied.
I already had patch 4, and comments have been sent for the others.
/Jonas
On Fri, 2012-03-02 at 01:55 +0100, Richard Weinberger wrote:
> dump_stack() is used by modules and needs to be exported.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> arch/openrisc/kernel/traps.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
> index a4ec44a..ab68ffc 100644
> --- a/arch/openrisc/kernel/traps.c
> +++ b/arch/openrisc/kernel/traps.c
> @@ -115,6 +115,7 @@ void dump_stack(void)
>
> show_stack(current, &stack);
> }
> +EXPORT_SYMBOL(dump_stack);
>
> void show_registers(struct pt_regs *regs)
> {
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread