Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-09-24 Thread Geoff Levand
Hi Ben,

On 09/21/2018 04:20 PM, Ben Hutchings wrote:
> I've applied these, with some changes:
> 
> 0001: Rather than changing the setting of CONFIG_ACPI_NFIT for arm64, I
> removed it entirely as it would be redundant with the top-level config.
> 
> 0002: I dropped several of the config symbols which are automatic.  Any
> config symbol that doesn't have a description can only be enabled via
> other symbols that select it.  These shouldn't be mentioned in
> debian/config files.
> 
> I also removed CONFIG_ACPI_CONFIGFS as I have a concern that this
> feature allows subverting Secure Boot.  If this feature is important to
> you, I can investigate further and maybe add a patch to conditionally
> disable it at run-time instead.

The changes you've committed look fine.  I have no need for
CONFIG_ACPI_CONFIGFS.  If it seems a risk, then I think
it OK to have it disabled until a real need comes up.

-Geoff



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-09-21 Thread Geoff Levand
On 09/20/2018 12:49 PM, Geoff Levand wrote:
> Attached are the two kernel config patches rebased to the latest v4.18.6-1
> Buster kernel. 

Forgot to include the rebased m400 fixup patch.

  0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch
  0002-arm64-Updates-for-ACPI-servers.patch
  0003-arm64-Add-fixup-for-HPE-m400-APEI-firmware-problems.patch

-Geoff

>From 63d1232a77b667090e2dd3fff0ac7868784850e9 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 20 Sep 2018 12:23:55 -0700
Subject: [PATCH 1/8] [arm64] Use default of CONFIG_ACPI_NFIT=m

Commit ed497f3cb706d0e0f63844b064d9ebbf6f33b052 (Add server and 96boards options)
added an arm64 specific CONFIG_ACPI_NFIT=y, overriding the default of =m, but the
commit message mentions nothing about why this was done.

Remove the arm64 specific setting and use the default of module build.

Cc: Riku Voipio 
Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index d14f3ff13174..0e0bf1b05db7 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -71,7 +71,7 @@ CONFIG_ACPI_NUMA=y
 ##
 ## file: drivers/acpi/nfit/Kconfig
 ##
-CONFIG_ACPI_NFIT=y
+CONFIG_ACPI_NFIT=m
 
 ##
 ## file: drivers/android/Kconfig
-- 
2.14.1

>From b1e30cf4155b5496234da7b1072f4c246cdfc9a1 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 20 Sep 2018 12:23:55 -0700
Subject: [PATCH 2/8] [arm64] Updates for ACPI servers

o Enable CONFIG_SCHED_SMT for hyperthreading processors.
o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
o Enable a number of ACPI options likely to be available on servers.
o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.

Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 29 -
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 0e0bf1b05db7..1a6c6a41d6e4 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -9,6 +9,7 @@ CONFIG_ARM64_ERRATUM_834220=y
 CONFIG_ARM64_VA_BITS_48=y
 ## end choice
 CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
 CONFIG_NR_CPUS=256
 CONFIG_NUMA=y
 CONFIG_SECCOMP=y
@@ -24,6 +25,7 @@ CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y
 CONFIG_COMPAT=y
+CONFIG_ARM64_LSE_ATOMICS=y
 
 ##
 ## file: arch/arm64/crypto/Kconfig
@@ -67,6 +69,21 @@ CONFIG_ARCH_XGENE=y
 ##
 CONFIG_ACPI=y
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PCI_SLOT=y
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_WATCHDOG=y
+CONFIG_ACPI_CONFIGFS=m
+
+##
+## file: drivers/acpi/apei/Kconfig
+##
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_SEA=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
 
 ##
 ## file: drivers/acpi/nfit/Kconfig
@@ -222,6 +239,12 @@ CONFIG_EXTCON_USB_GPIO=m
 ##
 CONFIG_RASPBERRYPI_FIRMWARE=y
 
+##
+## file: drivers/firmware/efi/Kconfig
+##
+CONFIG_UEFI_CPER=y
+CONFIG_UEFI_CPER_ARM=y
+
 ##
 ## file: drivers/gpio/Kconfig
 ##
@@ -1097,6 +1120,7 @@ CONFIG_VIRTIO_MMIO=m
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_GPIO_WATCHDOG=m
+CONFIG_WDAT_WDT=m
 CONFIG_ARM_SP805_WATCHDOG=m
 CONFIG_ARM_SBSA_WATCHDOG=m
 CONFIG_DW_WATCHDOG=m
@@ -1107,11 +1131,6 @@ CONFIG_MESON_GXBB_WATCHDOG=m
 CONFIG_MESON_WATCHDOG=m
 CONFIG_BCM2835_WDT=m
 
-##
-## file: fs/pstore/Kconfig
-##
-CONFIG_PSTORE=y
-
 ##
 ## file: mm/Kconfig
 ##
-- 
2.14.1

>From 0fc33a4cfa3bb1ad35f18d161c9b78298dd08770 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 20 Sep 2018 12:23:55 -0700
Subject: [PATCH 3/8] [arm64] Add fixup for HPE m400 APEI firmware problems

Signed-off-by: Geoff Levand 
---
 .../arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch | 94 ++
 debian/patches/series  |  1 +
 2 files changed, 95 insertions(+)
 create mode 100644 debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch

diff --git a/debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch b/debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch
new file mode 100644
index ..efd13e36faa0
--- /dev/null
+++ b/debian/patches/bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch
@@ -0,0 +1,94 @@
+From e0dc30ae9056c3c01423c75ea28c20fb135f72ad Mon Sep 17 00:00:00 2001
+From: Geoff Levand 
+Date: Wed, 13 Jun 2018 10:56:08 -0700
+Subject: [PATCH] arm64/acpi: Add fixup for HPE m400 quirks
+
+Adds a new ACPI init routine acpi_fixup_m400_quirks that adds
+a work-around for HPE ProLiant m400 APEI firmware problems.
+
+The work-around disables APEI when CONFIG_ACPI_APEI is set and
+m400 firmware is detected.  Without this fixup m400 systems
+experience errors like these on startup:
+
+  [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2
+  [Hardware Error]: event severity: fatal
+  

Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-09-20 Thread Geoff Levand
Hi Ben,

Attached are the two kernel config patches rebased to the latest v4.18.6-1
Buster kernel. 

  0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch
  0002-arm64-Updates-for-ACPI-servers.patch

Do you plan to merge these?  If there is anything I can do to make
things easier for you please let me know.

-Geoff

>From 63d1232a77b667090e2dd3fff0ac7868784850e9 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 20 Sep 2018 12:23:55 -0700
Subject: [PATCH 1/8] [arm64] Use default of CONFIG_ACPI_NFIT=m

Commit ed497f3cb706d0e0f63844b064d9ebbf6f33b052 (Add server and 96boards options)
added an arm64 specific CONFIG_ACPI_NFIT=y, overriding the default of =m, but the
commit message mentions nothing about why this was done.

Remove the arm64 specific setting and use the default of module build.

Cc: Riku Voipio 
Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index d14f3ff13174..0e0bf1b05db7 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -71,7 +71,7 @@ CONFIG_ACPI_NUMA=y
 ##
 ## file: drivers/acpi/nfit/Kconfig
 ##
-CONFIG_ACPI_NFIT=y
+CONFIG_ACPI_NFIT=m
 
 ##
 ## file: drivers/android/Kconfig
-- 
2.14.1

>From b1e30cf4155b5496234da7b1072f4c246cdfc9a1 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 20 Sep 2018 12:23:55 -0700
Subject: [PATCH 2/8] [arm64] Updates for ACPI servers

o Enable CONFIG_SCHED_SMT for hyperthreading processors.
o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
o Enable a number of ACPI options likely to be available on servers.
o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.

Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 29 -
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 0e0bf1b05db7..1a6c6a41d6e4 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -9,6 +9,7 @@ CONFIG_ARM64_ERRATUM_834220=y
 CONFIG_ARM64_VA_BITS_48=y
 ## end choice
 CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
 CONFIG_NR_CPUS=256
 CONFIG_NUMA=y
 CONFIG_SECCOMP=y
@@ -24,6 +25,7 @@ CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y
 CONFIG_COMPAT=y
+CONFIG_ARM64_LSE_ATOMICS=y
 
 ##
 ## file: arch/arm64/crypto/Kconfig
@@ -67,6 +69,21 @@ CONFIG_ARCH_XGENE=y
 ##
 CONFIG_ACPI=y
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PCI_SLOT=y
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_WATCHDOG=y
+CONFIG_ACPI_CONFIGFS=m
+
+##
+## file: drivers/acpi/apei/Kconfig
+##
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_SEA=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
 
 ##
 ## file: drivers/acpi/nfit/Kconfig
@@ -222,6 +239,12 @@ CONFIG_EXTCON_USB_GPIO=m
 ##
 CONFIG_RASPBERRYPI_FIRMWARE=y
 
+##
+## file: drivers/firmware/efi/Kconfig
+##
+CONFIG_UEFI_CPER=y
+CONFIG_UEFI_CPER_ARM=y
+
 ##
 ## file: drivers/gpio/Kconfig
 ##
@@ -1097,6 +1120,7 @@ CONFIG_VIRTIO_MMIO=m
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_GPIO_WATCHDOG=m
+CONFIG_WDAT_WDT=m
 CONFIG_ARM_SP805_WATCHDOG=m
 CONFIG_ARM_SBSA_WATCHDOG=m
 CONFIG_DW_WATCHDOG=m
@@ -1107,11 +1131,6 @@ CONFIG_MESON_GXBB_WATCHDOG=m
 CONFIG_MESON_WATCHDOG=m
 CONFIG_BCM2835_WDT=m
 
-##
-## file: fs/pstore/Kconfig
-##
-CONFIG_PSTORE=y
-
 ##
 ## file: mm/Kconfig
 ##
-- 
2.14.1



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-09-04 Thread Geoff Levand
Hi Ben,

On 09/04/2018 10:25 AM, Ben Hutchings wrote:
> On Fri, 2018-08-31 at 15:42 -0700, Geoff Levand wrote:
>> I've rebased my two kernel config patches, attached, to the latest
>> v4.17.17-1 buster kernel.  These patches enable kernel features for
>> newer ARM64 servers. 
>>
>>   0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch
>>   0002-arm64-Updates-for-ACPI-servers.patch
>>
>> The issue that Riku brought up of how to support HPE m400 moonshot
>> systems when ACPI_APEI is enabled has been resolved on the
>> arm-kernel ML [1].  In summary, the latest released m400 firmware
>> did not support APEI, and so no special work-around or kernel quirk
>> support is needed.
>>
>> With the resolution of that issue I feel these patches are ready to
>> apply.  Please consider.
> 
> Is it resolved? Graeme Gregory claimed
> (https://www.spinics.net/lists/arm-kernel/msg669946.html) that "most
> people are running the firmware provided from HPe support but was never
> put on release site".

I took that as just a comment on the discussion which it follows, which
seemed to end with 'distro maintainers deciding how to handle the problem'
and then Riku recommending to document the need in Debian for a m400
specific command line option.

Based on the several mail list discussions that came out of this I
think it very unlikely we'll get an upstream kernel fix.  My appeal
directly to Will Deacon for guidance even went unanswered.

At this point I feel our choices are:

1) Merge the kernel config patch I proposed and add a comment to
the arm64 Installation Guide about the need to add 'hest_disable=1'
to the kernel command line for the m400.

2) Merge the kernel config patch and the
'Add fix for broken HPE moonshot ACPI-APEI support' patch I proposed.

3) Remove the CONFIG_ACPI_APEI options from the the kernel config patch
I proposed and merge that.

I prefer #2, which would get us ACPI_APEI support and a seamless
install for m400 users.

If there is anything you recommend I could try it.  I'm not apposed
to any solution.  I just want to get the kernel config updated so
Buster better supports newer systems.

-Geoff



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-08-31 Thread Geoff Levand
Hi,

I've rebased my two kernel config patches, attached, to the latest
v4.17.17-1 buster kernel.  These patches enable kernel features for
newer ARM64 servers. 

  0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch
  0002-arm64-Updates-for-ACPI-servers.patch

The issue that Riku brought up of how to support HPE m400 moonshot
systems when ACPI_APEI is enabled has been resolved on the
arm-kernel ML [1].  In summary, the latest released m400 firmware
did not support APEI, and so no special work-around or kernel quirk
support is needed.

With the resolution of that issue I feel these patches are ready to
apply.  Please consider.

[1] https://www.spinics.net/lists/arm-kernel/msg670446.html (efi: add contents 
of LinuxExtraArgs EFI var to command line)

-Geoff
 

>From 7d93f2d534f3ba60b94402b337e165d34e1caf25 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Wed, 13 Jun 2018 10:50:57 -0700
Subject: [PATCH 1/7] [arm64] Use default of CONFIG_ACPI_NFIT=m

Commit ed497f3cb706d0e0f63844b064d9ebbf6f33b052 (Add server and 96boards options)
added an arm64 specific CONFIG_ACPI_NFIT=y, overriding the default of =m, but the
commit message mentions nothing about why this was done.

Remove the arm64 specific setting and use the default of module build.

Cc: Riku Voipio 
Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index adf3e60bd9f5..72f2dadc16e3 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -71,7 +71,7 @@ CONFIG_ACPI_NUMA=y
 ##
 ## file: drivers/acpi/nfit/Kconfig
 ##
-CONFIG_ACPI_NFIT=y
+CONFIG_ACPI_NFIT=m
 
 ##
 ## file: drivers/android/Kconfig
-- 
2.14.1


>From 10f4c4399f54d99f293047c3d6dfeba08849526e Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Wed, 13 Jun 2018 10:50:57 -0700
Subject: [PATCH 2/7] [arm64] Updates for ACPI servers

o Enable CONFIG_SCHED_SMT for hyperthreading processors.
o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
o Enable a number of ACPI options likely to be available on servers.
o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.

Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 29 -
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 72f2dadc16e3..250395babf59 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -9,6 +9,7 @@ CONFIG_ARM64_ERRATUM_834220=y
 CONFIG_ARM64_VA_BITS_48=y
 ## end choice
 CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
 CONFIG_NR_CPUS=256
 CONFIG_NUMA=y
 CONFIG_SECCOMP=y
@@ -24,6 +25,7 @@ CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y
 CONFIG_COMPAT=y
+CONFIG_ARM64_LSE_ATOMICS=y
 
 ##
 ## file: arch/arm64/crypto/Kconfig
@@ -67,6 +69,21 @@ CONFIG_ARCH_XGENE=y
 ##
 CONFIG_ACPI=y
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PCI_SLOT=y
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_WATCHDOG=y
+CONFIG_ACPI_CONFIGFS=m
+
+##
+## file: drivers/acpi/apei/Kconfig
+##
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_SEA=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
 
 ##
 ## file: drivers/acpi/nfit/Kconfig
@@ -222,6 +239,12 @@ CONFIG_EXTCON_USB_GPIO=m
 ##
 CONFIG_RASPBERRYPI_FIRMWARE=y
 
+##
+## file: drivers/firmware/efi/Kconfig
+##
+CONFIG_UEFI_CPER=y
+CONFIG_UEFI_CPER_ARM=y
+
 ##
 ## file: drivers/gpio/Kconfig
 ##
@@ -1097,6 +1120,7 @@ CONFIG_VIRTIO_MMIO=m
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_GPIO_WATCHDOG=m
+CONFIG_WDAT_WDT=m
 CONFIG_ARM_SP805_WATCHDOG=m
 CONFIG_ARM_SBSA_WATCHDOG=m
 CONFIG_DW_WATCHDOG=m
@@ -1107,11 +1131,6 @@ CONFIG_MESON_GXBB_WATCHDOG=m
 CONFIG_MESON_WATCHDOG=m
 CONFIG_BCM2835_WDT=m
 
-##
-## file: fs/pstore/Kconfig
-##
-CONFIG_PSTORE=y
-
 ##
 ## file: mm/Kconfig
 ##
-- 
2.14.1




Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-08-31 Thread Geoff Levand
Hi,

I've rebased my two kernel config patches, attached, to the latest
v4.17.17-1 buster kernel.  These patches enable kernel features for
newer ARM64 servers. 

  0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch
  0002-arm64-Updates-for-ACPI-servers.patch

The issue that Riku brought up of how to support HPE m400 moonshot
systems when ACPI_APEI is enabled has been resolved on the
arm-kernel ML [1].  In summary, the latest released m400 firmware
did not support APEI, and so no special work-around or kernel quirk
support is needed.

With the resolution of that issue I feel these patches are ready to
apply.  Please consider.

[1] https://www.spinics.net/lists/arm-kernel/msg670446.html (efi: add contents 
of LinuxExtraArgs EFI var to command line)

-Geoff
 
>From 7d93f2d534f3ba60b94402b337e165d34e1caf25 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Wed, 13 Jun 2018 10:50:57 -0700
Subject: [PATCH 1/7] [arm64] Use default of CONFIG_ACPI_NFIT=m

Commit ed497f3cb706d0e0f63844b064d9ebbf6f33b052 (Add server and 96boards options)
added an arm64 specific CONFIG_ACPI_NFIT=y, overriding the default of =m, but the
commit message mentions nothing about why this was done.

Remove the arm64 specific setting and use the default of module build.

Cc: Riku Voipio 
Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index adf3e60bd9f5..72f2dadc16e3 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -71,7 +71,7 @@ CONFIG_ACPI_NUMA=y
 ##
 ## file: drivers/acpi/nfit/Kconfig
 ##
-CONFIG_ACPI_NFIT=y
+CONFIG_ACPI_NFIT=m
 
 ##
 ## file: drivers/android/Kconfig
-- 
2.14.1

>From 10f4c4399f54d99f293047c3d6dfeba08849526e Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Wed, 13 Jun 2018 10:50:57 -0700
Subject: [PATCH 2/7] [arm64] Updates for ACPI servers

o Enable CONFIG_SCHED_SMT for hyperthreading processors.
o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
o Enable a number of ACPI options likely to be available on servers.
o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.

Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 29 -
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 72f2dadc16e3..250395babf59 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -9,6 +9,7 @@ CONFIG_ARM64_ERRATUM_834220=y
 CONFIG_ARM64_VA_BITS_48=y
 ## end choice
 CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
 CONFIG_NR_CPUS=256
 CONFIG_NUMA=y
 CONFIG_SECCOMP=y
@@ -24,6 +25,7 @@ CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y
 CONFIG_COMPAT=y
+CONFIG_ARM64_LSE_ATOMICS=y
 
 ##
 ## file: arch/arm64/crypto/Kconfig
@@ -67,6 +69,21 @@ CONFIG_ARCH_XGENE=y
 ##
 CONFIG_ACPI=y
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PCI_SLOT=y
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_WATCHDOG=y
+CONFIG_ACPI_CONFIGFS=m
+
+##
+## file: drivers/acpi/apei/Kconfig
+##
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_SEA=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
 
 ##
 ## file: drivers/acpi/nfit/Kconfig
@@ -222,6 +239,12 @@ CONFIG_EXTCON_USB_GPIO=m
 ##
 CONFIG_RASPBERRYPI_FIRMWARE=y
 
+##
+## file: drivers/firmware/efi/Kconfig
+##
+CONFIG_UEFI_CPER=y
+CONFIG_UEFI_CPER_ARM=y
+
 ##
 ## file: drivers/gpio/Kconfig
 ##
@@ -1097,6 +1120,7 @@ CONFIG_VIRTIO_MMIO=m
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_GPIO_WATCHDOG=m
+CONFIG_WDAT_WDT=m
 CONFIG_ARM_SP805_WATCHDOG=m
 CONFIG_ARM_SBSA_WATCHDOG=m
 CONFIG_DW_WATCHDOG=m
@@ -1107,11 +1131,6 @@ CONFIG_MESON_GXBB_WATCHDOG=m
 CONFIG_MESON_WATCHDOG=m
 CONFIG_BCM2835_WDT=m
 
-##
-## file: fs/pstore/Kconfig
-##
-CONFIG_PSTORE=y
-
 ##
 ## file: mm/Kconfig
 ##
-- 
2.14.1



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-08-06 Thread Geoff Levand
Hi All,

On 08/06/2018 06:29 AM, Riku Voipio wrote:
> Thanks indeed - unfortunately we seem to be endind up in 
> a dead end with the upstream developers:
> 
> https://www.spinics.net/lists/arm-kernel/msg669674.html
> 
> Considering HPE didn't actually release the firmware, I think we
> can go with just enabling the options and documenting the command line
> option.

Just to mention it, I went through and verified the info James Morse had
posted regarding m400 System ROM releases [1] and came to the same
conclusion; the latest official release of m400 System ROM did not support
ACPI HEST/AEPI.

[1]  https://www.spinics.net/lists/arm-kernel/msg670446.html

-Geoff



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-06-13 Thread Geoff Levand
On 06/09/2018 05:15 AM, Ian Campbell wrote:

> I think this is probably something for the arch (or perhaps platform)
> code to deal with. See for example all the various platform quirks in
> arch/x86/kernel/acpi/boot.c, which fixup various wrongness and/or
> disable features.

I followed your advice and created a fix in the arm64 acpi init
code of arch/arm64/kernel/acpi.c.  Here's the submission:

  https://marc.info/?l=linux-acpi=152891415600796=2
  https://www.spinics.net/lists/linux-acpi/msg82887.html



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-06-08 Thread Geoff Levand
On 06/05/2018 12:28 AM, Ian Campbell wrote:
> On Tue, 2018-06-05 at 02:14 +0100, Ben Hutchings wrote:
> 
>> I don't think it's OK to cause a regression like this.  Since this is
>> problem affects a specific known platform, the driver ought to
>> recognise it and disable itself automatically.
> 
> Indeed, while the Fedora bug upthread claims such a patch wouldn't be
> upstreamable, AFAIK it is not uncommon to have such quirks for broken
> firmware based upon DMI identifiers or similar.

Just to mention it, Mark Salter submitted one of the work-around patches
for the m400 firmware.  The reply from the ACPI maintainer wasn't very
encouraging. See:

  https://lkml.org/lkml/2018/4/19/1020 (ACPI / scan: Fix regression related to 
X-Gene UARTs)

CONFIG_ACPI_APEI allows for automated error reporting, so it is something
that is very desirable for unattended servers in a production environment.
Mark sent me a minimal patch that allows CONFIG_ACPI_APEI to work on m400.
I've attached a patch that puts his patch into the kernel patch series.  

  arm64-Add-fix-for-broken-HPE-moonshot-ACPI-APEI-supp.patch

Is this an acceptable solution?
>From e2bbf7bd8ef0231dcaa440a5baa8722a11634f75 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Fri, 8 Jun 2018 10:52:29 -0700
Subject: [PATCH] [arm64] Add fix for broken HPE moonshot ACPI-APEI support

Signed-off-by: Geoff Levand 
---
 ...4-Ignore-broken-HPE-moonshot-APEI-support.patch | 39 ++
 debian/patches/series  |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 debian/patches/bugfix/arm64/ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-support.patch

diff --git a/debian/patches/bugfix/arm64/ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-support.patch b/debian/patches/bugfix/arm64/ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-support.patch
new file mode 100644
index ..ca7a7bf67258
--- /dev/null
+++ b/debian/patches/bugfix/arm64/ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-support.patch
@@ -0,0 +1,39 @@
+From 2c4be2497e1cdbeaeee2decd9f85bfd9926d0321 Mon Sep 17 00:00:00 2001
+From: Mark Salter 
+Date: Tue, 27 Feb 2018 00:21:23 -0500
+Subject: [PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
+
+The aarch64 HP moonshot platforms have a firmware bug which causes a
+spurious fatal memory error via APEI at boot time. This platform is no
+longer supported and no further firmware updates are expected. This is
+a downstream-only hack to avoid the problem by bailing out of HEST
+table probing if we detect a moonshot HEST table.
+
+Signed-off-by: Mark Salter 
+Signed-off-by: Geoff Levand 
+---
+ drivers/acpi/apei/hest.c | 8 
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
+index 9cb74115a43d..9305daabe24c 100644
+--- a/drivers/acpi/apei/hest.c
 b/drivers/acpi/apei/hest.c
+@@ -89,6 +89,14 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
+ 	if (hest_disable || !hest_tab)
+ 		return -EINVAL;
+ 
++#ifdef CONFIG_ARM64
++	/* Ignore broken firmware */
++	if (!strncmp(hest_tab->header.oem_id, "HPE   ", 6) &&
++	!strncmp(hest_tab->header.oem_table_id, "ProLiant", 8) &&
++	MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM)
++		return -EINVAL;
++#endif
++
+ 	hest_hdr = (struct acpi_hest_header *)(hest_tab + 1);
+ 	for (i = 0; i < hest_tab->error_source_count; i++) {
+ 		len = hest_esrc_len(hest_hdr);
+-- 
+2.14.1
+
diff --git a/debian/patches/series b/debian/patches/series
index cb1d40074141..d77fa2bf4faf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -68,6 +68,7 @@ bugfix/x86/perf-tools-fix-unwind-build-on-i386.patch
 bugfix/sh/sh-boot-do-not-use-hyphen-in-exported-variable-name.patch
 bugfix/x86/mmap-remember-the-map_fixed-flag-as-vm_fixed.patch
 bugfix/x86/mmap-add-an-exception-to-the-stack-gap-for-hotspot-jvm.patch
+bugfix/arm64/ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-support.patch
 
 # Arch features
 features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
-- 
2.14.1



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-06-04 Thread Geoff Levand
On 06/04/2018 03:51 AM, Riku Voipio wrote:
> On Fri, Jun 01, 2018 at 10:07:57AM -0700, Geoff Levand wrote:

>> o Change CONFIG_ACPI_NFIT=y to CONFIG_ACPI_NFIT=m.
>> o Enable CONFIG_SCHED_SMT for hyperthreading processors.
>> o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
>> o Enable a number of ACPI options likely to be available on servers.
>> o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.
> 
> ACPI_APEI breaks HP m400, the xgene moonshot:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1574718
>  
> The rest of options are generally fine. Wish more of these were modules tho.
> If we ok with telling M400 users to setting kernel command line of 
> ghes.disable=1,
> we can enable APEI as well.

I think the hardware error logging/reporting features ACPI_APEI allows
is desired for servers.  The M400 problem is a problem with its firmware.
I don't think we should hold everyone else back because of one platform
with a known problem and relatively straight forward fix. M400 users would
in general need to work around the problem with kernels from other
sources/distros.  So, I think it OK to require M400 users to add a
command line fix.

>> -- System Information:
>> Debian Release: buster/sid
>>   APT prefers testing
>>   APT policy: (500, 'testing')
>> Architecture: arm64 (aarch64)
>>
>> Kernel: Linux 4.16.12 (SMP w/224 CPU cores)
> 
> Cheeky. I take that means Debian kernel works well on you plaform.

Seems to be working good with the kernel config updates.



Bug#900581: linux: Enable Buster kernel features for newer ARM64 servers.

2018-06-01 Thread Geoff Levand
X-Debbugs-Cc: ge...@infradead.org, Riku Voipio 
Source: linux
Severity: normal
Tags: patch buster

Attached patches enable kernel features for newer ARM64 servers.

o Change CONFIG_ACPI_NFIT=y to CONFIG_ACPI_NFIT=m.
o Enable CONFIG_SCHED_SMT for hyperthreading processors.
o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
o Enable a number of ACPI options likely to be available on servers.
o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.

  0001-arm64-Use-default-of-CONFIG_ACPI_NFIT-m.patch
  0002-arm64-Updates-for-ACPI-servers.patch


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: arm64 (aarch64)

Kernel: Linux 4.16.12 (SMP w/224 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From 45de8904c961d98f48f61a87198579a90daa61f9 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 31 May 2018 17:38:38 -0700
Subject: [PATCH 1/4] [arm64] Use default of CONFIG_ACPI_NFIT=m

Commit ed497f3cb706d0e0f63844b064d9ebbf6f33b052 (Add server and 96boards options)
added an arm64 specific CONFIG_ACPI_NFIT=y, overriding the default of =m, but the
commit message mentions nothing about why this was done.

Remove the arm64 specific setting and use the default of module build.

Cc: Riku Voipio 
Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 5 -
 1 file changed, 5 deletions(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 4d862989014c..2cbdc9092de1 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -68,11 +68,6 @@ CONFIG_ARCH_XGENE=y
 CONFIG_ACPI=y
 CONFIG_ACPI_NUMA=y
 
-##
-## file: drivers/acpi/nfit/Kconfig
-##
-CONFIG_ACPI_NFIT=y
-
 ##
 ## file: drivers/ata/Kconfig
 ##
-- 
2.14.1

>From 60439ed76d7c9660285d8805d40d35a84de218d3 Mon Sep 17 00:00:00 2001
From: Geoff Levand 
Date: Thu, 31 May 2018 17:38:38 -0700
Subject: [PATCH 2/4] [arm64] Updates for ACPI servers

o Enable CONFIG_SCHED_SMT for hyperthreading processors.
o Enable CONFIG_ARM64_LSE_ATOMICS for v8.1 processors.
o Enable a number of ACPI options likely to be available on servers.
o CONFIG_ACPI_APEI selects PSTORE, so remove the arm64 specific setting.

Signed-off-by: Geoff Levand 
---
 debian/config/arm64/config | 29 -
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index 2cbdc9092de1..ed40c33ce47d 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -9,6 +9,7 @@ CONFIG_ARM64_ERRATUM_834220=y
 CONFIG_ARM64_VA_BITS_48=y
 ## end choice
 CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
 CONFIG_NR_CPUS=256
 CONFIG_NUMA=y
 CONFIG_SECCOMP=y
@@ -24,6 +25,7 @@ CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y
 CONFIG_COMPAT=y
+CONFIG_ARM64_LSE_ATOMICS=y
 
 ##
 ## file: arch/arm64/crypto/Kconfig
@@ -67,6 +69,21 @@ CONFIG_ARCH_XGENE=y
 ##
 CONFIG_ACPI=y
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PCI_SLOT=y
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_WATCHDOG=y
+CONFIG_ACPI_CONFIGFS=m
+
+##
+## file: drivers/acpi/apei/Kconfig
+##
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_SEA=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
 
 ##
 ## file: drivers/ata/Kconfig
@@ -212,6 +229,12 @@ CONFIG_EXTCON_USB_GPIO=m
 ##
 CONFIG_RASPBERRYPI_FIRMWARE=y
 
+##
+## file: drivers/firmware/efi/Kconfig
+##
+CONFIG_UEFI_CPER=y
+CONFIG_UEFI_CPER_ARM=y
+
 ##
 ## file: drivers/gpio/Kconfig
 ##
@@ -1074,6 +1097,7 @@ CONFIG_VIRTIO_MMIO=m
 ## file: drivers/watchdog/Kconfig
 ##
 CONFIG_GPIO_WATCHDOG=m
+CONFIG_WDAT_WDT=m
 CONFIG_ARM_SP805_WATCHDOG=m
 CONFIG_ARM_SBSA_WATCHDOG=m
 CONFIG_DW_WATCHDOG=m
@@ -1084,11 +1108,6 @@ CONFIG_MESON_GXBB_WATCHDOG=m
 CONFIG_MESON_WATCHDOG=m
 CONFIG_BCM2835_WDT=m
 
-##
-## file: fs/pstore/Kconfig
-##
-CONFIG_PSTORE=y
-
 ##
 ## file: mm/Kconfig
 ##
-- 
2.14.1



Bug#900036: firmware-nonfree: Buster kernel needs updated (upstream) firmware versions

2018-05-24 Thread Geoff Levand
X-Debbugs-Cc: ge...@infradead.org
Package: firmware-nonfree
Version: 20170823-1
Severity: grave
Tags: d-i
Justification: renders package unusable

The current firmware-nonfree package is out of date and does not include
firmware files the drivers in the Buster kernel require.

Specifically, the Buster kernel driver (qede) for QLogic network adapters needs
firmware 'qed_init_values_zipped-8.33.1.0.bin', which is available in the
upstream kernel firmware from commit [1], but this is not included in the
current firmware-nonfree package.

This situation makes it very difficult for users trying to netboot install to
machines with QLogic network adapters (Cavium Thunder2).

>From the kernel log:

  qede :0a:00.0: firmware: failed to load 
qed/qed_init_values_zipped-8.33.1.0.bin

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/qed?id=5582ca4caff8dc029b136722d11e7df6f40888ad


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: arm64 (aarch64)

Kernel: Linux 4.16.0-1-arm64 (SMP w/224 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



Bug#484693: linux-2.6: Add RTC class support for powerpc64 machines

2008-06-07 Thread Geoff Levand
On 06/05/2008 09:45 AM, Geoff Levand wrote:
 The attached kernel and config.powerpc64 patches add a
 new style RTC class driver that works with most powerpc64
 platforms.

This patch was merged in to mainline for 2.6.26-rc6.

author  David Woodhouse [EMAIL PROTECTED]
Fri, 6 Jun 2008 05:46:50 + (22:46 -0700)
committer   Linus Torvalds [EMAIL PROTECTED]
Fri, 6 Jun 2008 18:29:13 + (11:29 -0700)
commit  aabe188565124ee2ed060a072764d6ed34dfa4ed
treeb2570905b65a6caa39f266f591b2907ff2c530f2
parent  ec0ced156f930aba24e7527905de294ad929ef65

-Geoff




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#484693: linux-2.6: Add RTC class support for powerpc64 machines

2008-06-05 Thread Geoff Levand
Package: linux-2.6
Version: 2.6.25
Severity: normal
Tags: patch


The attached kernel and config.powerpc64 patches add a
new style RTC class driver that works with most powerpc64
platforms.

This driver, enabled with the CONFIG_RTC_DRV_PPC option,
replaces the old gen_rtc support that was enabled with
the CONFIG_GEN_RTC option.  The old CONFIG_GEN_RTC option
is incompatible with the RTC class system and can no
longer be enabled in the Debian kernel config.

This patch has been submitted for mainline 2.6.27:

  http://patchwork.ozlabs.org/linuxppc/patch?id=18139


Without this RTC class driver, the following error can
be seen at start up:

  Setting the system clock.
  Cannot access the Hardware Clock via any known method.
  Use the --debug option to see the details of our search for an access method.
  * Unable to set System Clock to: Fri May 30 20:33:06 UTC 2008

The problem can also be reproduced with these steps:

  # hwclock --debug
  hwclock from util-linux-ng 2.13.1.1
  hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
  No usable clock interface found.
  Cannot access the Hardware Clock via any known method.
  # ls -l /dev/rtc*
  ls: cannot access /dev/rtc*: No such file or directory


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc64)

Kernel: Linux 2.6.25-3-powerpc64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



--- a/debian/config/powerpc/config.powerpc64
+++ b/debian/config/powerpc/config.powerpc64
@@ -155,6 +155,11 @@ CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
 ##
 # CONFIG_HOTPLUG_PCI is not set
 
+###
+### file: drivers/rtc/Kconfig
+###
+CONFIG_RTC_DRV_PPC=m
+
 ##
 ## file: drivers/scsi/Kconfig
 ##



From [EMAIL PROTECTED] Fri Apr 25 19:29:12 2008
From: David Woodhouse [EMAIL PROTECTED]
Subject: [PATCH, RESEND] RTC class driver for ppc_md RTC functions
Date: Fri, 25 Apr 2008 19:29:12 +1000
X-Patchwork-ID: 18139

This hooks up the platform-specific [gs]et_rtc_time functions so that
kernels using CONFIG_RTC_CLASS have RTC support on most PowerPC
platforms.

Signed-off-by: David Woodhouse [EMAIL PROTECTED]




---
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 1e6715e..3e788b7 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -461,4 +461,12 @@ config RTC_DRV_RS5C313
 	help
 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
 
+config RTC_DRV_PPC
+   tristate PowerPC machine dependent RTC support
+   depends on PPC_MERGE
+   help
+ The PowerPC kernel has machine-specific functions for accessing
+	 the RTC. This exposes that functionality through the generic RTC
+	 class.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 465db4d..e822e56 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -49,3 +49,4 @@ obj-$(CONFIG_RTC_DRV_TEST)	+= rtc-test.o
 obj-$(CONFIG_RTC_DRV_V3020)	+= rtc-v3020.o
 obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
+obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
--- /dev/null	2007-12-03 03:08:41.854157978 +
+++ b/drivers/rtc/rtc-ppc.c	2007-12-03 16:56:15.0 +
@@ -0,0 +1,69 @@
+/*
+ * RTC driver for ppc_md RTC functions
+ *
+ * © 2007 Red Hat, Inc.
+ *
+ * Author: David Woodhouse [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+
+#include linux/module.h
+#include linux/err.h
+#include linux/rtc.h
+#include linux/platform_device.h
+#include asm/machdep.h
+
+static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+	ppc_md.get_rtc_time(tm);
+	return 0;
+}
+
+static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+	return ppc_md.set_rtc_time(tm);
+}
+
+static const struct rtc_class_ops ppc_rtc_ops = {
+	.set_time = ppc_rtc_set_time,
+	.read_time = ppc_rtc_read_time,
+};
+
+static struct rtc_device *rtc;
+static struct platform_device *ppc_rtc_pdev;
+
+static int __init ppc_rtc_init(void)
+{
+	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
+		return -ENODEV;
+
+	ppc_rtc_pdev = platform_device_register_simple(ppc-rtc, 0, NULL, 0);
+	if (IS_ERR(ppc_rtc_pdev))
+		return PTR_ERR(ppc_rtc_pdev);
+
+	rtc = rtc_device_register(ppc_md, ppc_rtc_pdev-dev,
+  ppc_rtc_ops, THIS_MODULE);
+	if (IS_ERR(rtc)) {
+		platform_device_unregister(ppc_rtc_pdev);
+		return PTR_ERR(rtc);
+	}
+
+	return 0;
+}
+
+static void __exit ppc_rtc_exit(void)
+{
+	rtc_device_unregister(rtc);
+	platform_device_unregister(ppc_rtc_pdev);
+}
+
+module_init(ppc_rtc_init);
+module_exit(ppc_rtc_exit);
+
+MODULE_LICENSE(GPL);
+MODULE_AUTHOR(David Woodhouse [EMAIL PROTECTED]);
+MODULE_DESCRIPTION(Generic RTC class driver for PowerPC);







Bug#462529: linux-2.6: Add config file support for efika and PS3 (preliminary)

2008-06-02 Thread Geoff Levand
Geoff Levand wrote:
 Bastian Blank wrote:
  -# CONFIG_GEN_RTC is not set
  +CONFIG_GEN_RTC=y
  Why?
 I am not so familiar with this option.  I saw
 an RTC error message when this was not enabled.
 
 Please show the error.
 
 This is the error:
 
   Setting the system clock.
   Cannot access the Hardware Clock via any known method.
   Use the --debug option to see the details of our search for an access 
 method.
   * Unable to set System Clock to: Fri May 30 20:33:06 UTC 2008
 
   ice:~# hwclock --debug
   hwclock from util-linux-ng 2.13.1.1
   hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
   No usable clock interface found.
   Cannot access the Hardware Clock via any known method.
   ice:~# ls -l /dev/rtc*
   ls: cannot access /dev/rtc*: No such file or directory
 
 The PS3 does not have an RTC driver.  The PS3 platform code just hooks into
 the standard powerpc ppc_md.set_rtc_time and ppc_md.get_rtc_time pointers
 (arch/powerpc/platforms/ps3/time.c).
 
From what I understand the work to hookup the powerpc ppc_md. rtc routines
 to the RTC_INTF_DEV routines has not been done.  See here:
 
   http://marc.info/?t=12035265472r=1w=2
 
 I'll look into this.  I either need to make a gen_rtc driver for the
 new rtc subsytem, or make a ps3 specific rtc driver.

A patch to fix this problem is attached.  It has been submitted
for 2.6.27:

  http://patchwork.ozlabs.org/linuxppc/patch?id=18139

With it there is a new driver rtc-ppc, enabled with CONFIG_RTC_DRV_PPC.

Should I submit another bug report for this?

-Geoff



From [EMAIL PROTECTED] Fri Apr 25 19:29:12 2008
From: David Woodhouse [EMAIL PROTECTED]
Subject: [PATCH, RESEND] RTC class driver for ppc_md RTC functions
Date: Fri, 25 Apr 2008 19:29:12 +1000
X-Patchwork-ID: 18139

This hooks up the platform-specific [gs]et_rtc_time functions so that
kernels using CONFIG_RTC_CLASS have RTC support on most PowerPC
platforms.

Signed-off-by: David Woodhouse [EMAIL PROTECTED]




---
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 1e6715e..3e788b7 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -461,4 +461,12 @@ config RTC_DRV_RS5C313
 	help
 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
 
+config RTC_DRV_PPC
+   tristate PowerPC machine dependent RTC support
+   depends on PPC_MERGE
+   help
+ The PowerPC kernel has machine-specific functions for accessing
+	 the RTC. This exposes that functionality through the generic RTC
+	 class.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 465db4d..e822e56 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -49,3 +49,4 @@ obj-$(CONFIG_RTC_DRV_TEST)	+= rtc-test.o
 obj-$(CONFIG_RTC_DRV_V3020)	+= rtc-v3020.o
 obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
+obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
--- /dev/null	2007-12-03 03:08:41.854157978 +
+++ b/drivers/rtc/rtc-ppc.c	2007-12-03 16:56:15.0 +
@@ -0,0 +1,69 @@
+/*
+ * RTC driver for ppc_md RTC functions
+ *
+ * © 2007 Red Hat, Inc.
+ *
+ * Author: David Woodhouse [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+
+#include linux/module.h
+#include linux/err.h
+#include linux/rtc.h
+#include linux/platform_device.h
+#include asm/machdep.h
+
+static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+	ppc_md.get_rtc_time(tm);
+	return 0;
+}
+
+static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+	return ppc_md.set_rtc_time(tm);
+}
+
+static const struct rtc_class_ops ppc_rtc_ops = {
+	.set_time = ppc_rtc_set_time,
+	.read_time = ppc_rtc_read_time,
+};
+
+static struct rtc_device *rtc;
+static struct platform_device *ppc_rtc_pdev;
+
+static int __init ppc_rtc_init(void)
+{
+	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
+		return -ENODEV;
+
+	ppc_rtc_pdev = platform_device_register_simple(ppc-rtc, 0, NULL, 0);
+	if (IS_ERR(ppc_rtc_pdev))
+		return PTR_ERR(ppc_rtc_pdev);
+
+	rtc = rtc_device_register(ppc_md, ppc_rtc_pdev-dev,
+  ppc_rtc_ops, THIS_MODULE);
+	if (IS_ERR(rtc)) {
+		platform_device_unregister(ppc_rtc_pdev);
+		return PTR_ERR(rtc);
+	}
+
+	return 0;
+}
+
+static void __exit ppc_rtc_exit(void)
+{
+	rtc_device_unregister(rtc);
+	platform_device_unregister(ppc_rtc_pdev);
+}
+
+module_init(ppc_rtc_init);
+module_exit(ppc_rtc_exit);
+
+MODULE_LICENSE(GPL);
+MODULE_AUTHOR(David Woodhouse [EMAIL PROTECTED]);
+MODULE_DESCRIPTION(Generic RTC class driver for PowerPC);



--- a/debian/config/powerpc/config.powerpc64
+++ b/debian/config/powerpc/config.powerpc64
@@ -155,6 +155,11 @@ CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
 ##
 # CONFIG_HOTPLUG_PCI is not set
 
+###
+### file: drivers/rtc/Kconfig
+###
+CONFIG_RTC_DRV_PPC=m
+
 ##
 ## file: drivers/scsi/Kconfig
 ##



Bug#483489: linux-2.6: Optional powerpc64 patches for PS3

2008-05-30 Thread Geoff Levand
Bastian Blank wrote:
 tags 483489 wontfix
 thanks
 
 On Wed, May 28, 2008 at 05:26:37PM -0700, Geoff Levand wrote:
 Attached are two patches against the debian linux-2.6-2.6.25
 sources that would be nice to apply for the PS3.
 
 Please send them to [EMAIL PROTECTED] Also you have to use that way to
 fix the following error, after it have been applied to Linus' tree:
 | ERROR: fb_mode_option [drivers/ps3/ps3av_mod.ko] undefined!
 
 Tagging as wontfix for now.

Just FYI, I submitted the memory leak and undefined symbol bugs for
the stable kernel.

I don't think the vmemmap-variable-page-size patch is suitable as
it is quite intrusive and is not really a 'critical' fix.

-Geoff




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#462529: linux-2.6: Add config file support for efika and PS3 (preliminary)

2008-05-30 Thread Geoff Levand
Bastian Blank wrote:
 On Wed, May 28, 2008 at 04:22:45PM -0700, Geoff Levand wrote:
 Bastian Blank wrote:
 There is a 2.6.25 undefined symbol bug in PS3AV that
 won't allow it to be built as a module.
 
 It is even unfixed in -rc4 and it is needed by FB_PS3.


I just found that bug a few days ago (testing debian).
It should go into -rc5.

It went unfound for many months because no one builds the
PS3 frame buffer as a module.  It comes up too late.  I
think if you have it as a module, most users will complain
about it.


  -# CONFIG_GEN_RTC is not set
  +CONFIG_GEN_RTC=y
  Why?
 I am not so familiar with this option.  I saw
 an RTC error message when this was not enabled.
 
 Please show the error.

This is the error:

  Setting the system clock.
  Cannot access the Hardware Clock via any known method.
  Use the --debug option to see the details of our search for an access method.
  * Unable to set System Clock to: Fri May 30 20:33:06 UTC 2008

  ice:~# hwclock --debug
  hwclock from util-linux-ng 2.13.1.1
  hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
  No usable clock interface found.
  Cannot access the Hardware Clock via any known method.
  ice:~# ls -l /dev/rtc*
  ls: cannot access /dev/rtc*: No such file or directory

The PS3 does not have an RTC driver.  The PS3 platform code just hooks into
the standard powerpc ppc_md.set_rtc_time and ppc_md.get_rtc_time pointers
(arch/powerpc/platforms/ps3/time.c).

From what I understand the work to hookup the powerpc ppc_md. rtc routines
to the RTC_INTF_DEV routines has not been done.  See here:

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

I'll look into this.  I either need to make a gen_rtc driver for the
new rtc subsytem, or make a ps3 specific rtc driver.


 I can test your proposed config if you make it available to me.
 
 I commited large parts of it in the trunk.

I tested it, and in general it works OK.  I put the dmesg here:

  http://cell.gotdns.org/pub/debian-cell-kernel-2/

You don't have CONFIG_LOGO_LINUX_CLUT224 set, so the SPE logos are not
rendered correctly.  It looks like the lines of pixel are not aligned.
Geert, can you say why?  Is it a bug in the logo code?

I'll do some more testing next week.


-Geoff




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#462529: linux-2.6: Add config file support for efika and PS3 (preliminary)

2008-05-28 Thread Geoff Levand
Robert Millan wrote:
 I just updated your patch to the latest version of the package (moving the
 definitions to the pre-existing PS3 section), but I cannot check if it
 still works.  Is it safe to assume it does?
 
 In any case, would be nice if someone could test.

I made the following updated patch and tested it.  It should be
complete.

There are some optional 2.6.25 kernel patches that would be nice
to have applied for the PS3.  I will make a separate bug report
for those.

--
Update the Debian powerpc64 2.6.25 kernel config for Cell platforms.

Adds support for the PS3 game console and updates the
Cell blade config to support QS20 and QS21 machines.

--- linux-2.6-2.6.25.orig/debian/config/powerpc/config.powerpc64
+++ linux-2.6-2.6.25/debian/config/powerpc/config.powerpc64
@@ -14,6 +14,7 @@
 CONFIG_SCHED_SMT=y
 CONFIG_CMDLINE=console=hvsi0 console=hvc0 console=ttyS0,9600 console=tty0
 CONFIG_KERNEL_START=0xc000
+# CONFIG_MEMORY_HOTREMOVE is not set
 
 ##
 ## file: arch/powerpc/Kconfig.debug
@@ -30,12 +31,24 @@
 CONFIG_CPU_FREQ_PMAC64=y
 #. It's a bool
 CONFIG_PPC_PASEMI_CPUFREQ=y
+CONFIG_UDBG_RTAS_CONSOLE=y
+CONFIG_PPC_PMI=m
+CONFIG_AXON_RAM=m
 
 ##
 ## file: arch/powerpc/platforms/cell/Kconfig
 ##
-# CONFIG_PPC_IBM_CELL_BLADE is not set
+CONFIG_PPC_CELL=y
+CONFIG_PPC_CELL_NATIVE=y
+CONFIG_PPC_IBM_CELL_BLADE=y
 CONFIG_SPU_FS=m
+CONFIG_SPU_FS_64K_LS=y
+CONFIG_SPU_BASE=y
+CONFIG_CBE_RAS=y
+CONFIG_CBE_THERM=m
+CONFIG_CBE_CPUFREQ=m
+CONFIG_CBE_CPUFREQ_PMI=m
+CONFIG_OPROFILE_CELL=y
 
 ##
 ## file: arch/powerpc/platforms/celleb/Kconfig
@@ -72,7 +85,19 @@
 ##
 ## file: arch/powerpc/platforms/ps3/Kconfig
 ##
-# CONFIG_PPC_PS3 is not set
+CONFIG_PPC_PS3=y
+CONFIG_PS3_ADVANCED=y
+CONFIG_PS3_HTAB_SIZE=20
+# CONFIG_PS3_DYNAMIC_DMA is not set
+CONFIG_PS3_VUART=y
+CONFIG_PS3_PS3AV=y
+CONFIG_PS3_SYS_MANAGER=y
+CONFIG_PS3_STORAGE=m
+CONFIG_PS3_DISK=m
+CONFIG_PS3_ROM=m
+CONFIG_PS3_FLASH=m
+CONFIG_OPROFILE_PS3=m
+CONFIG_PS3_LPM=m
 
 ##
 ## file: arch/powerpc/platforms/pseries/Kconfig
@@ -93,7 +118,7 @@
 CONFIG_HVC_CONSOLE=y
 CONFIG_HVCS=m
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
+CONFIG_GEN_RTC=y
 CONFIG_HANGCHECK_TIMER=m
 
 ##
@@ -127,6 +152,24 @@
 CONFIG_SPIDER_NET=m
 # CONFIG_MV643XX_ETH is not set
 CONFIG_PASEMI_MAC=m
+CONFIG_GELIC_NET=m
+CONFIG_GELIC_WIRELESS=y
+CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE=y
+
+##
+## file: drivers/net/ibm_newmac/Kconfig
+##
+CONFIG_IBM_NEW_EMAC=m
+CONFIG_IBM_NEW_EMAC_RXB=128
+CONFIG_IBM_NEW_EMAC_TXB=64
+CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
+CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
+CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
+# CONFIG_IBM_NEW_EMAC_DEBUG is not set
+CONFIG_IBM_NEW_EMAC_ZMII=y
+CONFIG_IBM_NEW_EMAC_RGMII=y
+CONFIG_IBM_NEW_EMAC_TAH=y
+CONFIG_IBM_NEW_EMAC_EMAC4=y
 
 ##
 ## file: drivers/pci/hotplug/Kconfig
@@ -159,6 +202,10 @@
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_NVIDIA is not set
 # CONFIG_FB_ATY128 is not set
+CONFIG_FB_PS3=y
+CONFIG_FB_PS3_DEFAULT_SIZE_M=9
+CONFIG_FB_LOGO_EXTRA=y
+CONFIG_LOGO_LINUX_CLUT224=y
 
 ##
 ## file: drivers/watchdog/Kconfig
@@ -176,3 +223,8 @@
 # CONFIG_MEMORY_HOTPLUG is not set
 CONFIG_MIGRATION=y
 
+##
+## file: sound/ppc/Kconfig
+##
+CONFIG_SND_PS3=m
+CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
--- linux-2.6-2.6.25.orig/debian/config/defines
+++ linux-2.6-2.6.25/debian/config/defines
@@ -1,5 +1,5 @@
 [abi]
-abiname: 2
+abiname: 3
 
 [base]
 arches:




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#462529: linux-2.6: Add config file support for efika and PS3 (preliminary)

2008-05-28 Thread Geoff Levand
Bastian Blank wrote:
 On Wed, May 28, 2008 at 12:28:30PM -0700, Geoff Levand wrote:
 -# CONFIG_PPC_IBM_CELL_BLADE is not set
 +CONFIG_PPC_IBM_CELL_BLADE=y
  CONFIG_SPU_FS=m
 +CONFIG_SPU_FS_64K_LS=y
 +CONFIG_CBE_RAS=y
 +CONFIG_CBE_THERM=m
 +CONFIG_CBE_CPUFREQ=m
 
 Okay.
 
 +CONFIG_CBE_CPUFREQ_PMI=m
 
 Default n and experimental.


OK, we don't need it.


 -# CONFIG_PPC_PS3 is not set
 +CONFIG_PPC_PS3=y
 +CONFIG_PS3_ADVANCED=y
 +CONFIG_PS3_HTAB_SIZE=20
 +# CONFIG_PS3_DYNAMIC_DMA is not set
 +CONFIG_PS3_PS3AV=m
 +CONFIG_PS3_STORAGE=m
 +CONFIG_PS3_DISK=m
 +CONFIG_PS3_ROM=m
 +CONFIG_PS3_FLASH=m
 +CONFIG_PS3_LPM=m

This is what I posted:

+CONFIG_PPC_PS3=y
+CONFIG_PS3_ADVANCED=y
+CONFIG_PS3_HTAB_SIZE=20
+# CONFIG_PS3_DYNAMIC_DMA is not set
+CONFIG_PS3_VUART=y
+CONFIG_PS3_PS3AV=y
+CONFIG_PS3_SYS_MANAGER=y
+CONFIG_PS3_STORAGE=m
+CONFIG_PS3_DISK=m
+CONFIG_PS3_ROM=m
+CONFIG_PS3_FLASH=m
+CONFIG_OPROFILE_PS3=m
+CONFIG_PS3_LPM=m


CONFIG_PS3_SYS_MANAGER is needed for proper operation.
It controls button events and system shutdown.
It could be a module, but is is small and with it
built-in users can reboot without a forced power off
if the root FS is not found.

There is a 2.6.25 undefined symbol bug in PS3AV that
won't allow it to be built as a module.

If you don't want to support profiling, you can
disable these:

 CONFIG_OPROFILE_PS3=n
 CONFIG_PS3_LPM=n


 -# CONFIG_GEN_RTC is not set
 +CONFIG_GEN_RTC=y
 
 Why?


I am not so familiar with this option.  I saw
an RTC error message when this was not enabled.
Maybe it is not needed?  


 +CONFIG_GELIC_NET=m
 +CONFIG_GELIC_WIRELESS=y
 
 +CONFIG_IBM_NEW_EMAC=m
 +CONFIG_IBM_NEW_EMAC_RXB=128
 +CONFIG_IBM_NEW_EMAC_TXB=64
 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set
 
 Okay.
 
 +CONFIG_FB_PS3=y
 
 Yeah, everyone wants its favorite fb built-in.


We can make this a module, the trouble is that PS3
can only output to the virtual frame buffer, and it
comes up very late, so the there is a long delay
between starting the boot and some text being displayed.
Also, if there is a hang before that, the user is left
with a blank screen.

CONFIG_FB_PS3 depends on CONFIG_PS3_VUART and CONFIG_PS3_PS3AV.

 
 +CONFIG_FB_PS3_DEFAULT_SIZE_M=9


We need this.  It sets the default size of the virtual
frame buffer.  This setting will support up to 1080p or
WUXGA resolution.


 +CONFIG_FB_LOGO_EXTRA=y
 +CONFIG_LOGO_LINUX_CLUT224=y
 
 Why?


These put the SPE penguins up.  Users seem to like (expect?)
them:

  
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/debian-penguin-shot.png

They aren't needed if CONFIG_FB_PS3=m.

Without CONFIG_LOGO_LINUX_CLUT224=y the SPE penguin images
are not rendered correctly.  I don't know why.


 +CONFIG_SND_PS3=m
 +CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
 
 Okay.


I can test your proposed config if you make it available to me.

-Geoff





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#483489: linux-2.6: Optional powerpc64 patches for PS3

2008-05-28 Thread Geoff Levand

Package: linux-2.6
Version: 2.6.25
Severity: normal
Tags: patch

Attached are two patches against the debian linux-2.6-2.6.25
sources that would be nice to apply for the PS3.

 - debian-powerpc64-vmemmap-variable-page-size.diff

   This patch changes vmemmap to use a different region (region 0xf) of the
   address space whose page size can be dynamically configured at boot.

   The problem with the current approach of always using 16M pages is that
   it's not well suited to machines that have small amounts of memory such
   as small partitions on pseries, or PS3's.

   In fact, on the PS3, failure to allocate the 16M page backing vmmemmap
   tends to prevent hotplugging the HV's additional memory, thus limiting
   the available memory even more, from my experience down to something
   like 80M total, which makes it really not very useable.

 - debian-powerpc64-ps3-gelic-wireless-fix-memory-leak.patch

   This fixes the bug that the I/O buffer is not freed at the driver removal.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc64)

Kernel: Linux 2.6.25-3-powerpc64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


Add the patch powerpc-vmemmap-variable-page-size.diff to the debian
linux-2.6-2.6.25 source tree.  This is a backport of the patch
merged into 2.6.26.

---
 debian/patches/bugfix/powerpc/powerpc-vmemmap-variable-page-size.diff |  214 ++
 debian/patches/series/1   |1 
 2 files changed, 215 insertions(+)

--- /dev/null
+++ b/debian/patches/bugfix/powerpc/powerpc-vmemmap-variable-page-size.diff
@@ -0,0 +1,214 @@
+ps3-linux-stable-2.6.25
+  o Backported to 2.6.25.4
+  o Removed DEBUG's
+
+Subject: [RFC] [PATCH] vmemmap fixes to use smaller pages
+
+From: Benjamin Herrenschmidt [EMAIL PROTECTED]
+
+This patch changes vmemmap to use a different region (region 0xf) of the
+address space whose page size can be dynamically configured at boot.
+
+The problem with the current approach of always using 16M pages is that
+it's not well suited to machines that have small amounts of memory such
+as small partitions on pseries, or PS3's.
+
+In fact, on the PS3, failure to allocate the 16M page backing vmmemmap
+tends to prevent hotplugging the HV's additional memory, thus limiting
+the available memory even more, from my experience down to something
+like 80M total, which makes it really not very useable.
+
+The logic used by my match to choose the vmemmap page size is:
+
+ - If 16M pages are available and there's 1G or more RAM at boot, use that size.
+ - Else if 64K pages are available, use that
+ - Else use 4K pages
+
+---
+ arch/powerpc/mm/hash_utils_64.c |   28 ++--
+ arch/powerpc/mm/init_64.c   |8 
+ arch/powerpc/mm/slb.c   |   14 +-
+ arch/powerpc/mm/slb_low.S   |   16 +---
+ include/asm-powerpc/mmu-hash64.h|1 +
+ include/asm-powerpc/pgtable-ppc64.h |   10 +-
+ 6 files changed, 62 insertions(+), 15 deletions(-)
+
+--- a/arch/powerpc/mm/hash_utils_64.c
 b/arch/powerpc/mm/hash_utils_64.c
+@@ -93,6 +93,9 @@ unsigned long htab_hash_mask;
+ int mmu_linear_psize = MMU_PAGE_4K;
+ int mmu_virtual_psize = MMU_PAGE_4K;
+ int mmu_vmalloc_psize = MMU_PAGE_4K;
++#ifdef CONFIG_SPARSEMEM_VMEMMAP
++int mmu_vmemmap_psize = MMU_PAGE_4K;
++#endif
+ int mmu_io_psize = MMU_PAGE_4K;
+ int mmu_kernel_ssize = MMU_SEGSIZE_256M;
+ int mmu_highuser_ssize = MMU_SEGSIZE_256M;
+@@ -363,11 +366,32 @@ static void __init htab_init_page_sizes(
+ 	}
+ #endif /* CONFIG_PPC_64K_PAGES */
+ 
++#ifdef CONFIG_SPARSEMEM_VMEMMAP
++	/* We try to use 16M pages for vmemmap if that is supported
++	 * and we have at least 1G of RAM at boot
++	 */
++	if (mmu_psize_defs[MMU_PAGE_16M].shift 
++	lmb_phys_mem_size() = 0x4000)
++		mmu_vmemmap_psize = MMU_PAGE_16M;
++	else if (mmu_psize_defs[MMU_PAGE_64K].shift)
++		mmu_vmemmap_psize = MMU_PAGE_64K;
++	else
++		mmu_vmemmap_psize = MMU_PAGE_4K;
++#endif /* CONFIG_SPARSEMEM_VMEMMAP */
++
+ 	printk(KERN_DEBUG Page orders: linear mapping = %d, 
+-	   virtual = %d, io = %d\n,
++	   virtual = %d, io = %d
++#ifdef CONFIG_SPARSEMEM_VMEMMAP
++	   , vmemmap = %d
++#endif
++	   \n,
+ 	   mmu_psize_defs[mmu_linear_psize].shift,
+ 	   mmu_psize_defs[mmu_virtual_psize].shift,
+-	   mmu_psize_defs[mmu_io_psize].shift);
++	   mmu_psize_defs[mmu_io_psize].shift
++#ifdef CONFIG_SPARSEMEM_VMEMMAP
++	   ,mmu_psize_defs[mmu_vmemmap_psize].shift
++#endif
++	   );
+ 
+ #ifdef CONFIG_HUGETLB_PAGE
+ 	/* Init large page size. Currently, we pick 16M or 1M depending
+--- a/arch/powerpc/mm/init_64.c
 b/arch/powerpc/mm/init_64.c
+@@ -208,12 +208,12 @@ int __meminit vmemmap_populated(unsigned
+ }
+ 
+ int __meminit vmemmap_populate(struct page *start_page,
+-	unsigned 

Bug#462529: linux-2.6: Add config file support for efika and PS3 (preliminary)

2008-05-15 Thread Geoff Levand
Hi,

Robert Millan wrote:
 retitle 462529 please enable PS3 support in -powerpc64 build
 thanks
 
 On Thu, May 15, 2008 at 04:46:10PM +0200, Sven Luther wrote:
 On Thu, May 15, 2008 at 04:25:40PM +0200, Robert Millan wrote:
  
  Please provide a patch if you can.
 
 I already provided a patch, which is smoledring in the BTS, since months
 now.
 
 Thanks Sven.
 
 I just updated your patch to the latest version of the package (moving the
 definitions to the pre-existing PS3 section), but I cannot check if it
 still works.  Is it safe to assume it does?
 
 In any case, would be nice if someone could test.

I'm sorry I'm not so familiar with how to build the debian kernel,
but if you give me some help where and how to get the sources,
or a link to some docs that explain it I will do the testing.

I have an up to date install of Lenny on PS3 here to use.

-Geoff




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#468113: PlayStation 3 script update.

2008-04-01 Thread Geoff Levand
Hi,

Bastian Blank wrote:
 On Wed, Feb 27, 2008 at 02:20:18PM +1100, Luke Yelavich wrote:
 Attached is a patch to update the ps3 script. This patch allows the
 supporting of old and new ps3 hardware configurations. The patch
 applies against git head.


There is no difference in PS3 hardware configurations.
We re-wrote the drivers, and the device names changed.


 Why are the modules not loaded by udev?


We fixed automatic module loading in 2.6.23-rc1.  If your
kernel is newer than that it should work without this script.

Note that anything related to the 'PS3PF' legacy platform
support was never accepted by the linux community and should
be ignored.  Everything was re-written, and the supported
platform name (since 2.6.21) is 'PS3'.

-Geoff




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]