The patch titled generic-time: add macro to simplify/hide mask constants has been removed from the -mm tree. Its filename is generic-time-add-macro-to-simplify-hide-mask.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: generic-time: add macro to simplify/hide mask constants From: Jim Cromie <jim.cromie@xxxxxxxxx> Add a CLOCKSOURCE_MASK macro to simplify initializing the mask for a struct clocksource, and use it to replace literal mask constants in the various clocksource drivers. Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx> Acked-by: John Stultz <johnstul@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/hpet.c | 4 ++-- arch/i386/kernel/i8253.c | 2 +- arch/i386/kernel/tsc.c | 2 +- drivers/clocksource/acpi_pm.c | 2 +- drivers/clocksource/cyclone.c | 4 ++-- include/linux/clocksource.h | 2 ++ 6 files changed, 9 insertions(+), 7 deletions(-) diff -puN arch/i386/kernel/hpet.c~generic-time-add-macro-to-simplify-hide-mask arch/i386/kernel/hpet.c --- a/arch/i386/kernel/hpet.c~generic-time-add-macro-to-simplify-hide-mask +++ a/arch/i386/kernel/hpet.c @@ -6,7 +6,7 @@ #include <asm/hpet.h> #include <asm/io.h> -#define HPET_MASK 0xFFFFFFFF +#define HPET_MASK CLOCKSOURCE_MASK(32) #define HPET_SHIFT 22 /* FSEC = 10^-15 NSEC = 10^-9 */ @@ -23,7 +23,7 @@ static struct clocksource clocksource_hp .name = "hpet", .rating = 250, .read = read_hpet, - .mask = (cycle_t)HPET_MASK, + .mask = HPET_MASK, .mult = 0, /* set below */ .shift = HPET_SHIFT, .is_continuous = 1, diff -puN arch/i386/kernel/i8253.c~generic-time-add-macro-to-simplify-hide-mask arch/i386/kernel/i8253.c --- a/arch/i386/kernel/i8253.c~generic-time-add-macro-to-simplify-hide-mask +++ a/arch/i386/kernel/i8253.c @@ -69,7 +69,7 @@ static struct clocksource clocksource_pi .name = "pit", .rating = 110, .read = pit_read, - .mask = (cycle_t)-1, + .mask = CLOCKSOURCE_MASK(64), .mult = 0, .shift = 20, }; diff -puN arch/i386/kernel/tsc.c~generic-time-add-macro-to-simplify-hide-mask arch/i386/kernel/tsc.c --- a/arch/i386/kernel/tsc.c~generic-time-add-macro-to-simplify-hide-mask +++ a/arch/i386/kernel/tsc.c @@ -337,7 +337,7 @@ static struct clocksource clocksource_ts .name = "tsc", .rating = 300, .read = read_tsc, - .mask = (cycle_t)-1, + .mask = CLOCKSOURCE_MASK(64), .mult = 0, /* to be set */ .shift = 22, .update_callback = tsc_update_callback, diff -puN drivers/clocksource/acpi_pm.c~generic-time-add-macro-to-simplify-hide-mask drivers/clocksource/acpi_pm.c --- a/drivers/clocksource/acpi_pm.c~generic-time-add-macro-to-simplify-hide-mask +++ a/drivers/clocksource/acpi_pm.c @@ -32,7 +32,7 @@ */ u32 pmtmr_ioport __read_mostly; -#define ACPI_PM_MASK 0xFFFFFF /* limit it to 24 bits */ +#define ACPI_PM_MASK CLOCKSOURCE_MASK(24) /* limit it to 24 bits */ static inline u32 read_pmtmr(void) { diff -puN drivers/clocksource/cyclone.c~generic-time-add-macro-to-simplify-hide-mask drivers/clocksource/cyclone.c --- a/drivers/clocksource/cyclone.c~generic-time-add-macro-to-simplify-hide-mask +++ a/drivers/clocksource/cyclone.c @@ -14,7 +14,7 @@ #define CYCLONE_MPCS_OFFSET 0x51A8 /* offset to select register */ #define CYCLONE_MPMC_OFFSET 0x51D0 /* offset to count register */ #define CYCLONE_TIMER_FREQ 99780000 /* 100Mhz, but not really */ -#define CYCLONE_TIMER_MASK 0xFFFFFFFF /* 32 bit mask */ +#define CYCLONE_TIMER_MASK CLOCKSOURCE_MASK(32) /* 32 bit mask */ int use_cyclone = 0; static void __iomem *cyclone_ptr; @@ -28,7 +28,7 @@ static struct clocksource clocksource_cy .name = "cyclone", .rating = 250, .read = read_cyclone, - .mask = (cycle_t)CYCLONE_TIMER_MASK, + .mask = CYCLONE_TIMER_MASK, .mult = 10, .shift = 0, .is_continuous = 1, diff -puN include/linux/clocksource.h~generic-time-add-macro-to-simplify-hide-mask include/linux/clocksource.h --- a/include/linux/clocksource.h~generic-time-add-macro-to-simplify-hide-mask +++ a/include/linux/clocksource.h @@ -65,6 +65,8 @@ struct clocksource { u64 interval_snsecs; }; +/* simplify initialization of mask field */ +#define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) /** * clocksource_khz2mult - calculates mult from khz and shift _ Patches currently in -mm which might be from jim.cromie@xxxxxxxxx are origin.patch chardev-gpio-for-scx200-pc-8736x-whitespace.patch chardev-gpio-for-scx200-pc-8736x-modernize.patch chardev-gpio-for-scx200-pc-8736x-add-platforn_device.patch chardev-gpio-for-scx200-pc-8736x-device-minor.patch chardev-gpio-for-scx200-pc-8736x-put-gpio_dump.patch chardev-gpio-for-scx200-pc-8736x-add-v-command.patch chardev-gpio-for-scx200-pc-8736x-refactor-scx200_probe.patch chardev-gpio-for-scx200-pc-8736x-add-gpio-ops.patch chardev-gpio-for-scx200-pc-8736x-dispatch.patch chardev-gpio-for-scx200-pc-8736x-add-empty.patch chardev-gpio-for-scx200-pc-8736x-migrate-file-ops.patch chardev-gpio-for-scx200-pc-8736x-migrate-gpio_dump.patch chardev-gpio-for-scx200-pc-8736x-add-new-pc8736x_gpio.patch chardev-gpio-for-scx200-pc-8736x-add-platform_device.patch chardev-gpio-for-scx200-pc-8736x-use-dev_dbg.patch chardev-gpio-for-scx200-pc-8736x-fix-gpio_current.patch chardev-gpio-for-scx200-pc-8736x-replace-spinlocks.patch chardev-gpio-for-scx200-pc-8736x-replace-spinlocks-include-linux-ioh.patch chardev-gpio-for-scx200-pc-8736x-display-pin.patch chardev-gpio-for-scx200-pc-8736x-add-proper.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html