diff options
Diffstat (limited to 'arch/sparc')
| -rw-r--r-- | arch/sparc/Kconfig | 1 | ||||
| -rw-r--r-- | arch/sparc/crypto/aes_glue.c | 8 | ||||
| -rw-r--r-- | arch/sparc/crypto/des_glue.c | 37 | ||||
| -rw-r--r-- | arch/sparc/include/asm/pci.h | 2 | ||||
| -rw-r--r-- | arch/sparc/include/asm/pgalloc_32.h | 2 | ||||
| -rw-r--r-- | arch/sparc/include/asm/pgalloc_64.h | 2 | ||||
| -rw-r--r-- | arch/sparc/include/asm/pgtable_32.h | 5 | ||||
| -rw-r--r-- | arch/sparc/include/asm/pgtable_64.h | 6 | ||||
| -rw-r--r-- | arch/sparc/mm/init_32.c | 1 | ||||
| -rw-r--r-- | arch/sparc/mm/init_64.c | 4 | ||||
| -rw-r--r-- | arch/sparc/mm/srmmu.c | 4 | 
11 files changed, 28 insertions, 44 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 7926a2e11bdc..fbc1aecf0f94 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -17,6 +17,7 @@ config SPARC  	select ARCH_MIGHT_HAVE_PC_SERIO  	select OF  	select OF_PROMTREE +	select HAVE_ASM_MODVERSIONS  	select HAVE_IDE  	select HAVE_OPROFILE  	select HAVE_ARCH_KGDB if !SMP || SPARC64 diff --git a/arch/sparc/crypto/aes_glue.c b/arch/sparc/crypto/aes_glue.c index 57b474113168..7b946b3dee9d 100644 --- a/arch/sparc/crypto/aes_glue.c +++ b/arch/sparc/crypto/aes_glue.c @@ -197,14 +197,14 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,  	return 0;  } -static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void crypto_aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  {  	struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm);  	ctx->ops->encrypt(&ctx->key[0], (const u32 *) src, (u32 *) dst);  } -static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void crypto_aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  {  	struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); @@ -396,8 +396,8 @@ static struct crypto_alg algs[] = { {  			.cia_min_keysize	= AES_MIN_KEY_SIZE,  			.cia_max_keysize	= AES_MAX_KEY_SIZE,  			.cia_setkey		= aes_set_key, -			.cia_encrypt		= aes_encrypt, -			.cia_decrypt		= aes_decrypt +			.cia_encrypt		= crypto_aes_encrypt, +			.cia_decrypt		= crypto_aes_decrypt  		}  	}  }, { diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c index 281448f72c90..db6010b4e52e 100644 --- a/arch/sparc/crypto/des_glue.c +++ b/arch/sparc/crypto/des_glue.c @@ -12,7 +12,7 @@  #include <linux/mm.h>  #include <linux/types.h>  #include <crypto/algapi.h> -#include <crypto/des.h> +#include <crypto/internal/des.h>  #include <asm/fpumacro.h>  #include <asm/pstate.h> @@ -45,19 +45,15 @@ static int des_set_key(struct crypto_tfm *tfm, const u8 *key,  		       unsigned int keylen)  {  	struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); -	u32 *flags = &tfm->crt_flags; -	u32 tmp[DES_EXPKEY_WORDS]; -	int ret; +	int err;  	/* Even though we have special instructions for key expansion, -	 * we call des_ekey() so that we don't have to write our own +	 * we call des_verify_key() so that we don't have to write our own  	 * weak key detection code.  	 */ -	ret = des_ekey(tmp, key); -	if (unlikely(ret == 0) && (*flags & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)) { -		*flags |= CRYPTO_TFM_RES_WEAK_KEY; -		return -EINVAL; -	} +	err = crypto_des_verify_key(tfm, key); +	if (err) +		return err;  	des_sparc64_key_expand((const u32 *) key, &dctx->encrypt_expkey[0]);  	encrypt_to_decrypt(&dctx->decrypt_expkey[0], &dctx->encrypt_expkey[0]); @@ -68,7 +64,7 @@ static int des_set_key(struct crypto_tfm *tfm, const u8 *key,  extern void des_sparc64_crypt(const u64 *key, const u64 *input,  			      u64 *output); -static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void sparc_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  {  	struct des_sparc64_ctx *ctx = crypto_tfm_ctx(tfm);  	const u64 *K = ctx->encrypt_expkey; @@ -76,7 +72,7 @@ static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  	des_sparc64_crypt(K, (const u64 *) src, (u64 *) dst);  } -static void des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void sparc_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  {  	struct des_sparc64_ctx *ctx = crypto_tfm_ctx(tfm);  	const u64 *K = ctx->decrypt_expkey; @@ -202,14 +198,13 @@ static int des3_ede_set_key(struct crypto_tfm *tfm, const u8 *key,  			    unsigned int keylen)  {  	struct des3_ede_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); -	u32 *flags = &tfm->crt_flags;  	u64 k1[DES_EXPKEY_WORDS / 2];  	u64 k2[DES_EXPKEY_WORDS / 2];  	u64 k3[DES_EXPKEY_WORDS / 2];  	int err; -	err = __des3_verify_key(flags, key); -	if (unlikely(err)) +	err = crypto_des3_ede_verify_key(tfm, key); +	if (err)  		return err;  	des_sparc64_key_expand((const u32 *)key, k1); @@ -235,7 +230,7 @@ static int des3_ede_set_key(struct crypto_tfm *tfm, const u8 *key,  extern void des3_ede_sparc64_crypt(const u64 *key, const u64 *input,  				   u64 *output); -static void des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void sparc_des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  {  	struct des3_ede_sparc64_ctx *ctx = crypto_tfm_ctx(tfm);  	const u64 *K = ctx->encrypt_expkey; @@ -243,7 +238,7 @@ static void des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  	des3_ede_sparc64_crypt(K, (const u64 *) src, (u64 *) dst);  } -static void des3_ede_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void sparc_des3_ede_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)  {  	struct des3_ede_sparc64_ctx *ctx = crypto_tfm_ctx(tfm);  	const u64 *K = ctx->decrypt_expkey; @@ -390,8 +385,8 @@ static struct crypto_alg algs[] = { {  			.cia_min_keysize	= DES_KEY_SIZE,  			.cia_max_keysize	= DES_KEY_SIZE,  			.cia_setkey		= des_set_key, -			.cia_encrypt		= des_encrypt, -			.cia_decrypt		= des_decrypt +			.cia_encrypt		= sparc_des_encrypt, +			.cia_decrypt		= sparc_des_decrypt  		}  	}  }, { @@ -447,8 +442,8 @@ static struct crypto_alg algs[] = { {  			.cia_min_keysize	= DES3_EDE_KEY_SIZE,  			.cia_max_keysize	= DES3_EDE_KEY_SIZE,  			.cia_setkey		= des3_ede_set_key, -			.cia_encrypt		= des3_ede_encrypt, -			.cia_decrypt		= des3_ede_decrypt +			.cia_encrypt		= sparc_des3_ede_encrypt, +			.cia_decrypt		= sparc_des3_ede_decrypt  		}  	}  }, { diff --git a/arch/sparc/include/asm/pci.h b/arch/sparc/include/asm/pci.h index cfec79bb1831..4deddf430e5d 100644 --- a/arch/sparc/include/asm/pci.h +++ b/arch/sparc/include/asm/pci.h @@ -38,8 +38,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)  #define arch_can_pci_mmap_io()	1  #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA  #define get_pci_unmapped_area get_fb_unmapped_area - -#define HAVE_ARCH_PCI_RESOURCE_TO_USER  #endif /* CONFIG_SPARC64 */  #if defined(CONFIG_SPARC64) || defined(CONFIG_LEON_PCI) diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h index 282be50a4adf..10538a4d1a1e 100644 --- a/arch/sparc/include/asm/pgalloc_32.h +++ b/arch/sparc/include/asm/pgalloc_32.h @@ -17,8 +17,6 @@ void srmmu_free_nocache(void *addr, int size);  extern struct resource sparc_iomap; -#define check_pgt_cache()	do { } while (0) -  pgd_t *get_pgd_fast(void);  static inline void free_pgd_fast(pgd_t *pgd)  { diff --git a/arch/sparc/include/asm/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h index 48abccba4991..9d3e5cc95bbb 100644 --- a/arch/sparc/include/asm/pgalloc_64.h +++ b/arch/sparc/include/asm/pgalloc_64.h @@ -69,8 +69,6 @@ void pte_free(struct mm_struct *mm, pgtable_t ptepage);  #define pmd_populate(MM, PMD, PTE)		pmd_set(MM, PMD, PTE)  #define pmd_pgtable(PMD)			((pte_t *)__pmd_page(PMD)) -#define check_pgt_cache()	do { } while (0) -  void pgtable_free(void *table, bool is_page);  #ifdef CONFIG_SMP diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 4eebed6c6781..31da44826645 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h @@ -445,9 +445,4 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma,  /* We provide our own get_unmapped_area to cope with VA holes for userland */  #define HAVE_ARCH_UNMAPPED_AREA -/* - * No page table caches to initialise - */ -#define pgtable_cache_init()	do { } while (0) -  #endif /* !(_SPARC_PGTABLE_H) */ diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 1599de730532..6ae8016ef4ec 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -1078,7 +1078,7 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma,  }  #define io_remap_pfn_range io_remap_pfn_range  -static inline unsigned long untagged_addr(unsigned long start) +static inline unsigned long __untagged_addr(unsigned long start)  {  	if (adi_capable()) {  		long addr = start; @@ -1098,7 +1098,8 @@ static inline unsigned long untagged_addr(unsigned long start)  	return start;  } -#define untagged_addr untagged_addr +#define untagged_addr(addr) \ +	((__typeof__(addr))(__untagged_addr((unsigned long)(addr))))  static inline bool pte_access_permitted(pte_t pte, bool write)  { @@ -1135,7 +1136,6 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long,  				   unsigned long);  #define HAVE_ARCH_FB_UNMAPPED_AREA -void pgtable_cache_init(void);  void sun4v_register_fault_status(void);  void sun4v_ktsb_register(void);  void __init cheetah_ecache_flush_init(void); diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index 046ab116cc8c..906eda1158b4 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -31,7 +31,6 @@  #include <asm/page.h>  #include <asm/pgtable.h>  #include <asm/vaddrs.h> -#include <asm/pgalloc.h>	/* bug in asm-generic/tlb.h: check_pgt_cache */  #include <asm/setup.h>  #include <asm/tlb.h>  #include <asm/prom.h> diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 4b099dd7a767..e6d91819da92 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -2903,7 +2903,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm)  	struct page *page = alloc_page(GFP_KERNEL | __GFP_ZERO);  	if (!page)  		return NULL; -	if (!pgtable_page_ctor(page)) { +	if (!pgtable_pte_page_ctor(page)) {  		free_unref_page(page);  		return NULL;  	} @@ -2919,7 +2919,7 @@ static void __pte_free(pgtable_t pte)  {  	struct page *page = virt_to_page(pte); -	pgtable_page_dtor(page); +	pgtable_pte_page_dtor(page);  	__free_page(page);  } diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index aaebbc00d262..cc3ad64479ac 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -378,7 +378,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm)  	if ((pte = (unsigned long)pte_alloc_one_kernel(mm)) == 0)  		return NULL;  	page = pfn_to_page(__nocache_pa(pte) >> PAGE_SHIFT); -	if (!pgtable_page_ctor(page)) { +	if (!pgtable_pte_page_ctor(page)) {  		__free_page(page);  		return NULL;  	} @@ -389,7 +389,7 @@ void pte_free(struct mm_struct *mm, pgtable_t pte)  {  	unsigned long p; -	pgtable_page_dtor(pte); +	pgtable_pte_page_dtor(pte);  	p = (unsigned long)page_address(pte);	/* Cached address (for test) */  	if (p == 0)  		BUG();  |