- Fix compilation with GCC 4.0-20041219.
authorFilip Navara <filip.navara@gmail.com>
Sat, 25 Dec 2004 11:21:48 +0000 (11:21 +0000)
committerFilip Navara <filip.navara@gmail.com>
Sat, 25 Dec 2004 11:21:48 +0000 (11:21 +0000)
- Don't try to stick (1 << 8) into entry.delivery_mode which is 3-bit integer.

svn path=/trunk/; revision=12325

reactos/hal/halx86/include/apic.h
reactos/hal/halx86/include/mps.h
reactos/hal/halx86/mp/apic.c
reactos/hal/halx86/mp/processor_mp.c

index 47b7025..89bba37 100644 (file)
 #define APIC_ICR0_DESTS    (0x3 << 18)    /* Destination Shorthand */
 
 /* Delivery Modes */
-#define APIC_DM_FIXED            (0x0 << 8)
-#define APIC_DM_LOWEST         (0x1 << 8)
-#define APIC_DM_SMI                (0x2 << 8)
-#define APIC_DM_REMRD            (0x3 << 8)
-#define APIC_DM_NMI                (0x4 << 8)
+#define APIC_DM_FIXED    (0x0 << 8)
+#define APIC_DM_LOWEST    (0x1 << 8)
+#define APIC_DM_SMI       (0x2 << 8)
+#define APIC_DM_REMRD     (0x3 << 8)
+#define APIC_DM_NMI       (0x4 << 8)
 #define APIC_DM_INIT      (0x5 << 8)
 #define APIC_DM_STARTUP   (0x6 << 8)
 #define APIC_DM_EXTINT   (0x7 << 8)
@@ -174,7 +174,7 @@ typedef struct _CPU_INFO
 /* Prototypes */
 
 
-volatile inline ULONG APICRead(ULONG Offset);
+inline ULONG APICRead(ULONG Offset);
 inline VOID APICWrite(ULONG Offset, ULONG Value);
 VOID APICSendIPI(ULONG Target, ULONG Mode); 
 
index c2f5506..f53b935 100644 (file)
@@ -280,7 +280,7 @@ typedef enum {
 /* Prototypes */
 
 VOID HalpInitMPS(VOID);
-volatile ULONG IOAPICRead(ULONG Apic, ULONG Offset);
+ULONG IOAPICRead(ULONG Apic, ULONG Offset);
 VOID IOAPICWrite(ULONG Apic, ULONG Offset, ULONG Value);
 VOID IOAPICMaskIrq(ULONG Irq);
 VOID IOAPICUnmaskIrq(ULONG Irq);
index 91bc774..1529237 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: apic.c,v 1.1 2004/12/03 20:10:44 gvg Exp $
+/* $Id: apic.c,v 1.2 2004/12/25 11:21:48 navaraf Exp $
  *
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS kernel
@@ -261,7 +261,7 @@ VOID HaliInitBSP(VOID)
    APICCalibrateTimer(BootCPU);
 }
 
-volatile inline ULONG _APICRead(ULONG Offset)
+inline ULONG _APICRead(ULONG Offset)
 {
    PULONG p;
 
@@ -297,7 +297,7 @@ inline VOID APICWrite(ULONG Offset,
 
 
 #if 0
-volatile inline ULONG APICRead(ULONG Offset)
+inline ULONG APICRead(ULONG Offset)
 {
    PULONG p;
 
@@ -305,7 +305,7 @@ volatile inline ULONG APICRead(ULONG Offset)
    return *p;
 }
 #else
-volatile inline ULONG APICRead(ULONG Offset)
+inline ULONG APICRead(ULONG Offset)
 {
    PULONG p;
    ULONG CPU = (_APICRead(APIC_ID) & APIC_ID_MASK) >> 24;
index 0b11e73..067615b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: processor_mp.c,v 1.1 2004/12/03 20:10:44 gvg Exp $
+/* $Id: processor_mp.c,v 1.2 2004/12/25 11:21:48 navaraf Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -126,7 +126,7 @@ VOID Enable8259AIrq(ULONG irq)
 
 /* Functions for handling I/O APICs */
 
-volatile ULONG IOAPICRead(ULONG Apic, ULONG Offset)
+ULONG IOAPICRead(ULONG Apic, ULONG Offset)
 {
   PULONG Base;
 
@@ -616,7 +616,7 @@ VOID IOAPICSetupIrqs(VOID)
          */
         memset(&entry,0,sizeof(entry));
 
-        entry.delivery_mode = APIC_DM_LOWEST;
+        entry.delivery_mode = (APIC_DM_LOWEST >> 8);
         entry.dest_mode = 1;  /* logical delivery */
         entry.mask = 1;       /* disable IRQ */
 #if 0