diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-02 21:07:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-02 21:07:36 -0400 |
commit | d08c31812e5ce5867ff0fe1da68d6c375984a597 (patch) | |
tree | 9cbb8a993d6105909ff1d3009be879d0ebc914a3 | |
parent | 27667f4744fc5a0f3e50910e78740bac5670d18b (diff) | |
parent | b8d65e9662b1ffb3b52a65fd11b0b968022dc6a1 (diff) |
Merge tag 'powerpc-4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman:
- TCE table memory calculation fix from Alexey
- Build fix for ans-lcd from Luis
- Unbalanced IRQ warning fix from Alistair
* tag 'powerpc-4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/eeh-powernv: Fix unbalanced IRQ warning
macintosh/ans-lcd: fix build failure after module_init/exit relocation
powerpc/powernv/ioda2: Fix calculation for memory allocated for TCE table
-rw-r--r-- | arch/powerpc/platforms/powernv/eeh-powernv.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 11 | ||||
-rw-r--r-- | drivers/macintosh/ans-lcd.c | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c index 5cf5e6ea213b..7cf0df859d05 100644 --- a/arch/powerpc/platforms/powernv/eeh-powernv.c +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c | |||
@@ -1478,7 +1478,7 @@ static int pnv_eeh_next_error(struct eeh_pe **pe) | |||
1478 | } | 1478 | } |
1479 | 1479 | ||
1480 | /* Unmask the event */ | 1480 | /* Unmask the event */ |
1481 | if (eeh_enabled()) | 1481 | if (ret == EEH_NEXT_ERR_NONE && eeh_enabled()) |
1482 | enable_irq(eeh_event_irq); | 1482 | enable_irq(eeh_event_irq); |
1483 | 1483 | ||
1484 | return ret; | 1484 | return ret; |
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 5738d315248b..85cbc96eff6c 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -2220,7 +2220,7 @@ static void pnv_pci_ioda_setup_opal_tce_kill(struct pnv_phb *phb) | |||
2220 | 2220 | ||
2221 | static __be64 *pnv_pci_ioda2_table_do_alloc_pages(int nid, unsigned shift, | 2221 | static __be64 *pnv_pci_ioda2_table_do_alloc_pages(int nid, unsigned shift, |
2222 | unsigned levels, unsigned long limit, | 2222 | unsigned levels, unsigned long limit, |
2223 | unsigned long *current_offset) | 2223 | unsigned long *current_offset, unsigned long *total_allocated) |
2224 | { | 2224 | { |
2225 | struct page *tce_mem = NULL; | 2225 | struct page *tce_mem = NULL; |
2226 | __be64 *addr, *tmp; | 2226 | __be64 *addr, *tmp; |
@@ -2236,6 +2236,7 @@ static __be64 *pnv_pci_ioda2_table_do_alloc_pages(int nid, unsigned shift, | |||
2236 | } | 2236 | } |
2237 | addr = page_address(tce_mem); | 2237 | addr = page_address(tce_mem); |
2238 | memset(addr, 0, allocated); | 2238 | memset(addr, 0, allocated); |
2239 | *total_allocated += allocated; | ||
2239 | 2240 | ||
2240 | --levels; | 2241 | --levels; |
2241 | if (!levels) { | 2242 | if (!levels) { |
@@ -2245,7 +2246,7 @@ static __be64 *pnv_pci_ioda2_table_do_alloc_pages(int nid, unsigned shift, | |||
2245 | 2246 | ||
2246 | for (i = 0; i < entries; ++i) { | 2247 | for (i = 0; i < entries; ++i) { |
2247 | tmp = pnv_pci_ioda2_table_do_alloc_pages(nid, shift, | 2248 | tmp = pnv_pci_ioda2_table_do_alloc_pages(nid, shift, |
2248 | levels, limit, current_offset); | 2249 | levels, limit, current_offset, total_allocated); |
2249 | if (!tmp) | 2250 | if (!tmp) |
2250 | break; | 2251 | break; |
2251 | 2252 | ||
@@ -2267,7 +2268,7 @@ static long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset, | |||
2267 | struct iommu_table *tbl) | 2268 | struct iommu_table *tbl) |
2268 | { | 2269 | { |
2269 | void *addr; | 2270 | void *addr; |
2270 | unsigned long offset = 0, level_shift; | 2271 | unsigned long offset = 0, level_shift, total_allocated = 0; |
2271 | const unsigned window_shift = ilog2(window_size); | 2272 | const unsigned window_shift = ilog2(window_size); |
2272 | unsigned entries_shift = window_shift - page_shift; | 2273 | unsigned entries_shift = window_shift - page_shift; |
2273 | unsigned table_shift = max_t(unsigned, entries_shift + 3, PAGE_SHIFT); | 2274 | unsigned table_shift = max_t(unsigned, entries_shift + 3, PAGE_SHIFT); |
@@ -2286,7 +2287,7 @@ static long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset, | |||
2286 | 2287 | ||
2287 | /* Allocate TCE table */ | 2288 | /* Allocate TCE table */ |
2288 | addr = pnv_pci_ioda2_table_do_alloc_pages(nid, level_shift, | 2289 | addr = pnv_pci_ioda2_table_do_alloc_pages(nid, level_shift, |
2289 | levels, tce_table_size, &offset); | 2290 | levels, tce_table_size, &offset, &total_allocated); |
2290 | 2291 | ||
2291 | /* addr==NULL means that the first level allocation failed */ | 2292 | /* addr==NULL means that the first level allocation failed */ |
2292 | if (!addr) | 2293 | if (!addr) |
@@ -2308,7 +2309,7 @@ static long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset, | |||
2308 | page_shift); | 2309 | page_shift); |
2309 | tbl->it_level_size = 1ULL << (level_shift - 3); | 2310 | tbl->it_level_size = 1ULL << (level_shift - 3); |
2310 | tbl->it_indirect_levels = levels - 1; | 2311 | tbl->it_indirect_levels = levels - 1; |
2311 | tbl->it_allocated_size = offset; | 2312 | tbl->it_allocated_size = total_allocated; |
2312 | 2313 | ||
2313 | pr_devel("Created TCE table: ws=%08llx ts=%lx @%08llx\n", | 2314 | pr_devel("Created TCE table: ws=%08llx ts=%lx @%08llx\n", |
2314 | window_size, tce_table_size, bus_offset); | 2315 | window_size, tce_table_size, bus_offset); |
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c index 1a57e88a38f7..cd35079c8c98 100644 --- a/drivers/macintosh/ans-lcd.c +++ b/drivers/macintosh/ans-lcd.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/miscdevice.h> | 8 | #include <linux/miscdevice.h> |
9 | #include <linux/fcntl.h> | 9 | #include <linux/fcntl.h> |
10 | #include <linux/init.h> | 10 | #include <linux/module.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | 13 | ||