public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: linux-next: Tree for July 20 (acpi/apei/ghes)
       [not found] <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au>
@ 2011-07-20 16:36 ` Randy Dunlap
  2011-07-20 16:38   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2011-07-20 16:36 UTC (permalink / raw)
  To: Stephen Rothwell, linux-acpi; +Cc: linux-next, LKML

On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:

> Hi all,

On i386 (X86_32):

drivers/acpi/apei/ghes.c:542: warning: integer overflow in expression
drivers/acpi/apei/ghes.c:619: warning: integer overflow in expression

ghes.c:(.text+0x46289): undefined reference to `__udivdi3'
  in function ghes_estatus_cache_add().

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: Tree for July 20 (acpi/apei/ghes)
  2011-07-20 16:36 ` linux-next: Tree for July 20 (acpi/apei/ghes) Randy Dunlap
@ 2011-07-20 16:38   ` Randy Dunlap
  2011-07-20 22:06     ` Sedat Dilek
  2011-08-02 22:05     ` Len Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2011-07-20 16:38 UTC (permalink / raw)
  To: linux-acpi; +Cc: Stephen Rothwell, linux-next, LKML

On Wed, 20 Jul 2011 09:36:33 -0700 Randy Dunlap wrote:

> On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:
> 
> > Hi all,
> 
> On i386 (X86_32):
> 
> drivers/acpi/apei/ghes.c:542: warning: integer overflow in expression
> drivers/acpi/apei/ghes.c:619: warning: integer overflow in expression
> 
> ghes.c:(.text+0x46289): undefined reference to `__udivdi3'
>   in function ghes_estatus_cache_add().

That's on:
		period = duration / (count + 1);

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: Tree for July 20 (acpi/apei/ghes)
  2011-07-20 16:38   ` Randy Dunlap
@ 2011-07-20 22:06     ` Sedat Dilek
  2011-08-02 22:05     ` Len Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Sedat Dilek @ 2011-07-20 22:06 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-acpi, Stephen Rothwell, linux-next, LKML

On Wed, Jul 20, 2011 at 6:38 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On Wed, 20 Jul 2011 09:36:33 -0700 Randy Dunlap wrote:
>
>> On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:
>>
>> > Hi all,
>>
>> On i386 (X86_32):
>>
>> drivers/acpi/apei/ghes.c:542: warning: integer overflow in expression
>> drivers/acpi/apei/ghes.c:619: warning: integer overflow in expression
>>
>> ghes.c:(.text+0x46289): undefined reference to `__udivdi3'
>>   in function ghes_estatus_cache_add().
>
> That's on:
>                period = duration / (count + 1);
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> --
> To unsubscribe from this list: send the line "unsubscribe linux-next" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Same here on i386 with CONFIG_ACPI_APEI_GHES=y.

  LD      .tmp_vmlinux1
drivers/built-in.o: In function `ghes_estatus_cache_add':
ghes.c:(.text+0x43d91): undefined reference to `__udivdi3'
make[4]: *** [.tmp_vmlinux1] Error 1

- Sedat -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: Tree for July 20 (acpi/apei/ghes)
  2011-07-20 16:38   ` Randy Dunlap
  2011-07-20 22:06     ` Sedat Dilek
@ 2011-08-02 22:05     ` Len Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Len Brown @ 2011-08-02 22:05 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-acpi, Stephen Rothwell, linux-next, LKML, Huang Ying

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1273 bytes --]

From: Len Brown <len.brown@intel.com>
Subject: [PATCH] APEI GHES: 32-bit buildfix

drivers/acpi/apei/ghes.c:542: warning: integer overflow in expression
drivers/acpi/apei/ghes.c:619: warning: integer overflow in expression

ghes.c:(.text+0x46289): undefined reference to `__udivdi3'
  in function ghes_estatus_cache_add().

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/apei/ghes.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index e92c47c..0784f99 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -65,7 +65,7 @@
 
 #define GHES_ESTATUS_CACHES_SIZE	4
 
-#define GHES_ESTATUS_IN_CACHE_MAX_NSEC	(10 * NSEC_PER_SEC)
+#define GHES_ESTATUS_IN_CACHE_MAX_NSEC	10000000000ULL
 /* Prevent too many caches are allocated because of RCU */
 #define GHES_ESTATUS_CACHE_ALLOCED_MAX	(GHES_ESTATUS_CACHES_SIZE * 3 / 2)
 
@@ -622,7 +622,8 @@ static void ghes_estatus_cache_add(
 			break;
 		}
 		count = atomic_read(&cache->count);
-		period = duration / (count + 1);
+		period = duration;
+		do_div(period, (count + 1));
 		if (period > max_period) {
 			max_period = period;
 			slot = i;
-- 
1.7.6.396.ge0613


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-02 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au>
2011-07-20 16:36 ` linux-next: Tree for July 20 (acpi/apei/ghes) Randy Dunlap
2011-07-20 16:38   ` Randy Dunlap
2011-07-20 22:06     ` Sedat Dilek
2011-08-02 22:05     ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox