diff options
| author | Kyle Repinski <repinski23@gmail.com> | 2015-01-04 19:17:49 -0600 |
|---|---|---|
| committer | Kyle Repinski <repinski23@gmail.com> | 2015-01-04 19:17:49 -0600 |
| commit | 608cbca83475145c6eff9b2c28c9e20aad31a283 (patch) | |
| tree | a6ff44fe2a5c39107b0fbef2c5ab2c3326371fcd | |
| parent | 41062d90cc33004b95b0fbd95b954a9e027c559c (diff) | |
GCC 4.8 and above are breaking this code, even with as little as -Og.
Signed-off-by: Kyle Repinski <repinski23@gmail.com>
| -rw-r--r-- | drivers/mmc/core/quirks.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c index e6643695b24..a1b172f76bd 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.c @@ -84,6 +84,13 @@ void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table) } EXPORT_SYMBOL(mmc_fixup_device); +/* GCC 4.8 and above mangle the eMMC firmware patching code... */ +#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 8 ) +#pragma GCC push_options +/* As a workaround, drop the optimization level */ +#pragma GCC optimize ("O0") +#endif + /* * Quirk code to fix bug in wear leveling firmware for certain Samsung emmc * chips @@ -306,3 +313,7 @@ void mmc_fixup_samsung_fw(struct mmc_card *card) pr_err("%s : Failed to fixup Samsung emmc firmware(%d)\n", mmc_hostname(card->host), err); } + +#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 8 ) +#pragma GCC pop_options +#endif |
