Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2014 21:13:08 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Adrian Chadd <adrian@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it>, John Baldwin <jhb@freebsd.org>
Subject:   Re: svn commit: r273266 - in head: lib/libkvm sys/compat/freebsd32 sys/kern sys/sys
Message-ID:  <C0A6FC3B-DF34-441E-8EDD-408F61B579A9@FreeBSD.org>
In-Reply-To: <CAJ-VmomFjkw5iS51qDbG3RTVYa66FNDiSCYuX%2B-o5iGAQxzSuA@mail.gmail.com>
References:  <201410181936.s9IJaCwu018930@svn.freebsd.org> <20141019032038.GA41067@onelab2.iet.unipi.it> <CAJ-Vmo=_FkvXhyVb-WTr5NjkpTNoLv6uCtqkyc_s_2g3Z1huzw@mail.gmail.com> <CAJ-VmomxkKsogBLw7_ZeOk4%2BU8%2BjnXWYjUkaWtWteD=7S3%2BK1w@mail.gmail.com> <CAJ-VmomFjkw5iS51qDbG3RTVYa66FNDiSCYuX%2B-o5iGAQxzSuA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_60FEF507-7367-4F03-AE0B-9B5C57F9F9BD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

I noted something similar for kgdb, when compiled with gcc:

cc1: warnings being treated as errors
/usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c: In function =
'kgdb_trgt_fetch_tss':
/usr/src/gnu/usr.bin/gdb/kgdb/trgt_i386.c:142: warning: comparison is =
always false due to limited range of data type

In gnu/usr.bin/gdb/kgdb/kgdb.h, there is:

struct kthr {
        struct kthr     *next;
        uintptr_t       paddr;
        uintptr_t       kaddr;
        uintptr_t       kstack;
        uintptr_t       pcb;
        int             tid;
        int             pid;
        u_char          cpu;
};

The cpu field is assigned from td.td_oncpu (which is an int) in
kgdb_thr_add_procs(), so I think it should be safe to change it to an
int too:

Index: gnu/usr.bin/gdb/kgdb/kgdb.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- gnu/usr.bin/gdb/kgdb/kgdb.h (revision 274350)
+++ gnu/usr.bin/gdb/kgdb/kgdb.h (working copy)
@@ -41,7 +41,7 @@
        uintptr_t       pcb;
        int             tid;
        int             pid;
-       u_char          cpu;
+       int             cpu;
 };

 extern struct kthr *curkthr;

-Dimitry


> On 19 Oct 2014, at 06:38, Adrian Chadd <adrian@FreeBSD.org> wrote:
>=20
> Rebuilt, tested, committed to -HEAD.
>=20
> Thanks!
>=20
> -a
>=20
>=20
> On 18 October 2014 20:51, Adrian Chadd <adrian@freebsd.org> wrote:
>> .. actually, try this:
>>=20
>> adrian@testbox1:~/work/freebsd/head/src % svn diff sys/kern/
>> Index: sys/kern/kern_intr.c
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- sys/kern/kern_intr.c        (revision 272839)
>> +++ sys/kern/kern_intr.c        (working copy)
>> @@ -362,8 +362,7 @@
>> {
>>        struct intr_event *ie;
>>        cpuset_t *mask;
>> -       u_char cpu;
>> -       int n;
>> +       int cpu, n;
>>=20
>>        mask =3D m;
>>        cpu =3D NOCPU;
>> @@ -377,7 +376,7 @@
>>                                continue;
>>                        if (cpu !=3D NOCPU)
>>                                return (EINVAL);
>> -                       cpu =3D (u_char)n;
>> +                       cpu =3D n;
>>                }
>>        }
>>        ie =3D intr_lookup(irq);
>>=20
>>=20
>>=20
>>=20
>> -a
>=20


--Apple-Mail=_60FEF507-7367-4F03-AE0B-9B5C57F9F9BD
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.26

iEYEARECAAYFAlRhHFoACgkQsF6jCi4glqPehgCgm902ras5wndbFy/8cQvKpkeq
ZbEAoO1cWl7EuyvQt+pEJHQUk3rAxlFi
=TYaL
-----END PGP SIGNATURE-----

--Apple-Mail=_60FEF507-7367-4F03-AE0B-9B5C57F9F9BD--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C0A6FC3B-DF34-441E-8EDD-408F61B579A9>