OpenRISC updates for 6.9
Just a few cleanups and updates that were sent in: - Replace asm/fixmap.h with asm-generic version - Fix to move memblock setup up before it's used during init -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE2cRzVK74bBA6Je/xw7McLV5mJ+QFAmXx1jcACgkQw7McLV5m J+ROPRAAtXoNDt9FM33vumwfWt3TPNwnMbnhMc3hQhBFpm0Uh5P7zzF4EyMSm46F OsFxQ5wNPbMPfmkHHLNmWnyqvwF7t1BPvU15w/Pdrx9v+F28ZFXhzYmKhfuWWc9k D5e16tqJXY1WwMbQEN7XeUZXD5WQeL1oqRxey44tjpSaj/Zs1JhyMRm3QTj0acXt vyCVAnfbsmMfoIxqhloHKY0B2cgSrgBGEpZndE/hBGgL5Y0NDoDHSDmhXLFFGncf DQOaLiBBKtKANcCFJqP6CifZQ3x55Fi20uxEjUOLuaaLpIQDg0LcBUNNgU9RXZrx QgJ78UxDjHy/sQEnncVTVRhX7SXuzchKtLal0SRU5J81loT04/88uDz4wmKeCPHK Pp1OuuoMRNu9rNByrDTtJYmZYJ/y3jaINnxhCgPF4u54DMGiOj8AOgFAc5xWcnvV Ae5wFVC/WXNnudekD6wsGisa/3q+lm69HAxesGXgkb627zleuJysAqDNfQ6drDRP Fn71ATfxCwQ35LqBXEwI7qbQdt/cwNYDJHv6+edaReXkSVgFU6whF5eFE7inGb0/ ROt62vN7XpQ+oVKvpqNmFbRmbrCUvg2AY9DuXlZifcvc9W9M5ZYn/pNm9Y+mHCO0 MaRFRCDD7YVnAGUoqd9+Nkv5IaUc5sVIXt2qvDNQdV5s7N1/9z8= =onUw -----END PGP SIGNATURE----- Merge tag 'for-linus' of https://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "Just a few cleanups and updates that were sent in: - Replace asm/fixmap.h with asm-generic version - Fix to move memblock setup up before it's used during init" * tag 'for-linus' of https://github.com/openrisc/linux: openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix() openrisc: Call setup_memory() earlier in the init sequence
This commit is contained in:
commit
29da654bd2
|
@ -50,35 +50,6 @@ enum fixed_addresses {
|
|||
/* FIXADDR_BOTTOM might be a better name here... */
|
||||
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
|
||||
|
||||
#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
|
||||
#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* 'index to address' translation. If anyone tries to use the idx
|
||||
* directly without tranlation, we catch the bug with a NULL-deference
|
||||
* kernel oops. Illegal ranges of incoming indices are caught too.
|
||||
*/
|
||||
static __always_inline unsigned long fix_to_virt(const unsigned int idx)
|
||||
{
|
||||
/*
|
||||
* this branch gets completely eliminated after inlining,
|
||||
* except when someone tries to use fixaddr indices in an
|
||||
* illegal way. (such as mixing up address types or using
|
||||
* out-of-range indices).
|
||||
*
|
||||
* If it doesn't get removed, the linker will complain
|
||||
* loudly with a reasonably clear error message..
|
||||
*/
|
||||
if (idx >= __end_of_fixed_addresses)
|
||||
BUG();
|
||||
|
||||
return __fix_to_virt(idx);
|
||||
}
|
||||
|
||||
static inline unsigned long virt_to_fix(const unsigned long vaddr)
|
||||
{
|
||||
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
|
||||
return __virt_to_fix(vaddr);
|
||||
}
|
||||
#include <asm-generic/fixmap.h>
|
||||
|
||||
#endif
|
||||
|
|
|
@ -255,6 +255,9 @@ void calibrate_delay(void)
|
|||
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
/* setup memblock allocator */
|
||||
setup_memory();
|
||||
|
||||
unflatten_and_copy_device_tree();
|
||||
|
||||
setup_cpuinfo();
|
||||
|
@ -278,9 +281,6 @@ void __init setup_arch(char **cmdline_p)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* setup memblock allocator */
|
||||
setup_memory();
|
||||
|
||||
/* paging_init() sets up the MMU and marks all pages as reserved */
|
||||
paging_init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue