Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13741
b: refs/heads/master
c: 0c95fbb
h: refs/heads/master
i:
  13739: 2bcf428
v: v3
  • Loading branch information
Paul Mackerras committed Nov 10, 2005
1 parent 9c6ece6 commit 9fe0361
Show file tree
Hide file tree
Showing 23 changed files with 50 additions and 60 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06a98dba0d4b4f2f9b1f35f636beb166d6cbde34
refs/heads/master: 0c95fbb25602caa02ef697c3852cd61f9829e6ff
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
signal_64.o ptrace32.o systbl.o \
paca.o ioctl32.o cpu_setup_power4.o \
firmware.o
firmware.o sysfs.o
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
obj-$(CONFIG_POWER4) += idle_power4.o
obj-$(CONFIG_PPC_OF) += of_device.o
obj-$(CONFIG_PPC_RTAS) += rtas.o
procfs-$(CONFIG_PPC64) := proc_ppc64.o
obj-$(CONFIG_PROC_FS) += $(procfs-y)
rtaspci-$(CONFIG_PPC64) := rtas_pci.o
obj-$(CONFIG_PPC_RTAS) += rtas.o $(rtaspci-y)
obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
obj-$(CONFIG_LPARCFG) += lparcfg.o
obj-$(CONFIG_IBMVIO) += vio.o
obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static unsigned long get_purr(void)

#define lparcfg_write NULL

/*
/*
* Methods used to fetch LPAR data when running on an iSeries platform.
*/
static int lparcfg_data(struct seq_file *m, void *v)
Expand Down Expand Up @@ -169,7 +169,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
#endif /* CONFIG_PPC_ISERIES */

#ifdef CONFIG_PPC_PSERIES
/*
/*
* Methods used to fetch LPAR data when running on a pSeries platform.
*/

Expand All @@ -178,7 +178,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
* entitled_capacity,unallocated_capacity,
* aggregation, resource_capability).
*
* R4 = Entitled Processor Capacity Percentage.
* R4 = Entitled Processor Capacity Percentage.
* R5 = Unallocated Processor Capacity Percentage.
* R6 (AABBCCDDEEFFGGHH).
* XXXX - reserved (0)
Expand All @@ -191,7 +191,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
* XX - variable processor Capacity Weight
* XX - Unallocated Variable Processor Capacity Weight.
* XXXX - Active processors in Physical Processor Pool.
* XXXX - Processors active on platform.
* XXXX - Processors active on platform.
*/
static unsigned int h_get_ppp(unsigned long *entitled,
unsigned long *unallocated,
Expand Down Expand Up @@ -274,7 +274,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);
kfree(local_buffer);
return;
}
#ifdef LPARCFG_DEBUG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/*
* arch/ppc64/kernel/proc_ppc64.c
*
* Copyright (C) 2001 Mike Corrigan & Dave Engebretsen IBM Corporation
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ struct isa_reg_property {
typedef int interpret_func(struct device_node *, unsigned long *,
int, int, int);

extern struct rtas_t rtas;
extern struct lmb lmb;
extern unsigned long klimit;

static int __initdata dt_root_addr_cells;
static int __initdata dt_root_size_cells;

Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ int _machine = 0;
EXPORT_SYMBOL(_machine);
#endif

unsigned long klimit = (unsigned long) _end;

/*
* This still seems to be needed... -- paulus
*/
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ arch_initcall(ppc_init);
/* Warning, IO base is not yet inited */
void __init setup_arch(char **cmdline_p)
{
extern char *klimit;
extern void do_init_bootmem(void);

/* so udelay does something sensible, assume <= 1000 bogomips */
Expand Down Expand Up @@ -338,7 +337,7 @@ void __init setup_arch(char **cmdline_p)
init_mm.start_code = PAGE_OFFSET;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = (unsigned long) klimit;
init_mm.brk = klimit;

/* Save unparsed command line copy for /proc/cmdline */
strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ extern void udbg_init_maple_realmode(void);
do { udbg_putc = call_rtas_display_status_delay; } while(0)
#endif

/* extern void *stab; */
extern unsigned long klimit;

extern void mm_init_ppc64(void);
extern void early_init_devtree(void *flat_dt);
extern void unflatten_device_tree(void);
extern void check_for_initrd(void);

int have_of = 1;
int boot_cpuid = 0;
int boot_cpuid_phys = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void register_cpu_online(unsigned int cpu)
sysdev_create_file(s, &attr_pmc7);
if (cur_cpu_spec->num_pmcs >= 8)
sysdev_create_file(s, &attr_pmc8);

if (cpu_has_feature(CPU_FTR_SMT))
sysdev_create_file(s, &attr_purr);
}
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ void MMU_init(void);
/* XXX should be in current.h -- paulus */
extern struct task_struct *current_set[NR_CPUS];

char *klimit = _end;
struct device_node *memory_node;

extern int init_bootmem_done;

/*
Expand Down
20 changes: 14 additions & 6 deletions trunk/arch/powerpc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*
*/

#undef DEBUG

#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
Expand Down Expand Up @@ -64,6 +66,12 @@
#include <asm/vdso.h>
#include <asm/imalloc.h>

#ifdef DEBUG
#define DBG(fmt...) printk(fmt)
#else
#define DBG(fmt...)
#endif

#if PGTABLE_RANGE > USER_VSID_RANGE
#warning Limited user VSID range means pagetable space is wasted
#endif
Expand All @@ -72,8 +80,6 @@
#warning TASK_SIZE is smaller than it needs to be.
#endif

unsigned long klimit = (unsigned long)_end;

/* max amount of RAM to use */
unsigned long __max_memory;

Expand Down Expand Up @@ -188,14 +194,14 @@ static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags)
}

#ifdef CONFIG_PPC_64K_PAGES
static const int pgtable_cache_size[2] = {
PTE_TABLE_SIZE, PGD_TABLE_SIZE
static const unsigned int pgtable_cache_size[3] = {
PTE_TABLE_SIZE, PMD_TABLE_SIZE, PGD_TABLE_SIZE
};
static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
"pte_pmd_cache", "pgd_cache",
"pte_pmd_cache", "pmd_cache", "pgd_cache",
};
#else
static const int pgtable_cache_size[2] = {
static const unsigned int pgtable_cache_size[2] = {
PTE_TABLE_SIZE, PMD_TABLE_SIZE
};
static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
Expand All @@ -213,6 +219,8 @@ void pgtable_cache_init(void)
int size = pgtable_cache_size[i];
const char *name = pgtable_cache_name[i];

DBG("Allocating page table cache %s (#%d) "
"for size: %08x...\n", name, i, size);
pgtable_cache[i] = kmem_cache_create(name,
size, size,
SLAB_HWCACHE_ALIGN |
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/iseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/iommu.h>
#include <asm/firmware.h>
#include <asm/systemcfg.h>

#include <asm/system.h>
#include <asm/time.h>
#include <asm/paca.h>
#include <asm/cache.h>
Expand Down Expand Up @@ -85,7 +85,6 @@ static void iSeries_pci_final_fixup(void) { }
int piranha_simulator;

extern int rd_size; /* Defined in drivers/block/rd.c */
extern unsigned long klimit;
extern unsigned long embedded_sysmap_start;
extern unsigned long embedded_sysmap_end;

Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/platforms/maple/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ void __init maple_pcibios_fixup(void)
for_each_pci_dev(dev)
pci_read_irq_line(dev);

/* Do the mapping of the IO space */
phbs_remap_io();

DBG(" <- maple_pcibios_fixup\n");
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/platforms/powermac/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,9 +918,6 @@ void __init pmac_pci_init(void)
PCI_DN(np)->busno = 0xf0;
}

/* map in PCI I/O space */
phbs_remap_io();

/* pmac_check_ht_link(); */

/* Tell pci.c to not use the common resource allocation mechanism */
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/pseries/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ static void __init pSeries_request_regions(void)

void __init pSeries_final_fixup(void)
{
phbs_remap_io();
pSeries_request_regions();

pci_addr_cache_build();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/u3_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void iommu_table_u3_setup(void)
iommu_table_u3.it_busno = 0;
iommu_table_u3.it_offset = 0;
/* it_size is in number of entries */
iommu_table_u3.it_size = dart_tablesize / sizeof(u32);
iommu_table_u3.it_size = (dart_tablesize / sizeof(u32)) >> DART_PAGE_FACTOR;

/* Initialize the common IOMMU code */
iommu_table_u3.it_base = (unsigned long)dart_vbase;
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/ppc64/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ obj-y += idle.o dma.o \
align.o \
udbg.o \
rtc.o \
iommu.o sysfs.o vdso.o
iommu.o vdso.o
obj-y += vdso32/ vdso64/

pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
Expand All @@ -30,13 +30,10 @@ endif
obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o

obj-$(CONFIG_KEXEC) += machine_kexec.o
obj-$(CONFIG_PROC_FS) += proc_ppc64.o
obj-$(CONFIG_MODULES) += module.o
ifneq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_MODULES) += ppc_ksyms.o
endif
obj-$(CONFIG_PPC_RTAS) += rtas_pci.o
obj-$(CONFIG_LPARCFG) += lparcfg.o
obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o
ifneq ($(CONFIG_PPC_MERGE),y)
obj-$(CONFIG_BOOTX_TEXT) += btext.o
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/ppc64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ static int __init pcibios_init(void)
if (ppc64_isabridge_dev != NULL)
printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));

/* map in PCI I/O space */
phbs_remap_io();

printk("PCI: Probing PCI hardware done\n");

return 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _PPC64_HVCALL_H
#define _PPC64_HVCALL_H
#ifndef _ASM_POWERPC_HVCALL_H
#define _ASM_POWERPC_HVCALL_H

#define HVSC .long 0x44000022

Expand Down Expand Up @@ -138,7 +138,7 @@ long plpar_hcall(unsigned long opcode,
*/
long plpar_hcall_norets(unsigned long opcode, ...);

/*
/*
* Special hcall interface for ibmveth support.
* Takes 8 input parms. Returns a rc and stores the
* R4 return value in *out1.
Expand All @@ -153,11 +153,11 @@ long plpar_hcall_8arg_2ret(unsigned long opcode,
unsigned long arg7,
unsigned long arg8,
unsigned long *out1);

/* plpar_hcall_4out()
*
* same as plpar_hcall except with 4 output arguments.
*
* same as plpar_hcall except with 4 output arguments.
*
*/
long plpar_hcall_4out(unsigned long opcode,
unsigned long arg1,
Expand All @@ -170,4 +170,4 @@ long plpar_hcall_4out(unsigned long opcode,
unsigned long *out4);

#endif /* __ASSEMBLY__ */
#endif /* _PPC64_HVCALL_H */
#endif /* _ASM_POWERPC_HVCALL_H */
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ extern struct task_struct *_switch(struct thread_struct *prev,
extern unsigned int rtas_data;
extern int mem_init_done; /* set on boot once kmalloc can be called */
extern unsigned long memory_limit;
extern unsigned long klimit;

extern int powersave_nap; /* set if nap mode can be used in idle loop */

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-ppc64/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ extern void htab_initialize_secondary(void);
extern void hpte_init_native(void);
extern void hpte_init_lpar(void);
extern void hpte_init_iSeries(void);
extern void mm_init_ppc64(void);

extern long pSeries_lpar_hpte_insert(unsigned long hpte_group,
unsigned long va, unsigned long prpn,
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-ppc64/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ extern kmem_cache_t *pgtable_cache[];

#ifdef CONFIG_PPC_64K_PAGES
#define PTE_CACHE_NUM 0
#define PMD_CACHE_NUM 0
#define PGD_CACHE_NUM 1
#define PMD_CACHE_NUM 1
#define PGD_CACHE_NUM 2
#else
#define PTE_CACHE_NUM 0
#define PMD_CACHE_NUM 1
Expand Down

0 comments on commit 9fe0361

Please sign in to comment.