diff -Nru powerpc-ibm-utils-1.2.19/Changelog powerpc-ibm-utils-1.2.20/Changelog --- powerpc-ibm-utils-1.2.19/Changelog 2014-03-03 19:25:21.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/Changelog 2014-03-21 20:23:54.000000000 +0000 @@ -1,3 +1,215 @@ +powerpc-utils-1.2.20 +===================================================================== +commit 73c454bea39418872313cd960d005d4d20262f20 +Author: Aruna Balakrishnaiah +Date: Fri Mar 21 09:23:51 2014 -0500 + + powepcutils: Fix platform dependency + + Network interfaces can have prefix other than eth. Look for + all the interfaces in /sys/class/net. + + Signed-off-by: Aruna Balakrishnaiah + Signed-off-by: Nathan Fontenot + Reviewed-by: Vasant Hegde + +commit 3bf75d1fe9f1fbc24c34287b2fc50aae841ca2ca +Author: Aruna Balakrishnaiah +Date: Fri Mar 21 09:16:08 2014 -0500 + + ofpathname: Convert OF format to logical device for ethernet devices + + Network interfaces can have prefix other than eth. Look for + all the interfaces in /sys/class/net. + + Signed-off-by: Aruna Balakrishnaiah + +commit 1e45fb89513b4f474308ac1684c378e67198a55f +Author: Aruna Balakrishnaiah +Date: Fri Mar 21 09:14:46 2014 -0500 + + ofpathname: Convert logical path to OF device path for ethernet devices + + Network interface need not have name starting with eth. Check if + the device is a network interface and convert the logical + name to OF path. + + Signed-off-by: Aruna Balakrishnaiah + +commit ae566f77c7a176079ef868f52d5873096aa98655 +Author: Aruna Balakrishnaiah +Date: Fri Mar 21 09:13:10 2014 -0500 + + ofpathname: Convert OF format to logical device for virtual devices + + Add support to convert a Open Firmware device path to logical + device path for virtio block device. + + Signed-off-by: Aruna Balakrishnaiah + Acked-by: Vasant Hegde + +commit a2f49f551bb34023ab1052f92f8c06541e6f3474 +Author: Aruna Balakrishnaiah +Date: Fri Mar 21 09:10:38 2014 -0500 + + snap: Fix misplaced if block + + Signed-off-by: Aruna Balakrishnaiah + Acked-by: Vasant Hegde + +commit 7802242d9cadb475bbbae323c34bd177930dd52d +Author: Nathan Fontenot +Date: Fri Mar 21 09:08:19 2014 -0500 + + ofpathname: Enable non-pseries platforms + + There are some non-pseries platforms that can (and do) use + the ofpathname script. This patch updates pseries_platform + check in ofpathname to allow for unknown platforms. + + Signed-off-by: Nathan Fontenot + Reviewed-by: Aruna Balakrishnaiah + +commit 74620d997eda9a8977a8132e06f30da3d46467c7 +Author: Vasant Hegde +Date: Fri Mar 21 09:06:21 2014 -0500 + + ofpathname: Convert virtio block device to OF device path + + Add the ability to convert a logical device path for + a virtio block device to its Open Firmware device path. + + Signed-off-by: Vasant Hegde + +commit d3f442a8b3ac776395d03eb396a2bfc0ea95f0ba +Author: Jeremy Kerr +Date: Wed Mar 12 09:20:54 2014 -0500 + + automake: Add subdir-objects automake option + + Current git builds fail for me, with: + + configure.ac:13: installing 'build-aux/compile' + automake: warnings are treated as errors + src/Makefile.am:8: warning: source file 'common/pseries_platform.c' is in +a subdirectory, + src/Makefile.am:8: but option 'subdir-objects' is disabled + automake: warning: possible forward-incompatibility. + automake: At least a source file is in a subdirectory, but the 'subdir-obj +ects' + automake: automake option hasn't been enabled. For now, the corresponding + output + automake: object file(s) will be placed in the top-level directory. Howev +er, + automake: this behaviour will change in future Automake versions: they wil +l + automake: unconditionally cause object files to be placed in the same subd +irectory + automake: of the corresponding sources. + automake: You are advised to start using 'subdir-objects' option throughou +t your + automake: project, to avoid future incompatibilities. + src/drmgr/Makefile.am:9: warning: source file '$(COM_DIR)/pseries_platform +.c' is in a subdirectory, + src/drmgr/Makefile.am:9: but option 'subdir-objects' is disabled + autoreconf: automake failed with exit status: 1 + + Using: + + automake (GNU automake) 1.14.1 + + Since we're using objects in subdirectories, we need the subdir-objects + atuomake option. + + Signed-off-by: Jeremy Kerr + + This commit also contains the updates from running autoreconf with this patc +h. + +commit 8283cf470d0de18549443202c9fbabc742aa1975 +Author: Greg Kurz +Date: Wed Mar 12 09:11:49 2014 -0500 + + drmgr: endian fixes for ibm,configure-connector + + The ibm,configure-connector RTAS call is supposed to be called several + times to do its job. It needs a work area to hold data between + subsequent calls. Among these data, there are integer values that + must be in big endian order when passed to RTAS. + + A buffer is setup by drmgr and passed to the rtas_cfg_connector() call + in librtas for this purpose. The rtas_cfg_connector() call manipulates + the work area as simple pointer to a char buffer and makes no assumptions + about its content. It is hence not convenient to ask librtas to fix the + endianness of the work area. + + Since the work area is entirely exposed in the drmgr code, it is far + easier and straightforward to handle endianess there. This patch + enforce the work area to be big endian, always, and drmgr to byteswap + when needed. + + Signed-off-by: Greg Kurz + +commit 360eaf780748eb820ad97992db49f16962cbabf9 +Author: Joel Stanley +Date: Wed Mar 12 08:43:48 2014 -0500 + + ppc64_cpu: bump internal version + + Bump the internal version so users know that have fixed subcore support. + + Signed-off-by: Joel Stanley + +commit 4a2451399e3719d520f052d5180c72b2844ed902 +Author: Brian King +Date: Wed Mar 12 08:40:44 2014 -0500 + + ofpathname: Fix OF to logical VFC lookup for non zero LUNs + + This patch fixes OF path to logical device name translation + for VFC devices with a non zero LUN when it has leading zeroes. + + Signed-off-by: Brian King + +commit 2f6c718ac7fdfa9757a8e446199d57f2648ac8e7 +Author: Aruna Balakrishnaiah +Date: Wed Mar 12 08:38:34 2014 -0500 + + snap: Fix call traces seen while capturing lparcfg and rtas files + + As the lparcfg and rtas procfs files are not populated properly by the + kernel on the PowerKVM guest do not capture it. + + Signed-off-by: Aruna Balakrishnaiah + +commit 05b14ae4cd87642c08a72c3c0a8bc2bb6a1b8d0b +Author: Nathan Fontenot +Date: Wed Mar 12 08:16:45 2014 -0500 + + lsslot: Correct the return code when no DR slots found + + The lsslot command exits with a return code of 1 when there + are not any DR slots found. We should not consider it an error + that no DR capable slots are found. + + This patch updates lsslot to exit with zero if no DR capable + slots are found. + + Signed-off-by: Nathan Fontenot + +commit 500763c1058664b147523e68f4e046ecd5fa572c +Author: Nathan Fontenot +Date: Wed Mar 12 08:13:38 2014 -0500 + + drmgr: Correct parsing of -s option + + The -s option can be used to specify a drc name or a drc index in + some cases. We need to leave the parsing of this value to the + individual commands in drmgr instead of always assuming that + strings starting with "0x" should be parsed into ints. + + Signed-off-by: Nathan Fontenot + powerpc-utils-1.2.19 ===================================================================== diff -Nru powerpc-ibm-utils-1.2.19/configure powerpc-ibm-utils-1.2.20/configure --- powerpc-ibm-utils-1.2.19/configure 2014-03-03 19:41:08.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/configure 2014-03-21 20:24:03.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for powerpc-utils 1.2.19. +# Generated by GNU Autoconf 2.63 for powerpc-utils 1.2.20. # # Report bugs to . # @@ -596,8 +596,8 @@ # Identity of this package. PACKAGE_NAME='powerpc-utils' PACKAGE_TARNAME='powerpc-utils' -PACKAGE_VERSION='1.2.19' -PACKAGE_STRING='powerpc-utils 1.2.19' +PACKAGE_VERSION='1.2.20' +PACKAGE_STRING='powerpc-utils 1.2.20' PACKAGE_BUGREPORT='nfont@linux.vnet.ibm.com' ac_unique_file="src/rtas_ibm_get_vpd.c" @@ -1289,7 +1289,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures powerpc-utils 1.2.19 to adapt to many kinds of systems. +\`configure' configures powerpc-utils 1.2.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1355,7 +1355,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of powerpc-utils 1.2.19:";; + short | recursive ) echo "Configuration of powerpc-utils 1.2.20:";; esac cat <<\_ACEOF @@ -1447,7 +1447,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -powerpc-utils configure 1.2.19 +powerpc-utils configure 1.2.20 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1461,7 +1461,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by powerpc-utils $as_me 1.2.19, which was +It was created by powerpc-utils $as_me 1.2.20, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2180,7 +2180,7 @@ # Define the identity of the package. PACKAGE='powerpc-utils' - VERSION='1.2.19' + VERSION='1.2.20' cat >>confdefs.h <<_ACEOF @@ -6844,7 +6844,7 @@ echo "Configuring powerpc-utils.spec" -sed "s|\@VERSION\@|1.2.19|g" powerpc-utils.spec.in > powerpc-utils.spec +sed "s|\@VERSION\@|1.2.20|g" powerpc-utils.spec.in > powerpc-utils.spec ac_config_files="$ac_config_files Makefile src/Makefile src/drmgr/Makefile scripts/Makefile man/Makefile" @@ -7324,7 +7324,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by powerpc-utils $as_me 1.2.19, which was +This file was extended by powerpc-utils $as_me 1.2.20, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7378,7 +7378,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -powerpc-utils config.status 1.2.19 +powerpc-utils config.status 1.2.20 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -Nru powerpc-ibm-utils-1.2.19/configure.ac powerpc-ibm-utils-1.2.20/configure.ac --- powerpc-ibm-utils-1.2.19/configure.ac 2014-03-03 19:37:53.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/configure.ac 2014-03-21 20:19:29.000000000 +0000 @@ -1,6 +1,6 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -m4_define([ppu_version], 1.2.19) +m4_define([ppu_version], 1.2.20) AC_PREREQ([2.63]) AC_INIT([powerpc-utils], ppu_version, [nfont@linux.vnet.ibm.com]) diff -Nru powerpc-ibm-utils-1.2.19/debian/changelog powerpc-ibm-utils-1.2.20/debian/changelog --- powerpc-ibm-utils-1.2.19/debian/changelog 2014-03-12 21:25:32.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/debian/changelog 2014-03-23 18:05:32.000000000 +0000 @@ -1,3 +1,12 @@ +powerpc-ibm-utils (1.2.20-1) unstable; urgency=medium + + * QA Upload. + * New upstream release, with ofpathname and lsslot fixes. + * ofpathname should work on all platforms now (closes: #611588), + though still doesn't handle appending partition info (#405337) + + -- Adam Conrad Sun, 23 Mar 2014 11:13:24 -0600 + powerpc-ibm-utils (1.2.19-1) unstable; urgency=medium * QA Upload. diff -Nru powerpc-ibm-utils-1.2.19/Makefile.am powerpc-ibm-utils-1.2.20/Makefile.am --- powerpc-ibm-utils-1.2.19/Makefile.am 2013-09-10 15:43:59.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/Makefile.am 2014-03-12 14:14:43.000000000 +0000 @@ -1,4 +1,4 @@ -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign subdir-objects SUBDIRS = src man scripts docdir = $(datadir)/doc/packages/@PACKAGE@ diff -Nru powerpc-ibm-utils-1.2.19/Makefile.in powerpc-ibm-utils-1.2.20/Makefile.in --- powerpc-ibm-utils-1.2.19/Makefile.in 2014-03-03 19:41:07.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/Makefile.in 2014-03-21 20:24:03.000000000 +0000 @@ -161,7 +161,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign subdir-objects SUBDIRS = src man scripts doc_DATA = README COPYRIGHT EXTRA_DIST = COPYRIGHT Changelog powerpc-utils.spec.in doc/activate_firmware.doxycfg \ diff -Nru powerpc-ibm-utils-1.2.19/scripts/ofpathname powerpc-ibm-utils-1.2.20/scripts/ofpathname --- powerpc-ibm-utils-1.2.19/scripts/ofpathname 2014-02-24 17:27:41.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/scripts/ofpathname 2014-03-21 14:15:44.000000000 +0000 @@ -90,6 +90,18 @@ exit 1 } +# is_hbtl +# return true if the link is in HBTL (Host:Bus:Target ID:LUN) format +is_hbtl() +{ + local ln_name=$1; + local tmp="${ln_name//[^:]}" + if [[ ${#tmp} = 3 ]]; then + echo 1 + else + echo 0 + fi +} # # get_link # return the directory path that a link points to. @@ -300,6 +312,22 @@ } # +# is_net_interface +# Check to see if this is a network interface +# +is_net_interface() +{ + local res + + res=`$FIND /sys/class/net -name $1` + if [[ ${#res} = 0 ]]; then + echo "no" + else + echo "yes" + fi +} + +# # logical_to_ofpathname # Conversion for logical device name to an Open Firmware device path # @@ -347,6 +375,11 @@ logical_to_ofpathname exit ;; + *) # check if the device is a network interface + is_net=$(is_net_interface $DEVICE) + if [[ $is_net = "yes" ]]; then + l2of_ethernet + fi ;; esac if [[ -z $OF_PATH ]]; then @@ -412,7 +445,22 @@ # l2of_vd() { - cd /sys/block/$DEVICE + local found=0 + + # There may be many instances of DEVICE under /sys + for dir in `$FIND /sys -name $DEVICE`; do + # Move up until we find one with a device link + goto_dir $dir "device" 0 + if [ $? -eq 0 ]; then + found=1; + break; + fi + done; + + if [ $found -eq 0 ]; then + err $ERR_NOT_CONFIG + fi + local link=`get_link "device"` if [[ -z $link ]]; then err $ERR_NO_SYSFS_DEVINFO @@ -739,7 +787,7 @@ fi case $DEVTYPE in - sd* ) of2l_scsi ;; + sd* | scsi* ) of2l_scsi ;; sas ) of2l_sas ;; vfc ) of2l_vfc ;; fc ) of2l_fc ;; @@ -807,9 +855,10 @@ # strip off ip info if present local devname=${DEVNAME%%:*} + local netdir="/sys/class/net" - for dir in `$FIND /sys/class/net -name 'eth*'`; do - local devdir=`find_dir $dir device` + for dir in `ls $netdir`; do + local devdir=`find_dir $netdir/$dir device` if [[ -z $devdir ]]; then continue fi @@ -909,7 +958,7 @@ DEV_LUN=${DEV_LUN%%:*} local dir - for dir in `$FIND /sys/block -name 's[dr]*'`; do + for dir in `$FIND /sys/block -name '[sv][dr]*'`; do # go up to find directory with 'device' link local devdir=`find_dir $dir device` if [[ -z $devdir ]]; then @@ -923,16 +972,26 @@ err $ERR_NO_SYSFS_DEVINFO fi - get_hbtl $link + local hbtl=`is_hbtl $link` + # Do not call get_hbtl for virtio block devices + if [[ $hbtl = 1 ]]; then + get_hbtl $link + fi cd $link # save the name of the current directory, we may need it later... local device_dir=${PWD##/*/} - if [[ $ID = $DEV_TARGET && $LUN = $DEV_LUN ]]; then + if [[ !$hbtl || ($ID = $DEV_TARGET && $LUN = $DEV_LUN) ]]; then goto_dir $PWD "devspec" local devspec=`$CAT ./devspec 2>/dev/null` + # Handle virtio block devices + if [[ !$hbtl && $devspec = $DEVNAME ]]; then + LOGICAL_DEVNAME="${dir##*/}" + return + fi + if [[ $devspec = $DEVPATH ]]; then LOGICAL_DEVNAME="${dir##*/}" return @@ -1110,6 +1169,7 @@ OF_WWPN=${DEV_ID%%,*} OF_LUN=${DEV_ID##$OF_WWPN} OF_LUN=${OF_LUN#,} + OF_LUN=`echo $OF_LUN | sed 's/^[0]*//'` local dir for dir in `$FIND /sys/block -name 's[dr]*'`; do @@ -1225,11 +1285,10 @@ # Main # . $PSERIES_PLATFORM -case "$platform" in - $PLATFORM_UNKNOWN | $PLATFORM_POWERKVM_HOST) - echo "$OFPATHNAME: is not supported on the $platform_name platform" - exit 1 ;; -esac +if [[ $platform = $PLATFORM_POWERKVM_HOST ]]; then + echo "$OFPATHNAME: is not supported on the $platform_name platform" + exit 1 +fi if [[ "$#" -eq 0 ]]; then usage diff -Nru powerpc-ibm-utils-1.2.19/scripts/snap powerpc-ibm-utils-1.2.20/scripts/snap --- powerpc-ibm-utils-1.2.19/scripts/snap 2014-02-24 17:27:41.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/scripts/snap 2014-03-21 14:09:35.000000000 +0000 @@ -254,6 +254,10 @@ my ($file, $dir, $search, @contents); foreach $file (@_) { + # For now do not collect proc ppc64 files for guest. + next if ($file =~ "/proc/ppc64/" && + $ENV{'platform'} == $ENV{'PLATFORM_POWERKVM_GUEST'}); + if (-d $file) { recurse_dir $file; } diff -Nru powerpc-ibm-utils-1.2.19/src/drmgr/drmgr.c powerpc-ibm-utils-1.2.20/src/drmgr/drmgr.c --- powerpc-ibm-utils-1.2.19/src/drmgr/drmgr.c 2014-02-28 18:52:34.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/drmgr/drmgr.c 2014-03-12 13:12:39.000000000 +0000 @@ -216,10 +216,7 @@ action_cnt++; break; case 's': - if(!strncmp(optarg, "0x", 2)) - opts->usr_drc_index = strtoul(optarg, NULL, 16); - else - opts->usr_drc_name = optarg; + opts->usr_drc_name = optarg; break; case 'Q': opts->action = QUERY; diff -Nru powerpc-ibm-utils-1.2.19/src/drmgr/drslot_chrp_pci.c powerpc-ibm-utils-1.2.20/src/drmgr/drslot_chrp_pci.c --- powerpc-ibm-utils-1.2.19/src/drmgr/drslot_chrp_pci.c 2014-02-24 17:50:56.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/drmgr/drslot_chrp_pci.c 2014-03-12 13:12:39.000000000 +0000 @@ -843,6 +843,12 @@ return -1; } + /* The -s option can specify a drc name or drc index */ + if (!strncmp(opts->usr_drc_name, "0x", 2)) { + opts->usr_drc_index = strtoul(opts->usr_drc_name, NULL, 16); + opts->usr_drc_name = NULL; + } + if (opts->usr_drc_name == NULL && !opts->usr_drc_index) { say(ERROR, "A drc name or index must be specified\n"); return -1; diff -Nru powerpc-ibm-utils-1.2.19/src/drmgr/lsslot.c powerpc-ibm-utils-1.2.20/src/drmgr/lsslot.c --- powerpc-ibm-utils-1.2.19/src/drmgr/lsslot.c 2014-02-24 17:34:18.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/drmgr/lsslot.c 2014-03-12 13:16:24.000000000 +0000 @@ -560,7 +560,7 @@ "this system.\n"); else say(ERROR, "There are no DR slots on this system.\n"); - return 1; + return 0; } print_node_list(all_nodes); diff -Nru powerpc-ibm-utils-1.2.19/src/drmgr/Makefile.am powerpc-ibm-utils-1.2.20/src/drmgr/Makefile.am --- powerpc-ibm-utils-1.2.19/src/drmgr/Makefile.am 2014-02-24 17:34:18.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/drmgr/Makefile.am 2014-03-12 14:14:43.000000000 +0000 @@ -1,3 +1,5 @@ +AUTOMAKE_OPTIONS = subdir-objects + COM_DIR = $(top_srcdir)/src/common AM_CFLAGS = -Wall -g -I $(COM_DIR) diff -Nru powerpc-ibm-utils-1.2.19/src/drmgr/Makefile.in powerpc-ibm-utils-1.2.20/src/drmgr/Makefile.in --- powerpc-ibm-utils-1.2.19/src/drmgr/Makefile.in 2014-03-03 19:41:07.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/drmgr/Makefile.in 2014-03-21 20:24:02.000000000 +0000 @@ -42,7 +42,8 @@ am__installdirs = "$(DESTDIR)$(sbindir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am__objects_1 = pseries_platform.$(OBJEXT) +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = $(COM_DIR)/pseries_platform.$(OBJEXT) am_drmgr_OBJECTS = common.$(OBJEXT) common_cpu.$(OBJEXT) \ common_ofdt.$(OBJEXT) common_pci.$(OBJEXT) drmgr.$(OBJEXT) \ drmig_chrp_pmig.$(OBJEXT) drslot_chrp_cpu.$(OBJEXT) \ @@ -155,6 +156,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = subdir-objects COM_DIR = $(top_srcdir)/src/common AM_CFLAGS = -Wall -g -I $(COM_DIR) pseries_platform_SOURCES = $(COM_DIR)/pseries_platform.c $(COM_DIR)/pseries_platform.h @@ -226,6 +228,14 @@ clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) +$(COM_DIR)/$(am__dirstamp): + @$(MKDIR_P) $(COM_DIR) + @: > $(COM_DIR)/$(am__dirstamp) +$(COM_DIR)/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) $(COM_DIR)/$(DEPDIR) + @: > $(COM_DIR)/$(DEPDIR)/$(am__dirstamp) +$(COM_DIR)/pseries_platform.$(OBJEXT): $(COM_DIR)/$(am__dirstamp) \ + $(COM_DIR)/$(DEPDIR)/$(am__dirstamp) drmgr$(EXEEXT): $(drmgr_OBJECTS) $(drmgr_DEPENDENCIES) @rm -f drmgr$(EXEEXT) $(LINK) $(drmgr_OBJECTS) $(drmgr_LDADD) $(LIBS) @@ -235,10 +245,12 @@ mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f $(COM_DIR)/pseries_platform.$(OBJEXT) distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@$(COM_DIR)/$(DEPDIR)/pseries_platform.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common_cpu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common_ofdt.Po@am__quote@ @@ -253,36 +265,23 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drslot_chrp_slot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsslot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsslot_chrp_cpu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pseries_platform.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtas_calls.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -pseries_platform.o: $(COM_DIR)/pseries_platform.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pseries_platform.o -MD -MP -MF $(DEPDIR)/pseries_platform.Tpo -c -o pseries_platform.o `test -f '$(COM_DIR)/pseries_platform.c' || echo '$(srcdir)/'`$(COM_DIR)/pseries_platform.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pseries_platform.Tpo $(DEPDIR)/pseries_platform.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(COM_DIR)/pseries_platform.c' object='pseries_platform.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pseries_platform.o `test -f '$(COM_DIR)/pseries_platform.c' || echo '$(srcdir)/'`$(COM_DIR)/pseries_platform.c - -pseries_platform.obj: $(COM_DIR)/pseries_platform.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pseries_platform.obj -MD -MP -MF $(DEPDIR)/pseries_platform.Tpo -c -o pseries_platform.obj `if test -f '$(COM_DIR)/pseries_platform.c'; then $(CYGPATH_W) '$(COM_DIR)/pseries_platform.c'; else $(CYGPATH_W) '$(srcdir)/$(COM_DIR)/pseries_platform.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pseries_platform.Tpo $(DEPDIR)/pseries_platform.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(COM_DIR)/pseries_platform.c' object='pseries_platform.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pseries_platform.obj `if test -f '$(COM_DIR)/pseries_platform.c'; then $(CYGPATH_W) '$(COM_DIR)/pseries_platform.c'; else $(CYGPATH_W) '$(srcdir)/$(COM_DIR)/pseries_platform.c'; fi` +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -384,6 +383,8 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(COM_DIR)/$(DEPDIR)/$(am__dirstamp)" || rm -f $(COM_DIR)/$(DEPDIR)/$(am__dirstamp) + -test -z "$(COM_DIR)/$(am__dirstamp)" || rm -f $(COM_DIR)/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -393,7 +394,7 @@ clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(COM_DIR)/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -427,7 +428,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(COM_DIR)/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff -Nru powerpc-ibm-utils-1.2.19/src/drmgr/rtas_calls.c powerpc-ibm-utils-1.2.20/src/drmgr/rtas_calls.c --- powerpc-ibm-utils-1.2.19/src/drmgr/rtas_calls.c 2013-09-10 15:39:51.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/drmgr/rtas_calls.c 2014-03-12 13:45:12.000000000 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include #include "rtas_calls.h" #include "dr.h" #include "ofdt.h" @@ -39,7 +40,7 @@ return NULL; work_int = (int *)workarea; - node_name = workarea + work_int[2]; + node_name = workarea + be32toh(work_int[2]); node->name = (char *)zalloc(strlen(node_name)+1); if (node->name == NULL) { /* Malloc error */ @@ -110,7 +111,7 @@ /* Initialize the new property structure */ work_int = (int *)workarea; prop->next = NULL; - name = workarea + work_int[2]; + name = workarea + be32toh(work_int[2]); prop->name = (char *)zalloc(strlen(name)+1); if (prop->name == NULL) { /* Malloc error */ @@ -118,8 +119,8 @@ return NULL; } strcpy(prop->name, name); - prop->length = work_int[3]; - value = workarea + work_int[4]; + prop->length = be32toh(work_int[3]); + value = workarea + be32toh(work_int[4]); prop->value = (char *)zalloc(prop->length); if (prop->value == NULL) { /* Malloc error */ @@ -275,7 +276,7 @@ /* initialize work area and args structure */ work_int = (int *) &workarea[0]; - work_int[0] = index; + work_int[0] = htobe32(index); work_int[1] = 0; while (1) { diff -Nru powerpc-ibm-utils-1.2.19/src/Makefile.am powerpc-ibm-utils-1.2.20/src/Makefile.am --- powerpc-ibm-utils-1.2.19/src/Makefile.am 2014-02-24 17:29:25.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/Makefile.am 2014-03-12 14:14:43.000000000 +0000 @@ -1,3 +1,5 @@ +AUTOMAKE_OPTIONS = subdir-objects + AM_CFLAGS = -Wall -g -I common/ AM_LDFLAGS = diff -Nru powerpc-ibm-utils-1.2.19/src/Makefile.in powerpc-ibm-utils-1.2.20/src/Makefile.in --- powerpc-ibm-utils-1.2.19/src/Makefile.in 2014-03-03 19:41:07.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/Makefile.in 2014-03-21 20:24:02.000000000 +0000 @@ -54,7 +54,8 @@ PROGRAMS = $(sbin_PROGRAMS) am__activate_firmware_SOURCES_DIST = activate_fw.c \ common/pseries_platform.c common/pseries_platform.h -am__objects_1 = pseries_platform.$(OBJEXT) +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = common/pseries_platform.$(OBJEXT) @WITH_LIBRTAS_TRUE@am_activate_firmware_OBJECTS = \ @WITH_LIBRTAS_TRUE@ activate_fw.$(OBJEXT) $(am__objects_1) activate_firmware_OBJECTS = $(am_activate_firmware_OBJECTS) @@ -235,6 +236,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = -Wall -g -I common/ AM_LDFLAGS = SUBDIRS = drmgr @@ -315,6 +317,14 @@ clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) +common/$(am__dirstamp): + @$(MKDIR_P) common + @: > common/$(am__dirstamp) +common/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) common/$(DEPDIR) + @: > common/$(DEPDIR)/$(am__dirstamp) +common/pseries_platform.$(OBJEXT): common/$(am__dirstamp) \ + common/$(DEPDIR)/$(am__dirstamp) activate_firmware$(EXEEXT): $(activate_firmware_OBJECTS) $(activate_firmware_DEPENDENCIES) @rm -f activate_firmware$(EXEEXT) $(LINK) $(activate_firmware_OBJECTS) $(activate_firmware_LDADD) $(LIBS) @@ -351,6 +361,7 @@ mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f common/pseries_platform.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -361,41 +372,29 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsprop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_cpu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pseries_platform.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtas_event_decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtas_ibm_get_vpd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serv_config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_poweron_time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_ident.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uesensor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/pseries_platform.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -pseries_platform.o: common/pseries_platform.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pseries_platform.o -MD -MP -MF $(DEPDIR)/pseries_platform.Tpo -c -o pseries_platform.o `test -f 'common/pseries_platform.c' || echo '$(srcdir)/'`common/pseries_platform.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pseries_platform.Tpo $(DEPDIR)/pseries_platform.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common/pseries_platform.c' object='pseries_platform.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pseries_platform.o `test -f 'common/pseries_platform.c' || echo '$(srcdir)/'`common/pseries_platform.c - -pseries_platform.obj: common/pseries_platform.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pseries_platform.obj -MD -MP -MF $(DEPDIR)/pseries_platform.Tpo -c -o pseries_platform.obj `if test -f 'common/pseries_platform.c'; then $(CYGPATH_W) 'common/pseries_platform.c'; else $(CYGPATH_W) '$(srcdir)/common/pseries_platform.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pseries_platform.Tpo $(DEPDIR)/pseries_platform.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common/pseries_platform.c' object='pseries_platform.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pseries_platform.obj `if test -f 'common/pseries_platform.c'; then $(CYGPATH_W) 'common/pseries_platform.c'; else $(CYGPATH_W) '$(srcdir)/common/pseries_platform.c'; fi` +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -598,6 +597,8 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -rm -f common/$(DEPDIR)/$(am__dirstamp) + -rm -f common/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -607,7 +608,7 @@ clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am distclean: distclean-recursive - -rm -rf ./$(DEPDIR) + -rm -rf ./$(DEPDIR) common/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -641,7 +642,7 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) + -rm -rf ./$(DEPDIR) common/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff -Nru powerpc-ibm-utils-1.2.19/src/ppc64_cpu.c powerpc-ibm-utils-1.2.20/src/ppc64_cpu.c --- powerpc-ibm-utils-1.2.19/src/ppc64_cpu.c 2014-02-28 18:48:53.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/ppc64_cpu.c 2014-03-12 13:41:43.000000000 +0000 @@ -31,7 +31,7 @@ #include "librtas_error.h" #include -#define PPC64_CPU_VERSION "1.1" +#define PPC64_CPU_VERSION "1.2" #define SYSFS_CPUDIR "/sys/devices/system/cpu/cpu%d" #define SYSFS_SUBCORES "/sys/devices/system/cpu/subcores_per_core" diff -Nru powerpc-ibm-utils-1.2.19/src/rtas_ibm_get_vpd.c powerpc-ibm-utils-1.2.20/src/rtas_ibm_get_vpd.c --- powerpc-ibm-utils-1.2.19/src/rtas_ibm_get_vpd.c 2014-02-24 17:31:38.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/rtas_ibm_get_vpd.c 2014-03-21 14:16:50.000000000 +0000 @@ -115,9 +115,7 @@ unsigned int seq = 1, next_seq; struct buf_element *list, *current; - switch (get_platform()) { - case PLATFORM_UNKNOWN: - case PLATFORM_POWERKVM_HOST: + if (get_platform() != PLATFORM_PSERIES_LPAR) { fprintf(stderr, "%s: is not supported on the %s platform\n", argv[0], platform_name); exit(1); diff -Nru powerpc-ibm-utils-1.2.19/src/sys_ident.c powerpc-ibm-utils-1.2.20/src/sys_ident.c --- powerpc-ibm-utils-1.2.19/src/sys_ident.c 2014-02-12 14:05:54.000000000 +0000 +++ powerpc-ibm-utils-1.2.20/src/sys_ident.c 2014-03-21 14:21:07.000000000 +0000 @@ -35,6 +35,7 @@ #include #include #include +#include "pseries_platform.h" #define POW_36_4 (36*36*36*36) #define POW_36_3 (36*36*36) @@ -440,6 +441,12 @@ { int c, s_flag = 0, p_flag = 0; + if (get_platform() != PLATFORM_PSERIES_LPAR) { + fprintf(stderr, "%s: is not supported on the %s platform\n", + argv[0], platform_name); + return 1; + } + while ((c = getopt(argc, argv, "hps")) != -1) { switch (c) {