[PATCH] Enhanced support for MPC8xx/8xxx watchdog

2013-02-13 Thread Christophe Leroy
ements the WDIOC_SETTIMEOUT ioctl. Signed-off-by: Christophe Leroy diff -ur linux-3.7.7/drivers/watchdog/mpc8xxx_wdt.c linux/drivers/watchdog/mpc8xxx_wdt.c --- linux-3.7.7/drivers/watchdog/mpc8xxx_wdt.c 2013-02-11 18:05:09.0 +0100 +++ linux/drivers/watchdog/mpc8xxx_wdt.c2013-0

[PATCH] Handling of IRQ in MPC8xx GPIO

2013-02-21 Thread Christophe Leroy
ario-bank-c"; reg = <0x960 0x10>; interrupts = <255 255 255 255 1 2 6 9 10 11 14 15 23 24 26 31>; interrupt-parent = <&CPM_PIC>; gpio-controller; }; Signed-off-by: Christophe Leroy diff -ur linux-3.7.9/

[PATCH v2] Enhanced support for MPC8xx/8xxx watchdog

2013-02-28 Thread Christophe Leroy
allows to set up the userspace timeout. The driver also implements the WDIOC_SETTIMEOUT ioctl. Signed-off-by: Christophe Leroy diff -ur linux-3.7.9/drivers/watchdog/mpc8xxx_wdt.c linux/drivers/watchdog/mpc8xxx_wdt.c --- linux-3.7.9/drivers/watchdog/mpc8xxx_wdt.c 2013-02-17 19:53:32.0 +0

[PATCH] Erroneous double irq_eoi() on CPM IRQ in MPC8xx

2013-04-17 Thread Christophe Leroy
irq_eoi() is already called by generic_handle_irq() so it shall not be called a again Signed-off-by: Christophe Leroy Index: linux/arch/powerpc/platforms/8xx/m8xx_setup.c === --- linux/arch/powerpc/platforms/8xx/m8xx_setup.c

[PATCH v2] Erroneous double irq_eoi() on CPM IRQ in MPC8xx

2013-04-17 Thread Christophe Leroy
irq_eoi() is already called by generic_handle_irq() so it shall not be called a again Signed-off-by: Christophe Leroy Index: linux/arch/powerpc/platforms/8xx/m8xx_setup.c === --- linux/arch/powerpc/platforms/8xx/m8xx_setup.c

[PATCH] Powerpc 8xx CPM_UART delay in receive

2012-08-14 Thread Christophe Leroy
t 300 bauds. This fix limits to one byte the waiting period. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-07-21 22:58:29.0 +0200 +++ linux-3.5/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-08-09 17:38:37.0

[PATCH] Powerpc 8xx CPM_UART desynchronisation

2012-08-14 Thread Christophe Leroy
Hello, I'm not sure who to address this Patch to. It fixes a desynchronisation problem with CPM UART driver on Powerpc MPC8xx. The problem happens if data is received before the device is open by the user application. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/s

[PATCH v2] Powerpc 8xx CPM_UART desynchronisation

2012-09-23 Thread Christophe Leroy
This patch fixes a desynchronisation problem with CPM UART driver on Powerpc MPC8xx. The problem happens if data is received before the device is open by the user application. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-07-21 22

[PATCH] Powerpc 8xx CPM_UART too many interrupts

2012-09-23 Thread Christophe Leroy
Setting the fifo to only 1 byte generates one interrupt every 1ms at 9600 bauds. This is too much. This patch reduces the threshold to speeds below 2400 bauds like in the 8250 UART driver. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/serial/cpm_uart/cpm_uart_core.c

[PATCH] Powerpc 8xx CPM_UART maxidl should not depend on fifo size

2012-09-23 Thread Christophe Leroy
maxidl register was set to fifo size. There is no reason to set this register to same value as fifo size. Setting it now to 0x10 by default as in the UCC UART driver. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-07-21 22:58

[PATCH] Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate

2012-09-23 Thread Christophe Leroy
UART. Signed-off-by: Christophe Leroy --- linux-3.5-vanilla/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-07-21 22:58:29.0 +0200 +++ linux-3.5/drivers/tty/serial/cpm_uart/cpm_uart_core.c 2012-08-09 17:38:37.0 +0200 @@ -501,6 +501,7 @@ struct uart_cpm_port

[PATCH v3] Enhanced support for MPC8xx/8xxx watchdog

2013-08-07 Thread Christophe Leroy
out' allows to set up the userspace timeout. This patch also adds the WDIOC_SETTIMEOUT ioctl to the driver. Signed-off-by: Christophe Leroy --- linux-3.8.13/drivers/watchdog/mpc8xxx_wdt.c 2013-05-11 22:57:46.0 +0200 +++ linux/drivers/watchdog/mpc8xxx_wdt.c2013-08-08 02:12:15.000

[PATCH] Adding proper request of GPIO used by cpm_uart driver

2013-08-21 Thread Christophe Leroy
cpm_uart serial driver uses GPIO for control signals. In order to be used properly, GPIOs have to be reserved. Comment in gpiolib.c considers illegal the use of GPIOs without requesting them. In addition, the direction of the GPIO has to be set properly. Signed-off-by: Christophe Leroy diff -ur

[PATCH] powerpc/mpc8xx: Clearer Oops message for Software Emulation Exception

2013-08-28 Thread Christophe Leroy
. The new message tries to be more generic in order to make the user understand that the Oops is due to something wrong with an instruction, not necessarily due to an FPU instruction. Signed-off-by: Christophe Leroy diff -ur linux-3.11-rc6/arch/powerpc/kernel/traps.c linux/arch/powerpc/kernel

[PATCH] powerpc 8xx: Reverting commit e0908085fc2391c85b85fb814ae1df377c8e0dcb which has become useless

2013-09-11 Thread Christophe Leroy
8xx. Signed-off-by: Christophe Leroy diff -ur linux-3.11.org/arch/powerpc/mm/pgtable.c linux-3.11/arch/powerpc/mm/pgtable.c --- linux-3.11.org/arch/powerpc/mm/pgtable.c2013-09-02 22:46:10.0 +0200 +++ linux-3.11/arch/powerpc/mm/pgtable.c2013-09-09 11:25:57.0 +0200

[PATCH] powerpc 8xx: Fixing issue with CONFIG_PIN_TLB

2013-09-11 Thread Christophe Leroy
Activating CONFIG_PIN_TLB is supposed to pin the IMMR and the first three 8Mbytes pages. But the setting of the MD_CTR was missing so as the index is decremented every DTLB update, the pinning of the third 8Mbytes page was overwriting the DTLB entry for IMMR. Signed-off-by: Christophe Leroy

[PATCH] powerpc 8xx: Reverting commit e0908085fc2391c85b85fb814ae1df377c8e0dcb which has become useless

2013-09-11 Thread Christophe Leroy
8xx. Signed-off-by: Christophe Leroy diff -ur linux-3.11.org/arch/powerpc/mm/pgtable.c linux-3.11/arch/powerpc/mm/pgtable.c --- linux-3.11.org/arch/powerpc/mm/pgtable.c2013-09-02 22:46:10.0 +0200 +++ linux-3.11/arch/powerpc/mm/pgtable.c2013-09-09 11:25:57.0 +0200

[PATCH v2] powerpc 8xx: Fixing issue with CONFIG_PIN_TLB

2013-09-12 Thread Christophe Leroy
This is a reorganisation of the setup of the TLB at kernel startup, in order to handle the CONFIG_PIN_TLB case in accordance with chapter 8.10.3 of MPC866 and MPC885 reference manuals. Signed-off-by: Christophe Leroy diff -ur linux-3.11.org/arch/powerpc/kernel/head_8xx.S linux-3.11/arch

[PATCH v3] powerpc 8xx: Fixing issue with CONFIG_PIN_TLB

2013-09-17 Thread Christophe Leroy
written being entry 31, next entries would possibly get overwritten after. We are now starting from entry 31 and decrementing. Signed-off-by: Christophe Leroy diff -ur linux-3.11.org/arch/powerpc/kernel/head_8xx.S linux-3.11/arch/powerpc/kernel/head_8xx.S --- linux-3.11.org/arch/powerpc/kernel

[PATCH v4] powerpc 8xx: Fixing issue with CONFIG_PIN_TLB

2013-09-24 Thread Christophe Leroy
not pinned. Signed-off-by: Christophe Leroy diff -ur linux-3.11.org/arch/powerpc/kernel/head_8xx.S linux-3.11/arch/powerpc/kernel/head_8xx.S --- linux-3.11.org/arch/powerpc/kernel/head_8xx.S 2013-09-02 22:46:10.0 +0200 +++ linux-3.11/arch/powerpc/kernel/head_8xx.S 2013-09-09 11

[PATCH] powerpc 8xx: Fixing memory init issue with CONFIG_PIN_TLB

2013-10-11 Thread Christophe Leroy
Signed-off-by: Christophe Leroy diff -ur linux-3.11.org/arch/powerpc/kernel/head_8xx.S linux-3.11/arch/powerpc/kernel/head_8xx.S --- linux-3.11.org/arch/powerpc/mm/init_32.c2013-09-02 22:46:10.0 +0200 +++ linux-3.11/arch/powerpc/mm/init_32.c2013-09-09 11:28:54.00

[PATCH] lib/crc32: slice by 4 is more efficient than the default slice by 8 on Powerpc 8xx.

2013-11-19 Thread Christophe Leroy
: self tests passed, processed 225944 bytes in 3289576 nsec Signed-off-by: Christophe Leroy Index: a/lib/Kconfig === --- a/lib/Kconfig (révision 5325) +++ b/lib/Kconfig (copie de travail) @@ -102,6 +102,7 @@ choice

[PATCH] powerpc 8xx: mfspr SPRN_TBRx in lieu of mftb/mftbu is not supported

2013-11-22 Thread Christophe Leroy
Commit beb2dc0a7a84be003ce54e98b95d65cc66e6e536 breaks the MPC8xx which seems to not support using mfspr SPRN_TBRx instead of mftb/mftbu despite what is written in the reference manual This patchs revert to the use of mftb/mftbu when CONFIG_8xx is selected Signed-off-by: Christophe Leroy diff

[PATCH v2] powerpc 8xx: defconfig: slice by 4 is more efficient than the default slice by 8 on Powerpc 8xx.

2013-11-22 Thread Christophe Leroy
: self tests passed, processed 225944 bytes in 3289576 nsec Signed-off-by: Christophe Leroy diff -ur a/arch/powerpc/configs/adder875_defconfig b/arch/powerpc/configs.new/adder875_defconfig --- a/arch/powerpc/configs/adder875_defconfig 2013-11-22 18:20:10.342968268 +0100 +++ b/arch/powerpc

[PATCH] powerpc 8xx: Loading kernels over 8Mbytes without CONFIG_PIN_TLB

2013-11-27 Thread Christophe Leroy
t;big" kernels (for instance when activating CONFIG_LOCKDEP_SUPPORT) without having to activate CONFIG_PIN_TLB. Signed-off-by: Christophe Leroy diff -ur a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S

[PATCH] watchdog: mpc8xxx_wdt convert to watchdog core

2013-11-30 Thread Christophe Leroy
Convert mpc8xxx_wdt.c to the new watchdog API. Signed-off-by: Christophe Leroy diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c --- a/drivers/watchdog/mpc8xxx_wdt.c2013-05-11 22:57:46.0 +0200 +++ b/drivers/watchdog/mpc8xxx_wdt.c2013-11-30 16:14

[PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled

2013-11-30 Thread Christophe Leroy
MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled. Signed-off-by: Christophe Leroy diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c --- a/drivers/watchdog/mpc8xxx_wdt.c2013-05-11 22:57:46.0 +0200 +++ b

[PATCH v2] watchdog: mpc8xxx_wdt convert to watchdog core

2013-12-03 Thread Christophe Leroy
Convert mpc8xxx_wdt.c to the new watchdog API. Signed-off-by: Christophe Leroy diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c --- a/drivers/watchdog/mpc8xxx_wdt.c2013-05-11 22:57:46.0 +0200 +++ b/drivers/watchdog/mpc8xxx_wdt.c2013-11-30 16:14

[PATCH v3] watchdog: mpc8xxx_wdt convert to watchdog core

2013-12-03 Thread Christophe Leroy
Convert mpc8xxx_wdt.c to the new watchdog API. Signed-off-by: Christophe Leroy diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c --- a/drivers/watchdog/mpc8xxx_wdt.c2013-05-11 22:57:46.0 +0200 +++ b/drivers/watchdog/mpc8xxx_wdt.c2013-11-30 16:14

Re: [PATCH] powerpc 8xx: Loading kernels over 8Mbytes without CONFIG_PIN_TLB

2013-12-07 Thread christophe leroy
Le 06/12/2013 20:09, Scott Wood a écrit : On Wed, 2013-11-27 at 12:04 +0100, Christophe Leroy wrote: Today, the only way to load kernels whose size is greater than 8Mbytes is to activate CONFIG_PIN_TLB. Otherwise, the physical memory initially mapped is limited to 8Mbytes. This patch sets up

[PATCH v2] powerpc 8xx: Loading kernels over 8Mbytes without CONFIG_PIN_TLB

2013-12-10 Thread Christophe Leroy
CONFIG_PIN_TLB is active or not. It allows to load "big" kernels (for instance when activating CONFIG_LOCKDEP_SUPPORT) without having to activate CONFIG_PIN_TLB. Signed-off-by: Christophe Leroy diff -ur a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig --- a/arch/powerpc/Kconfig +++ b/ar

[RFC PATCH v3] powerpc: Loading kernels over 8Mbytes without CONFIG_PIN_TLB

2013-12-15 Thread Christophe Leroy
given to the kernel through register r7. This is done regardless of whether CONFIG_PIN_TLB is active or not. It allows to load "big" kernels (for instance when activating CONFIG_LOCKDEP_SUPPORT) without having to activate CONFIG_PIN_TLB. Not-yet-signed-off-by: Christophe Leroy Index: lin

[PATCH] powerpc 32: Provides VIRT_CPU_ACCOUNTING

2014-03-19 Thread Christophe Leroy
This patch provides VIRT_CPU_ACCOUTING to PPC32 architecture. Unlike PPC64, PPC32 doesn't provide the PACA register. Therefore the implementation is similar to the one done in the IA64 architecture. It is based on additional information added to the Task Info structure. Signed-off-by: Chris

[PATCH v2] powerpc 32: Provides VIRT_CPU_ACCOUNTING

2014-04-07 Thread Christophe Leroy
This patch provides VIRT_CPU_ACCOUTING to PPC32 architecture. Unlike PPC64, PPC32 doesn't use the PACA convention. Therefore the implementation is taken from the IA64 architecture. It is based on additional information added to the Task Info structure. Signed-off-by: Christophe Leroy Ind

[RFC, prePATCH] crypto: talitos modified for powerpc 88x security engine

2014-07-11 Thread Christophe Leroy
rypto operations, not the combined authentication/encryption ones. Note that it has been tested on MPC885, but not on MPC82xx I would be happy to receive comments and suggestions in order to improve this first try. Not-yet-signed-off-by: Christophe Leroy Index: b/drivers/crypto/tali

[PATCH 00/20] powerpc/8xx: Optimise MMU TLB handling and add support of 16k pages

2014-08-08 Thread Christophe Leroy
This patchset: * provides several MMU TLB handling optimisation on MPC8xx. * adds support of 16k pages on MPC8xx. All changes have been successfully tested on a custom board equipped with MPC885 Signed-off-by: Christophe Leroy Tested-by: Christophe Leroy

[PATCH 03/20] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx

2014-08-08 Thread Christophe Leroy
Exception InstructionAccess does not exist on MPC8xx. No need to branch there from somewhere else. Handling can be done directly in InstructionTLBError Exception. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 17 +++-- 1 files changed, 7 insertions(+), 10

[PATCH 04/20] powerpc/8xx: Remove loading of r10 at end of FixupDAR

2014-08-08 Thread Christophe Leroy
Since commit 2321f33790a6c5b80322d907a92d5739e7521a13, r10 is not used anymore after FixupDAR. There is therefore no need to set it up with the value of DAR. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |7 +++ 1 files changed, 3 insertions(+), 4 deletions

[PATCH 02/20] powerpc/8xx: Use SCRATCH0 and SCRATCH1 also for TLB handlers

2014-08-08 Thread Christophe Leroy
-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 104 -- 1 files changed, 36 insertions(+), 68 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 1329c5a..3af6db1 100644 --- a/arch/powerpc/kernel

[PATCH 07/20] powerpc/8xx: DataAccess exception not generated by MPC8xx

2014-08-08 Thread Christophe Leroy
DataAccess exception is never generated by MPC8xx so do the job directly where it is used to avoid an unnecessary branching. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 23 ++- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/arch

[PATCH 01/20] powerpc/8xx: Declare SPRG2 as a SCRATCH register

2014-08-08 Thread Christophe Leroy
Since coming 469d62be9263b92f2c3329540cbb1c076111f4f3, SPRG2 is used as a scratch register just like SPRG0 and SPRG1. So Declare it as such and fix the comment which is not valid anymore since that commit. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h |3 ++- arch

[PATCH 08/20] powerpc/8xx: No need to restore registers and save them again.

2014-08-08 Thread Christophe Leroy
In DTLBError handler there is not need to restore r10, r11 and cr registers after fixing DAR as they are saved again to the same place just after. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH 05/20] powerpc/8xx: Fix comment about DIRTY update

2014-08-08 Thread Christophe Leroy
Since commit 2321f33790a6c5b80322d907a92d5739e7521a13, dirty handling is not handled here anymore. So we fix the comment. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH 09/20] powerpc/8xx: Optimize verification in FixupDAR

2014-08-08 Thread Christophe Leroy
By XORing the upper part of the instruction code, we get a value that can directly be verified with the second test and we can remove the first test. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH 11/20] powerpc/8xx: Align swapper_pg_dir on 16 bits boundary

2014-08-08 Thread Christophe Leroy
Lets save one cycle by aligning swapper_pg_dir on 16 bits boundary. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index

[PATCH 06/20] powerpc/8xx: No need to save r10 and r3 when not calling FixupDAR

2014-08-08 Thread Christophe Leroy
r10 and r3 are only used inside FixupDAR function. So lets save them inside that function only. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 27 +-- 1 files changed, 13 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S

[PATCH 12/20] powerpc/8xx: Use M_TW instead of M_TWB

2014-08-08 Thread Christophe Leroy
Use M_TW instead of M_TWB for storing Level 1 table address as M_TWB requires 4k aligned tables, which is only the case with 4k pages. Consequently, we have to calculate the level 1 table index by ourselves. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 44

[PATCH 10/20] powerpc/8xx: Duplicate two insns instead of branching

2014-08-08 Thread Christophe Leroy
Branching takes two cycles on MPC8xx. Lets duplicate the two instructions and avoid the branching. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc

[PATCH 14/20] powerpc/8xx: Use PAGE size related consts

2014-08-08 Thread Christophe Leroy
For PAGE size related operations, use PAGE size consts in order to be able to use different page size in the futur. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 29 ++--- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/arch

[PATCH 13/20] powerpc/8xx: Don't use MD_TWC for walk

2014-08-08 Thread Christophe Leroy
MD_TWC can only be used properly with 4k pages. So lets calculate level 2 table index by ourselves. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 30 +- 1 files changed, 13 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH 20/20] powerpc/8xx: Don't restore regs to save them again.

2014-08-08 Thread Christophe Leroy
There is not need to restore r10, r11 and cr registers at this end of ITLBmiss handler as they are saved again to the same place in ITLBError handler we are jumping to. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |8 +--- 1 files changed, 5 insertions(+), 3

[PATCH 17/20] powerpc/8xx: Better readibility of ERRATA CPU6 handling

2014-08-08 Thread Christophe Leroy
This patch hiddes that SPR address needed for CPU6 ERRATA handling in the macro. Then we don't have to worry about this address directly in the code. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 29 - 1 files changed, 16 insertions(+

[PATCH 18/20] powerpc/8xx: set PTE bit 22 off TLBmiss

2014-08-08 Thread Christophe Leroy
No need to re-set this bit at each TLB miss. Let's set it in the PTE. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pgtable-ppc32.h | 21 + arch/powerpc/include/asm/pte-8xx.h |7 +-- arch/powerpc/kernel/head_8xx.S |

[PATCH 19/20] powerpc/8xx: _PMD_PRESENT already set in level 1 entries

2014-08-08 Thread Christophe Leroy
When a PMD entry is valid, _PMD_PRESENT is set. Therefore, forcing that bit during TLB loading is useless. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc

[PATCH 15/20] powerpc/8xx: Const for TLB RPN forced value

2014-08-08 Thread Christophe Leroy
Value 0x00f0 is used to force bits in TLB level 2 entry. This value is linked to the page size and will vary when we change the page size. Lets define a const for it in order to have it at only one place. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 19

[PATCH 16/20] powerpc/8xx: Implement 16k pages

2014-08-08 Thread Christophe Leroy
This patch activates the handling of 16k pages on the MPC8xx. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig |2 +- arch/powerpc/include/asm/mmu-8xx.h |2 ++ arch/powerpc/kernel/head_8xx.S |4 3 files changed, 7 insertions(+), 1 deletions(-) diff

[PATCH v2 00/19] powerpc/8xx: Optimise MMU TLB handling and add support of 16k pages

2014-08-29 Thread Christophe Leroy
implementing a 16 bit alignment of the PGDIR. It is not worth potentially wasting up to 64k of memory just for removing one instruction (ori). 2) I managed to preserve r11 while calculating the level 2 address, therefore no more need to save r11 into CR. Signed-off-by: Christophe Leroy Tested

[PATCH v2 01/19] powerpc/8xx: Declare SPRG2 as a SCRATCH register

2014-08-29 Thread Christophe Leroy
Since coming 469d62be9263b92f2c3329540cbb1c076111f4f3, SPRG2 is used as a scratch register just like SPRG0 and SPRG1. So Declare it as such and fix the comment which is not valid anymore since that commit. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h |3 ++- arch

[PATCH v2 02/19] powerpc/8xx: Use SCRATCH0 and SCRATCH1 also for TLB handlers

2014-08-29 Thread Christophe Leroy
-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 104 -- 1 files changed, 36 insertions(+), 68 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 1329c5a..3af6db1 100644 --- a/arch/powerpc/kernel

[PATCH v2 03/19] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx

2014-08-29 Thread Christophe Leroy
Exception InstructionAccess does not exist on MPC8xx. No need to branch there from somewhere else. Handling can be done directly in InstructionTLBError Exception. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 17 +++-- 1 files changed, 7 insertions(+), 10

[PATCH v2 05/19] powerpc/8xx: Fix comment about DIRTY update

2014-08-29 Thread Christophe Leroy
Since commit 2321f33790a6c5b80322d907a92d5739e7521a13, dirty handling is not handled here anymore. So we fix the comment. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH v2 04/19] powerpc/8xx: Remove loading of r10 at end of FixupDAR

2014-08-29 Thread Christophe Leroy
Since commit 2321f33790a6c5b80322d907a92d5739e7521a13, r10 is not used anymore after FixupDAR. There is therefore no need to set it up with the value of DAR. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |7 +++ 1 files changed, 3 insertions(+), 4 deletions

[PATCH v2 10/19] powerpc/8xx: Duplicate two insns instead of branching

2014-08-29 Thread Christophe Leroy
Branching takes two cycles on MPC8xx. Lets duplicate the two instructions and avoid the branching. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc

[PATCH v2 06/19] powerpc/8xx: No need to save r10 and r3 when not calling FixupDAR

2014-08-29 Thread Christophe Leroy
r10 and r3 are only used inside FixupDAR function. So lets save them inside that function only. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 27 +-- 1 files changed, 13 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S

[PATCH v2 15/19] powerpc/8xx: Implement 16k pages

2014-08-29 Thread Christophe Leroy
This patch activates the handling of 16k pages on the MPC8xx. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig |2 +- arch/powerpc/include/asm/mmu-8xx.h |2 ++ arch/powerpc/kernel/head_8xx.S |4 3 files changed, 7 insertions(+), 1 deletions(-) diff

[PATCH v2 18/19] powerpc/8xx: _PMD_PRESENT already set in level 1 entries

2014-08-29 Thread Christophe Leroy
When a PMD entry is valid, _PMD_PRESENT is set. Therefore, forcing that bit during TLB loading is useless. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc

[PATCH v2 09/19] powerpc/8xx: Optimize verification in FixupDAR

2014-08-29 Thread Christophe Leroy
By XORing the upper part of the instruction code, we get a value that can directly be verified with the second test and we can remove the first test. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH v2 19/19] powerpc/8xx: Don't restore regs to save them again.

2014-08-29 Thread Christophe Leroy
There is not need to restore r10, r11 and cr registers at this end of ITLBmiss handler as they are saved again to the same place in ITLBError handler we are jumping to. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |8 +--- 1 files changed, 5 insertions(+), 3

[PATCH v2 17/19] powerpc/8xx: set PTE bit 22 off TLBmiss

2014-08-29 Thread Christophe Leroy
No need to re-set this bit at each TLB miss. Let's set it in the PTE. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pgtable-ppc32.h | 21 + arch/powerpc/include/asm/pte-8xx.h |7 +-- arch/powerpc/kernel/head_8xx.S |

[PATCH v2 12/19] powerpc/8xx: Don't use MD_TWC for walk

2014-08-29 Thread Christophe Leroy
MD_TWC can only be used properly with 4k pages. So lets calculate level 2 table index by ourselves. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 28 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH v2 08/19] powerpc/8xx: No need to restore registers and save them again.

2014-08-29 Thread Christophe Leroy
In DTLBError handler there is not need to restore r10, r11 and cr registers after fixing DAR as they are saved again to the same place just after. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v2 07/19] powerpc/8xx: DataAccess exception not generated by MPC8xx

2014-08-29 Thread Christophe Leroy
DataAccess exception is never generated by MPC8xx so do the job directly where it is used to avoid an unnecessary branching. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 23 ++- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/arch

[PATCH v2 13/19] powerpc/8xx: Use PAGE size related consts

2014-08-29 Thread Christophe Leroy
For PAGE size related operations, use PAGE size consts in order to be able to use different page size in the futur. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 30 ++ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/arch

[PATCH v2 14/19] powerpc/8xx: Const for TLB RPN forced value

2014-08-29 Thread Christophe Leroy
Value 0x00f0 is used to force bits in TLB level 2 entry. This value is linked to the page size and will vary when we change the page size. Lets define a const for it in order to have it at only one place. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 19

[PATCH v2 11/19] powerpc/8xx: Use M_TW instead of M_TWB

2014-08-29 Thread Christophe Leroy
Use M_TW instead of M_TWB for storing Level 1 table address as M_TWB requires 4k aligned tables, which is only the case with 4k pages. Consequently, we have to calculate the level 1 table index by ourselves. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 48

[PATCH v2 16/19] powerpc/8xx: Better readibility of ERRATA CPU6 handling

2014-08-29 Thread Christophe Leroy
This patch hiddes that SPR address needed for CPU6 ERRATA handling in the macro. Then we don't have to worry about this address directly in the code. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 29 - 1 files changed, 16 insertions(+

[PATCH v3 01/21] powerpc/8xx: Declare SPRG2 as a SCRATCH register

2014-09-17 Thread Christophe Leroy
Since coming 469d62be9263b92f2c3329540cbb1c076111f4f3, SPRG2 is used as a scratch register just like SPRG0 and SPRG1. So Declare it as such and fix the comment which is not valid anymore since that commit. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch

[PATCH v3 03/21] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx

2014-09-17 Thread Christophe Leroy
Exception InstructionAccess does not exist on MPC8xx. No need to branch there from somewhere else. Handling can be done directly in InstructionTLBError Exception. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - arch/powerpc/mm/fault.c uses the vector number, so

[PATCH v3 02/21] powerpc/8xx: Use SCRATCH0 and SCRATCH1 also for TLB handlers

2014-09-17 Thread Christophe Leroy
-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S | 104 -- 1 files changed, 36 insertions(+), 68 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 1329c5a

[PATCH v3 04/21] powerpc/8xx: Remove loading of r10 at end of FixupDAR

2014-09-17 Thread Christophe Leroy
Since commit 2321f33790a6c5b80322d907a92d5739e7521a13, r10 is not used anymore after FixupDAR. There is therefore no need to set it up with the value of DAR. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |7 +++ 1 files

[PATCH v3 00/21] powerpc/8xx: Optimise MMU TLB handling and add support of 16k pages

2014-09-17 Thread Christophe Leroy
This patchset: 1) provides several MMU TLB handling optimisation on MPC8xx. 2) adds support of 16k pages on MPC8xx. All changes have been successfully tested on a custom board equipped with MPC885 Signed-off-by: Christophe Leroy Tested-by: Christophe Leroy --- Changes in v2: - Patch number 10

[PATCH v3 05/21] powerpc/8xx: Fix comment about DIRTY update

2014-09-17 Thread Christophe Leroy
Since commit 2321f33790a6c5b80322d907a92d5739e7521a13, dirty handling is not handled here anymore. So we fix the comment. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |8 ++-- 1 files changed, 2 insertions(+), 6

[PATCH v3 09/21] powerpc/8xx: Optimize verification in FixupDAR

2014-09-17 Thread Christophe Leroy
By XORing the upper part of the instruction code, we get a value that can directly be verified with the second test and we can remove the first test. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |6 ++ 1 files changed

[PATCH v3 07/21] powerpc/8xx: DataAccess exception not generated by MPC8xx

2014-09-17 Thread Christophe Leroy
DataAccess exception is never generated by MPC8xx so do the job directly where it is used to avoid an unnecessary branching. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - arch/powerpc/mm/fault.c uses the vector number, so make sure it understands the new ones

[PATCH v3 12/21] powerpc/8xx: Don't use MD_TWC for walk

2014-09-17 Thread Christophe Leroy
MD_TWC can only be used properly with 4k pages. So lets calculate level 2 table index by ourselves. Signed-off-by: Christophe Leroy --- Changes in v2: - No need to save r11 in cr, we can do without modifying r11 in DataStoreTLBMiss Changes in v3: - None arch/powerpc/kernel/head_8xx.S | 28

[PATCH v3 13/21] powerpc/8xx: Use PAGE size related consts

2014-09-17 Thread Christophe Leroy
For PAGE size related operations, use PAGE size consts in order to be able to use different page size in the futur. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S | 30 ++ 1 files changed, 18

[PATCH v3 10/21] powerpc/8xx: Duplicate two insns instead of branching

2014-09-17 Thread Christophe Leroy
Branching takes two cycles on MPC8xx. Lets duplicate the two instructions and avoid the branching. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v3 14/21] powerpc/8xx: Const for TLB RPN forced value

2014-09-17 Thread Christophe Leroy
Value 0x00f0 is used to force bits in TLB level 2 entry. This value is linked to the page size and will vary when we change the page size. Lets define a const for it in order to have it at only one place. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch

[PATCH v3 08/21] powerpc/8xx: No need to restore registers and save them again.

2014-09-17 Thread Christophe Leroy
In DTLBError handler there is not need to restore r10, r11 and cr registers after fixing DAR as they are saved again to the same place just after. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |4 ++-- 1 files changed, 2

[PATCH v3 11/21] powerpc/8xx: Use M_TW instead of M_TWB

2014-09-17 Thread Christophe Leroy
Use M_TW instead of M_TWB for storing Level 1 table address as M_TWB requires 4k aligned tables, which is only the case with 4k pages. Consequently, we have to calculate the level 1 table index by ourselves. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch

[PATCH v3 06/21] powerpc/8xx: No need to save r10 and r3 when not calling FixupDAR

2014-09-17 Thread Christophe Leroy
r10 and r3 are only used inside FixupDAR function. So lets save them inside that function only. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S | 27 +-- 1 files changed, 13 insertions(+), 14 deletions

[PATCH v3 15/21] powerpc/8xx: Implement 16k pages

2014-09-17 Thread Christophe Leroy
This patch activates the handling of 16k pages on the MPC8xx. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/Kconfig |2 +- arch/powerpc/include/asm/mmu-8xx.h |2 ++ arch/powerpc/kernel/head_8xx.S |4 3 files

[PATCH v3 17/21] powerpc/8xx: set PTE bit 22 off TLBmiss

2014-09-17 Thread Christophe Leroy
No need to re-set this bit at each TLB miss. Let's set it in the PTE. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - Removed PPC405 related macro from PPC8xx specific code - PTE_NONE_MASK doesn't need PAGE_ACCESSED in Linux 2.6 arch/powerpc/include/a

[PATCH v3 19/21] powerpc/8xx: Don't restore regs to save them again.

2014-09-17 Thread Christophe Leroy
There is not need to restore r10, r11 and cr registers at this end of ITLBmiss handler as they are saved again to the same place in ITLBError handler we are jumping to. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |8

[PATCH v3 18/21] powerpc/8xx: _PMD_PRESENT already set in level 1 entries

2014-09-17 Thread Christophe Leroy
When a PMD entry is valid, _PMD_PRESENT is set. Therefore, forcing that bit during TLB loading is useless. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 21/21] powerpc/8xx: Invalidate non present TLB as early as possible

2014-09-17 Thread Christophe Leroy
free the TLB as soon as possible. This also has the advantage of removing some 8xx specific code from fault.c Signed-off-by: Christophe Leroy --- Changes in v3: - New linux/arch/powerpc/kernel/head_8xx.S | 15 ++- linux/arch/powerpc/mm/fault.c| 7 --- 2 files change

[PATCH v3 16/21] powerpc/8xx: Better readibility of ERRATA CPU6 handling

2014-09-17 Thread Christophe Leroy
This patch hiddes that SPR address needed for CPU6 ERRATA handling in the macro. Then we don't have to worry about this address directly in the code. Signed-off-by: Christophe Leroy --- Changes in v2: - None Changes in v3: - None arch/powerpc/kernel/head_8xx.S |

[PATCH v3 20/21] powerpc/8xx: Use DAR to save r3 for CPU6 ERRATA

2014-09-17 Thread Christophe Leroy
As we are not using anymore DAR to save registers, it is now available for saving the r3 register used for CPU6 ERRATA handling. Therefore we can remove the major hack which was to use memory location 0 to save r3. Signed-off-by: Christophe Leroy --- Changes in v3: - New linux/arch/powerpc

Re: [PATCH v3 00/21] powerpc/8xx: Optimise MMU TLB handling and add support of 16k pages

2014-09-17 Thread christophe leroy
Le 17/09/2014 18:40, Scott Wood a écrit : On Wed, 2014-09-17 at 18:36 +0200, Christophe Leroy wrote: This patchset: 1) provides several MMU TLB handling optimisation on MPC8xx. 2) adds support of 16k pages on MPC8xx. All changes have been successfully tested on a custom board equipped with

Re: [PATCH v3 03/21] powerpc/8xx: exception InstructionAccess does not exist on MPC8xx

2014-09-18 Thread christophe leroy
Le 18/09/2014 18:42, leroy christophe a écrit : Le 18/09/2014 17:15, Joakim Tjernlund a écrit : Christophe Leroy wrote on 2014/09/17 18:36:57: Exception InstructionAccess does not exist on MPC8xx. No need to branch there from somewhere else. Handling can be done directly in

  1   2   3   4   5   6   7   8   9   10   >