Skip to content

Commit 9dec17e

Browse files
dhowellsLinus Torvalds
authored andcommitted
[PATCH] FRV: Fix FRV arch compile errors
Fix some FRV arch compile errors, including: (*) Marking nr_kernel_pages as __meminitdata so that references to it end up being properly calculated rather than being assumed to be in the small data section (and thus calculated wrt the GP register). Not doing this causes the linker to emit errors as the offset is too big to fit into the load instruction. (*) Move pm_power_off into an unconditionally compiled .c file as it's now unconditionally accessed. (*) Declare frv_change_cmode() in a header file rather than in a .c file, and declare it asmlinkage. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 1aeb21d commit 9dec17e

5 files changed

Lines changed: 16 additions & 9 deletions

File tree

‎arch/frv/kernel/local.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ extern void (*__power_switch_wake_cleanup)(void);
5151
/* time.c */
5252
extern void time_divisor_init(void);
5353

54+
/* cmode.S */
55+
extern asmlinkage void frv_change_cmode(int);
56+
5457

5558
#endif /* __ASSEMBLY__ */
5659
#endif /* _FRV_LOCAL_H */

‎arch/frv/kernel/pm.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626

2727
#include "local.h"
2828

29-
void (*pm_power_off)(void);
30-
EXPORT_SYMBOL(pm_power_off);
31-
32-
extern void frv_change_cmode(int);
33-
3429
/*
3530
* Debug macros
3631
*/

‎arch/frv/kernel/process.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* 2 of the License, or (at your option) any later version.
1111
*/
1212

13+
#include <linux/module.h>
1314
#include <linux/errno.h>
1415
#include <linux/sched.h>
1516
#include <linux/kernel.h>
@@ -38,6 +39,9 @@ asmlinkage void ret_from_fork(void);
3839

3940
#include <asm/pgalloc.h>
4041

42+
void (*pm_power_off)(void);
43+
EXPORT_SYMBOL(pm_power_off);
44+
4145
struct task_struct *alloc_task_struct(void)
4246
{
4347
struct task_struct *p = kmalloc(THREAD_SIZE, GFP_KERNEL);

‎arch/frv/mb93090-mb00/pci-vdk.c‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,9 @@ int __init pcibios_init(void)
406406
ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff;
407407
ioport_resource.end += ioport_resource.start;
408408

409-
printk("PCI IO window: %08lx-%08lx\n", ioport_resource.start, ioport_resource.end);
409+
printk("PCI IO window: %08llx-%08llx\n",
410+
(unsigned long long) ioport_resource.start,
411+
(unsigned long long) ioport_resource.end);
410412

411413
iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00;
412414

@@ -416,8 +418,11 @@ int __init pcibios_init(void)
416418
iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff;
417419
iomem_resource.end += iomem_resource.start;
418420

419-
printk("PCI MEM window: %08lx-%08lx\n", iomem_resource.start, iomem_resource.end);
420-
printk("PCI DMA memory: %08lx-%08lx\n", dma_coherent_mem_start, dma_coherent_mem_end);
421+
printk("PCI MEM window: %08llx-%08llx\n",
422+
(unsigned long long) iomem_resource.start,
423+
(unsigned long long) iomem_resource.end);
424+
printk("PCI DMA memory: %08lx-%08lx\n",
425+
dma_coherent_mem_start, dma_coherent_mem_end);
421426

422427
if (!pci_probe)
423428
return -ENXIO;

‎include/linux/bootmem.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static inline void *alloc_remap(int nid, unsigned long size)
9191
}
9292
#endif
9393

94-
extern unsigned long nr_kernel_pages;
94+
extern unsigned long __meminitdata nr_kernel_pages;
9595
extern unsigned long nr_all_pages;
9696

9797
extern void *__init alloc_large_system_hash(const char *tablename,

0 commit comments

Comments
 (0)