Re: svn commit: r298230 - in head: lib/libstand sys/boot/common sys/boot/efi/libefi sys/boot/efi/loader sys/boot/i386/libfirewire sys/boot/i386/libi386 sys/boot/i386/loader sys/boot/mips/beri/loader s

2016-04-19 Thread Howard Su
this is wonderful change. this also helps a lot on the situation loading
many .ko files from local disk. In my case, loading 5 different ko is
reduced from 5 seconds to 1second. great job!

-Howard

On Tue, Apr 19, 2016 at 7:09 AM Allan Jude  wrote:

> Author: allanjude
> Date: Mon Apr 18 23:09:22 2016
> New Revision: 298230
> URL: https://svnweb.freebsd.org/changeset/base/298230
>
> Log:
>   A new implementation of the loader block cache
>
>   The block cache implementation in loader has proven to be almost
> useless, and in worst case even slowing down the disk reads due to
> insufficient cache size and extra memory copy.
>   Also the current cache implementation does not cache reads from CDs, or
> work with zfs built on top of multiple disks.
>   Instead of an LRU, this code uses a simple hash (O(1) read from cache),
> and instead of a single global cache, a separate cache per block device.
>   The cache also implements limited read-ahead to increase performance.
>   To simplify read ahead management, the read ahead will not wrap over
> bcache end, so in worst case, single block physical read will be performed
> to fill the last block in bcache.
>
>   Booting from a virtual CD over IPMI:
>   0ms latency, before: 27 second, after: 7 seconds
>   60ms latency, before: over 12 minutes, after: under 5 minutes.
>
>   Submitted by: Toomas Soome 
>   Reviewed by:  delphij (previous version), emaste (previous version)
>   Relnotes: yes
>   Differential Revision:https://reviews.freebsd.org/D4713
>
> Modified:
>   head/lib/libstand/cd9660.c
>   head/lib/libstand/dosfs.c
>   head/lib/libstand/dosfs.h
>   head/lib/libstand/ext2fs.c
>   head/lib/libstand/read.c
>   head/lib/libstand/stand.h
>   head/lib/libstand/ufs.c
>   head/lib/libstand/write.c
>   head/sys/boot/common/bcache.c
>   head/sys/boot/common/bootstrap.h
>   head/sys/boot/common/disk.c
>   head/sys/boot/common/md.c
>   head/sys/boot/common/module.c
>   head/sys/boot/efi/libefi/efipart.c
>   head/sys/boot/efi/libefi/libefi.c
>   head/sys/boot/efi/loader/main.c
>   head/sys/boot/i386/libfirewire/firewire.c
>   head/sys/boot/i386/libi386/bioscd.c
>   head/sys/boot/i386/libi386/biosdisk.c
>   head/sys/boot/i386/libi386/biosmem.c
>   head/sys/boot/i386/libi386/pxe.c
>   head/sys/boot/i386/loader/main.c
>   head/sys/boot/mips/beri/loader/beri_disk_cfi.c
>   head/sys/boot/mips/beri/loader/beri_disk_sdcard.c
>   head/sys/boot/ofw/libofw/ofw_disk.c
>   head/sys/boot/pc98/libpc98/bioscd.c
>   head/sys/boot/pc98/libpc98/biosdisk.c
>   head/sys/boot/pc98/libpc98/biosmem.c
>   head/sys/boot/pc98/loader/main.c
>   head/sys/boot/powerpc/kboot/hostdisk.c
>   head/sys/boot/powerpc/ps3/ps3cdrom.c
>   head/sys/boot/powerpc/ps3/ps3disk.c
>   head/sys/boot/uboot/lib/disk.c
>   head/sys/boot/usb/storage/umass_loader.c
>   head/sys/boot/userboot/userboot/host.c
>   head/sys/boot/userboot/userboot/main.c
>   head/sys/boot/userboot/userboot/userboot_disk.c
>   head/sys/boot/zfs/zfs.c
>
> Modified: head/lib/libstand/cd9660.c
>
> ==
> --- head/lib/libstand/cd9660.c  Mon Apr 18 22:00:26 2016(r298229)
> +++ head/lib/libstand/cd9660.c  Mon Apr 18 23:09:22 2016(r298230)
> @@ -143,7 +143,7 @@ susp_lookup_record(struct open_file *f,
> if (bcmp(sh->type, SUSP_CONTINUATION, 2) == 0) {
> shc = (ISO_RRIP_CONT *)sh;
> error = f->f_dev->dv_strategy(f->f_devdata, F_READ,
> -   cdb2devb(isonum_733(shc->location)),
> +   cdb2devb(isonum_733(shc->location)), 0,
> ISO_DEFAULT_BLOCK_SIZE, susp_buffer, );
>
> /* Bail if it fails. */
> @@ -288,7 +288,7 @@ cd9660_open(const char *path, struct ope
> for (bno = 16;; bno++) {
> twiddle(1);
> rc = f->f_dev->dv_strategy(f->f_devdata, F_READ,
> cdb2devb(bno),
> -  ISO_DEFAULT_BLOCK_SIZE, buf,
> );
> +   0, ISO_DEFAULT_BLOCK_SIZE, buf,
> );
> if (rc)
> goto out;
> if (read != ISO_DEFAULT_BLOCK_SIZE) {
> @@ -322,7 +322,7 @@ cd9660_open(const char *path, struct ope
> twiddle(1);
> rc = f->f_dev->dv_strategy
> (f->f_devdata, F_READ,
> -cdb2devb(bno + boff),
> +cdb2devb(bno + boff), 0,
>  ISO_DEFAULT_BLOCK_SIZE,
>  buf, );
> if (rc)
> @@ -381,7 +381,7 @@ cd9660_open(const char *path, struct ope
> bno = isonum_733(rec.extent) +
> isonum_711(rec.ext_attr_length);
> 

Re: svn commit: r298036 - head/sys/cam

2016-04-15 Thread Howard Su
On Fri, Apr 15, 2016 at 9:26 PM Warner Losh <i...@bsdimp.com> wrote:

> On Fri, Apr 15, 2016 at 12:05 AM, Howard Su <howard...@gmail.com> wrote:
>
>>
>> On Fri, Apr 15, 2016 at 1:10 PM Warner Losh <i...@freebsd.org> wrote:
>>
>>> Author: imp
>>> Date: Fri Apr 15 05:10:32 2016
>>> New Revision: 298036
>>> URL: https://svnweb.freebsd.org/changeset/base/298036
>>>
>>> Log:
>>>   Put function only used by CAM_NETFLIX_IOSCHED under that ifdef.
>>>
>>> I suggest to remove NETFLIX from the name.
>>
>
> It's the Netflix I/O scheduler as opposed to the default one. So the
> name is appropriate. It's better than CAM_WARNER_AWESOME_IOSCHED
> which is the only other choice possible... :)
>
The name didn't give any information about what it is and what it do thing
differently. Sounds like this is only useful for netflix and other people
should not bother to use it. If so, this is proper name.

>
> Warner
>
>
>> Modified:
>>>   head/sys/cam/cam_iosched.c
>>>
>>> Modified: head/sys/cam/cam_iosched.c
>>>
>>> ==
>>> --- head/sys/cam/cam_iosched.c  Fri Apr 15 05:10:31 2016(r298035)
>>> +++ head/sys/cam/cam_iosched.c  Fri Apr 15 05:10:32 2016(r298036)
>>> @@ -625,9 +625,11 @@ cam_iosched_cl_maybe_steer(struct contro
>>> /* Periph drivers set these flags to indicate
>>> work */
>>>  #define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16)
>>>
>>> +#ifdef CAM_NETFLIX_IOSCHED
>>>  static void
>>>  cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
>>>  sbintime_t sim_latency, int cmd, size_t size);
>>> +#endif
>>>
>>>  static inline int
>>>  cam_iosched_has_flagged_work(struct cam_iosched_softc *isc)
>>> @@ -1522,6 +1524,7 @@ cam_iosched_update(struct iop_stats *iop
>>> iop->sd = (int64_t)var < 0 ? 0 : isqrt64(var);
>>>  }
>>>
>>> +#ifdef CAM_NETFLIX_IOSCHED
>>>  static void
>>>  cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
>>>  sbintime_t sim_latency, int cmd, size_t size)
>>> @@ -1541,6 +1544,7 @@ cam_iosched_io_metric_update(struct cam_
>>> break;
>>> }
>>>  }
>>> +#endif
>>>
>>>  #ifdef DDB
>>>  static int biolen(struct bio_queue_head *bq)
>>> ___
>>> svn-src-head@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>>>
>>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r298036 - head/sys/cam

2016-04-15 Thread Howard Su
On Fri, Apr 15, 2016 at 1:10 PM Warner Losh  wrote:

> Author: imp
> Date: Fri Apr 15 05:10:32 2016
> New Revision: 298036
> URL: https://svnweb.freebsd.org/changeset/base/298036
>
> Log:
>   Put function only used by CAM_NETFLIX_IOSCHED under that ifdef.
>
> I suggest to remove NETFLIX from the name.

> Modified:
>   head/sys/cam/cam_iosched.c
>
> Modified: head/sys/cam/cam_iosched.c
>
> ==
> --- head/sys/cam/cam_iosched.c  Fri Apr 15 05:10:31 2016(r298035)
> +++ head/sys/cam/cam_iosched.c  Fri Apr 15 05:10:32 2016(r298036)
> @@ -625,9 +625,11 @@ cam_iosched_cl_maybe_steer(struct contro
> /* Periph drivers set these flags to indicate work
> */
>  #define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16)
>
> +#ifdef CAM_NETFLIX_IOSCHED
>  static void
>  cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
>  sbintime_t sim_latency, int cmd, size_t size);
> +#endif
>
>  static inline int
>  cam_iosched_has_flagged_work(struct cam_iosched_softc *isc)
> @@ -1522,6 +1524,7 @@ cam_iosched_update(struct iop_stats *iop
> iop->sd = (int64_t)var < 0 ? 0 : isqrt64(var);
>  }
>
> +#ifdef CAM_NETFLIX_IOSCHED
>  static void
>  cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
>  sbintime_t sim_latency, int cmd, size_t size)
> @@ -1541,6 +1544,7 @@ cam_iosched_io_metric_update(struct cam_
> break;
> }
>  }
> +#endif
>
>  #ifdef DDB
>  static int biolen(struct bio_queue_head *bq)
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r297699 - head/sys/dev/hyperv/vmbus

2016-04-08 Thread Howard Su
On Fri, Apr 8, 2016 at 5:49 PM Alexander Motin  wrote:

> On 08.04.16 12:42, Konstantin Belousov wrote:
> > On Fri, Apr 08, 2016 at 09:20:47AM +, Sepherosa Ziehau wrote:
> >> Author: sephe
> >> Date: Fri Apr  8 09:20:46 2016
> >> New Revision: 297699
> >> URL: https://svnweb.freebsd.org/changeset/base/297699
> >>
> >> Log:
> >>   hyperv: Revert r297481
> >>
> >>   Use vm_guest == VM_GUEST_HV is not enough to determine whether FreeBSD
> >>   is running on Hyper-V or not.  What a mess.
> >
> > Can you explain why ?
> >
> > VM_GUEST_HV is only set in inentify_hypervisor() when the vendor string
> > explicitely contained 'Microsoft Hv'.  How can this be mis-interpreted
> > to be a Xen id ?
>
> Xen has some odd "Hyper-V compatibility mode", that is identified as
> Hyper-V, but not very compatible in practice.
>
Per hyper-V document, it needs more checks about if one feature is
available on certain hypervisor.  As far as I know, KVM, QEMU (after 1.1),
VirtualBox all have the simliar Windows hypervisor emulation mode to make
Windows Runs faster. So we need handle this more strictly following the
spec. There is already a patch  under testing now, which may reach the tree
soon.


>
> --
> Alexander Motin
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r291830 - head/tools/tools/nanobsd

2015-12-05 Thread Howard Su
On Saturday, December 5, 2015, Warner Losh  wrote:

> Author: imp
> Date: Sat Dec  5 01:10:04 2015
> New Revision: 291830
> URL: https://svnweb.freebsd.org/changeset/base/291830
>
> Log:
>   Setting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG= as
>   appropriate. First step in supporting a build w/o root. More to
>   follow as actions by customization scripts are not (yet) recorded in
>   the metalog, and duplicate entries in it aren't removed.
>
> Modified:
>   head/tools/tools/nanobsd/defaults.sh   (contents, props changed)
>
> Modified: head/tools/tools/nanobsd/defaults.sh
>
> ==
> --- head/tools/tools/nanobsd/defaults.shSat Dec  5 00:54:43 2015
>   (r291829)
> +++ head/tools/tools/nanobsd/defaults.shSat Dec  5 01:10:04 2015
>   (r291830)
> @@ -340,6 +340,10 @@ make_conf_install ( ) (
> nano_global_make_env
> echo "${CONF_WORLD}"
> echo "${CONF_INSTALL}"
> +   if [ ! -z "${NANO_NOPRIV_BUILD}" ]; then
> +   echo NO_ROOT=t
> +   echo METALOG=${NANO_METALOG}
> +   fi
> ) >  ${NANO_MAKE_CONF_INSTALL}
>  )
>
> @@ -951,11 +955,14 @@ set_defaults_and_export ( ) {
> NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install
>
> # Override user's NANO_DRIVE if they specified a NANO_LABEL
> -   [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}"
> +   [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}" || true
>
> # Set a default NANO_TOOLS to NANO_SRC/NANO_TOOLS if it exists.
> [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \
> -   NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}"
> +   NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true
> +
> +   [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \
>
  ^ missing }

> +   NANO_METALOG=${NANO_OBJ}/_.metalog || true
>
> NANO_STARTTIME=`date +%s`
> pprint 3 "Exporting NanoBSD variables"
> @@ -985,6 +992,8 @@ set_defaults_and_export ( ) {
> export_var NANO_BOOTLOADER
> export_var NANO_LABEL
> export_var NANO_MODULES
> +   export_var NANO_NOPRIV_BUILD
> +   export_var NANO_METALOG
> export_var SRCCONF
> export_var SRC_ENV_CONF
>  }
> ___
> svn-src-head@freebsd.org  mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org
> "
>


-- 
-Howard
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r291852 - in head/sys: arm/arm arm/include cddl/dev/fbt/arm

2015-12-05 Thread Howard Su
On Saturday, December 5, 2015, Andrew Turner <and...@freebsd.org> wrote:

> Author: andrew
> Date: Sat Dec  5 09:32:36 2015
> New Revision: 291852
> URL: https://svnweb.freebsd.org/changeset/base/291852
>
> Log:
>   Move the check to see if we are tracing a function with the DTrace
> Function
>   Boundary Trace to assembly to reduce the overhead of these checks.
>
>   Submitted by: Howard Su <howard...@gmail.com <javascript:;>>
>   Relnotes: Yes
>   Differential Revision:https://reviews.freebsd.org/D4266
>
> Modified:
>   head/sys/arm/arm/exception.S
>   head/sys/arm/arm/genassym.c
>   head/sys/arm/arm/trap-v6.c
>   head/sys/arm/arm/undefined.c
>   head/sys/arm/include/trap.h
>   head/sys/cddl/dev/fbt/arm/fbt_isa.c
>
> Modified: head/sys/arm/arm/exception.S
>
> ==
> --- head/sys/arm/arm/exception.SSat Dec  5 08:52:37 2015
> (r291851)
> +++ head/sys/arm/arm/exception.SSat Dec  5 09:32:36 2015
> (r291852)
> @@ -52,13 +52,15 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +
>  __FBSDID("$FreeBSD$");
>
>  #ifdef KDTRACE_HOOKS
> .bss
> .align 4
> -   .global _C_LABEL(dtrace_invop_calltrap_addr)
> -_C_LABEL(dtrace_invop_calltrap_addr):
> +   .global _C_LABEL(dtrace_invop_jump_addr)
> +_C_LABEL(dtrace_invop_jump_addr):
> .word 0
> .word 0
>  #endif
> @@ -361,9 +363,39 @@ END(data_abort_entry)
>   */
>  ASENTRY_NP(undefined_entry)
> PUSHFRAMEINSVC  /* mode stack, build trapframe
> there. */
> +   mov r4, r0  /* R0 contains SPSR */
> adr lr, exception_exit  /* Return from handler via
> standard */
> -   mov r0, sp  /* exception exit routine.  Pass
> the */
> -   b   undefinedinstruction/* trapframe to the handler. */
> +   mov r0, sp  /* exception exit routine. pass
> frame */
> +
> +   ldr r2, [sp, #(TF_PC)]  /* load pc */
> +#if __ARM_ARCH >= 7
> +   tst r4, #(PSR_T)/* test if PSR_T */
> +   subne   r2, r2, #(THUMB_INSN_SIZE)
> +   subeq   r2, r2, #(INSN_SIZE)
> +#else
> +   sub r2, r2, #(INSN_SIZE)/* fix pc */
> +#endif
> +   str r2, [sp, #TF_PC]/* store pc */
> +
> +#ifdef KDTRACE_HOOKS
> +   /* Check if dtrace is enabled */
> +   ldr r1, =_C_LABEL(dtrace_invop_jump_addr)
> +   ldr r3, [r1]
> +   cmp r3, #0
> +   beq undefinedinstruction
> +
> +   and r4, r4, #(PSR_MODE) /* Mask out unneeded bits */
> +   cmp r4, #(PSR_USR32_MODE)   /* Check if we came from usermode
> */
> +   beq undefinedinstruction
> +
> +   ldr r4, [r2]/* load instrution */
> +   ldr r1, =FBT_BREAKPOINT /* load fbt inv op */
> +   cmp r1, r4
> +   bne undefinedinstruction
> +
> +   bx  r3  /* call invop_jump_addr */
> +#endif
> +   b   undefinedinstruction/* call stadnard handler */
>  END(undefined_entry)
>
>  /*
>
> Modified: head/sys/arm/arm/genassym.c
>
> ==
> --- head/sys/arm/arm/genassym.c Sat Dec  5 08:52:37 2015(r291851)
> +++ head/sys/arm/arm/genassym.c Sat Dec  5 09:32:36 2015(r291852)
> @@ -118,6 +118,7 @@ ASSYM(MD_TP, offsetof(struct mdthread, m
>  ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start));
>  ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end));
>
> +ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr));
>  ASSYM(TF_R0, offsetof(struct trapframe, tf_r0));
>  ASSYM(TF_R1, offsetof(struct trapframe, tf_r1));
>  ASSYM(TF_PC, offsetof(struct trapframe, tf_pc));
>
> Modified: head/sys/arm/arm/trap-v6.c
>
> ==
> --- head/sys/arm/arm/trap-v6.c  Sat Dec  5 08:52:37 2015(r291851)
> +++ head/sys/arm/arm/trap-v6.c  Sat Dec  5 09:32:36 2015(r291852)
> @@ -66,6 +66,10 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #endif
>
> +#ifdef KDTRACE_HOOKS
> +#include 
> +#endif
> +
>  extern char fusubailout[];
>  extern char cachebailout[];
>
> @@ -561,6 +565,13 @@ abort_fatal(struct trapframe *tf, u_int
> const char *rw_mode;
>
> usermode = TRAPF_USERMODE(tf);
> +#ifdef KDTRACE_HOOKS
> +   if (!usermode) {
> +   if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf,
> far))
> + 

Re: svn commit: r290550 - head/release/tools

2015-11-08 Thread Howard Su
tmpfs doesn't support noatime option. please remove it.

On Mon, Nov 9, 2015 at 2:02 AM, Glen Barber  wrote:

> Author: gjb
> Date: Sun Nov  8 18:02:39 2015
> New Revision: 290550
> URL: https://svnweb.freebsd.org/changeset/base/290550
>
> Log:
>   Use tmpfs(5) instead of md(4) for '/tmp' mount.
>
>   Submitted by: Nikolai Lifanov
>   Differential Revision:D3506
>   MFC after:3 days
>   Sponsored by: The FreeBSD Foundation
>
> Modified:
>   head/release/tools/arm.subr
>
> Modified: head/release/tools/arm.subr
>
> ==
> --- head/release/tools/arm.subr Sun Nov  8 18:00:44 2015(r290549)
> +++ head/release/tools/arm.subr Sun Nov  8 18:02:39 2015(r290550)
> @@ -110,7 +110,7 @@ arm_install_base() {
> >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \
> >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> -   echo "md /tmp mfs rw,noatime,-s30m 0 0" \
> +   echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \
> >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
>
> local hostname
> ___
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>



-- 
-Howard
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r259668 - head/sys/cddl/dev/fbt

2013-12-20 Thread Howard Su
On Saturday, December 21, 2013, Justin Hibbits wrote:

 Author: jhibbits
 Date: Fri Dec 20 23:18:14 2013
 New Revision: 259668
 URL: http://svnweb.freebsd.org/changeset/base/259668

 Log:
   Fix a couple bugs in FBT PowerPC.  Clamp the size to a 'instruction
 size' not
   'byte size', and fix a typo.

   MFC after:2 weeks

 Modified:
   head/sys/cddl/dev/fbt/fbt_powerpc.c

 Modified: head/sys/cddl/dev/fbt/fbt_powerpc.c

 ==
 --- head/sys/cddl/dev/fbt/fbt_powerpc.c Fri Dec 20 21:31:50 2013
  (r259667)
 +++ head/sys/cddl/dev/fbt/fbt_powerpc.c Fri Dec 20 23:18:14 2013
  (r259668)
 @@ -219,7 +219,7 @@ fbt_provide_module_function(linker_file_
 return (0);

 instr = (u_int32_t *) symval-value;
 -   limit = (u_int32_t *) (symval-value + symval-size);
 +   limit = (u_int32_t *) (symval-value + symval-size /
 sizeof(u_int32_t));

 This change doesn't look right to me. symval-value is caddr_t (char*).
why add instruction size to it?

 for (; instr  limit; instr++)
 if (*instr == FBT_MFLR_R0)
 @@ -278,7 +278,7 @@ again:
 instr++;

 for (j = 0; j  12  instr  limit; j++, instr++) {
 -   if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) |
 +   if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) ||
 FBT_IS_JUMP(*instr))
 break;
 }
 ___
 svn-src-head@freebsd.org javascript:; mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-head
 To unsubscribe, send any mail to 
 svn-src-head-unsubscr...@freebsd.orgjavascript:;
 



-- 
-Howard
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org