diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | Makefile.main | 9 | ||||
-rw-r--r-- | hw/slw.c | 25 | ||||
-rw-r--r-- | libpore/Makefile.inc | 2 |
4 files changed, 2 insertions, 39 deletions
@@ -21,11 +21,6 @@ endif DEBUG ?= 0 # -# Set to enable SLW bits -# -PORE ?= 1 - -# # Optional location of embedded linux kernel file # This can be a raw vmlinux, stripped vmlinux or # zImage.epapr diff --git a/Makefile.main b/Makefile.main index 5494131..65eacb1 100644 --- a/Makefile.main +++ b/Makefile.main @@ -53,9 +53,7 @@ DBG=-g CPPFLAGS := -I$(SRC)/include -Iinclude -MMD -include $(SRC)/include/config.h CPPFLAGS += -I$(SRC)/libfdt -I$(SRC)/libflash -I$(SRC)/libc/include -I$(SRC) -ifeq ($(PORE),1) -CPPFLAGS += -I$(SRC)/libpore -D__HAVE_LIBPORE__ -endif +CPPFLAGS += -I$(SRC)/libpore CPPFLAGS += -D__SKIBOOT__ -nostdinc CPPFLAGS += -isystem $(shell $(CC) -print-file-name=include) CPPFLAGS += -DBITS_PER_LONG=64 -DHAVE_BIG_ENDIAN @@ -193,10 +191,7 @@ all: $(SUBDIRS) $(TARGET).lid $(TARGET).lid.xz $(TARGET).map extract-gcov all: $(TARGET).lid.stb $(TARGET).lid.xz.stb OBJS := $(ASM) $(CORE) $(HW) $(PLATFORMS) $(LIBFDT) $(LIBFLASH) $(LIBSTB) -ifeq ($(PORE),1) -OBJS += $(LIBPORE) -endif -OBJS += $(LIBC) $(CCAN) $(DEVSRC_OBJ) +OBJS += $(LIBC) $(CCAN) $(DEVSRC_OBJ) $(LIBPORE) OBJS_NO_VER = $(OBJS) ALL_OBJS = $(OBJS) version.o @@ -30,7 +30,6 @@ #include <libfdt/libfdt.h> #include <opal-api.h> -#ifdef __HAVE_LIBPORE__ #include <p8_pore_table_gen_api.H> #include <sbe_xip_image.h> @@ -39,7 +38,6 @@ static uint32_t slw_saved_reset[MAX_RESET_PATCH_SIZE]; static bool slw_current_le = false; -#endif /* __HAVE_LIBPORE__ */ /* SLW timer related stuff */ static bool slw_has_timer; @@ -65,7 +63,6 @@ DEFINE_LOG_ENTRY(OPAL_RC_SLW_REG, OPAL_PLATFORM_ERR_EVT, OPAL_SLW, OPAL_PLATFORM_FIRMWARE, OPAL_INFO, OPAL_NA); -#ifdef __HAVE_LIBPORE__ static void slw_do_rvwinkle(void *data) { struct cpu_thread *cpu = this_cpu(); @@ -185,7 +182,6 @@ static void slw_unpatch_reset(void) } sync_icache(); } -#endif /* __HAVE_LIBPORE__ */ static bool slw_general_init(struct proc_chip *chip, struct cpu_thread *c) { @@ -320,7 +316,6 @@ static bool slw_set_overrides_p9(struct proc_chip *chip, struct cpu_thread *c) return true; } -#ifdef __HAVE_LIBPORE__ static bool slw_unset_overrides(struct proc_chip *chip, struct cpu_thread *c) { uint32_t core = pir_to_core_id(c->pir); @@ -329,7 +324,6 @@ static bool slw_unset_overrides(struct proc_chip *chip, struct cpu_thread *c) prlog(PR_DEBUG, "SLW: slw_unset_overrides %x:%x\n", chip->id, core); return true; } -#endif /* __HAVE_LIBPORE__ */ static bool slw_set_idle_mode(struct proc_chip *chip, struct cpu_thread *c) { @@ -927,7 +921,6 @@ void add_cpu_idle_state_properties(void) free(pm_ctrl_reg_mask_buf); } -#ifdef __HAVE_LIBPORE__ static void slw_cleanup_core(struct proc_chip *chip, struct cpu_thread *c) { uint64_t tmp; @@ -1006,18 +999,7 @@ static void slw_patch_scans(struct proc_chip *chip, bool le_mode) return; } } -#else -static inline void slw_patch_scans(struct proc_chip *chip __unused, - bool le_mode __unused ) { } -#endif /* __HAVE_LIBPORE__ */ -#ifndef __HAVE_LIBPORE__ -int64_t __attrconst slw_reinit(uint64_t flags) -{ - (void)flags; - return OPAL_UNSUPPORTED; -} -#else int64_t slw_reinit(uint64_t flags) { struct proc_chip *chip; @@ -1132,9 +1114,7 @@ int64_t slw_reinit(uint64_t flags) return OPAL_SUCCESS; } -#endif /* __HAVE_LIBPORE__ */ -#ifdef __HAVE_LIBPORE__ static void slw_patch_regs(struct proc_chip *chip) { struct cpu_thread *c; @@ -1159,7 +1139,6 @@ static void slw_patch_regs(struct proc_chip *chip) /* XXX Add HIDs etc... */ } } -#endif /* __HAVE_LIBPORE__ */ static void slw_init_chip_p9(struct proc_chip *chip) { @@ -1183,7 +1162,6 @@ static void slw_init_chip(struct proc_chip *chip) return; } -#ifdef __HAVE_LIBPORE__ /* Check actual image size */ rc = sbe_xip_get_scalar((void *)chip->slw_base, "image_size", &chip->slw_image_size); @@ -1207,7 +1185,6 @@ static void slw_init_chip(struct proc_chip *chip) /* Patch SLW image */ slw_patch_regs(chip); -#endif /* __HAVE_LIBPORE__ */ /* At power ON setup inits for fast-sleep */ for_each_available_core_in_chip(c, chip->id) { @@ -1310,7 +1287,6 @@ static int64_t opal_config_cpu_idle_state(uint64_t state, uint64_t enter) opal_call(OPAL_CONFIG_CPU_IDLE_STATE, opal_config_cpu_idle_state, 2); -#ifdef __HAVE_LIBPORE__ int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val) { @@ -1356,7 +1332,6 @@ int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val) } opal_call(OPAL_SLW_SET_REG, opal_slw_set_reg, 3); -#endif /* __HAVE_LIBPORE__ */ static void slw_dump_timer_ffdc(void) { diff --git a/libpore/Makefile.inc b/libpore/Makefile.inc index 02b5837..2eac595 100644 --- a/libpore/Makefile.inc +++ b/libpore/Makefile.inc @@ -1,9 +1,7 @@ -ifeq ($(PORE),1) LIBPORE_SRCS = p8_pore_table_gen_api_fixed.C LIBPORE_SRCS += p8_pore_table_static_data.c sbe_xip_image.c pore_inline_assembler.c LIBPORE_OBJS_1 = $(LIBPORE_SRCS:%.c=%.o) LIBPORE_OBJS = $(LIBPORE_OBJS_1:%.C=%.o) -endif SUBDIRS += libpore LIBPORE = libpore/built-in.o |