Hello community, here is the log from the commit of package powerpc-utils checked in at Thu Oct 16 01:50:48 CEST 2008. -------- --- arch/ppc/powerpc-utils/powerpc-utils.changes 2008-10-09 17:55:58.000000000 +0200 +++ /d/STABLE/powerpc-utils/powerpc-utils.changes 2008-10-15 17:29:40.000000000 +0200 @@ -1,0 +2,11 @@ +Wed Oct 15 17:28:36 CEST 2008 - olh@suse.de + +- fix memory hotplug remove (bnc#435181 - LTC48640) +- provide compat symlinks (bnc#435543 - LTC49095) + +------------------------------------------------------------------- +Wed Oct 15 08:09:57 CEST 2008 - olh@suse.de + +- require tgt unconditionally + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- powerpc-utils-papr.drmgr-symlinks.patch powerpc-utils-papr.drmgs_mem_rm.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ powerpc-utils.spec ++++++ --- /var/tmp/diff_new_pack.D20514/_old 2008-10-16 01:50:32.000000000 +0200 +++ /var/tmp/diff_new_pack.D20514/_new 2008-10-16 01:50:32.000000000 +0200 @@ -19,18 +19,16 @@ Name: powerpc-utils -%if 0%{?suse_version} > 1100 # use the tgtd instead of the ibmvscsis kernel module to setup an IBM vscsi server #!BuildIgnore: tgt Requires: tgt -%endif BuildRequires: librtas BuildRequires: libservicelog-devel Obsoletes: powerpc-utils-papr Obsoletes: ppc64-utils Provides: ppc64-utils Version: 1.1.1 -Release: 6 +Release: 7 License: IBM Public License Url: http://powerpc-utils.ozlabs.org/ Group: System/Management @@ -44,8 +42,10 @@ Patch1: powerpc-utils-lsprop.patch Patch2: powerpc-utils.ofpathname.show_of_path.patch Patch3: powerpc-utils.ofpathname.bootlist.patch -Patch4: powerpc-utils-papr.open-flag.patch -Patch5: powerpc-utils-papr.insserv-ibmvscsis.patch +Patch100: powerpc-utils-papr.open-flag.patch +Patch101: powerpc-utils-papr.insserv-ibmvscsis.patch +Patch102: powerpc-utils-papr.drmgs_mem_rm.patch +Patch103: powerpc-utils-papr.drmgr-symlinks.patch ExclusiveArch: ppc ppc64 %description @@ -67,8 +67,10 @@ %patch2 -p1 %patch3 -p1 cd powerpc-utils-papr-%{papr_version} -%patch4 -p1 -%patch5 -p1 +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 %build make CFLAGS="$RPM_OPT_FLAGS" %{?jobs:-j%jobs} @@ -104,6 +106,11 @@ %config %attr (755,root,root) /etc/init.d/ibmvscsis.sh %changelog +* Wed Oct 15 2008 olh@suse.de +- fix memory hotplug remove (bnc#435181 - LTC48640) +- provide compat symlinks (bnc#435543 - LTC49095) +* Wed Oct 15 2008 olh@suse.de +- require tgt unconditionally * Thu Oct 09 2008 olh@suse.de - require tgt because the ibmvscsis kernel driver is SLES10 only (bnc#433956) ++++++ powerpc-utils-papr.drmgr-symlinks.patch ++++++ --- cmds/drmgr/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) Index: powerpc-utils-papr-1.1.3/cmds/drmgr/Makefile =================================================================== --- powerpc-utils-papr-1.1.3.orig/cmds/drmgr/Makefile +++ powerpc-utils-papr-1.1.3/cmds/drmgr/Makefile @@ -31,6 +31,20 @@ lsslot: $(LSSLOT_OBJS) install: $(CMDS) @$(call install_sbin,$(CMDS),$(DESTDIR)) + @for i in \ + drslot_chrp_slot \ + drslot_chrp_pci \ + drslot_chrp_cpu \ + drslot_chrp_phb \ + drslot_chrp_mem \ + drslot_chrp_hea \ + drmig_chrp_pmig \ + ; do \ + ln -sfvbn drmgr $(DESTDIR)$(SBIN_DIR)/$$i ; \ + done + @ln -sfvbn usysattn $(DESTDIR)$(SBIN_DIR)/usysfault + @ln -sfvbn serv_config $(DESTDIR)$(SBIN_DIR)/uspchrp + uninstall: @$(call uninstall_sbin,$(CMDS),$(DESTDIR)) ++++++ powerpc-utils-papr.drmgs_mem_rm.patch ++++++ --- cmds/drmgr/drslot_chrp_mem.c | 120 ++++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 56 deletions(-) --- a/cmds/drmgr/drslot_chrp_mem.c +++ b/cmds/drmgr/drslot_chrp_mem.c @@ -579,7 +579,7 @@ acquire_lmb(struct lmb *lmb, struct lmb_ rc = add_node(add_path, lmb->of_node); } else { /* Supply the correct add_path for lmb fixup below */ - sprintf(add_path, "ibm,dynamic-reconfiguration-memory"); + sprintf(add_path, "/ibm,dynamic-reconfiguration-memory"); } } else { /* Add the new nodes to the device tree */ @@ -591,7 +591,7 @@ acquire_lmb(struct lmb *lmb, struct lmb_ return rc; /* fix up the lmb now that we own it. */ - sprintf(lmb->ofdt_path, "%s/%s", OFDT_BASE, add_path); + sprintf(lmb->ofdt_path, "%s%s", OFDT_BASE, add_path); if (! lmb_list->drconf_buf) { /* Find the physical address for this lmb. This is only @@ -733,6 +733,44 @@ set_mem_scn_state(struct mem_scn *mem_sc } /** + * probe_lmb + * @brief Probe all of the memory sections of the lmb + * + * @param lmb pointer to lmb to probe + * @returns 0 on success,!0 otherwise + */ +static int +probe_lmb(struct lmb *lmb) +{ + struct mem_scn *scn; + int probe_file; + int rc = 0; + + probe_file = open(MEM_PROBE_FILE, O_WRONLY); + if (probe_file <= 0) { + dbg("Could not open %s to probe memory\n", MEM_PROBE_FILE); + return errno; + } + + for (scn = lmb->mem_scns; scn; scn = scn->next) { + char addr[DR_STR_MAX]; + + memset(addr, 0, DR_STR_MAX); + sprintf(addr, "0x%llx", scn->phys_addr); + + dbg("Probing memory address 0x%llx\n", scn->phys_addr); + rc = write(probe_file, addr, strlen(addr)); + if (rc == -1) { + dbg("Probe failed:\n%s\n", strerror(errno)); + return rc; + } + } + + close(probe_file); + return 0; +} + +/** * set_lmb_state * * @param lmb lmb to set the state for @@ -743,16 +781,12 @@ static int set_lmb_state(struct lmb *lmb, int state) { struct mem_scn *scn; - int probe_file; int rc = 0; if (state == ONLINE) { - probe_file = open(MEM_PROBE_FILE, O_WRONLY); - if (probe_file <= 0) { - dbg("Could not open %s to probe memory\n", - MEM_PROBE_FILE); - return errno; - } + rc = probe_lmb(lmb); + if (rc) + return rc; } else { /* Ensure that we own this lmb */ if (! (lmb->flags & LMB_OWNED)) { @@ -763,29 +797,9 @@ set_lmb_state(struct lmb *lmb, int state } for (scn = lmb->mem_scns; scn; scn = scn->next) { - if (state == ONLINE) { - char addr[DR_STR_MAX]; - - memset(addr, 0, DR_STR_MAX); - sprintf(addr, "0x%llx", scn->phys_addr); - - dbg("Probing memory address 0x%llx\n", scn->phys_addr); - rc = write(probe_file, addr, strlen(addr)); - dbg("Probe write rc = %d\n", rc); - if (rc == -1) { - dbg("Could not write to %s:\n%s\n", - MEM_PROBE_FILE, strerror(errno)); - break; - } - - /* reset rc so we don't exit with false rc values */ - rc = 0; - } - rc = set_mem_scn_state(scn, state); if (rc) break; - } if (rc) { @@ -800,9 +814,6 @@ set_lmb_state(struct lmb *lmb, int state } } - if (state == ONLINE) - close(probe_file); - lmb->flags |= LMB_STATE_SET; return rc; } @@ -825,35 +836,31 @@ add_lmbs(int nr_lmbs, struct options *op int rc = 0; struct lmb *lmb; - lmb = get_available_lmb(opts, lmb_list); - if (lmb == NULL) - return -1; - - rc = acquire_lmb(lmb, lmb_list); - if (rc) - return -1; + lmb_list->lmbs_modified = 0; + while (lmb_list->lmbs_modified < nr_lmbs) { + lmb = get_available_lmb(opts, lmb_list); + if (lmb == NULL) + return -1; - if (nr_lmbs > 1) - rc = add_lmbs(nr_lmbs - 1, opts, lmb_list); + rc = acquire_lmb(lmb, lmb_list); + if (rc) { + release_lmb(lmb, lmb_list); + lmb->flags |= LMB_UNUSABLE; + break; + } - if (rc) { - /* Roll back the operation. Is this the correct behavior? */ - release_lmb(lmb, lmb_list); - return 1; - } + rc = set_lmb_state(lmb, ONLINE); + dbg("setlmb rc = %d\n"); + if (rc) { + release_lmb(lmb, lmb_list); + lmb->flags |= LMB_UNUSABLE; + break; + } - rc = set_lmb_state(lmb, ONLINE); - if (rc) { - /* Roll back the operation. Is this the correct behavior? */ -#if 0 - set_lmb_state(lmb, OFFLINE); - release_lmb(lmb, lmb_list); -#endif - return 1; + lmb_list->lmbs_modified++; } - lmb_list->lmbs_modified++; - return 0; + return rc; } /** @@ -875,6 +882,7 @@ mem_add(struct options *opts) dbg("Adding %d lmbs\n", opts->quantity); rc = add_lmbs(opts->quantity, opts, lmb_list); + dbg("DR_TOTAL_RESOURCES=%d\n", lmb_list->lmbs_modified); printf("DR_TOTAL_RESOURCES=%d\n", lmb_list->lmbs_modified); free_lmbs(lmb_list); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org