* [PATCH] powerpc/pci: Don't keep ISA memory hole resources in the tree
From: Benjamin Herrenschmidt @ 2008-07-31 5:24 UTC (permalink / raw)
To: linuxppc-dev
When we have an ISA memory hole (ie, a PCI window that allows to
generate PCI memory cycles at low PCI address) mixes with other
resources using a different CPU <=> PCI mapping, we must not keep
the ISA hole in the bridge resource list.
If we do, things might start trying to allocate device resources
in there and will get the PCI addresses wrong.
This patch fixes it, which fixes various cases of PCMCIA breakage
on PowerBooks using the MPC106 "grackle" bridge that supports
ISA holes.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/pci-common.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
--- linux-work.orig/arch/powerpc/kernel/pci-common.c 2008-07-31 14:45:20.000000000 +1000
+++ linux-work/arch/powerpc/kernel/pci-common.c 2008-07-31 14:57:31.000000000 +1000
@@ -650,11 +650,18 @@ void __devinit pci_process_bridge_OF_ran
}
}
- /* Out of paranoia, let's put the ISA hole last if any */
- if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) {
- struct resource tmp = hose->mem_resources[isa_hole];
- hose->mem_resources[isa_hole] = hose->mem_resources[memno-1];
- hose->mem_resources[memno-1] = tmp;
+ /* If there's an ISA hole and the pci_mem_offset is -not- matching
+ * the ISA hole offset, then we need to remove the ISA hole from
+ * the resource list for that brige
+ */
+ if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) {
+ unsigned int next = isa_hole + 1;
+ printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb);
+ if (next < memno)
+ memmove(&hose->mem_resources[isa_hole],
+ &hose->mem_resources[next],
+ sizeof(struct resource) * (memno - next));
+ hose->mem_resources[--memno].flags = 0;
}
}
^ permalink raw reply
* Re: [PATCH 5/8] Silence warning in arch/powerpc/mm/ppc_mmu_32.c
From: Stephen Rothwell @ 2008-07-31 5:21 UTC (permalink / raw)
To: Tony Breeds; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <6827a84e83495f49c991a33b2cef07614273fa0a.1217476198.git.tony@bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
Hi Tony,
On Thu, 31 Jul 2008 13:51:43 +1000 (EST) Tony Breeds <tony@bakeyournoodle.com> wrote:
>
> total_memory is a 'phys_addr_t', cast to unsigned long to silence
> warning.
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
> ---
> arch/powerpc/mm/ppc_mmu_32.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
> index c53145f..9c19655 100644
> --- a/arch/powerpc/mm/ppc_mmu_32.c
> +++ b/arch/powerpc/mm/ppc_mmu_32.c
> @@ -237,7 +237,7 @@ void __init MMU_init_hw(void)
> Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
>
> printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
> - total_memory >> 20, Hash_size >> 10, Hash);
> + (unsigned long)total_memory >> 20, Hash_size >> 10, Hash);
Will this ever be built with CONFIG_PHYS_64BIT?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH 6/8] Explictly undefine DEBUG in arch/powerpc/platforms/pseries/eeh_driver.c
From: Michael Ellerman @ 2008-07-31 4:53 UTC (permalink / raw)
To: Tony Breeds; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <c5fdfe03bcac5d6964b6712a2a15ab0edc12ce83.1217476198.git.tony@bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
On Thu, 2008-07-31 at 13:51 +1000, Tony Breeds wrote:
> print_device_node_tree() is guarded by DEBUG but even when declared, it
> isn't called. Explicitly undefine DEBUG as you'll need to modify this
> file anyway to use print_device_node_tree().
Please don't, it breaks CONFIG_PPC_PSERIES_DEBUG.
cheers
/me refrains from ranting about stupid -Werror
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: ide pmac breakage
From: Benjamin Herrenschmidt @ 2008-07-31 4:25 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: FUJITA Tomonori, linux-ide, petkovbb, linuxppc-dev
In-Reply-To: <200807302111.54514.bzolnier@gmail.com>
> Is it actually caused by additional reference counting on drive->gendev?
> IOW if you reverse the patch below instead of applying the previous fix
> do things work OK again?
>
> > Note that there shouldn't be anything fundamentally different from
> > ide-pmac here vs. something like pcmcia IDE cards... do you have one of
> > these to test with ?
>
> Nope and I really don't intend to have one. I count on other people
> to take some care of support for host drivers that they maintain/use. ;)
Reverting the patch below does the job. Thanks.
Ben.
> Thanks,
> Bart
>
> diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
> index 4e73aee..8f253e5 100644
> --- a/drivers/ide/ide-cd.c
> +++ b/drivers/ide/ide-cd.c
> @@ -57,23 +57,29 @@ static DEFINE_MUTEX(idecd_ref_mutex);
> #define ide_cd_g(disk) \
> container_of((disk)->private_data, struct cdrom_info, driver)
>
> +static void ide_cd_release(struct kref *);
> +
> static struct cdrom_info *ide_cd_get(struct gendisk *disk)
> {
> struct cdrom_info *cd = NULL;
>
> mutex_lock(&idecd_ref_mutex);
> cd = ide_cd_g(disk);
> - if (cd)
> + if (cd) {
> kref_get(&cd->kref);
> + if (ide_device_get(cd->drive)) {
> + kref_put(&cd->kref, ide_cd_release);
> + cd = NULL;
> + }
> + }
> mutex_unlock(&idecd_ref_mutex);
> return cd;
> }
>
> -static void ide_cd_release(struct kref *);
> -
> static void ide_cd_put(struct cdrom_info *cd)
> {
> mutex_lock(&idecd_ref_mutex);
> + ide_device_put(cd->drive);
> kref_put(&cd->kref, ide_cd_release);
> mutex_unlock(&idecd_ref_mutex);
> }
^ permalink raw reply
* Re: [PATCH 4/8] Silence warnings in arch/powerpc/platforms/52xx/mpc52xx_pci.c
From: Tony Breeds @ 2008-07-31 4:21 UTC (permalink / raw)
To: Jon Smirl; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <9e4733910807302108q689c9c82yb010c75cba770218@mail.gmail.com>
On Thu, Jul 31, 2008 at 12:08:04AM -0400, Jon Smirl wrote:
> There are some warnings in mpc5200 spi that I haven't looked at....
>
> drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_activate_cs':
> drivers/spi/mpc52xx_psc_spi.c:111: warning: passing argument 1 of
> 'in_be16' from incompatible pointer type
> drivers/spi/mpc52xx_psc_spi.c:117: warning: passing argument 1 of
> 'out_be16' from incompatible pointer type
> drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_port_config':
> drivers/spi/mpc52xx_psc_spi.c:350: warning: passing argument 1 of
> 'out_be16' from incompatible pointer type
Right drivers/* is harder, and wont be affected by the addition of
-Werror in arch/powerpc
We'll get there eventiually.
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!
^ permalink raw reply
* Re: [PATCH 4/8] Silence warnings in arch/powerpc/platforms/52xx/mpc52xx_pci.c
From: Jon Smirl @ 2008-07-31 4:08 UTC (permalink / raw)
To: Tony Breeds; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <96343fe00bd43a12b1739ff1513ba07224e3f302.1217476198.git.tony@bakeyournoodle.com>
There are some warnings in mpc5200 spi that I haven't looked at....
drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_activate_cs':
drivers/spi/mpc52xx_psc_spi.c:111: warning: passing argument 1 of
'in_be16' from incompatible pointer type
drivers/spi/mpc52xx_psc_spi.c:117: warning: passing argument 1 of
'out_be16' from incompatible pointer type
drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_port_config':
drivers/spi/mpc52xx_psc_spi.c:350: warning: passing argument 1 of
'out_be16' from incompatible pointer type
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply
* [PATCH 6/8] Explictly undefine DEBUG in arch/powerpc/platforms/pseries/eeh_driver.c
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
print_device_node_tree() is guarded by DEBUG but even when declared, it
isn't called. Explicitly undefine DEBUG as you'll need to modify this
file anyway to use print_device_node_tree().
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/platforms/pseries/eeh_driver.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 8c1ca47..2f18380 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -22,6 +22,9 @@
*
* Send comments and feedback to Linas Vepstas <linas@austin.ibm.com>
*/
+
+#undef DEBUG
+
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
--
1.5.6.3
^ permalink raw reply related
* [PATCH 8/8] Enable -Werror in arch/powerpc/{kernel,lib,mm,platforms}
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/kernel/Makefile | 1 +
arch/powerpc/lib/Makefile | 1 +
arch/powerpc/mm/Makefile | 1 +
arch/powerpc/platforms/40x/Makefile | 2 ++
arch/powerpc/platforms/44x/Makefile | 2 ++
arch/powerpc/platforms/512x/Makefile | 2 ++
arch/powerpc/platforms/52xx/Makefile | 4 +++-
arch/powerpc/platforms/82xx/Makefile | 2 ++
arch/powerpc/platforms/83xx/Makefile | 2 ++
arch/powerpc/platforms/85xx/Makefile | 2 ++
arch/powerpc/platforms/86xx/Makefile | 1 +
arch/powerpc/platforms/8xx/Makefile | 2 ++
arch/powerpc/platforms/Makefile | 1 +
arch/powerpc/platforms/cell/Makefile | 2 ++
arch/powerpc/platforms/chrp/Makefile | 2 ++
arch/powerpc/platforms/embedded6xx/Makefile | 2 ++
arch/powerpc/platforms/iseries/Makefile | 2 +-
arch/powerpc/platforms/maple/Makefile | 2 ++
arch/powerpc/platforms/pasemi/Makefile | 2 ++
arch/powerpc/platforms/powermac/Makefile | 2 ++
arch/powerpc/platforms/ps3/Makefile | 2 ++
arch/powerpc/platforms/pseries/Makefile | 2 ++
22 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 1a40947..11ba982 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -1,6 +1,7 @@
#
# Makefile for the linux kernel.
#
+EXTRA_CFLAGS := -Werror
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 2a88e8b..78a3022 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -1,6 +1,7 @@
#
# Makefile for ppc-specific library files..
#
+EXTRA_CFLAGS := -Werror
ifeq ($(CONFIG_PPC64),y)
EXTRA_CFLAGS += -mno-minimal-toc
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 1c00e01..c2e44c4 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -2,6 +2,7 @@
# Makefile for the linux ppc-specific parts of the memory manager.
#
+EXTRA_CFLAGS := -Werror
ifeq ($(CONFIG_PPC64),y)
EXTRA_CFLAGS += -mno-minimal-toc
endif
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile
index 5533a5c..3788b2e 100644
--- a/arch/powerpc/platforms/40x/Makefile
+++ b/arch/powerpc/platforms/40x/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_KILAUEA) += kilauea.o
obj-$(CONFIG_MAKALU) += makalu.o
obj-$(CONFIG_WALNUT) += walnut.o
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile
index 8d0b1a1..58cc668 100644
--- a/arch/powerpc/platforms/44x/Makefile
+++ b/arch/powerpc/platforms/44x/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_44x) := misc_44x.o idle.o
obj-$(CONFIG_EBONY) += ebony.o
obj-$(CONFIG_TAISHAN) += taishan.o
diff --git a/arch/powerpc/platforms/512x/Makefile b/arch/powerpc/platforms/512x/Makefile
index 90be2f5..8a6141d 100644
--- a/arch/powerpc/platforms/512x/Makefile
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for the Freescale PowerPC 512x linux kernel.
#
+EXTRA_CFLAGS := -Werror
+
obj-y += clock.o mpc512x_shared.o
obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o mpc5121_ads_cpld.o
obj-$(CONFIG_MPC5121_GENERIC) += mpc5121_generic.o
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile
index daf0e15..2616db3 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for 52xx based boards
#
+EXTRA_CFLAGS := -Werror
+
ifeq ($(CONFIG_PPC_MERGE),y)
obj-y += mpc52xx_pic.o mpc52xx_common.o
obj-$(CONFIG_PCI) += mpc52xx_pci.o
@@ -15,4 +17,4 @@ ifeq ($(CONFIG_PPC_LITE5200),y)
obj-$(CONFIG_PM) += lite5200_sleep.o lite5200_pm.o
endif
-obj-$(CONFIG_PPC_MPC5200_GPIO) += mpc52xx_gpio.o
\ No newline at end of file
+obj-$(CONFIG_PPC_MPC5200_GPIO) += mpc52xx_gpio.o
diff --git a/arch/powerpc/platforms/82xx/Makefile b/arch/powerpc/platforms/82xx/Makefile
index 6cd5cd5..f88fb41 100644
--- a/arch/powerpc/platforms/82xx/Makefile
+++ b/arch/powerpc/platforms/82xx/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for the PowerPC 82xx linux kernel.
#
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_MPC8272_ADS) += mpc8272_ads.o
obj-$(CONFIG_CPM2) += pq2.o
obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index ba5028e..523c03d 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for the PowerPC 83xx linux kernel.
#
+EXTRA_CFLAGS := -Werror
+
obj-y := misc.o usb.o
obj-$(CONFIG_SUSPEND) += suspend.o suspend-asm.o
obj-$(CONFIG_MPC831x_RDB) += mpc831x_rdb.o
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index cb3054e..0767384 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for the PowerPC 85xx linux kernel.
#
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
index 8fee37d..24c58e1 100644
--- a/arch/powerpc/platforms/86xx/Makefile
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -1,6 +1,7 @@
#
# Makefile for the PowerPC 86xx linux kernel.
#
+EXTRA_CFLAGS := -Werror
obj-y := pic.o
obj-$(CONFIG_SMP) += mpc86xx_smp.o
diff --git a/arch/powerpc/platforms/8xx/Makefile b/arch/powerpc/platforms/8xx/Makefile
index 7b71d9c..fdccd47 100644
--- a/arch/powerpc/platforms/8xx/Makefile
+++ b/arch/powerpc/platforms/8xx/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for the PowerPC 8xx linux kernel.
#
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_PPC_8xx) += m8xx_setup.o
obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 423a023..bc9e246 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -1,3 +1,4 @@
+EXTRA_CFLAGS := -Werror
obj-$(CONFIG_FSL_ULI1575) += fsl_uli1575.o
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index 7fd8308..2366dd1 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_PPC_CELL_NATIVE) += interrupt.o iommu.o setup.o \
cbe_regs.o spider-pic.o \
pervasive.o pmu.o io-workarounds.o \
diff --git a/arch/powerpc/platforms/chrp/Makefile b/arch/powerpc/platforms/chrp/Makefile
index 4b3bfad..6282c65 100644
--- a/arch/powerpc/platforms/chrp/Makefile
+++ b/arch/powerpc/platforms/chrp/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
obj-y += setup.o time.o pegasos_eth.o pci.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_NVRAM) += nvram.o
diff --git a/arch/powerpc/platforms/embedded6xx/Makefile b/arch/powerpc/platforms/embedded6xx/Makefile
index 0773c08..919cc1a 100644
--- a/arch/powerpc/platforms/embedded6xx/Makefile
+++ b/arch/powerpc/platforms/embedded6xx/Makefile
@@ -1,6 +1,8 @@
#
# Makefile for the 6xx/7xx/7xxxx linux kernel.
#
+EXTRA_CFLAGS := -Werror
+
obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o
obj-$(CONFIG_LINKSTATION) += linkstation.o ls_uart.o
obj-$(CONFIG_STORCENTER) += storcenter.o
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile
index cc7161f..2602d1b 100644
--- a/arch/powerpc/platforms/iseries/Makefile
+++ b/arch/powerpc/platforms/iseries/Makefile
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -mno-minimal-toc
+EXTRA_CFLAGS += -mno-minimal-toc -Werror
extra-y += dt.o
diff --git a/arch/powerpc/platforms/maple/Makefile b/arch/powerpc/platforms/maple/Makefile
index 1be1a99..c073d91 100644
--- a/arch/powerpc/platforms/maple/Makefile
+++ b/arch/powerpc/platforms/maple/Makefile
@@ -1 +1,3 @@
+EXTRA_CFLAGS := -Werror
+
obj-y += setup.o pci.o time.o
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index ce6d789..acc25d3 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o dma_lib.o misc.o
obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile
index 8977417..6ec9314 100644
--- a/arch/powerpc/platforms/powermac/Makefile
+++ b/arch/powerpc/platforms/powermac/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
CFLAGS_bootx_init.o += -fPIC
ifdef CONFIG_FTRACE
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index ac1bdf8..16b00f3 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
obj-y += interrupt.o exports.o os-area.o
obj-y += system-bus.o
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index dfe574a..2e122e9 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -1,3 +1,5 @@
+EXTRA_CFLAGS := -Werror
+
ifeq ($(CONFIG_PPC64),y)
EXTRA_CFLAGS += -mno-minimal-toc
endif
--
1.5.6.3
^ permalink raw reply related
* [PATCH 7/8] Guard from_rtc_time() in arch/powerpc/platforms/powermac/time.c
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
from_rtc_time() is only called when one of 3 CONFIG options are defined.
Guard the declaration appropriately.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/platforms/powermac/time.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index bbbefd6..59eb840 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -93,11 +93,14 @@ static void to_rtc_time(unsigned long now, struct rtc_time *tm)
}
#endif
+#if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU) || \
+ defined(CONFIG_PMAC_SMU)
static unsigned long from_rtc_time(struct rtc_time *tm)
{
return mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
}
+#endif
#ifdef CONFIG_ADB_CUDA
static unsigned long cuda_get_time(void)
--
1.5.6.3
^ permalink raw reply related
* [PATCH 2/8] Guard htab_dt_scan_hugepage_blocks appropriately
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
htab_dt_scan_hugepage_blocks is only used when CONFIG_HUGETLB_PAGE is
defined, likewise guard the declaration.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/mm/hash_utils_64.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 5ce5a4d..fa58777 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -329,6 +329,7 @@ static int __init htab_dt_scan_page_sizes(unsigned long node,
return 0;
}
+#ifdef CONFIG_HUGETLB_PAGE
/* Scan for 16G memory blocks that have been set aside for huge pages
* and reserve those blocks for 16G huge pages.
*/
@@ -366,6 +367,7 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
add_gpage(phys_addr, block_size, expected_pages);
return 0;
}
+#endif /* CONFIG_HUGETLB_PAGE */
static void __init htab_init_page_sizes(void)
{
--
1.5.6.3
^ permalink raw reply related
* [PATCH 4/8] Silence warnings in arch/powerpc/platforms/52xx/mpc52xx_pci.c
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
Explicitly cast resource fields to unsigned long long, and match format
specifier.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/platforms/52xx/mpc52xx_pci.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 5a382bb..b49a185 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -265,8 +265,11 @@ mpc52xx_pci_setup(struct pci_controller *hose,
/* Memory windows */
res = &hose->mem_resources[0];
if (res->flags) {
- pr_debug("mem_resource[0] = {.start=%x, .end=%x, .flags=%lx}\n",
- res->start, res->end, res->flags);
+ pr_debug("mem_resource[0] = "
+ "{.start=%llx, .end=%llx, .flags=%llx}\n",
+ (unsigned long long)res->start,
+ (unsigned long long)res->end,
+ (unsigned long long)res->flags);
out_be32(&pci_regs->iw0btar,
MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
res->end - res->start + 1));
@@ -297,9 +300,11 @@ mpc52xx_pci_setup(struct pci_controller *hose,
printk(KERN_ERR "%s: Didn't find IO resources\n", __FILE__);
return;
}
- pr_debug(".io_resource={.start=%x,.end=%x,.flags=%lx} "
+ pr_debug(".io_resource={.start=%llx,.end=%llx,.flags=%llx} "
".io_base_phys=0x%p\n",
- res->start, res->end, res->flags, (void*)hose->io_base_phys);
+ (unsigned long long)res->start,
+ (unsigned long long)res->end,
+ (unsigned long long)res->flags, (void*)hose->io_base_phys);
out_be32(&pci_regs->iw2btar,
MPC52xx_PCI_IWBTAR_TRANSLATION(hose->io_base_phys,
res->start,
--
1.5.6.3
^ permalink raw reply related
* [PATCH 1/8] Guard linkstation_physmap_partitions.
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
linkstation_physmap_partitions is only used when CONFIG_MTD_PHYSMAP is
defined, so likewise guard the declaration.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/platforms/embedded6xx/linkstation.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index eb5d74e..bec68af 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -21,6 +21,7 @@
#include "mpc10x.h"
+#ifdef CONFIG_MTD_PHYSMAP
static struct mtd_partition linkstation_physmap_partitions[] = {
{
.name = "mtd_firmimg",
@@ -53,6 +54,7 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
.size = 0x0f0000,
},
};
+#endif /* CONFIG_MTD_PHYSMAP */
static int __init linkstation_add_bridge(struct device_node *dev)
{
--
1.5.6.3
^ permalink raw reply related
* [PATCH 3/8] Silennce warning in arch/powerpc/mm/mem.c
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
Explicitly cast to unsigned long long, rather than u64.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/mm/mem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 702691c..1c93c25 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -311,7 +311,7 @@ void __init paging_init(void)
#endif /* CONFIG_HIGHMEM */
printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%lx\n",
- (u64)top_of_ram, total_ram);
+ (unsigned long long)top_of_ram, total_ram);
printk(KERN_DEBUG "Memory hole size: %ldMB\n",
(long int)((top_of_ram - total_ram) >> 20));
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
--
1.5.6.3
^ permalink raw reply related
* [PATCH 5/8] Silence warning in arch/powerpc/mm/ppc_mmu_32.c
From: Tony Breeds @ 2008-07-31 3:51 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <cac86e24e42bd05087b43663b687f04df91326ba.1217476198.git.tony@bakeyournoodle.com>
total_memory is a 'phys_addr_t', cast to unsigned long to silence
warning.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/mm/ppc_mmu_32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index c53145f..9c19655 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -237,7 +237,7 @@ void __init MMU_init_hw(void)
Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
- total_memory >> 20, Hash_size >> 10, Hash);
+ (unsigned long)total_memory >> 20, Hash_size >> 10, Hash);
/*
--
1.5.6.3
^ permalink raw reply related
* [PATCH] powerpc: Incorrect NOR offset in dts
From: Sean MacLennan @ 2008-07-31 3:41 UTC (permalink / raw)
To: linuxppc-dev, Josh Boyer
FPGA offset in NOR flash was converted incorrectly when switching from
64M to 4M flash.
Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
---
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts
index 7300736..f4e4ba6 100644
--- a/arch/powerpc/boot/dts/warp.dts
+++ b/arch/powerpc/boot/dts/warp.dts
@@ -157,7 +157,7 @@
#size-cells = <1>;
partition@300000 {
label = "fpga";
- reg = <0x0030000 0x00040000>;
+ reg = <0x0300000 0x00040000>;
};
partition@340000 {
label = "env";
^ permalink raw reply related
* Re: ide pmac breakage
From: Bartlomiej Zolnierkiewicz @ 2008-07-31 3:17 UTC (permalink / raw)
To: benh; +Cc: FUJITA Tomonori, linux-ide, petkovbb, linuxppc-dev
In-Reply-To: <1217466559.11188.378.camel@pasglop>
On Thursday 31 July 2008, Benjamin Herrenschmidt wrote:
> On Thu, 2008-07-31 at 02:48 +0200, Bartlomiej Zolnierkiewicz wrote:
> > There seems to be some confusion between warm-plugging of IDE devices
> > and hot-plugging of IDE devices.
> >
> > > not a single piece of HW to exercise those code path ? I don't ask you
> > > to get a powermac with a media-bay, but ide_cs seems to be a pretty
> > > important one that's part of what the ide maintainer should take care
> > > of... And I suspect it's going to exercise the same code path as
> > > mediabay.
> >
> > I'm open for offers of co-maintaince of the code (which includes taking
> > over particular host drivers) and since you seem to have pretty good
> > insight into what ide maintainer should be doing I presume that you want
> > to be added to MAINTAINERS?
>
> Should I laugh ?
>
> Seriously here. Those things used to work, you broke them.
That's jumping to conlusions as you haven't yet proven that it was
really me. :)
Which would be great because than I can finally start fixing the damage.
> It may be worthwile cleanup / improvements, but at the end of the day,
> if you are the maintainer for drivers/ide, and things as fundamental as
> supporting proper ide_cs seems to be totally part of your job. I'm not
Maybe I'm really completely unsuited for the job. I even didn't know
that proper supporting of _one_ particular host driver is a _fundamental_
part of the _subsystem_ maintainer's job...
> saying ide_cs is broken today (though I suspect it -may- be suffering
> from similar breakage to media-bay), however, I'm reacting to your
> apparent lack of interest in making sure these things work.
If only all people showed so much interest as *IDE*PMAC* Maintainer in
making sure that things work (instead of i.e. telling people what should
they be doing in their _limited_ _private_ time) we would have nothing
to worry about! ;)
Can we now go back to fixing ide-pmac breakage? Pretty please.
It is not unlikely that it in the time it took for the last four
mails it would have been fixed already.
^ permalink raw reply
* PPC440EPx skips instruction...
From: Dave Littell @ 2008-07-31 1:57 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I have a rather interesting problem with a PPC440EPx-based system. I've
localized the problem down to a single instruction in a function
prologue that stores the return address to the stack:
stw r0,0x44(r1)
(lr is written to r0 earlier in the prologue.)
This code is in a normal device driver and is not being executed at
interrupt level or in some TLB miss handler or anything arcane - it's
just regular code (execution-context-wise).
It appears that if I just let the code run the write never makes it to
the stack, thus setting the stage for very interesting function returns.
Whatever value happened to be on the stack becomes the IP with the
accompanying "excitement" that follows. If I single-step through the
instruction using a JTAG debugger the write to the stack always occurs
and the function does its work and returns correctly.
If I step right up to the stw, write a test value into 0x44(r1), then
allow the processor to free run I am rewarded with an attempted return
address equal to the test value I wrote to the stack - the stw memory
write never makes it to the stack.
Because the code is compiled from C I'm limited in where I can sprinkle
sync instructions but I've tried adding asm("sync") as close as possible
to before (and after) the offending write - all to no effect. I'm at a
loss to explain this as the remainder of the system seems to be running
just fine but I get this particular behavior at will. More like its
will than mine... :-{
Has anyone seen this kind of behavior with a PPC440 core? Please note
that workarounds for all known CPU core errata for the PPC440EPx are
already in place (based on the AMCC errata document).
Thanks very much,
Dave
^ permalink raw reply
* [patch 1/6] kdump: Make elfcorehdr_addr independent of CONFIG_PROC_VMCORE
From: Simon Horman @ 2008-07-31 1:22 UTC (permalink / raw)
To: kexec, linux-kernel, linux-ia64, linuxppc-dev, linux-sh
Cc: Tony Luck, Terry Loftin, Paul Mundt, Eric W. Biederman,
Ingo Molnar, Andrew Morton, Vivek Goyal
In-Reply-To: <20080731012208.115225969@vergenet.net>
From: Vivek Goyal <vgoyal@redhat.com>
o elfcorehdr_addr is used by not only the code under CONFIG_PROC_VMCORE but
also by the code which is not inside CONFIG_PROC_VMCORE. For example,
is_kdump_kernel() is used by powerpc code to determine if kernel is booting
after a panic then use previous kernel's TCE table. So even if
CONFIG_PROC_VMCORE is not set in second kernel, one should be able to
correctly determine that we are booting after a panic and setup calgary
iommu accordingly.
o So remove the assumption that elfcorehdr_addr is under CONFIG_PROC_VMCORE.
o Move definition of elfcorehdr_addr to arch dependent crash files.
(Unfortunately crash dump does not have an arch independent file otherwise
that would have been the best place).
o kexec.c is not the right place as one can Have CRASH_DUMP enabled in
second kernel without KEXEC being enabled.
o I don't see sh setup code parsing the command line for elfcorehdr_addr. I
am wondering how does vmcore interface work on sh. Anyway, I am atleast
defining elfcoredhr_addr so that compilation is not broken on sh.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Paul Mundt <lethal@linux-sh.org>
---
arch/ia64/kernel/crash_dump.c | 4 ++++
arch/ia64/kernel/setup.c | 9 ++++++++-
arch/powerpc/kernel/crash_dump.c | 10 ++++++++--
arch/sh/kernel/crash_dump.c | 3 +++
arch/x86/kernel/crash_dump_32.c | 3 +++
arch/x86/kernel/crash_dump_64.c | 3 +++
arch/x86/kernel/setup.c | 8 +++++++-
fs/proc/vmcore.c | 3 ---
include/linux/crash_dump.h | 14 ++++++++++----
9 files changed, 46 insertions(+), 11 deletions(-)
Andrew, this patch is a clean-up and is not required by other patches,
so it could wait until post 2.6.27 if you prefer. However, it is a
valuable cleanup that removes messiness and should remove some of
the confusion around elfcorehdr_addr and is_kdump_kernel(). So I
would prefer it to be included in 2.6.27.
sh setup code has been added in a separate patch that will
be merged by Paul Mundt.
- Simon Horman
diff -puN include/linux/crash_dump.h~remove-elfcore-hdr-addr-definition-vmcore include/linux/crash_dump.h
--- linux-2.6.27-pre-rc1/include/linux/crash_dump.h~remove-elfcore-hdr-addr-definition-vmcore 2008-07-28 12:00:44.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/include/linux/crash_dump.h 2008-07-28 12:00:56.000000000 -0400
@@ -9,11 +9,7 @@
#define ELFCORE_ADDR_MAX (-1ULL)
-#ifdef CONFIG_PROC_VMCORE
extern unsigned long long elfcorehdr_addr;
-#else
-static const unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
-#endif
extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
unsigned long, int);
@@ -28,6 +24,16 @@ extern struct proc_dir_entry *proc_vmcor
#define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
+/*
+ * is_kdump_kernel() checks whether this kernel is booting after a panic of
+ * previous kernel or not. This is determined by checking if previous kernel
+ * has passed the elf core header address on command line.
+ *
+ * This is not just a test if CONFIG_CRASH_DUMP is enabled or not. It will
+ * return 1 if CONFIG_CRASH_DUMP=y and if kernel is booting after a panic of
+ * previous kernel.
+ */
+
static inline int is_kdump_kernel(void)
{
return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0;
diff -puN fs/proc/vmcore.c~remove-elfcore-hdr-addr-definition-vmcore fs/proc/vmcore.c
--- linux-2.6.27-pre-rc1/fs/proc/vmcore.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-28 09:19:50.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/fs/proc/vmcore.c 2008-07-28 09:20:10.000000000 -0400
@@ -32,9 +32,6 @@ static size_t elfcorebuf_sz;
/* Total size of vmcore file. */
static u64 vmcore_size;
-/* Stores the physical address of elf header of crash image. */
-unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
-
struct proc_dir_entry *proc_vmcore = NULL;
/* Reads a page from the oldmem device from given offset. */
diff -puN arch/x86/kernel/crash_dump_32.c~remove-elfcore-hdr-addr-definition-vmcore arch/x86/kernel/crash_dump_32.c
--- linux-2.6.27-pre-rc1/arch/x86/kernel/crash_dump_32.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:28:26.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/x86/kernel/crash_dump_32.c 2008-07-29 05:28:26.000000000 -0400
@@ -13,6 +13,9 @@
static void *kdump_buf_page;
+/* Stores the physical address of elf header of crash image. */
+unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
+
/**
* copy_oldmem_page - copy one page from "oldmem"
* @pfn: page frame number to be copied
diff -puN arch/x86/kernel/crash_dump_64.c~remove-elfcore-hdr-addr-definition-vmcore arch/x86/kernel/crash_dump_64.c
--- linux-2.6.27-pre-rc1/arch/x86/kernel/crash_dump_64.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:28:26.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/x86/kernel/crash_dump_64.c 2008-07-29 05:28:26.000000000 -0400
@@ -11,6 +11,9 @@
#include <asm/uaccess.h>
#include <asm/io.h>
+/* Stores the physical address of elf header of crash image. */
+unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
+
/**
* copy_oldmem_page - copy one page from "oldmem"
* @pfn: page frame number to be copied
diff -puN arch/x86/kernel/setup.c~remove-elfcore-hdr-addr-definition-vmcore arch/x86/kernel/setup.c
--- linux-2.6.27-pre-rc1/arch/x86/kernel/setup.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:28:26.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/x86/kernel/setup.c 2008-07-29 05:28:26.000000000 -0400
@@ -558,7 +558,13 @@ static void __init reserve_standard_io_r
}
-#ifdef CONFIG_PROC_VMCORE
+/*
+ * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
+ * is_kdump_kernel() to determine if we are booting after a panic. Hence
+ * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
+ */
+
+#ifdef CONFIG_CRASH_DUMP
/* elfcorehdr= specifies the location of elf core header
* stored by the crashed kernel. This option will be passed
* by kexec loader to the capture kernel.
diff -puN arch/powerpc/kernel/crash_dump.c~remove-elfcore-hdr-addr-definition-vmcore arch/powerpc/kernel/crash_dump.c
--- linux-2.6.27-pre-rc1/arch/powerpc/kernel/crash_dump.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:30:33.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/powerpc/kernel/crash_dump.c 2008-07-29 05:30:33.000000000 -0400
@@ -27,6 +27,9 @@
#define DBG(fmt...)
#endif
+/* Stores the physical address of elf header of crash image. */
+unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
+
void __init reserve_kdump_trampoline(void)
{
lmb_reserve(0, KDUMP_RESERVE_LIMIT);
@@ -66,7 +69,11 @@ void __init setup_kdump_trampoline(void)
DBG(" <- setup_kdump_trampoline()\n");
}
-#ifdef CONFIG_PROC_VMCORE
+/*
+ * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
+ * is_kdump_kernel() to determine if we are booting after a panic. Hence
+ * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
+ */
static int __init parse_elfcorehdr(char *p)
{
if (p)
@@ -75,7 +82,6 @@ static int __init parse_elfcorehdr(char
return 1;
}
__setup("elfcorehdr=", parse_elfcorehdr);
-#endif
static int __init parse_savemaxmem(char *p)
{
diff -puN arch/ia64/kernel/setup.c~remove-elfcore-hdr-addr-definition-vmcore arch/ia64/kernel/setup.c
--- linux-2.6.27-pre-rc1/arch/ia64/kernel/setup.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:30:54.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/ia64/kernel/setup.c 2008-07-29 05:30:54.000000000 -0400
@@ -478,7 +478,12 @@ static __init int setup_nomca(char *s)
}
early_param("nomca", setup_nomca);
-#ifdef CONFIG_PROC_VMCORE
+/*
+ * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
+ * is_kdump_kernel() to determine if we are booting after a panic. Hence
+ * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
+ */
+#ifdef CONFIG_CRASH_DUMP
/* elfcorehdr= specifies the location of elf core header
* stored by the crashed kernel.
*/
@@ -491,7 +496,9 @@ static int __init parse_elfcorehdr(char
return 0;
}
early_param("elfcorehdr", parse_elfcorehdr);
+#endif
+#ifdef CONFIG_PROC_VMCORE
int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end)
{
unsigned long length;
diff -puN arch/ia64/kernel/crash_dump.c~remove-elfcore-hdr-addr-definition-vmcore arch/ia64/kernel/crash_dump.c
--- linux-2.6.27-pre-rc1/arch/ia64/kernel/crash_dump.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:37:10.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/ia64/kernel/crash_dump.c 2008-07-29 05:37:58.000000000 -0400
@@ -8,10 +8,14 @@
#include <linux/errno.h>
#include <linux/types.h>
+#include <linux/crash_dump.h>
#include <asm/page.h>
#include <asm/uaccess.h>
+/* Stores the physical address of elf header of crash image. */
+unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
+
/**
* copy_oldmem_page - copy one page from "oldmem"
* @pfn: page frame number to be copied
diff -puN arch/sh/kernel/crash_dump.c~remove-elfcore-hdr-addr-definition-vmcore arch/sh/kernel/crash_dump.c
--- linux-2.6.27-pre-rc1/arch/sh/kernel/crash_dump.c~remove-elfcore-hdr-addr-definition-vmcore 2008-07-29 05:31:04.000000000 -0400
+++ linux-2.6.27-pre-rc1-root/arch/sh/kernel/crash_dump.c 2008-07-29 05:31:04.000000000 -0400
@@ -10,6 +10,9 @@
#include <linux/io.h>
#include <asm/uaccess.h>
+/* Stores the physical address of elf header of crash image. */
+unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
+
/**
* copy_oldmem_page - copy one page from "oldmem"
* @pfn: page frame number to be copied
_
--
--
Horms
^ permalink raw reply
* Re: ide pmac breakage
From: Benjamin Herrenschmidt @ 2008-07-31 1:09 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: FUJITA Tomonori, linux-ide, petkovbb, linuxppc-dev
In-Reply-To: <200807310248.29214.bzolnier@gmail.com>
On Thu, 2008-07-31 at 02:48 +0200, Bartlomiej Zolnierkiewicz wrote:
> There seems to be some confusion between warm-plugging of IDE devices
> and hot-plugging of IDE devices.
>
> > not a single piece of HW to exercise those code path ? I don't ask you
> > to get a powermac with a media-bay, but ide_cs seems to be a pretty
> > important one that's part of what the ide maintainer should take care
> > of... And I suspect it's going to exercise the same code path as
> > mediabay.
>
> I'm open for offers of co-maintaince of the code (which includes taking
> over particular host drivers) and since you seem to have pretty good
> insight into what ide maintainer should be doing I presume that you want
> to be added to MAINTAINERS?
Should I laugh ?
Seriously here. Those things used to work, you broke them.
It may be worthwile cleanup / improvements, but at the end of the day,
if you are the maintainer for drivers/ide, and things as fundamental as
supporting proper ide_cs seems to be totally part of your job. I'm not
saying ide_cs is broken today (though I suspect it -may- be suffering
from similar breakage to media-bay), however, I'm reacting to your
apparent lack of interest in making sure these things work.
Ben.
^ permalink raw reply
* Re: ide pmac breakage
From: Bartlomiej Zolnierkiewicz @ 2008-07-31 0:48 UTC (permalink / raw)
To: benh; +Cc: FUJITA Tomonori, linux-ide, petkovbb, linuxppc-dev
In-Reply-To: <1217458152.11188.355.camel@pasglop>
On Thursday 31 July 2008, Benjamin Herrenschmidt wrote:
> On Wed, 2008-07-30 at 21:11 +0200, Bartlomiej Zolnierkiewicz wrote:
> >
> > > Note that there shouldn't be anything fundamentally different from
> > > ide-pmac here vs. something like pcmcia IDE cards... do you have one
> > of
> > > these to test with ?
> >
> > Nope and I really don't intend to have one. I count on other people
> > to take some care of support for host drivers that they
> > maintain/use. ;)
>
> Hrm... that's not a very sane approach. You have some infrastructure for
> adding / removing devices, in fact changes things in that area even, and
There seems to be some confusion between warm-plugging of IDE devices
and hot-plugging of IDE devices.
> not a single piece of HW to exercise those code path ? I don't ask you
> to get a powermac with a media-bay, but ide_cs seems to be a pretty
> important one that's part of what the ide maintainer should take care
> of... And I suspect it's going to exercise the same code path as
> mediabay.
I'm open for offers of co-maintaince of the code (which includes taking
over particular host drivers) and since you seem to have pretty good
insight into what ide maintainer should be doing I presume that you want
to be added to MAINTAINERS?
^ permalink raw reply
* Re: mpc744x, Marvell mv6446x kernel guidance please
From: Dale Farnsworth @ 2008-07-30 23:10 UTC (permalink / raw)
To: Stephen Horton; +Cc: linuxppc-embedded
In-Reply-To: <295C5089A56CE143B316E5F67CA99CB001D06956@cowboy.inovate.inovate.com>
On Wed, Jul 30, 2008 at 08:56:18AM -0500, Stephen Horton wrote:
> Thanks for your kind encouragement. I now have a mostly booting kernel.
> I have just a few remaining issues to resolve; perhaps you (or others)
> can give me some tips regarding these:
>
> 1. In your prpmc2800 .dts configuration, in the PCI bus configuration
> section, you lay-out the IRQ mappings like this:
> interrupt-map = <
> /* IDSEL 0x0a */
> 5000 0 0 1 &/mv64x60/pic 50
> 5000 0 0 2 &/mv64x60/pic 51
> I've read the Open Firmware document on Interrupt Mapping, but I still
> don't really understand the first 3 columns (5000 0 0), especially where
> the first column comes from. Is this just some arbitrarily selected
> offset address for that device on the pci bus?
An address on the PCI bus is represented by 3 cells (96 bits).
Take a look at page 4 of http://www.openbios.org/data/docs/bus.pci.pdf
You'll see that the PCI device is contained in bits 15-11, selected by
the 0xf800 in interrupt-map-mask. The 0x5000 corresponds to device 0xa.
-Dale
^ permalink raw reply
* Re: [PATCH] powerpc/mm: Lockless get_user_pages_fast()
From: Kumar Gala @ 2008-07-30 23:15 UTC (permalink / raw)
To: benh; +Cc: Nick Piggin, linuxppc-dev list
In-Reply-To: <64F97436-C94D-4CD7-A217-3C4356C93807@kernel.crashing.org>
Here's the code.. I haven't looked at this in any detail and I didn't
write it.
- k
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index c758407..c502909 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -26,7 +26,13 @@
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/highmem.h>
+#include <linux/sched.h>
+#ifdef CONFIG_SMP
+#include <linux/rcupdate.h>
+#endif
+
+#include <asm/tlb.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/fixmap.h>
@@ -48,7 +54,7 @@ EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
extern char etext[], _stext[];
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_FSL_BOOKE)
extern void hash_page_sync(void);
#endif
@@ -79,6 +85,84 @@ extern unsigned long p_mapped_by_tlbcam(unsigned long pa);
#define PGDIR_ORDER 0
#endif
+#ifdef CONFIG_SMP
+struct pte_freelist_batch
+{
+ struct rcu_head rcu;
+ unsigned int index;
+ struct page * tables[0];
+ struct mm_struct *mm;
+};
+
+#define PTE_FREELIST_SIZE \
+ ((PAGE_SIZE - sizeof(struct pte_freelist_batch)) \
+ / sizeof(struct page *))
+
+DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
+
+static void pte_free_smp_sync(void *arg)
+{
+ /* Do nothing, just ensure we sync with all CPUs */
+}
+
+/* This is only called when we are critically out of memory
+ * (and fail to get a page in pte_free_tlb).
+ */
+static void pgtable_free_now(struct mm_struct *mm, struct page *pte)
+{
+ smp_call_function(pte_free_smp_sync, NULL, 0, 1);
+
+ pte_free(mm, pte);
+}
+
+static void pte_free_rcu_callback(struct rcu_head *head)
+{
+ struct pte_freelist_batch *batch =
+ container_of(head, struct pte_freelist_batch, rcu);
+ unsigned int i;
+
+ for (i = 0; i < batch->index; i++)
+ pte_free(batch->mm, batch->tables[i]);
+
+ free_page((unsigned long)batch);
+}
+
+static void pte_free_submit(struct pte_freelist_batch *batch)
+{
+ INIT_RCU_HEAD(&batch->rcu);
+ call_rcu(&batch->rcu, pte_free_rcu_callback);
+}
+
+void pgtable_free_tlb(struct mmu_gather *tlb, struct page *pte)
+{
+ /* This is safe since tlb_gather_mmu has disabled preemption */
+ cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
+ struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
+
+ if (atomic_read(&tlb->mm->mm_users) < 2 ||
+ cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) {
+ pte_free(tlb->mm, pte);
+ return;
+ }
+
+ if (*batchp == NULL) {
+ *batchp = (struct pte_freelist_batch *)__get_free_page(GFP_ATOMIC);
+ if (*batchp == NULL) {
+ pgtable_free_now(tlb->mm, pte);
+ return;
+ }
+ (*batchp)->index = 0;
+ }
+ (*batchp)->tables[(*batchp)->index++] = pte;
+ if ((*batchp)->index == PTE_FREELIST_SIZE) {
+ (*batchp)->mm = tlb->mm;
+ pte_free_submit(*batchp);
+ *batchp = NULL;
+ }
+}
+
+#endif /* CONFIG_SMP */
+
pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *ret;
@@ -127,7 +211,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_FSL_BOOKE)
hash_page_sync();
#endif
free_page((unsigned long)pte);
@@ -135,7 +219,7 @@ void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
void pte_free(struct mm_struct *mm, pgtable_t ptepage)
{
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_FSL_BOOKE)
hash_page_sync();
#endif
pgtable_page_dtor(ptepage);
diff --git a/include/asm-powerpc/pgalloc-32.h b/include/asm-powerpc/pgalloc-32.h
index 58c0714..1cb9245 100644
--- a/include/asm-powerpc/pgalloc-32.h
+++ b/include/asm-powerpc/pgalloc-32.h
@@ -36,7 +36,14 @@ extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
extern void pte_free_kernel(struct mm_struct *mm, pte_t *pte);
extern void pte_free(struct mm_struct *mm, pgtable_t pte);
+#ifdef CONFIG_SMP
+extern void pgtable_free_tlb(struct mmu_gather *tlb, struct page *pte);
+
+#define __pte_free_tlb(tlb, pte) pgtable_free_tlb(tlb, pte)
+
+#else
#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, (pte))
+#endif /* CONFIG_SMP */
#define check_pgt_cache() do { } while (0)
^ permalink raw reply related
* Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion
From: Benjamin Herrenschmidt @ 2008-07-30 22:59 UTC (permalink / raw)
To: Jeff Garzik
Cc: Stephen Rothwell, LKML, FUJITA Tomonori, ppc-dev, Paul Mackerras,
Andrew Morton
In-Reply-To: <4890DA8E.5000502@garzik.org>
On Wed, 2008-07-30 at 17:18 -0400, Jeff Garzik wrote:
> Stephen Rothwell wrote:
> > The addition of an argument to dma_mapping_error() in commit
> > 8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 "dma-mapping: add the device
> > argument to dma_mapping_error()" left a bit of fallout:
> >
> > drivers/net/ibmveth.c:263: error: too few arguments to function 'dma_mapping_error'
> > drivers/net/ibmveth.c:264: error: expected ')' before 'goto'
> > drivers/net/ibmveth.c:284: error: expected expression before '}' token
> > drivers/net/ibmveth.c:297: error: too few arguments to function 'dma_mapping_error'
> > drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single'
> > drivers/net/ibmveth.c:306: error: expected expression before '}' token
> > drivers/net/ibmveth.c:491: error: too few arguments to function 'dma_mapping_error'
> > drivers/net/ibmveth.c:927: error: too few arguments to function 'dma_mapping_error'
> > drivers/net/ibmveth.c:927: error: expected ')' before '{' token
> > drivers/net/ibmveth.c:974: error: expected expression before '}' token
> > drivers/net/ibmveth.c:914: error: label 'out' used but not defined m
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> > drivers/net/ibmveth.c | 8 ++++----
> > 1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > Compiler tested for ppc64_defconfig.
>
> applied
>
I think I merged that one up already... it was a trivial compile fix
for a fallover of an API change in a powerpc specific driver so I
didn't wait for an ack.
Ben.
^ permalink raw reply
* Re: ide pmac breakage
From: Benjamin Herrenschmidt @ 2008-07-30 22:49 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: FUJITA Tomonori, linux-ide, petkovbb, linuxppc-dev
In-Reply-To: <200807302111.54514.bzolnier@gmail.com>
On Wed, 2008-07-30 at 21:11 +0200, Bartlomiej Zolnierkiewicz wrote:
>
> > Note that there shouldn't be anything fundamentally different from
> > ide-pmac here vs. something like pcmcia IDE cards... do you have one
> of
> > these to test with ?
>
> Nope and I really don't intend to have one. I count on other people
> to take some care of support for host drivers that they
> maintain/use. ;)
Hrm... that's not a very sane approach. You have some infrastructure for
adding / removing devices, in fact changes things in that area even, and
not a single piece of HW to exercise those code path ? I don't ask you
to get a powermac with a media-bay, but ide_cs seems to be a pretty
important one that's part of what the ide maintainer should take care
of... And I suspect it's going to exercise the same code path as
mediabay.
Ben.
^ permalink raw reply
* test - please ignore
From: Victor Gallardo @ 2008-07-30 22:29 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20080729200225.57634f94@zod.rchland.ibm.com>
test - please ignore
--------------------------------------------------------
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, =
is for the sole use of the intended recipient(s) and contains =
information that is confidential and proprietary to Applied Micro =
Circuits Corporation or its subsidiaries. It is to be used solely for =
the purpose of furthering the parties' business relationship. All =
unauthorized review, use, disclosure or distribution is prohibited. If =
you are not the intended recipient, please contact the sender by reply =
e-mail and destroy all copies of the original message.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox