Skip to content

Commit

Permalink
Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/pp…
Browse files Browse the repository at this point in the history
…c64-2.6
  • Loading branch information
Linus Torvalds committed Aug 30, 2005
2 parents 826509f + 8913ca1 commit 8bc2bee
Show file tree
Hide file tree
Showing 75 changed files with 204 additions and 573 deletions.
11 changes: 10 additions & 1 deletion arch/ppc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ CC := $(CC) -m32
endif

LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS += -Iarch/$(ARCH)
CPPFLAGS += -Iarch/$(ARCH) -Iinclude3
AFLAGS += -Iarch/$(ARCH)
CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -mmultiple
CPP = $(CC) -E $(CFLAGS)
# Temporary hack until we have migrated to asm-powerpc
LINUXINCLUDE += -Iinclude3

CHECKFLAGS += -D__powerpc__

Expand Down Expand Up @@ -101,6 +103,7 @@ endef

archclean:
$(Q)$(MAKE) $(clean)=arch/ppc/boot
$(Q)rm -rf include3

prepare: include/asm-$(ARCH)/offsets.h checkbin

Expand All @@ -110,6 +113,12 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
$(call filechk,gen-asm-offsets)

# Temporary hack until we have migrated to asm-powerpc
include/asm: include3/asm
include3/asm:
$(Q)if [ ! -d include3 ]; then mkdir -p include3; fi
$(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm

# Use the file '.tmp_gas_check' for binutils tests, as gas won't output
# to stdout and these checks are run even on install targets.
TOUT := .tmp_gas_check
Expand Down
9 changes: 9 additions & 0 deletions arch/ppc64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ LDFLAGS := -m elf64ppc
LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \
-mcall-aixdesc
# Temporary hack until we have migrated to asm-powerpc
CPPFLAGS += -Iinclude3

GCC_VERSION := $(call cc-version)
GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;)
Expand Down Expand Up @@ -112,6 +114,7 @@ all: $(KBUILD_IMAGE)

archclean:
$(Q)$(MAKE) $(clean)=$(boot)
$(Q)rm -rf include3

prepare: include/asm-ppc64/offsets.h

Expand All @@ -121,6 +124,12 @@ arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
$(call filechk,gen-asm-offsets)

# Temporary hack until we have migrated to asm-powerpc
include/asm: include3/asm
include3/asm:
$(Q)if [ ! -d include3 ]; then mkdir -p include3; fi;
$(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm

define archhelp
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
echo ' zImage.initrd- Compressed kernel image with initrd attached,'
Expand Down
6 changes: 3 additions & 3 deletions arch/ppc64/configs/g5_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_HZ=250
CONFIG_GENERIC_HARDIRQS=y
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y
Expand Down
6 changes: 3 additions & 3 deletions arch/ppc64/configs/iSeries_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_HZ=250
CONFIG_GENERIC_HARDIRQS=y
CONFIG_LPARCFG=y
CONFIG_SECCOMP=y
Expand Down
6 changes: 3 additions & 3 deletions arch/ppc64/configs/maple_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_HZ=250
CONFIG_GENERIC_HARDIRQS=y
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y
Expand Down
6 changes: 3 additions & 3 deletions arch/ppc64/configs/pSeries_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_HZ=250
CONFIG_EEH=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_PPC_RTAS=y
Expand Down
6 changes: 3 additions & 3 deletions arch/ppc64/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_HZ=250
CONFIG_EEH=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_PPC_RTAS=y
Expand Down
16 changes: 15 additions & 1 deletion arch/ppc64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,21 @@ initial_stab:
.= 0x7000
.globl fwnmi_data_area
fwnmi_data_area:
.space PAGE_SIZE

/* iSeries does not use the FWNMI stuff, so it is safe to put
* this here, even if we later allow kernels that will boot on
* both pSeries and iSeries */
#ifdef CONFIG_PPC_ISERIES
. = LPARMAP_PHYS
#include "lparmap.s"
/*
* This ".text" is here for old compilers that generate a trailing
* .note section when compiling .c files to .s
*/
.text
#endif /* CONFIG_PPC_ISERIES */

. = 0x8000

/*
* On pSeries, secondary processors spin in the following code.
Expand Down
21 changes: 16 additions & 5 deletions arch/ppc64/kernel/iSeries_vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,31 @@ static void __init iommu_vio_init(void)
}

/**
* vio_register_device: - Register a new vio device.
* vio_register_device_iseries: - Register a new iSeries vio device.
* @voidev: The device to register.
*/
static struct vio_dev *__init vio_register_device_iseries(char *type,
uint32_t unit_num)
{
struct vio_dev *viodev;

/* allocate a vio_dev for this node */
/* allocate a vio_dev for this device */
viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL);
if (!viodev)
return NULL;
memset(viodev, 0, sizeof(struct vio_dev));

snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num);

return vio_register_device_common(viodev, viodev->dev.bus_id, type,
unit_num, &vio_iommu_table);
viodev->name = viodev->dev.bus_id;
viodev->type = type;
viodev->unit_address = unit_num;
viodev->iommu_table = &vio_iommu_table;
if (vio_register_device(viodev) == NULL) {
kfree(viodev);
return NULL;
}
return viodev;
}

void __init probe_bus_iseries(void)
Expand Down Expand Up @@ -124,14 +131,18 @@ static int vio_match_device_iseries(const struct vio_device_id *id,
return strncmp(dev->type, id->type, strlen(id->type)) == 0;
}

static struct vio_bus_ops vio_bus_ops_iseries = {
.match = vio_match_device_iseries,
};

/**
* vio_bus_init_iseries: - Initialize the iSeries virtual IO bus
*/
static int __init vio_bus_init_iseries(void)
{
int err;

err = vio_bus_init(vio_match_device_iseries, NULL, NULL);
err = vio_bus_init(&vio_bus_ops_iseries);
if (err == 0) {
iommu_vio_init();
vio_bus_device.iommu_table = &vio_iommu_table;
Expand Down
1 change: 1 addition & 0 deletions arch/ppc64/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ static void parse_system_parameter_string(struct seq_file *m)
if (!workbuffer) {
printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
__FILE__, __FUNCTION__, __LINE__);
kfree(local_buffer);
return;
}
#ifdef LPARCFG_DEBUG
Expand Down
2 changes: 0 additions & 2 deletions arch/ppc64/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ void of_device_unregister(struct of_device *ofdev)
struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id)
{
struct of_device *dev;
u32 *reg;

dev = kmalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
Expand All @@ -250,7 +249,6 @@ struct of_device* of_platform_device_create(struct device_node *np, const char *
dev->dev.bus = &of_platform_bus_type;
dev->dev.release = of_release_dev;

reg = (u32 *)get_property(np, "reg", NULL);
strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);

if (of_device_register(dev) != 0) {
Expand Down
19 changes: 13 additions & 6 deletions arch/ppc64/kernel/pSeries_vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/kobject.h>
#include <asm/iommu.h>
#include <asm/dma.h>
#include <asm/prom.h>
#include <asm/vio.h>
#include <asm/hvcall.h>

Expand Down Expand Up @@ -75,16 +76,20 @@ static void vio_unregister_device_pseries(struct vio_dev *viodev)
device_remove_file(&viodev->dev, &dev_attr_devspec);
}

static struct vio_bus_ops vio_bus_ops_pseries = {
.match = vio_match_device_pseries,
.unregister_device = vio_unregister_device_pseries,
.release_device = vio_release_device_pseries,
};

/**
* vio_bus_init_pseries: - Initialize the pSeries virtual IO bus
*/
static int __init vio_bus_init_pseries(void)
{
int err;

err = vio_bus_init(vio_match_device_pseries,
vio_unregister_device_pseries,
vio_release_device_pseries);
err = vio_bus_init(&vio_bus_ops_pseries);
if (err == 0)
probe_bus_pseries();
return err;
Expand Down Expand Up @@ -181,11 +186,13 @@ struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node)
}

snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", *unit_address);
viodev->name = of_node->name;
viodev->type = of_node->type;
viodev->unit_address = *unit_address;
viodev->iommu_table = vio_build_iommu_table(viodev);

/* register with generic device framework */
if (vio_register_device_common(viodev, of_node->name, of_node->type,
*unit_address, vio_build_iommu_table(viodev))
== NULL) {
if (vio_register_device(viodev) == NULL) {
/* XXX free TCE table */
kfree(viodev);
return NULL;
Expand Down
5 changes: 4 additions & 1 deletion arch/ppc64/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,10 @@ static void __init prom_init_mem(void)
if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR )
RELOC(alloc_top) = RELOC(rmo_top);
else
RELOC(alloc_top) = RELOC(rmo_top) = min(0x40000000ul, RELOC(ram_top));
/* Some RS64 machines have buggy firmware where claims up at 1GB
* fails. Cap at 768MB as a workaround. Still plenty of room.
*/
RELOC(alloc_top) = RELOC(rmo_top) = min(0x30000000ul, RELOC(ram_top));

prom_printf("memory layout at init:\n");
prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit));
Expand Down
Loading

0 comments on commit 8bc2bee

Please sign in to comment.