[PATCH] powerpc/kernel: fix endian issue in rtas_pci

2013-09-23 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/kernel/rtas_pci.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 6e7b7cd..7d4c717 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b

[PATCH] powerc: fix build failure when CONFIG_HUGETLB_PAGE is not set

2014-10-27 Thread Cédric Le Goater
/mm/slice.c:704:5: note: in expansion of macro ‘is_hugepage_only_range’ int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, ^ Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/mm/slice.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/mm

[PATCH 05/18] powerpc/boot: add PROM_ERROR define in oflib

2014-03-20 Thread Cédric Le Goater
This is mostly useful to make to the boot wrapper code closer with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc

[PATCH 08/18] powerpc/boot: fix compile warning in 64bit

2014-03-20 Thread Cédric Le Goater
, as in the kernel, but this would break the device tree ops API. Let it be for the moment. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index

[PATCH 00/18] powerpc/boot: 64bit little endian wrapper

2014-03-20 Thread Cédric Le Goater
is available. Best, C. Cédric Le Goater (18): powerpc/boot: fix do_div for 64bit wrapper powerpc/boot: use a common prom_args struct in oflib powerpc/boot: use prom_arg_t in oflib powerpc/boot: add byteswapping routines in oflib powerpc/boot: add PROM_ERROR define in oflib powerpc

[PATCH 17/18] powerpc/boot: add support for 64bit little endian wrapper

2014-03-20 Thread Cédric Le Goater
Compilation is changed for little endian and entry points between the wrapper and the kernel are modified to fix endian order with the FIXUP_ENDIAN trampoline. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/Makefile |7 +-- arch/powerpc/boot/crt0.S

[PATCH 13/18] powerpc/boot: modify entry point for 64bit

2014-03-20 Thread Cédric Le Goater
This patch adds support a 64bit wrapper entry point. As in 32bit, the entry point does its own relocation and can be loaded at any address by the firmware. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 108 -- 1 file

[PATCH 02/18] powerpc/boot: use a common prom_args struct in oflib

2014-03-20 Thread Cédric Le Goater
. There does not seem to be any good reason to have 12 in the wrapper, so the patch changes this value to args[10] in the prom_args struct. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 ++ arch/powerpc/boot/oflib.c | 29 +++-- 2 files changed

[PATCH 10/18] powerpc/boot: add 64bit and little endian support to addnote

2014-03-20 Thread Cédric Le Goater
It could certainly be improved using Elf macros and byteswapping routines, but the initial version of the code is organised to be a single file program with limited dependencies. yaboot is the same. Please scream if you want a total rewrite. Signed-off-by: Cédric Le Goater c...@fr.ibm.com

[PATCH 03/18] powerpc/boot: use prom_arg_t in oflib

2014-03-20 Thread Cédric Le Goater
This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c

[PATCH 06/18] powerpc/boot: rework of_claim() to make it 64bit friendly

2014-03-20 Thread Cédric Le Goater
This patch fixes 64bit compile warnings and updates the wrapper code to converge the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.c|4 ++-- arch/powerpc/boot/of.h|3 ++- arch/powerpc/boot/oflib.c | 15 --- 3

[PATCH 12/18] powerpc/boot: define a routine to enter prom

2014-03-20 Thread Cédric Le Goater
. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 71 + arch/powerpc/boot/oflib.c |6 2 files changed, 77 insertions(+) diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 0f7428a37efb..dbd99d064828

[PATCH 16/18] powerpc/boot: add support for 64bit big endian wrapper

2014-03-20 Thread Cédric Le Goater
independent executable (-pie) which makes it loadable at any address by the firmware. This is subject to comment as I am not sure what are the requirement for the different boot loaders. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/Makefile |9 - arch/powerpc/boot

[PATCH 14/18] powerpc/boot: modify how we enter kernel on 64bit

2014-03-20 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/main.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index a28f02165e97..46a7464e13c2 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c

[PATCH 15/18] powerpc/boot: add a global entry point for pseries

2014-03-20 Thread Cédric Le Goater
When entering the boot wrapper in little endian, we will need to fix the endian order using a fixup trampoline like in the kernel. This patch overrides the _zimage_start entry point for this purpose. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/Makefile |2

[PATCH 07/18] powerpc/boot: define typedef ihandle as u32

2014-03-20 Thread Cédric Le Goater
This makes ihandle 64bit friendly. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 +- arch/powerpc/boot/oflib.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h index

[PATCH 09/18] powerpc/boot: define byteswapping routines for little endian

2014-03-20 Thread Cédric Le Goater
These are not the most efficient versions of swab but the wrapper does not do much byte swapping. On a big endian cpu, these routines are a no-op. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h |7 +++ arch/powerpc/boot/swab.h | 29

[PATCH 11/18] powerpc/boot: add little endian support to elf utils

2014-03-20 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/elf_util.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/elf_util.c b/arch/powerpc/boot/elf_util.c index 1567a0c0f05c..316552dea4d8 100644 --- a/arch/powerpc/boot/elf_util.c +++ b/arch/powerpc

[PATCH 01/18] powerpc/boot: fix do_div for 64bit wrapper

2014-03-20 Thread Cédric Le Goater
When the boot wrapper is compiled in 64bit, there is no need to use __div64_32. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/stdio.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c index

[PATCH 04/18] powerpc/boot: add byteswapping routines in oflib

2014-03-20 Thread Cédric Le Goater
Values will need to be byte-swapped when calling prom (big endian) from a little endian boot wrapper. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|3 +++ arch/powerpc/boot/ofconsole.c |6 -- arch/powerpc/boot/oflib.c | 22

[PATCH 18/18] powerpc/boot: add PPC64_BOOT_WRAPPER config option

2014-03-20 Thread Cédric Le Goater
The previous patch broke compatibility for 64bit big endian kernel. This patch adds a config option to compile the boot wrapper in 64bit only when CPU_LITTLE_ENDIAN is selected. It restores 32bit compilation and linking for the big endian kernel. Signed-off-by: Cédric Le Goater c...@fr.ibm.com

[PATCH] powerpc/boot: fix global entry point for pseries

2014-03-24 Thread Cédric Le Goater
Patch 15/18 powerpc/boot: add a global entry point for pseries introduced a pseries-head.S file to fix the endian order when entering the boot wrapper. This patch is a fix for some platforms which also generate the zImage.pseries boot wrapper. Signed-off-by: Cédric Le Goater c...@fr.ibm.com

[PATCH v2 01/15] powerpc/boot: fix do_div for 64bit wrapper

2014-04-14 Thread Cédric Le Goater
When the boot wrapper is compiled in 64bit, there is no need to use __div64_32. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/stdio.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c index

[PATCH v2 00/15] powerpc/boot: 64bit little endian wrapper

2014-04-14 Thread Cédric Le Goater
Cheers, C. Changes since v1 : - Fixed Makefile for platforms generating a zImage.pseries - used PROM_ERROR (-1u) to test return addr when claiming memory - removed patch modifying the call to the kernel entry point - merged last 3 patches to preserve bisectability Cédric Le Goater

[PATCH v2 02/15] powerpc/boot: use a common prom_args struct in oflib

2014-04-14 Thread Cédric Le Goater
. There does not seem to be any good reason to have 12 in the wrapper, so the patch changes this value to args[10] in the prom_args struct. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 ++ arch/powerpc/boot/oflib.c | 29 +++-- 2 files changed

[PATCH v2 03/15] powerpc/boot: use prom_arg_t in oflib

2014-04-14 Thread Cédric Le Goater
This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c

[PATCH v2 04/15] powerpc/boot: add byteswapping routines in oflib

2014-04-14 Thread Cédric Le Goater
Values will need to be byte-swapped when calling prom (big endian) from a little endian boot wrapper. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|3 +++ arch/powerpc/boot/ofconsole.c |6 -- arch/powerpc/boot/oflib.c | 22

[PATCH v2 08/15] powerpc/boot: fix compile warning in 64bit

2014-04-14 Thread Cédric Le Goater
, as in the kernel, but this would break the device tree ops API. Let it be for the moment. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index

[PATCH v2 05/15] powerpc/boot: add PROM_ERROR define in oflib

2014-04-14 Thread Cédric Le Goater
This is mostly useful to make to the boot wrapper code closer with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - moved PROM_ERROR definition in of.h. of_try_claim() will make use of it in the next patch. arch/powerpc/boot/of.h

[PATCH v2 09/15] powerpc/boot: define byteswapping routines for little endian

2014-04-14 Thread Cédric Le Goater
These are not the most efficient versions of swab but the wrapper does not do much byte swapping. On a big endian cpu, these routines are a no-op. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h |7 +++ arch/powerpc/boot/swab.h | 29

[PATCH v2 06/15] powerpc/boot: rework of_claim() to make it 64bit friendly

2014-04-14 Thread Cédric Le Goater
This patch fixes 64bit compile warnings and updates the wrapper code to converge the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - use PROM_ERROR to test return addr arch/powerpc/boot/of.c|4 ++-- arch/powerpc/boot/of.h|3

[PATCH v2 10/15] powerpc/boot: add 64bit and little endian support to addnote

2014-04-14 Thread Cédric Le Goater
It could certainly be improved using Elf macros and byteswapping routines, but the initial version of the code is organised to be a single file program with limited dependencies. yaboot is the same. Please scream if you want a total rewrite. Signed-off-by: Cédric Le Goater c...@fr.ibm.com

[PATCH v2 13/15] powerpc/boot: modify entry point for 64bit

2014-04-14 Thread Cédric Le Goater
This patch adds support a 64bit wrapper entry point. As in 32bit, the entry point does its own relocation and can be loaded at any address by the firmware. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 108 -- 1 file

[PATCH v2 11/15] powerpc/boot: add little endian support to elf utils

2014-04-14 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/elf_util.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/elf_util.c b/arch/powerpc/boot/elf_util.c index 1567a0c0f05c..316552dea4d8 100644 --- a/arch/powerpc/boot/elf_util.c +++ b/arch/powerpc

[PATCH v2 12/15] powerpc/boot: define a routine to enter prom

2014-04-14 Thread Cédric Le Goater
. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 71 + arch/powerpc/boot/oflib.c |6 2 files changed, 77 insertions(+) diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 0f7428a37efb..dbd99d064828

[PATCH v2 14/15] powerpc/boot: add a global entry point for pseries

2014-04-14 Thread Cédric Le Goater
When entering the boot wrapper in little endian, we will need to fix the endian order using a fixup trampoline like in the kernel. This patch overrides the _zimage_start entry point for this purpose. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - pseries

[PATCH v2 15/15] powerpc/boot: add support for 64bit little endian wrapper

2014-04-14 Thread Cédric Le Goater
Le Goater c...@fr.ibm.com --- Changes since v1: - merge last 3 patches to preserve bisectability arch/powerpc/boot/Makefile | 16 +--- arch/powerpc/boot/crt0.S |1 + arch/powerpc/boot/ppc_asm.h| 12 arch/powerpc/boot

[PATCH v2 07/15] powerpc/boot: define typedef ihandle as u32

2014-04-14 Thread Cédric Le Goater
This makes ihandle 64bit friendly. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 +- arch/powerpc/boot/oflib.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h index

[PATCH v2 00/15] powerpc/boot: 64bit little endian wrapper (rebased on v3.15-rc2)

2014-04-24 Thread Cédric Le Goater
Le Goater (15): powerpc/boot: fix do_div for 64bit wrapper powerpc/boot: use a common prom_args struct in oflib powerpc/boot: use prom_arg_t in oflib powerpc/boot: add byteswapping routines in oflib powerpc/boot: add PROM_ERROR define in oflib powerpc/boot: rework of_claim() to make

[PATCH v2 01/15] powerpc/boot: fix do_div for 64bit wrapper

2014-04-24 Thread Cédric Le Goater
When the boot wrapper is compiled in 64bit, there is no need to use __div64_32. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/stdio.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c index

[PATCH v2 03/15] powerpc/boot: use prom_arg_t in oflib

2014-04-24 Thread Cédric Le Goater
This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c

[PATCH v2 02/15] powerpc/boot: use a common prom_args struct in oflib

2014-04-24 Thread Cédric Le Goater
. There does not seem to be any good reason to have 12 in the wrapper, so the patch changes this value to args[10] in the prom_args struct. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 ++ arch/powerpc/boot/oflib.c | 29 +++-- 2 files changed

[PATCH v2 04/15] powerpc/boot: add byteswapping routines in oflib

2014-04-24 Thread Cédric Le Goater
Values will need to be byte-swapped when calling prom (big endian) from a little endian boot wrapper. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|3 +++ arch/powerpc/boot/ofconsole.c |6 -- arch/powerpc/boot/oflib.c | 22

[PATCH v2 05/15] powerpc/boot: add PROM_ERROR define in oflib

2014-04-24 Thread Cédric Le Goater
This is mostly useful to make to the boot wrapper code closer with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - moved PROM_ERROR definition in of.h. of_try_claim() will make use of it in the next patch. arch/powerpc/boot/of.h

[PATCH v2 07/15] powerpc/boot: define typedef ihandle as u32

2014-04-24 Thread Cédric Le Goater
This makes ihandle 64bit friendly. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 +- arch/powerpc/boot/oflib.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h index

[PATCH v2 09/15] powerpc/boot: define byteswapping routines for little endian

2014-04-24 Thread Cédric Le Goater
These are not the most efficient versions of swab but the wrapper does not do much byte swapping. On a big endian cpu, these routines are a no-op. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h |7 +++ arch/powerpc/boot/swab.h | 29

[PATCH v2 08/15] powerpc/boot: fix compile warning in 64bit

2014-04-24 Thread Cédric Le Goater
, as in the kernel, but this would break the device tree ops API. Let it be for the moment. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index

[PATCH v2 12/15] powerpc/boot: define a routine to enter prom

2014-04-24 Thread Cédric Le Goater
. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 71 + arch/powerpc/boot/oflib.c |6 2 files changed, 77 insertions(+) diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 0f7428a37efb..dbd99d064828

[PATCH v2 13/15] powerpc/boot: modify entry point for 64bit

2014-04-24 Thread Cédric Le Goater
This patch adds support a 64bit wrapper entry point. As in 32bit, the entry point does its own relocation and can be loaded at any address by the firmware. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 108 -- 1 file

[PATCH v2 14/15] powerpc/boot: add a global entry point for pseries

2014-04-24 Thread Cédric Le Goater
When entering the boot wrapper in little endian, we will need to fix the endian order using a fixup trampoline like in the kernel. This patch overrides the _zimage_start entry point for this purpose. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - pseries

[PATCH v2 15/15] powerpc/boot: add support for 64bit little endian wrapper

2014-04-24 Thread Cédric Le Goater
Le Goater c...@fr.ibm.com --- Changes since v1: - merge last 3 patches to preserve bisectability arch/powerpc/boot/Makefile | 16 +--- arch/powerpc/boot/crt0.S |1 + arch/powerpc/boot/ppc_asm.h| 12 arch/powerpc/boot

[PATCH v2 11/15] powerpc/boot: add little endian support to elf utils

2014-04-24 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/elf_util.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/elf_util.c b/arch/powerpc/boot/elf_util.c index 1567a0c0f05c..316552dea4d8 100644 --- a/arch/powerpc/boot/elf_util.c +++ b/arch/powerpc

[PATCH 1/3] powerpc/nvram: scan partitions only once

2013-10-30 Thread Cédric Le Goater
From: Cedric Le Goater c...@fr.ibm.com nvram_scan_partitions() is called twice when initializing the lnx,oops-log partition and the ibm,rtas-log partition. This fills the partition list with duplicate entries. This patch moves the partition scan in the init routine

[PATCH 0/3] nvram fixes

2013-10-30 Thread Cédric Le Goater
Hi, Here are a few fixes for nvram, mostly endian issues. The patches are based on 3.12-rc7. Cedric Le Goater (3): powerpc/nvram: scan partitions only once powerpc/nvram: fix endian issue when reading the NVRAM size powerpc/nvram: fix endian issue when reading the partition length

[PATCH 3/3] powerpc/nvram: fix endian issue when using the partition length

2013-10-30 Thread Cédric Le Goater
From: Cedric Le Goater c...@fr.ibm.com When reading partitions, the length has to be translated from big endian to the endian order of the host. Similarly, when writing partitions, the length needs to be in big endian order. The userspace tool 'nvram' needs a similar fix as it is reading and

[PATCH 2/3] powerpc/nvram: fix endian issue when reading the NVRAM size

2013-10-30 Thread Cédric Le Goater
From: Cedric Le Goater c...@fr.ibm.com Signed-off-by: Cedric Le Goater c...@fr.ibm.com --- arch/powerpc/platforms/chrp/nvram.c|4 ++-- arch/powerpc/platforms/pseries/nvram.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/chrp/nvram.c

[PATCH] offb: make the screen properties endian safe

2013-10-30 Thread Cédric Le Goater
The screen properties : depth, width, height, linebytes need to be converted to the host endian order when read from the device tree. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/video/offb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v2] offb: make the screen properties endian safe

2013-10-31 Thread Cédric Le Goater
The screen properties : depth, width, height, linebytes need to be converted to the host endian order when read from the device tree. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes in v2: - replaced be32_to_cpu() by be32_to_cpup() - fixed setcolreg ops drivers/video/offb.c

[PATCH] DMA-API: ppc: vio: use dma_coerce_mask_and_coherent()

2013-11-18 Thread Cédric Le Goater
an initial dev-dma_mask for the device. Signed-off-by: Cédric Le Goater c...@fr.ibm.com Cc: Russell King rmk+ker...@arm.linux.org.uk Cc: Paul Mackerras pau...@samba.org --- arch/powerpc/kernel/vio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vio.c b/arch

[PATCH v3 2/2] offb: add palette hack for little endian

2013-12-04 Thread Cédric Le Goater
The pseudo palette color entries need to be ajusted for little endian. This patch byteswaps the values in the pseudo palette depending on the host endian order and the screen depth. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Tested on powerpc, little endian and big endian, for 8, 15

[PATCH v3 1/2] offb: little endian fixes

2013-12-04 Thread Cédric Le Goater
The screen properties : depth, width, height, linebytes need to be converted to the host endian order when read from the device tree. The offb_init_palette_hacks() routine also made assumption on the host endian order. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes in v3: - fixed

[PATCH] of/irq: Fix device_node refcount in of_irq_parse_raw()

2013-12-17 Thread Cédric Le Goater
in the skiplevel: goto label. This patch also removes the usage of the device_node variable 'old' which seems useless after the latest changes. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- This patch was tested on powerpc, pseries and powernv. This is a new area for me so I might have missed a path

[RFC PATCH 01/18] powerpc/boot: fix do_div for 64bit wrapper

2014-02-07 Thread Cédric Le Goater
When the boot wrapper is compiled in 64bit, there is no need to use __div64_32. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/stdio.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c index

[RFC PATCH 00/18] powerpc/boot: 64bit little endian wrapper for pseries

2014-02-07 Thread Cédric Le Goater
is compiled as a position independent executable. This might not be an issue though. This patchset is based on a 3.13 and was tested on qemu with the -kernel option on little and big endian guests. It was also tested with a custom yaboot supporting Little Endian kernels. Yours, C. Cédric Le

[RFC PATCH 07/18] powerpc/boot: define typedef ihandle as u32

2014-02-07 Thread Cédric Le Goater
This makes ihandle 64bit friendly. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 +- arch/powerpc/boot/oflib.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h index

[RFC PATCH 10/18] powerpc/boot: add 64bit and little endian support to addnote

2014-02-07 Thread Cédric Le Goater
It could certainly be improved using Elf macros and byteswapping routines, but the initial version of the code is organised to be a single file program with limited dependencies. yaboot is the same. Please scream if you want a total rewrite. Signed-off-by: Cédric Le Goater c...@fr.ibm.com

[RFC PATCH 08/18] powerpc/boot: fix compile warning in 64bit

2014-02-07 Thread Cédric Le Goater
, as in the kernel, but this would break the device tree ops API. Let it be for the moment. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index

[RFC PATCH 03/18] powerpc/boot: use prom_arg_t in oflib

2014-02-07 Thread Cédric Le Goater
This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c

[RFC PATCH 05/18] powerpc/boot: add PROM_ERROR define in oflib

2014-02-07 Thread Cédric Le Goater
This is mostly useful to make to the boot wrapper code closer with the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/oflib.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc

[RFC PATCH 02/18] powerpc/boot: use a common prom_args struct in oflib

2014-02-07 Thread Cédric Le Goater
. There does not seem to be any good reason to have 12 in the wrapper, so the patch changes this value to args[10] in the prom_args struct. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|2 ++ arch/powerpc/boot/oflib.c | 29 +++-- 2 files changed

[RFC PATCH 13/18] powerpc/boot: modify entry point for 64bit

2014-02-07 Thread Cédric Le Goater
This patch adds support a 64bit wrapper entry point. As in 32bit, the entry point does its own relocation and can be loaded at any address by the firmware. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 108 -- 1 file

[RFC PATCH 14/18] powerpc/boot: modify how we enter kernel on 64bit

2014-02-07 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/main.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index a28f02165e97..46a7464e13c2 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c

[RFC PATCH 15/18] powerpc/boot: add a global entry point for pseries

2014-02-07 Thread Cédric Le Goater
When entering the boot wrapper in little endian, we will need to fix the endian order using a fixup trampoline like in the kernel. This patch overrides the _zimage_start entry point for this purpose. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/Makefile |2

[RFC PATCH 16/18] powerpc/boot: add support for 64bit big endian wrapper

2014-02-07 Thread Cédric Le Goater
independent executable (-pie) which makes it loadable at any address by the firmware. This is subject to comment as I am not sure what are the requirement for the different boot loaders. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- There is probably a better way to compile in 64bit than what

[RFC PATCH 17/18] powerpc/boot: add support for 64bit little endian wrapper

2014-02-07 Thread Cédric Le Goater
Compilation is changed for little endian and entry points between the wrapper and the kernel are modified to fix endian order with the famous FIXUP_ENDIAN trampoline. This is PowerPC magic. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/Makefile |7 +-- arch

[RFC PATCH 11/18] powerpc/boot: add little endian support to elf utils

2014-02-07 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/elf_util.c |4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/boot/elf_util.c b/arch/powerpc/boot/elf_util.c index 1567a0c0f05c..316552dea4d8 100644 --- a/arch/powerpc/boot/elf_util.c +++ b/arch/powerpc

[RFC PATCH 18/18] powerpc/boot: add PPC64_BOOT_WRAPPER config option

2014-02-07 Thread Cédric Le Goater
The previous patch broke compatibility for 64bit big endian kernels. This patch adds a config option to compile the boot wrapper in 64bit only when CPU_LITTLE_ENDIAN is selected. It restores 32bit compilation and linking for the big endian kernel. Signed-off-by: Cédric Le Goater c...@fr.ibm.com

[RFC PATCH 09/18] powerpc/boot: define byteswapping routines for little endian

2014-02-07 Thread Cédric Le Goater
These are not the most efficient versions of swab but the wrapper does not do much byte swapping. On a big endian cpu, these routines are a no-op. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h |7 +++ arch/powerpc/boot/swab.h | 29

[RFC PATCH 12/18] powerpc/boot: define a routine to enter prom

2014-02-07 Thread Cédric Le Goater
. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/crt0.S | 71 + arch/powerpc/boot/oflib.c |6 2 files changed, 77 insertions(+) diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 0f7428a37efb..dbd99d064828

[RFC PATCH 04/18] powerpc/boot: add byteswapping routines in oflib

2014-02-07 Thread Cédric Le Goater
Values will need to be byte-swapped when calling prom (big endian) from a little endian boot wrapper. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.h|3 +++ arch/powerpc/boot/ofconsole.c |6 -- arch/powerpc/boot/oflib.c | 22

[RFC PATCH 06/18] powerpc/boot: rework of_claim() to make it 64bit friendly

2014-02-07 Thread Cédric Le Goater
This patch fixes 64bit compile warnings and updates the wrapper code to converge the kernel code in prom_init. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/boot/of.c|4 ++-- arch/powerpc/boot/of.h|3 ++- arch/powerpc/boot/oflib.c | 15 --- 3

[RFC PATCH 1/3] powerpc/powernv: Check OPAL sensor calls exist

2015-02-20 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- arch/powerpc/platforms/powernv/opal-sensor.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal-sensor.c b/arch/powerpc/platforms/powernv/opal-sensor.c index 4ab67ef7abc9..544292f2020f 100644

[PATCH 3/5] hwmon: (ibmpowernv) add a convert_opal_attr_name() routine

2015-03-18 Thread Cédric Le Goater
It simplifies the create_hwmon_attr_name() routine and it clearly isolates the conversion done between the OPAL node names and hwmon attributes names. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 39 +-- 1 file changed, 25

[PATCH 2/5] hwmon: (ibmpowernv) add a get_sensor_type() routine

2015-03-18 Thread Cédric Le Goater
It will help in adding different compatible properties, coming from a new device tree layout for example. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH 4/5] hwmon: (ibmpowernv) change create_hwmon_attr_name() prototype

2015-03-18 Thread Cédric Le Goater
It simplifies the creation of the hwmon attributes and will help when support for a new device tree layout is added. The patch also changes the name of the routine to parse_opal_node_name(). Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 32

[PATCH 0/5] hwmon: (ibmpowernv) remove dependency on OPAL index

2015-03-18 Thread Cédric Le Goater
/2015-March/000639.html which will be addressed in a other small patchset. The patches are based on Linux 4.0.0-rc4 and were tested on IBM Power and Open Power systems running Trusty. Cheers, C. Cédric Le Goater (5): hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP hwmon: (ibmpowernv) add

[PATCH 5/5] hwmon: (ibmpowernv) do not use the OPAL index for hwmon attribute names

2015-03-18 Thread Cédric Le Goater
, as we need to have the same hwmon index for different attributes of a same sensor. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon

[PATCH v2 4/5] hwmon: (ibmpowernv) change create_hwmon_attr_name() prototype

2015-03-19 Thread Cédric Le Goater
It simplifies the creation of the hwmon attributes and will help when support for a new device tree layout is added. The patch also changes the name of the routine to parse_opal_node_name(). Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - changed returned value

[PATCH v2 0/5] hwmon: (ibmpowernv) remove dependency on OPAL index

2015-03-19 Thread Cédric Le Goater
value of parse_opal_node_name() - used *_PTR macros to check for errors Cédric Le Goater (5): hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP hwmon: (ibmpowernv) add a get_sensor_type() routine hwmon: (ibmpowernv) add a convert_opal_attr_name() routine hwmon: (ibmpowernv) change

[PATCH v2 5/5] hwmon: (ibmpowernv) do not use the OPAL index for hwmon attribute names

2015-03-19 Thread Cédric Le Goater
, as we need to have the same hwmon index for different attributes of a same sensor. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) Index: linux.git/drivers/hwmon/ibmpowernv.c

[PATCH v2 1/5] hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP

2015-03-19 Thread Cédric Le Goater
Ambient is too restrictive as there can be other temperature channels : core, memory, etc. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux.git/drivers/hwmon/ibmpowernv.c

[PATCH v2 3/5] hwmon: (ibmpowernv) add a convert_opal_attr_name() routine

2015-03-19 Thread Cédric Le Goater
It simplifies the create_hwmon_attr_name() routine and it clearly isolates the conversion done between the OPAL node names and hwmon attributes names. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v1: - fixed alignment - killed a couple of useless return NULL drivers

[PATCH v2 2/5] hwmon: (ibmpowernv) add a get_sensor_type() routine

2015-03-19 Thread Cédric Le Goater
It will help in adding different compatible properties, coming from a new device tree layout for example. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) Index: linux.git/drivers

[PATCH] powerpc/powernv: handle OPAL_SUCCESS return in opal_sensor_read

2015-03-25 Thread Cédric Le Goater
for a response. This patch modifies the opal call to accept an OPAL_SUCCESS return value and cover the case above. [1] https://lists.ozlabs.org/pipermail/skiboot/2015-March/000639.html Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- We still uselessly reserve a token (for the response) and take

[PATCH v4 2/2] powerpc/powernv: handle OPAL_SUCCESS return in opal_sensor_read

2015-03-30 Thread Cédric Le Goater
for a response. This patch modifies the opal call to accept an OPAL_SUCCESS return value and cover the case above. [1] https://lists.ozlabs.org/pipermail/skiboot/2015-March/000639.html Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- We still uselessly reserve a token (for the response) and take

[PATCH v4 1/2] powerpc/powernv: convert codes returned by OPAL calls

2015-03-30 Thread Cédric Le Goater
OPAL has its own list of return codes. The patch provides a translation of such codes in errnos for the opal_sensor_read call, and possibly others if needed. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Changes since v3 : - reworked the return codes a little as suggested by Michael

[PATCH 2/4] hwmon: (ibmpowernv) add support for the new device tree

2015-04-01 Thread Cédric Le Goater
. This is achieved by changing the error path of the routine parsing an OPAL node name. The node is simply considered being from the new device tree layout and fallback values are used. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 47

[PATCH 0/4] hwmon: (ibmpowernv) add DTS support

2015-04-01 Thread Cédric Le Goater
-March/043670.html and were tested on IBM Power and Open Power systems running Trusty. Cheers, C. Cédric Le Goater (4): hwmon: (ibmpowernv) add a helper routine create_hwmon_attr hwmon: (ibmpowernv) add support for the new device tree hwmon: (ibmpowernv) add a label attribute hwmon

[PATCH 4/4] hwmon: (ibmpowernv) pretty print labels

2015-04-01 Thread Cédric Le Goater
The new OPAL device tree adds a few properties which can be used to add extra information on the sensor label. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/hwmon/ibmpowernv.c b

[PATCH 1/4] hwmon: (ibmpowernv) add a helper routine create_hwmon_attr

2015-04-01 Thread Cédric Le Goater
This should shorten a bit the code necessary to create a hmwon attribute. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/hwmon/ibmpowernv.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon

  1   2   3   4   5   6   7   8   9   >