text:
EXPLORE UNICEF
The situation for children
Our Voices: Young people from the Region
Showing 4 results for:
Most relevantNewestOldest
(-) News note (3)
(-) Photo Essay (1)
(-) Breastfeeding (2)
(-) Early childhood development (0)
ECD (1)
Immunization (2)
Infant and young child nutrition (1)
(-) Refugee and migrant children (0)
ECARO (1)
News note
UNICEF signs supply agreement for Pfizer/BioNTech COVID-19 vaccine
https://www.unicef.org/eca/press-releases/unicef-signs-supply-agreement-pfizerbiontech-covid-19-vaccine
NEW YORK, 11 February 2021: , UNICEF announced today the signing of an agreement with Pfizer on behalf of the COVAX Facility for the supply of the Pfizer-BioNTech COVID-19 Vaccine through 2021. Deliveries of the vaccine are anticipated to start as early as the first quarter of 2021, once the countries that were allocated Pfizer-BioNTech vaccine doses in the COVAX allocation…
UNICEF signs supply agreement for Sputnik V COVID-19 vaccine
https://www.unicef.org/eca/press-releases/unicef-signs-supply-agreement-sputnik-v-covid-19-vaccine
UNICEF and Human Vaccine (Limited Liability Company), a wholly-owned subsidiary of the Russian Direct Investment Fund (RDIF), today announced a long-term agreement (LTA) for the supply of the Sputnik V COVID-19 vaccine. This is the fourth long-term supply agreement UNICEF has signed with a COVID-19 vaccine manufacturer. So far this year, UNICEF has signed such agreements with the Serum Institute of India, Pfizer and AstraZeneca. Procurement by UNICEF under this agreement is conditional on the product achieving an Emergency Use Listing from WHO, to confirm the quality, safety and efficacy of the vaccine. In addition, an Advance Purchase Agreement (APA) with Gavi, the Vaccine Alliance, will also be needed for procurement to begin on behalf of the COVAX Facility. Should the COVAX Facility decide to enter into an advance purchase agreement for the supply of the Sputnik V vaccine, UNICEF will be ready to deliver as soon as regulatory milestones have been met. At this point, UNICEF through this LTA, stands ready to access up to 220 million doses of the vaccine available for supply in 2021, to meet country demand. The Sputnik V vaccine consists of two different components of the vaccine to be administered 21 days apart. An exact delivery schedule will be determined in collaboration with the manufacturer. UNICEF's priority is to make sure that all countries have safe, fast and equitable access to COVID-19 vaccine and to help them prepare for the rollout of immunization. The best way to bring the pandemic under control is to ensure that safe and effective vaccines are made available as widely as possible and as quickly as possible, reducing inequity by ensuring that no country or territory is left behind due to its economic status. On 24 February 2021, COVID-19 vaccine vials are produced for the COVAX facility at a manufacturer in Pune, a city located in the western Indian state of Maharashtra. UNICEF/UN0421679?Singh
Why family-friendly policies are critical to increasing breastfeeding rates worldwide - UNICEF
https://www.unicef.org/eca/press-releases/why-family-friendly-policies-are-critical-increasing-breastfeeding-rates-worldwide
: In 2018, less than half of babies worldwide – 43 per cent – were breastfed within the first hour of life. Immediate skin-to skin contact and starting breastfeeding early keeps a baby warm, builds his or her immune system, promotes bonding, boosts a mother's milk supply and increases the chances that she will be able to continue exclusive breastfeeding. Breastmilk is more than just food for babies – it is also a potent medicine for disease prevention that is tailored to the needs of each child. The 'first milk' – or colostrum – is rich in antibodies to protect babies from disease and death.
Breastfeeding: the best gift a mother can give her child
https://www.unicef.org/eca/stories/breastfeeding-best-gift-mother-can-give-her-child
Breastmilk saves lives, protects babies and mothers against deadly diseases, and leads to better IQ and educational outcomes, yet rates of breastfeeding in Europe and Central Asia are low, with only 23 percent of the wealthiest families and 31 percent of the poorest breastfeeding up to the recommended age of two. Empowering and enabling women to breastfeed needs to be at the heart of countries' efforts to keep every child alive and to build healthy, smart and productive societies. "Breastfeeding is the best gift a mother, rich or poor, can give her child, as well as herself," said Shahida Azfar, UNICEF's Deputy Executive Director. "We must give the world's mothers the support they need to breastfeed." A mother breasfeeds her baby at a maternity centre in Tashkent region, Uzbekistan. A mother breasfeeds her baby at a maternity centre in Tashkent region, Uzbekistan. The early initiation of breastfeeding – putting newborns to the breast within the first hour of life – safeguards infants from dying during the most vulnerable time in their lives. Immediate skin-to skin contact and starting breastfeeding early keeps a baby warm, builds his or her immune system, promotes bonding, boosts a mother's milk supply and increases the chances that she will be able to continue exclusive breastfeeding. A mother learns to breastfeed her baby at a maternity hospital in Fergana, Uzbekistan. A mother learns to breastfeed her baby at a maternity hospital in Fergana, Uzbekistan. Breastmilk is safe as it is the right temperature, requires no preparation, and is available even in environments with poor sanitation and unsafe drinking water. It's also more than just food for babies – breastmilk is a potent medicine for disease prevention that is tailored to the needs of each child. The 'first milk' – or colostrum – is rich in antibodies to protect babies from disease and death. A patronage nurse teachers a mother how to breastfeed in Kyzylorda city, Kazakhstan. A patronage nurse teachers a mother how to breastfeed in Kyzylorda city, Kazakhstan. In Kazakhstan, UNICEF has been working with patronage nurses to support mothers to breastfeed their children. The project has been running for several years and includes two visits during pregnancy and nine visits until the child reaches the age of three. As a result, there was a 14 percent increase in the number of children who were exclusively breastfed in the pilot region. A patronage nurse visits a family in Kyzylorda city, Kazakhstan. A patronage nurse visits a family in Kyzylorda city, Kazakhstan. There are several reasons why a mother may not be able to breastfeed, or does not wish to do so. Reasons include low awareness of the importance of breastfeeding and long-term impacts, as well as not knowing how to breastfeed properly which can subsequently cause the mother a lot of pain. Patronage nurses work with mothers to try to overcome these obstacles. A mother breastfeeds her baby, while the father and the older son support them. Mother Jovana breastfeeds her son Aleksa (two-months-old) while older son Ognjen (18-months-old) and husband Nikola support her at a clinic in Serbia. Breastfeeding is not a one-woman job. Women who choose to breastfeed need support from their governments, health systems, workplaces, communities and families to make it work. UNICEF urges governments, the private sector and civil society to create more enabling environments for breastfeeding mothers including arming mothers with the knowledge to make informed decisions, and providing them with the support they need from their families, communities, workplaces and healthcare systems to make exclusive breastfeeding for the first six months happen. Smiling parents watch as their baby breastfeeds at a maternity unit in Armenia. Smiling parents watch as their baby breastfeeds at a maternity unit in Armenia. In Armenia, UNICEF, together with the ministry of health and local health authorities, have created a sustainable parental education system at maternity and primary health-care facilities across the country to encourage breastfeeding and provide support to parents. In a UNICEF-supported space for refugee and migrant families, two mothers breastfeed their babies. In a UNICEF-supported space for refugee and migrant families in Serbia, two mothers breastfeed their babies. During the refugee and migrant crisis in Europe, UNICEF stepped in to provide support for children and mothers. Support included providing private spaces for breastfeeding mothers, nutritional guidance and breastfeeding support. UNICEF supports action to improve infant and young child nutrition across Europe and Central Asia, aiming to ensure that every child has the best possible nutritional start in life. Through its global campaign, Every Child ALIVE , which demands solutions on behalf of the world's newborns, UNICEF urges governments, the private sector and civil society to: Increase funding and awareness to raise breastfeeding rates from birth through the age of two. Put in place strong legal measures to regulate the marketing of infant formula and other breastmilk substitutes as well as bottles and teats. Enact paid family leave and put in place workplace breastfeeding policies, including paid breastfeeding breaks. Implement the ten steps to successful breastfeeding in maternity facilities, and provide breastmilk for sick newborns. Ensure that mothers receive skilled breastfeeding counselling at health facilities and in the first week after delivery. Strengthen links between health facilities and communities, so that mothers are ensured of continued support for breastfeeding. Improve monitoring systems to track improvements in breastfeeding policies, programmes and practices.
UNICEF Home
Situation for children
Data, Research and Reports


Raigarh Limestone Crusher Quarry; ... Quarry Chain Saw, Stone Chain Saw and Marble Chain from China, the Details Include Pictures,Sizes,Color,Material and Origin.
Find great deals on eBay for quarry saw. Shop with confidence.
Bandera Stone Inc is located in southeast Kansas. ... A quarry chain saw is used to make a relief cut five feet deep along a 50 foot length of cleared quarry floor.
Quarry Equipment Chain saw stone cutter & Dexpan Expansive Grout. Comparing to Chain Saw stone cutter quarry equipment, Dexpan ... vs Expansive Grout which is often used in marble, granite, limestone and flagstone quarries.
Arry Chain Saw Limestone. ... At Quarry Ridge Stone, we have set our sights on consistently providing Style, Quality, and Value to our customers.
Quarry Chain Saw Machine ... how artificial sand produced Similar Posts limestone quarrying diamond chainsaw grizly feeder with motor ... used quarrying chainsaw.
Dazzini quarry chain saw, a result of constant and careful research and careful development of materials, without neglecting fundamental aspects such as high quality components and safety in quarries, the hydraulic chain saw range QS are able to ensure best value and best performance in all working conditions in the environment.
chain saw for marble and limestone quarry vaertical and horizontal cut arm rotation : 360° Product Tags. Add Your Tags: Add Tags. Use spaces to separate tags.
Alibaba.com offers 3,180 quarry saw products. About 1% of these are other construction machinery, 1% are mine drilling rig, and 1% are crusher. A wide variety of quarry saw options are available to you, such as stone cutting machine, hacksaw, and hole saw.
Quarry Chain Saw, Stone Chain Saw and Marble Chain … Quarry Chain Saw, Stone Chain Saw and Marble Chain from China, the Details Include Pictures,Sizes,Color,Material and Origin.
1 INTRODUCTION Chain saw machines are used for cutting low abrasive soft to medium strength natural stones with such as travertine and marble, in both underground and surface quarries.
Henry steiner cabins masters thesis - Home - UNIFEOB. However if the value of the euro fell to $1. If money is changed five times, there will be five resulting exchange rates to be used in the advance reconciliation.


Yes, African Mango Extract Pills ship anywhere in the world including El Salvador. They offers free shipping to some countries.
Are you Seeking African Mango Extract in El Salvador? Why Not to Get Online from This Website?
You might have viewed the information regarding African Mango featured on the Dr Oz Program. African Mango made from extracts of the seeds of the fleshy West African fruit Irvingia gabonensis (additionally called African mango), is being praised for its capability to assist lessen body fat, weight, and even cholesterol levels as well as leptin levels in overweight subjects, according to a recent study published in the journal Fats in Wellness and also Illness.
African Mango Extract Capsules from BauerNutrition is made from African Mango Extract and Raspberry Ketone Extract. This Organic Weight reduction Supplement agrees with for Vegans and Vegetarians.
You can purchase any African Mango item from BauerNutrition with self-confidence, recognizing that it's supported without any danger, no inconvenience 60-day cash back warranty. If you wish to make the most of our Unique Savings by buying several containers you can still try the item absolutely SAFE for 67 days! This assurance consists of all African Mango products in Bauer.
African Mango Natural Weight Loss Supplement is considered to be one among the most popular African Mango Extract offered in the market today. Anyhow, Where can I buy African Mango Natural Weight Loss Supplement in El Salvador? You can buy African Mango Natural Weight Loss Supplement African Mango Extract online from the main website. You can place an order from lots of parts of the world consisting of El Salvador. When you can enjoy numerous benefits why should you wait? This African Mango Extract review ought to have tempted you to place an order now.
Labels on African Mango Extract product need to include the following info: declaration of identity, net amount of contents, directions for use, a supplement realities panel, listing serving size, amount and active ingredients, other active ingredients in descending order of predominance, and the name and workplace of the producer, packer or distributor. Constantly follow the maker's day-to-day suggested dose - more isn't always much better. If a producer says to take 2 pills daily, that's all you ought to take. If you take numerous supplements, inspect to see if you are getting the very same component from several sources to make sure you do not exceed the advised everyday allowance for any specific ingredient.
I would suggest you to purchase African Mango Natural Weight Loss Supplement from the official provider. Not only will you get a cash back guarantee, you will receive discreet shipping and billing. The cash back ensure permits you to attempt the African Mango Diet Pills and return it within 6 weeks if you do not begin seeing outcomes! As someone who uses the African Mango Natural Weight Loss Supplement and has contacted customer support previously, the business is extremely reliable. At the time of writing, you can get a discount on the African Mango Natural Weight Loss Supplement official website. For a African Mango Extract it is competitively priced. With a refund ensure too, this absolutely a clever option.
Stay Away From Free Trial Offers Pay very close attention to this one and avoid getting scammed by the supposed totally free trials. These websites fool you into trying their product with a free bottle however Exactly what you don't see is the risk hiding in the small print that says they will be billing your credit card for more products instantly monthly. Then they'll make it incredibly challenging for you to cancel your auto-ship membership. Avoid these frauds by buying from a trustworthy online merchant that does not have a vehicle ship program or charges any type of continuous cost.
Make certain they use a Warranty Does the business back up the quality of their item. Are they positive enough in their item that they're prepared to provide you a Cash back Assurance? If not, don't buy from them. Any trusted supplier needs to permit you to return the product if you're not completely satisfied.
African Mango is the complete weight management option made particularly that can help you manage your weight. Get your confidence back with your brand-new body. Delight in applying your preferred old clothes that utilized to be too tight. Your buddies will take a look at you in awe with how good you look. No more do you have to really feel sluggish and also dull. Start controlling your weight the very easy way with African Mango today.
African Mango has been revealed to help subdue hunger by reducing degrees of a hormone that makes us hungry. It also methods the hypothalamus gland (the human brain's weight and also cravings administration system) right into keeping the physical body's metabolic rate healthy and balanced.
Baseding on the study, topics that took 150mg of this African mango seed extract two times a day revealed significant enhancements in their physical body weight, body fat, as well as waist circumference, as well as a slew of numbers that indicate better heart health and wellness, consisting of plasma total cholesterol levels, LDL cholesterol, blood sugar, C-reactive protein, adiponectin, and leptin degrees-- all without transforming their diet regimen or exercise regimen. Extra research studies have actually revealed comparable results, with subjects dropping weight (about 8-10 pounds) without making various other way of living modifications.
A: African Mango's one-of-a-kind formula is particularly created at burning fat. African Mango promotes weight-loss by boosting fatty tissue metabolic rate and inhibiting fatty tissue storage. African Mango has actually additionally been shown to assist lower appetite by reducing degrees of a bodily hormone that makes you starving.
A: Among the primary issues individuals having is not knowing when to stop when it involves food. African Mango is understood to assist reduce cravings degrees which could aid you quit overeating.
A: As we age our metabolic rate reduces and also we begin saving energy as opposed to utilizing it. African Mango could keep your metabolic process healthy to make certain that you are breaking down you meals correctly.
African Mango Extract Pills Shipping to El Salvador?
You do not need to stress over African Mango Extract Pills distribution to your address due to the fact that presently African Mango Extract Pills shipment is available to all regions or cities throughout El Salvador.


This was another short day, but at least somewhat legit. I rolled into the old Oak Creek campground parking lot around 7, threw food, water, and rock shoes into my pack, and admired Red Rocks in the morning light as I hiked to the mouth of Oak Creek Canyon. The plan was to climb the easier Solar Slab Gully (5.3) and, if I felt good, continue up the route itself, then find the supposedly tricky and nasty walk-off. It was already a bit warm, promising a hot morning on the southeast-facing slabs.
There were already two parties on Johnny Vegas, the route to the left, and a pair from Georgia just starting to solo up the gully, who kindly let me climb through. The gully was steep but mostly easy. Placing gear would have been a nuisance in a couple short chimneying sections, but I fortunately had none to place.
I watched yet another party at the first belay as I contemplated the first pitch above, eventually deciding that I was feeling it today. After walking up the first half, I wandered a bit before finding my way through the steeper upper section on big, fun, positive varnish holds. The second pitch was kind of garbage, stemming and scrambling up a ramp while dodging through the other party's twin ropes.
I was a bit concerned about P3, the crux, which supposedly included some "thin face climbing." After some hand- and foot-jams in the initial crack, I found said climbing on unvarnished white sandstone, but still felt fairly solid. I was soon at the top of the pitch, looking down at the other party's leader as he clipped into the bolted anchor. My time climbing this past fall and winter has clearly helped — I normally don't feel this solid at the start of the season.
P4 followed an amazingly straight crack up to another ledge, though there were enough varnish holds nearby that I rarely treated it as a crack climb. From there, the angle decreased and there were a number of possible lines generally heading up and right. I had the summit to myself, kicking off my shoes and eating an orange as I imagined the fate of the 4 parties below, all funneled into a single route.
I eventually psyched myself up for the walk-off. Red Rocks walk-offs can be anything from mildly unpleasant (Lotta Balls Wall) to epically nasty (Mescalito), with oakbrush, cactus, yucca, and the potential to cliff out. After a long hike up more slickrock past a few ducks, I reached the base of the red (not purple) rock and, after exploring around a small natural arch, started down what I hoped was the correct gully.


text:
Frederick Sanger, Ph.D. on Preparation
There was a new professor that came to the lab, Professor Chibnall, who worked on proteins, and he brought a group with him, and he offered me a job, and the first job he offered me was to study insulin, which is the — you know, the substance that they give to diabetics, which was a fairly small protein, but they didn't know anything about the actual chemical structure of it, except that it was built up of amino acids. And he and his group were mainly involved in the analysis of it, how many of the different amino acids were there. So, he gave me this job, and that's really what put me on the ladder, really, because my expertise has all been in sequencing, sequencing of amino acids and proteins and, later on, nucleic acids, DNA.

redpajama_set_name: RedPajamaCommonCrawl


For a brick house to be warm even in severe frosts, the brick width should be more than one meter. If we remember the old churches and noble shelves, the walls were thick enough to improve the thermal insulation. After all, the brick itself is quite "cold" material.
Characterized by the absolute cleanliness of the environment, the side track protects the facade of the house against the negative effects of precipitation. As a rail insulation, it is better to use mineral wool, which also has excellent sound insulating properties.
It should be noted that brick houses are now incredibly popular. This is a very practical material, but it also has its own negative side. First, it's about heating. Without this full brick housing they can not do. In this regard, a number of issues arise. The whole range of insulation materials has both negative and positive properties. Fortunately, there are practically no problems in arranging home with insulating materials. Only the most efficient material can be selected to ensure optimum thermal insulation.
When the room is cold, the question arises as to how to isolate the facade of a brick house. Not only to choose the best way, but also to properly procure construction materials: foams, foams, thermal panels, side rails and the use of wet or ventilated façade technology. If the house is just starting to build, you can immediately execute brick with insulation so that the building is warm and pleasant. Do not overlook the insulation of the brick facade until you read this article and do not find out how and for what purpose you use different types of insulation materials.
Is it better to insulate the facade of a brick house?
In contrast to concrete or wooden buildings, brick houses have their own properties. For example, the facade can be coated with silicate, red, spongy or hollow ceramic brick. The thermal conductivity of the walls depends on the source material, which will affect the best insulation in any case.


Prices are per 2 persons per day including VAT.
Tourist tax for adults, for maximum 7 days, € 1 per day.
Surcharge double room for single use € 15,50.
30% discount for children from 3 to 10.
Children up to 3 years, cot or extra bed if required € 5,50.
Upon specific request, we accept pets.
Possibility of thermal cure offsite affiliated ASL with transfer organized.
The price of the room and breakfast includes bed and breakfast.
Breakfast is international and served.
The change of bed linen is done once a week, towels when needed and room cleaning is daily.
at the time of booking is required a deposit of 30%. The balance will be made in loco.
you are not entitled to refund if you decide to leave early.


Seek To Know The Truth: In Defense of the Faith: What About the Trinity? Question: Christians generally believe in the Trinity, a "God" who is three Persons and yet one Supreme Being. But the word "Trinity" doesn't appear even once in the Bible, which plainly declares that there is only one God, not three. How can you possibly justify a belief in the "Trinity" from the Bible?
In Defense of the Faith: What About the Trinity? Question: Christians generally believe in the Trinity, a "God" who is three Persons and yet one Supreme Being. But the word "Trinity" doesn't appear even once in the Bible, which plainly declares that there is only one God, not three. How can you possibly justify a belief in the "Trinity" from the Bible?
At the burning bush God ( Elohim —literally Gods) said unto Moses, "I AM THAT I AM . . ." (Exodus:3:14). Here Gods speak but do not say, "We are that we are" but " I AM THAT I AM." Nor is the word Elohim the only way in which God's plurality is presented.
Consider, for example, Psalm:149:2 nkjv: "Let Israel rejoice in their Maker" (in the Hebrew, "makers"); Ecclesiastes:12:1: "Remember now thy Creator" (Hebrew, "creators"); and Isaiah:54:5: "For thy Maker is thine husband" (Hebrew, "makers" and "husbands"). Unitarianism has no explanation for this consistent presentation of both God's unity and plurality throughout the Old Testament.
At the very center of Israel's confession in Deuteronomy:6:4 of God's oneness (known as the shema ) is the plural form for God (elohenu): "Hear, O Israel: The Lord our God is one Lord" ( Shema yisroel adonai elohenu adonai echad ). The word used for "one," echad, often means a unity of more than one. Were that not the intention, then yachid, which means a single and absolute one, would have been used. The word echad is used, for example, in Genesis:2:24, where man and woman become " one flesh"; in Exodus:36:13, when the various parts "became one tabernacle"; in 2 Samuel:2:25, when many soldiers "became one troop"; and elsewhere similarly.
The great Hebrew prophet Isaiah declared of the birth of the Messiah: "For unto us a child is born, unto us a son is given; and the government shall be upon his shoulder; and his name shall be called Wonderful, Counselor, the mighty God, the everlasting Father . . ." (Isaiah:9:6). Such a concept is found nowhere else in the world's religious literature but is unique to the Bible: A Son would be born into this world who, though a man, would be the Mighty God. And though a Son, He would at the same time be the Everlasting Father.
Isaiah clearly presents the deity of Christ, the Fatherhood of God, and the oneness of the Father and the Son. All three Persons in the Godhead (Father, Son, and Holy Spirit) are clearly seen in the following: " . . . from the beginning . . . there am I; and now the Lord God and his Spirit hath sent me" (Isaiah:48:16). It could only be God who is speaking, this One who has been in existence from the beginning; yet He says that He has been sent forth by God and His Spirit. In the Trinity, two Persons are invisible (God the Father and the Spirit of God), while one is visible, the Son of God who became man.
Man himself, who is made "in the image of God" (Genesis:1:27; 9:6, etc.) is composed of three elements: body, soul, and spirit, of which again two (soul and spirit) are invisible and one, the body, is visible. The way man functions as a being also reflects the same analogy to the Trinity. We conceive something in our minds (invisible), perhaps a poem or a symphony; we express it in speech or writing or in music and it enters the present, visible world; it is then appreciated in the emotions, once again invisible.
We could offer more analogies, but these should be enough. There is no doubt that the Bible clearly presents three Persons who are distinct, yet each is God. At the same time, we repeatedly have the clear statement that there is only one true God. Christ prays to the Father. Is He praying to Himself? We are told, "The Father sent the Son to be the Savior of the world" (1 John:4:14). Did He send Himself? Or did one "office" pray to and send a "title," as the United Pentecostal Church would have us believe?
Christ said, "The words that I speak unto you I speak not of myself [on my own initiative], but the Father that dwelleth in me, he doeth the works" (John:14:10); "I will pray the Father, and he shall give you another Comforter, even the Spirit of truth" (John:14:16–17). Throughout the New Testament, Father, Son, and Holy Spirit are each separately honored and act as God, yet only in concert with one another.


John Louis Home shelving works great in linen and pantries as well.
The ventilated wood shelving, secured by mounting hardware and stylish angle brackets, provides strong attractive shelving, able to support all your linen and kitchen items.
We will often line one or two levels of pantry shelving with 5mm glass to give a more european look to prevent cans from scratching the shelving.


The sixth largest city in Alaska, Wasilla was established as a railroad intersection bringing business and work to the area. The town began to thrive with passing gold miners and fishers, becoming a place of agriculture within its own right….
Arizona may be a state well known for the Grand Canyon, Cathedral Rock, and its extensive desert regions, but there is nothing dry and dusty about Downtown Phoenix. The downtown neighborhood covers a hundred blocks which positively vibrate with life….
Orange County, or "The OC", is nestled between San Diego and Los Angeles in South California. This iconic county has gorgeous beaches, upscale communities, museums, shopping malls, and of course, the two theme parks – Disneyland and Knott's Berry Farm….
Once an area of lightly populated farmland, Avondale has now become a fast developing suburb of Phoenix, just 15 miles away. Avondale is situated by the Agua Fría River where it was originally founded in the 1890's as Coldwater, Arizona….
Switzerland is not a large country –it's only 41,285 square kilometres- but it's known to be a beautiful one thanks to its diverse geography. It's landlocked between the Alps and the Jura Mountains, with the Swiss Plateau sandwiched in between….


text:
Q: Prove that for each $n$, there are $n$ consecutive integers, each of which is divisible by a perfect square larger than $1$ Prove that for each positive integer $n$, there are $n$ consecutive integers, each of which is divisible by a
perfect square larger than $1$.

A: Consider the system of congruences
$x\equiv 0\pmod{2^2}$, $x\equiv -1\pmod{3^2}$, $x\equiv -2\pmod{5^2}$, and so on up to $x\equiv -(n-1)\pmod{p_{n-1}^2}$. (Here $p_0,p_1,\dots,p_{n-1}$ are the first $n$ primes.)
This system has a solution $x$, by the Chinese Remainder Theorem. Any such  $x$ is divisible by $2^2$, and $x+1$ is divisible by $3^2$, and so on.

redpajama_set_name: RedPajamaStackExchange


text:
package com.intellij.openapi.editor;

import com.intellij.psi.PsiElement;

/**
 * Defines whether or not some elements can be indented when a user selects a fragment of text and invokes "indent" action (normally by
 * pressing [TAB]). The elements which are said to be unmovable (canIndent() returns false) do not change their indentation. This may be
 * useful for cases like HEREDOC text handling.
 *
 * @author Rustam Vishnyakov
 */
public interface IndentStrategy {

  /**
   * Checks if an element can be indented.
   * @param element The element to check.
   * @return True if the element can change its indentation, false if the indentation must be preserved.
   */
  boolean canIndent(PsiElement element);
}

redpajama_set_name: RedPajamaGithub


text:
Q: Is the conjecture A+B=C following correct? Is the conjecture on A+B=C following correct ?

Conjecture: Let $A, B, C$ be three positive integer numbers such that $A+B=C$ with $\gcd(A, B, C) = 1$. By Fundamental theorem of arithmetic we write:
$A=a_1^{x_1}a_2^{x_2}...a_n^{x_n}$,
$B=b_1^{y_1}b_2^{y_2}...b_m^{y_m}$,
$C=c_1^{z_1}c_2^{z_2}...c_k^{z_k}$
Let $d = \min\{x_i, y_j, z_h \}$ where $1 \le i \le n,  1\ \le j \le m, 1\le h \le k$ then $$d \le 5$$

PS: I read above one hunded papers, I observed that in any case $\min\{x_i, y_j, z_h \} \le 3$
Example 1: Ten solutions of Catalan-Fermat equation
Example 2:
$2^4.3^5.7^6+5^9.11^8=19^1.23^1.47^1.6679^1.3051977^1$
See also:

*

*Minimal exponent in prime factorization of n A051904

*Nivens Constant


text:
/**
 * @file mali_kbase_mmu.c
 * Base kernel MMU management.
 */

/* #define DEBUG    1 */
#include <osk/mali_osk.h>
#include <kbase/src/common/mali_kbase.h>
#include <kbase/src/common/mali_midg_regmap.h>
#include <kbase/src/common/mali_kbase_gator.h>

#define beenthere(f, a...)  OSK_PRINT_INFO(OSK_BASE_MMU, "%s:" f, __func__, ##a)

#include <kbase/src/common/mali_kbase_defs.h>
#include <kbase/src/common/mali_kbase_hw.h>

#define KBASE_MMU_PAGE_ENTRIES 512

/*
 * Definitions:
 * - PGD: Page Directory.
 * - PTE: Page Table Entry. A 64bit value pointing to the next
 *        level of translation
 * - ATE: Address Transation Entry. A 64bit value pointing to
 *        a 4kB physical page.
 */

static void kbase_mmu_report_fault_and_kill(kbase_context *kctx, kbase_as * as, mali_addr64 fault_addr);
static u64 lock_region(kbase_device * kbdev, u64 pfn, u32 num_pages);

static void ksync_kern_vrange_gpu(osk_phy_addr paddr, osk_virt_addr vaddr, size_t size)
{
	osk_sync_to_memory(paddr, vaddr, size);
}

static u32 make_multiple(u32 minimum, u32 multiple)
{
	u32 remainder = minimum % multiple;
	if (remainder == 0)
	{
		return minimum;
	}
	else
	{
		return minimum + multiple - remainder;
	}
}

static void mmu_mask_reenable(kbase_device * kbdev, kbase_context *kctx, kbase_as * as)
{
	unsigned long flags;
	u32 mask;
	spin_lock_irqsave(&kbdev->mmu_mask_change, flags);
	mask = kbase_reg_read(kbdev, MMU_REG(MMU_IRQ_MASK), kctx);
	mask |= ((1UL << as->number) | (1UL << (MMU_REGS_BUS_ERROR_FLAG(as->number))));
	kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_MASK), mask, kctx);
	spin_unlock_irqrestore(&kbdev->mmu_mask_change, flags);
}

static void page_fault_worker(struct work_struct *data)
{
	u64 fault_pfn;
	u32 new_pages;
	u32 fault_rel_pfn;
	kbase_as * faulting_as;
	int as_no;
	kbase_context * kctx;
	kbase_device * kbdev;
	kbase_va_region *region;
	mali_error err;

	u32 fault_status;

	faulting_as = container_of(data, kbase_as, work_pagefault);
	fault_pfn = faulting_as->fault_addr >> PAGE_SHIFT;
	as_no = faulting_as->number;

	kbdev = container_of( faulting_as, kbase_device, as[as_no] );

	/* Grab the context that was already refcounted in kbase_mmu_interrupt().
	 * Therefore, it cannot be scheduled out of this AS until we explicitly release it
	 *
	 * NOTE: NULL can be returned here if we're gracefully handling a spurious interrupt */
	kctx = kbasep_js_runpool_lookup_ctx_noretain( kbdev, as_no );

	if ( kctx == NULL )
	{
		/* Address space has no context, terminate the work */
		u32 reg;
		/* AS transaction begin */
		mutex_lock(&faulting_as->transaction_mutex);
		reg = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_TRANSTAB_LO), NULL);
		reg = (reg & (~(u32)MMU_TRANSTAB_ADRMODE_MASK)) | ASn_TRANSTAB_ADRMODE_UNMAPPED;
		kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_TRANSTAB_LO), reg, NULL);
		kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_COMMAND), ASn_COMMAND_UPDATE, NULL);
		kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_CLEAR), (1UL << as_no), NULL);
		mutex_unlock(&faulting_as->transaction_mutex);
		/* AS transaction end */

		mmu_mask_reenable(kbdev, NULL, faulting_as);
		return;
	}

	fault_status = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_FAULTSTATUS), NULL);

	OSK_ASSERT( kctx->kbdev == kbdev );

	kbase_gpu_vm_lock(kctx);

	/* find the region object for this VA */
	region = kbase_region_tracker_find_region_enclosing_address(kctx, faulting_as->fault_addr);
	if (NULL == region || (GROWABLE_FLAGS_REQUIRED != (region->flags & GROWABLE_FLAGS_MASK)))
	{
		kbase_gpu_vm_unlock(kctx);
		/* failed to find the region or mismatch of the flags */
		kbase_mmu_report_fault_and_kill(kctx, faulting_as, faulting_as->fault_addr);
		goto fault_done;
	}

	if ((((fault_status & ASn_FAULTSTATUS_ACCESS_TYPE_MASK) == ASn_FAULTSTATUS_ACCESS_TYPE_READ) &&
	        !(region->flags & KBASE_REG_GPU_RD)) ||
	    (((fault_status & ASn_FAULTSTATUS_ACCESS_TYPE_MASK) == ASn_FAULTSTATUS_ACCESS_TYPE_WRITE) &&
	        !(region->flags & KBASE_REG_GPU_WR)) ||
	    (((fault_status & ASn_FAULTSTATUS_ACCESS_TYPE_MASK) == ASn_FAULTSTATUS_ACCESS_TYPE_EX) &&
	        (region->flags & KBASE_REG_GPU_NX)))
	{
		OSK_PRINT_WARN(OSK_BASE_MMU, "Access permissions don't match: region->flags=0x%x", region->flags);
		kbase_gpu_vm_unlock(kctx);
		kbase_mmu_report_fault_and_kill(kctx, faulting_as, faulting_as->fault_addr);
		goto fault_done;
	}

	/* find the size we need to grow it by */
	/* we know the result fit in a u32 due to kbase_region_tracker_find_region_enclosing_address
	 * validating the fault_adress to be within a u32 from the start_pfn */
	fault_rel_pfn = fault_pfn - region->start_pfn;

	if (fault_rel_pfn < region->nr_alloc_pages)
	{
		OSK_PRINT_WARN(OSK_BASE_MMU, "Fault in allocated region of growable TMEM: Ignoring");
		kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_CLEAR), (1UL << as_no), NULL);
		mmu_mask_reenable(kbdev, kctx, faulting_as);
		kbase_gpu_vm_unlock(kctx);
		goto fault_done;
	}

	new_pages = make_multiple(fault_rel_pfn - region->nr_alloc_pages + 1, region->extent);
	if (new_pages + region->nr_alloc_pages > region->nr_pages)
	{
		/* cap to max vsize */
		new_pages = region->nr_pages - region->nr_alloc_pages;
	}

	if (0 == new_pages)
	{
		/* Duplicate of a fault we've already handled, nothing to do */
		kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_CLEAR), (1UL << as_no), NULL);
		mmu_mask_reenable(kbdev, kctx, faulting_as);
		kbase_gpu_vm_unlock(kctx);
		goto fault_done;
	}

	if (MALI_ERROR_NONE == kbase_alloc_phy_pages_helper(region, new_pages))
	{
		/* alloc success */
		mali_addr64 lock_addr;
		OSK_ASSERT(region->nr_alloc_pages <= region->nr_pages);

		/* AS transaction begin */
		mutex_lock(&faulting_as->transaction_mutex);

		/* Lock the VA region we're about to update */
		lock_addr = lock_region(kbdev, faulting_as->fault_addr >> PAGE_SHIFT, new_pages);
		kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_LOCKADDR_LO), lock_addr & 0xFFFFFFFFUL, kctx);
		kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_LOCKADDR_HI), lock_addr >> 32, kctx);
		kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_COMMAND), ASn_COMMAND_LOCK, kctx);

		/* set up the new pages */
		err = kbase_mmu_insert_pages(kctx, region->start_pfn + region->nr_alloc_pages - new_pages,
		                             &region->phy_pages[region->nr_alloc_pages - new_pages],
		                             new_pages, region->flags);
		if(MALI_ERROR_NONE != err)
		{
			/* failed to insert pages, handle as a normal PF */
			mutex_unlock(&faulting_as->transaction_mutex);
			kbase_gpu_vm_unlock(kctx);
			/* The locked VA region will be unlocked and the cache invalidated in here */
			kbase_mmu_report_fault_and_kill(kctx, faulting_as, faulting_as->fault_addr);
			goto fault_done;
		}

#ifdef CONFIG_MALI_GATOR_SUPPORT
		kbase_trace_mali_page_fault_insert_pages(as_no, new_pages);
#endif /* CONFIG_MALI_GATOR_SUPPORT */
		/* clear the irq */
		/* MUST BE BEFORE THE FLUSH/UNLOCK */
		kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_CLEAR), (1UL << as_no), NULL);

		/* flush L2 and unlock the VA (resumes the MMU) */
		if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_6367))
		{
			kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_COMMAND), ASn_COMMAND_FLUSH, kctx);
		}
		else
		{
			kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_COMMAND), ASn_COMMAND_FLUSH_PT, kctx);
		}

		/* wait for the flush to complete */
		while (kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_STATUS), kctx) & 1);

		if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_9630))
		{
			/* Issue an UNLOCK command to ensure that valid page tables are re-read by the GPU after an update.
			Note that, the FLUSH command should perform all the actions necessary, however the bus logs show
			that if multiple page faults occur within an 8 page region the MMU does not always re-read the
			updated page table entries for later faults or is only partially read, it subsequently raises the
			page fault IRQ for the same addresses, the unlock ensures that the MMU cache is flushed, so updates
			can be re-read.  As the region is now unlocked we need to issue 2 UNLOCK commands in order to flush the
			MMU/uTLB, see PRLAM-8812.
                        */
			kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_UNLOCK, kctx);
			kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_UNLOCK, kctx);
		}

		mutex_unlock(&faulting_as->transaction_mutex);
		/* AS transaction end */

		/* reenable this in the mask */
		mmu_mask_reenable(kbdev, kctx, faulting_as);
		kbase_gpu_vm_unlock(kctx);
	}
	else
	{
		/* failed to extend, handle as a normal PF */
		kbase_gpu_vm_unlock(kctx);
		kbase_mmu_report_fault_and_kill(kctx, faulting_as, faulting_as->fault_addr);
	}

fault_done:
	/* By this point, the fault was handled in some way, so release the ctx refcount */
	kbasep_js_runpool_release_ctx( kbdev, kctx );
}

osk_phy_addr kbase_mmu_alloc_pgd(kbase_context *kctx)
{
	osk_phy_addr pgd;
	u64 *page;
	int i;
	OSK_ASSERT( NULL != kctx);
	if (MALI_ERROR_NONE != kbase_mem_usage_request_pages(&kctx->usage, 1))
	{
		return 0;
	}
	if (MALI_ERROR_NONE != kbase_mem_allocator_alloc(kctx->pgd_allocator, 1, &pgd, 0))
	{
		kbase_mem_usage_release_pages(&kctx->usage, 1);
		return 0;
	}

	page = osk_kmap(pgd);
	if(NULL == page)
	{
		kbase_mem_allocator_free(kctx->pgd_allocator, 1, &pgd);
		kbase_mem_usage_release_pages(&kctx->usage, 1);
		return 0;
	}

	kbase_process_page_usage_inc(kctx, 1);

	for (i = 0; i < KBASE_MMU_PAGE_ENTRIES; i++)
		page[i] = ENTRY_IS_INVAL;

	/* Clean the full page */
	ksync_kern_vrange_gpu(pgd, page, KBASE_MMU_PAGE_ENTRIES * sizeof(u64));
	osk_kunmap(pgd, page);
	return pgd;
}
KBASE_EXPORT_TEST_API(kbase_mmu_alloc_pgd)

static osk_phy_addr mmu_pte_to_phy_addr(u64 entry)
{
	if (!(entry & 1))
		return 0;

	return entry & ~0xFFF;
}

static u64 mmu_phyaddr_to_pte(osk_phy_addr phy)
{
	return (phy & ~0xFFF) | ENTRY_IS_PTE;
}

static u64 mmu_phyaddr_to_ate(osk_phy_addr phy, u64 flags)
{
	return (phy & ~0xFFF) | (flags & ENTRY_FLAGS_MASK) | ENTRY_IS_ATE;
}

/* Given PGD PFN for level N, return PGD PFN for level N+1 */
static osk_phy_addr mmu_get_next_pgd(kbase_context *kctx,
                                     osk_phy_addr pgd, u64 vpfn, int level)
{
	u64 *page;
	osk_phy_addr target_pgd;

	OSK_ASSERT(pgd);

	/*
	 * Architecture spec defines level-0 as being the top-most.
	 * This is a bit unfortunate here, but we keep the same convention.
	 */
	vpfn >>= (3 - level) * 9;
	vpfn &= 0x1FF;

	page = osk_kmap(pgd);
	if(NULL == page)
	{
		OSK_PRINT_WARN(OSK_BASE_MMU, "mmu_get_next_pgd: kmap failure\n");
		return 0;
	}

	target_pgd = mmu_pte_to_phy_addr(page[vpfn]);

	if (!target_pgd) {
		target_pgd = kbase_mmu_alloc_pgd(kctx);
		if(!target_pgd)
		{
			OSK_PRINT_WARN(OSK_BASE_MMU, "mmu_get_next_pgd: kbase_mmu_alloc_pgd failure\n");
			osk_kunmap(pgd, page);
			return 0;
		}

		page[vpfn] = mmu_phyaddr_to_pte(target_pgd);
		ksync_kern_vrange_gpu(pgd + (vpfn * sizeof(u64)), page + vpfn, sizeof(u64));
		/* Rely on the caller to update the address space flags. */
	}

	osk_kunmap(pgd, page);
	return target_pgd;
}

static osk_phy_addr mmu_get_bottom_pgd(kbase_context *kctx, u64 vpfn)
{
	osk_phy_addr pgd;
	int l;

	pgd = kctx->pgd;

	for (l = MIDGARD_MMU_TOPLEVEL; l < 3; l++) {
		pgd = mmu_get_next_pgd(kctx, pgd, vpfn, l);
		/* Handle failure condition */
		if(!pgd)
		{
			OSK_PRINT_WARN(OSK_BASE_MMU, "mmu_get_bottom_pgd: mmu_get_next_pgd failure\n");
			return 0;
		}
	}

	return pgd;
}

static osk_phy_addr mmu_insert_pages_recover_get_next_pgd(kbase_context *kctx,
                                                          osk_phy_addr pgd, u64 vpfn, int level)
{
	u64 *page;
	osk_phy_addr target_pgd;

	OSK_ASSERT(pgd);
	CSTD_UNUSED(kctx);

	/*
	 * Architecture spec defines level-0 as being the top-most.
	 * This is a bit unfortunate here, but we keep the same convention.
	 */
	vpfn >>= (3 - level) * 9;
	vpfn &= 0x1FF;

	page = osk_kmap_atomic(pgd);
	/* osk_kmap_atomic should NEVER fail */
	OSK_ASSERT(NULL != page);

	target_pgd = mmu_pte_to_phy_addr(page[vpfn]);
	/* As we are recovering from what has already been set up, we should have a target_pgd */
	OSK_ASSERT(0 != target_pgd);

	osk_kunmap_atomic(pgd, page);
	return target_pgd;
}

static osk_phy_addr mmu_insert_pages_recover_get_bottom_pgd(kbase_context *kctx, u64 vpfn)
{
	osk_phy_addr pgd;
	int l;

	pgd = kctx->pgd;

	for (l = MIDGARD_MMU_TOPLEVEL; l < 3; l++) {
		pgd = mmu_insert_pages_recover_get_next_pgd(kctx, pgd, vpfn, l);
		/* Should never fail */
		OSK_ASSERT(0 != pgd);
	}

	return pgd;
}

static void mmu_insert_pages_failure_recovery(kbase_context *kctx, u64 vpfn,
                                              osk_phy_addr *phys, u32 nr)
{
	osk_phy_addr pgd;
	u64 *pgd_page;

	OSK_ASSERT( NULL != kctx );
	OSK_ASSERT( 0 != vpfn );
	OSK_ASSERT( vpfn <= (UINT64_MAX / PAGE_SIZE) ); /* 64-bit address range is the max */

	while (nr) {
		u32 i;
		u32 index = vpfn & 0x1FF;
		u32 count = KBASE_MMU_PAGE_ENTRIES - index;

		if (count > nr)
		{
			count = nr;
		}

		pgd = mmu_insert_pages_recover_get_bottom_pgd(kctx, vpfn);
		OSK_ASSERT(0 != pgd);

		pgd_page = osk_kmap_atomic(pgd);
		OSK_ASSERT(NULL != pgd_page);

		/* Invalidate the entries we added */
		for (i = 0; i < count; i++) {
			pgd_page[index + i] = ENTRY_IS_INVAL;
		}

		phys += count;
		vpfn += count;
		nr -= count;

		ksync_kern_vrange_gpu(pgd + (index * sizeof(u64)), pgd_page + index, count * sizeof(u64));

		osk_kunmap_atomic(pgd, pgd_page);
	}
}

/*
 * Map 'nr' pages pointed to by 'phys' at GPU PFN 'vpfn'
 */
mali_error kbase_mmu_insert_pages(kbase_context *kctx, u64 vpfn,
                                  osk_phy_addr *phys, u32 nr, u32 flags)
{
	osk_phy_addr pgd;
	u64 *pgd_page;
	u64 mmu_flags = 0;
	/* In case the insert_pages only partially completes we need to be able to recover */
	mali_bool recover_required = MALI_FALSE;
	u64 recover_vpfn = vpfn;
	osk_phy_addr *recover_phys = phys;
	u32 recover_count = 0;

	OSK_ASSERT( NULL != kctx );
	OSK_ASSERT( 0 != vpfn );
	OSK_ASSERT( (flags & ~((1 << KBASE_REG_FLAGS_NR_BITS) - 1)) == 0 );
	OSK_ASSERT( vpfn <= (UINT64_MAX / PAGE_SIZE) ); /* 64-bit address range is the max */

	mmu_flags |= (flags & KBASE_REG_GPU_WR) ? ENTRY_WR_BIT : 0; /* write perm if requested */
	mmu_flags |= (flags & KBASE_REG_GPU_RD) ? ENTRY_RD_BIT : 0; /* read perm if requested */
	mmu_flags |= (flags & KBASE_REG_GPU_NX) ? ENTRY_NX_BIT : 0; /* nx if requested */

	if (flags & KBASE_REG_SHARE_BOTH)
	{
		/* inner and outer shareable */
		mmu_flags |= SHARE_BOTH_BITS;
	}
	else if (flags & KBASE_REG_SHARE_IN)
	{
		/* inner shareable coherency */
		mmu_flags |= SHARE_INNER_BITS;
	}

	while (nr) {
		u32 i;
		u32 index = vpfn & 0x1FF;
		u32 count = KBASE_MMU_PAGE_ENTRIES - index;

		if (count > nr)
			count = nr;

		/*
		 * Repeatedly calling mmu_get_bottom_pte() is clearly
		 * suboptimal. We don't have to re-parse the whole tree
		 * each time (just cache the l0-l2 sequence).
		 * On the other hand, it's only a gain when we map more than
		 * 256 pages at once (on average). Do we really care?
		 */
		pgd = mmu_get_bottom_pgd(kctx, vpfn);
		if(!pgd)
		{
			OSK_PRINT_WARN(OSK_BASE_MMU, "kbase_mmu_insert_pages: mmu_get_bottom_pgd failure\n");
			if(recover_required)
			{
				/* Invalidate the pages we have partially completed */
				mmu_insert_pages_failure_recovery(kctx, recover_vpfn, recover_phys, recover_count);
			}
			return MALI_ERROR_FUNCTION_FAILED;
		}

		pgd_page = osk_kmap(pgd);
		if(!pgd_page)
		{
			OSK_PRINT_WARN(OSK_BASE_MMU, "kbase_mmu_insert_pages: kmap failure\n");
			if(recover_required)
			{
				/* Invalidate the pages we have partially completed */
				mmu_insert_pages_failure_recovery(kctx, recover_vpfn, recover_phys, recover_count);
			}
			return MALI_ERROR_OUT_OF_MEMORY;
		}

		for (i = 0; i < count; i++) {
			OSK_ASSERT(0 == (pgd_page[index + i] & 1UL));
			pgd_page[index + i] = mmu_phyaddr_to_ate(phys[i], mmu_flags);
		}

		phys += count;
		vpfn += count;
		nr -= count;

		ksync_kern_vrange_gpu(pgd + (index * sizeof(u64)), pgd_page + index, count * sizeof(u64));

		osk_kunmap(pgd, pgd_page);
		/* We have started modifying the page table. If further pages need inserting and fail we need to
		 * undo what has already taken place */
		recover_required = MALI_TRUE;
		recover_count+= count;
	}
	return MALI_ERROR_NONE;
}
KBASE_EXPORT_TEST_API(kbase_mmu_insert_pages)

/*
 * We actually only discard the ATE, and not the page table
 * pages. There is a potential DoS here, as we'll leak memory by
 * having PTEs that are potentially unused.  Will require physical
 * page accounting, so MMU pages are part of the process allocation.
 *
 * IMPORTANT: This uses kbasep_js_runpool_release_ctx() when the context is
 * currently scheduled into the runpool, and so potentially uses a lot of locks.
 * These locks must be taken in the correct order with respect to others
 * already held by the caller. Refer to kbasep_js_runpool_release_ctx() for more
 * information.
 */
 mali_error kbase_mmu_teardown_pages(kbase_context *kctx, u64 vpfn, u32 nr)
{
	osk_phy_addr pgd;
	u64 *pgd_page;
	kbase_device *kbdev;
	mali_bool ctx_is_in_runpool;
	u32 requested_nr = nr;

	beenthere("kctx %p vpfn %lx nr %d", (void *)kctx, (unsigned long)vpfn, nr);

	OSK_ASSERT(NULL != kctx);

	if (0 == nr)
	{
		/* early out if nothing to do */
		return MALI_ERROR_NONE;
	}

	kbdev = kctx->kbdev;

	while (nr)
	{
		u32 i;
		u32 index = vpfn & 0x1FF;
		u32 count = KBASE_MMU_PAGE_ENTRIES - index;
		if (count > nr)
			count = nr;

		pgd = mmu_get_bottom_pgd(kctx, vpfn);
		if(!pgd)
		{
			OSK_PRINT_WARN(OSK_BASE_MMU, "kbase_mmu_teardown_pages: mmu_get_bottom_pgd failure\n");
			return MALI_ERROR_FUNCTION_FAILED;
		}

		pgd_page = osk_kmap(pgd);
		if(!pgd_page)
		{
			OSK_PRINT_WARN(OSK_BASE_MMU, "kbase_mmu_teardown_pages: kmap failure\n");
			return MALI_ERROR_OUT_OF_MEMORY;
		}

		for (i = 0; i < count; i++) {
			/*
			 * Possible micro-optimisation: only write to the
			 * low 32bits. That's enough to invalidate the mapping.
			 */
			pgd_page[index + i] = ENTRY_IS_INVAL;
		}

		vpfn += count;
		nr -= count;

		ksync_kern_vrange_gpu(pgd + (index * sizeof(u64)), pgd_page + index, count * sizeof(u64));

		osk_kunmap(pgd, pgd_page);
	}

	/* We must flush if we're currently running jobs. At the very least, we need to retain the
	 * context to ensure it doesn't schedule out whilst we're trying to flush it */
	ctx_is_in_runpool = kbasep_js_runpool_retain_ctx( kbdev, kctx );

	if ( ctx_is_in_runpool )
	{
		OSK_ASSERT( kctx->as_nr != KBASEP_AS_NR_INVALID );

		/* Second level check is to try to only do this when jobs are running. The refcount is
		 * a heuristic for this. */
		if ( kbdev->js_data.runpool_irq.per_as_data[kctx->as_nr].as_busy_refcount >= 2 )
		{
			/* Lock the VA region we're about to update */
			u64 lock_addr = lock_region(kbdev, vpfn, requested_nr);
			u32 max_loops = KBASE_AS_FLUSH_MAX_LOOPS;

			/* AS transaction begin */
			mutex_lock(&kbdev->as[kctx->as_nr].transaction_mutex);
			kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_LOCKADDR_LO), lock_addr & 0xFFFFFFFFUL, kctx);
			kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_LOCKADDR_HI), lock_addr >> 32, kctx);
			kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_LOCK, kctx);

			/* flush L2 and unlock the VA */
			if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_6367))
			{
				kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_FLUSH, kctx);
			}
			else
			{
				kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_FLUSH_MEM, kctx);
			}

			/* wait for the flush to complete */
			while (--max_loops &&
			       kbase_reg_read(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_STATUS), kctx) & ASn_STATUS_FLUSH_ACTIVE)
			{
			}

			if (!max_loops)
			{
				/* Flush failed to complete, assume the GPU has hung and perform a reset to recover */
				OSK_PRINT_ERROR(OSK_BASE_MMU, "ASn_STATUS_FLUSH_ACTIVE stuck set. Resetting to recover\n");
				if (kbase_prepare_to_reset_gpu(kbdev))
				{
					kbase_reset_gpu(kbdev);
				}
			}

			if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_9630))
			{
				/* Issue an UNLOCK command to ensure that valid page tables are re-read by the GPU after an update.
				Note that, the FLUSH command should perform all the actions necessary, however the bus logs show
				that if multiple page faults occur within an 8 page region the MMU does not always re-read the
				updated page table entries for later faults or is only partially read, it subsequently raises the
				page fault IRQ for the same addresses, the unlock ensures that the MMU cache is flushed, so updates
				can be re-read.  As the region is now unlocked we need to issue 2 UNLOCK commands in order to flush the
				MMU/uTLB, see PRLAM-8812.
                                */
				kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_UNLOCK, kctx);
				kbase_reg_write(kctx->kbdev, MMU_AS_REG(kctx->as_nr, ASn_COMMAND), ASn_COMMAND_UNLOCK, kctx);
			}

			mutex_unlock(&kbdev->as[kctx->as_nr].transaction_mutex);
			/* AS transaction end */
		}
		kbasep_js_runpool_release_ctx( kbdev, kctx );
	}
	return MALI_ERROR_NONE;
}
KBASE_EXPORT_TEST_API(kbase_mmu_teardown_pages)

static int mmu_pte_is_valid(u64 pte)
{
	return ((pte & 3) == ENTRY_IS_ATE);
}

/* This is a debug feature only */
static void mmu_check_unused(kbase_context *kctx, osk_phy_addr pgd)
{
	u64 *page;
	int i;
	CSTD_UNUSED(kctx);

	page = osk_kmap_atomic(pgd);
	/* kmap_atomic should NEVER fail. */
	OSK_ASSERT(NULL != page);

	for (i = 0; i < KBASE_MMU_PAGE_ENTRIES; i++)
	{
		if (mmu_pte_is_valid(page[i]))
		{
			beenthere("live pte %016lx", (unsigned long)page[i]);
		}
	}
	osk_kunmap_atomic(pgd, page);
}

static void mmu_teardown_level(kbase_context *kctx, osk_phy_addr pgd, int level, int zap, u64 *pgd_page_buffer)
{
	osk_phy_addr target_pgd;
	u64 *pgd_page;
	int i;

	pgd_page = osk_kmap_atomic(pgd);
	/* kmap_atomic should NEVER fail. */
	OSK_ASSERT(NULL != pgd_page);
	/* Copy the page to our preallocated buffer so that we can minimize kmap_atomic usage */
	memcpy(pgd_page_buffer, pgd_page, PAGE_SIZE);
	osk_kunmap_atomic(pgd, pgd_page);
	pgd_page = pgd_page_buffer;

	for (i = 0; i < KBASE_MMU_PAGE_ENTRIES; i++) {
		target_pgd = mmu_pte_to_phy_addr(pgd_page[i]);

		if (target_pgd) {
			if (level < 2)
			{
				mmu_teardown_level(kctx, target_pgd, level + 1, zap, pgd_page_buffer+(PAGE_SIZE/sizeof(u64)));
			}
			else {
				/*
				 * So target_pte is a level-3 page.
				 * As a leaf, it is safe to free it.
				 * Unless we have live pages attached to it!
				 */
				mmu_check_unused(kctx, target_pgd);
			}

			beenthere("pte %lx level %d", (unsigned long)target_pgd, level + 1);
			if (zap)
			{
				kbase_mem_allocator_free(kctx->pgd_allocator, 1, &target_pgd);
				kbase_process_page_usage_dec(kctx, 1);
				kbase_mem_usage_release_pages(&kctx->usage, 1);
			}
		}
	}
}

mali_error kbase_mmu_init(kbase_context *kctx)
{
	OSK_ASSERT(NULL != kctx);
	OSK_ASSERT(NULL == kctx->mmu_teardown_pages);

	/* Preallocate MMU depth of four pages for mmu_teardown_level to use */
	if(OSK_SIMULATE_FAILURE(OSK_OSK))
	{
		kctx->mmu_teardown_pages = NULL;
	}
	else
	{
		kctx->mmu_teardown_pages = kmalloc(PAGE_SIZE*4, GFP_KERNEL);
	}

	if(NULL == kctx->mmu_teardown_pages)
	{
		return MALI_ERROR_OUT_OF_MEMORY;
	}
	return MALI_ERROR_NONE;
}

void kbase_mmu_term(kbase_context *kctx)
{
	OSK_ASSERT(NULL != kctx);
	OSK_ASSERT(NULL != kctx->mmu_teardown_pages);

	kfree(kctx->mmu_teardown_pages);
	kctx->mmu_teardown_pages = NULL;
}

void kbase_mmu_free_pgd(kbase_context *kctx)
{
	OSK_ASSERT(NULL != kctx);
	OSK_ASSERT(NULL != kctx->mmu_teardown_pages);

	mmu_teardown_level(kctx, kctx->pgd, MIDGARD_MMU_TOPLEVEL, 1, kctx->mmu_teardown_pages);

	beenthere("pgd %lx", (unsigned long)kctx->pgd);
	kbase_mem_allocator_free(kctx->pgd_allocator, 1, &kctx->pgd);
	kbase_process_page_usage_dec(kctx, 1 );
	kbase_mem_usage_release_pages(&kctx->usage, 1);
}
KBASE_EXPORT_TEST_API(kbase_mmu_free_pgd)

static size_t kbasep_mmu_dump_level(kbase_context *kctx, osk_phy_addr pgd, int level, char **buffer, size_t *size_left)
{
	osk_phy_addr target_pgd;
	u64 *pgd_page;
	int i;
	size_t size = KBASE_MMU_PAGE_ENTRIES*sizeof(u64)+sizeof(u64);
	size_t dump_size;

	pgd_page = osk_kmap(pgd);
	if(!pgd_page)
	{
		OSK_PRINT_WARN(OSK_BASE_MMU, "kbasep_mmu_dump_level: kmap failure\n");
		return 0;
	}

	if (*size_left >= size)
	{
		/* A modified physical address that contains the page table level */
		u64 m_pgd = pgd | level;

		/* Put the modified physical address in the output buffer */
		memcpy(*buffer, &m_pgd, sizeof(m_pgd));
		*buffer += sizeof(m_pgd);

		/* Followed by the page table itself */
		memcpy(*buffer, pgd_page, sizeof(u64)*KBASE_MMU_PAGE_ENTRIES);
		*buffer += sizeof(u64)*KBASE_MMU_PAGE_ENTRIES;

		*size_left -= size;
	}

	for (i = 0; i < KBASE_MMU_PAGE_ENTRIES; i++) {
		if ((pgd_page[i] & ENTRY_IS_PTE) == ENTRY_IS_PTE) {
			target_pgd = mmu_pte_to_phy_addr(pgd_page[i]);

			 dump_size = kbasep_mmu_dump_level(kctx, target_pgd, level + 1, buffer, size_left);
			 if(!dump_size)
			 {
				osk_kunmap(pgd, pgd_page);
			 	return 0;
			 }
			size += dump_size;
		}
	}

	osk_kunmap(pgd, pgd_page);

	return size;
}

void *kbase_mmu_dump(kbase_context *kctx,int nr_pages)
{
	void *kaddr;
	size_t size_left;

	OSK_ASSERT(kctx);

	if (0 == nr_pages)
	{
		/* can't find in a 0 sized buffer, early out */
		return NULL;
	}

	size_left = nr_pages * PAGE_SIZE;

	if(OSK_SIMULATE_FAILURE(OSK_OSK))
	{
		kaddr = NULL;
	}
	else
	{
		OSK_ASSERT(0 != size_left);
		kaddr = vmalloc_user(size_left);
	}

	if (kaddr)
	{
		u64 end_marker = 0xFFULL;
		char *buffer = (char*)kaddr;

		size_t size = kbasep_mmu_dump_level(kctx, kctx->pgd, MIDGARD_MMU_TOPLEVEL, &buffer, &size_left);
		if(!size)
		{
			vfree(kaddr);
			return NULL;
		}

		/* Add on the size for the end marker */
		size += sizeof(u64);

		if (size > nr_pages * PAGE_SIZE || size_left < sizeof(u64)) {
			/* The buffer isn't big enough - free the memory and return failure */
			vfree(kaddr);
			return NULL;
		}

		/* Add the end marker */
		memcpy(buffer, &end_marker, sizeof(u64));
	}

	return kaddr;
}
KBASE_EXPORT_TEST_API(kbase_mmu_dump)

static u64 lock_region(kbase_device *kbdev, u64 pfn, u32 num_pages)
{
	u64 region;

	/* can't lock a zero sized range */
	OSK_ASSERT(num_pages);

	region = pfn << PAGE_SHIFT;
	/*
	 * osk_clz returns (given the ASSERT above):
	 * 32-bit: 0 .. 31
	 * 64-bit: 0 .. 63
	 *
	 * 32-bit: 32 + 10 - osk_clz(num_pages)
	 * results in the range (11 .. 42)
	 * 64-bit: 64 + 10 - osk_clz(num_pages)
	 * results in the range (11 .. 42)
	 */

	/* gracefully handle num_pages being zero */
	if (0 == num_pages)
	{
		region |= 11;
	}
	else
	{
		u8 region_width;
		region_width = ( OSK_BITS_PER_LONG + 10 - osk_clz(num_pages) );
		if (num_pages != (1ul << (region_width - 11)))
		{
			/* not pow2, so must go up to the next pow2 */
			region_width += 1;
		}
		OSK_ASSERT(region_width <= KBASE_LOCK_REGION_MAX_SIZE);
		OSK_ASSERT(region_width >= KBASE_LOCK_REGION_MIN_SIZE);
		region |= region_width;
	}

	return region;
}

static void bus_fault_worker(struct work_struct *data)
{
	const int num_as = 16;
	kbase_as * faulting_as;
	int as_no;
	kbase_context * kctx;
	kbase_device * kbdev;
	u32 reg;
	mali_bool reset_status= MALI_FALSE;

	faulting_as = container_of(data, kbase_as, work_busfault);
	as_no = faulting_as->number;

	kbdev = container_of( faulting_as, kbase_device, as[as_no] );

	/* Grab the context that was already refcounted in kbase_mmu_interrupt().
	 * Therefore, it cannot be scheduled out of this AS until we explicitly release it
	 *
	 * NOTE: NULL can be returned here if we're gracefully handling a spurious interrupt */
	kctx = kbasep_js_runpool_lookup_ctx_noretain( kbdev, as_no );

	/* switch to UNMAPPED mode, will abort all jobs and stop any hw counter dumping */
	/* AS transaction begin */
	mutex_lock(&kbdev->as[as_no].transaction_mutex);

	if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_8245))
	{
		/* Due to H/W issue 8245 we need to reset the GPU after using UNMAPPED mode.
		 * We start the reset before switching to UNMAPPED to ensure that unrelated jobs
		 * are evicted from the GPU before the switch.
		 */
		OSK_PRINT_WARN(OSK_BASE_MMU, "NOTE: GPU will now be reset as a workaround for a hardware issue*");
		reset_status = kbase_prepare_to_reset_gpu(kbdev);
	}

	reg = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_TRANSTAB_LO), kctx);
	reg &= ~3;
	kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_TRANSTAB_LO), reg, kctx);
	kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_COMMAND), ASn_COMMAND_UPDATE, kctx);

	kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_CLEAR), (1UL << as_no) | (1UL << (as_no + num_as))  , NULL);
	mutex_unlock(&kbdev->as[as_no].transaction_mutex);
	/* AS transaction end */

	mmu_mask_reenable( kbdev, kctx, faulting_as );

	if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_8245) && reset_status)
	{
		kbase_reset_gpu(kbdev);
	}

	/* By this point, the fault was handled in some way, so release the ctx refcount */
	if ( kctx != NULL )
	{
		kbasep_js_runpool_release_ctx( kbdev, kctx );
	}
}

void kbase_mmu_interrupt(kbase_device * kbdev, u32 irq_stat)
{
	unsigned long flags;
	const int num_as = 16;
	kbasep_js_device_data *js_devdata;
	const int busfault_shift = 16;
	const int pf_shift = 0;
	const unsigned long mask = (1UL << num_as) - 1;

	u64 fault_addr;
	u32 new_mask;
	u32 tmp;

	u32 bf_bits = (irq_stat >> busfault_shift) & mask; /* bus faults */
	/* Ignore ASes with both pf and bf */
	u32 pf_bits = ((irq_stat >> pf_shift) & mask) & ~bf_bits;  /* page faults */

	OSK_ASSERT( NULL != kbdev);

	js_devdata = &kbdev->js_data;

	/* remember current mask */
	spin_lock_irqsave(&kbdev->mmu_mask_change, flags);
	new_mask = kbase_reg_read(kbdev, MMU_REG(MMU_IRQ_MASK), NULL);
	/* mask interrupts for now */
	kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_MASK), 0, NULL);
	spin_unlock_irqrestore(&kbdev->mmu_mask_change, flags);

	while (bf_bits)
	{
		kbase_as * as;
		int as_no;
		kbase_context * kctx;

		/* the while logic ensures we have a bit set, no need to check for not-found here */
		as_no = osk_find_first_set_bit(bf_bits);

		/* Refcount the kctx ASAP - it shouldn't disappear anyway, since Bus/Page faults
		 * _should_ only occur whilst jobs are running, and a job causing the Bus/Page fault
		 * shouldn't complete until the MMU is updated */
		kctx = kbasep_js_runpool_lookup_ctx( kbdev, as_no );

		/* mark as handled */
		bf_bits &= ~(1UL << as_no);

		/* find faulting address */
		fault_addr = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_FAULTADDRESS_HI), kctx);
		fault_addr <<= 32;
		fault_addr |= kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_FAULTADDRESS_LO), kctx);

		if (kctx)
		{
			/* hw counters dumping in progress, signal the other thread that it failed */
			if ((kbdev->hwcnt.kctx == kctx) && (kbdev->hwcnt.state == KBASE_INSTR_STATE_DUMPING))
			{
				kbdev->hwcnt.state = KBASE_INSTR_STATE_FAULT;
			}

			/* Stop the kctx from submitting more jobs and cause it to be scheduled
			 * out/rescheduled when all references to it are released */
			spin_lock_irqsave( &js_devdata->runpool_irq.lock, flags);
			kbasep_js_clear_submit_allowed( js_devdata, kctx );
			spin_unlock_irqrestore( &js_devdata->runpool_irq.lock, flags);

			OSK_PRINT_WARN(OSK_BASE_MMU, "Bus error in AS%d at 0x%016llx\n", as_no, fault_addr);
		}
		else
		{
			OSK_PRINT_WARN(OSK_BASE_MMU,
						   "Bus error in AS%d at 0x%016llx with no context present! "
						   "Suprious IRQ or SW Design Error?\n",
						   as_no, fault_addr);
		}

		as = &kbdev->as[as_no];

		/* remove the queued BFs from the mask */
		new_mask &= ~(1UL << (as_no + num_as));

		/* We need to switch to UNMAPPED mode - but we do this in a worker so that we can sleep */
		OSK_ASSERT(0 == object_is_on_stack(&as->work_busfault));
		INIT_WORK(&as->work_busfault, bus_fault_worker);
		queue_work(as->pf_wq, &as->work_busfault);
	}

	/*
	 * pf_bits is non-zero if we have at least one AS with a page fault and no bus fault.
	 * Handle the PFs in our worker thread.
	 */
	while (pf_bits)
	{
		kbase_as * as;
		/* the while logic ensures we have a bit set, no need to check for not-found here */
		int as_no = osk_find_first_set_bit(pf_bits);
		kbase_context * kctx;

		/* Refcount the kctx ASAP - it shouldn't disappear anyway, since Bus/Page faults
		 * _should_ only occur whilst jobs are running, and a job causing the Bus/Page fault
		 * shouldn't complete until the MMU is updated */
		kctx = kbasep_js_runpool_lookup_ctx( kbdev, as_no );

		/* mark as handled */
		pf_bits &= ~(1UL << as_no);

		/* find faulting address */
		fault_addr = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_FAULTADDRESS_HI), kctx);
		fault_addr <<= 32;
		fault_addr |= kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_FAULTADDRESS_LO), kctx);

		if ( kctx == NULL )
		{
			OSK_PRINT_WARN(OSK_BASE_MMU,
						   "Page fault in AS%d at 0x%016llx with no context present! "
						   "Suprious IRQ or SW Design Error?\n",
						   as_no, fault_addr);
		}

		as = &kbdev->as[as_no];

		/* remove the queued PFs from the mask */
		new_mask &= ~((1UL << as_no) | (1UL << (as_no + num_as)));

		/* queue work pending for this AS */
		as->fault_addr = fault_addr;

		OSK_ASSERT(0 == object_is_on_stack(&as->work_pagefault));
		INIT_WORK(&as->work_pagefault, page_fault_worker);
		queue_work(as->pf_wq, &as->work_pagefault);
	}

	/* reenable interrupts */
	spin_lock_irqsave(&kbdev->mmu_mask_change, flags);
	tmp = kbase_reg_read(kbdev, MMU_REG(MMU_IRQ_MASK), NULL);
	new_mask |= tmp;
	kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_MASK), new_mask, NULL);
	spin_unlock_irqrestore(&kbdev->mmu_mask_change, flags);
}
KBASE_EXPORT_TEST_API(kbase_mmu_interrupt)

const char *kbase_exception_name(u32 exception_code)
{
	const char *e;

	switch(exception_code)
	{
		/* Non-Fault Status code */
		case 0x00: e = "NOT_STARTED/IDLE/OK"; break;
		case 0x01: e = "DONE"; break;
		case 0x02: e = "INTERRUPTED"; break;
		case 0x03: e = "STOPPED"; break;
		case 0x04: e = "TERMINATED"; break;
		case 0x08: e = "ACTIVE"; break;
		/* Job exceptions */
		case 0x40: e = "JOB_CONFIG_FAULT"; break;
		case 0x41: e = "JOB_POWER_FAULT"; break;
		case 0x42: e = "JOB_READ_FAULT"; break;
		case 0x43: e = "JOB_WRITE_FAULT"; break;
		case 0x44: e = "JOB_AFFINITY_FAULT"; break;
		case 0x48: e = "JOB_BUS_FAULT"; break;
		case 0x50: e = "INSTR_INVALID_PC"; break;
		case 0x51: e = "INSTR_INVALID_ENC"; break;
		case 0x52: e = "INSTR_TYPE_MISMATCH"; break;
		case 0x53: e = "INSTR_OPERAND_FAULT"; break;
		case 0x54: e = "INSTR_TLS_FAULT"; break;
		case 0x55: e = "INSTR_BARRIER_FAULT"; break;
		case 0x56: e = "INSTR_ALIGN_FAULT"; break;
		case 0x58: e = "DATA_INVALID_FAULT"; break;
		case 0x59: e = "TILE_RANGE_FAULT"; break;
		case 0x5A: e = "ADDR_RANGE_FAULT"; break;
		case 0x60: e = "OUT_OF_MEMORY"; break;
		/* GPU exceptions */
		case 0x80: e = "DELAYED_BUS_FAULT"; break;
		case 0x81: e = "SHAREABILITY_FAULT"; break;
		/* MMU exceptions */
		case 0xC0: case 0xC1: case 0xC2: case 0xC3:
		case 0xC4: case 0xC5: case 0xC6: case 0xC7:
			e = "TRANSLATION_FAULT"; break;
		case 0xC8: e = "PERMISSION_FAULT"; break;
		case 0xD0: case 0xD1: case 0xD2: case 0xD3:
		case 0xD4: case 0xD5: case 0xD6: case 0xD7:
			e = "TRANSTAB_BUS_FAULT"; break;
		case 0xD8: e = "ACCESS_FLAG"; break;
		default:
			e = "UNKNOWN"; break;
	};

	return e;
}

/**
 * The caller must ensure it's retained the ctx to prevent it from being scheduled out whilst it's being worked on.
 */
static void kbase_mmu_report_fault_and_kill(kbase_context *kctx, kbase_as * as, mali_addr64 fault_addr)
{
	unsigned long flags;
	u32 fault_status;
	u32 reg;
	int exception_type;
	int access_type;
	int source_id;
	int as_no;
	kbase_device * kbdev;
	kbasep_js_device_data *js_devdata;
	mali_bool reset_status = MALI_FALSE;
#ifdef CONFIG_MALI_DEBUG
	static const char *access_type_names[] = { "RESERVED", "EXECUTE", "READ", "WRITE" };
#endif /* CONFIG_MALI_DEBUG */

	OSK_ASSERT(as);
	OSK_ASSERT(kctx);
	CSTD_UNUSED(fault_addr);

	as_no = as->number;
	kbdev = kctx->kbdev;
	js_devdata = &kbdev->js_data;

	/* ASSERT that the context won't leave the runpool */
	OSK_ASSERT( kbasep_js_debug_check_ctx_refcount( kbdev, kctx ) > 0 );

	fault_status = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_FAULTSTATUS), kctx);

	/* decode the fault status */
	exception_type = fault_status       & 0xFF;
	access_type =   (fault_status >> 8) & 0x3;
	source_id =     (fault_status >> 16);

	/* terminal fault, print info about the fault */
	OSK_PRINT_WARN(OSK_BASE_MMU, "Fault in AS%d at VA 0x%016llX", as_no, fault_addr);
	OSK_PRINT_WARN(OSK_BASE_MMU, "raw fault status 0x%X", fault_status);
	OSK_PRINT_WARN(OSK_BASE_MMU, "decoded fault status (%s):", (fault_status & (1 << 10) ? "DECODER FAULT" : "SLAVE FAULT"));
	OSK_PRINT_WARN(OSK_BASE_MMU, "exception type 0x%X: %s", exception_type, kbase_exception_name(exception_type));
	OSK_PRINT_WARN(OSK_BASE_MMU, "access type 0x%X: %s", access_type,  access_type_names[access_type]);
	OSK_PRINT_WARN(OSK_BASE_MMU, "source id 0x%X", source_id);

	/* hardware counters dump fault handling */
	if ((kbdev->hwcnt.kctx) &&
	    (kbdev->hwcnt.kctx->as_nr == as_no) &&
		(kbdev->hwcnt.state == KBASE_INSTR_STATE_DUMPING))
	{
		u32 num_core_groups = kbdev->gpu_props.num_core_groups;
		if ((fault_addr >= kbdev->hwcnt.addr) && (fault_addr < (kbdev->hwcnt.addr + (num_core_groups * 2048))))
		{
			kbdev->hwcnt.state = KBASE_INSTR_STATE_FAULT;
		}
	}

	/* Stop the kctx from submitting more jobs and cause it to be scheduled
	 * out/rescheduled - this will occur on releasing the context's refcount */
	spin_lock_irqsave( &js_devdata->runpool_irq.lock, flags);
	kbasep_js_clear_submit_allowed( js_devdata, kctx );
	spin_unlock_irqrestore( &js_devdata->runpool_irq.lock, flags);

	/* Kill any running jobs from the context. Submit is disallowed, so no more jobs from this
	 * context can appear in the job slots from this point on */
	kbase_job_kill_jobs_from_context(kctx);
	/* AS transaction begin */
	mutex_lock(&as->transaction_mutex);

	if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_8245))
	{
		/* Due to H/W issue 8245 we need to reset the GPU after using UNMAPPED mode.
		 * We start the reset before switching to UNMAPPED to ensure that unrelated jobs
		 * are evicted from the GPU before the switch.
		 */
		OSK_PRINT_WARN(OSK_BASE_MMU, "NOTE: GPU will now be reset as a workaround for a hardware issue**");
		reset_status = kbase_prepare_to_reset_gpu(kbdev);
	}

	/* switch to UNMAPPED mode, will abort all jobs and stop any hw counter dumping */
	reg = kbase_reg_read(kbdev, MMU_AS_REG(as_no, ASn_TRANSTAB_LO), kctx);
	reg &= ~3;
	kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_TRANSTAB_LO), reg, kctx);
	kbase_reg_write(kbdev, MMU_AS_REG(as_no, ASn_COMMAND), ASn_COMMAND_UPDATE, kctx);

	kbase_reg_write(kbdev, MMU_REG(MMU_IRQ_CLEAR), (1UL << as_no), NULL);

	mutex_unlock(&as->transaction_mutex);
	/* AS transaction end */
	mmu_mask_reenable(kbdev, kctx, as);

	if (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_8245) && reset_status)
	{
		kbase_reset_gpu(kbdev);
	}
}

void kbasep_as_do_poke(struct work_struct *work)
{
	kbase_as * as;
	kbase_device * kbdev;

	OSK_ASSERT(work);
	as = container_of(work, kbase_as, poke_work);
	kbdev = container_of(as, kbase_device, as[as->number]);

	kbase_pm_context_active(kbdev);

	/* AS transaction begin */
	mutex_lock(&as->transaction_mutex);
	/* Force a uTLB invalidate */
	kbase_reg_write(kbdev, MMU_AS_REG(as->number, ASn_COMMAND), ASn_COMMAND_UNLOCK, NULL);
	mutex_unlock(&as->transaction_mutex);
	/* AS transaction end */

	kbase_pm_context_idle(kbdev);

	if (atomic_read(&as->poke_refcount))
	{
		/* still someone depending on the UNLOCK, schedule a run */
		hrtimer_start(&as->poke_timer, HR_TIMER_DELAY_MSEC(5), HRTIMER_MODE_REL );
	}
}

enum hrtimer_restart kbasep_as_poke_timer_callback(struct hrtimer * timer)
{
	kbase_as * as = container_of(timer, kbase_as, poke_timer);

	OSK_ASSERT(NULL != as);

	queue_work(as->poke_wq, &as->poke_work);

	return HRTIMER_NORESTART;
}

void kbase_as_poking_timer_retain(kbase_as * as)
{
	OSK_ASSERT(as);

	if (1 == atomic_inc_return(&as->poke_refcount))
	{
		/* need to start poking */
		queue_work(as->poke_wq, &as->poke_work);
	}
}

void kbase_as_poking_timer_release(kbase_as * as)
{
	OSK_ASSERT(as);
	atomic_dec(&as->poke_refcount);
}


text:
Lagos Party Attendants Stabs Guest To Death For Collecting Food Several Times
Webby December 21, 2020 December 21, 2020
21-year-old man identified as Saheed Adesina has been stabbed to death during a brawl at a child christening party in the Ojuwoye, Mushin area of Lagos State.
Lagos State Police Command, which confirmed the incident, said fight broke out after Adesina was accused of collecting food more than three times while some other guests were yet to be served.
During the heated argument, Adesina was stabbed in his testicles and died after being rushed to the Oliyide General Hospital in Mushin.
A police report from the Area D Command, Mushin, quoted by Sahara Reporters, said the suspects took to their heels after stabbing the victim, and the party came to a shocking halt.
"The father of the deceased, one Adeshina Ismaila also of Ojuwoye Street, Mushin, reported to us that his son, Saheed Adeshina, of the same address, went to a naming ceremony. Trouble ensued when he was challenged over the collection of food for more than three times with the caterer.
"Suddenly, Saheed Adeshina raised the alarm that he had been stabbed at his testicles. He was later rushed to the Oliyide General Hospital, Mushin, where he was confirmed dead.
"The scene was visited by the Divisional Police Officer and a team of detectives. The deceased was taken to the Yaba General Hospital Mortuary for an autopsy, after taking a photograph. The suspects took to their heels after committing the heinous crime.
"Efforts are ongoing to unravel the mystery surrounding the death and to arrest the fleeing suspects," the police report reads.
Meanwhile, KanyiDaily had also reported how an angry father cancelled his daughter's marriage event without any tangible reason, and asked family and friends of the couple to go back to their destinations in Oyo State.
How military, police rescued 80 Islamic students – DHQ
Anambra APC register full of ghost names, says Moghalu
How I Caught My Newly Married Wife With My Pastor – Heartbroken Husband Tells Court
Court remands herdsman over murder
EFCC accuses ex-Gov Okorocha of peddling lies over his sealed college
18-Year-Old Nigerian Student Shot Dead By His Neighbour Over 'Loud Music' In US
See The Governor Who Has Been Ruling A Nigerian State From Abuja For Nearly 3 Months


A Pull Along Pup for the young child. Have this faithfull little pup follow you everywhere. He has a little ball between his front paws which he brings along with him. This lovely wooden toy is easily made from our plans.


"Ultralight Trike" means a high maneuverability and excellent nautical properties.
A towed buoy is an inflatable craft without its own means of propulsion.
These recreational devices are made in every imaginable shape. They can resemble jet skis, bananas, boats or other objects. They are used both by individuals and by beach resort businesses.
Inflatable models are made of particularly rugged plastic, usually vinyl. Commercial models feature extra reinforcements for increased sturdiness. Riders straddle the device, sit in or atop it. Some models support just the torso, the legs trailing in the water. An aerodynamic shape permits certain versions to become airborne.
Commercial models differ from those intended for individual use. They can carry more passengers, are sturdier, more durable and more costly. Of course, the greater the passenger load, the more powerful the tow-boat must be. Flying models must reach a certain minimum speed to leave the water.


Please note that all Inspired rings are custom made in our workshop to suit your chosen specifications, so that we can craft the perfect ring individually tailored to you. This takes 3-6 weeks from the date of your purchase. We do hold a limited amount and number of designs in stock so please let us know if you require your ring in a short timeframe and we will discuss options with you. If you have any questions before making your purchase, please contact us at design@theinspiredcollection.com.
International customers outside of New Zealand will be responsible for any duties and taxes charged by customs upon arrival into your country. To calculate the duties and tax cost for your country please click here.
From previous international sales we have established that the standard duties and tax rate when delivering to the United States is approximately 5.5% of the total value of the item.


text:
SUICIDE ON THE RISE AMONG KENYAN YOUTHS
Breaking NewsEducation
WHO OR WHAT IS RESPONSIBLE?
By News Pro Team Last updated Sep 6, 2019
Education stake holders in Kenya have expressed concern about the traumatizing high cases of suicide among Kenyan youths especially university students. Suicide is the process of taking one's own life. It is a tragic reaction to stressful life situations. Statistics indicate that there are over twenty documented cases of university students who have recently committed suicide. Even if the percentage of those committing suicide is negligible when compared to the entire student population, every life matters .Thus, these are tell-tale signs that things are not well. There is more than it meets the eye and every sane Kenyan can surely join me in taking up arms against this imminent threat to our children. The question is 'why should a young, mentally endowed guy with an obviously bright future take his life?'
Here are the symptoms, causes and prevention of suicidal tendencies among the youth.
SUICIDE WARNING SIGN POSTS
A person experiencing suicidal thoughts may show the following signs or symptoms
Feeling or appearing oppressed, disillusioned and hopeless
Increased unexplained isolation-withdrawal from social contact and wanting to be left alone
Getting their affairs in order or giving away their belongings to friends and relatives in preparation for their death
Unpredictable and unexplained mood swings for example being very happy one day but very sad and withdrawn the next day
Constantly talking about revenge, guilt, blame or shame
Constantly talking about death/suicide or regret about being alive. This involves statements such as 'I will kill myself"
Changes in sleeping patterns such as insomnia-lack of sleep
Constantly holding dangerous weapons such as a gun and a knife or drugs that could terminate life
Talking about being a burden to others
Feeling agitated such as pacing around a room, or wringing one's hands
Increased use of alcohol
MoE Co-curricular activities Committee; Guidelines for…
TSC Full List Of Transferred Teachers And Principals In…
(Exclusive) TSC list of transferred Teachers and Principals…
CAUSES OF SUICIDE AMONG KENYAN YOUTH
Disillusionment- most Kenyan youths are feeling hopeless. They have nothing to live for or look forward to. This lack of enthusiasm can easily drive them to death if no intervention measures are provided
An attempted suicide- a person who has attempted suicide before is more likely to do it again.
Stressful life experiences- these may include loss of a loved one, a job, a break up, financial or legal problems
A history of substance abuse- a person who abuses drugs and/or alcohol is likely to act on impulse due to blurred thoughts and wrong judgement of a situation
Access to fire arms such as guns and pistols or piled pills that could cause death increases the chances of committing suicide especially when one has suicidal tendencies
Underlying psychiatric disorders such as bipolar disorder, depression and post -traumatic stress disorder can easily trigger suicide.
A sexual abuse (rape).-a person who has been raped is vulnerable to suicide especially if s/he fails to get enough care and emotional support
Terminal illnesses such as cancer and HIV/AIDS-a person who is constantly undergoing treatment
SUICIDE-PREVENTION/ INTERVENTION MEASURES
Reach out to your close friend or relative whom you can trust with your feelings. Share them no matter how hard it may seem to be
Get in touch with your spiritual leader for moral support. This could be a priest, a catechist or pastor.
Call a suicide hot line. These ho lines are common in the US and they may prove helpful.
Visit a professional counsellor or book an appointment with one for social and emotional support. This greatly helps
Call 911- an emergency police hot line for help.
COMPETENCE BASED CURRICULUM IN KENYA SIMPLIFIED
(Exclusive) TSC list of transferred Teachers and…
TSC Transfer Lists 2023 per County and Region; 2023 TSC…
KCSE 2021/2022 Results; Top 100 schools nationally as per…
KEMI E-learning Portal Login (KEMI Virtual Campus) for TPD…
EXTRA COUNTY SECONDARY SCHOOLS IN NYERI COUNTY
KUCCPS 2022/2023 Cluster Cut Off Points, Subjects and…
Rigoma Girls Secondary School KCSE 2022-2023…


The Oracle Java 8 platform supports two system properties to configure the System console: sun.stdout.encoding and sun.stderr.encoding.
Default log4j configuration prints to console using platform's default encoding, however that's not what standard windows console expects.
This happens not just on one machine, but on all Windows desktops and servers in our organization.
Can we have out of the box Layout/Appender which prints directly to System.out/err?