Skip to content

Commit

Permalink
2732 consistent use of #pragma align would please GCC
Browse files Browse the repository at this point in the history
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Dan McDonald <danmcd@omniti.com>
  • Loading branch information
Richard PALO authored and Dan McDonald committed Dec 1, 2014
1 parent 2ae3114 commit 90b1de1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions usr/src/uts/i86pc/io/fipe/fipe_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ int fipe_pm_throttle_level = 1;
#define CPU_IDLE_CB_PRIO_FIPE (CPU_IDLE_CB_PRIO_LOW_BASE + 0x4000000)

/* Structure to support power management profile. */
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_profiles)
static struct fipe_profile {
uint32_t idle_count;
uint32_t busy_threshold;
Expand All @@ -111,9 +112,9 @@ static struct fipe_profile {
{ 10, 40, 40, 75, 4 },
{ 15, 50, 60, 100, 2 },
};
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_profiles)

/* Structure to store memory controller relative data. */
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_mc_ctrl)
static struct fipe_mc_ctrl {
ddi_acc_handle_t mc_pci_hdl;
unsigned char mc_thrtctrl;
Expand All @@ -122,9 +123,9 @@ static struct fipe_mc_ctrl {
dev_info_t *mc_dip;
boolean_t mc_initialized;
} fipe_mc_ctrl;
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_mc_ctrl)

/* Structure to store IOAT relative information. */
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_ioat_ctrl)
static struct fipe_ioat_control {
kmutex_t ioat_lock;
boolean_t ioat_ready;
Expand All @@ -147,8 +148,8 @@ static struct fipe_ioat_control {
boolean_t ioat_cancel;
boolean_t ioat_try_alloc;
} fipe_ioat_ctrl;
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_ioat_ctrl)

#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_idle_ctrl)
static struct fipe_idle_ctrl {
boolean_t idle_ready;
cpu_idle_callback_handle_t cb_handle;
Expand All @@ -161,13 +162,13 @@ static struct fipe_idle_ctrl {
/* Put here for cache efficiency, it should be in fipe_global_ctrl. */
hrtime_t tick_interval;
} fipe_idle_ctrl;
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_idle_ctrl)

/*
* Global control structure.
* Solaris idle thread has no reentrance issue, so it's enough to count CPUs
* in idle state. Otherwise cpuset_t bitmap should be used to track idle CPUs.
*/
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_gbl_ctrl)
static struct fipe_global_ctrl {
kmutex_t lock;
boolean_t pm_enabled;
Expand All @@ -182,7 +183,6 @@ static struct fipe_global_ctrl {
kstat_t *fipe_kstat;
#endif /* FIPE_KSTAT_SUPPORT */
} fipe_gbl_ctrl;
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_gbl_ctrl)

#define FIPE_CPU_STATE_PAD (128 - \
2 * sizeof (boolean_t) - 4 * sizeof (hrtime_t) - \
Expand All @@ -206,6 +206,7 @@ typedef struct fipe_cpu_state {
#pragma pack()

#ifdef FIPE_KSTAT_SUPPORT
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_kstat)
static struct fipe_kstat_s {
kstat_named_t fipe_enabled;
kstat_named_t fipe_policy;
Expand Down Expand Up @@ -243,7 +244,6 @@ static struct fipe_kstat_s {
{ "ioat_stop_fail_cnt", KSTAT_DATA_UINT64 }
#endif /* FIPE_KSTAT_DETAIL */
};
#pragma align CPU_CACHE_COHERENCE_SIZE(fipe_kstat)

#define FIPE_KSTAT_INC(v) \
atomic_inc_64(&fipe_kstat.v.value.ui64)
Expand Down

0 comments on commit 90b1de1

Please sign in to comment.