Skip to contentSkip to conversation

hpet related

PATCH In review Robert Picco 2 participants 3 messages Jun 28, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hpet related

Hi Andrew:

Some hpet clean up and a fix to the RTC request_irq issue.

thanks,

Bob

arch/i386/kernel/time_hpet.c +0 -0
diff -ruN -X /home/picco/losl/dontdiff linux-2.6.7-mm2-orig/arch/i386/kernel/time_hpet.c linux-2.6.7-mm2-hpet/arch/i386/kernel/time_hpet.c
@@ -155,9 +155,9 @@
		hd.hd_address = hpet_virt_address;
		hd.hd_nirqs = ntimer;
		hd.hd_flags = HPET_DATA_PLATFORM;

- HD_STATE(&hd, 0);
+ hpet_timer_reserved(&hd, 0);
#ifdef CONFIG_HPET_EMULATE_RTC
- HD_STATE(&hd, 1);
+ hpet_timer_reserved(&hd, 1);

#endif
		hd.hd_irq[0] = HPET_LEGACY_8254;
		hd.hd_irq[1] = HPET_LEGACY_RTC;
drivers/char/Kconfig +0 -0
diff -ruN -X /home/picco/losl/dontdiff linux-2.6.7-mm2-orig/drivers/char/Kconfig linux-2.6.7-mm2-hpet/drivers/char/Kconfig
@@ -955,8 +955,8 @@

default n
depends on ACPI
help

-	  If you say Y here, you will have a device named "/dev/hpet/XX" for
-	  each timer supported by the HPET.  The timers are
+	  If you say Y here, you will have a miscdevice named "/dev/hpet/".  Each
+	  open selects one of the timers supported by the HPET.  The timers are

non-periodioc and/or periodic.

config HPET_RTC_IRQ

drivers/char/rtc.c +0 -0
diff -ruN -X /home/picco/losl/dontdiff linux-2.6.7-mm2-orig/drivers/char/rtc.c linux-2.6.7-mm2-hpet/drivers/char/rtc.c
@@ -99,7 +99,6 @@
 

#ifdef CONFIG_HPET_RTC_IRQ
#undef RTC_IRQ
-#define RTC_IRQ 0
#endif

#ifdef RTC_IRQ

include/linux/hpet.h +0 -0
diff -ruN -X /home/picco/losl/dontdiff linux-2.6.7-mm2-orig/include/linux/hpet.h linux-2.6.7-mm2-hpet/include/linux/hpet.h
@@ -54,12 +54,6 @@

#define HPET_LEG_RT_CNF_MASK (2UL)
#define HPET_ENABLE_CNF_MASK (1UL)

-/*
- * HPET interrupt status register
- */
-
-#define HPET_ISR_CLEAR(HPET, TIMER) \
- (HPET)->hpet_isr |= (1UL << TIMER)

/*
* Timer configuration register
@@ -115,8 +109,6 @@

	void *ht_opaque;
};

-#define HD_STATE(HD, TIMER) (HD)->hd_state |= (1 << TIMER)
-

struct hpet_data {
	unsigned long hd_address;
	unsigned short hd_nirqs;

@@ -127,6 +119,12 @@

#define HPET_DATA_PLATFORM 0x0001 /* platform call to hpet_alloc */

+static inline void hpet_timer_reserved(struct hpet_data *hd, int timer) +{
+ hd->hd_state |= (1 << timer);
+ return;
+}
+
int hpet_alloc(struct hpet_data *);
int hpet_register(struct hpet_task *, int);
int hpet_unregister(struct hpet_task *);

#1 lore raw
Quoted 6 lines · Robert Picco

+static inline void hpet_timer_reserved(struct hpet_data *hd, int timer)
+{
+ hd->hd_state |= (1 << timer);
+ return;
+}

The identifier "hpet_timer_reserved" implies (to me) that the function queries something. Except it doesn't.

Would "hpet_reserve_timer" be a better choice?

#2 lore raw

Sure. I'll make the change and resend patch.

Quoted 23 lines · Andrew Morton

Review

Quoted 7 lines · Robert Picco
(quoted diff) +5 -0
+static inline void hpet_timer_reserved(struct hpet_data *hd, int timer)
+{
+	hd->hd_state |= (1 << timer);
+	return;
+}

The identifier "hpet_timer_reserved" implies (to me) that the function queries something. Except it doesn't.

Would "hpet_reserve_timer" be a better choice?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/