login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
10
Re: [git pull] kgdb light, v5
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jan Kiszka
Subject:
Re: [git pull] kgdb light, v5
Date: Sunday, February 10, 2008 - 10:39 am
Ray Lee wrote:
quoted text
> On Feb 10, 2008 8:36 AM, Ingo Molnar <mingo@elte.hu> wrote: >> +#ifdef CONFIG_64BIT >> + } else if ((count =3D=3D 8) && (((long)mem & 7) =3D=3D 0)) { >> + u64 tmp_ll; >> + if (probe_kernel_address(mem, tmp_ll)) >> + return ERR_PTR(-EINVAL); >> + >> + mem +=3D 8; >> +#ifdef __BIG_ENDIAN >> + *buf++ =3D hexchars[(tmp_ll >> 60) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 56) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 52) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 48) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 44) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 40) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 36) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 32) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 28) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 24) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 20) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 16) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 12) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 8) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 4) & 0xf]; >> + *buf++ =3D hexchars[tmp_ll & 0xf]; >> +#else >> + *buf++ =3D hexchars[(tmp_ll >> 4) & 0xf]; >> + *buf++ =3D hexchars[tmp_ll & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 12) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 8) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 20) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 16) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 28) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 24) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 36) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 32) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 44) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 40) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 52) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 48) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 60) & 0xf]; >> + *buf++ =3D hexchars[(tmp_ll >> 56) & 0xf]; >> +#endif >=20 > Am I missing something? (I'm due, so it's not really a rhetorical > question :-) .) Wouldn't >=20 > unsigned int void u64_to_hex(u64 val, unsigned char *buf) > { > int i; > for (i=3D15; i>=3D0; i--) { > buf[i] =3D hexchars[ val & 0x0f ]; > val >>=3D 4; > } > return 16; > } > ... > buf +=3D u64_to_hex(cpu_to_be64(tmp_ll), buf); >=20 > be clearer both visually, and code-as-intent? (And equivalent helpers > for u32, u16 -- though they could all be rolled into one.)
Yes, will come, I just produced some ETOOMANYCHANGESATONCE issue while improving this. The code goes down by more than 150 lines! Jan
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[0/6] kgdb light
, Ingo Molnar
, (Sun Feb 10, 12:13 am)
Re: [0/6] kgdb light
, David Miller
, (Sun Feb 10, 12:37 am)
Re: [0/6] kgdb light
, Sam Ravnborg
, (Sun Feb 10, 3:47 am)
Re: [0/6] kgdb light
, Jan Kiszka
, (Sun Feb 10, 6:25 am)
[git pull] kgdb light, v5
, Ingo Molnar
, (Sun Feb 10, 9:36 am)
Re: [git pull] kgdb light, v5
, Ray Lee
, (Sun Feb 10, 10:30 am)
Re: [git pull] kgdb light, v5
, Jan Kiszka
, (Sun Feb 10, 10:39 am)
Re: [git pull] kgdb light, v5
, Jan Kiszka
, (Sun Feb 10, 11:53 am)
Re: [git pull] kgdb light, v5
, Ray Lee
, (Sun Feb 10, 11:59 am)
Re: [0/6] kgdb light
, Sam Ravnborg
, (Sun Feb 10, 12:31 pm)
Re: [git pull] kgdb light, v5
, Sam Ravnborg
, (Sun Feb 10, 12:34 pm)
Re: [git pull] kgdb light, v5
, Ingo Molnar
, (Sun Feb 10, 12:34 pm)
Re: [git pull] kgdb light, v5
, Linus Torvalds
, (Sun Feb 10, 12:44 pm)
Re: [git pull] kgdb light, v5
, Ingo Molnar
, (Sun Feb 10, 1:19 pm)
Re: [git pull] kgdb light, v5
, Jan Kiszka
, (Sun Feb 10, 1:22 pm)
Re: [0/6] kgdb light
, Jan Kiszka
, (Sun Feb 10, 1:23 pm)
Re: [git pull] kgdb light, v5
, Ingo Molnar
, (Sun Feb 10, 1:29 pm)
Re: [git pull] kgdb light, v5
, Ingo Molnar
, (Sun Feb 10, 1:41 pm)
Re: [git pull] kgdb light, v5
, Ingo Molnar
, (Sun Feb 10, 2:13 pm)
Re: [0/6] kgdb light
, Ingo Molnar
, (Sun Feb 10, 2:16 pm)
Re: [0/6] kgdb light
, Sam Ravnborg
, (Sun Feb 10, 2:30 pm)
Re: [0/6] kgdb light
, Ingo Molnar
, (Sun Feb 10, 2:34 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client