Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b80b11c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
parents b0b7b8ea 271c3f35
Loading
Loading
Loading
Loading
+3 −8
Original line number Original line Diff line number Diff line
@@ -581,17 +581,12 @@ config ARCH_FLATMEM_ENABLE
       def_bool y
       def_bool y
       depends on PPC64 && !NUMA
       depends on PPC64 && !NUMA


config ARCH_DISCONTIGMEM_ENABLE
config ARCH_SPARSEMEM_ENABLE
	def_bool y
	depends on SMP && PPC_PSERIES

config ARCH_DISCONTIGMEM_DEFAULT
	def_bool y
	def_bool y
	depends on ARCH_DISCONTIGMEM_ENABLE


config ARCH_SPARSEMEM_ENABLE
config ARCH_SPARSEMEM_DEFAULT
	def_bool y
	def_bool y
	depends on ARCH_DISCONTIGMEM_ENABLE
	depends on SMP && PPC_PSERIES


source "mm/Kconfig"
source "mm/Kconfig"


+8 −2
Original line number Original line Diff line number Diff line
@@ -12,11 +12,13 @@ CFLAGS_btext.o += -fPIC
endif
endif


obj-y				:= semaphore.o cputable.o ptrace.o syscalls.o \
obj-y				:= semaphore.o cputable.o ptrace.o syscalls.o \
				   irq.o signal_32.o pmc.o
				   irq.o signal_32.o pmc.o vdso.o
obj-y				+= vdso32/
obj-$(CONFIG_PPC64)		+= setup_64.o binfmt_elf32.o sys_ppc32.o \
obj-$(CONFIG_PPC64)		+= setup_64.o binfmt_elf32.o sys_ppc32.o \
				   signal_64.o ptrace32.o systbl.o \
				   signal_64.o ptrace32.o systbl.o \
				   paca.o ioctl32.o cpu_setup_power4.o \
				   paca.o ioctl32.o cpu_setup_power4.o \
				   firmware.o sysfs.o
				   firmware.o sysfs.o udbg.o
obj-$(CONFIG_PPC64)		+= vdso64/
obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
obj-$(CONFIG_POWER4)		+= idle_power4.o
obj-$(CONFIG_POWER4)		+= idle_power4.o
obj-$(CONFIG_PPC_OF)		+= of_device.o
obj-$(CONFIG_PPC_OF)		+= of_device.o
@@ -29,6 +31,10 @@ obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
obj-$(CONFIG_LPARCFG)		+= lparcfg.o
obj-$(CONFIG_LPARCFG)		+= lparcfg.o
obj-$(CONFIG_IBMVIO)		+= vio.o
obj-$(CONFIG_IBMVIO)		+= vio.o
obj-$(CONFIG_GENERIC_TBSYNC)	+= smp-tbsync.o
obj-$(CONFIG_GENERIC_TBSYNC)	+= smp-tbsync.o
obj-$(CONFIG_PPC_PSERIES)	+= udbg_16550.o
obj-$(CONFIG_PPC_MAPLE)		+= udbg_16550.o
udbgscc-$(CONFIG_PPC64)		:= udbg_scc.o
obj-$(CONFIG_PPC_PMAC)		+= $(udbgscc-y)


ifeq ($(CONFIG_PPC_MERGE),y)
ifeq ($(CONFIG_PPC_MERGE),y)


+31 −14
Original line number Original line Diff line number Diff line
@@ -37,12 +37,12 @@
#include <asm/cputable.h>
#include <asm/cputable.h>
#include <asm/thread_info.h>
#include <asm/thread_info.h>
#include <asm/rtas.h>
#include <asm/rtas.h>
#include <asm/vdso_datapage.h>
#ifdef CONFIG_PPC64
#ifdef CONFIG_PPC64
#include <asm/paca.h>
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/lppaca.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/cache.h>
#include <asm/cache.h>
#include <asm/systemcfg.h>
#include <asm/compat.h>
#include <asm/compat.h>
#endif
#endif


@@ -251,25 +251,42 @@ int main(void)


	DEFINE(TASK_SIZE, TASK_SIZE);
	DEFINE(TASK_SIZE, TASK_SIZE);
	DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
	DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
#else /* CONFIG_PPC64 */
#endif /* ! CONFIG_PPC64 */
	/* systemcfg offsets for use by vdso */
	DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct systemcfg, tb_orig_stamp));
	DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct systemcfg, tb_ticks_per_sec));
	DEFINE(CFG_TB_TO_XS, offsetof(struct systemcfg, tb_to_xs));
	DEFINE(CFG_STAMP_XSEC, offsetof(struct systemcfg, stamp_xsec));
	DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct systemcfg, tb_update_count));
	DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct systemcfg, tz_minuteswest));
	DEFINE(CFG_TZ_DSTTIME, offsetof(struct systemcfg, tz_dsttime));
	DEFINE(CFG_SYSCALL_MAP32, offsetof(struct systemcfg, syscall_map_32));
	DEFINE(CFG_SYSCALL_MAP64, offsetof(struct systemcfg, syscall_map_64));


	/* timeval/timezone offsets for use by vdso */
	/* datapage offsets for use by vdso */
	DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
	DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
	DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
	DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
	DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
	DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
	DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
	DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
	DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
	DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
#ifdef CONFIG_PPC64
	DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64));
	DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec));
	DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec));
	DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec));
	DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec));
	DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec));
	DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec));
	DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec));
	DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec));
	DEFINE(TSPC32_TV_SEC, offsetof(struct compat_timespec, tv_sec));
	DEFINE(TSPC32_TV_NSEC, offsetof(struct compat_timespec, tv_nsec));
#else
	DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
	DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
	DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
	DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
#endif
	/* timeval/timezone offsets for use by vdso */
	DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
	DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
	DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
	DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
#endif /* CONFIG_PPC64 */

	/* Other bits used by the vdso */
	DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
	DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
	DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
	DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);

	return 0;
	return 0;
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -1100,6 +1100,7 @@ start_here:
	mr	r3,r31
	mr	r3,r31
	mr	r4,r30
	mr	r4,r30
	bl	machine_init
	bl	machine_init
	bl	__save_cpu_setup
	bl	MMU_init
	bl	MMU_init


#ifdef CONFIG_APUS
#ifdef CONFIG_APUS
+10 −13
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@
#include <asm/time.h>
#include <asm/time.h>
#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/prom.h>
#include <asm/prom.h>
#include <asm/systemcfg.h>
#include <asm/vdso_datapage.h>


#define MODULE_VERS "1.6"
#define MODULE_VERS "1.6"
#define MODULE_NAME "lparcfg"
#define MODULE_NAME "lparcfg"
@@ -43,7 +43,7 @@
/* #define LPARCFG_DEBUG */
/* #define LPARCFG_DEBUG */


/* find a better place for this function... */
/* find a better place for this function... */
void log_plpar_hcall_return(unsigned long rc, char *tag)
static void log_plpar_hcall_return(unsigned long rc, char *tag)
{
{
	if (rc == 0)		/* success, return */
	if (rc == 0)		/* success, return */
		return;
		return;
@@ -213,11 +213,10 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
	unsigned long dummy;
	unsigned long dummy;
	rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
	rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);


	if (rc != H_Authority)
		log_plpar_hcall_return(rc, "H_PIC");
		log_plpar_hcall_return(rc, "H_PIC");
}
}


static unsigned long get_purr(void);

/* Track sum of all purrs across all processors. This is used to further */
/* Track sum of all purrs across all processors. This is used to further */
/* calculate usage values by different applications                       */
/* calculate usage values by different applications                       */


@@ -319,8 +318,6 @@ static void parse_system_parameter_string(struct seq_file *m)
	kfree(local_buffer);
	kfree(local_buffer);
}
}


static int lparcfg_count_active_processors(void);

/* Return the number of processors in the system.
/* Return the number of processors in the system.
 * This function reads through the device tree and counts
 * This function reads through the device tree and counts
 * the virtual processors, this does not include threads.
 * the virtual processors, this does not include threads.
@@ -372,7 +369,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
	lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);
	lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);


	if (lrdrp == NULL) {
	if (lrdrp == NULL) {
		partition_potential_processors = _systemcfg->processorCount;
		partition_potential_processors = vdso_data->processorCount;
	} else {
	} else {
		partition_potential_processors = *(lrdrp + 4);
		partition_potential_processors = *(lrdrp + 4);
	}
	}
Loading