lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 24 Jul 2011 22:15:30 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Ryan Mallon <rmallon@...il.com>
Cc:	Jesper Juhl <jj@...osbits.net>, linux-kernel@...r.kernel.org,
	Alan Cox <alan@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	devel@...verdev.osuosl.org, Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: GMA500: ERROR: "__bad_udelay" undefined!

Hi,

On Sun, Jul 24, 2011 at 9:28 PM, Ryan Mallon <rmallon@...il.com> wrote:
> On 25/07/11 11:22, Ryan Mallon wrote:
>>
>> On 25/07/11 07:37, Jesper Juhl wrote:
>>>
>>> Just got this when building the attached .config on x86_64 with gcc 4.6.1
>>> on up-to-date mainline git tree (head at
>>> b6844e8f64920cdee620157252169ba63afb0c89) :
>>>
>>>  ERROR: "__bad_udelay" [drivers/staging/gma500/psb_gfx.ko] undefined!
>>>  make[1]: *** [__modpost] Error 1
>>>
>>> I don't need gma500, so I've just disabled the driver to get around it
>>> but
>>> I thought some people might still like to know :)
>>>
>> __bad_udelay is a compile time check that constant udelays do not exceed a
>> certain threshold. For x86_64 it used to be n > 20000, now it is n / 20000
>> >= 1. The problem is in
>> drivers/staging/gma500/psb_intel_display.c:psb_init_wait_for_vblank, which
>> does udelay(20000) which under the old code would have been fine, but fails
>> the new __bad_udelay check.
>>
>> Possibly the udelay can just be converted to an mdelay?
>
> Here is the patch:
> ----
> A change to the constraints for the compile time check for __bad_udelay on
> some architectures caused breakage in the gma500 staging driver. Fix by
> replacing udelay with mdelay.
>
> Signed-off-by: Ryan Mallon <rmallon@...il.com>
> ---
>
> diff --git a/drivers/staging/gma500/psb_intel_display.c
> b/drivers/staging/gma500/psb_intel_display.c
> index 4f47d09..09e378d 100644
> --- a/drivers/staging/gma500/psb_intel_display.c
> +++ b/drivers/staging/gma500/psb_intel_display.c
> @@ -331,7 +331,7 @@ static bool psb_intel_find_best_PLL(struct drm_crtc
> *crtc, int target,
>  void psb_intel_wait_for_vblank(struct drm_device *dev)
>  {
>        /* Wait for 20ms, i.e. one cycle at 50hz. */
> -       udelay(20000);
> +       mdelay(20);
>  }
>
same proposed by Stephen Rothwell in https://lkml.org/lkml/2011/7/24/162

 - Arnaud
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ